From b17e9cc3f836ec844ed5010cd5f67fa6302182e0 Mon Sep 17 00:00:00 2001 From: Chili Palmer Date: Mon, 4 May 2026 10:15:01 +0200 Subject: [PATCH] feat: rework of the full CSS machine to tailwind and modular CSS Co-authored-by: Copilot --- TAILWIND.md | 577 ++ assets/css/app.css | 19 + assets/css/assistant.css | 206 + assets/css/editor.css | 1131 ++++ assets/css/forms.css | 141 + assets/css/import_editor.css | 689 +++ assets/css/media_editor.css | 474 ++ assets/css/menu_editor.css | 289 + assets/css/overlays.css | 336 + assets/css/panel.css | 541 ++ assets/css/shell.css | 807 +++ assets/css/sidebar.css | 1049 ++++ assets/css/tabs.css | 189 + assets/css/tokens.css | 148 + assets/css/utilities.css | 0 priv/ui/live.js => assets/js/app.js | 147 +- config/config.exs | 25 + config/dev.exs | 6 + lib/bds/desktop/endpoint.ex | 16 +- lib/bds/desktop/layouts.ex | 4 +- lib/bds/scripting/api_docs.ex | 98 +- mix.exs | 5 + mix.lock | 2 + priv/static/assets/app.css | 2 + priv/static/assets/app.js | 26 + priv/ui/app.css | 8527 -------------------------- test/bds/desktop/shell_live_test.exs | 33 +- test/bds/desktop_test.exs | 25 +- test/bds/ui/shell_test.exs | 141 +- 29 files changed, 7030 insertions(+), 8623 deletions(-) create mode 100644 TAILWIND.md create mode 100644 assets/css/app.css create mode 100644 assets/css/assistant.css create mode 100644 assets/css/editor.css create mode 100644 assets/css/forms.css create mode 100644 assets/css/import_editor.css create mode 100644 assets/css/media_editor.css create mode 100644 assets/css/menu_editor.css create mode 100644 assets/css/overlays.css create mode 100644 assets/css/panel.css create mode 100644 assets/css/shell.css create mode 100644 assets/css/sidebar.css create mode 100644 assets/css/tabs.css create mode 100644 assets/css/tokens.css create mode 100644 assets/css/utilities.css rename priv/ui/live.js => assets/js/app.js (91%) create mode 100644 priv/static/assets/app.css create mode 100644 priv/static/assets/app.js delete mode 100644 priv/ui/app.css diff --git a/TAILWIND.md b/TAILWIND.md new file mode 100644 index 0000000..76bdf14 --- /dev/null +++ b/TAILWIND.md @@ -0,0 +1,577 @@ +# Tailwind And Phoenix Asset Tooling For bDS2 Desktop + +## Purpose + +This document describes the target styling architecture for a Tailwind-integrated Phoenix LiveView desktop app in this repository. + +It is written as a handoff for a coding agent that will perform the implementation. + +This is not a migration guide from a public web app. It is a target-state guide for a Phoenix LiveView desktop shell with local assets, dense editor surfaces, overlays, resizable panes, and desktop-specific titlebar behavior. + +## Verified Current State + +The current app does not use the default Phoenix asset pipeline. + +- CSS is served directly from `priv/ui/app.css`. +- JS is served directly from `priv/ui/live.js`. +- Static assets are served from `priv/ui` in `lib/bds/desktop/endpoint.ex`. +- The root layout links `/assets/app.css` in `lib/bds/desktop/layouts.ex`, but that path is currently backed by `priv/ui/app.css`, not by generated Phoenix assets. +- There is no `:tailwind` or `:esbuild` setup in `mix.exs`. + +Relevant files: + +- `lib/bds/desktop/endpoint.ex` +- `lib/bds/desktop/layouts.ex` +- `mix.exs` +- `priv/ui/app.css` +- `priv/ui/live.js` + +## Official Phoenix Facts + +The implementation target should follow Phoenix defaults where they fit the desktop shell. + +Official Phoenix references: + +- Phoenix Asset Management: https://hexdocs.pm/phoenix/asset_management.html +- Phoenix Components and HEEx: https://hexdocs.pm/phoenix/components.html +- Phoenix.Component reference: https://hexdocs.pm/phoenix_live_view/Phoenix.Component.html + +Facts from Phoenix docs and generator templates: + +- Phoenix v1.7+ defaults to Tailwind for CSS and esbuild for JS. +- The default CSS source entrypoint is `assets/css/app.css`. +- The default generated CSS output is `priv/static/assets/css/app.css`. +- The default generated JS output is `priv/static/assets/js/app.js`. +- Phoenix promotes function components and HEEx as the main rendering model. +- Phoenix does not prescribe per-component CSS modules. Tailwind-first HEEx plus shared source CSS is a valid Phoenix-default shape. + +## Target Outcome + +The target outcome is a solid Phoenix-default asset setup with Tailwind as the main styling system and a generated production stylesheet. + +The target should look like this: + +- Tailwind source lives in `assets/css/app.css` and imported CSS modules. +- The final stylesheet is generated into `priv/static/assets/css/app.css`. +- LiveView JS entrypoint lives in `assets/js/app.js` and builds to `priv/static/assets/js/app.js`. +- The desktop endpoint serves static assets from `priv/static`. +- Layouts reference the generated CSS and JS outputs. +- HEEx markup carries most layout, spacing, typography, responsive, and state classes. +- Authored CSS remains for global tokens, app-region behavior, pseudo-elements, scrollbars, Monaco integration, hard selectors, and overlay mechanics. + +## Architecture Rules + +### 1. Tailwind Owns The Common Case + +Use Tailwind utility classes directly in HEEx for: + +- flex and grid layout +- spacing +- typography +- borders and radii +- colors and opacity +- active, selected, disabled, and hover states +- responsive breakpoints +- overflow and truncation + +Do not preserve large semantic wrapper classes when they only encode simple layout decisions. + +Good examples to move into HEEx classes: + +- tab rows +- button rows +- editor header layout +- metadata field layout +- sidebar list row spacing +- status bar item alignment + +### 2. Authored CSS Owns The Desktop-Specific Case + +Keep authored CSS source files for: + +- `app-region` and `-webkit-app-region` +- pseudo-elements used for icons, handles, and active markers +- custom scrollbars +- Monaco/editor iframe or host integration +- absolute overlay stacks and backdrops +- drag and drop affordances +- complex attribute selectors +- hard-to-read repeated combinations that should become shared component classes + +Do not force these into giant utility strings if readability drops. + +### 3. Keep A Thin Semantic CSS Layer + +It is acceptable to keep a small number of semantic component classes when they encode a repeated desktop UI primitive. + +Examples of valid semantic classes in the target state: + +- `.window-titlebar` +- `.resizable-panel-divider` +- `.overlay-root` +- `.monaco-host` +- `.panel-entry` +- `.btn-base`, `.btn-theme-primary`, `.btn-theme-danger` + +These classes should be implemented in Tailwind source CSS using `@layer components` and should remain small, stable, and reusable. + +### 4. Tokens Must Be Centralized + +The current stylesheet relies heavily on VS Code-like CSS variables. Preserve that idea. + +The new `assets/css/app.css` must define the design tokens once, using Tailwind v4 `@theme` plus any required raw CSS custom properties for runtime-driven values. + +Examples from the current app that must survive: + +- shell/background colors +- tab active/inactive colors +- status bar colors +- focus border color +- input background and border colors +- sidebar width +- assistant width +- font family and font size + +### 5. Desktop Layout Constraints Must Stay Intact + +The styling rewrite must preserve these runtime constraints: + +- the app occupies full window width and height +- the shell uses `overflow: hidden` at the top level +- the main workbench uses `min-height: 0` and `min-width: 0` correctly +- resizable sidebars remain width-variable +- titlebar remains draggable except for interactive controls +- overlays render above the shell without breaking keyboard focus or pointer behavior + +## Proposed Asset Layout + +Use the standard Phoenix asset layout. + +```text +assets/ + css/ + app.css + shell.css + sidebar.css + tabs.css + editor.css + forms.css + overlays.css + panel.css + assistant.css + menu_editor.css + media_editor.css + utilities.css + js/ + app.js + ... +priv/ + static/ + assets/ + css/ + js/ +``` + +Recommended responsibilities: + +- `assets/css/app.css`: Tailwind import, `@source`, tokens, base layer, imports +- `assets/css/shell.css`: app shell, titlebar, activity bar, pane shells, status bar +- `assets/css/sidebar.css`: sidebar filters, search, chips, calendar tree, load more +- `assets/css/tabs.css`: workbench tabs and editor tabs +- `assets/css/editor.css`: common editor frame, toolbar, meta column, shared form shell +- `assets/css/forms.css`: shared input, textarea, tag chip, picker, inline action primitives +- `assets/css/overlays.css`: overlay root, modal backdrop, dialog shells, gallery/lightbox +- `assets/css/panel.css`: panel tabs, panel entry cards, tasks, output, git log +- `assets/css/assistant.css`: assistant sidebar and chat-specific shared surfaces +- `assets/css/menu_editor.css`: menu tree, drag/drop indicators, picker lists +- `assets/css/media_editor.css`: media preview, linked post picker, detail forms +- `assets/css/utilities.css`: a very small set of custom utilities that are truly reused + +## Proposed Phoenix Asset Tooling + +The implementation should introduce the standard Phoenix aliases and configs. + +### mix.exs + +Add: + +- `{:tailwind, "~> 0.3", runtime: Mix.env() == :dev}` +- `{:esbuild, "~> 0.10", runtime: Mix.env() == :dev}` + +Add aliases similar to: + +- `assets.setup` +- `assets.build` +- `assets.deploy` + +### Versioning (mandatory) + +The Elixir `:tailwind` wrapper still defaults to Tailwind v3. The plan in this document assumes **Tailwind v4** syntax (`@import "tailwindcss"`, `@theme`, `@source`, `@layer components`). Pin both tools explicitly in `config/config.exs`: + +- `config :tailwind, version: "4.1.14"` (or current 4.1.x) +- `config :esbuild, version: "0.25.4"` (or current 0.25.x) + +Without an explicit v4 pin the build will silently install Tailwind v3 and v4 directives will not resolve. + +### No Node.js policy + +The Elixir `:tailwind` and `:esbuild` wrappers download self-contained binaries and do **not** require Node.js. The implementation MUST stay Node-free unless a third-party Tailwind plugin is later required (in which case the custom `assets/build.js` route from the Phoenix asset_management guide is used). No `package.json` is added under `assets/`. + +### config/config.exs + +Configure Tailwind input and output paths. + +Target output: + +- `assets/css/app.css` -> `priv/static/assets/css/app.css` + +Configure esbuild for: + +- `assets/js/app.js` -> `priv/static/assets/js/app.js` + +esbuild profile must include `--bundle --target=es2022 --outdir=../priv/static/assets/js --external:/fonts/* --external:/images/*` and `nodePaths: [Mix.Project.build_path() <> "/../../deps"]` so `phoenix`, `phoenix_html`, and `phoenix_live_view` resolve from `deps/` without an `npm install`. + +### config/dev.exs + +Add Phoenix watchers for: + +- Tailwind `--watch` +- esbuild `--watch` + +### No phx.digest in desktop builds + +This is a desktop app served through an embedded WebView, not a public web app behind a CDN. + +- Do NOT run `mix phx.digest` as part of `assets.deploy`. +- Output filenames stay stable (`app.css`, `app.js`) so the layout can link them by fixed path. +- `assets.deploy` for this repo is: `tailwind default --minify`, `esbuild default --minify`. Nothing else. + +### endpoint/layout changes + +Update the desktop endpoint and root layout to serve and link generated assets from `priv/static/assets` instead of `priv/ui`. + +Specifically: + +- Replace the existing `Plug.Static` for `/assets` with `from: {:bds, "priv/static/assets"}` and `only` listing the generated `css` and `js` directories. +- Drop the `/vendor/phoenix` and `/vendor/live_view` `Plug.Static` blocks; those scripts are now bundled by esbuild from `deps/`. +- Add a dedicated `Plug.Static` for `/monaco` pointing at `priv/ui/monaco` (or move it to `priv/static/monaco`). Monaco is a prebuilt vendor drop and MUST NOT be passed through esbuild. +- Remove the ` - - + """ diff --git a/lib/bds/scripting/api_docs.ex b/lib/bds/scripting/api_docs.ex index bafb4fd..c7f8d43 100644 --- a/lib/bds/scripting/api_docs.ex +++ b/lib/bds/scripting/api_docs.ex @@ -1251,7 +1251,9 @@ defmodule BDS.Scripting.ApiDocs do "", "**Module APIs**", "", - Enum.map(methods, fn method -> "- [#{method.module}.#{method.name}](##{method.module}#{method.name})" end), + Enum.map(methods, fn method -> + "- [#{method.module}.#{method.name}](##{method.module}#{method.name})" + end), "", Enum.map(methods, &render_method/1), "[↑ Back to Table of contents](#table-of-contents)", @@ -1342,23 +1344,56 @@ defmodule BDS.Scripting.ApiDocs do defp example_argument_value(name, "string") do case name do - "id" -> "\"id-1\"" - suffix when suffix in ["post_id", "media_id", "project_id", "tag_id", "target_tag_id"] -> "\"id-1\"" - "source_tag_ids" -> "{\"id-1\", \"id-2\"}" - "language" -> "\"en\"" - "status" -> "\"draft\"" - "kind" -> "\"post\"" - "slug" -> "\"example-slug\"" - "title" -> "\"Example Title\"" - "name" -> "\"Example Name\"" - "query" -> "\"example query\"" - "content" -> "\"Example content\"" - "message" -> "\"Update content\"" - "folder_path" -> "\"/Users/me/Sites/example\"" - "source_path" -> "\"/Users/me/Pictures/example.jpg\"" - "item_path" -> "\"/Users/me/Sites/example/output/index.html\"" - "action" -> "\"save\"" - _ -> "\"value\"" + "id" -> + "\"id-1\"" + + suffix when suffix in ["post_id", "media_id", "project_id", "tag_id", "target_tag_id"] -> + "\"id-1\"" + + "source_tag_ids" -> + "{\"id-1\", \"id-2\"}" + + "language" -> + "\"en\"" + + "status" -> + "\"draft\"" + + "kind" -> + "\"post\"" + + "slug" -> + "\"example-slug\"" + + "title" -> + "\"Example Title\"" + + "name" -> + "\"Example Name\"" + + "query" -> + "\"example query\"" + + "content" -> + "\"Example content\"" + + "message" -> + "\"Update content\"" + + "folder_path" -> + "\"/Users/me/Sites/example\"" + + "source_path" -> + "\"/Users/me/Pictures/example.jpg\"" + + "item_path" -> + "\"/Users/me/Sites/example/output/index.html\"" + + "action" -> + "\"save\"" + + _ -> + "\"value\"" end end @@ -1397,10 +1432,17 @@ defmodule BDS.Scripting.ApiDocs do defp example_response_value(returns) do cond do - returns == "nil" -> nil - nullable_return?(returns) -> {:nullable, example_response_value(non_nil_return(returns))} - String.ends_with?(returns, "[]") -> [example_value_for_type(String.trim_trailing(returns, "[]"))] - true -> example_value_for_type(returns) + returns == "nil" -> + nil + + nullable_return?(returns) -> + {:nullable, example_response_value(non_nil_return(returns))} + + String.ends_with?(returns, "[]") -> + [example_value_for_type(String.trim_trailing(returns, "[]"))] + + true -> + example_value_for_type(returns) end end @@ -1420,8 +1462,11 @@ defmodule BDS.Scripting.ApiDocs do defp example_value_for_type(type) do case Enum.find(@data_structures, &(&1.name == type)) do - nil -> [{"key", "value"}] - structure -> Enum.map(structure.fields, fn field -> {field.name, example_field_value(field.type)} end) + nil -> + [{"key", "value"}] + + structure -> + Enum.map(structure.fields, fn field -> {field.name, example_field_value(field.type)} end) end end @@ -1442,7 +1487,10 @@ defmodule BDS.Scripting.ApiDocs do defp render_lua_value(false, _indent), do: "false" defp render_lua_value(nil, _indent), do: "nil" defp render_lua_value(value, _indent) when is_integer(value), do: Integer.to_string(value) - defp render_lua_value(value, _indent) when is_float(value), do: :erlang.float_to_binary(value, [:compact]) + + defp render_lua_value(value, _indent) when is_float(value), + do: :erlang.float_to_binary(value, [:compact]) + defp render_lua_value(value, _indent) when is_binary(value), do: inspect(value) defp render_lua_value([], _indent), do: "{}" diff --git a/mix.exs b/mix.exs index 91b4709..c8fd342 100644 --- a/mix.exs +++ b/mix.exs @@ -36,6 +36,8 @@ defmodule BDS.MixProject do {:image, "~> 0.65"}, {:stemex, "~> 0.2.1"}, {:gettext, "~> 0.24"}, + {:tailwind, "~> 0.3", runtime: Mix.env() == :dev}, + {:esbuild, "~> 0.10", runtime: Mix.env() == :dev}, {:lazy_html, ">= 0.1.0", only: :test}, {:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false} ] @@ -46,6 +48,9 @@ defmodule BDS.MixProject do setup: ["deps.get", "ecto.setup"], "ecto.setup": ["ecto.create", "ecto.migrate"], "ecto.reset": ["ecto.drop", "ecto.setup"], + "assets.setup": ["tailwind.install --if-missing", "esbuild.install --if-missing"], + "assets.build": ["tailwind default", "esbuild default"], + "assets.deploy": ["tailwind default --minify", "esbuild default --minify"], test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"], validate: ["test", "dialyzer"] ] diff --git a/mix.lock b/mix.lock index 5bc78d9..5ea2aa7 100644 --- a/mix.lock +++ b/mix.lock @@ -15,6 +15,7 @@ "ecto_sqlite3": {:hex, :ecto_sqlite3, "0.22.0", "edab2d0f701b7dd05dcf7e2d97769c106aff62b5cfddc000d1dd6f46b9cbd8c3", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:ecto, "~> 3.13.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:ecto_sql, "~> 3.13.0", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:exqlite, "~> 0.22", [hex: :exqlite, repo: "hexpm", optional: false]}], "hexpm", "5af9e031bffcc5da0b7bca90c271a7b1e7c04a93fecf7f6cd35bc1b1921a64bd"}, "elixir_make": {:hex, :elixir_make, "0.9.0", "6484b3cd8c0cee58f09f05ecaf1a140a8c97670671a6a0e7ab4dc326c3109726", [:mix], [], "hexpm", "db23d4fd8b757462ad02f8aa73431a426fe6671c80b200d9710caf3d1dd0ffdb"}, "erlex": {:hex, :erlex, "0.2.8", "cd8116f20f3c0afe376d1e8d1f0ae2452337729f68be016ea544a72f767d9c12", [:mix], [], "hexpm", "9d66ff9fedf69e49dc3fd12831e12a8a37b76f8651dd21cd45fcf5561a8a7590"}, + "esbuild": {:hex, :esbuild, "0.10.0", "b0aa3388a1c23e727c5a3e7427c932d89ee791746b0081bbe56103e9ef3d291f", [:mix], [{:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "468489cda427b974a7cc9f03ace55368a83e1a7be12fba7e30969af78e5f8c70"}, "ex_dbus": {:hex, :ex_dbus, "0.1.4", "053df83d45b27ba0b9b6ef55a47253922069a3ace12a2a7dd30d3aff58301e17", [:mix], [{:dbus, "~> 0.8.0", [hex: :dbus, repo: "hexpm", optional: false]}, {:saxy, "~> 1.4.0", [hex: :saxy, repo: "hexpm", optional: false]}], "hexpm", "d8baeaf465eab57b70a47b70e29fdfef6eb09ba110fc37176eebe6ac7874d6d5"}, "ex_sni": {:hex, :ex_sni, "0.2.9", "81f9421035dd3edb6d69f1a4dd5f53c7071b41628130d32ba5ab7bb4bfdc2da0", [:mix], [{:debouncer, "~> 0.1", [hex: :debouncer, repo: "hexpm", optional: false]}, {:ex_dbus, "~> 0.1", [hex: :ex_dbus, repo: "hexpm", optional: false]}, {:saxy, "~> 1.4.0", [hex: :saxy, repo: "hexpm", optional: false]}], "hexpm", "921d67d913765ed20ea8354fd1798dabc957bf66990a6842d6aaa7cd5ee5bc06"}, "ex_stemmers": {:hex, :ex_stemmers, "0.1.0", "63a84ae3a6f0c28a1d75768411f0ae15cfe8462fb70589b60977aa1b04c9372d", [:mix], [{:rustler, "~> 0.32.1", [hex: :rustler, repo: "hexpm", optional: false]}], "hexpm", "498826e2188e502f41d1a15f3d90e7738f0d94747e197367f03a2a44c09167c0"}, @@ -46,6 +47,7 @@ "saxy": {:hex, :saxy, "1.4.0", "c7203ad20001f72eaaad07d08f82be063fa94a40924e6bb39d93d55f979abcba", [:mix], [], "hexpm", "3fe790354d3f2234ad0b5be2d99822a23fa2d4e8ccd6657c672901dac172e9a9"}, "stemex": {:hex, :stemex, "0.2.1", "47017c6b10cdd6926a0d523ccf1f801c5f3faf5a0a9c862f49304e07f9b5584f", [:mix], [], "hexpm", "dbfc76d27adfa31d831d183979c595942884e6530a4496714aa5b70d0964c2e4"}, "sweet_xml": {:hex, :sweet_xml, "0.7.5", "803a563113981aaac202a1dbd39771562d0ad31004ddbfc9b5090bdcd5605277", [:mix], [], "hexpm", "193b28a9b12891cae351d81a0cead165ffe67df1b73fe5866d10629f4faefb12"}, + "tailwind": {:hex, :tailwind, "0.4.1", "e7bcc222fe96a1e55f948e76d13dd84a1a7653fb051d2a167135db3b4b08d3e9", [:mix], [], "hexpm", "6249d4f9819052911120dbdbe9e532e6bd64ea23476056adb7f730aa25c220d1"}, "telemetry": {:hex, :telemetry, "1.4.1", "ab6de178e2b29b58e8256b92b382ea3f590a47152ca3651ea857a6cae05ac423", [:rebar3], [], "hexpm", "2172e05a27531d3d31dd9782841065c50dd5c3c7699d95266b2edd54c2dafa1c"}, "thousand_island": {:hex, :thousand_island, "1.4.3", "2158209580f633be38d43ec4e3ce0a01079592b9657afff9080d5d8ca149a3af", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "6e4ce09b0fd761a58594d02814d40f77daff460c48a7354a15ab353bb998ea0b"}, "toml": {:hex, :toml, "0.7.0", "fbcd773caa937d0c7a02c301a1feea25612720ac3fa1ccb8bfd9d30d822911de", [:mix], [], "hexpm", "0690246a2478c1defd100b0c9b89b4ea280a22be9a7b313a8a058a2408a2fa70"}, diff --git a/priv/static/assets/app.css b/priv/static/assets/app.css new file mode 100644 index 0000000..636c191 --- /dev/null +++ b/priv/static/assets/app.css @@ -0,0 +1,2 @@ +/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */ +@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.block{display:block}.hidden{display:none}.inline{display:inline}.table{display:table}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.resize{resize:both}.rounded{border-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}}:root{--accent-color:#007acc;--accent-color-transparent:#007acc40;--vscode-editor-background:#1e1e1e;--vscode-editor-foreground:#ccc;--vscode-sideBar-background:#252526;--vscode-activityBar-background:#333;--vscode-activityBar-foreground:#fff;--vscode-panel-background:#1e1e1e;--vscode-titleBar-activeBackground:#252526;--vscode-titleBar-activeForeground:#ccc;--vscode-statusBar-background:#007acc;--vscode-statusBar-foreground:#fff;--vscode-tab-activeBackground:#1e1e1e;--vscode-tab-inactiveBackground:#2d2d2d;--vscode-tab-activeForeground:#fff;--vscode-tab-inactiveForeground:#969696;--vscode-editorGroupHeader-tabsBackground:#252526;--vscode-editorGroupHeader-tabsBorder:#1e1e1e;--vscode-toolbar-hoverBackground:#5a5d5e4f;--vscode-toolbar-activeBackground:#6366674f;--vscode-foreground:#ccc;--vscode-descriptionForeground:#858585;--vscode-panel-border:#80808059;--vscode-sideBar-border:#80808059;--vscode-tab-border:#252526;--vscode-focusBorder:#007fd4;--vscode-input-background:#ffffff0f;--vscode-input-border:#ffffff1f;--vscode-list-hoverBackground:#2a2d2e;--vscode-list-activeSelectionBackground:#094771;--vscode-list-activeSelectionForeground:#fff;--vscode-activityBarBadge-background:#007acc;--vscode-activityBarBadge-foreground:#fff;--vscode-testing-iconPassed:#73c991;--vscode-editorWarning-foreground:#cca700;--vscode-input-foreground:#ccc;--vscode-input-placeholderForeground:#a6a6a6;--vscode-font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;--vscode-font-size:13px;--panel-1:var(--vscode-editor-background);--panel-2:var(--vscode-sideBar-background);--panel-3:var(--vscode-input-background);--ink:var(--vscode-foreground);--line:var(--vscode-panel-border);--accent:var(--vscode-focusBorder);--accent-soft:var(--vscode-list-hoverBackground);--success:var(--vscode-testing-iconPassed);--sidebar-width:280px;--assistant-width:360px;color-scheme:dark}*{box-sizing:border-box}html,body{background:var(--vscode-editor-background);width:100%;height:100%;color:var(--vscode-foreground);margin:0}body{-webkit-user-select:none;user-select:none;font-family:var(--vscode-font-family);font-size:var(--vscode-font-size);overflow:hidden}body>[data-phx-session],body>[data-phx-main]{width:100%;height:100%;min-height:0}button{font-family:var(--vscode-font-family);font-size:var(--vscode-font-size);color:var(--vscode-button-foreground);background-color:var(--vscode-button-background);cursor:pointer;border:none;border-radius:2px;padding:6px 14px}button:hover{background-color:var(--vscode-button-hoverBackground)}button:focus{outline:1px solid var(--vscode-focusBorder);outline-offset:2px}button.secondary{background-color:var(--vscode-button-secondaryBackground)}button.secondary:hover{background-color:#4a4d51}button.compact{padding:4px 8px;font-size:12px}button.primary{background-color:var(--vscode-button-background);font-weight:500}button.primary:hover{background-color:var(--vscode-button-hoverBackground)}button.success{background-color:#28a745}button.success:hover{background-color:#218838}button.danger{background-color:#dc3545}button.danger:hover{background-color:#c82333}button:disabled{opacity:.5;cursor:not-allowed}button svg,button svg *{pointer-events:none}.app{background-color:var(--vscode-editor-background);flex-direction:column;width:100%;height:100%;display:flex}.app-main{flex:1;min-height:0;display:flex;overflow:hidden}.app-content{flex-direction:column;flex:1;min-width:0;display:flex;overflow:hidden}.window-titlebar{background-color:var(--vscode-editorGroupHeader-tabsBackground);border-bottom:1px solid var(--vscode-editorGroupHeader-tabsBorder);app-region:drag;-webkit-app-region:drag;height:34px;padding-right:calc(10px + var(--bds-titlebar-overlay-right,0px));flex-shrink:0;justify-content:space-between;align-items:center;display:flex;position:relative}.window-titlebar-menu-bar{app-region:no-drag;-webkit-app-region:no-drag;z-index:2;align-items:center;gap:2px;height:100%;margin-left:6px;display:flex}.window-titlebar-menu-group{align-items:center;height:100%;display:flex;position:relative}.window-titlebar-menu-bar.is-hidden{display:none}.window-titlebar.is-mac .window-titlebar-menu-bar{margin-left:max(var(--bds-titlebar-macos-left-inset,78px),calc(6px + var(--bds-titlebar-overlay-left,0px)))}.window-titlebar-menu-button{height:24px;color:var(--vscode-titleBar-activeForeground);cursor:pointer;background:0 0;border:none;border-radius:4px;padding:0 8px;font-size:12px;line-height:1}.window-titlebar-menu-button:hover,.window-titlebar-action-button:hover,.window-titlebar-menu-button.is-active{background-color:var(--vscode-toolbar-hoverBackground)}.window-titlebar-menu-button:focus,.window-titlebar-menu-button:focus-visible,.window-titlebar-action-button:focus,.window-titlebar-action-button:focus-visible{box-shadow:none;outline:none}.window-titlebar-menu-dropdown{background-color:var(--vscode-menu-background,var(--vscode-editorWidget-background));border:1px solid var(--vscode-menu-border,var(--vscode-panel-border));min-width:210px;box-shadow:var(--vscode-widget-shadow,0 8px 24px #0006);app-region:no-drag;-webkit-app-region:no-drag;z-index:10;border-radius:6px;flex-direction:column;gap:2px;padding:6px;display:flex;position:absolute;top:30px;left:0}.window-titlebar-menu-item{color:var(--vscode-menu-foreground,var(--vscode-foreground));text-align:left;cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:space-between;align-items:center;gap:16px;padding:6px 8px;font-size:12px;display:flex}.window-titlebar-menu-item:focus,.window-titlebar-menu-item:focus-visible{box-shadow:none;background-color:var(--vscode-toolbar-hoverBackground);outline:none}.window-titlebar-menu-item:hover,.window-titlebar-menu-item.is-keyboard-active{background-color:var(--vscode-menu-selectionBackground,var(--vscode-toolbar-hoverBackground))}.window-titlebar-menu-item-accelerator{opacity:.8}.window-titlebar-menu-separator{background-color:var(--vscode-menu-separatorBackground,#ffffff14);height:1px;margin:4px 2px}.window-titlebar-drag-region{flex:1;height:100%}.window-titlebar-title{max-width:45%;height:100%;color:var(--vscode-titleBar-activeForeground);white-space:nowrap;text-overflow:ellipsis;-webkit-user-select:none;user-select:none;pointer-events:none;justify-content:center;align-items:center;font-size:12px;font-weight:500;display:flex;position:absolute;left:50%;overflow:hidden;transform:translate(-50%)}.window-titlebar-actions{app-region:no-drag;-webkit-app-region:no-drag;align-items:center;height:100%;margin-right:6px;display:flex}.window-titlebar-action-button{width:30px;height:30px;color:var(--vscode-foreground);cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;padding:0;line-height:0;display:flex}.window-titlebar-sidebar-icon,.window-titlebar-panel-icon,.window-titlebar-assistant-icon{border:1.5px solid;border-radius:2px;width:14px;height:14px;display:block;position:relative;overflow:hidden}.window-titlebar-sidebar-icon:before{content:"";background-color:currentColor;width:1.5px;position:absolute;top:0;bottom:0;left:33.3333%;transform:translate(-50%)}.window-titlebar-panel-icon:before{content:"";background-color:currentColor;height:1.5px;position:absolute;top:66.6667%;left:0;right:0;transform:translateY(-50%)}.window-titlebar-assistant-icon:before{content:"";background-color:currentColor;width:1.5px;position:absolute;top:0;bottom:0;left:66.6667%;transform:translate(-50%)}.window-titlebar-sidebar-pane,.window-titlebar-panel-pane,.window-titlebar-assistant-pane{background-color:currentColor;transition:opacity .12s;position:absolute}.window-titlebar-sidebar-pane{width:33.3333%;height:100%;top:0;left:0}.window-titlebar-panel-pane{width:100%;height:33.3333%;bottom:0;left:0}.window-titlebar-assistant-pane{width:33.3333%;height:100%;top:0;right:0}.window-titlebar-sidebar-icon.is-inactive .window-titlebar-sidebar-pane,.window-titlebar-panel-icon.is-inactive .window-titlebar-panel-pane,.window-titlebar-assistant-icon.is-inactive .window-titlebar-assistant-pane{opacity:0}.panel-shell{border-top:1px solid var(--vscode-panel-border);background:var(--vscode-panel-background);flex-direction:column;height:200px;display:flex}.editor-toolbar-button.is-destructive{color:#f48771}.shell-overlay-backdrop,.gallery-overlay-backdrop{pointer-events:auto;z-index:10000;background:#000000ad;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.shell-overlay-dismiss{background:0 0;border:none;padding:0;position:absolute;inset:0}.gallery-overlay{z-index:1;background:#1e1e1e;border:1px solid #3c3c3c;border-radius:8px;flex-direction:column;width:min(980px,100vw - 48px);max-height:calc(100vh - 48px);display:flex;position:relative;overflow:hidden;box-shadow:0 8px 32px #0006}.insert-modal-media-grid{grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;padding:16px;display:grid}.insert-modal-media-item{color:inherit;text-align:left;background:#252526;border:1px solid #3c3c3c;border-radius:8px;flex-direction:column;gap:8px;padding:10px;display:flex}.insert-modal-media-thumb{object-fit:cover;background:#ffffff0a;border-radius:6px;width:100%;min-height:112px}.insert-modal-media-title{color:#fff;font-weight:600}.language-picker-options{flex-direction:column;gap:8px;display:flex}.language-picker-option{width:100%;color:inherit;text-align:left;background:0 0;border:none;border-radius:4px;grid-template-columns:28px 1fr auto;align-items:center;gap:12px;padding:12px 16px;display:grid}.language-picker-label,.language-picker-status,.lightbox-counter{color:#9d9d9d;font-size:12px}.lightbox-counter{margin-top:4px}@media (max-width:720px){.insert-modal-media-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}.panel-header{background-color:var(--vscode-sideBar-background);border-bottom:1px solid var(--vscode-panel-border);justify-content:space-between;align-items:center;height:35px;padding:0 8px;display:flex}.panel-tabs{align-items:stretch;height:100%;display:flex}.panel-tab{color:var(--vscode-descriptionForeground);cursor:pointer;background:0 0;border:none;padding:0 12px}.panel-tab.active{color:var(--vscode-tab-activeForeground)}.panel-close{color:var(--vscode-descriptionForeground);cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;width:24px;height:24px;padding:0;font-size:18px;display:flex}.panel-close:hover{background-color:var(--vscode-list-hoverBackground);color:var(--vscode-editor-foreground)}.panel-content{flex:1;padding:12px 14px;overflow:auto}.panel-entry,.assistant-card{border-bottom:1px solid var(--vscode-panel-border);flex-direction:column;gap:4px;padding:10px 12px;display:flex}.output-list,.git-log-list,.task-list{flex-direction:column;display:flex}.task-entry-header{justify-content:space-between;align-items:center;gap:12px;display:flex}.task-status{text-transform:uppercase;letter-spacing:.04em;color:var(--vscode-descriptionForeground);font-size:11px}.task-status-running{color:var(--vscode-terminal-ansiGreen,var(--vscode-statusBar-foreground))}.task-status-pending{color:var(--vscode-terminal-ansiYellow,var(--vscode-statusBar-foreground))}.panel-empty-state{justify-content:center;min-height:100%}.status-bar{background:var(--vscode-statusBar-background);height:22px;color:var(--vscode-statusBar-foreground);flex-shrink:0;justify-content:space-between;align-items:center;padding:0 8px;font-size:12px;display:flex}.status-bar-left,.status-bar-right{flex-shrink:0;align-items:center;gap:4px;display:flex}.status-bar-left{flex-shrink:1;min-width:0}.status-shell-controls{flex-shrink:0;align-items:stretch;gap:2px;display:flex}.status-shell-toggle-button{width:22px;height:100%;color:inherit;cursor:pointer;background:0 0;border:none;border-radius:3px;justify-content:center;align-items:center;padding:0;line-height:0;display:flex}.status-shell-toggle-button:hover{background-color:#ffffff1a}.status-shell-toggle-button:focus,.status-shell-toggle-button:focus-visible{outline:none;box-shadow:inset 0 0 0 1px #ffffff73}.status-shell-toggle-button .window-titlebar-sidebar-icon,.status-shell-toggle-button .window-titlebar-panel-icon,.status-shell-toggle-button .window-titlebar-assistant-icon{width:12px;height:12px}.status-bar-item{white-space:nowrap;text-overflow:ellipsis;align-items:center;gap:6px;height:100%;padding:0 8px;display:flex;overflow:hidden}.status-bar-item:hover{background-color:#ffffff1a}.status-bar-task-button{color:inherit;cursor:pointer;background:0 0;border:none}.status-bar-item.theme-badge{border:1px solid #ffffff2e;border-radius:3px}.status-bar-item.language-badge{border:1px solid #ffffff2e;border-radius:3px;gap:4px}.status-bar-item.offline-badge{color:inherit;cursor:pointer;opacity:.4;background:0 0;border:none;padding:0 4px;font-size:13px}.status-bar-item.offline-badge.active{opacity:1;background-color:#ffc40047}.project-selector{flex-shrink:0;position:relative}.project-selector-trigger{height:22px;color:var(--vscode-statusBar-foreground);cursor:pointer;text-align:left;background:0 0;border:none;align-items:center;gap:6px;padding:0 8px;font-size:12px;display:flex}.project-selector-trigger:hover{background-color:#ffffff1a}.project-selector-trigger:focus{outline:none}.project-icon,.dropdown-arrow,.project-check-icon{flex-shrink:0}.project-name,.project-item-name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.project-name{max-width:180px}.dropdown-arrow{opacity:.6}.project-dropdown{z-index:1000;background-color:#252526;border:1px solid #ffffff29;border-radius:4px;min-width:220px;margin-bottom:4px;position:absolute;bottom:100%;left:0;overflow:hidden;box-shadow:0 -4px 12px #0000004d}.project-dropdown-header{text-transform:uppercase;letter-spacing:.5px;color:var(--vscode-descriptionForeground);border-bottom:1px solid #ffffff1f;padding:8px 12px;font-size:11px;font-weight:600}.project-list{max-height:200px;overflow-y:auto}.project-item{width:100%;color:inherit;cursor:pointer;background:0 0;border:none;align-items:center;gap:8px;padding:8px 12px;display:flex}.project-item:hover,.project-item.active{background-color:var(--vscode-list-hoverBackground)}.project-item.active .project-check-icon{color:#89d185}.project-dropdown-footer{border-top:1px solid #ffffff1f;gap:6px;padding:8px;display:grid}.create-project-btn,.existing-project-btn{width:100%;color:inherit;cursor:pointer;background-color:#ffffff1f;border:none;border-radius:4px;justify-content:center;align-items:center;gap:6px;padding:6px 12px;font-size:12px;display:flex}.create-project-btn:hover,.existing-project-btn:hover{background-color:#ffffff2e}.status-bar-language-select{color:inherit;font:inherit;background:0 0;border:none;padding:0}.status-bar-language-select:focus{outline:none}.status-bar-count{opacity:.85;font-size:11px}.status-bar-item.brand{font-weight:600}@media (max-width:960px){.editor-frame{grid-template-columns:minmax(0,1fr)}.editor-meta{border-left:none;border-top:1px solid var(--vscode-panel-border);padding-top:10px;padding-left:0}}.editor-section ul{margin:12px 0 0;padding-left:18px}.editor-toolbar{gap:10px;display:flex}.editor-toolbar button{border:1px solid var(--line);background:var(--panel-3);color:var(--ink);border-radius:999px;padding:9px 14px}.editor-meta{flex-direction:column;gap:12px;display:flex}.editor-meta-card,.assistant-card,.panel-entry{padding:16px}.sidebar-header,.assistant-header,.panel-header{border-bottom:1px solid var(--line);justify-content:space-between;gap:12px;padding:16px 18px;display:flex}.activity-bar{background-color:var(--vscode-activityBar-background);border-right:1px solid var(--vscode-panel-border);flex-direction:column;justify-content:space-between;width:48px;height:100%;display:flex}.activity-bar-top,.activity-bar-bottom{flex-direction:column;align-items:center;padding:4px 0;display:flex}.activity-bar-item{width:48px;height:48px;color:var(--vscode-activityBar-foreground);opacity:.6;cursor:pointer;background:0 0;border:none;border-radius:0;justify-content:center;align-items:center;padding:0;display:flex;position:relative}.activity-bar-item:hover{opacity:1;background:0 0}.activity-bar-item.active{opacity:1}.activity-bar-item.active:before{content:"";background-color:var(--vscode-activityBar-foreground);width:2px;position:absolute;top:0;bottom:0;left:0}.activity-bar-badge{background-color:var(--vscode-activityBarBadge-background);min-width:16px;height:16px;color:var(--vscode-activityBarBadge-foreground);border-radius:8px;justify-content:center;align-items:center;padding:0 4px;font-size:10px;font-weight:600;display:flex;position:absolute;top:8px;right:8px}.activity-bar-item svg,.tab-icon svg{display:block}.sidebar-shell,.assistant-sidebar-shell{min-width:0;display:flex}.sidebar-shell{width:var(--sidebar-width)}.assistant-sidebar-shell{width:var(--assistant-width)}.sidebar,.assistant-sidebar{background:var(--vscode-sideBar-background);flex-direction:column;width:100%;min-width:0;height:100%;display:flex}.sidebar{border-right:1px solid var(--vscode-sideBar-border)}.assistant-sidebar{border-left:1px solid var(--vscode-sideBar-border)}.sidebar-shell.is-hidden,.assistant-sidebar-shell.is-hidden{width:0;overflow:hidden}.sidebar-shell.is-hidden .resizable-panel-divider,.assistant-sidebar-shell.is-hidden .resizable-panel-divider{display:none}.resizable-panel-divider{cursor:col-resize;background:0 0;width:4px;position:relative}.resizable-panel-divider:hover:after{background-color:var(--vscode-focusBorder)}.resizable-panel-divider:after{content:"";background-color:var(--vscode-panel-border);width:1px;position:absolute;top:0;bottom:0;left:1px}.assistant-header{border-bottom:1px solid var(--vscode-panel-border);flex-direction:column;gap:2px;padding:10px 12px;display:flex}.assistant-card span,.panel-entry span,.editor-meta-row span,.editor-subtitle,.sidebar-item span{color:var(--vscode-descriptionForeground)}.sidebar-content,.assistant-content{flex:1;padding:8px 0;overflow:auto}.sidebar-section{padding-bottom:10px}.sidebar-section-header{text-transform:uppercase;letter-spacing:.04em;color:var(--vscode-descriptionForeground);padding:0 12px 6px;font-size:11px}.sidebar-item{cursor:pointer;background:var(--vscode-sideBar-background);width:100%;color:var(--vscode-foreground);border:none;border-radius:4px;flex-direction:column;align-items:flex-start;gap:2px;padding:7px 12px;display:flex}.sidebar-item:hover{background:var(--vscode-list-hoverBackground)}.sidebar-item.selected{outline:1px solid var(--vscode-focusBorder);background:var(--vscode-list-activeSelectionBackground);color:var(--vscode-list-activeSelectionForeground)}.sidebar-badge{color:var(--vscode-testing-iconPassed);background:#6ecb8b29;border-radius:10px;margin-top:2px;padding:1px 6px}.sidebar-content{padding:0;overflow:hidden auto}.sidebar-section{margin-bottom:4px;padding-bottom:0}.sidebar-section-header{text-transform:uppercase;letter-spacing:.5px;color:var(--vscode-sideBar-foreground);justify-content:space-between;align-items:center;padding:8px 12px;font-size:11px;font-weight:600;display:flex}.sidebar-section-title{color:var(--vscode-descriptionForeground);align-items:center;gap:6px;padding:4px 12px;font-size:12px;display:flex}.section-icon{font-size:8px}.section-icon.status-draft{color:var(--vscode-editorWarning-foreground)}.section-icon.status-published{color:var(--vscode-testing-iconPassed)}.section-icon.status-archived{color:var(--vscode-descriptionForeground)}.sidebar-list{flex-direction:column;display:flex}.sidebar-item-row{align-items:stretch;display:flex}.sidebar-item{width:100%;color:inherit;cursor:pointer;text-align:left;background:0 0;border:none;border-left:2px solid #0000;border-radius:0;align-items:flex-start;gap:8px;padding:6px 12px;display:flex}.sidebar-item:hover{background-color:var(--vscode-list-hoverBackground)}.sidebar-item.selected{background-color:var(--vscode-list-activeSelectionBackground);border-left-color:var(--vscode-focusBorder);color:var(--vscode-list-activeSelectionForeground)}.sidebar-post-item{flex-direction:row}.sidebar-item.post-type-picture{background:linear-gradient(90deg,#8b5cf60d 0%,#0000 100%)}.sidebar-item.post-type-aside{background:linear-gradient(90deg,#f59e0b0d 0%,#0000 100%)}.sidebar-item.post-type-quote{background:linear-gradient(90deg,#22c55e0d 0%,#0000 100%)}.sidebar-item.post-type-link{background:linear-gradient(90deg,#3b82f60d 0%,#0000 100%)}.sidebar-item.post-type-video{background:linear-gradient(90deg,#ef44440d 0%,#0000 100%)}.post-type-icon{opacity:.85;flex-shrink:0;font-size:14px;line-height:1.4}.sidebar-item-content{flex-direction:column;flex:1;min-width:0;display:flex}.sidebar-item-title-row{align-items:center;gap:6px;display:flex}.sidebar-item-title{color:var(--vscode-sideBar-foreground);white-space:nowrap;text-overflow:ellipsis;font-size:13px;overflow:hidden}.sidebar-item-language-badge{background:var(--vscode-badge-background);border-radius:999px;flex-shrink:0;min-width:18px;padding:1px 5px}@supports (color:color-mix(in lab, red, red)){.sidebar-item-language-badge{background:color-mix(in srgb,var(--vscode-badge-background)82%,transparent)}}.sidebar-item-language-badge{color:var(--vscode-badge-foreground);text-align:center;font-size:10px;font-weight:700}.sidebar-item-meta{color:var(--vscode-descriptionForeground);margin-top:2px;font-size:11px}.media-grid{grid-template-columns:1fr;gap:2px;padding:4px;display:grid}.media-item-row{align-items:stretch;gap:4px;display:flex}.media-item{width:100%;color:inherit;text-align:left;background:0 0;border:none;border-radius:4px;align-items:center;gap:8px;padding:6px 8px;display:flex}.media-item:hover{background-color:var(--vscode-list-hoverBackground)}.media-item.selected{background-color:var(--vscode-list-activeSelectionBackground);color:var(--vscode-list-activeSelectionForeground)}.media-thumbnail{background-color:var(--vscode-input-background);border-radius:4px;flex-shrink:0;justify-content:center;align-items:center;width:40px;height:40px;font-size:20px;display:flex;overflow:hidden}.media-thumbnail.has-image{position:relative}.media-thumbnail-fallback{justify-content:center;align-items:center;width:100%;height:100%;display:flex}.media-thumbnail-image{object-fit:cover;opacity:0;width:100%;height:100%;transition:opacity .15s;position:absolute;inset:0}.media-thumbnail.is-loaded .media-thumbnail-image{opacity:1}.media-thumbnail.is-loaded .media-thumbnail-fallback{opacity:0}.media-item-info{flex:1;min-width:0}.media-item-name{color:var(--vscode-sideBar-foreground);white-space:nowrap;text-overflow:ellipsis;font-size:12px;overflow:hidden}.sidebar-item-row .sidebar-item,.media-item-row .media-item{flex:1;min-width:0}.sidebar-actions{gap:4px;display:flex}.sidebar-action{color:var(--vscode-sideBar-foreground);cursor:pointer;opacity:.7;background:0 0;border:none;border-radius:3px;justify-content:center;align-items:center;padding:2px;display:flex}.sidebar-action:hover{opacity:1;background-color:var(--vscode-list-hoverBackground)}.sidebar-action.active{background-color:var(--vscode-list-activeSelectionBackground);opacity:1}.search-box{align-items:center;gap:4px;padding:4px 12px 8px;display:flex;position:relative}.search-box input{background-color:var(--vscode-input-background);border:1px solid var(--vscode-input-border);min-width:0;color:var(--vscode-input-foreground);border-radius:3px;flex:1;padding:6px 28px 6px 8px;font-size:12px}.search-box input::placeholder{color:var(--vscode-input-placeholderForeground)}.search-box input:focus{border-color:var(--vscode-focusBorder);outline:none}.search-box button[type=submit]{color:var(--vscode-descriptionForeground);cursor:pointer;opacity:.7;background:0 0;border:none;padding:4px;position:absolute;right:40px}.search-box button[type=submit]:hover{opacity:1}.search-box .clear-search{color:var(--vscode-descriptionForeground);cursor:pointer;opacity:.7;background:0 0;border:none;padding:4px;font-size:10px;position:absolute;right:16px}.search-box .clear-search:hover{opacity:1}.calendar-view{border-bottom:1px solid var(--vscode-sideBar-border);padding:8px 12px}.calendar-header{text-transform:uppercase;letter-spacing:.5px;color:var(--vscode-descriptionForeground);justify-content:space-between;align-items:center;margin-bottom:8px;font-size:11px;font-weight:600;display:flex}.calendar-header.collapsible-header{cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:3px;margin:0 -6px 8px;padding:4px 6px}.calendar-header.collapsible-header:hover{background-color:var(--vscode-list-hoverBackground)}.calendar-header.collapsible-header.collapsed{margin-bottom:0}.calendar-header .collapse-icon{opacity:.7;margin-right:4px;font-size:9px}.calendar-header .clear-filter{color:var(--vscode-descriptionForeground);cursor:pointer;opacity:.7;background:0 0;border:none;padding:2px 4px;font-size:10px}.calendar-header .clear-filter:hover{opacity:1}.calendar-years{flex-direction:column;gap:2px;display:flex}.calendar-year-header{cursor:pointer;color:var(--vscode-sideBar-foreground);text-align:left;background:0 0;border-radius:3px;align-items:center;gap:6px;padding:4px 6px;font-size:12px;display:flex}.calendar-year-header:hover{background-color:var(--vscode-list-hoverBackground)}.calendar-year-header.selected{background-color:var(--vscode-list-activeSelectionBackground)}.calendar-year-header .expand-icon{color:var(--vscode-descriptionForeground);width:10px;font-size:8px}.calendar-year-header .year-label{flex:1}.calendar-year-header .year-count{color:var(--vscode-descriptionForeground);background-color:var(--vscode-badge-background);border-radius:8px;padding:1px 6px;font-size:10px}.calendar-months{flex-direction:column;gap:1px;margin-top:2px;padding-left:16px;display:flex}.calendar-month{cursor:pointer;color:var(--vscode-sideBar-foreground);text-align:left;background:0 0;border-radius:3px;justify-content:space-between;align-items:center;padding:3px 6px;font-size:12px;display:flex}.calendar-month:hover{background-color:var(--vscode-list-hoverBackground)}.calendar-month.selected{background-color:var(--vscode-list-activeSelectionBackground)}.calendar-month .month-count{color:var(--vscode-descriptionForeground);font-size:10px}.calendar-empty{color:var(--vscode-descriptionForeground);text-align:center;padding:8px;font-size:12px}.month-count,.sidebar-section-count{color:var(--vscode-descriptionForeground);font-size:10px}.filter-panel{border-bottom:1px solid var(--vscode-sideBar-border);padding:8px 12px}.filter-section{margin-bottom:12px}.filter-section:last-child{margin-bottom:0}.filter-header{text-transform:uppercase;letter-spacing:.5px;color:var(--vscode-descriptionForeground);align-items:center;margin-bottom:6px;font-size:11px;font-weight:600;display:flex}.filter-header.collapsible-header{cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:3px;margin:0 -6px 6px;padding:4px 6px}.filter-header.collapsible-header:hover{background-color:var(--vscode-list-hoverBackground)}.filter-header.collapsible-header.collapsed{margin-bottom:0}.filter-header .collapse-icon{opacity:.7;margin-right:4px;font-size:9px}.filter-header .clear-filter{color:var(--vscode-descriptionForeground);cursor:pointer;opacity:.7;background:0 0;border:none;margin-left:auto;padding:2px 4px;font-size:10px}.filter-header .clear-filter:hover{opacity:1}.filter-chips{flex-wrap:wrap;gap:4px;display:flex}.filter-chip{background-color:var(--vscode-button-secondaryBackground);color:var(--vscode-button-secondaryForeground);cursor:pointer;border:none;border-radius:12px;padding:2px 8px;font-size:11px;transition:background-color .15s,opacity .15s}.filter-chip:hover{background-color:var(--vscode-button-secondaryHoverBackground)}.filter-chip.active{background-color:var(--vscode-button-background);color:var(--vscode-button-foreground)}.filter-chip.has-color{border:1px solid #0000}.filter-chip.has-color:hover{opacity:.85}.filter-chip.has-color.active{box-shadow:0 0 0 2px var(--vscode-focusBorder,#007fd4)}.filter-status{color:var(--vscode-descriptionForeground);background-color:var(--vscode-list-hoverBackground);border-bottom:1px solid var(--vscode-sideBar-border);justify-content:space-between;align-items:center;padding:6px 12px;font-size:11px;display:flex}.filter-status button{color:var(--accent-color);cursor:pointer;background:0 0;border:none;padding:0;font-size:11px}.filter-status button:hover{background:0 0;text-decoration:underline}.sidebar-load-more{justify-content:center;padding:12px 16px;display:flex}.load-more-button{background-color:var(--vscode-button-secondaryBackground);width:100%;color:var(--vscode-button-secondaryForeground);cursor:pointer;border:none;border-radius:4px;padding:8px 16px;font-size:12px;transition:background-color .2s}.load-more-button:hover:not(:disabled){background-color:var(--vscode-button-secondaryHoverBackground)}.filter-section{padding-top:4px}.filter-header{width:100%;color:var(--vscode-foreground);text-align:left;background:0 0;padding:6px 0}.filter-chips{flex-flow:wrap}.filter-chip{background:var(--vscode-input-background);color:var(--vscode-foreground);border-radius:999px;padding:5px 10px}.filter-status{color:var(--vscode-descriptionForeground);justify-content:space-between;align-items:center;gap:12px;font-size:12px;display:flex}.filter-status button,.load-more-button{background:var(--vscode-input-background);color:var(--vscode-foreground);border-radius:6px;padding:6px 10px}.sidebar-load-more{padding-bottom:12px}.load-more-button{width:100%}.media-item-info{flex-direction:column;gap:2px;display:flex}.media-item-name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.media-item-size{color:var(--vscode-descriptionForeground);font-size:12px}.chat-list-item{border:none;border-bottom:1px solid var(--vscode-sideBar-border);width:100%;color:inherit;text-align:left;background:0 0;align-items:center;padding:8px 12px;display:flex}.chat-list-item:hover{background:var(--vscode-list-hoverBackground)}.chat-list-item.active{background:var(--vscode-list-activeSelectionBackground);color:var(--vscode-list-activeSelectionForeground)}.chat-item-content{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.chat-item-open{min-width:0;color:inherit;text-align:left;background:0 0;border:none;flex:1;padding:0;display:flex}.chat-item-open:hover{background:0 0}.chat-item-open:focus-visible{outline:1px solid var(--vscode-focusBorder);outline-offset:2px}.chat-item-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.chat-item-date{color:var(--vscode-descriptionForeground);font-size:12px}.sidebar-delete-button{color:var(--vscode-descriptionForeground);cursor:pointer;opacity:1;background:0 0;border:none;flex-shrink:0;padding:0 6px;font-size:16px;line-height:1;transition:opacity .15s,color .15s}.sidebar-item-row:hover .sidebar-delete-button,.sidebar-item-row .sidebar-item.selected~.sidebar-delete-button,.media-item-row:hover .sidebar-delete-button,.media-item-row .media-item.selected~.sidebar-delete-button,.chat-list-item:hover .sidebar-delete-button,.chat-list-item.active .sidebar-delete-button{opacity:1}.sidebar-delete-button:hover{color:var(--vscode-errorForeground)}.sidebar-item-row .sidebar-item.selected~.sidebar-delete-button,.media-item-row .media-item.selected~.sidebar-delete-button{background-color:var(--vscode-list-activeSelectionBackground);color:var(--vscode-list-activeSelectionForeground)}.settings-nav-list{flex-direction:column;gap:6px;padding:0 12px 12px;display:flex}.settings-nav-entry{width:100%;color:inherit;text-align:left;background:0 0;border:none;border-radius:10px;align-items:center;gap:10px;padding:10px 12px;display:flex}.settings-nav-entry:hover{background:var(--vscode-list-hoverBackground)}.settings-nav-entry-icon{text-align:center;flex:0 0 18px;width:18px}.sidebar-empty{color:var(--vscode-descriptionForeground);padding:16px 12px}@media (max-width:820px){.dashboard-stats{grid-template-columns:1fr}.recent-post-item{flex-wrap:wrap;align-items:flex-start}.media-grid{grid-template-columns:1fr}}.tab-bar{background-color:var(--vscode-editorGroupHeader-tabsBackground);border-bottom:1px solid var(--vscode-editorGroupHeader-tabsBorder);flex-shrink:0;align-items:center;height:35px;display:flex;position:relative;overflow:hidden}.tab-bar-tabs{flex:1;align-items:center;height:100%;display:flex;overflow:auto hidden}.tab-bar-tabs::-webkit-scrollbar{height:0;display:none}.tab-bar-empty{height:100%;color:var(--vscode-descriptionForeground);align-items:center;padding:0 12px;font-size:12px;display:flex}.tab{cursor:pointer;background-color:var(--vscode-tab-inactiveBackground);border:none;border-right:1px solid var(--vscode-tab-border);min-width:100px;max-width:180px;height:100%;color:var(--vscode-tab-inactiveForeground);-webkit-user-select:none;user-select:none;flex-shrink:0;align-items:center;gap:4px;padding:0 6px 0 10px;font-size:13px;display:flex;position:relative}.tab-select{min-width:0;height:100%;color:inherit;font:inherit;cursor:inherit;background:0 0;border:none;flex:1;align-items:center;gap:4px;padding:0;display:flex}.tab:hover{background-color:var(--vscode-list-hoverBackground)}.tab.active{background-color:var(--vscode-tab-activeBackground);color:var(--vscode-tab-activeForeground)}.tab.active:after{content:"";background-color:var(--vscode-focusBorder);height:1px;position:absolute;top:0;left:0;right:0}.tab.transient .tab-title{font-style:italic}.tab-actions{flex-shrink:0;align-items:center;gap:2px;margin-left:auto;display:flex}.tab-dirty-indicator{color:var(--vscode-editorWarning-foreground,#e2c08d);font-size:10px;line-height:1}.tab-icon{opacity:.85;flex-shrink:0;justify-content:center;align-items:center;display:flex}.tab-title,.status-bar-item{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.tab-close{width:20px;height:20px;color:var(--vscode-icon-foreground,#c5c5c5);cursor:pointer;opacity:0;background:0 0;border:none;border-radius:3px;flex-shrink:0;justify-content:center;align-items:center;padding:0;font-size:15px;line-height:1;display:flex}.tab:hover .tab-close,.tab.active .tab-close{opacity:.7}.tab-close:hover{background-color:var(--vscode-toolbar-hoverBackground);color:var(--vscode-tab-activeForeground);opacity:1!important}.tab-close:active{background-color:var(--vscode-toolbar-activeBackground,#6366674f)}.tab.dirty .tab-dirty-indicator{display:block}.tab.dirty .tab-close{display:none}.tab.dirty:hover .tab-close{opacity:.7;display:flex}.tab.dirty:hover .tab-dirty-indicator{display:none}.tab:focus-visible{outline:1px solid var(--vscode-focusBorder,#007fd4);outline-offset:-1px}.output-item-details{color:inherit;white-space:pre-wrap;-webkit-user-select:text;user-select:text;background:#ffffff08;border-radius:4px;margin:4px 0 0;padding:8px;font:11px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace}.editor-shell{background:var(--vscode-editor-background);flex:1;min-height:0;overflow:auto}.editor-frame{grid-template-columns:minmax(0,1fr) 240px;gap:16px;padding:14px 16px;display:grid}.editor-main,.editor-meta,.panel-shell,.assistant-card{min-width:0}.editor-kicker{text-transform:uppercase;letter-spacing:.04em;color:var(--vscode-descriptionForeground);font-size:11px}.editor-title{margin:10px 0 6px;font-size:24px;font-weight:600}.editor-subtitle{margin:0 0 14px}.editor-toolbar{gap:8px;margin-bottom:14px;display:flex}.editor-toolbar-button{border:1px solid var(--vscode-panel-border);color:var(--vscode-foreground);background:0 0;border-radius:3px;padding:4px 8px}.editor-toolbar-button:hover,.panel-tab:hover{background:var(--vscode-toolbar-hoverBackground)}.editor-section{padding-top:4px}.editor-section h2{margin:0 0 8px;font-size:16px}.editor-list{margin:0;padding-left:18px;line-height:1.5}.editor-list.compact li{margin-bottom:6px}.editor-meta{border-left:1px solid var(--vscode-panel-border);padding-left:16px}.editor-meta-row{border-bottom:1px solid var(--vscode-panel-border);flex-direction:column;gap:3px;padding:10px 0;display:flex}.post-editor .post-editor-markdown-surface,.scripts-monaco.monaco-editor-shell,.templates-monaco.monaco-editor-shell{background:var(--vscode-editor-background);min-height:0;color:var(--vscode-editor-foreground);border-color:var(--vscode-panel-border)}.post-editor .monaco-editor-instance,.scripts-monaco .monaco-editor-instance,.templates-monaco .monaco-editor-instance{background:var(--vscode-editor-background);min-height:0}.monaco-editor-shell .monaco-editor,.monaco-editor-shell .monaco-editor .margin,.monaco-editor-shell .monaco-editor-background,.monaco-editor-shell .monaco-editor .inputarea.ime-input{background-color:var(--vscode-editor-background)!important}.monaco-editor-shell .monaco-editor,.monaco-editor-shell .monaco-editor .view-line{color:var(--vscode-editor-foreground)!important}.monaco-editor-shell .monaco-editor .line-numbers{color:var(--vscode-editorLineNumber-foreground,#858585)!important}.monaco-editor-shell .monaco-editor .current-line,.monaco-editor-shell .monaco-editor .view-overlays .current-line{border-color:var(--vscode-editor-lineHighlightBorder,transparent)!important}.help-doc-view{--doc-bg:var(--panel-1,#1e1e1e);--doc-surface:var(--panel-2,#252526);--doc-border:var(--line,#3c3c3c);--doc-text:var(--vscode-editor-foreground,#d4d4d4);--doc-muted:var(--vscode-descriptionForeground,#9da3ad);--doc-link:var(--vscode-textLink-foreground,#9cdcfe);--doc-code-bg:var(--vscode-textCodeBlock-background,#0003);--doc-hover:var(--vscode-list-hoverBackground,#ffffff0f)}.help-doc-view .misc-editor-content{padding:0;overflow:hidden}.documentation-view,.documentation-scroll{background:var(--doc-bg,var(--vscode-editor-background))}.documentation-view{flex-direction:column;height:100%;min-height:0;display:flex}.documentation-scroll{flex:1;min-height:0;padding:28px 24px 40px;overflow:auto}.documentation-content{max-width:920px;color:var(--doc-text,var(--vscode-editor-foreground));margin:0 auto}.documentation-article,.help-doc-markdown{background:var(--doc-surface);border:1px solid var(--doc-border);border-radius:10px;padding:18px 20px 24px;box-shadow:0 10px 24px #0000002e}.documentation-content.markdown-body>.documentation-article>:first-child{margin-top:0}.documentation-content.markdown-body>.documentation-article>:last-child{margin-bottom:0}.documentation-content.markdown-body h1,.documentation-content.markdown-body h2,.documentation-content.markdown-body h3{color:var(--doc-text);border-bottom:1px solid var(--doc-border);padding-bottom:6px;line-height:1.25}.documentation-content.markdown-body h1{font-size:1.9rem}.documentation-content.markdown-body h2{margin-top:2rem;font-size:1.35rem}.documentation-content.markdown-body h3{margin-top:1.6rem;font-size:1.05rem}.documentation-content.markdown-body p,.documentation-content.markdown-body li,.documentation-content.markdown-body td,.documentation-content.markdown-body th{line-height:1.6}.documentation-content.markdown-body a{color:var(--doc-link);text-underline-offset:.14em;text-decoration-thickness:1px}.documentation-content.markdown-body a:hover{color:var(--doc-text)}.documentation-content.markdown-body hr{border:0;border-top:1px solid var(--doc-border);opacity:.8}.documentation-content.markdown-body code{background:var(--doc-code-bg);border-radius:4px;padding:.12em .4em;font:.92em/1.45 SFMono-Regular,Menlo,Monaco,Consolas,monospace}.documentation-content.markdown-body pre{background:var(--doc-code-bg);border:1px solid var(--doc-border);border-radius:8px;margin:.9rem 0 1.2rem;padding:14px 16px;overflow:auto}.documentation-content.markdown-body pre code{background:0 0;padding:0;font-size:.9em}.documentation-content.markdown-body blockquote{border-left:3px solid var(--doc-border);color:var(--doc-muted);margin:1rem 0;padding:0 0 0 12px}.documentation-content.markdown-body table{border-collapse:collapse;width:100%;margin:1rem 0 1.4rem;display:table}.documentation-content.markdown-body th,.documentation-content.markdown-body td{border:1px solid var(--doc-border);text-align:left;vertical-align:top;padding:8px 10px}.documentation-content.markdown-body th{background:var(--doc-hover);font-weight:700}.documentation-content.markdown-body ul,.documentation-content.markdown-body ol{margin:.85rem 0 1rem;padding-left:1.5rem;display:block}.documentation-content.markdown-body ul{list-style:outside}.documentation-content.markdown-body ol{list-style:decimal}.documentation-content.markdown-body li{margin:.3rem 0}.documentation-content.markdown-body li>ul,.documentation-content.markdown-body li>ol{margin-top:.35rem;margin-bottom:.35rem}.documentation-content.markdown-body strong{color:var(--doc-text)}.documentation-content.markdown-body img{max-width:100%;height:auto}.post-editor.editor,.scripts-view-shell.editor,.templates-view-shell.editor{background-color:var(--vscode-editor-background);flex-direction:column;flex:1;display:flex;overflow:hidden}.post-editor .editor-header,.scripts-view-shell.editor .editor-header,.templates-view-shell.editor .editor-header{background-color:var(--vscode-tab-activeBackground);border-bottom:1px solid var(--vscode-panel-border);justify-content:space-between;align-items:center;gap:12px;min-height:35px;padding:0 12px;display:flex}.post-editor .editor-tabs,.scripts-view-shell.editor .editor-tabs,.templates-view-shell.editor .editor-tabs{align-items:center;gap:2px;min-width:0;display:flex}.post-editor .editor-tab,.scripts-view-shell.editor .editor-tab,.templates-view-shell.editor .editor-tab{background-color:var(--vscode-tab-inactiveBackground);min-width:0;color:var(--vscode-tab-inactiveForeground);border-radius:4px 4px 0 0;align-items:center;gap:6px;padding:6px 12px;font-size:13px;display:flex}.post-editor .editor-tab.active,.scripts-view-shell.editor .editor-tab.active,.templates-view-shell.editor .editor-tab.active{background-color:var(--vscode-tab-activeBackground);color:var(--vscode-tab-activeForeground)}.post-editor .editor-tab-title,.scripts-view-shell.editor .editor-tab-title,.templates-view-shell.editor .editor-tab-title{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.post-editor .editor-tab-dirty{color:var(--vscode-notificationsWarningIcon-foreground,var(--vscode-editorWarning-foreground));font-size:10px}.post-editor .editor-tab-meta{color:var(--vscode-descriptionForeground);white-space:nowrap;font-size:11px}.post-editor .editor-actions,.scripts-view-shell.editor .editor-actions,.templates-view-shell.editor .editor-actions{align-items:center;gap:8px;display:flex}.post-editor .quick-actions-wrapper{display:inline-block;position:relative}.post-editor .quick-actions-btn{white-space:nowrap;align-items:center;gap:4px;display:flex}.post-editor .quick-actions-btn-icon{font-size:12px;line-height:1}.post-editor .quick-actions-menu{background:var(--vscode-dropdown-background,#3c3c3c);border:1px solid var(--vscode-dropdown-border,#454545);z-index:1000;border-radius:6px;min-width:280px;margin-top:4px;position:absolute;top:100%;right:0;overflow:hidden;box-shadow:0 4px 12px #0000004d}.post-editor .quick-actions-divider{background:var(--vscode-dropdown-border,#454545);height:1px}.post-editor .quick-action-item{width:100%;color:var(--vscode-dropdown-foreground,#ccc);cursor:pointer;text-align:left;background:0 0;border:none;align-items:flex-start;gap:10px;padding:10px 12px;transition:background .1s;display:flex}.post-editor .quick-action-item:hover:not(:disabled){background:var(--vscode-list-hoverBackground,#2a2d2e)}.post-editor .quick-action-item:disabled{opacity:.5;cursor:not-allowed}.post-editor .quick-action-icon{flex-shrink:0;margin-top:2px;font-size:16px}.post-editor .quick-action-text{flex-direction:column;gap:2px;display:flex}.post-editor .quick-action-text strong{font-size:13px;font-weight:500}.post-editor .quick-action-text small{opacity:.7;font-size:11px}.post-editor .status-badge,.scripts-view-shell.editor .status-badge,.templates-view-shell.editor .status-badge{text-transform:uppercase;border-radius:10px;padding:2px 8px;font-size:11px;font-weight:500}.post-editor .status-badge.status-draft,.scripts-view-shell.editor .status-badge.status-draft,.templates-view-shell.editor .status-badge.status-draft{color:var(--vscode-notificationsWarningIcon-foreground,var(--vscode-editorWarning-foreground));background-color:#cca70033}.post-editor .status-badge.status-published,.scripts-view-shell.editor .status-badge.status-published,.templates-view-shell.editor .status-badge.status-published{color:var(--vscode-testing-iconPassed);background-color:#73c99133}.post-editor .status-badge.status-archived,.scripts-view-shell.editor .status-badge.status-archived,.templates-view-shell.editor .status-badge.status-archived{color:var(--vscode-descriptionForeground);background-color:#85858533}.post-editor .auto-save-indicator{color:var(--vscode-descriptionForeground);font-size:11px;font-style:italic}.post-editor .editor-content{flex-direction:column;flex:1;gap:16px;padding:16px;display:flex;overflow-y:auto}.post-editor .metadata-toggle-header{align-items:center;gap:8px;display:flex}.post-editor .metadata-toggle{color:var(--vscode-descriptionForeground);text-transform:uppercase;letter-spacing:.5px;cursor:pointer;background:0 0;border:none;flex-shrink:0;align-items:center;gap:8px;padding:6px 4px;font-size:11px;font-weight:500;transition:color .15s;display:flex}.post-editor .metadata-toggle:hover{color:var(--vscode-foreground)}.post-editor .metadata-toggle-chevron{font-size:10px}.post-editor .editor-header-row{align-items:flex-start;gap:16px;display:flex}.post-editor .editor-header-row.is-collapsed{display:none}.post-editor .editor-meta{flex-direction:column;flex:1;gap:8px;min-width:0;display:flex}.post-editor .editor-media-panel{flex-shrink:0;width:200px}.post-editor .editor-field{flex-direction:column;flex:1;gap:4px;min-width:200px;display:flex}.post-editor .editor-field label,.post-editor .editor-body label,.post-editor .post-editor-links-label{color:var(--vscode-descriptionForeground);text-transform:uppercase;letter-spacing:.5px;font-size:11px;font-weight:500}.post-editor .editor-checkbox-label{text-transform:none;letter-spacing:0;color:var(--vscode-foreground);align-items:center;gap:8px;display:inline-flex}.post-editor .post-editor-input,.post-editor .post-editor-textarea{border:1px solid var(--vscode-input-border,var(--vscode-panel-border));background:var(--vscode-input-background,#ffffff0f);width:100%;color:var(--vscode-input-foreground,var(--vscode-foreground));font:inherit;border-radius:4px;padding:8px 10px}.post-editor .post-editor-input.is-readonly{opacity:.7;cursor:not-allowed}.post-editor .post-editor-textarea{resize:vertical;line-height:1.5}.post-editor .post-editor-excerpt{min-height:96px}.post-editor .tag-input-container{width:100%;position:relative}.post-editor .tag-input-container.is-disabled{opacity:.72}.post-editor .tag-input-wrapper{border:1px solid var(--vscode-input-border,#3c3c3c);background:var(--vscode-input-background,#3c3c3c);cursor:text;border-radius:4px;flex-wrap:wrap;align-items:center;gap:6px;min-height:38px;padding:6px 8px;display:flex}.post-editor .tag-input-wrapper:focus-within{border-color:var(--vscode-focusBorder,#007fd4);outline:none}.post-editor .tag-chip{background:var(--vscode-badge-background,#4d4d4d);border:1px solid var(--vscode-widget-border,#454545);color:var(--vscode-badge-foreground,#fff);white-space:nowrap;border-radius:4px;align-items:center;gap:4px;padding:3px 8px;font-size:.85rem;display:inline-flex}.post-editor .tag-chip.has-color{border-radius:12px;padding:3px 10px}.post-editor .tag-chip-remove{width:16px;height:16px;color:inherit;cursor:pointer;opacity:.6;background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;margin-left:2px;padding:0;font-size:1rem;line-height:1;transition:opacity .15s,background .15s;display:inline-flex}.post-editor .tag-chip-remove:hover{opacity:1;background:#0000001a}.post-editor .tag-chip.has-color .tag-chip-remove:hover{background:#0003}.post-editor .tag-input-field{min-width:120px;color:var(--vscode-input-foreground,#ccc);background:0 0;border:none;outline:none;flex:1;padding:2px 4px;font-family:inherit;font-size:.9rem}.post-editor .tag-input-field::placeholder{color:var(--vscode-input-placeholderForeground,#a6a6a6)}.post-editor .tag-input-field:disabled{cursor:not-allowed}.post-editor .tag-suggestions{background:var(--vscode-dropdown-background,#3c3c3c);border:1px solid var(--vscode-widget-border,#454545);z-index:1000;border-radius:6px;max-height:240px;margin-top:4px;padding:4px;position:absolute;top:100%;left:0;right:0;overflow-y:auto;box-shadow:0 4px 16px #00000080,0 0 0 1px #0003}.post-editor .tag-suggestion{width:100%;color:var(--vscode-dropdown-foreground,#f0f0f0);text-align:left;cursor:pointer;background:0 0;border:none;border-radius:4px;align-items:center;gap:8px;padding:8px 12px;font-family:inherit;font-size:.9rem;transition:background .1s;display:flex}.post-editor .tag-suggestion:hover,.post-editor .tag-suggestion.selected{background:var(--vscode-list-hoverBackground,#2a2d2e)}.post-editor .tag-suggestion-color{border-radius:50%;flex-shrink:0;width:12px;height:12px}.post-editor .tag-suggestion-name{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.post-editor .tag-suggestion.create-new{border-top:1px solid var(--vscode-widget-border,#454545);color:var(--vscode-notificationsInfoIcon-foreground,#75beff);margin-top:4px;padding:12px 8px 6px}.post-editor .tag-suggestion.create-new:first-child{border-top:none;margin-top:0;padding-top:8px}.post-editor .tag-suggestion-icon{border:1px dashed;border-radius:4px;justify-content:center;align-items:center;width:18px;height:18px;font-size:.9rem;font-weight:600;display:inline-flex}.post-editor .editor-field-row{gap:12px;width:100%;display:flex}.post-editor .editor-language-row{flex-wrap:nowrap;align-items:center;gap:6px;display:flex}.post-editor .editor-language-row select{flex:1;min-width:0}.post-editor .editor-translations-flags{flex:1;align-items:center;gap:4px;min-width:0;display:flex;overflow-x:auto}.post-editor .editor-translation-flag{cursor:pointer;background:0 0;border:1px solid #0000;border-radius:999px;flex:none;justify-content:center;align-items:center;width:24px;height:24px;padding:0;font-size:14px;line-height:1;display:inline-flex}.post-editor .editor-translation-flag.status-draft{opacity:.82}.post-editor .editor-translation-flag.status-archived{opacity:.45;filter:grayscale(.35)}.post-editor .editor-translation-flag.active{border-color:var(--vscode-testing-iconQueued,#cca700);background:var(--vscode-testing-iconQueued,#cca700)}@supports (color:color-mix(in lab, red, red)){.post-editor .editor-translation-flag.active{background:color-mix(in srgb,var(--vscode-testing-iconQueued,#cca700)14%,transparent)}}.post-editor .editor-translation-flag:hover{background:var(--vscode-list-hoverBackground)}@supports (color:color-mix(in lab, red, red)){.post-editor .editor-translation-flag:hover{background:color-mix(in srgb,var(--vscode-list-hoverBackground)75%,transparent)}}.post-editor .post-editor-links-panel,.post-editor .post-editor-side-panel{border:1px solid var(--vscode-panel-border);background:var(--vscode-editor-background);border-radius:8px;padding:12px}@supports (color:color-mix(in lab, red, red)){.post-editor .post-editor-links-panel,.post-editor .post-editor-side-panel{background:color-mix(in srgb,var(--vscode-editor-background)82%,white 3%)}}.post-editor .post-editor-side-panel-header{justify-content:space-between;align-items:center;gap:10px;display:flex}.post-editor .post-editor-links-columns{align-items:flex-start;gap:18px;margin-top:10px;display:flex}.post-editor .post-editor-links-columns>div{flex:1;min-width:0}.post-editor .post-editor-empty,.post-editor .post-editor-media-meta{color:var(--vscode-descriptionForeground);font-size:12px}.post-editor .post-editor-media-list{flex-direction:column;gap:8px;margin:10px 0 0;padding:0;list-style:none;display:flex}.post-editor .post-editor-media-item{background:#ffffff08;border-radius:6px;flex-direction:column;gap:2px;padding:8px 10px;display:flex}.post-editor .editor-body{flex-direction:column;flex:1;gap:4px;min-height:320px;display:flex}.post-editor .editor-toolbar{grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;margin-bottom:8px;display:grid}.post-editor .editor-toolbar-left{justify-content:flex-start;align-items:center;display:flex}.post-editor .editor-toolbar-center{justify-content:center;align-items:center;display:flex}.post-editor .editor-toolbar-right{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:6px;min-width:0;display:flex}.post-editor .editor-mode-toggle{gap:4px;display:flex}.post-editor .editor-mode-toggle button,.post-editor .editor-toolbar-button{cursor:pointer;border:none;border-radius:4px;padding:4px 12px;font-size:12px;transition:background-color .15s}.post-editor .editor-mode-toggle button{background-color:var(--vscode-button-secondaryBackground,#ffffff14);color:var(--vscode-button-secondaryForeground,var(--vscode-foreground))}.post-editor .editor-mode-toggle button:hover,.post-editor .editor-toolbar-button:hover{background-color:var(--vscode-button-secondaryHoverBackground,var(--vscode-toolbar-hoverBackground))}.post-editor .editor-mode-toggle button.active{background-color:var(--vscode-button-background,var(--accent-color));color:var(--vscode-button-foreground,#fff)}.post-editor .editor-toolbar-button{background:var(--vscode-button-secondaryBackground,#ffffff14);color:var(--vscode-button-secondaryForeground,var(--vscode-foreground))}.post-editor .editor-excerpt-panel.is-collapsed{display:none}.post-editor .gallery-button{background-color:var(--vscode-button-secondaryBackground);color:var(--vscode-button-secondaryForeground);cursor:pointer;border:none;border-radius:4px;padding:4px 12px;font-size:12px;transition:background-color .15s}.post-editor .gallery-button:hover{background-color:var(--vscode-button-secondaryHoverBackground)}.post-editor .insert-post-link-button,.post-editor .insert-media-button{background-color:var(--vscode-button-secondaryBackground);color:var(--vscode-button-secondaryForeground);cursor:pointer;border:none;border-radius:4px;padding:4px 8px;font-size:14px;transition:background-color .15s}.post-editor .insert-post-link-button:hover,.post-editor .insert-media-button:hover{background-color:var(--vscode-button-secondaryHoverBackground)}.post-editor .editor-preview{background-color:var(--vscode-input-background);background-color:var(--vscode-input-background);border:none;border:1px solid var(--vscode-panel-border);border-radius:4px;flex:1;min-height:240px;padding:14px;line-height:1.6;position:relative;overflow:auto}.post-editor .editor-preview-frame{background:#fff;border:none;width:100%;min-height:520px}.post-editor .post-editor-markdown-surface{border:1px solid var(--vscode-input-border,var(--vscode-panel-border));background:var(--vscode-input-background);border-radius:4px;flex:1;min-height:380px;position:relative;overflow:hidden}.post-editor .monaco-editor-shell,.scripts-monaco.monaco-editor-shell,.templates-monaco.monaco-editor-shell{position:relative}.monaco-editor-instance{width:100%;height:100%;min-height:100%}.post-editor .monaco-editor-instance{min-height:380px}.scripts-monaco .monaco-editor-instance,.templates-monaco .monaco-editor-instance{min-height:420px}.monaco-editor-input{clip:rect(0,0,0,0);white-space:pre;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.post-editor .editor-footer{border-top:1px solid var(--vscode-panel-border);background-color:var(--vscode-sideBar-background);color:var(--vscode-descriptionForeground);flex-wrap:wrap;align-items:center;gap:16px;padding:8px 16px;font-size:12px;display:flex}@media (max-width:980px){.post-editor .editor-header,.scripts-view-shell.editor .editor-header,.templates-view-shell.editor .editor-header,.post-editor .metadata-toggle-header,.post-editor .editor-toolbar{flex-direction:column;align-items:flex-start;display:flex}.post-editor .editor-header-row,.post-editor .editor-field-row,.post-editor .post-editor-links-columns{flex-direction:column}.post-editor .editor-media-panel{width:100%}.post-editor .editor-toolbar-right,.post-editor .editor-actions,.scripts-view-shell.editor .editor-actions,.templates-view-shell.editor .editor-actions{justify-content:flex-start}}.settings-view,.style-view{flex-direction:column;height:100%;display:flex}.settings-header,.style-view-header{border-bottom:1px solid var(--line,#3c3c3c);justify-content:space-between;align-items:center;gap:16px;padding:18px 20px;display:flex}.settings-search input{width:min(320px,40vw)}.settings-content{flex-direction:column;gap:18px;padding:20px;display:flex;overflow:auto}.setting-section{border:1px solid var(--line,#3c3c3c);background:var(--panel-2,#252526);border-radius:12px}.setting-section-header{border-bottom:1px solid var(--line,#3c3c3c);padding:14px 16px}.setting-section-content{flex-direction:column;gap:14px;padding:16px;display:flex}.setting-row{grid-template-columns:minmax(180px,240px) minmax(0,1fr);align-items:start;gap:16px;display:grid}.setting-label{font-weight:600}.setting-control,.setting-input-group{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.setting-actions{flex-wrap:wrap;gap:10px;padding:0 16px 16px;display:flex}.style-theme-picker{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px;padding:20px;display:grid}.style-theme-option{border:1px solid var(--line,#3c3c3c);background:var(--panel-2,#252526);text-align:left;cursor:pointer;border-radius:14px;padding:14px}.style-theme-option.selected{border-color:var(--accent-color);box-shadow:0 0 0 1px var(--accent-color)}.style-theme-swatch{flex-direction:column;gap:12px;display:flex}.style-theme-tones{grid-template-columns:2fr 1fr 1fr;gap:8px;display:grid}.style-theme-tone{border:1px solid #ffffff14;border-radius:10px;height:42px}.style-apply-row{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;padding:0 20px 20px;display:flex}.style-preview-container{flex:1;min-height:0;padding:0 20px 20px}.style-preview-frame{border:1px solid var(--line,#3c3c3c);background:#fff;border-radius:14px;width:100%;height:100%;min-height:420px}@media (max-width:1100px){.setting-row{grid-template-columns:1fr}}.panel-shell{border-top:1px solid var(--line);min-height:160px;max-height:160px}.panel-shell.is-hidden{display:none}.panel-tabs{gap:2px;display:flex}.panel-tab{color:var(--vscode-tab-inactiveForeground);cursor:pointer;background:0 0;border:none;border-bottom:2px solid #0000;border-radius:0;padding:6px 12px;font-size:12px}.panel-tab:hover{color:var(--vscode-tab-activeForeground);background:0 0}.panel-tab.active{color:var(--vscode-tab-activeForeground);border-bottom-color:var(--vscode-focusBorder);background:0 0}.assistant-content{flex-direction:column;gap:12px;padding:12px;display:flex}.assistant-sidebar-header{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.assistant-sidebar-heading{flex-direction:column;gap:4px;display:flex}.assistant-sidebar-description,.assistant-sidebar-context-text,.assistant-sidebar-message-content{color:var(--vscode-descriptionForeground)}.assistant-sidebar-status{border:1px solid var(--vscode-panel-border);border-radius:999px;padding:2px 8px;font-size:11px;line-height:1.4}.assistant-sidebar-status.is-offline{color:var(--vscode-editor-foreground);background:#ffc4002e;border-color:#ffc40059}.assistant-sidebar-context{border:1px solid var(--vscode-panel-border);background:var(--vscode-editorWidget-background,#0003);border-radius:6px;flex-direction:column;gap:10px;padding:8px;display:flex}.assistant-sidebar-context-row{justify-content:space-between;gap:12px;display:flex}.assistant-sidebar-context-label,.assistant-sidebar-message-role{text-transform:uppercase;letter-spacing:.04em;color:var(--vscode-descriptionForeground);font-size:11px}.assistant-sidebar-context-value{text-align:right;color:var(--vscode-editor-foreground)}.assistant-sidebar-context-text,.assistant-sidebar-message-content{white-space:pre-wrap;margin:0}.assistant-sidebar-prompt-form,.assistant-sidebar-welcome,.assistant-sidebar-transcript{flex-direction:column;gap:10px;display:flex}.assistant-sidebar-prompt{resize:vertical;border:1px solid var(--vscode-input-border);background:var(--vscode-input-background);width:100%;min-height:120px;color:var(--vscode-input-foreground);font:inherit;border-radius:6px;padding:10px}.assistant-sidebar-prompt:focus{outline:1px solid var(--vscode-focusBorder);outline-offset:1px}.assistant-sidebar-start-button{border:1px solid var(--vscode-button-border,transparent);background:var(--vscode-button-background);color:var(--vscode-button-foreground);cursor:pointer;border-radius:999px;align-self:flex-start;padding:7px 14px}.assistant-sidebar-start-button:disabled{cursor:default;opacity:.55}.assistant-card,.assistant-sidebar-message{border:1px solid var(--vscode-panel-border);background:var(--vscode-editorWidget-background,#0003);border-bottom-width:1px;border-radius:6px;flex-direction:column;gap:6px;padding:12px;display:flex}.assistant-sidebar-message.user{background:var(--vscode-list-hoverBackground)}.assistant-sidebar-message.assistant{background:var(--vscode-editorWidget-background,#0003)}.status-bar{background-color:var(--vscode-statusBar-background);height:22px;color:var(--vscode-statusBar-foreground);-webkit-user-select:none;user-select:none;border-top:none;flex-wrap:nowrap;justify-content:space-between;align-items:center;gap:0;padding:0 8px;font-size:12px;display:flex}.status-bar-left,.status-bar-right{flex-shrink:0;align-items:center;gap:4px;min-width:0;display:flex}.status-bar-item{white-space:nowrap;text-overflow:ellipsis;background:0 0;border-radius:0;align-items:center;gap:6px;max-width:none;height:100%;padding:0 8px;font-size:12px;display:flex;overflow:hidden}.status-bar-item .task-message-text{text-overflow:ellipsis;white-space:nowrap;max-width:300px;overflow:hidden}.task-spinner{border:2px solid #ffffff4d;border-top-color:#fff;border-radius:50%;width:10px;height:10px;animation:.8s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.panel-content{padding:8px}.task-list{gap:4px}.output-list,.git-log-list{gap:6px}.task-entry{background-color:var(--vscode-sideBar-background);border-bottom:none;border-radius:4px;padding:8px}.output-entry{background-color:var(--vscode-sideBar-background);color:var(--vscode-editor-foreground);border-bottom:none;border-radius:4px;padding:8px;font-size:12px}@media (max-width:1100px){.editor-frame{grid-template-columns:1fr}.assistant-sidebar-shell{display:none}.dashboard-grid{grid-template-columns:1fr}}.text-muted{color:var(--vscode-descriptionForeground)}.editor-empty{background-color:var(--vscode-editor-background);flex:1;justify-content:center;align-items:flex-start;padding:40px 20px;display:flex;overflow-y:auto}.dashboard-content{width:100%;max-width:720px}.dashboard-content h1{color:var(--vscode-editor-foreground);margin:0 0 4px;font-size:24px;font-weight:400}.dashboard-content>.text-muted{margin-bottom:24px;display:block}.dashboard-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:24px;display:grid}.stat-card{background-color:var(--vscode-sideBar-background);border-radius:6px;padding:16px}.stat-number{color:var(--vscode-editor-foreground);margin-bottom:4px;font-size:32px;font-weight:600;line-height:1}.stat-label{color:var(--vscode-descriptionForeground);text-transform:uppercase;letter-spacing:.5px;margin-bottom:10px;font-size:12px}.stat-breakdown{flex-wrap:wrap;gap:6px;display:flex}.stat-tag{background-color:var(--vscode-input-background);color:var(--vscode-descriptionForeground);border-radius:3px;padding:2px 8px;font-size:11px}.stat-published{color:var(--vscode-testing-iconPassed)}.stat-draft{color:var(--vscode-editorWarning-foreground)}.stat-archived{color:var(--vscode-descriptionForeground)}.dashboard-section{background-color:var(--vscode-sideBar-background);border-radius:6px;margin-bottom:12px;padding:16px}.dashboard-section h4{color:var(--vscode-descriptionForeground);text-transform:uppercase;letter-spacing:.5px;margin:0 0 12px;font-size:11px;font-weight:600}.timeline-chart{align-items:flex-end;gap:4px;height:100px;display:flex}.timeline-bar-container{flex-direction:column;flex:1;align-items:center;height:100%;display:flex}.timeline-bar{background-color:var(--vscode-activityBarBadge-background);border-radius:3px 3px 0 0;width:100%;max-width:40px;min-height:4px;margin-top:auto;transition:opacity .15s;position:relative}.timeline-bar:hover{opacity:.8}.timeline-bar-count{color:var(--vscode-descriptionForeground);font-size:10px;position:absolute;top:-16px;left:50%;transform:translate(-50%)}.timeline-bar-label{color:var(--vscode-descriptionForeground);flex-direction:column;align-items:center;margin-top:4px;font-size:9px;line-height:1.15;display:flex}.timeline-bar-label-month{white-space:nowrap}.timeline-bar-label-year{font-size:8px}.tag-cloud{flex-wrap:wrap;align-items:baseline;gap:6px 10px;line-height:1.6;display:flex}.dashboard-tag{background-color:var(--vscode-input-background);color:var(--vscode-editor-foreground);cursor:default;white-space:nowrap;border-radius:10px;padding:2px 8px;transition:opacity .15s}.dashboard-tag:hover{opacity:.75}.dashboard-tag.has-color{border-radius:12px}.dashboard-tag.has-color:hover{opacity:.85}.tag-cloud-more{font-size:11px}.tag-count{opacity:.5;margin-left:2px;font-size:10px}.dashboard-category{border:1px solid var(--vscode-input-border);font-size:12px}.recent-posts-list{flex-direction:column;display:flex}.recent-post-item{cursor:pointer;text-align:left;width:100%;color:inherit;background:0 0;border:none;border-radius:4px;align-items:center;gap:10px;padding:6px 8px;font-size:12px;display:flex}.recent-post-item:hover{background-color:var(--vscode-list-hoverBackground)}.recent-post-title{color:var(--vscode-editor-foreground);text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.recent-post-status{background-color:var(--vscode-input-background);text-transform:uppercase;letter-spacing:.3px;border-radius:3px;padding:1px 6px;font-size:10px}.recent-post-status.status-published{color:var(--vscode-testing-iconPassed)}.recent-post-status.status-draft{color:var(--vscode-editorWarning-foreground)}.recent-post-status.status-archived{color:var(--vscode-descriptionForeground)}.recent-post-date{color:var(--vscode-descriptionForeground);white-space:nowrap}.settings-view-shell,.style-view,.tags-view-shell,.scripts-view-shell,.templates-view-shell,.chat-panel{background:var(--vscode-editor-background);height:100%}.chat-panel{min-height:0;color:var(--vscode-editor-foreground);flex-direction:column;display:flex}.chat-panel-header{border-bottom:1px solid var(--vscode-panel-border);background:var(--vscode-sideBar-background);justify-content:space-between;align-items:center;gap:16px;padding:12px 16px;display:flex}.chat-panel-title{flex:1;align-items:center;gap:10px;min-width:0;font-size:14px;font-weight:600;display:flex;overflow:visible}.chat-panel-title-main{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.chat-panel-header-actions{align-items:center;gap:8px;display:flex}.chat-model-selector-wrap{min-width:0;display:inline-flex;position:relative}.chat-model-selector-button,.chat-model-selector-option{border:1px solid var(--vscode-input-border);background:var(--vscode-input-background);color:var(--vscode-input-foreground)}.chat-model-selector-menu{border:1px solid var(--vscode-dropdown-border,var(--vscode-panel-border));background:var(--vscode-dropdown-background,var(--vscode-sideBar-background));color:var(--vscode-dropdown-foreground,var(--vscode-foreground));z-index:20;position:absolute;top:calc(100% + 4px);left:0;right:auto}.chat-panel .chat-model-selector-button.chat-model-selector-inline{align-items:center;gap:6px;display:inline-flex}.chat-panel .chat-model-selector-caret{font-size:10px;position:static}.chat-messages,.chat-surface-scroll{flex:1;min-height:0;overflow-y:auto}.chat-messages{flex-direction:column;gap:16px;padding:16px;display:flex}.chat-message{max-width:100%;display:flex}.chat-message.user{justify-content:flex-end}.chat-message-content{border:1px solid var(--vscode-panel-border);background:var(--vscode-sideBar-background);max-width:min(760px,100%);color:var(--vscode-editor-foreground);border-radius:6px;padding:12px 14px}.chat-panel .chat-message.user .chat-message-content{color:var(--vscode-list-activeSelectionForeground);background:0 0;border:0;padding:6px 12px;line-height:1.35}.chat-tool-surface-table{border-collapse:collapse;width:100%}.chat-tool-surface-table th,.chat-tool-surface-table td{border-bottom:1px solid var(--vscode-panel-border);text-align:left;padding:6px 8px}.chat-tool-surface-json{border:1px solid var(--vscode-panel-border);background:var(--vscode-textCodeBlock-background);border-radius:4px;padding:10px 12px;overflow:auto}.chat-panel .chat-input-container{--chat-input-line-height:20px;--chat-input-min-height:20px;border-top:1px solid var(--vscode-panel-border);background:var(--vscode-sideBar-background);padding:8px 16px}.chat-panel .chat-input-wrapper{border:1px solid var(--vscode-input-border);background:var(--vscode-input-background);border-radius:6px;align-items:flex-end;gap:8px;min-height:30px;padding:4px 6px;display:flex}.chat-panel .chat-input-wrapper:focus-within{border-color:var(--vscode-focusBorder)}.chat-panel .chat-input{box-sizing:border-box;height:var(--chat-input-min-height);min-height:var(--chat-input-min-height);line-height:var(--chat-input-line-height);resize:vertical;max-height:160px;color:var(--vscode-input-foreground);background:0 0;border:0;flex:1;margin:0;padding:6px 8px;overflow-y:hidden}.chat-panel .chat-input::placeholder{color:var(--vscode-input-placeholderForeground)}.chat-panel .chat-send-button{background:var(--vscode-button-background);width:22px;max-width:22px;height:22px;max-height:22px;color:var(--vscode-button-foreground);flex:none;padding:0}.chat-panel .chat-send-button:hover:not(:disabled){background:var(--vscode-button-hoverBackground)}.chat-panel .chat-send-button:disabled{opacity:.5}.overlay-root{pointer-events:none;z-index:10000;position:fixed;inset:0}.overlay-root:empty{display:none}.editor-shared-actions{margin-bottom:14px;position:relative}.ai-suggestions-modal-backdrop,.insert-modal-backdrop,.language-picker-modal-backdrop,.confirm-delete-modal-backdrop,.confirm-dialog-overlay,.gallery-overlay,.lightbox-overlay{pointer-events:auto;background:#000000ad;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.ai-suggestions-modal,.insert-modal,.language-picker-modal,.confirm-delete-modal,.confirm-dialog,.gallery-overlay-content{background:#1e1e1e;border:1px solid #3c3c3c;border-radius:8px;box-shadow:0 8px 32px #0006}.ai-suggestions-modal,.language-picker-modal,.confirm-delete-modal,.confirm-dialog{flex-direction:column;width:min(680px,100vw - 32px);max-height:calc(100vh - 48px);display:flex}.insert-modal{flex-direction:column;width:min(680px,100vw - 32px);max-height:calc(100vh - 48px);display:flex;overflow:hidden}.gallery-overlay-content{flex-direction:column;width:min(980px,100vw - 48px);max-height:calc(100vh - 48px);display:flex;overflow:hidden}.ai-suggestions-modal-header,.language-picker-modal-header,.confirm-delete-modal-header,.insert-modal-header,.gallery-overlay-header{border-bottom:1px solid #3c3c3c;justify-content:space-between;align-items:center;gap:12px;padding:16px 20px;display:flex}.insert-modal-header{flex-direction:column;align-items:stretch;gap:12px}.insert-modal-header.media-header-only{flex-direction:row;align-items:center}.ai-suggestions-modal-header h2,.language-picker-modal-header h2,.confirm-delete-modal-header h2,.gallery-overlay-header h2,.insert-modal-title,.confirm-dialog h3{color:#fff;margin:0}.ai-suggestions-modal-close,.confirm-delete-modal-close,.gallery-overlay-close,.shared-popover-close,.lightbox-close{color:#c5c5c5;cursor:pointer;background:0 0;border:none;font-size:20px;line-height:1}.ai-suggestions-modal-body,.language-picker-modal-body,.confirm-delete-modal-body{padding:20px;overflow:auto}.ai-suggestions-list{flex-direction:column;gap:16px;display:flex}.ai-suggestion-item{background:#252526;border:1px solid #3c3c3c;border-radius:6px;gap:12px;padding:16px;display:flex}.ai-suggestion-checkbox{cursor:pointer;align-items:flex-start;display:flex;position:relative}.ai-suggestion-checkbox input{opacity:0;position:absolute}.checkmark{background:#1e1e1e;border:2px solid #555;border-radius:4px;justify-content:center;align-items:center;width:20px;height:20px;display:inline-flex}.ai-suggestion-checkbox input:checked+.checkmark,.ai-suggestion-checkbox input:checked~.checkmark{background:#0078d4;border-color:#0078d4}.ai-suggestion-checkbox input:checked+.checkmark:after,.ai-suggestion-checkbox input:checked~.checkmark:after{content:"✓";color:#fff;font-size:12px}.ai-suggestion-content{flex:1;min-width:0}.ai-suggestion-label{align-items:center;gap:8px;margin-bottom:8px;font-weight:600;display:flex}.ai-suggestion-has-value,.language-picker-badge,.insert-modal-similarity-badge{color:#c5c5c5;background:#ffffff14;border-radius:999px;align-items:center;padding:2px 6px;font-size:11px;display:inline-flex}.ai-suggestion-comparison{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:12px;display:grid}.ai-suggestion-column{background:#ffffff08;border-radius:6px;flex-direction:column;gap:4px;padding:10px 12px;display:flex}.ai-suggestion-column.muted{color:#9d9d9d}.ai-suggestion-column.highlighted{color:#fff;border:1px solid #007acc66}.ai-suggestion-column-label{text-transform:uppercase;letter-spacing:.04em;font-size:11px}.ai-suggestion-arrow{color:#9d9d9d}.ai-suggestion-value{min-height:1.4em}.ai-suggestion-value.loading{color:var(--accent-color);font-style:italic}.ai-suggestions-error{color:#ff6b6b;background:#dc32321f;border:1px solid #dc323259;border-radius:6px;flex-direction:column;gap:4px;margin-bottom:16px;padding:12px 16px;display:flex}.ai-suggestions-modal-footer,.confirm-delete-modal-footer,.confirm-dialog-actions{border-top:1px solid #3c3c3c;justify-content:flex-end;gap:10px;padding:16px 20px;display:flex}.button-cancel,.button-delete,.button-apply,.confirm-dialog-actions button,.insert-modal-submit,.language-picker-row,.shared-popover-entry,.colour-swatch{cursor:pointer}.button-cancel,.confirm-dialog-actions button,.insert-modal-submit{color:#f0f0f0;background:0 0;border:1px solid #4c4c4c;border-radius:4px;padding:8px 14px}.button-apply,.confirm-dialog-actions .primary,.insert-modal-submit{background:#0e639c;border-color:#0e639c}.button-delete{color:#fff;background:#c73c3c;border:none;border-radius:4px;padding:8px 14px}.insert-modal-tabs{margin:0 -20px;display:flex}.insert-modal-tab{color:#9d9d9d;background:0 0;border:none;border-bottom:2px solid #0000;flex:1;padding:10px 16px}.insert-modal-tab.active{color:#fff;background:#252526;border-bottom-color:#0e639c}.insert-modal-search{border-bottom:1px solid #3c3c3c}.insert-modal-input,.shared-popover-input{color:#f0f0f0;width:100%;font:inherit;background:0 0;border:none;padding:14px 20px}.menu-editor-view{background:var(--vscode-editor-background);flex-direction:column;flex:1;gap:.75rem;height:100%;min-height:0;padding:1rem;display:flex;overflow:hidden}.menu-editor-header{justify-content:space-between;align-items:flex-start;gap:1rem;display:flex}.menu-editor-header h2{margin:0}.menu-editor-header p{color:var(--vscode-descriptionForeground);margin:.25rem 0 0}.menu-editor-main{flex-direction:column;flex:1;min-height:0;display:flex;overflow:hidden}.menu-editor-tree-wrap{border:1px solid var(--vscode-panel-border);background:var(--vscode-editor-background);border-radius:6px;flex-direction:column;flex:1;min-height:0;padding:.5rem;display:flex}.menu-editor-toolbar{border-bottom:1px solid var(--vscode-panel-border);align-items:center;gap:.2rem;margin-bottom:.5rem;padding-bottom:.4rem;display:flex}.menu-editor-tool{width:1.8rem;height:1.8rem;color:var(--vscode-foreground);cursor:pointer;background:0 0;border:1px solid #0000;border-radius:4px;justify-content:center;align-items:center;padding:0;display:inline-flex}.menu-editor-tool:hover:not(:disabled){background:var(--vscode-toolbar-hoverBackground);border-color:var(--vscode-panel-border)}.menu-editor-tool:disabled{opacity:.45;cursor:not-allowed}.menu-editor-tree-shell{flex:1;min-height:0;overflow:auto}.menu-editor-tree-level{margin:0;padding:0;list-style:none}.menu-editor-tree-item{margin:0;padding:0}.menu-editor-row{--menu-editor-indent:calc(var(--menu-editor-depth)*1rem);padding:.3rem .45rem .3rem calc(.4rem + var(--menu-editor-indent));cursor:pointer;border-radius:4px;align-items:flex-start;gap:.5rem;display:flex;position:relative}.menu-editor-row.is-selected{background:var(--vscode-list-activeSelectionBackground);color:var(--vscode-list-activeSelectionForeground)}.menu-editor-row.is-dragging{opacity:.45}.menu-editor-row.is-drop-before:before,.menu-editor-row.is-drop-after:after{content:"";left:calc(.4rem + var(--menu-editor-indent));background:var(--vscode-focusBorder);height:2px;position:absolute;right:.45rem}.menu-editor-row.is-drop-before:before{top:0}.menu-editor-row.is-drop-after:after{bottom:0}.menu-editor-row.is-drop-inside{box-shadow:inset 0 0 0 1px var(--vscode-focusBorder);background:var(--vscode-list-hoverBackground)}.menu-editor-row-handle{width:1rem;min-width:1rem;color:var(--vscode-descriptionForeground);cursor:grab;-webkit-user-select:none;user-select:none;justify-content:center;align-items:center;display:inline-flex}.menu-editor-row-handle:active{cursor:grabbing}.menu-editor-row-kind{opacity:.9;justify-content:center;align-items:center;width:1rem;min-width:1rem;display:inline-flex}.menu-editor-row-title{white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;overflow:hidden}.menu-editor-row-title.is-editing{white-space:normal;text-overflow:clip;overflow:visible}.menu-editor-entry-form{display:block}.menu-editor-inline-input{border:1px solid var(--vscode-focusBorder);background:var(--vscode-input-background);width:100%;color:var(--vscode-input-foreground);border-radius:4px;min-height:1.8rem;padding:.25rem .45rem}.menu-editor-inline-search{border-top:1px solid var(--vscode-panel-border);flex-direction:column;gap:.4rem;max-height:18rem;margin-top:.5rem;padding-top:.5rem;display:flex;overflow:hidden}.menu-editor-inline-search-head{justify-content:space-between;align-items:center;gap:.75rem;display:flex}.menu-editor-inline-search-head strong{font-size:.8rem;display:block}.menu-editor-inline-search-head span{color:var(--vscode-descriptionForeground);font-size:.75rem}.menu-editor-inline-actions{align-items:center;gap:.5rem;display:inline-flex}.menu-editor-inline-action{border:1px solid var(--vscode-button-border,transparent);background:var(--vscode-button-secondaryBackground);color:var(--vscode-button-secondaryForeground);cursor:pointer;border-radius:4px;padding:.2rem .5rem}.menu-editor-inline-action:hover{background:var(--vscode-button-secondaryHoverBackground)}.menu-editor-picker-list{flex-direction:column;gap:.35rem;max-height:16rem;display:flex;overflow-y:auto}.menu-editor-picker-item{border:1px solid var(--vscode-panel-border);background:var(--vscode-input-background);width:100%;color:var(--vscode-input-foreground);text-align:left;cursor:pointer;border-radius:4px;justify-content:space-between;align-items:center;padding:.45rem .55rem;display:flex}.menu-editor-picker-item:hover{border-color:var(--vscode-focusBorder);background:var(--vscode-list-hoverBackground)}.menu-editor-picker-item small,.menu-editor-picker-state{color:var(--vscode-descriptionForeground)}.menu-editor-empty{color:var(--vscode-descriptionForeground);padding:.5rem .25rem}@media (max-width:720px){.menu-editor-inline-search-head{flex-direction:column;align-items:flex-start}.menu-editor-inline-actions{flex-wrap:wrap;justify-content:flex-start;width:100%}}[data-testid=media-editor]{background-color:var(--vscode-editor-background);flex-direction:column;flex:1;display:flex;overflow:hidden}[data-testid=media-editor] .editor-header{background-color:var(--vscode-tab-activeBackground);border-bottom:1px solid var(--vscode-panel-border);justify-content:space-between;align-items:center;gap:12px;min-height:35px;padding:0 12px;display:flex}[data-testid=media-editor] .editor-tabs{align-items:center;gap:2px;min-width:0;display:flex}[data-testid=media-editor] .editor-tab{background-color:var(--vscode-tab-inactiveBackground);min-width:0;color:var(--vscode-tab-inactiveForeground);border-radius:4px 4px 0 0;align-items:center;gap:6px;padding:6px 12px;font-size:13px;display:flex}[data-testid=media-editor] .editor-tab.active{background-color:var(--vscode-tab-activeBackground);color:var(--vscode-tab-activeForeground)}[data-testid=media-editor] .editor-tab-title{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}[data-testid=media-editor] .editor-tab-dirty{color:var(--vscode-notificationsWarningIcon-foreground,var(--vscode-editorWarning-foreground));font-size:10px}[data-testid=media-editor] .editor-actions{align-items:center;gap:8px;display:flex}[data-testid=media-editor] .editor-actions button{padding:4px 10px;font-size:12px}[data-testid=media-editor] .editor-actions button.danger:hover{background-color:var(--vscode-notificationsErrorIcon-foreground)}[data-testid=media-editor] .auto-save-indicator{color:var(--vscode-descriptionForeground);font-size:11px;font-style:italic}[data-testid=media-editor] .quick-actions-wrapper{position:relative}[data-testid=media-editor] .quick-actions-btn{align-items:center;gap:6px;display:inline-flex}[data-testid=media-editor] .quick-actions-btn-icon{font-size:12px;line-height:1}[data-testid=media-editor] .quick-actions-menu{background:var(--vscode-dropdown-background,#252526);border:1px solid var(--vscode-dropdown-border,#454545);z-index:30;border-radius:6px;width:280px;position:absolute;top:calc(100% + 4px);right:0;overflow:hidden;box-shadow:0 8px 24px #00000059}[data-testid=media-editor] .quick-actions-divider{background:var(--vscode-dropdown-border,#454545);height:1px}[data-testid=media-editor] .quick-action-item{width:100%;color:var(--vscode-dropdown-foreground,#ccc);cursor:pointer;text-align:left;background:0 0;border:none;justify-content:space-between;align-items:flex-start;gap:10px;padding:10px 12px;transition:background .1s;display:flex}[data-testid=media-editor] .quick-action-item:hover:not(:disabled){background:var(--vscode-list-hoverBackground,#2a2d2e)}[data-testid=media-editor] .quick-action-item:disabled{opacity:.5;cursor:not-allowed}[data-testid=media-editor] .quick-action-icon{flex-shrink:0;margin-top:2px;font-size:16px}[data-testid=media-editor] .quick-action-text{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}[data-testid=media-editor] .quick-action-text strong{font-size:13px;font-weight:500}[data-testid=media-editor] .quick-action-text small{opacity:.7;font-size:11px}[data-testid=media-editor] .editor-content{flex-direction:column;flex:1;gap:16px;padding:16px;display:flex;overflow-y:auto}[data-testid=media-editor]>.editor-content.media-editor{flex-direction:row;align-items:stretch;gap:24px}[data-testid=media-editor] .editor-field{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}[data-testid=media-editor] .editor-field label{color:var(--vscode-descriptionForeground);text-transform:uppercase;letter-spacing:.5px;font-size:11px;font-weight:500}[data-testid=media-editor] .editor-field-row{gap:12px;width:100%;margin-bottom:0;display:flex}[data-testid=media-editor] .post-editor-input,[data-testid=media-editor] .post-editor-textarea{border:1px solid var(--vscode-input-border,var(--vscode-panel-border));background:var(--vscode-input-background,#ffffff0f);width:100%;color:var(--vscode-input-foreground,var(--vscode-foreground));font:inherit;border-radius:4px;padding:8px 10px}[data-testid=media-editor] .post-editor-input.disabled,[data-testid=media-editor] .post-editor-input:disabled{opacity:.6;cursor:not-allowed}[data-testid=media-editor] .post-editor-textarea{resize:vertical;line-height:1.5}[data-testid=media-editor] .media-preview{background-color:var(--vscode-input-background);border-radius:8px;flex:1;justify-content:center;align-items:center;min-height:300px;display:flex;overflow:hidden}[data-testid=media-editor] .media-preview-placeholder{color:var(--vscode-descriptionForeground);flex-direction:column;align-items:center;gap:12px;display:flex}[data-testid=media-editor] .media-preview-image{box-sizing:border-box;justify-content:center;align-self:stretch;align-items:center;width:100%;height:100%;min-height:0;padding:16px;display:flex}[data-testid=media-editor] .media-preview-image img{object-fit:contain;border-radius:4px;width:100%;height:100%}[data-testid=media-editor] .media-details{flex-direction:column;flex-shrink:0;gap:12px;width:320px;display:flex}[data-testid=media-editor] .media-editor-details-form{flex-direction:column;gap:12px;display:flex}[data-testid=media-editor] .media-details textarea{resize:vertical}[data-testid=media-editor] .linked-posts-section label{justify-content:space-between;align-items:center;display:flex}[data-testid=media-editor] .add-link-btn{background:var(--vscode-button-secondaryBackground);color:var(--vscode-button-secondaryForeground);cursor:pointer;border:none;border-radius:3px;padding:2px 8px;font-size:11px}[data-testid=media-editor] .add-link-btn:hover{background:var(--vscode-button-secondaryHoverBackground)}[data-testid=media-editor] .post-picker{background:var(--vscode-dropdown-background);border:1px solid var(--vscode-dropdown-border);border-radius:4px;max-height:250px;margin-top:8px;overflow-y:auto}[data-testid=media-editor] .post-picker-search{border-bottom:1px solid var(--vscode-dropdown-border);background:var(--vscode-dropdown-background);padding:8px;position:sticky;top:0}[data-testid=media-editor] .post-picker-search input{background:var(--vscode-input-background);border:1px solid var(--vscode-input-border);width:100%;color:var(--vscode-input-foreground);border-radius:3px;padding:6px 10px;font-size:12px}[data-testid=media-editor] .post-picker-search input:focus{border-color:var(--vscode-focusBorder);outline:none}[data-testid=media-editor] .post-picker-list{padding:4px}[data-testid=media-editor] .post-picker-item{cursor:pointer;width:100%;color:inherit;text-align:left;white-space:nowrap;text-overflow:ellipsis;background:0 0;border:none;border-radius:3px;padding:6px 8px;font-size:12px;overflow:hidden}[data-testid=media-editor] .post-picker-item:hover{background:var(--vscode-list-hoverBackground)}[data-testid=media-editor] .post-picker-more{color:var(--vscode-descriptionForeground);padding:6px 8px;font-size:11px;font-style:italic}[data-testid=media-editor] .no-posts,[data-testid=media-editor] .no-linked-posts{color:var(--vscode-descriptionForeground);padding:12px 8px;font-size:12px;font-style:italic}[data-testid=media-editor] .linked-posts-list{flex-direction:column;gap:4px;margin-top:8px;display:flex}[data-testid=media-editor] .linked-post-item{background:var(--vscode-sideBar-background);border-radius:4px;justify-content:space-between;align-items:center;padding:6px 8px;display:flex}[data-testid=media-editor] .linked-post-title,[data-testid=media-editor] .linked-post-link{min-width:0;color:inherit;text-align:left;cursor:pointer;white-space:nowrap;text-overflow:ellipsis;background:0 0;border:none;flex:1;padding:0;font-size:12px;overflow:hidden}[data-testid=media-editor] .linked-post-title:hover,[data-testid=media-editor] .linked-post-link:hover{color:var(--vscode-textLink-foreground);text-decoration:underline}[data-testid=media-editor] .linked-post-item .unlink-btn{color:var(--vscode-descriptionForeground);cursor:pointer;opacity:0;background:0 0;border:none;padding:0 4px;font-size:14px;transition:opacity .1s}[data-testid=media-editor] .linked-post-item:hover .unlink-btn{opacity:1}[data-testid=media-editor] .linked-post-item .unlink-btn:hover{color:var(--vscode-errorForeground)}.translation-modal-backdrop{pointer-events:auto;z-index:10001;background:#000000ad;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.translation-modal{background:#1e1e1e;border:1px solid #3c3c3c;border-radius:8px;width:min(640px,100vw - 32px);box-shadow:0 8px 32px #0006}.translation-modal-header,.translation-modal-footer{justify-content:space-between;align-items:center;gap:12px;padding:16px 20px;display:flex}.translation-modal-header{border-bottom:1px solid #3c3c3c}.translation-modal-footer{border-top:1px solid #3c3c3c;justify-content:flex-end;gap:10px}.translation-modal-body{flex-direction:column;gap:14px;padding:20px;display:flex}.translation-modal-close{color:#c5c5c5;cursor:pointer;background:0 0;border:none;font-size:20px;line-height:1}.import-analysis{color:var(--vscode-foreground);flex-direction:column;gap:16px;padding:18px 20px 26px;display:flex}.import-analysis-header{flex-direction:column;gap:8px;display:flex}.import-analysis-header p{color:var(--vscode-descriptionForeground);margin:0;font-size:13px;line-height:1.5}.import-definition-name{border:1px solid var(--vscode-input-border,transparent);background:var(--vscode-input-background);width:min(480px,100%);color:var(--vscode-input-foreground,var(--vscode-foreground));border-radius:6px;padding:10px 12px;font-size:18px;font-weight:600}.import-file-selectors{gap:12px;display:grid}.import-file-row{border:1px solid var(--vscode-panel-border);background:var(--vscode-editor-background);border-radius:8px;grid-template-columns:150px minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px 14px;display:grid}@supports (color:color-mix(in lab, red, red)){.import-file-row{background:color-mix(in srgb,var(--vscode-editor-background)76%,var(--vscode-input-background))}}.import-file-row label{color:var(--vscode-descriptionForeground);text-transform:uppercase;letter-spacing:.04em;font-size:12px;font-weight:600}.import-file-path{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-family:var(--vscode-editor-font-family,ui-monospace,monospace);font-size:12px;overflow:hidden}.import-file-path.placeholder{color:var(--vscode-descriptionForeground)}.import-analysis button,.import-analysis select{border:1px solid var(--vscode-button-border,transparent);border-radius:6px;font-size:12px}.import-analysis button{background:var(--vscode-button-secondaryBackground,var(--vscode-button-background));color:var(--vscode-button-secondaryForeground,var(--vscode-button-foreground));cursor:pointer;padding:8px 12px}.import-analysis button:hover:not(:disabled){background:var(--vscode-button-secondaryHoverBackground,var(--vscode-button-hoverBackground))}.import-analyze-btn,.import-execute-btn{background:var(--vscode-button-background)!important;color:var(--vscode-button-foreground)!important}.import-analysis button:disabled{opacity:.65;cursor:not-allowed}.import-loading{border:1px solid var(--vscode-panel-border);background:var(--vscode-editor-background);border-radius:10px;align-items:center;gap:12px;padding:16px;display:flex}@supports (color:color-mix(in lab, red, red)){.import-loading{background:color-mix(in srgb,var(--vscode-editor-background)84%,var(--vscode-input-background))}}.import-spinner{border:2px solid var(--vscode-descriptionForeground);border-top-color:var(--vscode-button-background);border-radius:50%;flex-shrink:0;width:18px;height:18px;animation:.8s linear infinite import-spinner-rotate}.import-progress{flex-direction:column;gap:2px;display:flex}.import-progress-step{color:var(--vscode-foreground);font-size:13px}.import-progress-detail{color:var(--vscode-descriptionForeground);font-size:11px}@keyframes import-spinner-rotate{to{transform:rotate(360deg)}}.import-site-info{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;display:grid}.import-site-info-item,.import-stat-card,.import-date-distribution,.import-detail-section,.import-execute-section{border:1px solid var(--vscode-panel-border);background:var(--vscode-editor-background);border-radius:10px}@supports (color:color-mix(in lab, red, red)){.import-site-info-item,.import-stat-card,.import-date-distribution,.import-detail-section,.import-execute-section{background:color-mix(in srgb,var(--vscode-editor-background)84%,var(--vscode-input-background))}}.import-site-info-item{flex-direction:column;gap:6px;padding:14px;display:flex}.info-label{color:var(--vscode-descriptionForeground);text-transform:uppercase;letter-spacing:.05em;font-size:11px;font-weight:600}.info-value{overflow-wrap:anywhere;font-size:13px;font-weight:500}.import-stat-cards{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;display:grid}.import-stat-card{padding:14px}.import-stat-card h3,.import-date-distribution h3,.import-detail-section h3,.taxonomy-group h4{margin:0}.import-stat-number{margin-top:10px;font-size:28px;font-weight:700;line-height:1}.import-stat-breakdown,.import-execute-summary,.import-taxonomy-list{flex-wrap:wrap;gap:8px;display:flex}.import-stat-breakdown{margin-top:12px}.import-stat-tag,.import-count-tag,.import-taxonomy-pill,.macro-status-badge{border-radius:999px;align-items:center;gap:4px;padding:4px 9px;font-size:11px;font-weight:600;display:inline-flex}.stat-new,.import-taxonomy-pill.new-tax{color:#75beff;background:#75beff29}.stat-update,.stat-mapped,.import-taxonomy-pill.exists,.import-taxonomy-pill.mapped,.macro-status-badge.mapped,.import-execution-complete{color:#73c991;background:#73c99129}.stat-conflict{color:#ffb169;background:#ffa65729}.stat-duplicate,.stat-missing,.macro-status-badge.unmapped,.import-execution-error{color:#cca700;background:#cca70029}.import-date-distribution,.import-detail-section,.import-execute-section{padding:16px}.import-section-toggle{text-align:left;justify-content:space-between;align-items:center;gap:10px;width:100%;padding:0;font-weight:600;display:flex;color:inherit!important;background:0 0!important;border:none!important;font-size:16px!important}.import-section-toggle:hover{opacity:.9;background:0 0!important}.toggle-icon{color:var(--vscode-descriptionForeground);font-size:12px}.distribution-bars{gap:10px;margin-top:14px;display:grid}.distribution-row{grid-template-columns:56px minmax(0,1fr) 72px;align-items:center;gap:10px;display:grid}.distribution-year,.distribution-count,.slug-cell{font-family:var(--vscode-editor-font-family,ui-monospace,monospace);font-size:11px}.distribution-bar-container{background:var(--vscode-input-background);border-radius:999px;height:10px;overflow:hidden}.distribution-bar{border-radius:inherit;min-width:8px;height:100%}.distribution-bar-posts{background:linear-gradient(90deg,#75beffcc,#75beff59)}.import-execute-section{justify-content:space-between;align-items:center;gap:16px;display:flex}.import-execute-summary{color:var(--vscode-descriptionForeground)}.import-execution-complete,.import-execution-error{border-radius:8px;padding:10px 12px;font-size:12px;font-weight:600}.import-execution-progress{border:1px solid var(--vscode-panel-border);background:var(--vscode-editor-background);border-radius:10px;gap:10px;padding:16px;display:grid}@supports (color:color-mix(in lab, red, red)){.import-execution-progress{background:color-mix(in srgb,var(--vscode-editor-background)84%,var(--vscode-input-background))}}.import-execution-header{justify-content:space-between;align-items:center;gap:12px;display:flex}.import-execution-header h3{margin:0;font-size:14px}.import-progress-bar{background:var(--vscode-input-background);border-radius:999px;height:10px;overflow:hidden}.import-progress-fill{background:linear-gradient(90deg,#75beffd9,#75beff73);height:100%}.import-progress-info{flex-wrap:wrap;align-items:center;gap:12px;font-size:12px;display:flex}.import-phase{font-weight:600}.import-detail,.import-counter{color:var(--vscode-descriptionForeground)}.import-detail-table{border-collapse:collapse;width:100%;margin-top:14px}.import-detail-table th,.import-detail-table td{text-align:left;border-bottom:1px solid var(--vscode-panel-border);vertical-align:middle;padding:10px 8px;font-size:12px}.import-detail-table th{color:var(--vscode-descriptionForeground);text-transform:uppercase;letter-spacing:.04em;font-size:11px}.import-detail-table .status-badge{text-transform:uppercase;letter-spacing:.04em;border-radius:999px;align-items:center;padding:4px 9px;font-size:10px;font-weight:700;display:inline-flex}.import-detail-table .status-badge.new{color:#75beff;background:#75beff29}.import-detail-table .status-badge.update{color:#73c991;background:#73c99129}.import-detail-table .status-badge.conflict{color:#ffb169;background:#ffa65729}.import-detail-table .status-badge.duplicate,.import-detail-table .status-badge.missing{color:#cca700;background:#cca70029}.categories-cell,.existing-match,.mime-type-cell,.post-type-cell{color:var(--vscode-descriptionForeground);font-size:11px}.mime-type-cell,.post-type-cell,.existing-match,.slug-cell{font-family:var(--vscode-editor-font-family,ui-monospace,monospace)}.resolution-select,.taxonomy-mapping-input{background:var(--vscode-dropdown-background,var(--vscode-input-background));min-width:150px;color:var(--vscode-dropdown-foreground,var(--vscode-foreground));border:1px solid var(--vscode-dropdown-border,var(--vscode-panel-border));padding:6px 8px}.taxonomy-analyze-row{border-bottom:1px solid var(--vscode-panel-border);align-items:center;gap:12px;margin-top:12px;padding:0 0 12px;display:flex}.taxonomy-analyze-dropdown{position:relative}.taxonomy-analyze-btn{white-space:nowrap;align-items:center;gap:6px;display:inline-flex}.taxonomy-model-dropdown{background:var(--vscode-dropdown-background,var(--vscode-sideBar-background));border:1px solid var(--vscode-dropdown-border,var(--vscode-panel-border));z-index:20;border-radius:6px;min-width:220px;max-height:280px;position:absolute;top:calc(100% + 6px);left:0;overflow-y:auto;box-shadow:0 10px 24px #0000003d}.taxonomy-model-option{text-align:left;width:100%;display:block;color:var(--vscode-foreground)!important;background:0 0!important;border:none!important;border-radius:0!important;padding:8px 12px!important}.taxonomy-model-option:hover{background:var(--vscode-list-hoverBackground)!important}.taxonomy-analyze-hint{color:var(--vscode-descriptionForeground);font-size:11px}.import-taxonomy-groups{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:14px;display:grid}.taxonomy-group{flex-direction:column;gap:12px;display:flex}.import-taxonomy-entry,.import-taxonomy-edit-form{flex-wrap:wrap;align-items:center;gap:8px;display:inline-flex}.import-taxonomy-pill{cursor:default;border:none}button.import-taxonomy-pill{cursor:pointer}.mapped-target{background:#73c9911a}.taxonomy-mapping-arrow{color:var(--vscode-descriptionForeground);font-size:12px}.taxonomy-mapping-input{border-radius:6px;min-width:170px}.taxonomy-edit-btn,.taxonomy-clear-btn{justify-content:center;align-items:center;min-width:28px;min-height:28px;display:inline-flex;padding:0 8px!important}.taxonomy-edit-btn.ghost,.taxonomy-clear-btn{border:1px solid var(--vscode-panel-border)!important;color:var(--vscode-descriptionForeground)!important;background:0 0!important}.macros-list{gap:10px;margin-top:14px;display:grid}.macro-item{border:1px solid var(--vscode-panel-border);background:var(--vscode-input-background);border-radius:8px}.macro-item.unmapped{border-left:3px solid #cca700}.macro-header{align-items:center;gap:10px;padding:12px 14px;display:flex}.macro-name,.import-taxonomy-pill{font-family:var(--vscode-editor-font-family,ui-monospace,monospace)}.macro-count{color:var(--vscode-descriptionForeground);margin-left:auto;font-size:11px}.import-empty-state{color:var(--vscode-descriptionForeground);border:1px dashed var(--vscode-panel-border);border-radius:12px;flex-direction:column;justify-content:center;align-items:center;gap:12px;padding:56px 20px;display:flex}.import-empty-state p{margin:0;font-size:13px}@media (max-width:1100px){.import-site-info,.import-stat-cards,.import-taxonomy-groups{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width:780px){.import-analysis{padding:14px}.import-file-row,.distribution-row,.import-execute-section,.import-site-info,.import-stat-cards,.import-taxonomy-groups{grid-template-columns:1fr}.import-execute-section,.import-file-row{align-items:stretch}.import-analysis button,.resolution-select,.taxonomy-mapping-input{width:100%}.taxonomy-analyze-row{flex-direction:column;align-items:stretch}.import-taxonomy-entry,.import-taxonomy-edit-form{flex-direction:column;align-items:stretch;width:100%}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false} \ No newline at end of file diff --git a/priv/static/assets/app.js b/priv/static/assets/app.js new file mode 100644 index 0000000..b1c9ff8 --- /dev/null +++ b/priv/static/assets/app.js @@ -0,0 +1,26 @@ +(()=>{var $e=t=>typeof t=="function"?t:function(){return t},ki=typeof self<"u"?self:null,Pe=typeof window<"u"?window:null,re=ki||Pe||globalThis,Ai="2.0.0",oe={connecting:0,open:1,closing:2,closed:3},Ci=1e4,Ti=1e3,Q={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},de={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},pt={longpoll:"longpoll",websocket:"websocket"},_i={complete:4},mt="base64url.bearer.phx.",Ye=class{constructor(t,e,i,s){this.channel=t,this.event=e,this.payload=i||function(){return{}},this.receivedResp=null,this.timeout=s,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}matchReceive({status:t,response:e,_ref:i}){this.recHooks.filter(s=>s.status===t).forEach(s=>s.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},Ht=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=null,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},Pi=class{constructor(t,e,i){this.state=Q.closed,this.topic=t,this.params=$e(e||{}),this.socket=i,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Ye(this,de.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Ht(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=Q.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this.joinPush.receive("error",()=>{this.state=Q.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic} ${this.joinRef()}`),this.state=Q.closed,this.socket.remove(this)}),this.onError(s=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,s),this.isJoining()&&this.joinPush.reset(),this.state=Q.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic} (${this.joinRef()})`,this.joinPush.timeout),new Ye(this,de.leave,$e({}),this.timeout).send(),this.state=Q.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(de.reply,(s,n)=>{this.trigger(this.replyEventName(n),s)})}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}onClose(t){this.on(de.close,t)}onError(t){return this.on(de.error,e=>t(e))}on(t,e){let i=this.bindingRef++;return this.bindings.push({event:t,ref:i,callback:e}),i}off(t,e){this.bindings=this.bindings.filter(i=>!(i.event===t&&(typeof e>"u"||e===i.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,i=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let s=new Ye(this,t,function(){return e},i);return this.canPush()?s.send():(s.startTimeout(),this.pushBuffer.push(s)),s}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Q.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(de.close,"leave")},i=new Ye(this,de.leave,$e({}),t);return i.receive("ok",()=>e()).receive("timeout",()=>e()),i.send(),this.canPush()||i.trigger("ok",{}),i}onMessage(t,e,i){return e}isMember(t,e,i,s){return this.topic!==t?!1:s&&s!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:i,joinRef:s}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Q.joining,this.joinPush.resend(t))}trigger(t,e,i,s){let n=this.onMessage(t,e,i,s);if(e&&!n)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let r=this.bindings.filter(o=>o.event===t);for(let o=0;oh.abort(),n);a.signal=h.signal}return re.fetch(e,a).then(c=>c.text()).then(c=>this.parseJSON(c)).then(c=>o&&o(c)).catch(c=>{c.name==="AbortError"&&r?r():o&&o(null)}),h}static xdomainRequest(t,e,i,s,n,r,o){return t.timeout=n,t.open(e,i),t.onload=()=>{let a=this.parseJSON(t.responseText);o&&o(a)},r&&(t.ontimeout=r),t.onprogress=()=>{},t.send(s),t}static xhrRequest(t,e,i,s,n,r,o,a){t.open(e,i,!0),t.timeout=r;for(let[h,c]of Object.entries(s))t.setRequestHeader(h,c);return t.onerror=()=>a&&a(null),t.onreadystatechange=()=>{if(t.readyState===_i.complete&&a){let h=this.parseJSON(t.responseText);a(h)}},o&&(t.ontimeout=o),t.send(n),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch{return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let i=[];for(var s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let n=e?`${e}[${s}]`:s,r=t[s];typeof r=="object"?i.push(this.serialize(r,n)):i.push(encodeURIComponent(n)+"="+encodeURIComponent(r))}return i.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let i=t.match(/\?/)?"&":"?";return`${t}${i}${this.serialize(e)}`}},Ri=t=>{let e="",i=new Uint8Array(t),s=i.byteLength;for(let n=0;nthis.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+pt.websocket),"$1/"+pt.longpoll)}endpointURL(){return Qe.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,i){this.close(t,e,i),this.readyState=oe.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===oe.open||this.readyState===oe.connecting}poll(){let t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),e=>{if(e){var{status:i,token:s,messages:n}=e;if(i===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=s}else i=0;switch(i){case 200:n.forEach(r=>{setTimeout(()=>this.onmessage({data:r}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=oe.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${i}`)}})}send(t){typeof t!="string"&&(t=Ri(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},t.join(` +`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(t,e,i){for(let n of this.reqs)n.abort();this.readyState=oe.closed;let s=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:i});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",s)):this.onclose(s)}ajax(t,e,i,s,n){let r,o=()=>{this.reqs.delete(r),s()};r=Qe.request(t,this.endpointURL(),e,i,this.timeout,o,a=>{this.reqs.delete(r),this.isActive()&&n(a)}),this.reqs.add(r)}};var Ze={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let i=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(i))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[i,s,n,r,o]=JSON.parse(t);return e({join_ref:i,ref:s,topic:n,event:r,payload:o})}},binaryEncode(t){let{join_ref:e,ref:i,event:s,topic:n,payload:r}=t,o=this.META_LENGTH+e.length+i.length+n.length+s.length,a=new ArrayBuffer(this.HEADER_LENGTH+o),h=new DataView(a),c=0;h.setUint8(c++,this.KINDS.push),h.setUint8(c++,e.length),h.setUint8(c++,i.length),h.setUint8(c++,n.length),h.setUint8(c++,s.length),Array.from(e,g=>h.setUint8(c++,g.charCodeAt(0))),Array.from(i,g=>h.setUint8(c++,g.charCodeAt(0))),Array.from(n,g=>h.setUint8(c++,g.charCodeAt(0))),Array.from(s,g=>h.setUint8(c++,g.charCodeAt(0)));var f=new Uint8Array(a.byteLength+r.byteLength);return f.set(new Uint8Array(a),0),f.set(new Uint8Array(r),a.byteLength),f.buffer},binaryDecode(t){let e=new DataView(t),i=e.getUint8(0),s=new TextDecoder;switch(i){case this.KINDS.push:return this.decodePush(t,e,s);case this.KINDS.reply:return this.decodeReply(t,e,s);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,s)}},decodePush(t,e,i){let s=e.getUint8(1),n=e.getUint8(2),r=e.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,a=i.decode(t.slice(o,o+s));o=o+s;let h=i.decode(t.slice(o,o+n));o=o+n;let c=i.decode(t.slice(o,o+r));o=o+r;let f=t.slice(o,t.byteLength);return{join_ref:a,ref:null,topic:h,event:c,payload:f}},decodeReply(t,e,i){let s=e.getUint8(1),n=e.getUint8(2),r=e.getUint8(3),o=e.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,h=i.decode(t.slice(a,a+s));a=a+s;let c=i.decode(t.slice(a,a+n));a=a+n;let f=i.decode(t.slice(a,a+r));a=a+r;let g=i.decode(t.slice(a,a+o));a=a+o;let b=t.slice(a,t.byteLength),w={status:g,response:b};return{join_ref:h,ref:c,topic:f,event:de.reply,payload:w}},decodeBroadcast(t,e,i){let s=e.getUint8(1),n=e.getUint8(2),r=this.HEADER_LENGTH+2,o=i.decode(t.slice(r,r+s));r=r+s;let a=i.decode(t.slice(r,r+n));r=r+n;let h=t.slice(r,t.byteLength);return{join_ref:null,ref:null,topic:o,event:a,payload:h}}},Nt=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||Ci,this.transport=e.transport||re.WebSocket||_e,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=e.sessionStorage||re&&re.sessionStorage,this.establishedConnections=0,this.defaultEncoder=Ze.encode.bind(Ze),this.defaultDecoder=Ze.decode.bind(Ze),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.transport!==_e?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let i=null;Pe&&Pe.addEventListener&&(Pe.addEventListener("pagehide",s=>{this.conn&&(this.disconnect(),i=this.connectClock)}),Pe.addEventListener("pageshow",s=>{i===this.connectClock&&(i=null,this.connect())}),Pe.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.rejoinAfterMs=s=>e.rejoinAfterMs?e.rejoinAfterMs(s):[1e3,2e3,5e3][s-1]||1e4,this.reconnectAfterMs=s=>e.reconnectAfterMs?e.reconnectAfterMs(s):[10,50,100,150,200,250,500,1e3,2e3][s-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(s,n,r)=>{console.log(`${s}: ${n}`,r)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=$e(e.params||{}),this.endPoint=`${t}/${pt.websocket}`,this.vsn=e.vsn||Ai,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Ht(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(()=>this.connect())},this.reconnectAfterMs),this.authToken=e.authToken}getLongPollTransport(){return _e}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=Qe.appendParams(Qe.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,i){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},e,i)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=$e(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==_e?this.connectWithFallback(_e,this.longPollFallbackMs):this.transportConnect())}log(t,e,i){this.logger&&this.logger(t,e,i)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),i=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let s=this.onMessage(n=>{n.ref===e&&(this.off([s]),t(Date.now()-i))});return!0}transportName(t){switch(t){case _e:return"LongPoll";default:return t.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${mt}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),t),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let i=!1,s=!0,n,r,o=this.transportName(t),a=h=>{this.log("transport",`falling back to ${o}...`,h),this.off([n,r]),s=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return a("memorized");this.fallbackTimer=setTimeout(a,e),r=this.onError(h=>{this.log("transport","error",h),s&&!i&&(clearTimeout(this.fallbackTimer),a(h))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(i=!0,!s){let h=this.transportName(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${h}`,"true"),this.log("transport",`established ${h} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(a,e),this.ping(h=>{this.log("transport","connected to primary after",h),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`${this.transportName(this.transport)} connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),this.stateChangeCallbacks.open.forEach(([,t])=>t())}heartbeatTimeout(){this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),Ti,"heartbeat timeout"))}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,i){if(!this.conn)return t&&t();let s=this.conn;this.waitForBufferDone(s,()=>{e?s.close(e,i||""):s.close(),this.waitForSocketClosed(s,()=>{this.conn===s&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e,i=1){if(i===5||!t.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(t,e,i+1)},150*i)}waitForSocketClosed(t,e,i=1){if(i===5||t.readyState===oe.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(t,e,i+1)},150*i)}onConnClose(t){this.conn&&(this.conn.onclose=()=>{});let e=t&&t.code;this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(),this.clearHeartbeats(),!this.closeWasClean&&e!==1e3&&this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(([,i])=>i(t))}onConnError(t){this.hasLogger()&&this.log("transport",t);let e=this.transport,i=this.establishedConnections;this.stateChangeCallbacks.error.forEach(([,s])=>{s(t,e,i)}),(e===this.transport||i>0)&&this.triggerChanError()}triggerChanError(){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(de.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case oe.connecting:return"connecting";case oe.open:return"open";case oe.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([i])=>t.indexOf(i)===-1)}channel(t,e={}){let i=new Pi(t,e,this);return this.channels.push(i),i}push(t){if(this.hasLogger()){let{topic:e,event:i,payload:s,ref:n,join_ref:r}=t;this.log("push",`${e} ${i} (${r}, ${n})`,s)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){this.pendingHeartbeatRef&&!this.isConnected()||(this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs))}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:i,event:s,payload:n,ref:r,join_ref:o}=e;r&&r===this.pendingHeartbeatRef&&(this.clearHeartbeats(),this.pendingHeartbeatRef=null,this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)),this.hasLogger()&&this.log("receive",`${n.status||""} ${i} ${s} ${r&&"("+r+")"||""}`,n);for(let a=0;ai.topic===t&&(i.isJoined()||i.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};var di="consecutive-reloads",xi=10,Ii=5e3,Li=1e4,Di=3e4,ui=["phx-click-loading","phx-change-loading","phx-submit-loading","phx-keydown-loading","phx-keyup-loading","phx-blur-loading","phx-focus-loading","phx-hook-loading"],gt="phx-drop-target-active",le="data-phx-component",Oe="data-phx-view",vt="data-phx-link",Oi="track-static",Mi="data-phx-link-state",Me="data-phx-ref-loading",ie="data-phx-ref-src",B="data-phx-ref-lock",$t="phx-pending-refs",fi="track-uploads",pe="data-phx-upload-ref",It="data-phx-preflighted-refs",Hi="data-phx-done-refs",et="drop-target",kt="data-phx-active-refs",at="phx:live-file:updated",pi="data-phx-skip",mi="data-phx-id",Ft="data-phx-prune",Ut="phx-connected",be="phx-loading",Re="phx-error",jt="phx-client-error",Fe="phx-server-error",ke="data-phx-parent-id",Lt="data-phx-main",fe="data-phx-root-id",At="viewport-top",Ct="viewport-bottom",Ni="viewport-overrun-target",$i="trigger-action",dt="phx-has-focused",Fi=["text","textarea","number","email","password","search","tel","url","date","time","datetime-local","color","range"],gi=["checkbox","radio"],Xe="phx-has-submitted",ce="data-phx-session",ze=`[${ce}]`,Tt="data-phx-sticky",Ee="data-phx-static",_t="data-phx-readonly",Le="data-phx-disabled",Bt="disable-with",ut="data-phx-disable-with-restore",Ue="hook",Ui="debounce",ji="throttle",ft="update",ht="stream",je="data-phx-stream",Dt="data-phx-portal",Ae="data-phx-teleported",ve="data-phx-teleported-src",lt="data-phx-runtime-hook",Bi="data-phx-pid",Vi="key",ae="phxPrivate",Vt="auto-recover",tt="phx:live-socket:debug",bt="phx:live-socket:profiling",wt="phx:live-socket:latency-sim",it="phx:nav-history-position",qi="progress",qt="mounted",Wt="__phoenix_reload_status__",Wi=1,Jt=3,Ji=200,Xi=500,zi="phx-",Ki=3e4,Be="debounce-trigger",Ve="throttled",Xt="debounce-prev-key",Gi={debounce:300,throttle:300},zt=[Me,ie,B],te="s",yt="r",K="c",j="k",he="kc",Kt="e",Gt="r",Yt="t",me="p",xe="stream",Yi=class{constructor(t,e,i){let{chunk_size:s,chunk_timeout:n}=e;this.liveSocket=i,this.entry=t,this.offset=0,this.chunkSize=s,this.chunkTimeout=n,this.chunkTimer=null,this.errored=!1,this.uploadChannel=i.channel(`lvu:${t.ref}`,{token:t.metadata()})}error(t){this.errored||(this.uploadChannel.leave(),this.errored=!0,clearTimeout(this.chunkTimer),this.entry.error(t))}upload(){this.uploadChannel.onError(t=>this.error(t)),this.uploadChannel.join().receive("ok",t=>this.readNextChunk()).receive("error",t=>this.error(t))}isDone(){return this.offset>=this.entry.file.size}readNextChunk(){let t=new window.FileReader,e=this.entry.file.slice(this.offset,this.chunkSize+this.offset);t.onload=i=>{if(i.target.error===null)this.offset+=i.target.result.byteLength,this.pushChunk(i.target.result);else return O("Read error: "+i.target.error)},t.readAsArrayBuffer(e)}pushChunk(t){this.uploadChannel.isJoined()&&this.uploadChannel.push("chunk",t,this.chunkTimeout).receive("ok",()=>{this.entry.progress(this.offset/this.entry.file.size*100),this.isDone()||(this.chunkTimer=setTimeout(()=>this.readNextChunk(),this.liveSocket.getLatencySim()||0))}).receive("error",({reason:e})=>this.error(e))}},O=(t,e)=>console.error&&console.error(t,e),ue=t=>{let e=typeof t;return e==="number"||e==="string"&&/^(0|[1-9]\d*)$/.test(t)};function Zi(){let t=new Set,e=document.querySelectorAll("*[id]");for(let i=0,s=e.length;i{let s=document.getElementById(i);s&&s.parentElement&&s.parentElement.getAttribute("phx-update")!=="stream"&&e.add(`The stream container with id "${s.parentElement.id}" is missing the phx-update="stream" attribute. Ensure it is set for streams to work properly.`)}),e.forEach(i=>console.error(i))}var es=(t,e,i,s)=>{t.liveSocket.isDebugEnabled()&&console.log(`${t.id} ${e}: ${i} - `,s)},qe=t=>typeof t=="function"?t:function(){return t},ct=t=>JSON.parse(JSON.stringify(t)),Se=(t,e,i)=>{do{if(t.matches(`[${e}]`)&&!t.disabled)return t;t=t.parentElement||t.parentNode}while(t!==null&&t.nodeType===1&&!(i&&i.isSameNode(t)||t.matches(ze)));return null},Ie=t=>t!==null&&typeof t=="object"&&!(t instanceof Array),ts=(t,e)=>JSON.stringify(t)===JSON.stringify(e),Zt=t=>{for(let e in t)return!1;return!0},De=(t,e)=>t&&e(t),is=function(t,e,i,s){t.forEach(n=>{new Yi(n,i.config,s).upload()})},ss=t=>{if(t.dataTransfer.types){for(let e=0;e{let s=this.getHashTargetEl(window.location.hash);s?s.scrollIntoView():e.type==="redirect"&&window.scroll(0,0)})}}else this.redirect(i)},setCookie(t,e,i){let s=typeof i=="number"?` max-age=${i};`:"";document.cookie=`${t}=${e};${s} path=/`},getCookie(t){return document.cookie.replace(new RegExp(`(?:(?:^|.*;s*)${t}s*=s*([^;]*).*$)|^.*$`),"$1")},deleteCookie(t){document.cookie=`${t}=; max-age=-1; path=/`},redirect(t,e,i=s=>{window.location.href=s}){e&&this.setCookie("__phoenix_flash__",e,60),i(t)},localKey(t,e){return`${t}-${e}`},getHashTargetEl(t){let e=t.toString().substring(1);if(e!=="")return document.getElementById(e)||document.querySelector(`a[name="${e}"]`)}},Z=ns,ye={byId(t){return document.getElementById(t)||O(`no id found for ${t}`)},removeClass(t,e){t.classList.remove(e),t.classList.length===0&&t.removeAttribute("class")},all(t,e,i){if(!t)return[];let s=Array.from(t.querySelectorAll(e));return i&&s.forEach(i),s},childNodeLength(t){let e=document.createElement("template");return e.innerHTML=t,e.content.childElementCount},isUploadInput(t){return t.type==="file"&&t.getAttribute(pe)!==null},isAutoUpload(t){return t.hasAttribute("data-phx-auto-upload")},findUploadInputs(t){let e=t.id,i=this.all(document,`input[type="file"][${pe}][form="${e}"]`);return this.all(t,`input[type="file"][${pe}]`).concat(i)},findComponentNodeList(t,e,i=document){return this.all(i,`[${Oe}="${t}"][${le}="${e}"]`)},isPhxDestroyed(t){return!!(t.id&&ye.private(t,"destroyed"))},wantsNewTab(t){let e=t.ctrlKey||t.shiftKey||t.metaKey||t.button&&t.button===1,i=t.target instanceof HTMLAnchorElement&&t.target.hasAttribute("download"),s=t.target.hasAttribute("target")&&t.target.getAttribute("target").toLowerCase()==="_blank",n=t.target.hasAttribute("target")&&!t.target.getAttribute("target").startsWith("_");return e||s||i||n},isUnloadableFormSubmit(t){return t.target&&t.target.getAttribute("method")==="dialog"||t.submitter&&t.submitter.getAttribute("formmethod")==="dialog"?!1:!t.defaultPrevented&&!this.wantsNewTab(t)},isNewPageClick(t,e){let i=t.target instanceof HTMLAnchorElement?t.target.getAttribute("href"):null,s;if(t.defaultPrevented||i===null||this.wantsNewTab(t)||i.startsWith("mailto:")||i.startsWith("tel:")||t.target.isContentEditable)return!1;try{s=new URL(i)}catch{try{s=new URL(i,e)}catch{return!0}}return s.host===e.host&&s.protocol===e.protocol&&s.pathname===e.pathname&&s.search===e.search?s.hash===""&&!s.href.endsWith("#"):s.protocol.startsWith("http")},markPhxChildDestroyed(t){this.isPhxChild(t)&&t.setAttribute(ce,""),this.putPrivate(t,"destroyed",!0)},findPhxChildrenInFragment(t,e){let i=document.createElement("template");return i.innerHTML=t,this.findPhxChildren(i.content,e)},isIgnored(t,e){return(t.getAttribute(e)||t.getAttribute("data-phx-update"))==="ignore"},isPhxUpdate(t,e,i){return t.getAttribute&&i.indexOf(t.getAttribute(e))>=0},findPhxSticky(t){return this.all(t,`[${Tt}]`)},findPhxChildren(t,e){return this.all(t,`${ze}[${ke}="${e}"]`)},findExistingParentCIDs(t,e){let i=new Set,s=new Set;return e.forEach(n=>{this.all(document,`[${Oe}="${t}"][${le}="${n}"]`).forEach(r=>{i.add(n),this.all(r,`[${Oe}="${t}"][${le}]`).map(o=>parseInt(o.getAttribute(le))).forEach(o=>s.add(o))})}),s.forEach(n=>i.delete(n)),i},private(t,e){return t[ae]&&t[ae][e]},deletePrivate(t,e){t[ae]&&delete t[ae][e]},putPrivate(t,e,i){t[ae]||(t[ae]={}),t[ae][e]=i},updatePrivate(t,e,i,s){let n=this.private(t,e);n===void 0?this.putPrivate(t,e,s(i)):this.putPrivate(t,e,s(n))},syncPendingAttrs(t,e){t.hasAttribute(ie)&&(ui.forEach(i=>{t.classList.contains(i)&&e.classList.add(i)}),zt.filter(i=>t.hasAttribute(i)).forEach(i=>{e.setAttribute(i,t.getAttribute(i))}))},copyPrivates(t,e){e[ae]&&(t[ae]=e[ae])},putTitle(t){let e=document.querySelector("title");if(e){let{prefix:i,suffix:s,default:n}=e.dataset,r=typeof t!="string"||t.trim()==="";if(r&&typeof n!="string")return;let o=r?n:t;document.title=`${i||""}${o||""}${s||""}`}else document.title=t},debounce(t,e,i,s,n,r,o,a){let h=t.getAttribute(i),c=t.getAttribute(n);h===""&&(h=s),c===""&&(c=r);let f=h||c;switch(f){case null:return a();case"blur":this.incCycle(t,"debounce-blur-cycle",()=>{o()&&a()}),this.once(t,"debounce-blur")&&t.addEventListener("blur",()=>this.triggerCycle(t,"debounce-blur-cycle"));return;default:let g=parseInt(f),b=()=>c?this.deletePrivate(t,Ve):a(),w=this.incCycle(t,Be,b);if(isNaN(g))return O(`invalid throttle/debounce value: ${f}`);if(c){let S=!1;if(e.type==="keydown"){let A=this.private(t,Xt);this.putPrivate(t,Xt,e.key),S=A!==e.key}if(!S&&this.private(t,Ve))return!1;{a();let A=setTimeout(()=>{o()&&this.triggerCycle(t,Be)},g);this.putPrivate(t,Ve,A)}}else setTimeout(()=>{o()&&this.triggerCycle(t,Be,w)},g);let p=t.form;p&&this.once(p,"bind-debounce")&&p.addEventListener("submit",()=>{Array.from(new FormData(p).entries(),([S])=>{let A=p.elements.namedItem(S),$=A instanceof RadioNodeList?A[0]:A;$&&(this.incCycle($,Be),this.deletePrivate($,Ve))})}),this.once(t,"bind-debounce")&&t.addEventListener("blur",()=>{clearTimeout(this.private(t,Ve)),this.triggerCycle(t,Be)})}},triggerCycle(t,e,i){let[s,n]=this.private(t,e);i||(i=s),i===s&&(this.incCycle(t,e),n())},once(t,e){return this.private(t,e)===!0?!1:(this.putPrivate(t,e,!0),!0)},incCycle(t,e,i=function(){}){let[s]=this.private(t,e)||[0,i];return s++,this.putPrivate(t,e,[s,i]),s},maintainPrivateHooks(t,e,i,s){t.hasAttribute&&t.hasAttribute("data-phx-hook")&&!e.hasAttribute("data-phx-hook")&&e.setAttribute("data-phx-hook",t.getAttribute("data-phx-hook")),e.hasAttribute&&(e.hasAttribute(i)||e.hasAttribute(s))&&e.setAttribute("data-phx-hook","Phoenix.InfiniteScroll")},putCustomElHook(t,e){t.isConnected?t.setAttribute("data-phx-hook",""):console.error(` + hook attached to non-connected DOM element + ensure you are calling createHook within your connectedCallback. ${t.outerHTML} + `),this.putPrivate(t,"custom-el-hook",e)},getCustomElHook(t){return this.private(t,"custom-el-hook")},isUsedInput(t){return t.nodeType===Node.ELEMENT_NODE&&(this.private(t,dt)||this.private(t,Xe))},resetForm(t){Array.from(t.elements).forEach(e=>{this.deletePrivate(e,dt),this.deletePrivate(e,Xe)})},isPhxChild(t){return t.getAttribute&&t.getAttribute(ke)},isPhxSticky(t){return t.getAttribute&&t.getAttribute(Tt)!==null},isChildOfAny(t,e){return!!e.find(i=>i.contains(t))},firstPhxChild(t){return this.isPhxChild(t)?t:this.all(t,`[${ke}]`)[0]},isPortalTemplate(t){return t.tagName==="TEMPLATE"&&t.hasAttribute(Dt)},closestViewEl(t){let e=t.closest(`[${Ae}],${ze}`);return e?e.hasAttribute(Ae)?this.byId(e.getAttribute(Ae)):e.hasAttribute(ce)?e:null:null},dispatchEvent(t,e,i={}){let s=!0;t.nodeName==="INPUT"&&t.type==="file"&&e==="click"&&(s=!1);let o={bubbles:i.bubbles===void 0?s:!!i.bubbles,cancelable:!0,detail:i.detail||{}},a=e==="click"?new MouseEvent("click",o):new CustomEvent(e,o);t.dispatchEvent(a)},cloneNode(t,e){if(typeof e>"u")return t.cloneNode(!0);{let i=t.cloneNode(!1);return i.innerHTML=e,i}},mergeAttrs(t,e,i={}){let s=new Set(i.exclude||[]),n=i.isIgnored,r=e.attributes;for(let a=r.length-1;a>=0;a--){let h=r[a].name;if(s.has(h)){if(h==="value"){let c=e.value??e.getAttribute(h);t.value===c&&t.setAttribute("value",e.getAttribute(h))}}else{let c=e.getAttribute(h);t.getAttribute(h)!==c&&(!n||n&&h.startsWith("data-"))&&t.setAttribute(h,c)}}let o=t.attributes;for(let a=o.length-1;a>=0;a--){let h=o[a].name;n?h.startsWith("data-")&&!e.hasAttribute(h)&&!zt.includes(h)&&t.removeAttribute(h):e.hasAttribute(h)||t.removeAttribute(h)}},mergeFocusedInput(t,e){t instanceof HTMLSelectElement||ye.mergeAttrs(t,e,{exclude:["value"]}),e.readOnly?t.setAttribute("readonly",!0):t.removeAttribute("readonly")},hasSelectionRange(t){return t.setSelectionRange&&(t.type==="text"||t.type==="textarea")},restoreFocus(t,e,i){if(t instanceof HTMLSelectElement&&t.focus(),!ye.isTextualInput(t))return;t.matches(":focus")||t.focus(),this.hasSelectionRange(t)&&t.setSelectionRange(e,i)},isFormInput(t){return t.localName&&customElements.get(t.localName)?customElements.get(t.localName).formAssociated:/^(?:input|select|textarea)$/i.test(t.tagName)&&t.type!=="button"},syncAttrsToProps(t){t instanceof HTMLInputElement&&gi.indexOf(t.type.toLocaleLowerCase())>=0&&(t.checked=t.getAttribute("checked")!==null)},isTextualInput(t){return Fi.indexOf(t.type)>=0},isNowTriggerFormExternal(t,e){return t.getAttribute&&t.getAttribute(e)!==null&&document.body.contains(t)},cleanChildNodes(t,e){if(ye.isPhxUpdate(t,e,["append","prepend",ht])){let i=[];t.childNodes.forEach(s=>{s.id||(!(s.nodeType===Node.TEXT_NODE&&s.nodeValue.trim()==="")&&s.nodeType!==Node.COMMENT_NODE&&O(`only HTML element tags with an id are allowed inside containers with phx-update. + +removing illegal node: "${(s.outerHTML||s.nodeValue).trim()}" + +`),i.push(s))}),i.forEach(s=>s.remove())}},replaceRootContainer(t,e,i){let s=new Set(["id",ce,Ee,Lt,fe]);if(t.tagName.toLowerCase()===e.toLowerCase())return Array.from(t.attributes).filter(n=>!s.has(n.name.toLowerCase())).forEach(n=>t.removeAttribute(n.name)),Object.keys(i).filter(n=>!s.has(n.toLowerCase())).forEach(n=>t.setAttribute(n,i[n])),t;{let n=document.createElement(e);return Object.keys(i).forEach(r=>n.setAttribute(r,i[r])),s.forEach(r=>n.setAttribute(r,t.getAttribute(r))),n.innerHTML=t.innerHTML,t.replaceWith(n),n}},getSticky(t,e,i){let s=(ye.private(t,"sticky")||[]).find(([n])=>e===n);if(s){let[n,r,o]=s;return o}else return typeof i=="function"?i():i},deleteSticky(t,e){this.updatePrivate(t,"sticky",[],i=>i.filter(([s,n])=>s!==e))},putSticky(t,e,i){let s=i(t);this.updatePrivate(t,"sticky",[],n=>{let r=n.findIndex(([o])=>e===o);return r>=0?n[r]=[e,i,s]:n.push([e,i,s]),n})},applyStickyOperations(t){let e=ye.private(t,"sticky");e&&e.forEach(([i,s,n])=>this.putSticky(t,i,s))},isLocked(t){return t.hasAttribute&&t.hasAttribute(B)},attributeIgnored(t,e){return e.some(i=>t.name==i||i==="*"||i.includes("*")&&t.name.match(i)!=null)}},u=ye,We=class{static isActive(t,e){let i=e._phxRef===void 0,n=t.getAttribute(kt).split(",").indexOf(W.genFileRef(e))>=0;return e.size>0&&(i||n)}static isPreflighted(t,e){return t.getAttribute(It).split(",").indexOf(W.genFileRef(e))>=0&&this.isActive(t,e)}static isPreflightInProgress(t){return t._preflightInProgress===!0}static markPreflightInProgress(t){t._preflightInProgress=!0}constructor(t,e,i,s){this.ref=W.genFileRef(e),this.fileEl=t,this.file=e,this.view=i,this.meta=null,this._isCancelled=!1,this._isDone=!1,this._progress=0,this._lastProgressSent=-1,this._onDone=function(){},this._onElUpdated=this.onElUpdated.bind(this),this.fileEl.addEventListener(at,this._onElUpdated),this.autoUpload=s}metadata(){return this.meta}progress(t){this._progress=Math.floor(t),this._progress>this._lastProgressSent&&(this._progress>=100?(this._progress=100,this._lastProgressSent=100,this._isDone=!0,this.view.pushFileProgress(this.fileEl,this.ref,100,()=>{W.untrackFile(this.fileEl,this.file),this._onDone()})):(this._lastProgressSent=this._progress,this.view.pushFileProgress(this.fileEl,this.ref,this._progress)))}isCancelled(){return this._isCancelled}cancel(){this.file._preflightInProgress=!1,this._isCancelled=!0,this._isDone=!0,this._onDone()}isDone(){return this._isDone}error(t="failed"){this.fileEl.removeEventListener(at,this._onElUpdated),this.view.pushFileProgress(this.fileEl,this.ref,{error:t}),this.isAutoUpload()||W.clearFiles(this.fileEl)}isAutoUpload(){return this.autoUpload}onDone(t){this._onDone=()=>{this.fileEl.removeEventListener(at,this._onElUpdated),t()}}onElUpdated(){this.fileEl.getAttribute(kt).split(",").indexOf(this.ref)===-1&&(W.untrackFile(this.fileEl,this.file),this.cancel())}toPreflightPayload(){return{last_modified:this.file.lastModified,name:this.file.name,relative_path:this.file.webkitRelativePath,size:this.file.size,type:this.file.type,ref:this.ref,meta:typeof this.file.meta=="function"?this.file.meta():void 0}}uploader(t){if(this.meta.uploader){let e=t[this.meta.uploader]||O(`no uploader configured for ${this.meta.uploader}`);return{name:this.meta.uploader,callback:e}}else return{name:"channel",callback:is}}zipPostFlight(t){this.meta=t.entries[this.ref],this.meta||O(`no preflight upload response returned with ref ${this.ref}`,{input:this.fileEl,response:t})}},rs=0,W=class Pt{static genFileRef(e){let i=e._phxRef;return i!==void 0?i:(e._phxRef=(rs++).toString(),e._phxRef)}static getEntryDataURL(e,i,s){let n=this.activeFiles(e).find(r=>this.genFileRef(r)===i);s(URL.createObjectURL(n))}static hasUploadsInProgress(e){let i=0;return u.findUploadInputs(e).forEach(s=>{s.getAttribute(It)!==s.getAttribute(Hi)&&i++}),i>0}static serializeUploads(e){let i=this.activeFiles(e),s={};return i.forEach(n=>{let r={path:e.name},o=e.getAttribute(pe);s[o]=s[o]||[],r.ref=this.genFileRef(n),r.last_modified=n.lastModified,r.name=n.name||r.ref,r.relative_path=n.webkitRelativePath,r.type=n.type,r.size=n.size,typeof n.meta=="function"&&(r.meta=n.meta()),s[o].push(r)}),s}static clearFiles(e){e.value=null,e.removeAttribute(pe),u.putPrivate(e,"files",[])}static untrackFile(e,i){u.putPrivate(e,"files",u.private(e,"files").filter(s=>!Object.is(s,i)))}static trackFiles(e,i,s){if(e.getAttribute("multiple")!==null){let n=i.filter(r=>!this.activeFiles(e).find(o=>Object.is(o,r)));u.updatePrivate(e,"files",[],r=>r.concat(n)),e.value=null}else s&&s.files.length>0&&(e.files=s.files),u.putPrivate(e,"files",i)}static activeFileInputs(e){let i=u.findUploadInputs(e);return Array.from(i).filter(s=>s.files&&this.activeFiles(s).length>0)}static activeFiles(e){return(u.private(e,"files")||[]).filter(i=>We.isActive(e,i))}static inputsAwaitingPreflight(e){let i=u.findUploadInputs(e);return Array.from(i).filter(s=>this.filesAwaitingPreflight(s).length>0)}static filesAwaitingPreflight(e){return this.activeFiles(e).filter(i=>!We.isPreflighted(e,i)&&!We.isPreflightInProgress(i))}static markPreflightInProgress(e){e.forEach(i=>We.markPreflightInProgress(i.file))}constructor(e,i,s){this.autoUpload=u.isAutoUpload(e),this.view=i,this.onComplete=s,this._entries=Array.from(Pt.filesAwaitingPreflight(e)||[]).map(n=>new We(e,n,i,this.autoUpload)),Pt.markPreflightInProgress(this._entries),this.numEntriesInProgress=this._entries.length}isAutoUpload(){return this.autoUpload}entries(){return this._entries}initAdapterUpload(e,i,s){this._entries=this._entries.map(r=>(r.isCancelled()?(this.numEntriesInProgress--,this.numEntriesInProgress===0&&this.onComplete()):(r.zipPostFlight(e),r.onDone(()=>{this.numEntriesInProgress--,this.numEntriesInProgress===0&&this.onComplete()})),r));let n=this._entries.reduce((r,o)=>{if(!o.meta)return r;let{name:a,callback:h}=o.uploader(s.uploaders);return r[a]=r[a]||{callback:h,entries:[]},r[a].entries.push(o),r},{});for(let r in n){let{callback:o,entries:a}=n[r];o(a,i,e,s)}}},os={anyOf(t,e){return e.find(i=>t instanceof i)},isFocusable(t,e){return t instanceof HTMLAnchorElement&&t.rel!=="ignore"||t instanceof HTMLAreaElement&&t.href!==void 0||!t.disabled&&this.anyOf(t,[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement,HTMLButtonElement])||t instanceof HTMLIFrameElement||t.tabIndex>=0&&t.getAttribute("aria-hidden")!=="true"||!e&&t.getAttribute("tabindex")!==null&&t.getAttribute("aria-hidden")!=="true"},attemptFocus(t,e){if(this.isFocusable(t,e))try{t.focus()}catch{}return!!document.activeElement&&document.activeElement.isSameNode(t)},focusFirstInteractive(t){let e=t.firstElementChild;for(;e;){if(this.attemptFocus(e,!0)||this.focusFirstInteractive(e))return!0;e=e.nextElementSibling}},focusFirst(t){let e=t.firstElementChild;for(;e;){if(this.attemptFocus(e)||this.focusFirst(e))return!0;e=e.nextElementSibling}},focusLast(t){let e=t.lastElementChild;for(;e;){if(this.attemptFocus(e)||this.focusLast(e))return!0;e=e.previousElementSibling}}},ee=os,vi={LiveFileUpload:{activeRefs(){return this.el.getAttribute(kt)},preflightedRefs(){return this.el.getAttribute(It)},mounted(){this.js().ignoreAttributes(this.el,["value"]),this.preflightedWas=this.preflightedRefs()},updated(){let t=this.preflightedRefs();this.preflightedWas!==t&&(this.preflightedWas=t,t===""&&this.__view().cancelSubmit(this.el.form)),this.activeRefs()===""&&(this.el.value=null),this.el.dispatchEvent(new CustomEvent(at))}},LiveImgPreview:{mounted(){this.ref=this.el.getAttribute("data-phx-entry-ref"),this.inputEl=document.getElementById(this.el.getAttribute(pe)),W.getEntryDataURL(this.inputEl,this.ref,t=>{this.url=t,this.el.src=t})},destroyed(){URL.revokeObjectURL(this.url)}},FocusWrap:{mounted(){this.focusStart=this.el.firstElementChild,this.focusEnd=this.el.lastElementChild,this.focusStart.addEventListener("focus",t=>{if(!t.relatedTarget||!this.el.contains(t.relatedTarget)){let e=t.target.nextElementSibling;ee.attemptFocus(e)||ee.focusFirst(e)}else ee.focusLast(this.el)}),this.focusEnd.addEventListener("focus",t=>{if(!t.relatedTarget||!this.el.contains(t.relatedTarget)){let e=t.target.previousElementSibling;ee.attemptFocus(e)||ee.focusLast(e)}else ee.focusFirst(this.el)}),this.el.contains(document.activeElement)||(this.el.addEventListener("phx:show-end",()=>this.el.focus()),window.getComputedStyle(this.el).display!=="none"&&ee.focusFirst(this.el))}}},bi=t=>["HTML","BODY"].indexOf(t.nodeName.toUpperCase())>=0?null:["scroll","auto"].indexOf(getComputedStyle(t).overflowY)>=0?t:bi(t.parentElement),Qt=t=>t?t.scrollTop:document.documentElement.scrollTop||document.body.scrollTop,Ot=t=>t?t.getBoundingClientRect().bottom:window.innerHeight||document.documentElement.clientHeight,Mt=t=>t?t.getBoundingClientRect().top:0,as=(t,e)=>{let i=t.getBoundingClientRect();return Math.ceil(i.top)>=Mt(e)&&Math.ceil(i.left)>=0&&Math.floor(i.top)<=Ot(e)},hs=(t,e)=>{let i=t.getBoundingClientRect();return Math.ceil(i.bottom)>=Mt(e)&&Math.ceil(i.left)>=0&&Math.floor(i.bottom)<=Ot(e)},ei=(t,e)=>{let i=t.getBoundingClientRect();return Math.ceil(i.top)>=Mt(e)&&Math.ceil(i.left)>=0&&Math.floor(i.top)<=Ot(e)};vi.InfiniteScroll={mounted(){this.scrollContainer=bi(this.el);let t=Qt(this.scrollContainer),e=!1,i=500,s=null,n=this.throttle(i,(a,h)=>{s=()=>!0,this.liveSocket.js().push(this.el,a,{value:{id:h.id,_overran:!0},callback:()=>{s=null}})}),r=this.throttle(i,(a,h)=>{s=()=>h.scrollIntoView({block:"start"}),this.liveSocket.js().push(this.el,a,{value:{id:h.id},callback:()=>{s=null,window.requestAnimationFrame(()=>{ei(h,this.scrollContainer)||h.scrollIntoView({block:"start"})})}})}),o=this.throttle(i,(a,h)=>{s=()=>h.scrollIntoView({block:"end"}),this.liveSocket.js().push(this.el,a,{value:{id:h.id},callback:()=>{s=null,window.requestAnimationFrame(()=>{ei(h,this.scrollContainer)||h.scrollIntoView({block:"end"})})}})});this.onScroll=a=>{let h=Qt(this.scrollContainer);if(s)return t=h,s();let c=this.findOverrunTarget(),f=this.el.getAttribute(this.liveSocket.binding("viewport-top")),g=this.el.getAttribute(this.liveSocket.binding("viewport-bottom")),b=this.el.lastElementChild,w=this.el.firstElementChild,p=ht;p&&f&&!e&&c.top>=0?(e=!0,n(f,w)):S&&e&&c.top<=0&&(e=!1),f&&p&&as(w,this.scrollContainer)?r(f,w):g&&S&&hs(b,this.scrollContainer)&&o(g,b),t=h},this.scrollContainer?this.scrollContainer.addEventListener("scroll",this.onScroll):window.addEventListener("scroll",this.onScroll)},destroyed(){this.scrollContainer?this.scrollContainer.removeEventListener("scroll",this.onScroll):window.removeEventListener("scroll",this.onScroll)},throttle(t,e){let i=0,s;return(...n)=>{let r=Date.now(),o=t-(r-i);o<=0||o>t?(s&&(clearTimeout(s),s=null),i=r,e(...n)):s||(s=setTimeout(()=>{i=Date.now(),s=null,e(...n)},o))}},findOverrunTarget(){let t,e=this.el.getAttribute(this.liveSocket.binding(Ni));if(e){let i=document.getElementById(e);if(i)t=i.getBoundingClientRect();else throw new Error("did not find element with id "+e)}else t=this.el.getBoundingClientRect();return t}};var ls=vi,Rt=class{static onUnlock(t,e){if(!u.isLocked(t)&&!t.closest(`[${B}]`))return e();let i=t.closest(`[${B}]`),s=i.closest(`[${B}]`).getAttribute(B);i.addEventListener(`phx:undo-lock:${s}`,()=>{e()},{once:!0})}constructor(t){this.el=t,this.loadingRef=t.hasAttribute(Me)?parseInt(t.getAttribute(Me),10):null,this.lockRef=t.hasAttribute(B)?parseInt(t.getAttribute(B),10):null}maybeUndo(t,e,i){if(!this.isWithin(t)){u.updatePrivate(this.el,$t,[],s=>(s.push(t),s));return}this.undoLocks(t,e,i),this.undoLoading(t,e),u.updatePrivate(this.el,$t,[],s=>s.filter(n=>{let r={detail:{ref:n,event:e},bubbles:!0,cancelable:!1};return this.loadingRef&&this.loadingRef>n&&this.el.dispatchEvent(new CustomEvent(`phx:undo-loading:${n}`,r)),this.lockRef&&this.lockRef>n&&this.el.dispatchEvent(new CustomEvent(`phx:undo-lock:${n}`,r)),n>t})),this.isFullyResolvedBy(t)&&this.el.removeAttribute(ie)}isWithin(t){return!(this.loadingRef!==null&&this.loadingRef>t&&this.lockRef!==null&&this.lockRef>t)}undoLocks(t,e,i){if(!this.isLockUndoneBy(t))return;let s=u.private(this.el,B);s&&(i(s),u.deletePrivate(this.el,B)),this.el.removeAttribute(B);let n={detail:{ref:t,event:e},bubbles:!0,cancelable:!1};this.el.dispatchEvent(new CustomEvent(`phx:undo-lock:${this.lockRef}`,n))}undoLoading(t,e){if(!this.isLoadingUndoneBy(t)){this.canUndoLoading(t)&&this.el.classList.contains("phx-submit-loading")&&this.el.classList.remove("phx-change-loading");return}if(this.canUndoLoading(t)){this.el.removeAttribute(Me);let i=this.el.getAttribute(Le),s=this.el.getAttribute(_t);s!==null&&(this.el.readOnly=s==="true",this.el.removeAttribute(_t)),i!==null&&(this.el.disabled=i==="true",this.el.removeAttribute(Le));let n=this.el.getAttribute(ut);n!==null&&(this.el.textContent=n,this.el.removeAttribute(ut));let r={detail:{ref:t,event:e},bubbles:!0,cancelable:!1};this.el.dispatchEvent(new CustomEvent(`phx:undo-loading:${this.loadingRef}`,r))}ui.forEach(i=>{(i!=="phx-submit-loading"||this.canUndoLoading(t))&&u.removeClass(this.el,i)})}isLoadingUndoneBy(t){return this.loadingRef===null?!1:this.loadingRef<=t}isLockUndoneBy(t){return this.lockRef===null?!1:this.lockRef<=t}isFullyResolvedBy(t){return(this.loadingRef===null||this.loadingRef<=t)&&(this.lockRef===null||this.lockRef<=t)}canUndoLoading(t){return this.lockRef===null||this.lockRef<=t}},cs=class{constructor(t,e,i){let s=new Set,n=new Set([...e.children].map(o=>o.id)),r=[];Array.from(t.children).forEach(o=>{if(o.id&&(s.add(o.id),n.has(o.id))){let a=o.previousElementSibling&&o.previousElementSibling.id;r.push({elementId:o.id,previousElementId:a})}}),this.containerId=e.id,this.updateType=i,this.elementsToModify=r,this.elementIdsToAdd=[...n].filter(o=>!s.has(o))}perform(){let t=u.byId(this.containerId);t&&(this.elementsToModify.forEach(e=>{e.previousElementId?De(document.getElementById(e.previousElementId),i=>{De(document.getElementById(e.elementId),s=>{s.previousElementSibling&&s.previousElementSibling.id==i.id||i.insertAdjacentElement("afterend",s)})}):De(document.getElementById(e.elementId),i=>{i.previousElementSibling==null||t.insertAdjacentElement("afterbegin",i)})}),this.updateType=="prepend"&&this.elementIdsToAdd.reverse().forEach(e=>{De(document.getElementById(e),i=>t.insertAdjacentElement("afterbegin",i))}))}},ti=11;function ds(t,e){var i=e.attributes,s,n,r,o,a;if(!(e.nodeType===ti||t.nodeType===ti)){for(var h=i.length-1;h>=0;h--)s=i[h],n=s.name,r=s.namespaceURI,o=s.value,r?(n=s.localName||n,a=t.getAttributeNS(r,n),a!==o&&(s.prefix==="xmlns"&&(n=s.name),t.setAttributeNS(r,n,o))):(a=t.getAttribute(n),a!==o&&t.setAttribute(n,o));for(var c=t.attributes,f=c.length-1;f>=0;f--)s=c[f],n=s.name,r=s.namespaceURI,r?(n=s.localName||n,e.hasAttributeNS(r,n)||t.removeAttributeNS(r,n)):e.hasAttribute(n)||t.removeAttribute(n)}}var st,us="http://www.w3.org/1999/xhtml",G=typeof document>"u"?void 0:document,fs=!!G&&"content"in G.createElement("template"),ps=!!G&&G.createRange&&"createContextualFragment"in G.createRange();function ms(t){var e=G.createElement("template");return e.innerHTML=t,e.content.childNodes[0]}function gs(t){st||(st=G.createRange(),st.selectNode(G.body));var e=st.createContextualFragment(t);return e.childNodes[0]}function vs(t){var e=G.createElement("body");return e.innerHTML=t,e.childNodes[0]}function bs(t){return t=t.trim(),fs?ms(t):ps?gs(t):vs(t)}function nt(t,e){var i=t.nodeName,s=e.nodeName,n,r;return i===s?!0:(n=i.charCodeAt(0),r=s.charCodeAt(0),n<=90&&r>=97?i===s.toUpperCase():r<=90&&n>=97?s===i.toUpperCase():!1)}function ws(t,e){return!e||e===us?G.createElement(t):G.createElementNS(e,t)}function ys(t,e){for(var i=t.firstChild;i;){var s=i.nextSibling;e.appendChild(i),i=s}return e}function St(t,e,i){t[i]!==e[i]&&(t[i]=e[i],t[i]?t.setAttribute(i,""):t.removeAttribute(i))}var ii={OPTION:function(t,e){var i=t.parentNode;if(i){var s=i.nodeName.toUpperCase();s==="OPTGROUP"&&(i=i.parentNode,s=i&&i.nodeName.toUpperCase()),s==="SELECT"&&!i.hasAttribute("multiple")&&(t.hasAttribute("selected")&&!e.selected&&(t.setAttribute("selected","selected"),t.removeAttribute("selected")),i.selectedIndex=-1)}St(t,e,"selected")},INPUT:function(t,e){St(t,e,"checked"),St(t,e,"disabled"),t.value!==e.value&&(t.value=e.value),e.hasAttribute("value")||t.removeAttribute("value")},TEXTAREA:function(t,e){var i=e.value;t.value!==i&&(t.value=i);var s=t.firstChild;if(s){var n=s.nodeValue;if(n==i||!i&&n==t.placeholder)return;s.nodeValue=i}},SELECT:function(t,e){if(!e.hasAttribute("multiple")){for(var i=-1,s=0,n=t.firstChild,r,o;n;)if(o=n.nodeName&&n.nodeName.toUpperCase(),o==="OPTGROUP")r=n,n=r.firstChild,n||(n=r.nextSibling,r=null);else{if(o==="OPTION"){if(n.hasAttribute("selected")){i=s;break}s++}n=n.nextSibling,!n&&r&&(n=r.nextSibling,r=null)}t.selectedIndex=i}}},Je=1,si=11,ni=3,ri=8;function ge(){}function Ss(t){if(t)return t.getAttribute&&t.getAttribute("id")||t.id}function Es(t){return function(i,s,n){if(n||(n={}),typeof s=="string")if(i.nodeName==="#document"||i.nodeName==="HTML"){var r=s;s=G.createElement("html"),s.innerHTML=r}else if(i.nodeName==="BODY"){var o=s;s=G.createElement("html"),s.innerHTML=o;var a=s.querySelector("body");a&&(s=a)}else s=bs(s);else s.nodeType===si&&(s=s.firstElementChild);var h=n.getNodeKey||Ss,c=n.onBeforeNodeAdded||ge,f=n.onNodeAdded||ge,g=n.onBeforeElUpdated||ge,b=n.onElUpdated||ge,w=n.onBeforeNodeDiscarded||ge,p=n.onNodeDiscarded||ge,S=n.onBeforeElChildrenUpdated||ge,A=n.skipFromChildren||ge,$=n.addChild||function(E,C){return E.appendChild(C)},J=n.childrenOnly===!0,T=Object.create(null),R=[];function L(E){R.push(E)}function V(E,C){if(E.nodeType===Je)for(var H=E.firstChild;H;){var P=void 0;C&&(P=h(H))?L(P):(p(H),H.firstChild&&V(H,C)),H=H.nextSibling}}function m(E,C,H){w(E)!==!1&&(C&&C.removeChild(E),p(E),V(E,H))}function y(E){if(E.nodeType===Je||E.nodeType===si)for(var C=E.firstChild;C;){var H=h(C);H&&(T[H]=C),y(C),C=C.nextSibling}}y(i);function F(E){f(E);for(var C=E.firstChild;C;){var H=C.nextSibling,P=h(C);if(P){var l=T[P];l&&nt(C,l)?(C.parentNode.replaceChild(l,C),M(l,C)):F(C)}else F(C);C=H}}function z(E,C,H){for(;C;){var P=C.nextSibling;(H=h(C))?L(H):m(C,E,!0),C=P}}function M(E,C,H){var P=h(C);if(P&&delete T[P],!H){var l=g(E,C);if(l===!1||(l instanceof HTMLElement&&(E=l,y(E)),t(E,C),b(E),S(E,C)===!1))return}E.nodeName!=="TEXTAREA"?X(E,C):ii.TEXTAREA(E,C)}function X(E,C){var H=A(E,C),P=C.firstChild,l=E.firstChild,d,v,k,_,D;e:for(;P;){for(_=P.nextSibling,d=h(P);!H&&l;){if(k=l.nextSibling,P.isSameNode&&P.isSameNode(l)){P=_,l=k;continue e}v=h(l);var N=l.nodeType,U=void 0;if(N===P.nodeType&&(N===Je?(d?d!==v&&((D=T[d])?k===D?U=!1:(E.insertBefore(D,l),v?L(v):m(l,E,!0),l=D,v=h(l)):U=!1):v&&(U=!1),U=U!==!1&&nt(l,P),U&&M(l,P)):(N===ni||N==ri)&&(U=!0,l.nodeValue!==P.nodeValue&&(l.nodeValue=P.nodeValue))),U){P=_,l=k;continue e}v?L(v):m(l,E,!0),l=k}if(d&&(D=T[d])&&nt(D,P))H||$(E,D),M(D,P);else{var q=c(P);q!==!1&&(q&&(P=q),P.actualize&&(P=P.actualize(E.ownerDocument||G)),$(E,P),F(P))}P=_,l=k}z(E,l,v);var se=ii[E.nodeName];se&&se(E,C)}var I=i,Y=I.nodeType,Ke=s.nodeType;if(!J){if(Y===Je)Ke===Je?nt(i,s)||(p(i),I=ys(i,ws(s.nodeName,s.namespaceURI))):I=s;else if(Y===ni||Y===ri){if(Ke===Y)return I.nodeValue!==s.nodeValue&&(I.nodeValue=s.nodeValue),I;I=s}}if(I===s)p(i);else{if(s.isSameNode&&s.isSameNode(I))return;if(M(I,s,J),R)for(var Ce=0,Ge=R.length;Cei(...e))}trackAfter(t,...e){this.callbacks[`after${t}`].forEach(i=>i(...e))}markPrunableContentForRemoval(){let t=this.liveSocket.binding(ft);u.all(this.container,`[${t}=append] > *, [${t}=prepend] > *`,e=>{e.setAttribute(Ft,"")})}perform(t){let{view:e,liveSocket:i,html:s,container:n}=this,r=this.targetContainer;if(this.isCIDPatch()&&!this.targetContainer)return;if(this.isCIDPatch()){let T=r.closest(`[${B}]`);if(T&&!T.isSameNode(r)){let R=u.private(T,B);R&&(r=R.querySelector(`[data-phx-component="${this.targetCID}"]`))}}let o=i.getActiveElement(),{selectionStart:a,selectionEnd:h}=o&&u.hasSelectionRange(o)?o:{},c=i.binding(ft),f=i.binding(At),g=i.binding(Ct),b=i.binding($i),w=[],p=[],S=[],A=[],$=null,J=(T,R,L=this.withChildren)=>{let V={childrenOnly:T.getAttribute(le)===null&&!L,getNodeKey:m=>u.isPhxDestroyed(m)?null:t?m.id:m.id||m.getAttribute&&m.getAttribute(mi),skipFromChildren:m=>m.getAttribute(c)===ht,addChild:(m,y)=>{let{ref:F,streamAt:z}=this.getStreamInsert(y);if(F===void 0)return m.appendChild(y);if(this.setStreamRef(y,F),z===0)m.insertAdjacentElement("afterbegin",y);else if(z===-1){let M=m.lastElementChild;if(M&&!M.hasAttribute(je)){let X=Array.from(m.children).find(I=>!I.hasAttribute(je));m.insertBefore(y,X)}else m.appendChild(y)}else if(z>0){let M=Array.from(m.children)[z];m.insertBefore(y,M)}},onBeforeNodeAdded:m=>{if(this.getStreamInsert(m)?.updateOnly&&!this.streamComponentRestore[m.id])return!1;u.maintainPrivateHooks(m,m,f,g),this.trackBefore("added",m);let y=m;return this.streamComponentRestore[m.id]&&(y=this.streamComponentRestore[m.id],delete this.streamComponentRestore[m.id],J(y,m,!0)),y},onNodeAdded:m=>{m.getAttribute&&this.maybeReOrderStream(m,!0),u.isPortalTemplate(m)&&A.push(()=>this.teleport(m,J)),m instanceof HTMLImageElement&&m.srcset?m.srcset=m.srcset:m instanceof HTMLVideoElement&&m.autoplay&&m.play(),u.isNowTriggerFormExternal(m,b)&&($=m),(u.isPhxChild(m)&&e.ownsElement(m)||u.isPhxSticky(m)&&e.ownsElement(m.parentNode))&&this.trackAfter("phxChildAdded",m),m.nodeName==="SCRIPT"&&m.hasAttribute(lt)&&this.handleRuntimeHook(m,R),w.push(m)},onNodeDiscarded:m=>this.onNodeDiscarded(m),onBeforeNodeDiscarded:m=>{if(m.getAttribute&&m.getAttribute(Ft)!==null)return!0;if(m.parentElement!==null&&m.id&&u.isPhxUpdate(m.parentElement,c,[ht,"append","prepend"])||m.getAttribute&&m.getAttribute(Ae)||this.maybePendingRemove(m)||this.skipCIDSibling(m))return!1;if(u.isPortalTemplate(m)){let y=document.getElementById(m.content.firstElementChild.id);y&&(y.remove(),V.onNodeDiscarded(y),this.view.dropPortalElementId(y.id))}return!0},onElUpdated:m=>{u.isNowTriggerFormExternal(m,b)&&($=m),p.push(m),this.maybeReOrderStream(m,!1)},onBeforeElUpdated:(m,y)=>{if(m.id&&m.isSameNode(T)&&m.id!==y.id)return V.onNodeDiscarded(m),m.replaceWith(y),V.onNodeAdded(y);if(u.syncPendingAttrs(m,y),u.maintainPrivateHooks(m,y,f,g),u.cleanChildNodes(y,c),this.skipCIDSibling(y))return this.maybeReOrderStream(m),!1;if(u.isPhxSticky(m))return[ce,Ee,fe].map(M=>[M,m.getAttribute(M),y.getAttribute(M)]).forEach(([M,X,I])=>{I&&X!==I&&m.setAttribute(M,I)}),!1;if(u.isIgnored(m,c)||m.form&&m.form.isSameNode($))return this.trackBefore("updated",m,y),u.mergeAttrs(m,y,{isIgnored:u.isIgnored(m,c)}),p.push(m),u.applyStickyOperations(m),!1;if(m.type==="number"&&m.validity&&m.validity.badInput)return!1;let F=o&&m.isSameNode(o)&&u.isFormInput(m),z=F&&this.isChangedSelect(m,y);if(m.hasAttribute(ie)){let M=new Rt(m);if(M.lockRef&&(!this.undoRef||!M.isLockUndoneBy(this.undoRef))){u.applyStickyOperations(m);let I=m.hasAttribute(B)?u.private(m,B)||m.cloneNode(!0):null;I&&(u.putPrivate(m,B,I),F||(m=I))}}if(u.isPhxChild(y)){let M=m.getAttribute(ce);return u.mergeAttrs(m,y,{exclude:[Ee]}),M!==""&&m.setAttribute(ce,M),m.setAttribute(fe,this.rootID),u.applyStickyOperations(m),!1}return this.undoRef&&u.private(y,B)&&u.putPrivate(m,B,u.private(y,B)),u.copyPrivates(y,m),u.isPortalTemplate(y)?(A.push(()=>this.teleport(y,J)),m.content.replaceChildren(y.content.cloneNode(!0)),!1):F&&m.type!=="hidden"&&!z?(this.trackBefore("updated",m,y),u.mergeFocusedInput(m,y),u.syncAttrsToProps(m),p.push(m),u.applyStickyOperations(m),!1):(z&&m.blur(),u.isPhxUpdate(y,c,["append","prepend"])&&S.push(new cs(m,y,y.getAttribute(c))),u.syncAttrsToProps(y),u.applyStickyOperations(y),this.trackBefore("updated",m,y),m)}};xt(T,R,V)};if(this.trackBefore("added",n),this.trackBefore("updated",n,n),i.time("morphdom",()=>{this.streams.forEach(([R,L,V,m])=>{L.forEach(([y,F,z,M])=>{this.streamInserts[y]={ref:R,streamAt:F,limit:z,reset:m,updateOnly:M}}),m!==void 0&&u.all(document,`[${je}="${R}"]`,y=>{this.removeStreamChildElement(y)}),V.forEach(y=>{let F=document.getElementById(y);F&&this.removeStreamChildElement(F)})}),t&&u.all(this.container,`[${c}=${ht}]`).filter(R=>this.view.ownsElement(R)).forEach(R=>{Array.from(R.children).forEach(L=>{this.removeStreamChildElement(L,!0)})}),J(r,s);let T=0;for(;A.length>0&&T<5;){let R=A.slice();A=[],R.forEach(L=>L()),T++}this.view.portalElementIds.forEach(R=>{let L=document.getElementById(R);L&&(document.getElementById(L.getAttribute(ve))||(L.remove(),this.onNodeDiscarded(L),this.view.dropPortalElementId(R)))})}),i.isDebugEnabled()&&(Zi(),Qi(this.streamInserts),Array.from(document.querySelectorAll("input[name=id]")).forEach(T=>{T instanceof HTMLInputElement&&T.form&&console.error(`Detected an input with name="id" inside a form! This will cause problems when patching the DOM. +`,T)})),S.length>0&&i.time("post-morph append/prepend restoration",()=>{S.forEach(T=>T.perform())}),i.silenceEvents(()=>u.restoreFocus(o,a,h)),u.dispatchEvent(document,"phx:update"),w.forEach(T=>this.trackAfter("added",T)),p.forEach(T=>this.trackAfter("updated",T)),this.transitionPendingRemoves(),$){i.unload();let T=u.private($,"submitter");if(T&&T.name&&r.contains(T)){let R=document.createElement("input");R.type="hidden";let L=T.getAttribute("form");L&&R.setAttribute("form",L),R.name=T.name,R.value=T.value,T.parentElement.insertBefore(R,T)}Object.getPrototypeOf($).submit.call($)}return!0}onNodeDiscarded(t){(u.isPhxChild(t)||u.isPhxSticky(t))&&this.liveSocket.destroyViewByEl(t),this.trackAfter("discarded",t)}maybePendingRemove(t){return t.getAttribute&&t.getAttribute(this.phxRemove)!==null?(this.pendingRemoves.push(t),!0):!1}removeStreamChildElement(t,e=!1){!e&&!this.view.ownsElement(t)||(this.streamInserts[t.id]?(this.streamComponentRestore[t.id]=t,t.remove()):this.maybePendingRemove(t)||(t.remove(),this.onNodeDiscarded(t)))}getStreamInsert(t){return(t.id?this.streamInserts[t.id]:{})||{}}setStreamRef(t,e){u.putSticky(t,je,i=>i.setAttribute(je,e))}maybeReOrderStream(t,e){let{ref:i,streamAt:s,reset:n}=this.getStreamInsert(t);if(s!==void 0&&(this.setStreamRef(t,i),!(!n&&!e)&&t.parentElement)){if(s===0)t.parentElement.insertBefore(t,t.parentElement.firstElementChild);else if(s>0){let r=Array.from(t.parentElement.children),o=r.indexOf(t);if(s>=r.length-1)t.parentElement.appendChild(t);else{let a=r[s];o>s?t.parentElement.insertBefore(t,a):t.parentElement.insertBefore(t,a.nextElementSibling)}}this.maybeLimitStream(t)}}maybeLimitStream(t){let{limit:e}=this.getStreamInsert(t),i=e!==null&&Array.from(t.parentElement.children);e&&e<0&&i.length>e*-1?i.slice(0,i.length+e).forEach(s=>this.removeStreamChildElement(s)):e&&e>=0&&i.length>e&&i.slice(e).forEach(s=>this.removeStreamChildElement(s))}transitionPendingRemoves(){let{pendingRemoves:t,liveSocket:e}=this;t.length>0&&e.transitionRemoves(t,()=>{t.forEach(i=>{let s=u.firstPhxChild(i);s&&e.destroyViewByEl(s),i.remove()}),this.trackAfter("transitionsDiscarded",t)})}isChangedSelect(t,e){return!(t instanceof HTMLSelectElement)||t.multiple?!1:t.options.length!==e.options.length?!0:(e.value=t.value,!t.isEqualNode(e))}isCIDPatch(){return this.cidPatch}skipCIDSibling(t){return t.nodeType===Node.ELEMENT_NODE&&t.hasAttribute(pi)}targetCIDContainer(t){if(!this.isCIDPatch())return;let[e,...i]=u.findComponentNodeList(this.view.id,this.targetCID);return i.length===0&&u.childNodeLength(t)===1?e:e&&e.parentNode}indexOf(t,e){return Array.from(t.children).indexOf(e)}teleport(t,e){let i=t.getAttribute(Dt),s=document.querySelector(i);if(!s)throw new Error("portal target with selector "+i+" not found");let n=t.content.firstElementChild;if(this.skipCIDSibling(n))return;if(!n?.id)throw new Error("phx-portal template must have a single root element with ID!");let r=document.getElementById(n.id),o;r?(s.contains(r)||s.appendChild(r),o=r):(o=document.createElement(n.tagName),s.appendChild(o)),n.setAttribute(Ae,this.view.id),n.setAttribute(ve,t.id),e(o,n,!0),n.removeAttribute(Ae),n.removeAttribute(ve),this.view.pushPortalElementId(n.id)}handleRuntimeHook(t,e){let i=t.getAttribute(lt),s=t.hasAttribute("nonce")?t.getAttribute("nonce"):null;if(t.hasAttribute("nonce")){let r=document.createElement("template");r.innerHTML=e,s=r.content.querySelector(`script[${lt}="${CSS.escape(i)}"]`).getAttribute("nonce")}let n=document.createElement("script");n.textContent=t.textContent,u.mergeAttrs(n,t,{isIgnored:!1}),s&&(n.nonce=s),t.replaceWith(n),t=n}},As=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),Cs=new Set(["'",'"']),oi=(t,e,i)=>{let s=0,n=!1,r,o,a,h,c,f,g=t.match(/^(\s*(?:\s*)*)<([^\s\/>]+)/);if(g===null)throw new Error(`malformed html ${t}`);for(s=g[0].length,r=g[1],a=g[2],h=s,s;s";s++)if(t.charAt(s)==="="){let p=t.slice(s-3,s)===" id";s++;let S=t.charAt(s);if(Cs.has(S)){let A=s;for(s++,s;s=r.length+a.length;){let p=t.charAt(b);if(n)p==="-"&&t.slice(b-3,b)===""&&t.slice(b-2,b)==="--")n=!0,b-=3;else{if(p===">")break;b-=1}}o=t.slice(b+1,t.length);let w=Object.keys(e).map(p=>e[p]===!0?p:`${p}="${e[p]}"`).join(" ");if(i){let p=c?` id="${c}"`:"";As.has(a)?f=`<${a}${p}${w===""?"":" "}${w}/>`:f=`<${a}${p}${w===""?"":" "}${w}>`}else{let p=t.slice(h,b+1);f=`<${a}${w===""?"":" "}${w}${p}`}return[f,r,o]},ai=class{static extract(t){let{[Gt]:e,[Kt]:i,[Yt]:s}=t;return delete t[Gt],delete t[Kt],delete t[Yt],{diff:t,title:s,reply:e||null,events:i||[]}}constructor(t,e){this.viewId=t,this.rendered={},this.magicId=0,this.mergeDiff(e)}parentViewId(){return this.viewId}toString(t){let{buffer:e,streams:i}=this.recursiveToString(this.rendered,this.rendered[K],t,!0,{});return{buffer:e,streams:i}}recursiveToString(t,e=t[K],i,s,n){i=i?new Set(i):null;let r={buffer:"",components:e,onlyCids:i,streams:new Set};return this.toOutputBuffer(t,null,r,s,n),{buffer:r.buffer,streams:r.streams}}componentCIDs(t){return Object.keys(t[K]||{}).map(e=>parseInt(e))}isComponentOnlyDiff(t){return t[K]?Object.keys(t).length===1:!1}getComponent(t,e){return t[K][e]}resetRender(t){this.rendered[K][t]&&(this.rendered[K][t].reset=!0)}mergeDiff(t){let e=t[K],i={};if(delete t[K],this.rendered=this.mutableMerge(this.rendered,t),this.rendered[K]=this.rendered[K]||{},e){let s=this.rendered[K];for(let n in e)e[n]=this.cachedFindComponent(n,e[n],s,e,i);for(let n in e)s[n]=e[n];t[K]=e}}cachedFindComponent(t,e,i,s,n){if(n[t])return n[t];{let r,o,a=e[te];if(ue(a)){let h;a>0?h=this.cachedFindComponent(a,s[a],i,s,n):h=i[-a],o=h[te],r=this.cloneMerge(h,e,!0),r[te]=o}else r=e[te]!==void 0||i[t]===void 0?e:this.cloneMerge(i[t],e,!1);return n[t]=r,r}}mutableMerge(t,e){return e[te]!==void 0?e:(this.doMutableMerge(t,e),t)}doMutableMerge(t,e){if(e[j])this.mergeKeyed(t,e);else for(let i in e){let s=e[i],n=t[i];Ie(s)&&s[te]===void 0&&Ie(n)?this.doMutableMerge(n,s):t[i]=s}t[yt]&&(t.newRender=!0)}clone(t){return"structuredClone"in window?structuredClone(t):JSON.parse(JSON.stringify(t))}mergeKeyed(t,e){let i=this.clone(t);if(Object.entries(e[j]).forEach(([s,n])=>{if(s!==he)if(Array.isArray(n)){let[r,o]=n;t[j][s]=i[j][r],this.doMutableMerge(t[j][s],o)}else if(typeof n=="number"){let r=n;t[j][s]=i[j][r]}else typeof n=="object"&&(t[j][s]||(t[j][s]={}),this.doMutableMerge(t[j][s],n))}),e[j][he]delete this.rendered[K][e])}get(){return this.rendered}isNewFingerprint(t={}){return!!t[te]}templateStatic(t,e){return typeof t=="number"?e[t]:t}nextMagicID(){return this.magicId++,`m${this.magicId}-${this.parentViewId()}`}toOutputBuffer(t,e,i,s,n={}){if(t[j])return this.comprehensionToBuffer(t,e,i,s);t[me]&&(e=t[me],delete t[me]);let{[te]:r}=t;r=this.templateStatic(r,e),t[te]=r;let o=t[yt],a=i.buffer;o&&(i.buffer=""),s&&o&&!t.magicId&&(t.newRender=!0,t.magicId=this.nextMagicID()),i.buffer+=r[0];for(let h=1;h0||c.length>0||f)&&(delete t[xe],t[j]={[he]:0},i.streams.add(o))}}dynamicToBuffer(t,e,i,s){if(typeof t=="number"){let{buffer:n,streams:r}=this.recursiveCIDToString(i.components,t,i.onlyCids);i.buffer+=n,i.streams=new Set([...i.streams,...r])}else Ie(t)?this.toOutputBuffer(t,e,i,s,{}):i.buffer+=t}recursiveCIDToString(t,e,i){let s=t[e]||O(`no component for CID ${e}`,t),n={[le]:e,[Oe]:this.viewId},r=i&&!i.has(e);s.newRender=!r,s.magicId=`c${e}-${this.parentViewId()}`;let o=!s.reset,{buffer:a,streams:h}=this.recursiveToString(s,t,i,o,n);return delete s.reset,{buffer:a,streams:h}}},hi=[],li=200,Ts={exec(t,e,i,s,n,r){let[o,a]=r||[null,{callback:r&&r.callback}];(i.charAt(0)==="["?JSON.parse(i):[[o,a]]).forEach(([c,f])=>{c===o&&(f={...a,...f},f.callback=f.callback||a.callback),this.filterToEls(s.liveSocket,n,f).forEach(g=>{this[`exec_${c}`](t,e,i,s,n,g,f)})})},isVisible(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length>0)},isInViewport(t){let e=t.getBoundingClientRect(),i=window.innerHeight||document.documentElement.clientHeight,s=window.innerWidth||document.documentElement.clientWidth;return e.right>0&&e.bottom>0&&e.left{a.done=g});s.liveSocket.asyncTransition(f)}u.dispatchEvent(r,o,{detail:a,bubbles:h})},exec_push(t,e,i,s,n,r,o){let{event:a,data:h,target:c,page_loading:f,loading:g,value:b,dispatcher:w,callback:p}=o,S={loading:g,value:b,target:c,page_loading:!!f,originalEvent:t},A=e==="change"&&w?w:n,$=c||A.getAttribute(s.binding("target"))||A,J=(T,R)=>{if(T.isConnected())if(e==="change"){let{newCid:L,_target:V}=o;V=V||(u.isFormInput(n)?n.name:void 0),V&&(S._target=V),T.pushInput(n,R,L,a||i,S,p)}else if(e==="submit"){let{submitter:L}=o;T.submitForm(n,R,a||i,L,S,p)}else T.pushEvent(e,n,R,a||i,h,S,p)};o.targetView&&o.targetCtx?J(o.targetView,o.targetCtx):s.withinTargets($,J)},exec_navigate(t,e,i,s,n,r,{href:o,replace:a}){s.liveSocket.historyRedirect(t,o,a?"replace":"push",null,n)},exec_patch(t,e,i,s,n,r,{href:o,replace:a}){s.liveSocket.pushHistoryPatch(t,o,a?"replace":"push",n)},exec_focus(t,e,i,s,n,r){ee.attemptFocus(r),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>ee.attemptFocus(r))})},exec_focus_first(t,e,i,s,n,r){ee.focusFirstInteractive(r)||ee.focusFirst(r),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>ee.focusFirstInteractive(r)||ee.focusFirst(r))})},exec_push_focus(t,e,i,s,n,r){hi.push(r||n)},exec_pop_focus(t,e,i,s,n,r){let o=hi.pop();o&&(o.focus(),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>o.focus())}))},exec_add_class(t,e,i,s,n,r,{names:o,transition:a,time:h,blocking:c}){this.addOrRemoveClasses(r,o,[],a,h,s,c)},exec_remove_class(t,e,i,s,n,r,{names:o,transition:a,time:h,blocking:c}){this.addOrRemoveClasses(r,[],o,a,h,s,c)},exec_toggle_class(t,e,i,s,n,r,{names:o,transition:a,time:h,blocking:c}){this.toggleClasses(r,o,a,h,s,c)},exec_toggle_attr(t,e,i,s,n,r,{attr:[o,a,h]}){this.toggleAttr(r,o,a,h)},exec_ignore_attrs(t,e,i,s,n,r,{attrs:o}){this.ignoreAttrs(r,o)},exec_transition(t,e,i,s,n,r,{time:o,transition:a,blocking:h}){this.addOrRemoveClasses(r,[],[],a,o,s,h)},exec_toggle(t,e,i,s,n,r,{display:o,ins:a,outs:h,time:c,blocking:f}){this.toggle(e,s,r,o,a,h,c,f)},exec_show(t,e,i,s,n,r,{display:o,transition:a,time:h,blocking:c}){this.show(e,s,r,o,a,h,c)},exec_hide(t,e,i,s,n,r,{display:o,transition:a,time:h,blocking:c}){this.hide(e,s,r,o,a,h,c)},exec_set_attr(t,e,i,s,n,r,{attr:[o,a]}){this.setOrRemoveAttrs(r,[[o,a]],[])},exec_remove_attr(t,e,i,s,n,r,{attr:o}){this.setOrRemoveAttrs(r,[],[o])},ignoreAttrs(t,e){u.putPrivate(t,"JS:ignore_attrs",{apply:(i,s)=>{let n=Array.from(i.attributes),r=n.map(o=>o.name);Array.from(s.attributes).filter(o=>!r.includes(o.name)).forEach(o=>{u.attributeIgnored(o,e)&&s.removeAttribute(o.name)}),n.forEach(o=>{u.attributeIgnored(o,e)&&s.setAttribute(o.name,o.value)})}})},onBeforeElUpdated(t,e){let i=u.private(t,"JS:ignore_attrs");i&&i.apply(t,e)},show(t,e,i,s,n,r,o){this.isVisible(i)||this.toggle(t,e,i,s,n,null,r,o)},hide(t,e,i,s,n,r,o){this.isVisible(i)&&this.toggle(t,e,i,s,null,n,r,o)},toggle(t,e,i,s,n,r,o,a){o=o||li;let[h,c,f]=n||[[],[],[]],[g,b,w]=r||[[],[],[]];if(h.length>0||g.length>0)if(this.isVisible(i)){let p=()=>{this.addOrRemoveClasses(i,b,h.concat(c).concat(f)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(i,g,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(i,w,b))})},S=()=>{this.addOrRemoveClasses(i,[],g.concat(w)),u.putSticky(i,"toggle",A=>A.style.display="none"),i.dispatchEvent(new Event("phx:hide-end"))};i.dispatchEvent(new Event("phx:hide-start")),a===!1?(p(),setTimeout(S,o)):e.transition(o,p,S)}else{if(t==="remove")return;let p=()=>{this.addOrRemoveClasses(i,c,g.concat(b).concat(w));let A=s||this.defaultDisplay(i);window.requestAnimationFrame(()=>{this.addOrRemoveClasses(i,h,[]),window.requestAnimationFrame(()=>{u.putSticky(i,"toggle",$=>$.style.display=A),this.addOrRemoveClasses(i,f,c)})})},S=()=>{this.addOrRemoveClasses(i,[],h.concat(f)),i.dispatchEvent(new Event("phx:show-end"))};i.dispatchEvent(new Event("phx:show-start")),a===!1?(p(),setTimeout(S,o)):e.transition(o,p,S)}else this.isVisible(i)?window.requestAnimationFrame(()=>{i.dispatchEvent(new Event("phx:hide-start")),u.putSticky(i,"toggle",p=>p.style.display="none"),i.dispatchEvent(new Event("phx:hide-end"))}):window.requestAnimationFrame(()=>{i.dispatchEvent(new Event("phx:show-start"));let p=s||this.defaultDisplay(i);u.putSticky(i,"toggle",S=>S.style.display=p),i.dispatchEvent(new Event("phx:show-end"))})},toggleClasses(t,e,i,s,n,r){window.requestAnimationFrame(()=>{let[o,a]=u.getSticky(t,"classes",[[],[]]),h=e.filter(f=>o.indexOf(f)<0&&!t.classList.contains(f)),c=e.filter(f=>a.indexOf(f)<0&&t.classList.contains(f));this.addOrRemoveClasses(t,h,c,i,s,n,r)})},toggleAttr(t,e,i,s){t.hasAttribute(e)?s!==void 0?t.getAttribute(e)===i?this.setOrRemoveAttrs(t,[[e,s]],[]):this.setOrRemoveAttrs(t,[[e,i]],[]):this.setOrRemoveAttrs(t,[],[e]):this.setOrRemoveAttrs(t,[[e,i]],[])},addOrRemoveClasses(t,e,i,s,n,r,o){n=n||li;let[a,h,c]=s||[[],[],[]];if(a.length>0){let f=()=>{this.addOrRemoveClasses(t,h,[].concat(a).concat(c)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(t,a,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(t,c,h))})},g=()=>this.addOrRemoveClasses(t,e.concat(c),i.concat(a).concat(h));o===!1?(f(),setTimeout(g,n)):r.transition(n,f,g);return}window.requestAnimationFrame(()=>{let[f,g]=u.getSticky(t,"classes",[[],[]]),b=e.filter(A=>f.indexOf(A)<0&&!t.classList.contains(A)),w=i.filter(A=>g.indexOf(A)<0&&t.classList.contains(A)),p=f.filter(A=>i.indexOf(A)<0).concat(b),S=g.filter(A=>e.indexOf(A)<0).concat(w);u.putSticky(t,"classes",A=>(A.classList.remove(...S),A.classList.add(...p),[p,S]))})},setOrRemoveAttrs(t,e,i){let[s,n]=u.getSticky(t,"attrs",[[],[]]),r=e.map(([h,c])=>h).concat(i),o=s.filter(([h,c])=>!r.includes(h)).concat(e),a=n.filter(h=>!r.includes(h)).concat(i);u.putSticky(t,"attrs",h=>(a.forEach(c=>h.removeAttribute(c)),o.forEach(([c,f])=>h.setAttribute(c,f)),[o,a]))},hasAllClasses(t,e){return e.every(i=>t.classList.contains(i))},isToggledOut(t,e){return!this.isVisible(t)||this.hasAllClasses(t,e)},filterToEls(t,e,{to:i}){let s=()=>{if(typeof i=="string")return document.querySelectorAll(i);if(i.closest){let n=e.closest(i.closest);return n?[n]:[]}else if(i.inner)return e.querySelectorAll(i.inner)};return i?t.jsQuerySelectorAll(e,i,s):[e]},defaultDisplay(t){return{tr:"table-row",td:"table-cell"}[t.tagName.toLowerCase()]||"block"},transitionClasses(t){if(!t)return null;let[e,i,s]=Array.isArray(t)?t:[t.split(" "),[],[]];return e=Array.isArray(e)?e:e.split(" "),i=Array.isArray(i)?i:i.split(" "),s=Array.isArray(s)?s:s.split(" "),[e,i,s]}},x=Ts,wi=(t,e)=>({exec(i,s){t.execJS(i,s,e)},show(i,s={}){let n=t.owner(i);x.show(e,n,i,s.display,x.transitionClasses(s.transition),s.time,s.blocking)},hide(i,s={}){let n=t.owner(i);x.hide(e,n,i,null,x.transitionClasses(s.transition),s.time,s.blocking)},toggle(i,s={}){let n=t.owner(i),r=x.transitionClasses(s.in),o=x.transitionClasses(s.out);x.toggle(e,n,i,s.display,r,o,s.time,s.blocking)},addClass(i,s,n={}){let r=Array.isArray(s)?s:s.split(" "),o=t.owner(i);x.addOrRemoveClasses(i,r,[],x.transitionClasses(n.transition),n.time,o,n.blocking)},removeClass(i,s,n={}){let r=Array.isArray(s)?s:s.split(" "),o=t.owner(i);x.addOrRemoveClasses(i,[],r,x.transitionClasses(n.transition),n.time,o,n.blocking)},toggleClass(i,s,n={}){let r=Array.isArray(s)?s:s.split(" "),o=t.owner(i);x.toggleClasses(i,r,x.transitionClasses(n.transition),n.time,o,n.blocking)},transition(i,s,n={}){let r=t.owner(i);x.addOrRemoveClasses(i,[],[],x.transitionClasses(s),n.time,r,n.blocking)},setAttribute(i,s,n){x.setOrRemoveAttrs(i,[[s,n]],[])},removeAttribute(i,s){x.setOrRemoveAttrs(i,[],[s])},toggleAttribute(i,s,n,r){x.toggleAttr(i,s,n,r)},push(i,s,n={}){t.withinOwners(i,r=>{let o=n.value||{};delete n.value;let a=new CustomEvent("phx:exec",{detail:{sourceElement:i}});x.exec(a,e,s,r,i,["push",{data:o,...n}])})},navigate(i,s={}){let n=new CustomEvent("phx:exec");t.historyRedirect(n,i,s.replace?"replace":"push",null,null)},patch(i,s={}){let n=new CustomEvent("phx:exec");t.pushHistoryPatch(n,i,s.replace?"replace":"push",null)},ignoreAttributes(i,s){x.ignoreAttrs(i,Array.isArray(s)?s:[s])}}),Et="hookId",ci="deadHook",_s=1,we=class yi{get liveSocket(){return this.__liveSocket()}static makeID(){return _s++}static elementID(e){return u.private(e,Et)}static deadHook(e){return u.private(e,ci)===!0}constructor(e,i,s){if(this.el=i,this.__attachView(e),this.__listeners=new Set,this.__isDisconnected=!1,u.putPrivate(this.el,Et,yi.makeID()),e&&e.isDead&&u.putPrivate(this.el,ci,!0),s){let n=new Set(["el","liveSocket","__view","__listeners","__isDisconnected","constructor","js","pushEvent","pushEventTo","handleEvent","removeHandleEvent","upload","uploadTo","__mounted","__updated","__beforeUpdate","__destroyed","__reconnected","__disconnected","__cleanup__"]);for(let o in s)Object.prototype.hasOwnProperty.call(s,o)&&(this[o]=s[o],n.has(o)&&console.warn(`Hook object for element #${i.id} overwrites core property '${o}'!`));["mounted","beforeUpdate","updated","destroyed","disconnected","reconnected"].forEach(o=>{s[o]&&typeof s[o]=="function"&&(this[o]=s[o])})}}__attachView(e){e?(this.__view=()=>e,this.__liveSocket=()=>e.liveSocket):(this.__view=()=>{throw new Error(`hook not yet attached to a live view: ${this.el.outerHTML}`)},this.__liveSocket=()=>{throw new Error(`hook not yet attached to a live view: ${this.el.outerHTML}`)})}mounted(){}beforeUpdate(){}updated(){}destroyed(){}disconnected(){}reconnected(){}__mounted(){this.mounted()}__updated(){this.updated()}__beforeUpdate(){this.beforeUpdate()}__destroyed(){this.destroyed(),u.deletePrivate(this.el,Et)}__reconnected(){this.__isDisconnected&&(this.__isDisconnected=!1,this.reconnected())}__disconnected(){this.__isDisconnected=!0,this.disconnected()}js(){return{...wi(this.__view().liveSocket,"hook"),exec:e=>{this.__view().liveSocket.execJS(this.el,e,"hook")}}}pushEvent(e,i,s){let n=this.__view().pushHookEvent(this.el,null,e,i||{});if(s===void 0)return n.then(({reply:r})=>r);n.then(({reply:r,ref:o})=>s(r,o)).catch(()=>{})}pushEventTo(e,i,s,n){if(n===void 0){let r=[];this.__view().withinTargets(e,(a,h)=>{r.push({view:a,targetCtx:h})});let o=r.map(({view:a,targetCtx:h})=>a.pushHookEvent(this.el,h,i,s||{}));return Promise.allSettled(o)}this.__view().withinTargets(e,(r,o)=>{r.pushHookEvent(this.el,o,i,s||{}).then(({reply:a,ref:h})=>n(a,h)).catch(()=>{})})}handleEvent(e,i){let s={event:e,callback:n=>i(n.detail)};return window.addEventListener(`phx:${e}`,s.callback),this.__listeners.add(s),s}removeHandleEvent(e){window.removeEventListener(`phx:${e.event}`,e.callback),this.__listeners.delete(e)}upload(e,i){return this.__view().dispatchUploads(null,e,i)}uploadTo(e,i,s){return this.__view().withinTargets(e,(n,r)=>{n.dispatchUploads(r,i,s)})}__cleanup__(){this.__listeners.forEach(e=>this.removeHandleEvent(e))}},Ps=(t,e)=>{let i=t.endsWith("[]"),s=i?t.slice(0,-2):t;return s=s.replace(/([^\[\]]+)(\]?$)/,`${e}$1$2`),i&&(s+="[]"),s},ot=(t,e,i=[])=>{let{submitter:s}=e,n;if(s&&s.name){let f=document.createElement("input");f.type="hidden";let g=s.getAttribute("form");g&&f.setAttribute("form",g),f.name=s.name,f.value=s.value,s.parentElement.insertBefore(f,s),n=f}let r=new FormData(t),o=[];r.forEach((f,g,b)=>{f instanceof File&&o.push(g)}),o.forEach(f=>r.delete(f));let a=new URLSearchParams,{inputsUnused:h,onlyHiddenInputs:c}=Array.from(t.elements).reduce((f,g)=>{let{inputsUnused:b,onlyHiddenInputs:w}=f,p=g.name;if(!p)return f;b[p]===void 0&&(b[p]=!0),w[p]===void 0&&(w[p]=!0);let S=u.private(g,dt)||u.private(g,Xe),A=g.type==="hidden";return b[p]=b[p]&&!S,w[p]=w[p]&&A,f},{inputsUnused:{},onlyHiddenInputs:{}});for(let[f,g]of r.entries())if(i.length===0||i.indexOf(f)>=0){let b=h[f],w=c[f];b&&!(s&&s.name==f)&&!w&&a.append(Ps(f,"_unused_"),""),typeof g=="string"&&a.append(f,g)}return s&&n&&s.parentElement.removeChild(n),a.toString()},Rs=class Si{static closestView(e){let i=e.closest(ze);return i?u.private(i,"view"):null}constructor(e,i,s,n,r){this.isDead=!1,this.liveSocket=i,this.flash=n,this.parent=s,this.root=s?s.root:this,this.el=e;let o=u.private(this.el,"view");if(o!==void 0&&o.isDead!==!0)throw O(`The DOM element for this view has already been bound to a view. + + An element can only ever be associated with a single view! + Please ensure that you are not trying to initialize multiple LiveSockets on the same page. + This could happen if you're accidentally trying to render your root layout more than once. + Ensure that the template set on the LiveView is different than the root layout. + `,{view:o}),new Error("Cannot bind multiple views to the same DOM element.");u.putPrivate(this.el,"view",this),this.id=this.el.id,this.el.setAttribute(fe,this.root.id),this.ref=0,this.lastAckRef=null,this.childJoins=0,this.loaderTimer=null,this.disconnectedTimer=null,this.pendingDiffs=[],this.pendingForms=new Set,this.redirect=!1,this.href=null,this.joinCount=this.parent?this.parent.joinCount-1:0,this.joinAttempts=0,this.joinPending=!0,this.destroyed=!1,this.joinCallback=function(a){a&&a()},this.stopCallback=function(){},this.pendingJoinOps=[],this.viewHooks={},this.formSubmits=[],this.children=this.parent?null:{},this.root.children[this.id]={},this.formsForRecovery={},this.channel=this.liveSocket.channel(`lv:${this.id}`,()=>{let a=this.href&&this.expandURL(this.href);return{redirect:this.redirect?a:void 0,url:this.redirect?void 0:a||void 0,params:this.connectParams(r),session:this.getSession(),static:this.getStatic(),flash:this.flash,sticky:this.el.hasAttribute(Tt)}}),this.portalElementIds=new Set}setHref(e){this.href=e}setRedirect(e){this.redirect=!0,this.href=e}isMain(){return this.el.hasAttribute(Lt)}connectParams(e){let i=this.liveSocket.params(this.el),s=u.all(document,`[${this.binding(Oi)}]`).map(n=>n.src||n.href).filter(n=>typeof n=="string");return s.length>0&&(i._track_static=s),i._mounts=this.joinCount,i._mount_attempts=this.joinAttempts,i._live_referer=e,this.joinAttempts++,i}isConnected(){return this.channel.canPush()}getSession(){return this.el.getAttribute(ce)}getStatic(){let e=this.el.getAttribute(Ee);return e===""?null:e}destroy(e=function(){}){this.destroyAllChildren(),this.destroyPortalElements(),this.destroyed=!0,u.deletePrivate(this.el,"view"),delete this.root.children[this.id],this.parent&&delete this.root.children[this.parent.id][this.id],clearTimeout(this.loaderTimer);let i=()=>{e();for(let s in this.viewHooks)this.destroyHook(this.viewHooks[s])};u.markPhxChildDestroyed(this.el),this.log("destroyed",()=>["the child has been removed from the parent"]),this.channel.leave().receive("ok",i).receive("error",i).receive("timeout",i)}setContainerClasses(...e){this.el.classList.remove(Ut,be,Re,jt,Fe),this.el.classList.add(...e)}showLoader(e){if(clearTimeout(this.loaderTimer),e)this.loaderTimer=setTimeout(()=>this.showLoader(),e);else{for(let i in this.viewHooks)this.viewHooks[i].__disconnected();this.setContainerClasses(be)}}execAll(e){u.all(this.el,`[${e}]`,i=>this.liveSocket.execJS(i,i.getAttribute(e)))}hideLoader(){clearTimeout(this.loaderTimer),clearTimeout(this.disconnectedTimer),this.setContainerClasses(Ut),this.execAll(this.binding("connected"))}triggerReconnected(){for(let e in this.viewHooks)this.viewHooks[e].__reconnected()}log(e,i){this.liveSocket.log(this,e,i)}transition(e,i,s=function(){}){this.liveSocket.transition(e,i,s)}withinTargets(e,i,s=document){if(e instanceof HTMLElement||e instanceof SVGElement)return this.liveSocket.owner(e,n=>i(n,e));if(ue(e))u.findComponentNodeList(this.id,e,s).length===0?O(`no component found matching phx-target of ${e}`):i(this,parseInt(e));else{let n=Array.from(s.querySelectorAll(e));n.length===0&&O(`nothing found matching the phx-target selector "${e}"`),n.forEach(r=>this.liveSocket.owner(r,o=>i(o,r)))}}applyDiff(e,i,s){this.log(e,()=>["",ct(i)]);let{diff:n,reply:r,events:o,title:a}=ai.extract(i),h=o.reduce((f,g)=>(g.length===3&&g[2]==!0?f.pre.push(g.slice(0,-1)):f.post.push(g),f),{pre:[],post:[]});this.liveSocket.dispatchEvents(h.pre);let c=()=>{s({diff:n,reply:r,events:h.post}),(typeof a=="string"||e=="mount"&&this.isMain())&&window.requestAnimationFrame(()=>u.putTitle(a))};"onDocumentPatch"in this.liveSocket.domCallbacks?this.liveSocket.triggerDOM("onDocumentPatch",[c]):c()}onJoin(e){let{rendered:i,container:s,liveview_version:n,pid:r}=e;if(s){let[o,a]=s;this.el=u.replaceRootContainer(this.el,o,a)}this.childJoins=0,this.joinPending=!0,this.flash=null,this.root===this&&(this.formsForRecovery=this.getFormsForRecovery()),this.isMain()&&window.history.state===null&&Z.pushState("replace",{type:"patch",id:this.id,position:this.liveSocket.currentHistoryPosition}),n!==this.liveSocket.version()&&console.warn(`LiveView asset version mismatch. JavaScript version ${this.liveSocket.version()} vs. server ${n}. To avoid issues, please ensure that your assets use the same version as the server.`),r&&this.el.setAttribute(Bi,r),Z.dropLocal(this.liveSocket.localStorage,window.location.pathname,di),this.applyDiff("mount",i,({diff:o,events:a})=>{this.rendered=new ai(this.id,o);let[h,c]=this.renderContainer(null,"join");this.dropPendingRefs(),this.joinCount++,this.joinAttempts=0,this.maybeRecoverForms(h,()=>{this.onJoinComplete(e,h,c,a)})})}dropPendingRefs(){u.all(document,`[${ie}="${this.refSrc()}"]`,e=>{e.removeAttribute(Me),e.removeAttribute(ie),e.removeAttribute(B)})}onJoinComplete({live_patch:e},i,s,n){if(this.joinCount>1||this.parent&&!this.parent.isJoinPending())return this.applyJoinPatch(e,i,s,n);u.findPhxChildrenInFragment(i,this.id).filter(o=>{let a=o.id&&this.el.querySelector(`[id="${o.id}"]`),h=a&&a.getAttribute(Ee);return h&&o.setAttribute(Ee,h),a&&a.setAttribute(fe,this.root.id),this.joinChild(o)}).length===0?this.parent?(this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(e,i,s,n)]),this.parent.ackJoin(this)):(this.onAllChildJoinsComplete(),this.applyJoinPatch(e,i,s,n)):this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(e,i,s,n)])}attachTrueDocEl(){this.el=u.byId(this.id),this.el.setAttribute(fe,this.root.id)}execNewMounted(e=document){let i=this.binding(At),s=this.binding(Ct);this.all(e,`[${i}], [${s}]`,n=>{u.maintainPrivateHooks(n,n,i,s),this.maybeAddNewHook(n)}),this.all(e,`[${this.binding(Ue)}], [data-phx-${Ue}]`,n=>{this.maybeAddNewHook(n)}),this.all(e,`[${this.binding(qt)}]`,n=>{this.maybeMounted(n)})}all(e,i,s){u.all(e,i,n=>{this.ownsElement(n)&&s(n)})}applyJoinPatch(e,i,s,n){this.joinCount>1&&this.pendingJoinOps.length&&(this.pendingJoinOps.forEach(o=>typeof o=="function"&&o()),this.pendingJoinOps=[]),this.attachTrueDocEl();let r=new rt(this,this.el,this.id,i,s,null);if(r.markPrunableContentForRemoval(),this.performPatch(r,!1,!0),this.joinNewChildren(),this.execNewMounted(),this.joinPending=!1,this.liveSocket.dispatchEvents(n),this.applyPendingUpdates(),e){let{kind:o,to:a}=e;this.liveSocket.historyPatch(a,o)}this.hideLoader(),this.joinCount>1&&this.triggerReconnected(),this.stopCallback()}triggerBeforeUpdateHook(e,i){this.liveSocket.triggerDOM("onBeforeElUpdated",[e,i]);let s=this.getHook(e),n=s&&u.isIgnored(e,this.binding(ft));if(s&&!e.isEqualNode(i)&&!(n&&ts(e.dataset,i.dataset)))return s.__beforeUpdate(),s}maybeMounted(e){let i=e.getAttribute(this.binding(qt)),s=i&&u.private(e,"mounted");i&&!s&&(this.liveSocket.execJS(e,i),u.putPrivate(e,"mounted",!0))}maybeAddNewHook(e){let i=this.addHook(e);i&&i.__mounted()}performPatch(e,i,s=!1){let n=[],r=!1,o=new Set;return this.liveSocket.triggerDOM("onPatchStart",[e.targetContainer]),e.after("added",a=>{this.liveSocket.triggerDOM("onNodeAdded",[a]);let h=this.binding(At),c=this.binding(Ct);u.maintainPrivateHooks(a,a,h,c),this.maybeAddNewHook(a),a.getAttribute&&this.maybeMounted(a)}),e.after("phxChildAdded",a=>{u.isPhxSticky(a)?this.liveSocket.joinRootViews():r=!0}),e.before("updated",(a,h)=>{this.triggerBeforeUpdateHook(a,h)&&o.add(a.id),x.onBeforeElUpdated(a,h)}),e.after("updated",a=>{o.has(a.id)&&this.getHook(a).__updated()}),e.after("discarded",a=>{a.nodeType===Node.ELEMENT_NODE&&n.push(a)}),e.after("transitionsDiscarded",a=>this.afterElementsRemoved(a,i)),e.perform(s),this.afterElementsRemoved(n,i),this.liveSocket.triggerDOM("onPatchEnd",[e.targetContainer]),r}afterElementsRemoved(e,i){let s=[];e.forEach(n=>{let r=u.all(n,`[${Oe}="${this.id}"][${le}]`),o=u.all(n,`[${this.binding(Ue)}], [data-phx-hook]`);r.concat(n).forEach(a=>{let h=this.componentID(a);ue(h)&&s.indexOf(h)===-1&&a.getAttribute(Oe)===this.id&&s.push(h)}),o.concat(n).forEach(a=>{let h=this.getHook(a);h&&this.destroyHook(h)})}),i&&this.maybePushComponentsDestroyed(s)}joinNewChildren(){u.findPhxChildren(document,this.id).forEach(e=>this.joinChild(e))}maybeRecoverForms(e,i){let s=this.binding("change"),n=this.root.formsForRecovery,r=document.createElement("template");r.innerHTML=e,u.all(r.content,`[${Dt}]`).forEach(h=>{r.content.firstElementChild.appendChild(h.content.firstElementChild)});let o=r.content.firstElementChild;o.id=this.id,o.setAttribute(fe,this.root.id),o.setAttribute(ce,this.getSession()),o.setAttribute(Ee,this.getStatic()),o.setAttribute(ke,this.parent?this.parent.id:null);let a=u.all(r.content,"form").filter(h=>h.id&&n[h.id]).filter(h=>!this.pendingForms.has(h.id)).filter(h=>n[h.id].getAttribute(s)===h.getAttribute(s)).map(h=>[n[h.id],h]);if(a.length===0)return i();a.forEach(([h,c],f)=>{this.pendingForms.add(c.id),this.pushFormRecovery(h,c,r.content.firstElementChild,()=>{this.pendingForms.delete(c.id),f===a.length-1&&i()})})}getChildById(e){return this.root.children[this.id][e]}getDescendentByEl(e){return e.id===this.id?this:this.children[e.getAttribute(ke)]?.[e.id]}destroyDescendent(e){for(let i in this.root.children)for(let s in this.root.children[i])if(s===e)return this.root.children[i][s].destroy()}joinChild(e){if(!this.getChildById(e.id)){let s=new Si(e,this.liveSocket,this);return this.root.children[this.id][s.id]=s,s.join(),this.childJoins++,!0}}isJoinPending(){return this.joinPending}ackJoin(e){this.childJoins--,this.childJoins===0&&(this.parent?this.parent.ackJoin(this):this.onAllChildJoinsComplete())}onAllChildJoinsComplete(){this.pendingForms.clear(),this.formsForRecovery={},this.joinCallback(()=>{this.pendingJoinOps.forEach(([e,i])=>{e.isDestroyed()||i()}),this.pendingJoinOps=[]})}update(e,i,s=!1){if(this.isJoinPending()||this.liveSocket.hasPendingLink()&&this.root.isMain())return s||this.pendingDiffs.push({diff:e,events:i}),!1;this.rendered.mergeDiff(e);let n=!1;return this.rendered.isComponentOnlyDiff(e)?this.liveSocket.time("component patch complete",()=>{u.findExistingParentCIDs(this.id,this.rendered.componentCIDs(e)).forEach(o=>{this.componentPatch(this.rendered.getComponent(e,o),o)&&(n=!0)})}):Zt(e)||this.liveSocket.time("full patch complete",()=>{let[r,o]=this.renderContainer(e,"update"),a=new rt(this,this.el,this.id,r,o,null);n=this.performPatch(a,!0)}),this.liveSocket.dispatchEvents(i),n&&this.joinNewChildren(),!0}renderContainer(e,i){return this.liveSocket.time(`toString diff (${i})`,()=>{let s=this.el.tagName,n=e?this.rendered.componentCIDs(e):null,{buffer:r,streams:o}=this.rendered.toString(n);return[`<${s}>${r}`,o]})}componentPatch(e,i){if(Zt(e))return!1;let{buffer:s,streams:n}=this.rendered.componentToString(i),r=new rt(this,this.el,this.id,s,n,i);return this.performPatch(r,!0)}getHook(e){return this.viewHooks[we.elementID(e)]}addHook(e){let i=we.elementID(e);if(!(e.getAttribute&&!this.ownsElement(e)))if(i&&!this.viewHooks[i]){if(we.deadHook(e))return;let s=u.getCustomElHook(e)||O(`no hook found for custom element: ${e.id}`);return this.viewHooks[i]=s,s.__attachView(this),s}else{if(i||!e.getAttribute)return;{let s=e.getAttribute(`data-phx-${Ue}`)||e.getAttribute(this.binding(Ue));if(!s)return;let n=this.liveSocket.getHookDefinition(s);if(n){if(!e.id){O(`no DOM ID for hook "${s}". Hooks require a unique ID on each element.`,e);return}let r;try{if(typeof n=="function"&&n.prototype instanceof we)r=new n(this,e);else if(typeof n=="object"&&n!==null)r=new we(this,e,n);else{O(`Invalid hook definition for "${s}". Expected a class extending ViewHook or an object definition.`,e);return}}catch(o){let a=o instanceof Error?o.message:String(o);O(`Failed to create hook "${s}": ${a}`,e);return}return this.viewHooks[we.elementID(r.el)]=r,r}else s!==null&&O(`unknown hook found for "${s}"`,e)}}}destroyHook(e){let i=we.elementID(e.el);e.__destroyed(),e.__cleanup__(),delete this.viewHooks[i]}applyPendingUpdates(){this.pendingDiffs=this.pendingDiffs.filter(({diff:e,events:i})=>!this.update(e,i,!0)),this.eachChild(e=>e.applyPendingUpdates())}eachChild(e){let i=this.root.children[this.id]||{};for(let s in i)e(this.getChildById(s))}onChannel(e,i){this.liveSocket.onChannel(this.channel,e,s=>{this.isJoinPending()?this.joinCount>1?this.pendingJoinOps.push(()=>i(s)):this.root.pendingJoinOps.push([this,()=>i(s)]):this.liveSocket.requestDOMUpdate(()=>i(s))})}bindChannel(){this.liveSocket.onChannel(this.channel,"diff",e=>{this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",e,({diff:i,events:s})=>this.update(i,s))})}),this.onChannel("redirect",({to:e,flash:i})=>this.onRedirect({to:e,flash:i})),this.onChannel("live_patch",e=>this.onLivePatch(e)),this.onChannel("live_redirect",e=>this.onLiveRedirect(e)),this.channel.onError(e=>this.onError(e)),this.channel.onClose(e=>this.onClose(e))}destroyAllChildren(){this.eachChild(e=>e.destroy())}onLiveRedirect(e){let{to:i,kind:s,flash:n}=e,r=this.expandURL(i),o=new CustomEvent("phx:server-navigate",{detail:{to:i,kind:s,flash:n}});this.liveSocket.historyRedirect(o,r,s,n)}onLivePatch(e){let{to:i,kind:s}=e;this.href=this.expandURL(i),this.liveSocket.historyPatch(i,s)}expandURL(e){return e.startsWith("/")?`${window.location.protocol}//${window.location.host}${e}`:e}onRedirect({to:e,flash:i,reloadToken:s}){this.liveSocket.redirect(e,i,s)}isDestroyed(){return this.destroyed}joinDead(){this.isDead=!0}joinPush(){return this.joinPush=this.joinPush||this.channel.join(),this.joinPush}join(e){this.showLoader(this.liveSocket.loaderTimeout),this.bindChannel(),this.isMain()&&(this.stopCallback=this.liveSocket.withPageLoading({to:this.href,kind:"initial"})),this.joinCallback=i=>{i=i||function(){},e?e(this.joinCount,i):i()},this.wrapPush(()=>this.channel.join(),{ok:i=>this.liveSocket.requestDOMUpdate(()=>this.onJoin(i)),error:i=>this.onJoinError(i),timeout:()=>this.onJoinError({reason:"timeout"})})}onJoinError(e){if(e.reason==="reload"){this.log("error",()=>[`failed mount with ${e.status}. Falling back to page reload`,e]),this.onRedirect({to:this.liveSocket.main.href,reloadToken:e.token});return}else if(e.reason==="unauthorized"||e.reason==="stale"){this.log("error",()=>["unauthorized live_redirect. Falling back to page request",e]),this.onRedirect({to:this.liveSocket.main.href,flash:this.flash});return}if((e.redirect||e.live_redirect)&&(this.joinPending=!1,this.channel.leave()),e.redirect)return this.onRedirect(e.redirect);if(e.live_redirect)return this.onLiveRedirect(e.live_redirect);if(this.log("error",()=>["unable to join",e]),this.isMain())this.displayError([be,Re,Fe],{unstructuredError:e,errorKind:"server"}),this.liveSocket.isConnected()&&this.liveSocket.reloadWithJitter(this);else{this.joinAttempts>=Jt&&(this.root.displayError([be,Re,Fe],{unstructuredError:e,errorKind:"server"}),this.log("error",()=>[`giving up trying to mount after ${Jt} tries`,e]),this.destroy());let i=u.byId(this.el.id);i?(u.mergeAttrs(i,this.el),this.displayError([be,Re,Fe],{unstructuredError:e,errorKind:"server"}),this.el=i):this.destroy()}}onClose(e){if(!this.isDestroyed()){if(this.isMain()&&this.liveSocket.hasPendingLink()&&e!=="leave")return this.liveSocket.reloadWithJitter(this);this.destroyAllChildren(),this.liveSocket.dropActiveElement(this),this.liveSocket.isUnloaded()&&this.showLoader(Ji)}}onError(e){this.onClose(e),this.liveSocket.isConnected()&&this.log("error",()=>["view crashed",e]),this.liveSocket.isUnloaded()||(this.liveSocket.isConnected()?this.displayError([be,Re,Fe],{unstructuredError:e,errorKind:"server"}):this.displayError([be,Re,jt],{unstructuredError:e,errorKind:"client"}))}displayError(e,i={}){this.isMain()&&u.dispatchEvent(window,"phx:page-loading-start",{detail:{to:this.href,kind:"error",...i}}),this.showLoader(),this.setContainerClasses(...e),this.delayedDisconnected()}delayedDisconnected(){this.disconnectedTimer=setTimeout(()=>{this.execAll(this.binding("disconnected"))},this.liveSocket.disconnectedTimeout)}wrapPush(e,i){let s=this.liveSocket.getLatencySim(),n=s?r=>setTimeout(()=>!this.isDestroyed()&&r(),s):r=>!this.isDestroyed()&&r();n(()=>{e().receive("ok",r=>n(()=>i.ok&&i.ok(r))).receive("error",r=>n(()=>i.error&&i.error(r))).receive("timeout",()=>n(()=>i.timeout&&i.timeout()))})}pushWithReply(e,i,s){if(!this.isConnected())return Promise.reject(new Error("no connection"));let[n,[r],o]=e?e({payload:s}):[null,[],{}],a=this.joinCount,h=function(){};return o.page_loading&&(h=this.liveSocket.withPageLoading({kind:"element",target:r})),typeof s.cid!="number"&&delete s.cid,new Promise((c,f)=>{this.wrapPush(()=>this.channel.push(i,s,Ki),{ok:g=>{n!==null&&(this.lastAckRef=n);let b=w=>{g.redirect&&this.onRedirect(g.redirect),g.live_patch&&this.onLivePatch(g.live_patch),g.live_redirect&&this.onLiveRedirect(g.live_redirect),h(),c({resp:g,reply:w,ref:n})};g.diff?this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",g.diff,({diff:w,reply:p,events:S})=>{n!==null&&this.undoRefs(n,s.event),this.update(w,S),b(p)})}):(n!==null&&this.undoRefs(n,s.event),b(null))},error:g=>f(new Error(`failed with reason: ${JSON.stringify(g)}`)),timeout:()=>{f(new Error("timeout")),this.joinCount===a&&this.liveSocket.reloadWithJitter(this,()=>{this.log("timeout",()=>["received timeout while communicating with server. Falling back to hard refresh for recovery"])})}})})}undoRefs(e,i,s){if(!this.isConnected())return;let n=`[${ie}="${this.refSrc()}"]`;s?(s=new Set(s),u.all(document,n,r=>{s&&!s.has(r)||(u.all(r,n,o=>this.undoElRef(o,e,i)),this.undoElRef(r,e,i))})):u.all(document,n,r=>this.undoElRef(r,e,i))}undoElRef(e,i,s){new Rt(e).maybeUndo(i,s,r=>{let o=new rt(this,e,this.id,r,[],null,{undoRef:i}),a=this.performPatch(o,!0);u.all(e,`[${ie}="${this.refSrc()}"]`,h=>this.undoElRef(h,i,s)),a&&this.joinNewChildren()})}refSrc(){return this.el.id}putRef(e,i,s,n={}){let r=this.ref++,o=this.binding(Bt);if(n.loading){let a=u.all(document,n.loading).map(h=>({el:h,lock:!0,loading:!0}));e=e.concat(a)}for(let{el:a,lock:h,loading:c}of e){if(!h&&!c)throw new Error("putRef requires lock or loading");if(a.setAttribute(ie,this.refSrc()),c&&a.setAttribute(Me,r),h&&a.setAttribute(B,r),!c||n.submitter&&!(a===n.submitter||a===n.form))continue;let f=new Promise(p=>{a.addEventListener(`phx:undo-lock:${r}`,()=>p(w),{once:!0})}),g=new Promise(p=>{a.addEventListener(`phx:undo-loading:${r}`,()=>p(w),{once:!0})});a.classList.add(`phx-${s}-loading`);let b=a.getAttribute(o);b!==null&&(a.getAttribute(ut)||a.setAttribute(ut,a.textContent),b!==""&&(a.textContent=b),a.setAttribute(Le,a.getAttribute(Le)||a.disabled),a.setAttribute("disabled",""));let w={event:i,eventType:s,ref:r,isLoading:c,isLocked:h,lockElements:e.filter(({lock:p})=>p).map(({el:p})=>p),loadingElements:e.filter(({loading:p})=>p).map(({el:p})=>p),unlock:p=>{p=Array.isArray(p)?p:[p],this.undoRefs(r,i,p)},lockComplete:f,loadingComplete:g,lock:p=>new Promise(S=>{if(this.isAcked(r))return S(w);p.setAttribute(B,r),p.setAttribute(ie,this.refSrc()),p.addEventListener(`phx:lock-stop:${r}`,()=>S(w),{once:!0})})};n.payload&&(w.payload=n.payload),n.target&&(w.target=n.target),n.originalEvent&&(w.originalEvent=n.originalEvent),a.dispatchEvent(new CustomEvent("phx:push",{detail:w,bubbles:!0,cancelable:!1})),i&&a.dispatchEvent(new CustomEvent(`phx:push:${i}`,{detail:w,bubbles:!0,cancelable:!1}))}return[r,e.map(({el:a})=>a),n]}isAcked(e){return this.lastAckRef!==null&&this.lastAckRef>=e}componentID(e){let i=e.getAttribute&&e.getAttribute(le);return i?parseInt(i):null}targetComponentID(e,i,s={}){if(ue(i))return i;let n=s.target||e.getAttribute(this.binding("target"));return ue(n)?parseInt(n):i&&(n!==null||s.target)?this.closestComponentID(i):null}closestComponentID(e){return ue(e)?e:e?De(e.closest(`[${le}],[${ve}]`),i=>{if(i.hasAttribute(le))return this.ownsElement(i)&&this.componentID(i);if(i.hasAttribute(ve)){let s=u.byId(i.getAttribute(ve));return this.closestComponentID(s)}}):null}pushHookEvent(e,i,s,n){if(!this.isConnected())return this.log("hook",()=>["unable to push hook event. LiveView not connected",s,n]),Promise.reject(new Error("unable to push hook event. LiveView not connected"));let r=()=>this.putRef([{el:e,loading:!0,lock:!0}],s,"hook",{payload:n,target:i});return this.pushWithReply(r,"event",{type:"hook",event:s,value:n,cid:this.closestComponentID(i)}).then(({resp:o,reply:a,ref:h})=>({reply:a,ref:h}))}extractMeta(e,i,s){let n=this.binding("value-");for(let r=0;r=0&&!e.checked&&delete i.value),s){i||(i={});for(let r in s)i[r]=s[r]}return i}pushEvent(e,i,s,n,r,o={},a){this.pushWithReply(h=>this.putRef([{el:i,loading:!0,lock:!0}],n,e,{...o,payload:h?.payload}),"event",{type:e,event:n,value:this.extractMeta(i,r,o.value),cid:this.targetComponentID(i,s,o)}).then(({reply:h})=>a&&a(h)).catch(h=>O("Failed to push event",h))}pushFileProgress(e,i,s,n=function(){}){this.liveSocket.withinOwners(e.form,(r,o)=>{r.pushWithReply(null,"progress",{event:e.getAttribute(r.binding(qi)),ref:e.getAttribute(pe),entry_ref:i,progress:s,cid:r.targetComponentID(e.form,o)}).then(()=>n()).catch(a=>O("Failed to push file progress",a))})}pushInput(e,i,s,n,r,o){if(!e.form)throw new Error("form events require the input to be inside a form");let a,h=ue(s)?s:this.targetComponentID(e.form,i,r),c=p=>this.putRef([{el:e,loading:!0,lock:!0},{el:e.form,loading:!0,lock:!0}],n,"change",{...r,payload:p?.payload}),f,g=this.extractMeta(e.form,{},r.value),b={};e instanceof HTMLButtonElement&&(b.submitter=e),e.getAttribute(this.binding("change"))?f=ot(e.form,b,[e.name]):f=ot(e.form,b),u.isUploadInput(e)&&e.files&&e.files.length>0&&W.trackFiles(e,Array.from(e.files)),a=W.serializeUploads(e);let w={type:"form",event:n,value:f,meta:{_target:r._target||"undefined",...g},uploads:a,cid:h};this.pushWithReply(c,"event",w).then(({resp:p})=>{u.isUploadInput(e)&&u.isAutoUpload(e)?Rt.onUnlock(e,()=>{if(W.filesAwaitingPreflight(e).length>0){let[S,A]=c();this.undoRefs(S,n,[e.form]),this.uploadFiles(e.form,n,i,S,h,$=>{o&&o(p),this.triggerAwaitingSubmit(e.form,n),this.undoRefs(S,n)})}}):o&&o(p)}).catch(p=>O("Failed to push input event",p))}triggerAwaitingSubmit(e,i){let s=this.getScheduledSubmit(e);if(s){let[n,r,o,a]=s;this.cancelSubmit(e,i),a()}}getScheduledSubmit(e){return this.formSubmits.find(([i,s,n,r])=>i.isSameNode(e))}scheduleSubmit(e,i,s,n){if(this.getScheduledSubmit(e))return!0;this.formSubmits.push([e,i,s,n])}cancelSubmit(e,i){this.formSubmits=this.formSubmits.filter(([s,n,r,o])=>s.isSameNode(e)?(this.undoRefs(n,i),!1):!0)}disableForm(e,i,s={}){let n=p=>!(Se(p,`${this.binding(ft)}=ignore`,p.form)||Se(p,"data-phx-update=ignore",p.form)),r=p=>p.hasAttribute(this.binding(Bt)),o=p=>p.tagName=="BUTTON",a=p=>["INPUT","TEXTAREA","SELECT"].includes(p.tagName),h=Array.from(e.elements),c=h.filter(r),f=h.filter(o).filter(n),g=h.filter(a).filter(n);f.forEach(p=>{p.setAttribute(Le,p.disabled),p.disabled=!0}),g.forEach(p=>{p.setAttribute(_t,p.readOnly),p.readOnly=!0,p.files&&(p.setAttribute(Le,p.disabled),p.disabled=!0)});let b=c.concat(f).concat(g).map(p=>({el:p,loading:!0,lock:!0})),w=[{el:e,loading:!0,lock:!1}].concat(b).reverse();return this.putRef(w,i,"submit",s)}pushFormSubmit(e,i,s,n,r,o){let a=c=>this.disableForm(e,s,{...r,form:e,payload:c?.payload,submitter:n});u.putPrivate(e,"submitter",n);let h=this.targetComponentID(e,i);if(W.hasUploadsInProgress(e)){let[c,f]=a(),g=()=>this.pushFormSubmit(e,i,s,n,r,o);return this.scheduleSubmit(e,c,r,g)}else if(W.inputsAwaitingPreflight(e).length>0){let[c,f]=a(),g=()=>[c,f,r];this.uploadFiles(e,s,i,c,h,b=>{if(W.inputsAwaitingPreflight(e).length>0)return this.undoRefs(c,s);let w=this.extractMeta(e,{},r.value),p=ot(e,{submitter:n});this.pushWithReply(g,"event",{type:"form",event:s,value:p,meta:w,cid:h}).then(({resp:S})=>o(S)).catch(S=>O("Failed to push form submit",S))})}else if(!(e.hasAttribute(ie)&&e.classList.contains("phx-submit-loading"))){let c=this.extractMeta(e,{},r.value),f=ot(e,{submitter:n});this.pushWithReply(a,"event",{type:"form",event:s,value:f,meta:c,cid:h}).then(({resp:g})=>o(g)).catch(g=>O("Failed to push form submit",g))}}uploadFiles(e,i,s,n,r,o){let a=this.joinCount,h=W.activeFileInputs(e),c=h.length;h.forEach(f=>{let g=new W(f,this,()=>{c--,c===0&&o()}),b=g.entries().map(p=>p.toPreflightPayload());if(b.length===0){c--;return}let w={ref:f.getAttribute(pe),entries:b,cid:this.targetComponentID(f.form,s)};this.log("upload",()=>["sending preflight request",w]),this.pushWithReply(null,"allow_upload",w).then(({resp:p})=>{if(this.log("upload",()=>["got preflight response",p]),g.entries().forEach(S=>{p.entries&&!p.entries[S.ref]&&this.handleFailedEntryPreflight(S.ref,"failed preflight",g)}),p.error||Object.keys(p.entries).length===0)this.undoRefs(n,i),(p.error||[]).map(([A,$])=>{this.handleFailedEntryPreflight(A,$,g)});else{let S=A=>{this.channel.onError(()=>{this.joinCount===a&&A()})};g.initAdapterUpload(p,S,this.liveSocket)}}).catch(p=>O("Failed to push upload",p))})}handleFailedEntryPreflight(e,i,s){if(s.isAutoUpload()){let n=s.entries().find(r=>r.ref===e.toString());n&&n.cancel()}else s.entries().map(n=>n.cancel());this.log("upload",()=>[`error for entry ${e}`,i])}dispatchUploads(e,i,s){let n=this.targetCtxElement(e)||this.el,r=u.findUploadInputs(n).filter(o=>o.name===i);r.length===0?O(`no live file inputs found matching the name "${i}"`):r.length>1?O(`duplicate live file inputs found matching the name "${i}"`):u.dispatchEvent(r[0],fi,{detail:{files:s}})}targetCtxElement(e){if(ue(e)){let[i]=u.findComponentNodeList(this.id,e);return i}else return e||null}pushFormRecovery(e,i,s,n){let r=this.binding("change"),o=i.getAttribute(this.binding("target"))||i,a=i.getAttribute(this.binding(Vt))||i.getAttribute(this.binding("change")),h=Array.from(e.elements).filter(g=>u.isFormInput(g)&&g.name&&!g.hasAttribute(r));if(h.length===0){n();return}h.forEach(g=>g.hasAttribute(pe)&&W.clearFiles(g));let c=h.find(g=>g.type!=="hidden")||h[0],f=0;this.withinTargets(o,(g,b)=>{let w=this.targetComponentID(i,b);f++;let p=new CustomEvent("phx:form-recovery",{detail:{sourceElement:e}});x.exec(p,"change",a,this,c,["push",{_target:c.name,targetView:g,targetCtx:b,newCid:w,callback:()=>{f--,f===0&&n()}}])},s)}pushLinkPatch(e,i,s,n){let r=this.liveSocket.setPendingLink(i),o=e.isTrusted&&e.type!=="popstate",a=s?()=>this.putRef([{el:s,loading:o,lock:!0}],null,"click"):null,h=()=>this.liveSocket.redirect(window.location.href),c=i.startsWith("/")?`${location.protocol}//${location.host}${i}`:i;this.pushWithReply(a,"live_patch",{url:c}).then(({resp:f})=>{this.liveSocket.requestDOMUpdate(()=>{if(f.link_redirect)this.liveSocket.replaceMain(i,null,n,r);else{if(f.redirect)return;this.liveSocket.commitPendingLink(r)&&(this.href=i),this.applyPendingUpdates(),n&&n(r)}})},({error:f,timeout:g})=>h())}getFormsForRecovery(){if(this.joinCount===0)return{};let e=this.binding("change");return u.all(document,`#${CSS.escape(this.id)} form[${e}], [${Ae}="${CSS.escape(this.id)}"] form[${e}]`).filter(i=>i.id).filter(i=>i.elements.length>0).filter(i=>i.getAttribute(this.binding(Vt))!=="ignore").map(i=>{let s=i.cloneNode(!0);xt(s,i,{onBeforeElUpdated:(r,o)=>(u.copyPrivates(r,o),r.getAttribute("form")===i.id?(r.parentNode.removeChild(r),!1):!0)});let n=document.querySelectorAll(`[form="${CSS.escape(i.id)}"]`);return Array.from(n).forEach(r=>{let o=r.cloneNode(!0);xt(o,r),u.copyPrivates(o,r),o.removeAttribute("form"),s.appendChild(o)}),s}).reduce((i,s)=>(i[s.id]=s,i),{})}maybePushComponentsDestroyed(e){let i=e.filter(n=>u.findComponentNodeList(this.id,n).length===0),s=n=>{this.isDestroyed()||O("Failed to push components destroyed",n)};i.length>0&&(i.forEach(n=>this.rendered.resetRender(n)),this.pushWithReply(null,"cids_will_destroy",{cids:i}).then(()=>{this.liveSocket.requestDOMUpdate(()=>{let n=i.filter(r=>u.findComponentNodeList(this.id,r).length===0);n.length>0&&this.pushWithReply(null,"cids_destroyed",{cids:n}).then(({resp:r})=>{this.rendered.pruneCIDs(r.cids)}).catch(s)})}).catch(s))}ownsElement(e){let i=u.closestViewEl(e);return e.getAttribute(ke)===this.id||i&&i.id===this.id||!i&&this.isDead}submitForm(e,i,s,n,r={}){u.putPrivate(e,Xe,!0),Array.from(e.elements).forEach(a=>u.putPrivate(a,Xe,!0)),this.liveSocket.blurActiveElement(this),this.pushFormSubmit(e,i,s,n,r,()=>{this.liveSocket.restorePreviouslyActiveFocus()})}binding(e){return this.liveSocket.binding(e)}pushPortalElementId(e){this.portalElementIds.add(e)}dropPortalElementId(e){this.portalElementIds.delete(e)}destroyPortalElements(){this.liveSocket.unloaded||this.portalElementIds.forEach(e=>{let i=document.getElementById(e);i&&i.remove()})}};var xs=class{constructor(t,e,i={}){if(this.unloaded=!1,!e||e.constructor.name==="Object")throw new Error(` + a phoenix Socket must be provided as the second argument to the LiveSocket constructor. For example: + + import {Socket} from "phoenix" + import {LiveSocket} from "phoenix_live_view" + let liveSocket = new LiveSocket("/live", Socket, {...}) + `);this.socket=new e(t,i),this.bindingPrefix=i.bindingPrefix||zi,this.opts=i,this.params=qe(i.params||{}),this.viewLogger=i.viewLogger,this.metadataCallbacks=i.metadata||{},this.defaults=Object.assign(ct(Gi),i.defaults||{}),this.prevActive=null,this.silenced=!1,this.main=null,this.outgoingMainEl=null,this.clickStartedAtTarget=null,this.linkRef=1,this.roots={},this.href=window.location.href,this.pendingLink=null,this.currentLocation=ct(window.location),this.hooks=i.hooks||{},this.uploaders=i.uploaders||{},this.loaderTimeout=i.loaderTimeout||Wi,this.disconnectedTimeout=i.disconnectedTimeout||Xi,this.reloadWithJitterTimer=null,this.maxReloads=i.maxReloads||xi,this.reloadJitterMin=i.reloadJitterMin||Ii,this.reloadJitterMax=i.reloadJitterMax||Li,this.failsafeJitter=i.failsafeJitter||Di,this.localStorage=i.localStorage||window.localStorage,this.sessionStorage=i.sessionStorage||window.sessionStorage,this.boundTopLevelEvents=!1,this.boundEventNames=new Set,this.blockPhxChangeWhileComposing=i.blockPhxChangeWhileComposing||!1,this.serverCloseRef=null,this.domCallbacks=Object.assign({jsQuerySelectorAll:null,onPatchStart:qe(),onPatchEnd:qe(),onNodeAdded:qe(),onBeforeElUpdated:qe()},i.dom||{}),this.transitions=new Is,this.currentHistoryPosition=parseInt(this.sessionStorage.getItem(it))||0,window.addEventListener("pagehide",s=>{this.unloaded=!0}),this.socket.onOpen(()=>{this.isUnloaded()&&window.location.reload()})}version(){return"1.1.28"}isProfileEnabled(){return this.sessionStorage.getItem(bt)==="true"}isDebugEnabled(){return this.sessionStorage.getItem(tt)==="true"}isDebugDisabled(){return this.sessionStorage.getItem(tt)==="false"}enableDebug(){this.sessionStorage.setItem(tt,"true")}enableProfiling(){this.sessionStorage.setItem(bt,"true")}disableDebug(){this.sessionStorage.setItem(tt,"false")}disableProfiling(){this.sessionStorage.removeItem(bt)}enableLatencySim(t){this.enableDebug(),console.log("latency simulator enabled for the duration of this browser session. Call disableLatencySim() to disable"),this.sessionStorage.setItem(wt,t)}disableLatencySim(){this.sessionStorage.removeItem(wt)}getLatencySim(){let t=this.sessionStorage.getItem(wt);return t?parseInt(t):null}getSocket(){return this.socket}connect(){window.location.hostname==="localhost"&&!this.isDebugDisabled()&&this.enableDebug();let t=()=>{this.resetReloadStatus(),this.joinRootViews()?(this.bindTopLevelEvents(),this.socket.connect()):this.main?this.socket.connect():this.bindTopLevelEvents({dead:!0}),this.joinDeadView()};["complete","loaded","interactive"].indexOf(document.readyState)>=0?t():document.addEventListener("DOMContentLoaded",()=>t())}disconnect(t){clearTimeout(this.reloadWithJitterTimer),this.serverCloseRef&&(this.socket.off(this.serverCloseRef),this.serverCloseRef=null),this.socket.disconnect(t)}replaceTransport(t){clearTimeout(this.reloadWithJitterTimer),this.socket.replaceTransport(t),this.connect()}execJS(t,e,i=null){let s=new CustomEvent("phx:exec",{detail:{sourceElement:t}});this.owner(t,n=>x.exec(s,i,e,n,t))}js(){return wi(this,"js")}unload(){this.unloaded||(this.main&&this.isConnected()&&this.log(this.main,"socket",()=>["disconnect for page nav"]),this.unloaded=!0,this.destroyAllViews(),this.disconnect())}triggerDOM(t,e){this.domCallbacks[t](...e)}time(t,e){if(!this.isProfileEnabled()||!console.time)return e();console.time(t);let i=e();return console.timeEnd(t),i}log(t,e,i){if(this.viewLogger){let[s,n]=i();this.viewLogger(t,e,s,n)}else if(this.isDebugEnabled()){let[s,n]=i();es(t,e,s,n)}}requestDOMUpdate(t){this.transitions.after(t)}asyncTransition(t){this.transitions.addAsyncTransition(t)}transition(t,e,i=function(){}){this.transitions.addTransition(t,e,i)}onChannel(t,e,i){t.on(e,s=>{let n=this.getLatencySim();n?setTimeout(()=>i(s),n):i(s)})}reloadWithJitter(t,e){clearTimeout(this.reloadWithJitterTimer),this.disconnect();let i=this.reloadJitterMin,s=this.reloadJitterMax,n=Math.floor(Math.random()*(s-i+1))+i,r=Z.updateLocal(this.localStorage,window.location.pathname,di,0,o=>o+1);r>=this.maxReloads&&(n=this.failsafeJitter),this.reloadWithJitterTimer=setTimeout(()=>{t.isDestroyed()||t.isConnected()||(t.destroy(),e?e():this.log(t,"join",()=>[`encountered ${r} consecutive reloads`]),r>=this.maxReloads&&this.log(t,"join",()=>[`exceeded ${this.maxReloads} consecutive reloads. Entering failsafe mode`]),this.hasPendingLink()?window.location=this.pendingLink:window.location.reload())},n)}getHookDefinition(t){if(t)return this.maybeInternalHook(t)||this.hooks[t]||this.maybeRuntimeHook(t)}maybeInternalHook(t){return t&&t.startsWith("Phoenix.")&&ls[t.split(".")[1]]}maybeRuntimeHook(t){let e=document.querySelector(`script[${lt}="${CSS.escape(t)}"]`);if(!e)return;let i=window[`phx_hook_${t}`];if(!i||typeof i!="function"){O("a runtime hook must be a function",e);return}let s=i();if(s&&(typeof s=="object"||typeof s=="function"))return s;O("runtime hook must return an object with hook callbacks or an instance of ViewHook",e)}isUnloaded(){return this.unloaded}isConnected(){return this.socket.isConnected()}getBindingPrefix(){return this.bindingPrefix}binding(t){return`${this.getBindingPrefix()}${t}`}channel(t,e){return this.socket.channel(t,e)}joinDeadView(){let t=document.body;if(t&&!this.isPhxView(t)&&!this.isPhxView(document.firstElementChild)){let e=this.newRootView(t);e.setHref(this.getHref()),e.joinDead(),this.main||(this.main=e),window.requestAnimationFrame(()=>{e.execNewMounted(),this.maybeScroll(history.state?.scroll)})}}joinRootViews(){let t=!1;return u.all(document,`${ze}:not([${ke}])`,e=>{if(!this.getRootById(e.id)){let i=this.newRootView(e);u.isPhxSticky(e)||i.setHref(this.getHref()),i.join(),e.hasAttribute(Lt)&&(this.main=i)}t=!0}),t}redirect(t,e,i){i&&Z.setCookie(Wt,i,60),this.unload(),Z.redirect(t,e)}replaceMain(t,e,i=null,s=this.setPendingLink(t)){let n=this.currentLocation.href;this.outgoingMainEl=this.outgoingMainEl||this.main.el;let r=u.findPhxSticky(document)||[],o=u.all(this.outgoingMainEl,`[${this.binding("remove")}]`).filter(h=>!u.isChildOfAny(h,r)),a=u.cloneNode(this.outgoingMainEl,"");this.main.showLoader(this.loaderTimeout),this.main.destroy(),this.main=this.newRootView(a,e,n),this.main.setRedirect(t),this.transitionRemoves(o),this.main.join((h,c)=>{h===1&&this.commitPendingLink(s)&&this.requestDOMUpdate(()=>{o.forEach(f=>f.remove()),r.forEach(f=>a.appendChild(f)),this.outgoingMainEl.replaceWith(a),this.outgoingMainEl=null,i&&i(s),c()})})}transitionRemoves(t,e){let i=this.binding("remove"),s=n=>{n.preventDefault(),n.stopImmediatePropagation()};t.forEach(n=>{for(let r of this.boundEventNames)n.addEventListener(r,s,!0);this.execJS(n,n.getAttribute(i),"remove")}),this.requestDOMUpdate(()=>{t.forEach(n=>{for(let r of this.boundEventNames)n.removeEventListener(r,s,!0)}),e&&e()})}isPhxView(t){return t.getAttribute&&t.getAttribute(ce)!==null}newRootView(t,e,i){let s=new Rs(t,this,null,e,i);return this.roots[s.id]=s,s}owner(t,e){let i,s=u.closestViewEl(t);if(s)i=this.getViewByEl(s);else{if(!t.isConnected)return null;i=this.main}return i&&e?e(i):i}withinOwners(t,e){this.owner(t,i=>e(i,t))}getViewByEl(t){let e=t.getAttribute(fe);return De(this.getRootById(e),i=>i.getDescendentByEl(t))}getRootById(t){return this.roots[t]}destroyAllViews(){for(let t in this.roots)this.roots[t].destroy(),delete this.roots[t];this.main=null}destroyViewByEl(t){let e=this.getRootById(t.getAttribute(fe));e&&e.id===t.id?(e.destroy(),delete this.roots[e.id]):e&&e.destroyDescendent(t.id)}getActiveElement(){return document.activeElement}dropActiveElement(t){this.prevActive&&t.ownsElement(this.prevActive)&&(this.prevActive=null)}restorePreviouslyActiveFocus(){this.prevActive&&this.prevActive!==document.body&&this.prevActive instanceof HTMLElement&&this.prevActive.focus()}blurActiveElement(){this.prevActive=this.getActiveElement(),this.prevActive!==document.body&&this.prevActive instanceof HTMLElement&&this.prevActive.blur()}bindTopLevelEvents({dead:t}={}){this.boundTopLevelEvents||(this.boundTopLevelEvents=!0,this.serverCloseRef=this.socket.onClose(e=>{if(e&&e.code===1e3&&this.main)return this.reloadWithJitter(this.main)}),document.body.addEventListener("click",function(){}),window.addEventListener("pageshow",e=>{e.persisted&&(this.getSocket().disconnect(),this.withPageLoading({to:window.location.href,kind:"redirect"}),window.location.reload())},!0),t||this.bindNav(),this.bindClicks(),t||this.bindForms(),this.bind({keyup:"keyup",keydown:"keydown"},(e,i,s,n,r,o)=>{let a=n.getAttribute(this.binding(Vi)),h=e.key&&e.key.toLowerCase();if(a&&a.toLowerCase()!==h)return;let c={key:e.key,...this.eventMeta(i,e,n)};x.exec(e,i,r,s,n,["push",{data:c}])}),this.bind({blur:"focusout",focus:"focusin"},(e,i,s,n,r,o)=>{if(!o){let a={key:e.key,...this.eventMeta(i,e,n)};x.exec(e,i,r,s,n,["push",{data:a}])}}),this.bind({blur:"blur",focus:"focus"},(e,i,s,n,r,o)=>{if(o==="window"){let a=this.eventMeta(i,e,n);x.exec(e,i,r,s,n,["push",{data:a}])}}),this.on("dragover",e=>e.preventDefault()),this.on("dragenter",e=>{let i=Se(e.target,this.binding(et));!i||!(i instanceof HTMLElement)||ss(e)&&this.js().addClass(i,gt)}),this.on("dragleave",e=>{let i=Se(e.target,this.binding(et));if(!i||!(i instanceof HTMLElement))return;let s=i.getBoundingClientRect();(e.clientX<=s.left||e.clientX>=s.right||e.clientY<=s.top||e.clientY>=s.bottom)&&this.js().removeClass(i,gt)}),this.on("drop",e=>{e.preventDefault();let i=Se(e.target,this.binding(et));if(!i||!(i instanceof HTMLElement))return;this.js().removeClass(i,gt);let s=i.getAttribute(this.binding(et)),n=s&&document.getElementById(s),r=Array.from(e.dataTransfer.files||[]);!n||!(n instanceof HTMLInputElement)||n.disabled||r.length===0||!(n.files instanceof FileList)||(W.trackFiles(n,r,e.dataTransfer),n.dispatchEvent(new Event("input",{bubbles:!0})))}),this.on(fi,e=>{let i=e.target;if(!u.isUploadInput(i))return;let s=Array.from(e.detail.files||[]).filter(n=>n instanceof File||n instanceof Blob);W.trackFiles(i,s),i.dispatchEvent(new Event("input",{bubbles:!0}))}))}eventMeta(t,e,i){let s=this.metadataCallbacks[t];return s?s(e,i):{}}setPendingLink(t){return this.linkRef++,this.pendingLink=t,this.resetReloadStatus(),this.linkRef}resetReloadStatus(){Z.deleteCookie(Wt)}commitPendingLink(t){return this.linkRef!==t?!1:(this.href=this.pendingLink,this.pendingLink=null,!0)}getHref(){return this.href}hasPendingLink(){return!!this.pendingLink}bind(t,e){for(let i in t){let s=t[i];this.on(s,n=>{let r=this.binding(i),o=this.binding(`window-${i}`),a=n.target.getAttribute&&n.target.getAttribute(r);a?this.debounce(n.target,n,s,()=>{this.withinOwners(n.target,h=>{e(n,i,h,n.target,a,null)})}):u.all(document,`[${o}]`,h=>{let c=h.getAttribute(o);this.debounce(h,n,s,()=>{this.withinOwners(h,f=>{e(n,i,f,h,c,"window")})})})})}}bindClicks(){this.on("mousedown",t=>this.clickStartedAtTarget=t.target),this.bindClick("click","click")}bindClick(t,e){let i=this.binding(e);window.addEventListener(t,s=>{let n=null;s.detail===0&&(this.clickStartedAtTarget=s.target);let r=this.clickStartedAtTarget||s.target;n=Se(s.target,i),this.dispatchClickAway(s,r),this.clickStartedAtTarget=null;let o=n&&n.getAttribute(i);if(!o){u.isNewPageClick(s,window.location)&&this.unload();return}n.getAttribute("href")==="#"&&s.preventDefault(),!n.hasAttribute(ie)&&this.debounce(n,s,"click",()=>{this.withinOwners(n,a=>{x.exec(s,"click",o,a,n,["push",{data:this.eventMeta("click",s,n)}])})})},!1)}dispatchClickAway(t,e){let i=this.binding("click-away"),s=e.closest(`[${ve}]`),n=s&&u.byId(s.getAttribute(ve));u.all(document,`[${i}]`,r=>{let o=e;s&&!s.contains(r)&&(o=n),r.isSameNode(o)||r.contains(o)||!x.isVisible(e)||this.withinOwners(r,a=>{let h=r.getAttribute(i);x.isVisible(r)&&x.isInViewport(r)&&x.exec(t,"click",h,a,r,["push",{data:this.eventMeta("click",t,t.target)}])})})}bindNav(){if(!Z.canPushState())return;history.scrollRestoration&&(history.scrollRestoration="manual");let t=null;window.addEventListener("scroll",e=>{clearTimeout(t),t=setTimeout(()=>{Z.updateCurrentState(i=>Object.assign(i,{scroll:window.scrollY}))},100)}),window.addEventListener("popstate",e=>{if(!this.registerNewLocation(window.location))return;let{type:i,backType:s,id:n,scroll:r,position:o}=e.state||{},a=window.location.href,h=o>this.currentHistoryPosition,c=h?i:s||i;this.currentHistoryPosition=o||0,this.sessionStorage.setItem(it,this.currentHistoryPosition.toString()),u.dispatchEvent(window,"phx:navigate",{detail:{href:a,patch:c==="patch",pop:!0,direction:h?"forward":"backward"}}),this.requestDOMUpdate(()=>{let f=()=>{this.maybeScroll(r)};this.main.isConnected()&&c==="patch"&&n===this.main.id?this.main.pushLinkPatch(e,a,null,f):this.replaceMain(a,null,f)})},!1),window.addEventListener("click",e=>{let i=Se(e.target,vt),s=i&&i.getAttribute(vt);if(!s||!this.isConnected()||!this.main||u.wantsNewTab(e))return;let n=i.href instanceof SVGAnimatedString?i.href.baseVal:i.href,r=i.getAttribute(Mi);e.preventDefault(),e.stopImmediatePropagation(),this.pendingLink!==n&&this.requestDOMUpdate(()=>{if(s==="patch")this.pushHistoryPatch(e,n,r,i);else if(s==="redirect")this.historyRedirect(e,n,r,null,i);else throw new Error(`expected ${vt} to be "patch" or "redirect", got: ${s}`);let o=i.getAttribute(this.binding("click"));o&&this.requestDOMUpdate(()=>this.execJS(i,o,"click"))})},!1)}maybeScroll(t){typeof t=="number"&&requestAnimationFrame(()=>{window.scrollTo(0,t)})}dispatchEvent(t,e={}){u.dispatchEvent(window,`phx:${t}`,{detail:e})}dispatchEvents(t){t.forEach(([e,i])=>this.dispatchEvent(e,i))}withPageLoading(t,e){u.dispatchEvent(window,"phx:page-loading-start",{detail:t});let i=()=>u.dispatchEvent(window,"phx:page-loading-stop",{detail:t});return e?e(i):i}pushHistoryPatch(t,e,i,s){if(!this.isConnected()||!this.main.isMain())return Z.redirect(e);this.withPageLoading({to:e,kind:"patch"},n=>{this.main.pushLinkPatch(t,e,s,r=>{this.historyPatch(e,i,r),n()})})}historyPatch(t,e,i=this.setPendingLink(t)){this.commitPendingLink(i)&&(this.currentHistoryPosition++,this.sessionStorage.setItem(it,this.currentHistoryPosition.toString()),Z.updateCurrentState(s=>({...s,backType:"patch"})),Z.pushState(e,{type:"patch",id:this.main.id,position:this.currentHistoryPosition},t),u.dispatchEvent(window,"phx:navigate",{detail:{patch:!0,href:t,pop:!1,direction:"forward"}}),this.registerNewLocation(window.location))}historyRedirect(t,e,i,s,n){let r=n&&t.isTrusted&&t.type!=="popstate";if(r&&n.classList.add("phx-click-loading"),!this.isConnected()||!this.main.isMain())return Z.redirect(e,s);if(/^\/$|^\/[^\/]+.*$/.test(e)){let{protocol:a,host:h}=window.location;e=`${a}//${h}${e}`}let o=window.scrollY;this.withPageLoading({to:e,kind:"redirect"},a=>{this.replaceMain(e,s,h=>{h===this.linkRef&&(this.currentHistoryPosition++,this.sessionStorage.setItem(it,this.currentHistoryPosition.toString()),Z.updateCurrentState(c=>({...c,backType:"redirect"})),Z.pushState(i,{type:"redirect",id:this.main.id,scroll:o,position:this.currentHistoryPosition},e),u.dispatchEvent(window,"phx:navigate",{detail:{href:e,patch:!1,pop:!1,direction:"forward"}}),this.registerNewLocation(window.location)),r&&n.classList.remove("phx-click-loading"),a()})})}registerNewLocation(t){let{pathname:e,search:i}=this.currentLocation;return e+i===t.pathname+t.search?!1:(this.currentLocation=ct(t),!0)}bindForms(){let t=0,e=!1;this.on("submit",i=>{let s=i.target.getAttribute(this.binding("submit")),n=i.target.getAttribute(this.binding("change"));!e&&n&&!s&&(e=!0,i.preventDefault(),this.withinOwners(i.target,r=>{r.disableForm(i.target),window.requestAnimationFrame(()=>{u.isUnloadableFormSubmit(i)&&this.unload(),i.target.submit()})}))}),this.on("submit",i=>{let s=i.target.getAttribute(this.binding("submit"));if(!s){u.isUnloadableFormSubmit(i)&&this.unload();return}i.preventDefault(),i.target.disabled=!0,this.withinOwners(i.target,n=>{x.exec(i,"submit",s,n,i.target,["push",{submitter:i.submitter}])})});for(let i of["change","input"])this.on(i,s=>{if(s instanceof CustomEvent&&(s.target instanceof HTMLInputElement||s.target instanceof HTMLSelectElement||s.target instanceof HTMLTextAreaElement)&&s.target.form===void 0){if(s.detail&&s.detail.dispatcher)throw new Error(`dispatching a custom ${i} event is only supported on input elements inside a form`);return}let n=this.binding("change"),r=s.target;if(this.blockPhxChangeWhileComposing&&s.isComposing){let w=`composition-listener-${i}`;u.private(r,w)||(u.putPrivate(r,w,!0),r.addEventListener("compositionend",()=>{r.dispatchEvent(new Event(i,{bubbles:!0})),u.deletePrivate(r,w)},{once:!0}));return}let o=r.getAttribute(n),a=r.form&&r.form.getAttribute(n),h=o||a;if(!h||r.type==="number"&&r.validity&&r.validity.badInput)return;let c=o?r:r.form,f=t;t++;let{at:g,type:b}=u.private(r,"prev-iteration")||{};g===f-1&&i==="change"&&b==="input"||(u.putPrivate(r,"prev-iteration",{at:f,type:i}),this.debounce(r,s,i,()=>{this.withinOwners(c,w=>{u.putPrivate(r,dt,!0),x.exec(s,"change",h,w,r,["push",{_target:s.target.name,dispatcher:c}])})}))});this.on("reset",i=>{let s=i.target;u.resetForm(s);let n=Array.from(s.elements).find(r=>r.type==="reset");n&&window.requestAnimationFrame(()=>{n.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1}))})})}debounce(t,e,i,s){if(i==="blur"||i==="focusout")return s();let n=this.binding(Ui),r=this.binding(ji),o=this.defaults.debounce.toString(),a=this.defaults.throttle.toString();this.withinOwners(t,h=>{let c=()=>!h.isDestroyed()&&document.body.contains(t);u.debounce(t,e,n,o,r,a,c,()=>{s()})})}silenceEvents(t){this.silenced=!0,t(),this.silenced=!1}on(t,e){this.boundEventNames.add(t),window.addEventListener(t,i=>{this.silenced||e(i)})}jsQuerySelectorAll(t,e,i){let s=this.domCallbacks.jsQuerySelectorAll;return s?s(t,e,i):i()}},Is=class{constructor(){this.transitions=new Set,this.promises=new Set,this.pendingOps=[]}reset(){this.transitions.forEach(t=>{clearTimeout(t),this.transitions.delete(t)}),this.promises.clear(),this.flushPendingOps()}after(t){this.size()===0?t():this.pushPendingOp(t)}addTransition(t,e,i){e();let s=setTimeout(()=>{this.transitions.delete(s),i(),this.flushPendingOps()},t);this.transitions.add(s)}addAsyncTransition(t){this.promises.add(t),t.then(()=>{this.promises.delete(t),this.flushPendingOps()})}pushPendingOp(t){this.pendingOps.push(t)}size(){return this.transitions.size+this.promises.size}flushPendingOps(){if(this.size()>0)return;let t=this.pendingOps.shift();t&&(t(),this.flushPendingOps())}},Ei=xs;(function(){var t=e();function e(){if(typeof window.CustomEvent=="function")return window.CustomEvent;function n(r,o){o=o||{bubbles:!1,cancelable:!1,detail:void 0};var a=document.createEvent("CustomEvent");return a.initCustomEvent(r,o.bubbles,o.cancelable,o.detail),a}return n.prototype=window.Event.prototype,n}function i(n,r){var o=document.createElement("input");return o.type="hidden",o.name=n,o.value=r,o}function s(n,r){var o=n.getAttribute("data-to"),a=i("_method",n.getAttribute("data-method")),h=i("_csrf_token",n.getAttribute("data-csrf")),c=document.createElement("form"),f=document.createElement("input"),g=n.getAttribute("target");c.method=n.getAttribute("data-method")==="get"?"get":"post",c.action=o,c.style.display="none",g?c.target=g:r&&(c.target="_blank"),c.appendChild(h),c.appendChild(a),document.body.appendChild(c),f.type="submit",c.appendChild(f),f.click()}window.addEventListener("click",function(n){var r=n.target;if(!n.defaultPrevented)for(;r&&r.getAttribute;){var o=new t("phoenix.link.click",{bubbles:!0,cancelable:!0});if(!r.dispatchEvent(o))return n.preventDefault(),n.stopImmediatePropagation(),!1;if(r.getAttribute("data-method")&&r.getAttribute("data-to"))return s(r,n.metaKey||n.shiftKey),n.preventDefault(),!1;r=r.parentNode}},!1),window.addEventListener("phoenix.link.click",function(n){var r=n.target.getAttribute("data-confirm");r&&!window.confirm(r)&&n.preventDefault()},!1)})();document.addEventListener("DOMContentLoaded",()=>{let t=document.querySelector("meta[name='csrf-token']").getAttribute("content"),e="bds-panel-sidebar",i="bds-panel-assistant-sidebar",s="bds-ui-language",n="bds-workbench-",r=l=>{if(!l)return[];try{let d=JSON.parse(l);return Array.isArray(d)?d:[]}catch{return[]}},o=l=>{if(!l)return null;try{let d=JSON.parse(l);return d&&typeof d=="object"&&!Array.isArray(d)?d:null}catch{return null}},a=(l,d)=>{let v=l?.closest(".media-thumbnail");v&&(d?v.classList.add("is-loaded"):v.classList.remove("is-loaded"))},h=l=>{l.querySelectorAll(".media-thumbnail-image").forEach(d=>{a(d,!!(d.complete&&d.naturalWidth>0))})},c=l=>String(l||"").toLowerCase(),f=l=>{let d=l.target?.tagName||null;return l.target?.isContentEditable||["INPUT","TEXTAREA","SELECT"].includes(d)},g=(l,d)=>{let v=d.metaKey||d.ctrlKey;return c(d.key)===c(l.key)&&v===!!l.primary&&d.shiftKey===!!l.shift&&d.altKey===!!l.alt},b=(l,d,v)=>Math.max(d,Math.min(l,v)),w=(l,d,v,k)=>{let _=window.localStorage.getItem(l);if(!_)return d;let D=Number.parseInt(_,10);return Number.isNaN(D)?d:b(D,v,k)},p=l=>{let d=document.querySelector(l);if(!d)return 0;let v=Number.parseInt(d.style.width||"0",10);return Number.isNaN(v)?Math.round(d.getBoundingClientRect().width):v},S=(l,d)=>{let v=document.querySelector(l);v&&(v.style.width=`${d}px`,v.classList.remove("is-hidden"))},A=(l,d)=>{let v=l==="assistant"?i:e;window.localStorage.setItem(v,String(d))},$=()=>{let l=document.documentElement.style,d=(N,U)=>{l.setProperty("--bds-titlebar-overlay-left",`${N}px`),l.setProperty("--bds-titlebar-overlay-right",`${U}px`)},v=navigator.windowControlsOverlay;if(!v)return d(0,0),()=>{};let k=()=>{if(!v.visible){d(0,0);return}let N=v.getTitlebarAreaRect(),U=window.innerWidth||document.documentElement.clientWidth||N.right,q=Math.max(0,Math.round(N.left)),se=Math.max(0,Math.round(U-N.right));d(q,se)},_=()=>k(),D=()=>k();return k(),v.addEventListener("geometrychange",_),window.addEventListener("resize",D),()=>{v.removeEventListener("geometrychange",_),window.removeEventListener("resize",D)}},J,T=!1,R=!1,L=null,V=new Map,m=()=>{for(let l of V.values())if(typeof l?.hasTextFocus=="function"&&l.hasTextFocus())return l;return null},y=(l,d,v=d)=>{if(!l)return!1;let k=typeof l.getAction=="function"?l.getAction(d):null;return k&&typeof k.run=="function"?(k.run(),!0):typeof l.trigger=="function"?(l.trigger("bds-menu",v,null),!0):!1},F=l=>{if(typeof document.execCommand!="function")return!1;try{return document.execCommand(l)}catch{return!1}},z=l=>{let d=b(Math.round(l*100)/100,.5,2);window.__bdsAppZoom=d,document.documentElement.style.zoom=String(d)},M=l=>{let d=m();switch(l){case"undo":return d?y(d,"undo"):F("undo");case"redo":return d?y(d,"redo"):F("redo");case"cut":return d?y(d,"editor.action.clipboardCutAction"):F("cut");case"copy":return d?y(d,"editor.action.clipboardCopyAction"):F("copy");case"paste":return d?y(d,"editor.action.clipboardPasteAction"):F("paste");case"delete":return d?y(d,"deleteLeft"):F("delete");case"select_all":return d?y(d,"editor.action.selectAll"):F("selectAll");case"find":return d?y(d,"actions.find"):!1;case"replace":return d?y(d,"editor.action.startFindReplaceAction"):!1;case"reload":case"force_reload":return window.location.reload(),!0;case"reset_zoom":return z(1),!0;case"zoom_in":return z((window.__bdsAppZoom||1)+.1),!0;case"zoom_out":return z((window.__bdsAppZoom||1)-.1),!0;case"toggle_full_screen":return document.fullscreenElement?document.exitFullscreen?.():document.documentElement.requestFullscreen?.(),!0;default:return!1}},X=(l,d)=>window.getComputedStyle(document.documentElement).getPropertyValue(l).trim()||d,I=l=>{if(!l)return null;let d=l.match(/^#([0-9a-f]{6})$/i);if(d)return{r:Number.parseInt(d[1].slice(0,2),16),g:Number.parseInt(d[1].slice(2,4),16),b:Number.parseInt(d[1].slice(4,6),16)};let v=l.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)/i);return v?{r:Number.parseInt(v[1],10),g:Number.parseInt(v[2],10),b:Number.parseInt(v[3],10)}:null},Y=(l,d)=>{let v=I(l);return v?`#${[v.r,v.g,v.b].map(k=>b(k,0,255).toString(16).padStart(2,"0")).join("")}`:d},Ke=l=>new Promise((d,v)=>{let k=document.querySelector(`script[src="${l}"]`);if(k){if(k.dataset.loaded==="true"){d();return}k.addEventListener("load",()=>d(),{once:!0}),k.addEventListener("error",()=>v(new Error(`Failed to load ${l}`)),{once:!0});return}let _=document.createElement("script");_.src=l,_.async=!0,_.addEventListener("load",()=>{_.dataset.loaded="true",d()},{once:!0}),_.addEventListener("error",()=>v(new Error(`Failed to load ${l}`)),{once:!0}),document.head.appendChild(_)}),Ce=(l,d)=>{let v=String(l||"working-tree").replace(/^\/+/,"");return`inmemory://model/git-diff/${d}/${v}`},Ge=l=>{T||(l.languages.register({id:"liquid"}),l.languages.setLanguageConfiguration("liquid",{comments:{blockComment:["{% comment %}","{% endcomment %}"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]}),l.languages.setMonarchTokensProvider("liquid",{defaultToken:"",tokenizer:{root:[[/\{\{-?/,{token:"delimiter.output",next:"@liquidOutput"}],[/\{%-?\s*comment\b[^%]*-?%\}/,{token:"comment.block",next:"@liquidComment"}],[/\{%-?/,{token:"delimiter.tag",next:"@liquidTag"}],[/<=!]=?|\.|:/,"operator"],[/[a-zA-Z_][\w.-]*/,"identifier"],[/[,:()[\]]/,"delimiter"]],liquidComment:[[/\{%-?\s*endcomment\s*-?%\}/,{token:"comment.block",next:"@pop"}],[/./,"comment.block"]],htmlComment:[[/-->/,{token:"comment",next:"@pop"}],[/./,"comment"]],htmlTag:[[/\/>/,{token:"delimiter.html",next:"@pop"}],[/>/,{token:"delimiter.html",next:"@pop"}],[/"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'/,"attribute.value"],[/[\w:-]+/,"attribute.name"],[/=/,"delimiter"]],scriptTag:[[/>/,{token:"delimiter.html",next:"@pop"}],[/"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'/,"attribute.value"],[/[\w:-]+/,"attribute.name"],[/=/,"delimiter"]],styleTag:[[/>/,{token:"delimiter.html",next:"@pop"}],[/"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'/,"attribute.value"],[/[\w:-]+/,"attribute.name"],[/=/,"delimiter"]]}}),T=!0)},Te=l=>{R||(l.languages.register({id:"markdown-with-macros"}),l.languages.setMonarchTokensProvider("markdown-with-macros",{defaultToken:"",tokenPostfix:".md",tokenizer:{root:[[/\[\[[a-zA-Z][\w-]*/,{token:"keyword.macro",next:"@macroParams"}],[/^#{1,6}\s.*$/,"keyword.header"],[/^\s*>+/,"string.quote"],[/^\s*[-+*]\s/,"keyword"],[/^\s*\d+\.\s/,"keyword"],[/^\s*```\w*/,{token:"string.code",next:"@codeblock"}],[/\*\*[^*]+\*\*/,"strong"],[/\*[^*]+\*/,"emphasis"],[/__[^_]+__/,"strong"],[/_[^_]+_/,"emphasis"],[/`[^`]+`/,"variable"],[/!?\[[^\]]*\]\([^)]*\)/,"string.link"],[/!?\[[^\]]*\]\[[^\]]*\]/,"string.link"]],macroParams:[[/\]\]/,{token:"keyword.macro",next:"@root"}],[/[a-zA-Z][\w-]*(?=\s*=)/,"attribute.name"],[/=/,"delimiter"],[/"[^"]*"/,"string"],[/\s+/,"white"],[/[^\]"=\s]+/,"attribute.value"]],codeblock:[[/^\s*```\s*$/,{token:"string.code",next:"@root"}],[/.*$/,"variable.source"]]}}),R=!0)},E=l=>{let d=Y(X("--vscode-editor-background",X("--vscode-input-background","#1e1e1e")),"#1e1e1e"),v=Y(X("--vscode-editor-foreground","#d4d4d4"),"#d4d4d4"),k=Y(X("--vscode-editorLineNumber-foreground","#858585"),"#858585"),_=Y(X("--vscode-editorLineNumber-activeForeground",v),v),D=Y(X("--vscode-editor-selectionBackground","#264f78"),"#264f78"),N=Y(X("--vscode-editor-inactiveSelectionBackground","#3a3d41"),"#3a3d41"),U=Y(X("--vscode-editorCursor-foreground",v),v),q=Y(X("--vscode-panel-border","#3c3c3c"),"#3c3c3c"),se=Y(X("--vscode-editor-lineHighlightBackground",d),d),ne=[d,v,k,_,D,N,U,q].join("|");if(ne===L){l.editor.setTheme("bds-theme");return}l.editor.defineTheme("bds-theme",{base:"vs-dark",inherit:!0,rules:[{token:"keyword.macro",foreground:"C586C0",fontStyle:"bold"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"}],colors:{"editor.background":d,"editor.foreground":v,"editor.lineHighlightBackground":se,"editorCursor.foreground":U,"editor.selectionBackground":D,"editor.inactiveSelectionBackground":N,"editorLineNumber.foreground":k,"editorLineNumber.activeForeground":_,"editorIndentGuide.background1":q,"editorIndentGuide.activeBackground1":v,"editorWidget.border":q,"editorGutter.background":d,focusBorder:q,"input.border":q}}),L=ne,l.editor.setTheme("bds-theme")},C=()=>window.monaco?.editor?(E(window.monaco),Ge(window.monaco),Te(window.monaco),Promise.resolve(window.monaco)):J||(J=Ke("/monaco/vs/loader.js").then(()=>new Promise((l,d)=>{window.require.config({paths:{vs:"/monaco/vs"}}),window.require(["vs/editor/editor.main"],()=>{E(window.monaco),Ge(window.monaco),Te(window.monaco),l(window.monaco)},d)})).catch(l=>{throw J=null,l}),J),H={AppShell:{mounted(){this.shortcuts=r(this.el.dataset.shortcuts),this.currentProjectId=this.el.dataset.projectId||"",this.syncStoredLayout(),this.syncStoredUiLanguage(),this.destroyOverlaySync=$(),this.workbenchStorageKey=l=>l?`${n}${l}`:null,this.restoreStoredWorkbenchSession=()=>{let l=this.el.dataset.projectId||"",d=this.workbenchStorageKey(l);if(!d)return!1;let v=o(window.localStorage.getItem(d));return v?(this.pushEvent("restore_workbench_session",{session:v}),!0):!1},this.persistWorkbenchSession=()=>{let l=this.el.dataset.projectId||"",d=this.workbenchStorageKey(l),v=this.el.dataset.workbenchSession;!d||!v||window.localStorage.setItem(d,v)},this.handleMouseDown=l=>{let d=l.target.closest("[data-role='resize-handle']");if(!d||!this.el.contains(d))return;l.preventDefault();let v=d.dataset.resize,k=l.clientX,_=p(v==="assistant"?"[data-testid='assistant-shell']":"[data-testid='sidebar-shell']"),D=v==="assistant"?280:200,N=v==="assistant"?640:500,U=v==="assistant",q=ne=>{let He=U?k-ne.clientX:ne.clientX-k,Ne=b(_+He,D,N);S(v==="assistant"?"[data-testid='assistant-shell']":"[data-testid='sidebar-shell']",Ne),A(v,Ne)},se=ne=>{let He=U?k-ne.clientX:ne.clientX-k,Ne=b(_+He,D,N);A(v,Ne),this.pushEvent("resize_panel",{target:v,width:Ne}),window.removeEventListener("mousemove",q),window.removeEventListener("mouseup",se)};window.addEventListener("mousemove",q),window.addEventListener("mouseup",se)},this.el.addEventListener("mousedown",this.handleMouseDown),this.handleNativeMenuAction=l=>{let d=l.detail?.action,v=l.detail?.ackId;d&&this.pushEvent("native_menu_action",{action:d},()=>{v&&window.dispatchEvent(new CustomEvent("bds:native-menu-action-ack",{detail:{ackId:v}}))})},this.handleChange=l=>{let d=l.target.closest(".status-bar-language-select");d&&this.el.contains(d)&&window.localStorage.setItem(s,d.value)},this.handleShortcutKeyDown=l=>{f(l)||!this.shortcuts.find(v=>g(v,l))||(l.preventDefault(),l.stopPropagation(),this.pushEvent("shortcut",{key:c(l.key),meta:l.metaKey,ctrl:l.ctrlKey,alt:l.altKey,shift:l.shiftKey,tag:l.target?.tagName||null,contentEditable:l.target?.isContentEditable||!1}))},this.handleThumbnailLoad=l=>{l.target instanceof HTMLImageElement&&l.target.classList.contains("media-thumbnail-image")&&a(l.target,!0)},this.handleThumbnailError=l=>{l.target instanceof HTMLImageElement&&l.target.classList.contains("media-thumbnail-image")&&a(l.target,!1)},this.handleEvent("menu-runtime-command",({action:l})=>{l&&M(String(l))}),window.addEventListener("bds:native-menu-action",this.handleNativeMenuAction),window.addEventListener("keydown",this.handleShortcutKeyDown,!0),this.el.addEventListener("load",this.handleThumbnailLoad,!0),this.el.addEventListener("error",this.handleThumbnailError,!0),this.el.addEventListener("change",this.handleChange),h(this.el),this.restoreStoredWorkbenchSession()},updated(){let l=this.el.dataset.projectId||"";l!==this.currentProjectId&&(this.currentProjectId=l,this.restoreStoredWorkbenchSession())||(h(this.el),this.persistWorkbenchSession())},destroyed(){this.el.removeEventListener("mousedown",this.handleMouseDown),this.el.removeEventListener("load",this.handleThumbnailLoad,!0),this.el.removeEventListener("error",this.handleThumbnailError,!0),this.el.removeEventListener("change",this.handleChange),window.removeEventListener("bds:native-menu-action",this.handleNativeMenuAction),window.removeEventListener("keydown",this.handleShortcutKeyDown,!0),this.destroyOverlaySync&&this.destroyOverlaySync()},syncStoredLayout(){this.pushEvent("sync_layout",{sidebar_width:w(e,p("[data-testid='sidebar-shell']"),200,500),assistant_sidebar_width:w(i,360,280,640)})},syncStoredUiLanguage(){let l=window.localStorage.getItem(s);l&&this.pushEvent("sync_ui_language",{language:l})}},SidebarInteractions:{mounted(){this.handleDblClick=l=>{let d=l.target.closest("[data-testid='sidebar-open-item']");!d||!this.el.contains(d)||this.pushEvent("pin_sidebar_item",{route:d.dataset.route,id:d.dataset.itemId,title:d.dataset.openTitle||"",subtitle:d.dataset.openSubtitle||""})},this.el.addEventListener("dblclick",this.handleDblClick)},destroyed(){this.el.removeEventListener("dblclick",this.handleDblClick)}},SettingsSectionScroll:{mounted(){this.lastTargetId=null,this.scrollToSelectedSection()},updated(){this.scrollToSelectedSection()},scrollToSelectedSection(){let l=this.el.dataset.settingsScrollTarget;!l||l===this.lastTargetId||(this.lastTargetId=l,window.requestAnimationFrame(()=>{let d=document.getElementById(l);d&&this.el.contains(d)&&d.scrollIntoView({block:"start",behavior:"smooth"})}))}},TagsSectionScroll:{mounted(){this.lastTargetId=null,this.scrollToSelectedSection()},updated(){this.scrollToSelectedSection()},scrollToSelectedSection(){let l=this.el.dataset.tagsScrollTarget;!l||l===this.lastTargetId||(this.lastTargetId=l,window.requestAnimationFrame(()=>{let d=document.getElementById(l);d&&this.el.contains(d)&&d.scrollIntoView({block:"start",behavior:"smooth"})}))}},ChatSurface:{mounted(){this.stickToBottom=!0,this.scrollContainer=null,this.autoResize=()=>{let l=this.el.querySelector(".chat-input");if(!l)return;let d=getComputedStyle(l),v=parseFloat(d.getPropertyValue("--chat-input-min-height"))||20,k=parseFloat(d.getPropertyValue("--chat-input-max-height"))||160;if(l.rows=1,l.style.minHeight=`${v}px`,l.value.trim()===""){l.style.height=`${v}px`,l.style.maxHeight=`${v}px`,l.style.overflowY="hidden";return}l.style.maxHeight=`${k}px`,l.style.height="0px";let _=Math.min(Math.max(l.scrollHeight,v),k);l.style.height=`${_}px`,l.style.overflowY=_>=k?"auto":"hidden"},this.syncScrollContainer=()=>{let l=this.el.querySelector(".chat-messages");l!==this.scrollContainer&&(this.scrollContainer&&this.scrollContainer.removeEventListener("scroll",this.handleScroll),this.scrollContainer=l,this.scrollContainer&&this.scrollContainer.addEventListener("scroll",this.handleScroll))},this.scrollToBottom=(l=!1)=>{this.scrollContainer&&(l||this.stickToBottom)&&(this.scrollContainer.scrollTop=this.scrollContainer.scrollHeight)},this.syncExpandedSurfaces=()=>{this.el.querySelectorAll(".chat-inline-surface[data-expanded='true']").forEach(l=>{l.open=!0})},this.surfaceObserver=new MutationObserver(()=>{this.syncExpandedSurfaces()}),this.handleScroll=()=>{if(!this.scrollContainer){this.stickToBottom=!0;return}let l=this.scrollContainer.scrollHeight-this.scrollContainer.scrollTop-this.scrollContainer.clientHeight;this.stickToBottom=l<48},this.handleInput=l=>{l.target.closest(".chat-input")&&(this.stickToBottom=!0,this.autoResize())},this.handleKeyDown=l=>{if(l.target.closest(".chat-input")&&l.key==="Enter"&&!l.shiftKey&&!l.isComposing){l.preventDefault();let d=this.el.querySelector("[data-testid='chat-send-button']");d&&!d.disabled&&d.click()}},this.el.addEventListener("input",this.handleInput),this.el.addEventListener("keydown",this.handleKeyDown),this.syncScrollContainer(),this.syncExpandedSurfaces(),this.surfaceObserver.observe(this.el,{childList:!0,subtree:!0}),this.autoResize(),window.requestAnimationFrame(()=>this.scrollToBottom(!0))},updated(){this.syncScrollContainer(),this.syncExpandedSurfaces(),this.autoResize(),window.requestAnimationFrame(()=>this.scrollToBottom())},destroyed(){this.surfaceObserver.disconnect(),this.el.removeEventListener("input",this.handleInput),this.el.removeEventListener("keydown",this.handleKeyDown),this.scrollContainer&&this.scrollContainer.removeEventListener("scroll",this.handleScroll)}},MenuEditorTree:{mounted(){this.dragItemId=null,this.dragSourceEl=null,this.dropTargetEl=null,this.dropPosition=null,this.clearDropTarget=()=>{this.dropTargetEl&&this.dropTargetEl.classList.remove("is-drop-before","is-drop-after","is-drop-inside"),this.dropTargetEl=null,this.dropPosition=null},this.setDropTarget=(l,d)=>{this.dropTargetEl===l&&this.dropPosition===d||(this.clearDropTarget(),this.dropTargetEl=l,this.dropPosition=d,l.classList.add(`is-drop-${d}`))},this.handleDragStart=l=>{let d=l.target.closest("[data-menu-drag-handle='true']"),v=l.target.closest("[data-menu-item-id]");!d||!v||!this.el.contains(v)||(this.dragItemId=v.dataset.menuItemId||null,this.dragSourceEl=v,v.classList.add("is-dragging"),l.dataTransfer&&(l.dataTransfer.effectAllowed="move",l.dataTransfer.setData("text/plain",this.dragItemId||"")))},this.handleDragOver=l=>{let d=l.target.closest("[data-menu-item-id]");if(!this.dragItemId||!d||!this.el.contains(d)){this.clearDropTarget();return}let v=d.dataset.menuItemId||"";if(!v||v===this.dragItemId){this.clearDropTarget();return}l.preventDefault();let k=d.getBoundingClientRect(),_=l.clientY-k.top,D=d.dataset.menuCanDropInside==="true",N=k.height*.3,U=k.height*.7,q=D&&_>=N&&_<=U?"inside":_{let d=l.target.closest("[data-menu-item-id]");if(!this.dragItemId||!d||!this.el.contains(d)||!this.dropPosition){this.clearDropTarget();return}l.preventDefault(),this.pushEvent("menu_editor_drop_item",{drag_item_id:this.dragItemId,target_item_id:d.dataset.menuItemId,position:this.dropPosition}),this.clearDropTarget()},this.handleDragLeave=l=>{let d=l.relatedTarget;this.dropTargetEl&&(!d||!this.dropTargetEl.contains(d))&&this.clearDropTarget()},this.handleDragEnd=()=>{this.dragSourceEl&&this.dragSourceEl.classList.remove("is-dragging"),this.dragItemId=null,this.dragSourceEl=null,this.clearDropTarget()},this.el.addEventListener("dragstart",this.handleDragStart),this.el.addEventListener("dragover",this.handleDragOver),this.el.addEventListener("drop",this.handleDrop),this.el.addEventListener("dragleave",this.handleDragLeave),this.el.addEventListener("dragend",this.handleDragEnd)},destroyed(){this.el.removeEventListener("dragstart",this.handleDragStart),this.el.removeEventListener("dragover",this.handleDragOver),this.el.removeEventListener("drop",this.handleDrop),this.el.removeEventListener("dragleave",this.handleDragLeave),this.el.removeEventListener("dragend",this.handleDragEnd)}},MonacoEditor:{mounted(){this.textarea=document.getElementById(this.el.dataset.monacoInputId)||this.el.querySelector("textarea"),this.host=this.el.querySelector(".monaco-editor-instance"),this.language=this.el.dataset.monacoLanguage||"plaintext",this.wordWrap=this.el.dataset.monacoWordWrap||"off",this.editorId=this.el.dataset.monacoEditorId||"",this.insertEvent=this.el.dataset.monacoInsertEvent||"",this.syncTimer=null,this.isApplyingRemoteUpdate=!1,this.lastKnownValue=this.textarea?.value||"",this.syncEditorFromTextarea=()=>{if(this.textarea=document.getElementById(this.el.dataset.monacoInputId)||this.el.querySelector("textarea"),!this.textarea||!this.editor)return;let l=this.textarea.value||"";this.editor.getValue()!==l&&(this.isApplyingRemoteUpdate=!0,this.editor.setValue(l),this.isApplyingRemoteUpdate=!1),this.lastKnownValue=l},this.layoutEditorSoon=()=>{window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this.editor&&this.editor.layout()})})},this.waitForMonacoVisibleSize=()=>new Promise(l=>{let d=!1,v=0,k=()=>{let N=this.host?.getBoundingClientRect();return!!(N&&N.width>0&&N.height>0)},_=()=>{d||(d=!0,this.visibleSizeObserver?.disconnect(),this.visibleSizeObserver=null,l())},D=()=>{if(k()||v>=20){_();return}v+=1,window.requestAnimationFrame(D)};if(k()){_();return}window.ResizeObserver&&this.host&&(this.visibleSizeObserver=new ResizeObserver(()=>{k()&&_()}),this.visibleSizeObserver.observe(this.host)),window.requestAnimationFrame(D)}),this.queueSync=()=>{!this.textarea||!this.editor||(window.clearTimeout(this.syncTimer),this.syncTimer=window.setTimeout(()=>{if(!this.textarea||!this.editor)return;let l=this.editor.getValue();this.textarea.value!==l&&(this.lastKnownValue=l,this.textarea.value=l,this.textarea.dispatchEvent(new Event("input",{bubbles:!0})))},120))},this.handleInsert=({id:l,content:d})=>{if(!this.editor||!d||String(l)!==String(this.editorId))return;let v=this.editor.getModel(),k=this.editor.getSelection();if(!v||!k)return;let _=this.editor.getValue(),D=v.getOffsetAt(k.getStartPosition()),N=v.getOffsetAt(k.getEndPosition()),U=_.slice(0,D),q=_.slice(N),se=U!==""&&!U.endsWith(` +`)?` +`:"",ne=q!==""&&!d.endsWith(` +`)?` +`:"",He=`${se}${d}${ne}`;this.editor.executeEdits("bds-insert-content",[{range:k,text:He,forceMoveMarkers:!0}]),this.editor.focus()},C().then(async l=>{!this.host||!this.textarea||(await this.waitForMonacoVisibleSize(),E(l),this.editor=l.editor.create(this.host,{value:this.textarea.value||"",language:this.language,theme:"bds-theme",automaticLayout:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,wordWrap:this.wordWrap,lineNumbers:"on",lineNumbersMinChars:3,fontSize:14,fontFamily:"'Cascadia Code', 'Consolas', 'Courier New', monospace",padding:{top:12,bottom:12},roundedSelection:!1,renderLineHighlight:"line",formatOnPaste:!0,cursorStyle:"line",cursorBlinking:"smooth",quickSuggestions:this.language!=="markdown-with-macros",tabSize:2,insertSpaces:!0}),V.set(this.editorId||this.el.id,this.editor),l.editor.setTheme("bds-theme"),this.syncEditorFromTextarea(),this.layoutEditorSoon(),this.changeSubscription=this.editor.onDidChangeModelContent(()=>{this.isApplyingRemoteUpdate||this.queueSync()}),this.insertEvent&&this.handleEvent(this.insertEvent,this.handleInsert))}).catch(l=>{console.error("Failed to load Monaco editor",l)})},updated(){this.textarea=document.getElementById(this.el.dataset.monacoInputId)||this.el.querySelector("textarea"),this.host=this.el.querySelector(".monaco-editor-instance"),this.language=this.el.dataset.monacoLanguage||this.language||"plaintext",this.wordWrap=this.el.dataset.monacoWordWrap||this.wordWrap||"off",!(!this.editor||!this.textarea)&&(C().then(l=>{E(l),l.editor.setTheme("bds-theme"),this.editor.getModel()?.getLanguageId()!==this.language&&l.editor.setModelLanguage(this.editor.getModel(),this.language),this.editor.updateOptions({wordWrap:this.wordWrap})}),this.syncEditorFromTextarea(),this.layoutEditorSoon())},destroyed(){window.clearTimeout(this.syncTimer),this.visibleSizeObserver?.disconnect(),this.changeSubscription?.dispose(),V.delete(this.editorId||this.el.id),this.editor?.dispose()}},MonacoDiffEditor:{mounted(){this.host=this.el.querySelector(".monaco-diff-editor-instance"),this.originalInput=this.el.querySelector(".monaco-diff-original"),this.modifiedInput=this.el.querySelector(".monaco-diff-modified"),this.filePath=this.el.dataset.monacoDiffFilePath||"working-tree",this.language=this.el.dataset.monacoDiffLanguage||"plaintext",this.viewStyle=this.el.dataset.monacoDiffViewStyle||"inline",this.wordWrap=this.el.dataset.monacoDiffWordWrap||"off",this.hideUnchanged=this.el.dataset.monacoDiffHideUnchanged==="true",this.readValues=()=>({original:this.originalInput?.value||"",modified:this.modifiedInput?.value||""}),this.applyDataset=()=>{this.filePath=this.el.dataset.monacoDiffFilePath||"working-tree",this.language=this.el.dataset.monacoDiffLanguage||"plaintext",this.viewStyle=this.el.dataset.monacoDiffViewStyle||"inline",this.wordWrap=this.el.dataset.monacoDiffWordWrap||"off",this.hideUnchanged=this.el.dataset.monacoDiffHideUnchanged==="true"},this.setModels=l=>{let d=this.readValues();this.originalModel?.dispose(),this.modifiedModel?.dispose(),this.originalModel=l.editor.createModel(d.original,this.language,l.Uri.parse(Ce(this.filePath,"original"))),this.modifiedModel=l.editor.createModel(d.modified,this.language,l.Uri.parse(Ce(this.filePath,"modified"))),this.editor.setModel({original:this.originalModel,modified:this.modifiedModel}),this.lastFilePath=this.filePath},C().then(l=>{this.host&&(E(l),this.editor=l.editor.createDiffEditor(this.host,{theme:"bds-theme",automaticLayout:!0,readOnly:!0,renderSideBySide:this.viewStyle==="side-by-side",minimap:{enabled:!1},scrollBeyondLastLine:!1,lineNumbers:"on",diffCodeLens:!1,originalEditable:!1,wordWrap:this.wordWrap,hideUnchangedRegions:{enabled:this.hideUnchanged},ignoreTrimWhitespace:!1}),this.setModels(l))}).catch(l=>{console.error("Failed to load Monaco diff editor",l)})},updated(){this.host=this.el.querySelector(".monaco-diff-editor-instance"),this.originalInput=this.el.querySelector(".monaco-diff-original"),this.modifiedInput=this.el.querySelector(".monaco-diff-modified"),this.applyDataset(),this.editor&&C().then(l=>{if(E(l),l.editor.setTheme("bds-theme"),this.editor.updateOptions({renderSideBySide:this.viewStyle==="side-by-side",wordWrap:this.wordWrap,hideUnchangedRegions:{enabled:this.hideUnchanged}}),this.lastFilePath!==this.filePath){this.setModels(l);return}let d=this.readValues();this.originalModel&&this.originalModel.getLanguageId()!==this.language&&l.editor.setModelLanguage(this.originalModel,this.language),this.modifiedModel&&this.modifiedModel.getLanguageId()!==this.language&&l.editor.setModelLanguage(this.modifiedModel,this.language),this.originalModel&&this.originalModel.getValue()!==d.original&&this.originalModel.setValue(d.original),this.modifiedModel&&this.modifiedModel.getValue()!==d.modified&&this.modifiedModel.setValue(d.modified)})},destroyed(){this.originalModel?.dispose(),this.modifiedModel?.dispose(),this.editor?.dispose()}}},P=new Ei("/live",Nt,{params:{_csrf_token:t},hooks:H,metadata:{keydown:l=>({key:l.key,meta:l.metaKey,ctrl:l.ctrlKey,alt:l.altKey,shift:l.shiftKey,tag:l.target?.tagName||null,contentEditable:l.target?.isContentEditable||!1})}});P.connect(),window.liveSocket=P});})(); diff --git a/priv/ui/app.css b/priv/ui/app.css deleted file mode 100644 index 5e04f86..0000000 --- a/priv/ui/app.css +++ /dev/null @@ -1,8527 +0,0 @@ -:root { - --accent-color: #007acc; - --accent-color-transparent: rgba(0, 122, 204, 0.25); - --vscode-editor-background: #1e1e1e; - --vscode-editor-foreground: #cccccc; - --vscode-sideBar-background: #252526; - --vscode-activityBar-background: #333333; - --vscode-activityBar-foreground: #ffffff; - --vscode-panel-background: #1e1e1e; - --vscode-titleBar-activeBackground: #252526; - --vscode-titleBar-activeForeground: #cccccc; - --vscode-statusBar-background: #007acc; - --vscode-statusBar-foreground: #ffffff; - --vscode-tab-activeBackground: #1e1e1e; - --vscode-tab-inactiveBackground: #2d2d2d; - --vscode-tab-activeForeground: #ffffff; - --vscode-tab-inactiveForeground: #969696; - --vscode-editorGroupHeader-tabsBackground: #252526; - --vscode-editorGroupHeader-tabsBorder: #1e1e1e; - --vscode-toolbar-hoverBackground: rgba(90, 93, 94, 0.31); - --vscode-toolbar-activeBackground: rgba(99, 102, 103, 0.31); - --vscode-foreground: #cccccc; - --vscode-descriptionForeground: #858585; - --vscode-panel-border: #80808059; - --vscode-sideBar-border: #80808059; - --vscode-tab-border: #252526; - --vscode-focusBorder: #007fd4; - --vscode-input-background: rgba(255, 255, 255, 0.06); - --vscode-input-border: rgba(255, 255, 255, 0.12); - --vscode-list-hoverBackground: #2a2d2e; - --vscode-list-activeSelectionBackground: #094771; - --vscode-list-activeSelectionForeground: #ffffff; - --vscode-activityBarBadge-background: #007acc; - --vscode-activityBarBadge-foreground: #ffffff; - --vscode-testing-iconPassed: #73c991; - --vscode-editorWarning-foreground: #cca700; - --vscode-input-foreground: #cccccc; - --vscode-input-placeholderForeground: #a6a6a6; - --vscode-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; - --vscode-font-size: 13px; - --sidebar-width: 280px; - --assistant-width: 360px; - color-scheme: dark; -} - -* { - box-sizing: border-box; -} - -html, -body { - margin: 0; - width: 100%; - height: 100%; - background: var(--vscode-editor-background); - color: var(--vscode-foreground); -} - -body { - overflow: hidden; - user-select: none; - font-family: var(--vscode-font-family); - font-size: var(--vscode-font-size); -} - -body > [data-phx-session], -body > [data-phx-main] { - width: 100%; - height: 100%; - min-height: 0; -} - -button { - font-family: var(--vscode-font-family); - font-size: var(--vscode-font-size); - color: var(--vscode-button-foreground); - background-color: var(--vscode-button-background); - border: none; - padding: 6px 14px; - cursor: pointer; - border-radius: 2px; -} - -button:hover { - background-color: var(--vscode-button-hoverBackground); -} - -button:focus { - outline: 1px solid var(--vscode-focusBorder); - outline-offset: 2px; -} - -button.secondary { - background-color: var(--vscode-button-secondaryBackground); -} - -button.secondary:hover { - background-color: #4a4d51; -} - -button.compact { - padding: 4px 8px; - font-size: 12px; -} - -button.primary { - background-color: var(--vscode-button-background); - font-weight: 500; -} - -button.primary:hover { - background-color: var(--vscode-button-hoverBackground); -} - -button.success { - background-color: #28a745; -} - -button.success:hover { - background-color: #218838; -} - -button.danger { - background-color: #dc3545; -} - -button.danger:hover { - background-color: #c82333; -} - -button:disabled { - opacity: 0.5; - cursor: not-allowed; -} - -button svg, -button svg * { - pointer-events: none; -} - -.app { - width: 100%; - height: 100%; - display: flex; - flex-direction: column; - background-color: var(--vscode-editor-background); -} - -.app-main { - flex: 1; - display: flex; - overflow: hidden; - min-height: 0; -} - -.app-content { - flex: 1; - display: flex; - flex-direction: column; - overflow: hidden; - min-width: 0; -} - -.window-titlebar { - position: relative; - height: 34px; - display: flex; - align-items: center; - justify-content: space-between; - background-color: var(--vscode-editorGroupHeader-tabsBackground); - border-bottom: 1px solid var(--vscode-editorGroupHeader-tabsBorder); - flex-shrink: 0; - app-region: drag; - -webkit-app-region: drag; - padding-right: calc(10px + var(--bds-titlebar-overlay-right, 0px)); -} - -.window-titlebar-menu-bar { - display: flex; - align-items: center; - height: 100%; - margin-left: 6px; - gap: 2px; - app-region: no-drag; - -webkit-app-region: no-drag; - z-index: 2; -} - -.window-titlebar-menu-group { - position: relative; - display: flex; - align-items: center; - height: 100%; -} - -.window-titlebar-menu-bar.is-hidden { - display: none; -} - -.window-titlebar.is-mac .window-titlebar-menu-bar { - margin-left: max(var(--bds-titlebar-macos-left-inset, 78px), calc(6px + var(--bds-titlebar-overlay-left, 0px))); -} - -.window-titlebar-menu-button { - height: 24px; - border: none; - background: transparent; - color: var(--vscode-titleBar-activeForeground); - padding: 0 8px; - border-radius: 4px; - font-size: 12px; - line-height: 1; - cursor: pointer; -} - -.window-titlebar-menu-button:hover, -.window-titlebar-action-button:hover { - background-color: var(--vscode-toolbar-hoverBackground); -} - -.window-titlebar-menu-button.is-active { - background-color: var(--vscode-toolbar-hoverBackground); -} - -.window-titlebar-menu-button:focus, -.window-titlebar-menu-button:focus-visible, -.window-titlebar-action-button:focus, -.window-titlebar-action-button:focus-visible { - outline: none; - box-shadow: none; -} - -.window-titlebar-menu-dropdown { - position: absolute; - top: 30px; - left: 0; - min-width: 210px; - padding: 6px; - display: flex; - flex-direction: column; - gap: 2px; - background-color: var(--vscode-menu-background, var(--vscode-editorWidget-background)); - border: 1px solid var(--vscode-menu-border, var(--vscode-panel-border)); - border-radius: 6px; - box-shadow: var(--vscode-widget-shadow, 0 8px 24px rgba(0, 0, 0, 0.4)); - app-region: no-drag; - -webkit-app-region: no-drag; - z-index: 10; -} - -.window-titlebar-menu-item { - border: none; - background: transparent; - color: var(--vscode-menu-foreground, var(--vscode-foreground)); - display: flex; - align-items: center; - justify-content: space-between; - gap: 16px; - text-align: left; - border-radius: 4px; - padding: 6px 8px; - font-size: 12px; - cursor: pointer; -} - -.window-titlebar-menu-item:focus, -.window-titlebar-menu-item:focus-visible { - outline: none; - box-shadow: none; - background-color: var(--vscode-toolbar-hoverBackground); -} - -.window-titlebar-menu-item:hover, -.window-titlebar-menu-item.is-keyboard-active { - background-color: var(--vscode-menu-selectionBackground, var(--vscode-toolbar-hoverBackground)); -} - -.window-titlebar-menu-item-accelerator { - opacity: 0.8; -} - -.window-titlebar-menu-separator { - height: 1px; - margin: 4px 2px; - background-color: var(--vscode-menu-separatorBackground, rgba(255, 255, 255, 0.08)); -} - -.window-titlebar-drag-region { - flex: 1; - height: 100%; -} - -.window-titlebar-title { - position: absolute; - left: 50%; - transform: translateX(-50%); - max-width: 45%; - height: 100%; - display: flex; - align-items: center; - justify-content: center; - color: var(--vscode-titleBar-activeForeground); - font-size: 12px; - font-weight: 500; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - user-select: none; - pointer-events: none; -} - -.window-titlebar-actions { - height: 100%; - display: flex; - align-items: center; - margin-right: 6px; - app-region: no-drag; - -webkit-app-region: no-drag; -} - -.window-titlebar-action-button { - display: flex; - align-items: center; - justify-content: center; - width: 30px; - height: 30px; - padding: 0; - line-height: 0; - background: transparent; - border: none; - color: var(--vscode-foreground); - cursor: pointer; - border-radius: 4px; -} - -.window-titlebar-sidebar-icon, -.window-titlebar-panel-icon, -.window-titlebar-assistant-icon { - width: 14px; - height: 14px; - border: 1.5px solid currentColor; - border-radius: 2px; - display: block; - position: relative; - overflow: hidden; -} - -.window-titlebar-sidebar-icon::before { - content: ""; - position: absolute; - top: 0; - bottom: 0; - left: 33.3333%; - width: 1.5px; - transform: translateX(-50%); - background-color: currentColor; -} - -.window-titlebar-panel-icon::before { - content: ""; - position: absolute; - left: 0; - right: 0; - top: 66.6667%; - height: 1.5px; - transform: translateY(-50%); - background-color: currentColor; -} - -.window-titlebar-assistant-icon::before { - content: ""; - position: absolute; - top: 0; - bottom: 0; - left: 66.6667%; - width: 1.5px; - transform: translateX(-50%); - background-color: currentColor; -} - -.window-titlebar-sidebar-pane, -.window-titlebar-panel-pane, -.window-titlebar-assistant-pane { - position: absolute; - background-color: currentColor; - transition: opacity 120ms ease; -} - -.window-titlebar-sidebar-pane { - left: 0; - top: 0; - width: 33.3333%; - height: 100%; -} - -.window-titlebar-panel-pane { - left: 0; - bottom: 0; - width: 100%; - height: 33.3333%; -} - -.window-titlebar-assistant-pane { - right: 0; - top: 0; - width: 33.3333%; - height: 100%; -} - -.window-titlebar-sidebar-icon.is-inactive .window-titlebar-sidebar-pane, -.window-titlebar-panel-icon.is-inactive .window-titlebar-panel-pane, -.window-titlebar-assistant-icon.is-inactive .window-titlebar-assistant-pane { - opacity: 0; -} - -.activity-bar { - width: 48px; - height: 100%; - background-color: var(--vscode-activityBar-background); - display: flex; - flex-direction: column; - justify-content: space-between; - border-right: 1px solid var(--vscode-panel-border); -} - -.activity-bar-top, -.activity-bar-bottom { - display: flex; - flex-direction: column; - align-items: center; - padding: 4px 0; -} - -.activity-bar-item { - width: 48px; - height: 48px; - display: flex; - align-items: center; - justify-content: center; - background: transparent; - border: none; - color: var(--vscode-activityBar-foreground); - opacity: 0.6; - cursor: pointer; - position: relative; - padding: 0; - border-radius: 0; -} - -.activity-bar-item:hover { - opacity: 1; - background: transparent; -} - -.activity-bar-item.active { - opacity: 1; -} - -.activity-bar-item.active::before { - content: ""; - position: absolute; - left: 0; - top: 0; - bottom: 0; - width: 2px; - background-color: var(--vscode-activityBar-foreground); -} - -.activity-bar-badge { - position: absolute; - top: 8px; - right: 8px; - min-width: 16px; - height: 16px; - padding: 0 4px; - font-size: 10px; - font-weight: 600; - background-color: var(--vscode-activityBarBadge-background); - color: var(--vscode-activityBarBadge-foreground); - border-radius: 8px; - display: flex; - align-items: center; - justify-content: center; -} - -.activity-bar-item svg, -.tab-icon svg { - display: block; -} - -.sidebar-shell, -.assistant-sidebar-shell { - display: flex; - min-width: 0; -} - -.sidebar-shell { - width: var(--sidebar-width); -} - -.assistant-sidebar-shell { - width: var(--assistant-width); -} - -.sidebar, -.assistant-sidebar { - width: 100%; - height: 100%; - background: var(--vscode-sideBar-background); - display: flex; - flex-direction: column; - min-width: 0; -} - -.sidebar { - border-right: 1px solid var(--vscode-sideBar-border); -} - -.assistant-sidebar { - border-left: 1px solid var(--vscode-sideBar-border); -} - -.sidebar-shell.is-hidden, -.assistant-sidebar-shell.is-hidden { - width: 0; - overflow: hidden; -} - -.sidebar-shell.is-hidden .resizable-panel-divider, -.assistant-sidebar-shell.is-hidden .resizable-panel-divider { - display: none; -} - -.resizable-panel-divider { - width: 4px; - cursor: col-resize; - background: transparent; - position: relative; -} - -.resizable-panel-divider:hover::after { - background-color: var(--vscode-focusBorder); -} - -.resizable-panel-divider::after { - content: ""; - position: absolute; - top: 0; - bottom: 0; - left: 1px; - width: 1px; - background-color: var(--vscode-panel-border); -} - -.assistant-header { - padding: 10px 12px; - border-bottom: 1px solid var(--vscode-panel-border); -} - -.assistant-header { - display: flex; - flex-direction: column; - gap: 2px; -} - -.assistant-card span, -.panel-entry span, -.editor-meta-row span, -.editor-subtitle, -.sidebar-item span { - color: var(--vscode-descriptionForeground); -} - -.sidebar-content, -.assistant-content { - flex: 1; - overflow: auto; - padding: 8px 0; -} - -.sidebar-section { - padding-bottom: 10px; -} - -.sidebar-section-header { - padding: 0 12px 6px; - font-size: 11px; - text-transform: uppercase; - letter-spacing: 0.04em; - color: var(--vscode-descriptionForeground); -} - -.sidebar-item { - width: 100%; - display: flex; - flex-direction: column; - align-items: flex-start; - gap: 2px; - padding: 7px 12px; - border: none; - background: transparent; - color: var(--vscode-foreground); - cursor: pointer; - text-align: left; -} - -.sidebar-item:hover { - background: var(--vscode-list-hoverBackground); -} - -.sidebar-item.selected { - background: var(--vscode-list-activeSelectionBackground); - color: var(--vscode-list-activeSelectionForeground); -} - -.sidebar-badge { - margin-top: 2px; - padding: 1px 6px; - border-radius: 10px; - font-size: 11px; - background: rgba(255, 255, 255, 0.08); -} - -.tab-bar { - display: flex; - align-items: center; - background-color: var(--vscode-editorGroupHeader-tabsBackground); - border-bottom: 1px solid var(--vscode-editorGroupHeader-tabsBorder); - height: 35px; - overflow: hidden; - flex-shrink: 0; - position: relative; -} - -.tab-bar-tabs { - display: flex; - align-items: center; - height: 100%; - overflow-x: auto; - overflow-y: hidden; - flex: 1; -} - -.tab-bar-tabs::-webkit-scrollbar { - height: 0; - display: none; -} - -.tab-bar-empty { - display: flex; - align-items: center; - height: 100%; - padding: 0 12px; - color: var(--vscode-descriptionForeground); - font-size: 12px; -} - -.tab { - display: flex; - align-items: center; - gap: 4px; - padding: 0 6px 0 10px; - height: 100%; - min-width: 100px; - max-width: 180px; - cursor: pointer; - background-color: var(--vscode-tab-inactiveBackground); - border: none; - border-right: 1px solid var(--vscode-tab-border); - color: var(--vscode-tab-inactiveForeground); - font-size: 13px; - user-select: none; - position: relative; - flex-shrink: 0; -} - -.tab-select { - display: flex; - align-items: center; - gap: 4px; - min-width: 0; - flex: 1; - height: 100%; - padding: 0; - background: transparent; - border: none; - color: inherit; - font: inherit; - cursor: inherit; -} - -.tab:hover { - background-color: var(--vscode-list-hoverBackground); -} - -.tab.active { - background-color: var(--vscode-tab-activeBackground); - color: var(--vscode-tab-activeForeground); -} - -.tab.active::after { - content: ""; - position: absolute; - top: 0; - left: 0; - right: 0; - height: 1px; - background-color: var(--vscode-focusBorder); -} - -.tab.transient .tab-title { - font-style: italic; -} - -.tab-actions { - display: flex; - align-items: center; - gap: 2px; - margin-left: auto; - flex-shrink: 0; -} - -.tab-dirty-indicator { - color: var(--vscode-editorWarning-foreground, #e2c08d); - font-size: 10px; - line-height: 1; -} - -.tab-icon { - display: flex; - align-items: center; - justify-content: center; - flex-shrink: 0; - opacity: 0.85; -} - -.tab-title, -.status-bar-item { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.tab-close { - width: 20px; - height: 20px; - display: flex; - align-items: center; - justify-content: center; - font-size: 15px; - line-height: 1; - color: var(--vscode-icon-foreground, #c5c5c5); - border-radius: 3px; - cursor: pointer; - flex-shrink: 0; - border: none; - background: transparent; - padding: 0; - opacity: 0; -} - -.tab:hover .tab-close { - opacity: 0.7; -} - -.tab.active .tab-close { - opacity: 0.7; -} - -.tab-close:hover { - opacity: 1 !important; - background-color: var(--vscode-toolbar-hoverBackground); - color: var(--vscode-tab-activeForeground); -} - -.tab-close:active { - background-color: var(--vscode-toolbar-activeBackground, rgba(99, 102, 103, 0.31)); -} - -.tab.dirty .tab-dirty-indicator { - display: block; -} - -.tab.dirty .tab-close { - display: none; -} - -.tab.dirty:hover .tab-close { - display: flex; - opacity: 0.7; -} - -.tab.dirty:hover .tab-dirty-indicator { - display: none; -} - -.tab:focus-visible { - outline: 1px solid var(--vscode-focusBorder, #007fd4); - outline-offset: -1px; -} - -.output-item-details { - margin: 4px 0 0; - padding: 8px; - border-radius: 4px; - background: rgba(255, 255, 255, 0.03); - color: inherit; - font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; - white-space: pre-wrap; - user-select: text; -} - -.editor-shell { - flex: 1; - min-height: 0; - overflow: auto; - background: var(--vscode-editor-background); -} - -.editor-frame { - display: grid; - grid-template-columns: minmax(0, 1fr) 240px; - gap: 16px; - padding: 14px 16px; -} - -.editor-main, -.editor-meta, -.panel-shell, -.assistant-card { - min-width: 0; -} - -.editor-kicker { - font-size: 11px; - text-transform: uppercase; - letter-spacing: 0.04em; - color: var(--vscode-descriptionForeground); -} - -.editor-title { - margin: 10px 0 6px; - font-size: 24px; - font-weight: 600; -} - -.editor-subtitle { - margin: 0 0 14px; -} - -.editor-toolbar { - display: flex; - gap: 8px; - margin-bottom: 14px; -} - -.editor-toolbar-button { - border: 1px solid var(--vscode-panel-border); - background: transparent; - color: var(--vscode-foreground); - padding: 4px 8px; - border-radius: 3px; -} - -.editor-toolbar-button:hover, -.panel-tab:hover { - background: var(--vscode-toolbar-hoverBackground); -} - -.editor-section { - padding-top: 4px; -} - -.editor-section h2 { - margin: 0 0 8px; - font-size: 16px; -} - -.editor-list { - margin: 0; - padding-left: 18px; - line-height: 1.5; -} - -.editor-list.compact li { - margin-bottom: 6px; -} - -.editor-meta { - border-left: 1px solid var(--vscode-panel-border); - padding-left: 16px; -} - -.editor-meta-row { - display: flex; - flex-direction: column; - gap: 3px; - padding: 10px 0; - border-bottom: 1px solid var(--vscode-panel-border); -} - -.post-editor.editor, -.scripts-view-shell.editor, -.templates-view-shell.editor { - flex: 1; - display: flex; - flex-direction: column; - background-color: var(--vscode-editor-background); - overflow: hidden; -} - -.post-editor .editor-header, -.scripts-view-shell.editor .editor-header, -.templates-view-shell.editor .editor-header { - display: flex; - align-items: center; - justify-content: space-between; - gap: 12px; - padding: 0 12px; - min-height: 35px; - background-color: var(--vscode-tab-activeBackground); - border-bottom: 1px solid var(--vscode-panel-border); -} - -.post-editor .editor-tabs, -.scripts-view-shell.editor .editor-tabs, -.templates-view-shell.editor .editor-tabs { - display: flex; - align-items: center; - gap: 2px; - min-width: 0; -} - -.post-editor .editor-tab, -.scripts-view-shell.editor .editor-tab, -.templates-view-shell.editor .editor-tab { - display: flex; - align-items: center; - gap: 6px; - min-width: 0; - padding: 6px 12px; - background-color: var(--vscode-tab-inactiveBackground); - color: var(--vscode-tab-inactiveForeground); - font-size: 13px; - border-radius: 4px 4px 0 0; -} - -.post-editor .editor-tab.active, -.scripts-view-shell.editor .editor-tab.active, -.templates-view-shell.editor .editor-tab.active { - background-color: var(--vscode-tab-activeBackground); - color: var(--vscode-tab-activeForeground); -} - -.post-editor .editor-tab-title, -.scripts-view-shell.editor .editor-tab-title, -.templates-view-shell.editor .editor-tab-title { - min-width: 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.post-editor .editor-tab-dirty { - color: var(--vscode-notificationsWarningIcon-foreground, var(--vscode-editorWarning-foreground)); - font-size: 10px; -} - -.post-editor .editor-tab-meta { - color: var(--vscode-descriptionForeground); - font-size: 11px; - white-space: nowrap; -} - -.post-editor .editor-actions, -.scripts-view-shell.editor .editor-actions, -.templates-view-shell.editor .editor-actions { - display: flex; - align-items: center; - gap: 8px; -} - -.post-editor .quick-actions-wrapper { - position: relative; - display: inline-block; -} - -.post-editor .quick-actions-btn { - display: flex; - align-items: center; - gap: 4px; - white-space: nowrap; -} - -.post-editor .quick-actions-btn-icon { - font-size: 12px; - line-height: 1; -} - -.post-editor .quick-actions-menu { - position: absolute; - top: 100%; - right: 0; - margin-top: 4px; - min-width: 280px; - background: var(--vscode-dropdown-background, #3c3c3c); - border: 1px solid var(--vscode-dropdown-border, #454545); - border-radius: 6px; - box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); - z-index: 1000; - overflow: hidden; -} - -.post-editor .quick-actions-divider { - height: 1px; - background: var(--vscode-dropdown-border, #454545); -} - -.post-editor .quick-action-item { - display: flex; - align-items: flex-start; - gap: 10px; - width: 100%; - padding: 10px 12px; - background: none; - border: none; - color: var(--vscode-dropdown-foreground, #ccc); - cursor: pointer; - text-align: left; - transition: background 0.1s; -} - -.post-editor .quick-action-item:hover:not(:disabled) { - background: var(--vscode-list-hoverBackground, #2a2d2e); -} - -.post-editor .quick-action-item:disabled { - opacity: 0.5; - cursor: not-allowed; -} - -.post-editor .quick-action-icon { - font-size: 16px; - flex-shrink: 0; - margin-top: 2px; -} - -.post-editor .quick-action-text { - display: flex; - flex-direction: column; - gap: 2px; -} - -.post-editor .quick-action-text strong { - font-size: 13px; - font-weight: 500; -} - -.post-editor .quick-action-text small { - font-size: 11px; - opacity: 0.7; -} - -.post-editor .status-badge, -.scripts-view-shell.editor .status-badge, -.templates-view-shell.editor .status-badge { - padding: 2px 8px; - border-radius: 10px; - font-size: 11px; - font-weight: 500; - text-transform: uppercase; -} - -.post-editor .status-badge.status-draft, -.scripts-view-shell.editor .status-badge.status-draft, -.templates-view-shell.editor .status-badge.status-draft { - background-color: rgba(204, 167, 0, 0.2); - color: var(--vscode-notificationsWarningIcon-foreground, var(--vscode-editorWarning-foreground)); -} - -.post-editor .status-badge.status-published, -.scripts-view-shell.editor .status-badge.status-published, -.templates-view-shell.editor .status-badge.status-published { - background-color: rgba(115, 201, 145, 0.2); - color: var(--vscode-testing-iconPassed); -} - -.post-editor .status-badge.status-archived, -.scripts-view-shell.editor .status-badge.status-archived, -.templates-view-shell.editor .status-badge.status-archived { - background-color: rgba(133, 133, 133, 0.2); - color: var(--vscode-descriptionForeground); -} - -.post-editor .auto-save-indicator { - font-size: 11px; - color: var(--vscode-descriptionForeground); - font-style: italic; -} - -.post-editor .editor-content { - flex: 1; - display: flex; - flex-direction: column; - gap: 16px; - padding: 16px; - overflow-y: auto; -} - -.post-editor .metadata-toggle-header { - display: flex; - align-items: center; - gap: 8px; -} - -.post-editor .metadata-toggle { - display: flex; - align-items: center; - gap: 8px; - padding: 6px 4px; - background: none; - border: none; - color: var(--vscode-descriptionForeground); - font-size: 11px; - font-weight: 500; - text-transform: uppercase; - letter-spacing: 0.5px; - cursor: pointer; - transition: color 0.15s; - flex-shrink: 0; -} - -.post-editor .metadata-toggle:hover { - color: var(--vscode-foreground); -} - -.post-editor .metadata-toggle-chevron { - font-size: 10px; -} - -.post-editor .editor-header-row { - display: flex; - gap: 16px; - align-items: flex-start; -} - -.post-editor .editor-header-row.is-collapsed { - display: none; -} - -.post-editor .editor-meta { - display: flex; - flex-direction: column; - gap: 8px; - flex: 1; - min-width: 0; -} - -.post-editor .editor-media-panel { - width: 200px; - flex-shrink: 0; -} - -.post-editor .editor-field { - display: flex; - flex-direction: column; - gap: 4px; - flex: 1; - min-width: 200px; -} - -.post-editor .editor-field label, -.post-editor .editor-body label, -.post-editor .post-editor-links-label { - font-size: 11px; - font-weight: 500; - color: var(--vscode-descriptionForeground); - text-transform: uppercase; - letter-spacing: 0.5px; -} - -.post-editor .editor-checkbox-label { - display: inline-flex; - align-items: center; - gap: 8px; - text-transform: none; - letter-spacing: 0; - color: var(--vscode-foreground); -} - -.post-editor .post-editor-input, -.post-editor .post-editor-textarea { - width: 100%; - padding: 8px 10px; - border: 1px solid var(--vscode-input-border, var(--vscode-panel-border)); - border-radius: 4px; - background: var(--vscode-input-background, rgba(255, 255, 255, 0.06)); - color: var(--vscode-input-foreground, var(--vscode-foreground)); - font: inherit; -} - -.post-editor .post-editor-input.is-readonly { - opacity: 0.7; - cursor: not-allowed; -} - -.post-editor .post-editor-textarea { - line-height: 1.5; - resize: vertical; -} - -.post-editor .post-editor-excerpt { - min-height: 96px; -} - -.post-editor .tag-input-container { - position: relative; - width: 100%; -} - -.post-editor .tag-input-container.is-disabled { - opacity: 0.72; -} - -.post-editor .tag-input-wrapper { - display: flex; - flex-wrap: wrap; - align-items: center; - gap: 6px; - padding: 6px 8px; - min-height: 38px; - border: 1px solid var(--vscode-input-border, #3c3c3c); - border-radius: 4px; - background: var(--vscode-input-background, #3c3c3c); - cursor: text; -} - -.post-editor .tag-input-wrapper:focus-within { - border-color: var(--vscode-focusBorder, #007fd4); - outline: none; -} - -.post-editor .tag-chip { - display: inline-flex; - align-items: center; - gap: 4px; - padding: 3px 8px; - font-size: 0.85rem; - background: var(--vscode-badge-background, #4d4d4d); - border: 1px solid var(--vscode-widget-border, #454545); - border-radius: 4px; - color: var(--vscode-badge-foreground, #ffffff); - white-space: nowrap; -} - -.post-editor .tag-chip.has-color { - border-radius: 12px; - padding: 3px 10px; -} - -.post-editor .tag-chip-remove { - display: inline-flex; - align-items: center; - justify-content: center; - width: 16px; - height: 16px; - padding: 0; - margin-left: 2px; - border: none; - background: transparent; - color: inherit; - font-size: 1rem; - line-height: 1; - cursor: pointer; - opacity: 0.6; - border-radius: 50%; - transition: opacity 0.15s, background 0.15s; -} - -.post-editor .tag-chip-remove:hover { - opacity: 1; - background: rgba(0, 0, 0, 0.1); -} - -.post-editor .tag-chip.has-color .tag-chip-remove:hover { - background: rgba(0, 0, 0, 0.2); -} - -.post-editor .tag-input-field { - flex: 1; - min-width: 120px; - padding: 2px 4px; - border: none; - background: transparent; - color: var(--vscode-input-foreground, #cccccc); - font-family: inherit; - font-size: 0.9rem; - outline: none; -} - -.post-editor .tag-input-field::placeholder { - color: var(--vscode-input-placeholderForeground, #a6a6a6); -} - -.post-editor .tag-input-field:disabled { - cursor: not-allowed; -} - -.post-editor .tag-suggestions { - position: absolute; - top: 100%; - left: 0; - right: 0; - margin-top: 4px; - padding: 4px; - background: var(--vscode-dropdown-background, #3c3c3c); - border: 1px solid var(--vscode-widget-border, #454545); - border-radius: 6px; - box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.2); - z-index: 1000; - max-height: 240px; - overflow-y: auto; -} - -.post-editor .tag-suggestion { - display: flex; - align-items: center; - gap: 8px; - width: 100%; - padding: 8px 12px; - border: none; - background: transparent; - color: var(--vscode-dropdown-foreground, #f0f0f0); - font-family: inherit; - font-size: 0.9rem; - text-align: left; - cursor: pointer; - border-radius: 4px; - transition: background 0.1s; -} - -.post-editor .tag-suggestion:hover, -.post-editor .tag-suggestion.selected { - background: var(--vscode-list-hoverBackground, #2a2d2e); -} - -.post-editor .tag-suggestion-color { - width: 12px; - height: 12px; - border-radius: 50%; - flex-shrink: 0; -} - -.post-editor .tag-suggestion-name { - flex: 1; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.post-editor .tag-suggestion.create-new { - border-top: 1px solid var(--vscode-widget-border, #454545); - margin-top: 4px; - padding: 6px 8px; - padding-top: 12px; - color: var(--vscode-notificationsInfoIcon-foreground, #75beff); -} - -.post-editor .tag-suggestion.create-new:first-child { - border-top: none; - margin-top: 0; - padding-top: 8px; -} - -.post-editor .tag-suggestion-icon { - display: inline-flex; - align-items: center; - justify-content: center; - width: 18px; - height: 18px; - border: 1px dashed currentColor; - border-radius: 4px; - font-size: 0.9rem; - font-weight: 600; -} - -.post-editor .editor-field-row { - display: flex; - gap: 12px; - width: 100%; -} - -.post-editor .editor-language-row { - display: flex; - gap: 6px; - align-items: center; - flex-wrap: nowrap; -} - -.post-editor .editor-language-row select { - flex: 1; - min-width: 0; -} - -.post-editor .editor-translations-flags { - display: flex; - gap: 4px; - align-items: center; - flex: 1; - min-width: 0; - overflow-x: auto; -} - -.post-editor .editor-translation-flag { - display: inline-flex; - align-items: center; - justify-content: center; - width: 24px; - height: 24px; - padding: 0; - border: 1px solid transparent; - border-radius: 999px; - background: transparent; - font-size: 14px; - line-height: 1; - cursor: pointer; - flex: 0 0 auto; -} - -.post-editor .editor-translation-flag.status-draft { - opacity: 0.82; -} - -.post-editor .editor-translation-flag.status-archived { - opacity: 0.45; - filter: grayscale(0.35); -} - -.post-editor .editor-translation-flag.active { - border-color: var(--vscode-testing-iconQueued, #cca700); - background: color-mix(in srgb, var(--vscode-testing-iconQueued, #cca700) 14%, transparent); -} - -.post-editor .editor-translation-flag:hover { - background: color-mix(in srgb, var(--vscode-list-hoverBackground) 75%, transparent); -} - -.post-editor .post-editor-links-panel, -.post-editor .post-editor-side-panel { - padding: 12px; - border: 1px solid var(--vscode-panel-border); - border-radius: 8px; - background: color-mix(in srgb, var(--vscode-editor-background) 82%, white 3%); -} - -.post-editor .post-editor-side-panel-header { - display: flex; - align-items: center; - justify-content: space-between; - gap: 10px; -} - -.post-editor .post-editor-links-columns { - display: flex; - gap: 18px; - align-items: flex-start; - margin-top: 10px; -} - -.post-editor .post-editor-links-columns > div { - flex: 1; - min-width: 0; -} - -.post-editor .post-editor-empty, -.post-editor .post-editor-media-meta { - color: var(--vscode-descriptionForeground); - font-size: 12px; -} - -.post-editor .post-editor-media-list { - list-style: none; - margin: 10px 0 0; - padding: 0; - display: flex; - flex-direction: column; - gap: 8px; -} - -.post-editor .post-editor-media-item { - display: flex; - flex-direction: column; - gap: 2px; - padding: 8px 10px; - border-radius: 6px; - background: rgba(255, 255, 255, 0.03); -} - -.post-editor .editor-body { - flex: 1; - display: flex; - flex-direction: column; - gap: 4px; - min-height: 320px; -} - -.post-editor .editor-toolbar { - display: grid; - grid-template-columns: 1fr auto 1fr; - align-items: center; - gap: 8px; - margin-bottom: 8px; -} - -.post-editor .editor-toolbar-left { - display: flex; - align-items: center; - justify-content: flex-start; -} - -.post-editor .editor-toolbar-center { - display: flex; - align-items: center; - justify-content: center; -} - -.post-editor .editor-toolbar-right { - display: flex; - align-items: center; - justify-content: flex-end; - gap: 6px; - min-width: 0; - flex-wrap: wrap; -} - -.post-editor .editor-mode-toggle { - display: flex; - gap: 4px; -} - -.post-editor .editor-mode-toggle button, -.post-editor .editor-toolbar-button { - padding: 4px 12px; - font-size: 12px; - border-radius: 4px; - border: none; - cursor: pointer; - transition: background-color 0.15s; -} - -.post-editor .editor-mode-toggle button { - background-color: var(--vscode-button-secondaryBackground, rgba(255, 255, 255, 0.08)); - color: var(--vscode-button-secondaryForeground, var(--vscode-foreground)); -} - -.post-editor .editor-mode-toggle button:hover, -.post-editor .editor-toolbar-button:hover { - background-color: var(--vscode-button-secondaryHoverBackground, var(--vscode-toolbar-hoverBackground)); -} - -.post-editor .editor-mode-toggle button.active { - background-color: var(--vscode-button-background, var(--accent-color)); - color: var(--vscode-button-foreground, #ffffff); -} - -.post-editor .editor-toolbar-button { - background: var(--vscode-button-secondaryBackground, rgba(255, 255, 255, 0.08)); - color: var(--vscode-button-secondaryForeground, var(--vscode-foreground)); -} - -.post-editor .editor-excerpt-panel.is-collapsed { - display: none; -} - -.post-editor .gallery-button { - padding: 4px 12px; - font-size: 12px; - border-radius: 4px; - background-color: var(--vscode-button-secondaryBackground); - color: var(--vscode-button-secondaryForeground); - border: none; - cursor: pointer; - transition: background-color 0.15s; -} - -.post-editor .gallery-button:hover { - background-color: var(--vscode-button-secondaryHoverBackground); -} - -.post-editor .insert-post-link-button, -.post-editor .insert-media-button { - padding: 4px 8px; - font-size: 14px; - border-radius: 4px; - background-color: var(--vscode-button-secondaryBackground); - color: var(--vscode-button-secondaryForeground); - border: none; - cursor: pointer; - transition: background-color 0.15s; -} - -.post-editor .insert-post-link-button:hover, -.post-editor .insert-media-button:hover { - background-color: var(--vscode-button-secondaryHoverBackground); -} - -.post-editor .editor-preview { - flex: 1; - background-color: var(--vscode-input-background); - border-radius: 4px; - overflow: hidden; - position: relative; - min-height: 240px; - padding: 0; - border: none; -} - -.post-editor .editor-preview { - flex: 1; - min-height: 240px; - padding: 14px; - background-color: var(--vscode-input-background); - border: 1px solid var(--vscode-panel-border); - border-radius: 4px; - overflow: auto; - line-height: 1.6; -} - -.post-editor .editor-preview-frame { - width: 100%; - min-height: 520px; - border: none; - background: #ffffff; -} - -.post-editor .post-editor-markdown-surface { - position: relative; - flex: 1; - min-height: 380px; - border: 1px solid var(--vscode-input-border, var(--vscode-panel-border)); - border-radius: 4px; - background: var(--vscode-input-background); - overflow: hidden; -} - -.post-editor .monaco-editor-shell, -.scripts-monaco.monaco-editor-shell, -.templates-monaco.monaco-editor-shell { - position: relative; -} - -.monaco-editor-instance { - width: 100%; - height: 100%; - min-height: 100%; -} - -.post-editor .monaco-editor-instance { - min-height: 380px; -} - -.scripts-monaco .monaco-editor-instance, -.templates-monaco .monaco-editor-instance { - min-height: 420px; -} - -.monaco-editor-input { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - white-space: pre; - border: 0; -} - -.post-editor .editor-footer { - display: flex; - align-items: center; - gap: 16px; - padding: 8px 16px; - border-top: 1px solid var(--vscode-panel-border); - background-color: var(--vscode-sideBar-background); - color: var(--vscode-descriptionForeground); - font-size: 12px; - flex-wrap: wrap; -} - -@media (max-width: 980px) { - .post-editor .editor-header, - .scripts-view-shell.editor .editor-header, - .templates-view-shell.editor .editor-header, - .post-editor .metadata-toggle-header, - .post-editor .editor-toolbar { - display: flex; - flex-direction: column; - align-items: flex-start; - } - - .post-editor .editor-header-row, - .post-editor .editor-field-row, - .post-editor .post-editor-links-columns { - flex-direction: column; - } - - .post-editor .editor-media-panel { - width: 100%; - } - - .post-editor .editor-toolbar-right, - .post-editor .editor-actions, - .scripts-view-shell.editor .editor-actions, - .templates-view-shell.editor .editor-actions { - justify-content: flex-start; - } -} - -.panel-shell { - height: 200px; - border-top: 1px solid var(--vscode-panel-border); - background: var(--vscode-panel-background); - display: flex; - flex-direction: column; -} - -.panel-shell.is-hidden { - display: none; -} - -.editor-toolbar-button.is-destructive { - color: #f48771; -} - -.shell-overlay-backdrop, -.gallery-overlay-backdrop { - position: fixed; - inset: 0; - background: rgba(0, 0, 0, 0.68); - display: flex; - align-items: center; - justify-content: center; - pointer-events: auto; - z-index: 10000; -} - -.shell-overlay-dismiss { - position: absolute; - inset: 0; - border: none; - background: transparent; - padding: 0; -} - -.gallery-overlay { - position: relative; - width: min(980px, calc(100vw - 48px)); - max-height: calc(100vh - 48px); - display: flex; - flex-direction: column; - overflow: hidden; - background: #1e1e1e; - border: 1px solid #3c3c3c; - border-radius: 8px; - box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4); - z-index: 1; -} - -.insert-modal-media-grid { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); - gap: 12px; - padding: 16px; -} - -.insert-modal-media-item { - display: flex; - flex-direction: column; - gap: 8px; - border: 1px solid #3c3c3c; - border-radius: 8px; - background: #252526; - color: inherit; - padding: 10px; - text-align: left; -} - -.insert-modal-media-thumb { - width: 100%; - min-height: 112px; - border-radius: 6px; - object-fit: cover; - background: rgba(255, 255, 255, 0.04); -} - -.insert-modal-media-title { - font-weight: 600; - color: #ffffff; -} - -.language-picker-options { - display: flex; - flex-direction: column; - gap: 8px; -} - -.language-picker-option { - width: 100%; - display: grid; - grid-template-columns: 28px 1fr auto; - gap: 12px; - align-items: center; - border: none; - border-radius: 4px; - padding: 12px 16px; - background: transparent; - color: inherit; - text-align: left; -} - -.language-picker-label, -.language-picker-status, -.lightbox-counter { - color: #9d9d9d; - font-size: 12px; -} - -.lightbox-counter { - margin-top: 4px; -} - -@media (max-width: 720px) { - .insert-modal-media-grid { - grid-template-columns: repeat(2, minmax(0, 1fr)); - } -} - -.panel-header { - height: 35px; - display: flex; - align-items: center; - justify-content: space-between; - padding: 0 8px; - background-color: var(--vscode-sideBar-background); - border-bottom: 1px solid var(--vscode-panel-border); -} - -.panel-tabs { - display: flex; - align-items: stretch; - height: 100%; -} - -.panel-tab { - border: none; - background: transparent; - color: var(--vscode-descriptionForeground); - padding: 0 12px; - cursor: pointer; -} - -.panel-tab.active { - color: var(--vscode-tab-activeForeground); -} - -.panel-close { - background: transparent; - border: none; - color: var(--vscode-descriptionForeground); - font-size: 18px; - width: 24px; - height: 24px; - display: flex; - align-items: center; - justify-content: center; - cursor: pointer; - border-radius: 4px; - padding: 0; -} - -.panel-close:hover { - background-color: var(--vscode-list-hoverBackground); - color: var(--vscode-editor-foreground); -} - -.panel-content { - flex: 1; - overflow: auto; - padding: 12px 14px; -} - -.panel-entry, -.assistant-card { - display: flex; - flex-direction: column; - gap: 4px; - padding: 10px 12px; - border-bottom: 1px solid var(--vscode-panel-border); -} - -.output-list, -.git-log-list { - display: flex; - flex-direction: column; -} - -.task-list { - display: flex; - flex-direction: column; -} - -.task-entry-header { - display: flex; - align-items: center; - justify-content: space-between; - gap: 12px; -} - -.task-status { - font-size: 11px; - text-transform: uppercase; - letter-spacing: 0.04em; - color: var(--vscode-descriptionForeground); -} - -.task-status-running { - color: var(--vscode-terminal-ansiGreen, var(--vscode-statusBar-foreground)); -} - -.task-status-pending { - color: var(--vscode-terminal-ansiYellow, var(--vscode-statusBar-foreground)); -} - -.panel-empty-state { - min-height: 100%; - justify-content: center; -} - -.status-bar { - height: 22px; - background: var(--vscode-statusBar-background); - color: var(--vscode-statusBar-foreground); - display: flex; - align-items: center; - justify-content: space-between; - padding: 0 8px; - font-size: 12px; - flex-shrink: 0; -} - -.status-bar-left, -.status-bar-right { - display: flex; - align-items: center; - gap: 4px; - flex-shrink: 0; -} - -.status-bar-left { - flex-shrink: 1; - min-width: 0; -} - -.status-shell-controls { - display: flex; - align-items: stretch; - gap: 2px; - flex-shrink: 0; -} - -.status-shell-toggle-button { - display: flex; - align-items: center; - justify-content: center; - width: 22px; - height: 100%; - padding: 0; - line-height: 0; - background: transparent; - border: none; - color: inherit; - cursor: pointer; - border-radius: 3px; -} - -.status-shell-toggle-button:hover { - background-color: rgba(255, 255, 255, 0.1); -} - -.status-shell-toggle-button:focus, -.status-shell-toggle-button:focus-visible { - outline: none; - box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45); -} - -.status-shell-toggle-button .window-titlebar-sidebar-icon, -.status-shell-toggle-button .window-titlebar-panel-icon, -.status-shell-toggle-button .window-titlebar-assistant-icon { - width: 12px; - height: 12px; -} - -.status-bar-item { - display: flex; - align-items: center; - gap: 6px; - padding: 0 8px; - height: 100%; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; -} - -.status-bar-item:hover { - background-color: rgba(255, 255, 255, 0.1); -} - -.status-bar-task-button { - border: none; - background: transparent; - color: inherit; - cursor: pointer; -} - -.status-bar-item.theme-badge { - border: 1px solid rgba(255, 255, 255, 0.18); - border-radius: 3px; -} - -.status-bar-item.language-badge { - border: 1px solid rgba(255, 255, 255, 0.18); - border-radius: 3px; - gap: 4px; -} - -.status-bar-item.offline-badge { - border: none; - background: transparent; - color: inherit; - cursor: pointer; - opacity: 0.4; - font-size: 13px; - padding: 0 4px; -} - -.status-bar-item.offline-badge.active { - background-color: rgba(255, 196, 0, 0.28); - opacity: 1; -} - -.project-selector { - position: relative; - flex-shrink: 0; -} - -.project-selector-trigger { - display: flex; - align-items: center; - gap: 6px; - padding: 0 8px; - height: 22px; - background: transparent; - border: none; - color: var(--vscode-statusBar-foreground); - cursor: pointer; - font-size: 12px; - text-align: left; -} - -.project-selector-trigger:hover { - background-color: rgba(255, 255, 255, 0.1); -} - -.project-selector-trigger:focus { - outline: none; -} - -.project-icon, -.dropdown-arrow, -.project-check-icon { - flex-shrink: 0; -} - -.project-name, -.project-item-name { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.project-name { - max-width: 180px; -} - -.dropdown-arrow { - opacity: 0.6; -} - -.project-dropdown { - position: absolute; - left: 0; - bottom: 100%; - min-width: 220px; - margin-bottom: 4px; - background-color: #252526; - border: 1px solid rgba(255, 255, 255, 0.16); - border-radius: 4px; - box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3); - z-index: 1000; - overflow: hidden; -} - -.project-dropdown-header { - padding: 8px 12px; - font-size: 11px; - font-weight: 600; - text-transform: uppercase; - letter-spacing: 0.5px; - color: var(--vscode-descriptionForeground); - border-bottom: 1px solid rgba(255, 255, 255, 0.12); -} - -.project-list { - max-height: 200px; - overflow-y: auto; -} - -.project-item { - display: flex; - align-items: center; - width: 100%; - gap: 8px; - padding: 8px 12px; - border: none; - background: transparent; - color: inherit; - cursor: pointer; -} - -.project-item:hover, -.project-item.active { - background-color: var(--vscode-list-hoverBackground); -} - -.project-item.active .project-check-icon { - color: #89d185; -} - -.project-dropdown-footer { - padding: 8px; - border-top: 1px solid rgba(255, 255, 255, 0.12); - display: grid; - gap: 6px; -} - -.create-project-btn, -.existing-project-btn { - display: flex; - align-items: center; - justify-content: center; - gap: 6px; - width: 100%; - padding: 6px 12px; - background-color: rgba(255, 255, 255, 0.12); - color: inherit; - border: none; - border-radius: 4px; - font-size: 12px; - cursor: pointer; -} - -.create-project-btn:hover, -.existing-project-btn:hover { - background-color: rgba(255, 255, 255, 0.18); -} - -.status-bar-language-select { - background: transparent; - border: none; - color: inherit; - font: inherit; - padding: 0; -} - -.status-bar-language-select:focus { - outline: none; -} - -.status-bar-count { - font-size: 11px; - opacity: 0.85; -} - -.status-bar-item.brand { - font-weight: 600; -} - -@media (max-width: 960px) { - .editor-frame { - grid-template-columns: minmax(0, 1fr); - } - - .editor-meta { - border-left: none; - border-top: 1px solid var(--vscode-panel-border); - padding-left: 0; - padding-top: 10px; - } -} - -.editor-section ul { - margin: 12px 0 0; - padding-left: 18px; -} - -.editor-toolbar { - display: flex; - gap: 10px; -} - -.editor-toolbar button { - padding: 9px 14px; - border: 1px solid var(--line); - border-radius: 999px; - background: var(--panel-3); - color: var(--ink); -} - -.editor-meta { - display: flex; - flex-direction: column; - gap: 12px; -} - -.editor-meta-card, -.assistant-card, -.panel-entry { - padding: 16px; -} - -.sidebar-header, -.assistant-header, -.panel-header { - display: flex; - justify-content: space-between; - gap: 12px; - padding: 16px 18px; - border-bottom: 1px solid var(--line); -} - -.sidebar-content, -.assistant-content, -.panel-content { - flex: 1; - overflow: auto; - min-height: 0; -} - -.sidebar-section { - padding: 14px 14px 0; -} - -.overlay-root { - position: fixed; - inset: 0; - pointer-events: none; - z-index: 10000; -} - -.overlay-root:empty { - display: none; -} - -.editor-shared-actions { - position: relative; - margin-bottom: 14px; -} - -.ai-suggestions-modal-backdrop, -.insert-modal-backdrop, -.language-picker-modal-backdrop, -.confirm-delete-modal-backdrop, -.confirm-dialog-overlay, -.gallery-overlay, -.lightbox-overlay { - position: fixed; - inset: 0; - background: rgba(0, 0, 0, 0.68); - display: flex; - align-items: center; - justify-content: center; - pointer-events: auto; -} - -.ai-suggestions-modal, -.insert-modal, -.language-picker-modal, -.confirm-delete-modal, -.confirm-dialog, -.gallery-overlay-content { - background: #1e1e1e; - border: 1px solid #3c3c3c; - border-radius: 8px; - box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4); -} - -.ai-suggestions-modal, -.language-picker-modal, -.confirm-delete-modal, -.confirm-dialog { - width: min(680px, calc(100vw - 32px)); - max-height: calc(100vh - 48px); - display: flex; - flex-direction: column; -} - -.insert-modal { - width: min(680px, calc(100vw - 32px)); - max-height: calc(100vh - 48px); - display: flex; - flex-direction: column; - overflow: hidden; -} - -.gallery-overlay-content { - width: min(980px, calc(100vw - 48px)); - max-height: calc(100vh - 48px); - display: flex; - flex-direction: column; - overflow: hidden; -} - -.ai-suggestions-modal-header, -.language-picker-modal-header, -.confirm-delete-modal-header, -.insert-modal-header, -.gallery-overlay-header { - display: flex; - align-items: center; - justify-content: space-between; - gap: 12px; - padding: 16px 20px; - border-bottom: 1px solid #3c3c3c; -} - -.insert-modal-header { - flex-direction: column; - align-items: stretch; - gap: 12px; -} - -.insert-modal-header.media-header-only { - flex-direction: row; - align-items: center; -} - -.ai-suggestions-modal-header h2, -.language-picker-modal-header h2, -.confirm-delete-modal-header h2, -.gallery-overlay-header h2, -.insert-modal-title, -.confirm-dialog h3 { - margin: 0; - color: #ffffff; -} - -.ai-suggestions-modal-close, -.confirm-delete-modal-close, -.gallery-overlay-close, -.shared-popover-close, -.lightbox-close { - border: none; - background: transparent; - color: #c5c5c5; - cursor: pointer; - font-size: 20px; - line-height: 1; -} - -.ai-suggestions-modal-body, -.language-picker-modal-body, -.confirm-delete-modal-body { - padding: 20px; - overflow: auto; -} - -.ai-suggestions-list { - display: flex; - flex-direction: column; - gap: 16px; -} - -.ai-suggestion-item { - display: flex; - gap: 12px; - padding: 16px; - border: 1px solid #3c3c3c; - border-radius: 6px; - background: #252526; -} - -.ai-suggestion-checkbox { - position: relative; - display: flex; - align-items: flex-start; - cursor: pointer; -} - -.ai-suggestion-checkbox input { - position: absolute; - opacity: 0; -} - -.checkmark { - width: 20px; - height: 20px; - border: 2px solid #555555; - border-radius: 4px; - display: inline-flex; - align-items: center; - justify-content: center; - background: #1e1e1e; -} - -.ai-suggestion-checkbox input:checked + .checkmark, -.ai-suggestion-checkbox input:checked ~ .checkmark { - background: #0078d4; - border-color: #0078d4; -} - -.ai-suggestion-checkbox input:checked + .checkmark::after, -.ai-suggestion-checkbox input:checked ~ .checkmark::after { - content: "✓"; - color: #ffffff; - font-size: 12px; -} - -.ai-suggestion-content { - flex: 1; - min-width: 0; -} - -.ai-suggestion-label { - display: flex; - align-items: center; - gap: 8px; - margin-bottom: 8px; - font-weight: 600; -} - -.ai-suggestion-has-value, -.language-picker-badge, -.insert-modal-similarity-badge { - display: inline-flex; - align-items: center; - padding: 2px 6px; - border-radius: 999px; - background: rgba(255, 255, 255, 0.08); - color: #c5c5c5; - font-size: 11px; -} - -.ai-suggestion-comparison { - display: grid; - grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); - gap: 12px; - align-items: center; -} - -.ai-suggestion-column { - display: flex; - flex-direction: column; - gap: 4px; - padding: 10px 12px; - border-radius: 6px; - background: rgba(255, 255, 255, 0.03); -} - -.ai-suggestion-column.muted { - color: #9d9d9d; -} - -.ai-suggestion-column.highlighted { - border: 1px solid rgba(0, 122, 204, 0.4); - color: #ffffff; -} - -.ai-suggestion-column-label { - font-size: 11px; - text-transform: uppercase; - letter-spacing: 0.04em; -} - -.ai-suggestion-arrow { - color: #9d9d9d; -} - -.ai-suggestion-value { - min-height: 1.4em; -} - -.ai-suggestion-value.loading { - color: var(--accent-color); - font-style: italic; -} - -.ai-suggestions-error { - display: flex; - flex-direction: column; - gap: 4px; - padding: 12px 16px; - margin-bottom: 16px; - border-radius: 6px; - background: rgba(220, 50, 50, 0.12); - border: 1px solid rgba(220, 50, 50, 0.35); - color: #ff6b6b; -} - -.ai-suggestions-modal-footer, -.confirm-delete-modal-footer, -.confirm-dialog-actions { - display: flex; - justify-content: flex-end; - gap: 10px; - padding: 16px 20px; - border-top: 1px solid #3c3c3c; -} - -.button-cancel, -.button-delete, -.button-apply, -.confirm-dialog-actions button, -.insert-modal-submit, -.language-picker-row, -.shared-popover-entry, -.colour-swatch { - cursor: pointer; -} - -.button-cancel, -.confirm-dialog-actions button, -.insert-modal-submit { - border: 1px solid #4c4c4c; - border-radius: 4px; - padding: 8px 14px; - background: transparent; - color: #f0f0f0; -} - -.button-apply, -.confirm-dialog-actions .primary, -.insert-modal-submit { - background: #0e639c; - border-color: #0e639c; -} - -.button-delete { - border: none; - border-radius: 4px; - padding: 8px 14px; - background: #c73c3c; - color: #ffffff; -} - -.insert-modal-tabs { - display: flex; - margin: 0 -20px; -} - -.insert-modal-tab { - flex: 1; - border: none; - border-bottom: 2px solid transparent; - background: transparent; - color: #9d9d9d; - padding: 10px 16px; -} - -.insert-modal-tab.active { - color: #ffffff; - border-bottom-color: #0e639c; - background: #252526; -} - -.insert-modal-search { - border-bottom: 1px solid #3c3c3c; -} - -.insert-modal-input, -.shared-popover-input { - width: 100%; - border: none; - background: transparent; - color: #f0f0f0; - padding: 14px 20px; - font: inherit; -} - -.menu-editor-view { - padding: 1rem; - height: 100%; - flex: 1; - min-height: 0; - display: flex; - flex-direction: column; - gap: 0.75rem; - overflow: hidden; - background: var(--vscode-editor-background); -} - -.menu-editor-header { - display: flex; - align-items: flex-start; - justify-content: space-between; - gap: 1rem; -} - -.menu-editor-header h2 { - margin: 0; -} - -.menu-editor-header p { - margin: 0.25rem 0 0; - color: var(--vscode-descriptionForeground); -} - -.menu-editor-main { - display: flex; - flex-direction: column; - min-height: 0; - flex: 1; - overflow: hidden; -} - -.menu-editor-tree-wrap { - display: flex; - flex-direction: column; - flex: 1; - border: 1px solid var(--vscode-panel-border); - border-radius: 6px; - background: var(--vscode-editor-background); - padding: 0.5rem; - min-height: 0; -} - -.menu-editor-toolbar { - display: flex; - align-items: center; - gap: 0.2rem; - margin-bottom: 0.5rem; - padding-bottom: 0.4rem; - border-bottom: 1px solid var(--vscode-panel-border); -} - -.menu-editor-tool { - width: 1.8rem; - height: 1.8rem; - display: inline-flex; - align-items: center; - justify-content: center; - border: 1px solid transparent; - border-radius: 4px; - background: transparent; - color: var(--vscode-foreground); - cursor: pointer; - padding: 0; -} - -.menu-editor-tool:hover:not(:disabled) { - background: var(--vscode-toolbar-hoverBackground); - border-color: var(--vscode-panel-border); -} - -.menu-editor-tool:disabled { - opacity: 0.45; - cursor: not-allowed; -} - -.menu-editor-tree-shell { - flex: 1; - min-height: 0; - overflow: auto; -} - -.menu-editor-tree-level { - list-style: none; - margin: 0; - padding: 0; -} - -.menu-editor-tree-item { - margin: 0; - padding: 0; -} - -.menu-editor-row { - --menu-editor-indent: calc(var(--menu-editor-depth) * 1rem); - display: flex; - align-items: flex-start; - gap: 0.5rem; - padding: 0.3rem 0.45rem 0.3rem calc(0.4rem + var(--menu-editor-indent)); - border-radius: 4px; - cursor: pointer; - position: relative; -} - -.menu-editor-row.is-selected { - background: var(--vscode-list-activeSelectionBackground); - color: var(--vscode-list-activeSelectionForeground); -} - -.menu-editor-row.is-dragging { - opacity: 0.45; -} - -.menu-editor-row.is-drop-before::before, -.menu-editor-row.is-drop-after::after { - content: ""; - position: absolute; - left: calc(0.4rem + var(--menu-editor-indent)); - right: 0.45rem; - height: 2px; - background: var(--vscode-focusBorder); -} - -.menu-editor-row.is-drop-before::before { - top: 0; -} - -.menu-editor-row.is-drop-after::after { - bottom: 0; -} - -.menu-editor-row.is-drop-inside { - box-shadow: inset 0 0 0 1px var(--vscode-focusBorder); - background: var(--vscode-list-hoverBackground); -} - -.menu-editor-row-handle { - display: inline-flex; - align-items: center; - justify-content: center; - width: 1rem; - min-width: 1rem; - color: var(--vscode-descriptionForeground); - cursor: grab; - user-select: none; -} - -.menu-editor-row-handle:active { - cursor: grabbing; -} - -.menu-editor-row-kind { - display: inline-flex; - align-items: center; - justify-content: center; - width: 1rem; - min-width: 1rem; - opacity: 0.9; -} - -.menu-editor-row-title { - flex: 1; - min-width: 0; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.menu-editor-row-title.is-editing { - white-space: normal; - overflow: visible; - text-overflow: clip; -} - -.menu-editor-entry-form { - display: block; -} - -.menu-editor-inline-input { - width: 100%; - border: 1px solid var(--vscode-focusBorder); - border-radius: 4px; - background: var(--vscode-input-background); - color: var(--vscode-input-foreground); - padding: 0.25rem 0.45rem; - min-height: 1.8rem; -} - -.menu-editor-inline-search { - margin-top: 0.5rem; - border-top: 1px solid var(--vscode-panel-border); - padding-top: 0.5rem; - display: flex; - flex-direction: column; - gap: 0.4rem; - max-height: 18rem; - overflow: hidden; -} - -.menu-editor-inline-search-head { - display: flex; - align-items: center; - justify-content: space-between; - gap: 0.75rem; -} - -.menu-editor-inline-search-head strong { - display: block; - font-size: 0.8rem; -} - -.menu-editor-inline-search-head span { - color: var(--vscode-descriptionForeground); - font-size: 0.75rem; -} - -.menu-editor-inline-actions { - display: inline-flex; - align-items: center; - gap: 0.5rem; -} - -.menu-editor-inline-action { - border: 1px solid var(--vscode-button-border, transparent); - border-radius: 4px; - background: var(--vscode-button-secondaryBackground); - color: var(--vscode-button-secondaryForeground); - padding: 0.2rem 0.5rem; - cursor: pointer; -} - -.menu-editor-inline-action:hover { - background: var(--vscode-button-secondaryHoverBackground); -} - -.menu-editor-picker-list { - display: flex; - flex-direction: column; - gap: 0.35rem; - max-height: 16rem; - overflow-y: auto; -} - -.menu-editor-picker-item { - display: flex; - justify-content: space-between; - align-items: center; - width: 100%; - border: 1px solid var(--vscode-panel-border); - border-radius: 4px; - background: var(--vscode-input-background); - color: var(--vscode-input-foreground); - padding: 0.45rem 0.55rem; - text-align: left; - cursor: pointer; -} - -.menu-editor-picker-item:hover { - border-color: var(--vscode-focusBorder); - background: var(--vscode-list-hoverBackground); -} - -.menu-editor-picker-item small, -.menu-editor-picker-state { - color: var(--vscode-descriptionForeground); -} - -.menu-editor-empty { - color: var(--vscode-descriptionForeground); - padding: 0.5rem 0.25rem; -} - -@media (max-width: 720px) { - .menu-editor-inline-search-head { - flex-direction: column; - align-items: flex-start; - } - - .menu-editor-inline-actions { - width: 100%; - justify-content: flex-start; - flex-wrap: wrap; - } -} - -[data-testid="media-editor"] { - flex: 1; - display: flex; - flex-direction: column; - background-color: var(--vscode-editor-background); - overflow: hidden; -} - -[data-testid="media-editor"] .editor-header { - display: flex; - align-items: center; - justify-content: space-between; - gap: 12px; - padding: 0 12px; - min-height: 35px; - background-color: var(--vscode-tab-activeBackground); - border-bottom: 1px solid var(--vscode-panel-border); -} - -[data-testid="media-editor"] .editor-tabs { - display: flex; - align-items: center; - gap: 2px; - min-width: 0; -} - -[data-testid="media-editor"] .editor-tab { - display: flex; - align-items: center; - gap: 6px; - min-width: 0; - padding: 6px 12px; - background-color: var(--vscode-tab-inactiveBackground); - color: var(--vscode-tab-inactiveForeground); - font-size: 13px; - border-radius: 4px 4px 0 0; -} - -[data-testid="media-editor"] .editor-tab.active { - background-color: var(--vscode-tab-activeBackground); - color: var(--vscode-tab-activeForeground); -} - -[data-testid="media-editor"] .editor-tab-title { - min-width: 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -[data-testid="media-editor"] .editor-tab-dirty { - color: var(--vscode-notificationsWarningIcon-foreground, var(--vscode-editorWarning-foreground)); - font-size: 10px; -} - -[data-testid="media-editor"] .editor-actions { - display: flex; - align-items: center; - gap: 8px; -} - -[data-testid="media-editor"] .editor-actions button { - padding: 4px 10px; - font-size: 12px; -} - -[data-testid="media-editor"] .editor-actions button.danger:hover { - background-color: var(--vscode-notificationsErrorIcon-foreground); -} - -[data-testid="media-editor"] .auto-save-indicator { - font-size: 11px; - color: var(--vscode-descriptionForeground); - font-style: italic; -} - -[data-testid="media-editor"] .quick-actions-wrapper { - position: relative; -} - -[data-testid="media-editor"] .quick-actions-btn { - display: inline-flex; - align-items: center; - gap: 6px; -} - -[data-testid="media-editor"] .quick-actions-btn-icon { - font-size: 12px; - line-height: 1; -} - -[data-testid="media-editor"] .quick-actions-menu { - position: absolute; - top: calc(100% + 4px); - right: 0; - width: 280px; - background: var(--vscode-dropdown-background, #252526); - border: 1px solid var(--vscode-dropdown-border, #454545); - border-radius: 6px; - box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); - overflow: hidden; - z-index: 30; -} - -[data-testid="media-editor"] .quick-actions-divider { - height: 1px; - background: var(--vscode-dropdown-border, #454545); -} - -[data-testid="media-editor"] .quick-action-item { - display: flex; - align-items: flex-start; - justify-content: space-between; - gap: 10px; - width: 100%; - padding: 10px 12px; - background: none; - border: none; - color: var(--vscode-dropdown-foreground, #ccc); - cursor: pointer; - text-align: left; - transition: background 0.1s; -} - -[data-testid="media-editor"] .quick-action-item:hover:not(:disabled) { - background: var(--vscode-list-hoverBackground, #2a2d2e); -} - -[data-testid="media-editor"] .quick-action-item:disabled { - opacity: 0.5; - cursor: not-allowed; -} - -[data-testid="media-editor"] .quick-action-icon { - font-size: 16px; - flex-shrink: 0; - margin-top: 2px; -} - -[data-testid="media-editor"] .quick-action-text { - display: flex; - flex: 1; - flex-direction: column; - gap: 2px; - min-width: 0; -} - -[data-testid="media-editor"] .quick-action-text strong { - font-size: 13px; - font-weight: 500; -} - -[data-testid="media-editor"] .quick-action-text small { - font-size: 11px; - opacity: 0.7; -} - -[data-testid="media-editor"] .editor-content { - flex: 1; - display: flex; - flex-direction: column; - padding: 16px; - overflow-y: auto; - gap: 16px; -} - -[data-testid="media-editor"] > .editor-content.media-editor { - flex-direction: row; - align-items: stretch; - gap: 24px; -} - -[data-testid="media-editor"] .editor-field { - display: flex; - flex-direction: column; - gap: 4px; - flex: 1; - min-width: 0; -} - -[data-testid="media-editor"] .editor-field label { - font-size: 11px; - font-weight: 500; - color: var(--vscode-descriptionForeground); - text-transform: uppercase; - letter-spacing: 0.5px; -} - -[data-testid="media-editor"] .editor-field-row { - display: flex; - gap: 12px; - width: 100%; - margin-bottom: 0; -} - -[data-testid="media-editor"] .post-editor-input, -[data-testid="media-editor"] .post-editor-textarea { - width: 100%; - padding: 8px 10px; - border: 1px solid var(--vscode-input-border, var(--vscode-panel-border)); - border-radius: 4px; - background: var(--vscode-input-background, rgba(255, 255, 255, 0.06)); - color: var(--vscode-input-foreground, var(--vscode-foreground)); - font: inherit; -} - -[data-testid="media-editor"] .post-editor-input.disabled, -[data-testid="media-editor"] .post-editor-input:disabled { - opacity: 0.6; - cursor: not-allowed; -} - -[data-testid="media-editor"] .post-editor-textarea { - line-height: 1.5; - resize: vertical; -} - -[data-testid="media-editor"] .media-preview { - flex: 1; - display: flex; - align-items: center; - justify-content: center; - background-color: var(--vscode-input-background); - border-radius: 8px; - min-height: 300px; - overflow: hidden; -} - -[data-testid="media-editor"] .media-preview-placeholder { - display: flex; - flex-direction: column; - align-items: center; - gap: 12px; - color: var(--vscode-descriptionForeground); -} - -[data-testid="media-editor"] .media-preview-image { - display: flex; - align-items: center; - justify-content: center; - align-self: stretch; - width: 100%; - height: 100%; - min-height: 0; - padding: 16px; - box-sizing: border-box; -} - -[data-testid="media-editor"] .media-preview-image img { - width: 100%; - height: 100%; - object-fit: contain; - border-radius: 4px; -} - -[data-testid="media-editor"] .media-details { - width: 320px; - display: flex; - flex-direction: column; - gap: 12px; - flex-shrink: 0; -} - -[data-testid="media-editor"] .media-editor-details-form { - display: flex; - flex-direction: column; - gap: 12px; -} - -[data-testid="media-editor"] .media-details textarea { - resize: vertical; -} - -[data-testid="media-editor"] .linked-posts-section label { - display: flex; - justify-content: space-between; - align-items: center; -} - -[data-testid="media-editor"] .add-link-btn { - background: var(--vscode-button-secondaryBackground); - border: none; - color: var(--vscode-button-secondaryForeground); - padding: 2px 8px; - border-radius: 3px; - cursor: pointer; - font-size: 11px; -} - -[data-testid="media-editor"] .add-link-btn:hover { - background: var(--vscode-button-secondaryHoverBackground); -} - -[data-testid="media-editor"] .post-picker { - background: var(--vscode-dropdown-background); - border: 1px solid var(--vscode-dropdown-border); - border-radius: 4px; - margin-top: 8px; - max-height: 250px; - overflow-y: auto; -} - -[data-testid="media-editor"] .post-picker-search { - padding: 8px; - border-bottom: 1px solid var(--vscode-dropdown-border); - position: sticky; - top: 0; - background: var(--vscode-dropdown-background); -} - -[data-testid="media-editor"] .post-picker-search input { - width: 100%; - padding: 6px 10px; - background: var(--vscode-input-background); - border: 1px solid var(--vscode-input-border); - border-radius: 3px; - color: var(--vscode-input-foreground); - font-size: 12px; -} - -[data-testid="media-editor"] .post-picker-search input:focus { - outline: none; - border-color: var(--vscode-focusBorder); -} - -[data-testid="media-editor"] .post-picker-list { - padding: 4px; -} - -[data-testid="media-editor"] .post-picker-item { - width: 100%; - padding: 6px 8px; - cursor: pointer; - border: none; - border-radius: 3px; - background: transparent; - color: inherit; - font-size: 12px; - text-align: left; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -[data-testid="media-editor"] .post-picker-item:hover { - background: var(--vscode-list-hoverBackground); -} - -[data-testid="media-editor"] .post-picker-more { - padding: 6px 8px; - color: var(--vscode-descriptionForeground); - font-size: 11px; - font-style: italic; -} - -[data-testid="media-editor"] .no-posts, -[data-testid="media-editor"] .no-linked-posts { - padding: 12px 8px; - color: var(--vscode-descriptionForeground); - font-size: 12px; - font-style: italic; -} - -[data-testid="media-editor"] .linked-posts-list { - margin-top: 8px; - display: flex; - flex-direction: column; - gap: 4px; -} - -[data-testid="media-editor"] .linked-post-item { - display: flex; - align-items: center; - justify-content: space-between; - padding: 6px 8px; - background: var(--vscode-sideBar-background); - border-radius: 4px; -} - -[data-testid="media-editor"] .linked-post-title, -[data-testid="media-editor"] .linked-post-link { - flex: 1; - min-width: 0; - border: none; - background: transparent; - padding: 0; - color: inherit; - text-align: left; - cursor: pointer; - font-size: 12px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -[data-testid="media-editor"] .linked-post-title:hover, -[data-testid="media-editor"] .linked-post-link:hover { - color: var(--vscode-textLink-foreground); - text-decoration: underline; -} - -[data-testid="media-editor"] .linked-post-item .unlink-btn { - background: none; - border: none; - color: var(--vscode-descriptionForeground); - cursor: pointer; - padding: 0 4px; - font-size: 14px; - opacity: 0; - transition: opacity 0.1s; -} - -[data-testid="media-editor"] .linked-post-item:hover .unlink-btn { - opacity: 1; -} - -[data-testid="media-editor"] .linked-post-item .unlink-btn:hover { - color: var(--vscode-errorForeground); -} - -.translation-modal-backdrop { - position: fixed; - inset: 0; - background: rgba(0, 0, 0, 0.68); - display: flex; - align-items: center; - justify-content: center; - pointer-events: auto; - z-index: 10001; -} - -.translation-modal { - width: min(640px, calc(100vw - 32px)); - background: #1e1e1e; - border: 1px solid #3c3c3c; - border-radius: 8px; - box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4); -} - -.translation-modal-header, -.translation-modal-footer { - display: flex; - align-items: center; - justify-content: space-between; - gap: 12px; - padding: 16px 20px; -} - -.translation-modal-header { - border-bottom: 1px solid #3c3c3c; -} - -.translation-modal-footer { - border-top: 1px solid #3c3c3c; - justify-content: flex-end; - gap: 10px; -} - -.translation-modal-body { - padding: 20px; - display: flex; - flex-direction: column; - gap: 14px; -} - -.translation-modal-close { - border: none; - background: transparent; - color: #c5c5c5; - cursor: pointer; - font-size: 20px; - line-height: 1; -} - -.settings-view-shell, -.style-view, -.tags-view-shell, -.scripts-view-shell, -.templates-view-shell, -.chat-panel { - height: 100%; - background: var(--panel-1, #1e1e1e); -} - -.settings-view, -.tags-view, -.style-view { - height: 100%; - display: flex; - flex-direction: column; -} - -.settings-header, -.style-view-header, -.tags-view-header, -.chat-panel-header { - padding: 18px 20px; - border-bottom: 1px solid var(--line, #3c3c3c); - display: flex; - align-items: center; - justify-content: space-between; - gap: 16px; -} - -.settings-search input { - width: min(320px, 40vw); -} - -.settings-content, -.tags-view-content { - padding: 20px; - overflow: auto; - display: flex; - flex-direction: column; - gap: 18px; -} - -.setting-section, -.tags-section { - border: 1px solid var(--line, #3c3c3c); - border-radius: 12px; - background: var(--panel-2, #252526); -} - -.setting-section-header, -.tags-section-header { - padding: 14px 16px; - border-bottom: 1px solid var(--line, #3c3c3c); -} - -.setting-section-content, -.tags-section-content { - padding: 16px; - display: flex; - flex-direction: column; - gap: 14px; -} - -.setting-row, -.tag-form-row { - display: grid; - grid-template-columns: minmax(180px, 240px) minmax(0, 1fr); - gap: 16px; - align-items: start; -} - -.tag-form-row { - grid-template-columns: repeat(4, minmax(0, 1fr)); -} - -.setting-label { - font-weight: 600; -} - -.setting-control, -.setting-input-group { - display: flex; - flex-wrap: wrap; - gap: 10px; - align-items: center; -} - -.setting-actions { - padding: 0 16px 16px; - display: flex; - gap: 10px; - flex-wrap: wrap; -} - -.style-theme-picker { - padding: 20px; - display: grid; - grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); - gap: 14px; -} - -.style-theme-option { - border: 1px solid var(--line, #3c3c3c); - background: var(--panel-2, #252526); - border-radius: 14px; - padding: 14px; - text-align: left; - cursor: pointer; -} - -.style-theme-option.selected { - border-color: var(--accent-color); - box-shadow: 0 0 0 1px var(--accent-color); -} - -.style-theme-swatch { - display: flex; - flex-direction: column; - gap: 12px; -} - -.style-theme-tones { - display: grid; - grid-template-columns: 2fr 1fr 1fr; - gap: 8px; -} - -.style-theme-tone { - height: 42px; - border-radius: 10px; - border: 1px solid rgba(255, 255, 255, 0.08); -} - -.style-apply-row { - padding: 0 20px 20px; - display: flex; - gap: 12px; - align-items: center; - justify-content: space-between; - flex-wrap: wrap; -} - -.style-preview-container { - padding: 0 20px 20px; - flex: 1; - min-height: 0; -} - -.style-preview-frame { - width: 100%; - height: 100%; - min-height: 420px; - border: 1px solid var(--line, #3c3c3c); - border-radius: 14px; - background: #ffffff; -} - -.tag-cloud { - display: flex; - flex-wrap: wrap; - gap: 12px; -} - -.tag-cloud-item { - display: inline-flex; - align-items: center; - gap: 8px; - padding: 8px 12px; - border-radius: 999px; - border: 1px solid var(--line, #3c3c3c); - background: var(--panel-1, #1e1e1e); - cursor: pointer; -} - -.tag-cloud-item.selected { - border-color: var(--accent-color); - box-shadow: 0 0 0 1px var(--accent-color); -} - -.scripts-view-shell, -.templates-view-shell { - display: flex; - flex-direction: column; -} - -.scripts-view, -.templates-view { - height: 100%; - display: flex; - flex-direction: column; -} - -.scripts-header, -.templates-header { - border-bottom: 1px solid var(--line, #3c3c3c); -} - -.scripts-meta-row, -.templates-meta-row { - padding: 16px 20px; - border-bottom: 1px solid var(--line, #3c3c3c); -} - -.editor-field-row { - display: grid; - grid-template-columns: repeat(3, minmax(0, 1fr)); - gap: 12px; - margin-bottom: 12px; -} - -.scripts-editor, -.templates-editor { - display: flex; - flex-direction: column; - min-height: 0; - flex: 1; -} - -.scripts-monaco, -.templates-monaco { - flex: 1; - min-height: 0; - padding: 0 20px 20px; -} - -.code-editor-textarea { - font: 13px/1.5 "SFMono-Regular", Menlo, Monaco, Consolas, monospace; -} - -.editor-footer { - padding: 12px 20px 20px; - display: flex; - gap: 16px; - flex-wrap: wrap; - border-top: 1px solid var(--line, #3c3c3c); -} - -.chat-panel { - height: 100%; - min-height: 0; - display: flex; - flex-direction: column; - background: var(--vscode-editor-background, var(--panel-1, #1e1e1e)); -} - -.chat-panel-title { - flex: 1; - min-width: 0; - display: flex; - align-items: center; - gap: 10px; - overflow: visible; - font-size: 14px; - font-weight: 500; - color: var(--vscode-foreground, inherit); -} - -.chat-panel-title-main { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.chat-panel-header { - position: relative; - padding: 12px 16px; - border-bottom: 1px solid var(--vscode-editorGroup-border, var(--line, #3c3c3c)); - background: var(--vscode-sideBar-background, var(--panel-1, #1e1e1e)); -} - -.chat-panel-header-actions { - display: flex; - align-items: center; - gap: 10px; -} - -.chat-model-selector-button, -.chat-model-selector-option { - border: 1px solid var(--line, #3c3c3c); - border-radius: 10px; - background: var(--panel-2, #252526); - color: inherit; -} - -.chat-model-selector-button { - display: inline-flex; - align-items: center; - gap: 8px; - padding: 8px 12px; - color: inherit; - border: 1px solid var(--vscode-input-border, var(--line, #3c3c3c)); - border-radius: 4px; - background: transparent; - cursor: pointer; - } - - .chat-model-selector-button:hover, - .chat-model-selector-option:hover { - background: var(--vscode-list-hoverBackground, rgba(255, 255, 255, 0.06)); - } - - .chat-model-selector-caret { - font-size: 10px; - position: absolute; - top: calc(100% - 4px); - right: 20px; - min-width: 220px; - display: flex; - flex-direction: column; - padding: 4px 8px; - font-size: 12px; - color: var(--vscode-descriptionForeground, inherit); - padding: 10px; - border: 1px solid var(--line, #3c3c3c); - border-radius: 12px; - background: var(--panel-1, #1e1e1e); - top: calc(100% + 4px); - right: 16px; - min-width: 180px; - max-height: 300px; - overflow-y: auto; - -.chat-model-selector-option { - gap: 4px; - padding: 6px; - border: 1px solid var(--vscode-dropdown-border, var(--line, #3c3c3c)); - border-radius: 4px; - background: var(--vscode-dropdown-background, var(--panel-1, #1e1e1e)); - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); - z-index: 100; -} - -.chat-messages { - padding: 20px; - padding: 8px 12px; - display: flex; - font-size: 12px; - flex-direction: column; - gap: 16px; -} - background: var(--vscode-list-activeSelectionBackground, rgba(0, 122, 204, 0.18)); - color: var(--vscode-list-activeSelectionForeground, inherit); -.chat-message { - display: flex; -} - flex: 1; - min-height: 0; - overflow-y: auto; - padding: 16px; - justify-content: flex-end; -} - -.chat-message-content { - max-width: min(760px, 100%); - .chat-surface-scroll { - min-height: 0; - overflow-y: auto; - } - - border: 1px solid var(--line, #3c3c3c); - border-radius: 14px; - gap: 12px; - padding: 14px 16px; - background: var(--panel-2, #252526); -} - flex-direction: row-reverse; - } - - .chat-message-avatar { - flex-shrink: 0; - width: 32px; - height: 32px; - display: flex; - align-items: center; - justify-content: center; - font-size: 18px; - border-radius: 50%; - background: var(--vscode-input-background, var(--panel-2, #252526)); -.chat-message.user .chat-message-content { - background: rgba(0, 122, 204, 0.15); - .chat-message.user .chat-message-avatar { - background: var(--vscode-button-background, var(--accent-color)); - margin-bottom: 10px; -} - .chat-message-content { - max-width: 80%; - min-width: 100px; - display: inline-flex; - align-items: center; - .chat-message.user .chat-message-content { - text-align: right; - } - - .chat-message-header { - display: flex; - align-items: center; - border: 1px solid var(--line, #3c3c3c); - margin-bottom: 4px; - font-size: 12px; -} - .chat-message.user .chat-message-header { - justify-content: flex-end; - } - - .chat-message-role { - padding: 16px; - font-weight: 500; - color: var(--vscode-descriptionForeground, inherit); -} - - .streaming-indicator { - color: var(--vscode-button-background, var(--accent-color)); - animation: pulse 1s infinite; - } - - @keyframes pulse { - 0%, - 100% { - opacity: 1; - } - - 50% { - opacity: 0.3; - } - -.chat-tool-surface-table th, - .chat-message-text { - padding: 10px 14px; - border-radius: 12px 12px 12px 2px; - background: var(--vscode-input-background, var(--panel-2, #252526)); - color: var(--vscode-foreground, inherit); - font-size: 14px; - line-height: 1.5; - white-space: pre-wrap; - word-break: break-word; - user-select: text; - cursor: text; - } - - .chat-message.user .chat-message-text { - border-radius: 12px 12px 2px 12px; - background: var(--vscode-button-background, var(--accent-color)); - color: var(--vscode-button-foreground, #ffffff); - } - - .chat-message.assistant .chat-message-text { - white-space: normal; - } - - .chat-message.streaming .chat-message-text { - background: linear-gradient( - 90deg, - var(--vscode-input-background, var(--panel-2, #252526)) 0%, - var(--vscode-list-hoverBackground, rgba(255, 255, 255, 0.06)) 50%, - var(--vscode-input-background, var(--panel-2, #252526)) 100% - ); - background-size: 200% 100%; - animation: shimmer 2s infinite; - } - - @keyframes shimmer { - 0% { - background-position: 200% 0; - } - - 100% { - background-position: -200% 0; - } - } - - .chat-thinking-indicator { - display: flex; - gap: 4px; - padding: 12px 16px; - } - - .chat-thinking-indicator span { - width: 8px; - height: 8px; - border-radius: 50%; - background: var(--vscode-descriptionForeground, #8a8a8a); - animation: bounce 1.4s infinite ease-in-out both; - } - - .chat-thinking-indicator span:nth-child(1) { - animation-delay: -0.32s; - } - - .chat-thinking-indicator span:nth-child(2) { - animation-delay: -0.16s; - } - - @keyframes bounce { - 0%, - 80%, - 100% { - transform: scale(0); - } - - 40% { - transform: scale(1); - } - } - - .chat-tool-markers { - display: flex; - flex-direction: column; - gap: 4px; - margin-bottom: 8px; - padding: 8px 10px; - background: var(--vscode-textBlockQuote-background, rgba(127, 127, 127, 0.1)); - border-left: 3px solid var(--vscode-textLink-foreground, #3794ff); - border-radius: 0 4px 4px 0; - } - - .chat-tool-marker { - display: flex; - align-items: center; - gap: 6px; - color: var(--vscode-descriptionForeground, inherit); - font-size: 12px; - } - - .chat-tool-marker.completed .chat-tool-marker-icon { - color: var(--vscode-testing-iconPassed, #89d185); - } - - .chat-tool-marker.pending .chat-tool-marker-icon { - color: var(--vscode-textLink-foreground, #3794ff); - } - - .chat-tool-marker-args { - opacity: 0.85; - } - - .chat-inline-surface, - .chat-tool-surface { - width: min(720px, calc(100% - 44px)); - margin-left: 44px; - padding: 14px; - border: 1px solid var(--vscode-editorGroup-border, var(--line, #3c3c3c)); - border-radius: 12px; - background: var(--vscode-sideBar-background, var(--panel-2, #252526)); - box-sizing: border-box; - } - - .chat-inline-surface h3, - .chat-tool-surface h3 { - margin: 0 0 12px; - border-bottom: 1px solid var(--line, #3c3c3c); - text-align: left; -} - -.chat-tool-surface-json { - margin: 0; - white-space: pre-wrap; - font: 12px/1.5 "SFMono-Regular", Menlo, Monaco, Consolas, monospace; -} - padding: 8px 12px; - border: 1px solid var(--vscode-editorGroup-border, var(--line, #3c3c3c)); - padding: 16px 20px 20px; - border-top: 1px solid var(--line, #3c3c3c); - - .chat-tool-surface-table th { - font-weight: 600; - background: var(--vscode-list-hoverBackground, rgba(255, 255, 255, 0.06)); - } - - .chat-tool-surface-table tr:nth-child(even) { - background: var(--vscode-list-hoverBackground, rgba(255, 255, 255, 0.04)); - } -} - -.chat-input-wrapper { - display: grid; - grid-template-columns: minmax(0, 1fr) auto; - gap: 10px; - - .chat-surface-card { - display: flex; - flex-direction: column; - gap: 10px; - } - - .chat-surface-subtitle { - margin: -4px 0 0; - color: var(--vscode-descriptionForeground, inherit); - } - - .chat-surface-body, - .chat-surface-text { - margin: 0; - line-height: 1.5; - white-space: pre-wrap; - } - - .chat-surface-actions { - display: flex; - flex-wrap: wrap; - gap: 8px; - } - - .chat-surface-action-button, - .chat-surface-tab-button, - .api-key-submit { - padding: 8px 12px; - border: none; - border-radius: 6px; - background: var(--vscode-button-background, var(--accent-color)); - color: var(--vscode-button-foreground, #ffffff); - cursor: pointer; - transition: background-color 0.15s; - } - - .chat-surface-action-button:hover, - .chat-surface-tab-button:hover, - .api-key-submit:hover { - background: var(--vscode-button-hoverBackground, var(--accent-color)); - } - - .chat-surface-chart-type { - margin: -6px 0 12px; - color: var(--vscode-descriptionForeground, inherit); - text-transform: capitalize; - } - - .chat-surface-chart-list { - display: flex; - flex-direction: column; - gap: 10px; - } - - .chat-surface-chart-meta { - display: flex; - justify-content: space-between; - gap: 12px; - margin-bottom: 4px; - } - - .chat-surface-chart-bar { - height: 10px; - border-radius: 999px; - background: var(--vscode-input-background, rgba(255, 255, 255, 0.08)); - overflow: hidden; - } - - .chat-surface-chart-bar span { - display: block; - height: 100%; - border-radius: inherit; - background: var(--vscode-button-background, var(--accent-color)); - } - - .chat-surface-metric { - display: flex; - flex-direction: column; - gap: 6px; - } - - .chat-surface-metric-label { - color: var(--vscode-descriptionForeground, inherit); - } - - .chat-surface-metric-value { - font-size: 28px; - line-height: 1.1; - } - - .chat-surface-list, - .chat-surface-mindmap { - margin: 0; - padding-left: 18px; - } - - .chat-surface-list li, - .chat-surface-mindmap li { - margin: 6px 0; - } - - .chat-surface-mindmap-children { - margin-left: 8px; - color: var(--vscode-descriptionForeground, inherit); - } - - .chat-surface-tabs { - display: flex; - flex-direction: column; - gap: 12px; - } - - .chat-surface-tab-list { - display: flex; - flex-wrap: wrap; - gap: 8px; - } - - .chat-surface-tab-button { - background: transparent; - border: 1px solid var(--vscode-input-border, var(--line, #3c3c3c)); - color: var(--vscode-foreground, inherit); - } - - .chat-surface-tab-button.active { - background: var(--vscode-list-activeSelectionBackground, rgba(0, 122, 204, 0.18)); - border-color: var(--vscode-list-activeSelectionBackground, rgba(0, 122, 204, 0.18)); - color: var(--vscode-list-activeSelectionForeground, inherit); - } - - .chat-surface-tab-panel { - display: flex; - flex-direction: column; - gap: 12px; - } - - .chat-surface-tab-panel .chat-inline-surface { - width: 100%; - margin-left: 0; - } - - .chat-surface-form { - display: grid; - gap: 12px; - } - - .chat-surface-form-field { - display: grid; - gap: 6px; - } - - .chat-surface-form input, - .chat-surface-form textarea, - .chat-surface-form select { - width: 100%; - padding: 10px 12px; - border: 1px solid var(--vscode-input-border, var(--line, #3c3c3c)); - border-radius: 6px; - background: var(--vscode-input-background, var(--panel-1, #1e1e1e)); - color: var(--vscode-input-foreground, inherit); - font: inherit; - box-sizing: border-box; - } - - .chat-surface-form textarea { - min-height: 84px; - resize: vertical; - } - - .chat-surface-form-checkbox { - display: inline-flex; - align-items: center; - min-height: 40px; - } -} - - padding: 16px; - border-top: 1px solid var(--vscode-editorGroup-border, var(--line, #3c3c3c)); - background: var(--vscode-sideBar-background, var(--panel-1, #1e1e1e)); - } - - .chat-abort-button { - display: block; - width: 100%; - margin-bottom: 8px; - padding: 8px; - font-size: 13px; - color: var(--vscode-errorForeground, #f48771); - background: transparent; - border: 1px solid var(--vscode-errorForeground, #f48771); - border-radius: 4px; - cursor: pointer; - } - - .chat-abort-button:hover { - background: var(--vscode-inputValidation-errorBackground, rgba(244, 135, 113, 0.12)); - resize: vertical; -} - - display: flex; - align-items: flex-end; - height: 44px; - padding: 8px; - border: 1px solid var(--vscode-input-border, var(--line, #3c3c3c)); - border-radius: 8px; - background: var(--vscode-input-background, var(--panel-2, #252526)); - } - - .chat-input-wrapper:focus-within { - border-color: var(--vscode-focusBorder, var(--accent-color)); - border-radius: 999px; -} - - flex: 1; - min-height: 24px; - max-height: 200px; - padding: 0; - border: none; - outline: none; - background: transparent; - color: var(--vscode-input-foreground, inherit); - font: inherit; - line-height: 1.5; - resize: none; - overflow-y: auto; - } - - .chat-input::placeholder { - color: var(--vscode-input-placeholderForeground, rgba(255, 255, 255, 0.45)); - } - - .chat-surface-input { - border-radius: 6px; - } - - .chat-surface-error { - margin: 12px 0 0; - color: var(--vscode-errorForeground, #f48771); - font-size: 12px; - max-width: 560px; - text-align: center; - color: var(--vscode-descriptionForeground); - flex-shrink: 0; - width: 32px; - height: 32px; - display: flex; - align-items: center; - justify-content: center; - font-size: 18px; - color: var(--vscode-button-foreground, #ffffff); - background: var(--vscode-button-background, var(--accent-color)); - border: none; - border-radius: 50%; - cursor: pointer; - transition: background-color 0.15s; - } - - .chat-send-button:hover:not(:disabled) { - background: var(--vscode-button-hoverBackground, var(--accent-color)); - } - - .chat-send-button:disabled, - .api-key-submit:disabled { - opacity: 0.5; - cursor: not-allowed; - list-style: none; - padding: 0; - margin: 18px 0 0; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - min-height: 100%; - padding: 32px; - box-sizing: border-box; - margin: 0 auto; - max-width: 560px; -} - -.misc-editor-shell { - height: 100%; - .chat-welcome-icon { - margin-bottom: 16px; - font-size: 48px; - } - - .chat-welcome h2 { - margin: 0 0 12px; - font-size: 18px; - font-weight: 500; - color: var(--vscode-foreground, inherit); - } - - .chat-welcome p { - margin: 0 0 12px; - font-size: 14px; - } - - display: flex; - margin: 0; - padding: 0; - list-style: none; - text-align: left; - } - - .chat-welcome li { - padding: 4px 0; - font-size: 13px; - } - - .chat-welcome li::before { - content: "•"; - margin-right: 8px; - color: var(--vscode-textLink-foreground, #3794ff); - } - - .api-key-form { - display: flex; - flex-direction: column; - gap: 8px; - margin-top: 16px; - width: 100%; - max-width: 400px; - } - - .chat-message-text p { - margin: 0 0 0.5em; - } - - .chat-message-text p:last-child { - margin-bottom: 0; - } - - .chat-message-text h1, - .chat-message-text h2, - .chat-message-text h3, - .chat-message-text h4 { - margin: 0.75em 0 0.5em; - font-weight: 600; - color: var(--vscode-foreground, inherit); - } - - .chat-message-text h1:first-child, - .chat-message-text h2:first-child, - .chat-message-text h3:first-child { - margin-top: 0; - } - - .chat-message-text h1 { - font-size: 1.3em; - } - - .chat-message-text h2 { - font-size: 1.2em; - } - - .chat-message-text h3 { - font-size: 1.1em; - } - - .chat-message-text h4 { - font-size: 1em; - } - - .chat-message-text ul, - .chat-message-text ol { - margin: 0.5em 0; - padding-left: 1.5em; - } - - .chat-message-text li { - margin: 0.25em 0; - } - - .chat-message-text code { - padding: 0.15em 0.4em; - border-radius: 3px; - background: var(--vscode-textCodeBlock-background, rgba(0, 0, 0, 0.2)); - font: 0.9em/1.4 "SFMono-Regular", Menlo, Monaco, Consolas, monospace; - } - - .chat-message-text pre { - margin: 0.75em 0; - padding: 12px; - overflow-x: auto; - border-radius: 6px; - background: var(--vscode-textCodeBlock-background, rgba(0, 0, 0, 0.2)); - } - - .chat-message-text pre code { - padding: 0; - background: transparent; - font-size: 0.85em; - } - - .chat-message-text table { - width: 100%; - margin: 0.75em 0; - border-collapse: collapse; - font-size: 0.9em; - } - - .chat-message-text th, - .chat-message-text td { - padding: 8px 12px; - border: 1px solid var(--vscode-editorGroup-border, var(--line, #3c3c3c)); - text-align: left; - } - - .chat-message-text th { - font-weight: 600; - background: var(--vscode-list-hoverBackground, rgba(255, 255, 255, 0.06)); - } - - .chat-message-text tr:nth-child(even) { - background: var(--vscode-list-hoverBackground, rgba(255, 255, 255, 0.04)); - } - - .chat-message-text blockquote { - margin: 0.75em 0; - padding: 0.5em 1em; - border-left: 3px solid var(--vscode-textLink-foreground, #3794ff); - background: var(--vscode-textBlockQuote-background, rgba(0, 0, 0, 0.1)); - color: var(--vscode-descriptionForeground, inherit); - } - - .chat-message-text blockquote p { - margin: 0; - } - - .chat-message-text a { - color: var(--vscode-textLink-foreground, #3794ff); - text-decoration: none; - } - - .chat-message-text a:hover { - text-decoration: underline; - } - - .chat-message-text hr { - margin: 1em 0; - border: none; - border-top: 1px solid var(--vscode-editorGroup-border, var(--line, #3c3c3c)); - } - - .chat-message-text strong { - font-weight: 600; - } - - .chat-message-text em { - font-style: italic; - } - - @media (max-width: 760px) { - .chat-inline-surface, - .chat-tool-surface { - width: 100%; - margin-left: 0; - } - - .chat-message-content { - max-width: calc(100% - 44px); - } - - .chat-panel-header { - padding: 12px; - } - - .chat-messages, - .chat-input-container { - padding: 12px; - } - padding: 18px 20px; - border-bottom: 1px solid var(--line, #3c3c3c); - display: flex; - align-items: flex-start; - justify-content: space-between; - gap: 16px; -} - -.misc-editor-header h2, -.misc-card h3 { - margin: 0; -} - -.misc-editor-header p { - margin: 6px 0 0; - color: var(--vscode-descriptionForeground); -} - -.misc-editor-actions, -.misc-editor-summary { - display: flex; - gap: 10px; - flex-wrap: wrap; -} - -.misc-editor-summary { - padding: 14px 20px; - border-bottom: 1px solid var(--line, #3c3c3c); -} - -.misc-summary-pill { - display: inline-flex; - align-items: center; - gap: 8px; - padding: 6px 10px; - border-radius: 999px; - background: var(--panel-2, #252526); - border: 1px solid var(--line, #3c3c3c); -} - -.misc-editor-content { - padding: 20px; - overflow: auto; - flex: 1; -} - -.help-doc-view { - --doc-bg: var(--panel-1, #1e1e1e); - --doc-surface: var(--panel-2, #252526); - --doc-border: var(--line, #3c3c3c); - --doc-text: var(--vscode-editor-foreground, #d4d4d4); - --doc-muted: var(--vscode-descriptionForeground, #9da3ad); - --doc-link: var(--vscode-textLink-foreground, #9cdcfe); - --doc-code-bg: var(--vscode-textCodeBlock-background, rgba(0, 0, 0, 0.2)); - --doc-hover: var(--vscode-list-hoverBackground, rgba(255, 255, 255, 0.06)); -} - -.help-doc-view .misc-editor-content { - padding: 0; - overflow: hidden; -} - -.documentation-view { - display: flex; - flex-direction: column; - min-height: 0; - height: 100%; - background: var(--doc-bg); -} - -.documentation-scroll { - flex: 1; - min-height: 0; - overflow: auto; - padding: 28px 24px 40px; - background: var(--doc-bg); -} - -.documentation-content { - max-width: 920px; - margin: 0 auto; - color: var(--doc-text); -} - -.documentation-article { - background: var(--doc-surface); - padding: 18px 20px 24px; - border: 1px solid var(--doc-border); - border-radius: 10px; - box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18); -} - -.documentation-content.markdown-body > .documentation-article > :first-child { - margin-top: 0; -} - -.documentation-content.markdown-body > .documentation-article > :last-child { - margin-bottom: 0; -} - -.documentation-content.markdown-body h1, -.documentation-content.markdown-body h2, -.documentation-content.markdown-body h3 { - color: var(--doc-text); - border-bottom: 1px solid var(--doc-border); - padding-bottom: 6px; - line-height: 1.25; -} - -.documentation-content.markdown-body h1 { - font-size: 1.9rem; -} - -.documentation-content.markdown-body h2 { - margin-top: 2rem; - font-size: 1.35rem; -} - -.documentation-content.markdown-body h3 { - margin-top: 1.6rem; - font-size: 1.05rem; -} - -.documentation-content.markdown-body p, -.documentation-content.markdown-body li, -.documentation-content.markdown-body td, -.documentation-content.markdown-body th { - line-height: 1.6; -} - -.documentation-content.markdown-body a { - color: var(--doc-link); - text-decoration-thickness: 1px; - text-underline-offset: 0.14em; -} - -.documentation-content.markdown-body a:hover { - color: var(--doc-text); -} - -.documentation-content.markdown-body hr { - border: 0; - border-top: 1px solid var(--doc-border); - opacity: 0.8; -} - -.documentation-content.markdown-body code { - background: var(--doc-code-bg); - padding: 0.12em 0.4em; - border-radius: 4px; - font: 0.92em/1.45 "SFMono-Regular", Menlo, Monaco, Consolas, monospace; -} - -.documentation-content.markdown-body pre { - margin: 0.9rem 0 1.2rem; - background: var(--doc-code-bg); - border: 1px solid var(--doc-border); - border-radius: 8px; - padding: 14px 16px; - overflow: auto; -} - -.documentation-content.markdown-body pre code { - padding: 0; - background: transparent; - font-size: 0.9em; -} - -.documentation-content.markdown-body blockquote { - margin: 1rem 0; - padding: 0 0 0 12px; - border-left: 3px solid var(--doc-border); - color: var(--doc-muted); -} - -.documentation-content.markdown-body table { - width: 100%; - margin: 1rem 0 1.4rem; - border-collapse: collapse; - display: table; -} - -.documentation-content.markdown-body th, -.documentation-content.markdown-body td { - border: 1px solid var(--doc-border); - padding: 8px 10px; - text-align: left; - vertical-align: top; -} - -.documentation-content.markdown-body th { - background: var(--doc-hover); - font-weight: 700; -} - -.documentation-content.markdown-body ul, -.documentation-content.markdown-body ol { - margin: 0.85rem 0 1rem; - padding-left: 1.5rem; - display: block; -} - -.documentation-content.markdown-body ul { - list-style: disc; -} - -.documentation-content.markdown-body ol { - list-style: decimal; -} - -.documentation-content.markdown-body li { - margin: 0.3rem 0; -} - -.documentation-content.markdown-body li > ul, -.documentation-content.markdown-body li > ol { - margin-top: 0.35rem; - margin-bottom: 0.35rem; -} - -.documentation-content.markdown-body strong { - color: var(--doc-text); -} - -.documentation-content.markdown-body img { - max-width: 100%; - height: auto; -} - -.misc-columns { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); - gap: 16px; -} - -.misc-card, -.misc-list-item { - border: 1px solid var(--line, #3c3c3c); - border-radius: 12px; - background: var(--panel-2, #252526); - padding: 16px; -} - -.misc-card ul, -.misc-list { - margin: 12px 0 0; - padding: 0; - list-style: none; - display: flex; - flex-direction: column; - gap: 12px; -} - -.misc-list-item header, -.duplicate-pair-row { - display: grid; - grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto auto; - gap: 12px; - align-items: center; -} - -.misc-list-item ul li { - display: grid; - grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) minmax(0, 1fr); - gap: 10px; - padding-top: 8px; -} - -.misc-code-card pre { - margin: 0; - white-space: pre-wrap; - font: 12px/1.5 "SFMono-Regular", Menlo, Monaco, Consolas, monospace; -} - -.translation-validation-view, -.git-diff-view { - display: flex; - flex-direction: column; - gap: 16px; - min-height: 0; -} - -.translation-validation-summary, -.translation-validation-section, -.git-diff-toolbar { - border: 1px solid var(--line, #3c3c3c); - border-radius: 12px; - background: var(--panel-2, #252526); - padding: 16px; -} - -.translation-validation-summary p, -.git-diff-empty { - margin: 0; - color: var(--vscode-descriptionForeground); -} - -.translation-validation-list { - display: grid; - gap: 12px; - margin-top: 12px; -} - -.translation-validation-card { - border: 1px solid var(--line, #3c3c3c); - border-radius: 12px; - background: var(--panel-1, #1e1e1e); - padding: 16px; -} - -.translation-validation-card-title { - margin: 0 0 12px; - font-weight: 600; -} - -.translation-validation-card-meta { - margin: 0; - display: grid; - grid-template-columns: minmax(120px, 180px) minmax(0, 1fr); - gap: 8px 12px; -} - -.translation-validation-card-meta dt { - color: var(--vscode-descriptionForeground); -} - -.translation-validation-card-meta dd { - margin: 0; - word-break: break-word; -} - -.translation-validation-actions { - display: flex; - gap: 10px; - flex-wrap: wrap; -} - -.translation-validation-empty { - margin: 12px 0 0; - color: var(--vscode-descriptionForeground); -} - -.git-diff-toolbar { - display: flex; - gap: 12px; - align-items: center; - flex-wrap: wrap; -} - -.git-diff-toolbar label { - font-weight: 600; -} - -.git-diff-toolbar select { - min-width: min(420px, 100%); -} - -.git-diff-editor { - flex: 1; - min-height: 420px; - border: 1px solid var(--line, #3c3c3c); - border-radius: 12px; - overflow: hidden; - background: var(--panel-1, #1e1e1e); -} - -.monaco-diff-editor-instance { - height: 100%; - min-height: 420px; -} - -.linkish { - padding: 0; - border: none; - background: transparent; - color: var(--accent-color); - text-align: left; -} - -.metadata-diff-tool { - display: flex; - flex-direction: column; - gap: 16px; -} - -.metadata-diff-tabs { - display: flex; - flex-wrap: wrap; - gap: 10px; -} - -.metadata-diff-tab, -.metadata-diff-field-pill { - display: inline-flex; - align-items: center; - gap: 8px; - padding: 8px 12px; - border-radius: 999px; - border: 1px solid var(--line, #3c3c3c); - background: var(--panel-2, #252526); - color: inherit; -} - -.metadata-diff-tab.active, -.metadata-diff-field-pill.active { - border-color: var(--accent-color); - background: color-mix(in srgb, var(--accent-color) 18%, var(--panel-2, #252526)); -} - -.metadata-diff-field-pill { - padding: 4px; - gap: 4px; -} - -.metadata-diff-field-pill-toggle { - display: inline-flex; - align-items: center; - gap: 8px; - padding: 4px 8px; - border: 0; - background: transparent; - color: inherit; - border-radius: 999px; -} - -.metadata-diff-field-pill-actions, -.orphan-files-actions { - display: inline-flex; - align-items: center; - gap: 6px; -} - -.metadata-diff-action-button { - padding: 4px 8px; - border-radius: 999px; -} - -.tab-badge, -.field-pill-count { - min-width: 20px; - height: 20px; - padding: 0 6px; - border-radius: 999px; - display: inline-flex; - align-items: center; - justify-content: center; - background: var(--panel-1, #1e1e1e); - border: 1px solid var(--line, #3c3c3c); - font-size: 11px; -} - -.metadata-diff-field-pills, -.metadata-diff-results, -.diff-item-list, -.diff-item-fields { - display: flex; - flex-direction: column; - gap: 12px; -} - -.metadata-diff-field-pills { - flex-direction: row; - flex-wrap: wrap; -} - -.diff-item-card { - border: 1px solid var(--line, #3c3c3c); - border-radius: 12px; - background: var(--panel-2, #252526); - padding: 16px; -} - -.diff-item-header { - display: flex; - align-items: flex-start; - justify-content: space-between; - gap: 12px; -} - -.diff-item-meta { - margin-top: 4px; - color: var(--vscode-descriptionForeground); - font-size: 12px; -} - -.diff-field-row { - display: grid; - grid-template-columns: minmax(110px, 160px) minmax(0, 1fr); - gap: 12px; - align-items: start; -} - -.diff-field-name { - font-weight: 600; -} - -.diff-field-values { - display: grid; - grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 12px; -} - -.diff-field-value { - display: flex; - flex-direction: column; - gap: 6px; - padding: 10px 12px; - border-radius: 10px; - border: 1px solid var(--line, #3c3c3c); - background: var(--panel-1, #1e1e1e); - min-width: 0; -} - -.diff-source-label { - font-size: 11px; - text-transform: uppercase; - letter-spacing: 0.06em; - color: var(--vscode-descriptionForeground); -} - -.orphan-files-section { - display: flex; - flex-direction: column; - gap: 12px; -} - -.orphan-files-header { - display: flex; - align-items: center; - justify-content: space-between; - gap: 12px; -} - -.orphan-path { - word-break: break-all; -} - -.metadata-diff-empty { - min-height: 120px; - display: flex; - align-items: center; - justify-content: center; -} - -@media (max-width: 1100px) { - [data-testid="media-editor"] > .editor-content.media-editor, - .setting-row, - .tag-form-row, - .editor-field-row, - .duplicate-pair-row, - .misc-list-item ul li { - grid-template-columns: 1fr; - } - - [data-testid="media-editor"] > .editor-content.media-editor, - [data-testid="media-editor"] .editor-field-row { - display: flex; - flex-direction: column; - } - - .diff-field-row, - .diff-field-values { - grid-template-columns: 1fr; - } - - [data-testid="media-editor"] .media-details { - width: 100%; - } - - .style-theme-picker { - grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); - } -} - -.insert-modal-results, -.insert-media-grid, -.shared-popover-list, -.language-picker-list { - overflow: auto; -} - -.insert-modal-results { - padding: 8px; -} - -.insert-modal-result-item, -.insert-modal-result-create, -.language-picker-row, -.shared-popover-entry { - width: 100%; - border: none; - border-radius: 4px; - padding: 12px 16px; - background: transparent; - color: inherit; - text-align: left; -} - -.insert-modal-result-item:hover, -.insert-modal-result-create:hover, -.language-picker-row:hover, -.shared-popover-entry:hover, -.insert-media-card:hover, -.gallery-overlay-item:hover, -.colour-swatch:hover { - background: #2a2a2a; -} - -.insert-modal-result-title, -.insert-media-card-title { - font-weight: 600; - color: #ffffff; -} - -.insert-modal-result-meta, -.insert-media-card-meta, -.warning-note, -.shared-popover-footnote, -.language-picker-source { - color: #9d9d9d; - font-size: 12px; -} - -.insert-modal-external { - display: flex; - flex-direction: column; - gap: 14px; - padding: 18px 20px; -} - -.insert-modal-field, -.shared-popover-field { - display: flex; - flex-direction: column; - gap: 6px; -} - -.insert-modal-label, -.shared-popover-field span { - font-size: 11px; - text-transform: uppercase; - letter-spacing: 0.04em; - color: #9d9d9d; -} - -.insert-modal-footer { - border-top: 1px solid #3c3c3c; - padding: 12px 16px; -} - -.insert-modal-footer-content { - display: flex; - align-items: center; - justify-content: space-between; - gap: 12px; -} - -.insert-modal-hint { - font-size: 11px; - color: #9d9d9d; -} - -.insert-media-grid { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); - gap: 12px; - padding: 16px; -} - -.insert-media-card { - display: flex; - flex-direction: column; - gap: 8px; - border: 1px solid #3c3c3c; - border-radius: 8px; - background: #252526; - color: inherit; - padding: 10px; - text-align: left; -} - -.insert-media-thumb { - display: flex; - align-items: center; - justify-content: center; - min-height: 112px; - border-radius: 6px; - background: rgba(255, 255, 255, 0.04); - overflow: hidden; -} - -.insert-media-thumb img, -.gallery-overlay-item img { - width: 100%; - height: 100%; - object-fit: cover; - display: block; -} - -.insert-media-file-pill { - padding: 6px 10px; - border-radius: 999px; - background: rgba(255, 255, 255, 0.08); - font-size: 11px; - letter-spacing: 0.04em; -} - -.language-picker-row { - display: grid; - grid-template-columns: auto 1fr auto; - gap: 12px; - align-items: center; -} - -.language-picker-badge.published { - background: rgba(34, 197, 94, 0.2); - color: #9ae6b4; -} - -.language-picker-badge.draft, -.language-picker-badge.empty { - background: rgba(14, 99, 156, 0.24); - color: #8ec5ff; -} - -.confirm-delete-warning { - display: flex; - gap: 12px; - padding: 12px; - border-radius: 6px; - background: rgba(255, 165, 0, 0.08); - border: 1px solid rgba(255, 165, 0, 0.3); -} - -.warning-icon { - width: 24px; - height: 24px; - border-radius: 50%; - display: inline-flex; - align-items: center; - justify-content: center; - background: rgba(255, 165, 0, 0.18); - color: #ffbf47; - font-weight: 700; -} - -.reference-list { - margin: 12px 0 0; - padding-left: 0; - list-style: none; - display: flex; - flex-direction: column; - gap: 8px; -} - -.reference-list li { - padding: 8px 10px; - border-radius: 4px; - background: rgba(255, 255, 255, 0.03); -} - -.confirm-dialog-overlay { - align-items: center; -} - -.confirm-dialog { - width: min(460px, calc(100vw - 32px)); - padding-top: 20px; -} - -.confirm-dialog p { - margin: 0; - padding: 0 20px 12px; - color: #d0d0d0; -} - -.gallery-overlay-grid { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); - gap: 12px; - padding: 18px; - overflow: auto; -} - -.gallery-overlay-item { - border: none; - padding: 0; - border-radius: 8px; - overflow: hidden; - min-height: 148px; - background: #252526; -} - -.lightbox-overlay { - background: rgba(0, 0, 0, 0.9); -} - -.lightbox-container { - position: relative; - width: 100%; - height: 100%; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; -} - -.lightbox-image-container { - max-width: 90%; - max-height: 78%; -} - -.lightbox-image { - max-width: 100%; - max-height: 100%; - object-fit: contain; - border-radius: 4px; - box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); -} - -.lightbox-nav { - position: absolute; - top: 50%; - transform: translateY(-50%); - width: 48px; - height: 48px; - border: none; - border-radius: 50%; - background: rgba(255, 255, 255, 0.12); - color: #ffffff; - font-size: 28px; -} - -.lightbox-prev { - left: 16px; -} - -.lightbox-next { - right: 16px; -} - -.lightbox-close { - position: absolute; - top: 16px; - right: 16px; - width: 44px; - height: 44px; - border-radius: 50%; - background: rgba(255, 255, 255, 0.12); - color: #ffffff; -} - -.lightbox-footer { - position: absolute; - bottom: 32px; - left: 50%; - transform: translateX(-50%); - text-align: center; - color: #ffffff; -} - -.lightbox-caption { - margin: 0 0 6px; -} - -.shared-popover-shell { - position: absolute; - top: calc(100% + 8px); - left: 0; - z-index: 20; -} - -.shared-popover { - width: min(320px, calc(100vw - 48px)); - border: 1px solid #3c3c3c; - border-radius: 8px; - background: #1e1e1e; - box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35); - overflow: hidden; -} - -.shared-popover-header { - display: flex; - align-items: center; - justify-content: space-between; - gap: 8px; - padding: 12px 14px; - border-bottom: 1px solid #3c3c3c; -} - -.shared-popover-list { - display: flex; - flex-direction: column; - max-height: 220px; -} - -.shared-popover-entry { - padding: 10px 14px; -} - -.shared-popover-empty, -.shared-popover-footnote, -.colour-picker-selection { - display: block; - padding: 10px 14px; -} - -.colour-picker-grid { - display: grid; - grid-template-columns: repeat(6, minmax(0, 1fr)); - gap: 8px; - padding: 12px 14px; -} - -.colour-swatch { - width: 100%; - aspect-ratio: 1; - border-radius: 6px; - border: 2px solid transparent; -} - -.colour-swatch.selected { - border-color: #ffffff; -} - -.colour-picker-selection { - display: flex; - align-items: center; - gap: 10px; - color: #d0d0d0; -} - -.colour-preview { - width: 20px; - height: 20px; - border-radius: 50%; - border: 1px solid rgba(255, 255, 255, 0.18); -} - -.chat-panel { - height: 100%; - min-height: 0; - display: flex; - flex-direction: column; - background-color: var(--vscode-editor-background, var(--panel-1, #1e1e1e)); -} - -.chat-panel-header { - position: relative; - display: flex; - align-items: center; - justify-content: space-between; - gap: 16px; - padding: 12px 16px; - border-bottom: 1px solid var(--vscode-editorGroup-border, var(--line, #3c3c3c)); - background-color: var(--vscode-sideBar-background, var(--panel-1, #1e1e1e)); -} - -.chat-panel-title { - flex: 1; - min-width: 0; - display: flex; - align-items: center; - gap: 10px; - overflow: visible; - font-size: 14px; - font-weight: 500; - color: var(--vscode-foreground, inherit); -} - -.chat-panel-title-main { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.chat-panel-header-actions { - display: flex; - align-items: center; - gap: 10px; -} - -.chat-model-selector-button, -.chat-model-selector-option { - color: inherit; - border: 1px solid var(--vscode-input-border, var(--line, #3c3c3c)); - border-radius: 4px; - background: transparent; - cursor: pointer; -} - -.chat-model-selector-button { - display: inline-flex; - align-items: center; - gap: 8px; - flex: 0 1 auto; - max-width: min(40vw, 240px); - padding: 4px 8px; - font-size: 12px; - color: var(--vscode-descriptionForeground, inherit); - white-space: nowrap; -} - -.chat-model-selector-inline { - min-width: 0; - background-color: var(--vscode-input-background, transparent); -} - -.chat-model-selector-inline span:first-child { - overflow: hidden; - text-overflow: ellipsis; -} - -.chat-model-selector-wrap { - position: relative; - display: inline-flex; - min-width: 0; - flex: 0 1 auto; -} - -.chat-model-selector-button:hover, -.chat-model-selector-option:hover { - background-color: var(--vscode-list-hoverBackground, rgba(255, 255, 255, 0.06)); -} - -.chat-model-selector-caret { - font-size: 10px; -} - -.chat-model-selector-menu { - position: absolute; - top: calc(100% + 4px); - left: 0; - min-width: 180px; - max-height: 300px; - overflow-y: auto; - display: flex; - flex-direction: column; - gap: 8px; - padding: 6px; - border: 1px solid var(--vscode-dropdown-border, var(--line, #3c3c3c)); - border-radius: 4px; - background-color: var(--vscode-dropdown-background, var(--panel-1, #1e1e1e)); - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); - z-index: 100; -} - -.chat-model-provider-group { - display: flex; - flex-direction: column; - gap: 4px; -} - -.chat-model-provider-header { - padding: 2px 6px 0; - font-size: 10px; - font-weight: 600; - letter-spacing: 0.04em; - text-transform: uppercase; - color: var(--vscode-descriptionForeground, rgba(255, 255, 255, 0.6)); -} - -.chat-model-selector-option { - display: block; - width: 100%; - padding: 8px 12px; - font-size: 12px; - text-align: left; -} - -.chat-model-selector-option-name { - display: block; -} - -.chat-model-selector-option.active { - background-color: var(--vscode-list-activeSelectionBackground, rgba(0, 122, 204, 0.18)); - color: var(--vscode-list-activeSelectionForeground, inherit); -} - -.chat-messages, -.chat-surface-scroll { - flex: 1; - min-height: 0; - overflow-y: auto; -} - -.chat-messages { - display: flex; - flex-direction: column; - gap: 16px; - padding: 16px; -} - -.chat-welcome { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - min-height: 100%; - margin: 0 auto; - max-width: 560px; - box-sizing: border-box; - padding: 32px; - text-align: center; - color: var(--vscode-descriptionForeground, inherit); -} - -.chat-welcome-icon { - margin-bottom: 16px; - font-size: 48px; -} - -.chat-welcome h2 { - margin: 0 0 12px; - font-size: 18px; - font-weight: 500; - color: var(--vscode-foreground, inherit); -} - -.chat-welcome p { - margin: 0 0 12px; - font-size: 14px; -} - -.chat-welcome ul { - margin: 0; - padding: 0; - list-style: none; - text-align: left; -} - -.chat-welcome li { - padding: 4px 0; - font-size: 13px; -} - -.chat-welcome li::before { - content: "•"; - margin-right: 8px; - color: var(--vscode-textLink-foreground, #3794ff); -} - -.chat-message { - display: flex; - gap: 12px; -} - -.chat-message.user { - flex-direction: row-reverse; -} - -.chat-message-avatar { - flex-shrink: 0; - width: 32px; - height: 32px; - display: flex; - align-items: center; - justify-content: center; - border-radius: 50%; - font-size: 18px; - background-color: var(--vscode-input-background, var(--panel-2, #252526)); -} - -.chat-message.user .chat-message-avatar { - background-color: var(--vscode-button-background, var(--accent-color)); -} - -.chat-message-content { - max-width: 80%; - min-width: 100px; -} - -.chat-message.user .chat-message-content { - width: fit-content; - min-width: 0; - max-width: min(80%, 720px); - display: flex; - flex-direction: column; - align-items: flex-end; - margin-left: auto; - text-align: right; -} - -.chat-message-header { - display: flex; - align-items: center; - gap: 8px; - margin-bottom: 4px; -} - -.chat-message.user .chat-message-header { - justify-content: flex-end; -} - -.chat-message-role { - font-size: 12px; - font-weight: 500; - color: var(--vscode-descriptionForeground, inherit); -} - -.streaming-indicator { - color: var(--vscode-button-background, var(--accent-color)); - animation: pulse 1s infinite; -} - -@keyframes pulse { - 0%, - 100% { - opacity: 1; - } - - 50% { - opacity: 0.3; - } -} - -.chat-message-text { - padding: 10px 14px; - border-radius: 12px 12px 12px 2px; - background-color: var(--vscode-input-background, var(--panel-2, #252526)); - color: var(--vscode-foreground, inherit); - font-size: 14px; - line-height: 1.5; - white-space: pre-wrap; - word-break: break-word; - user-select: text; - cursor: text; -} - -.chat-message.user .chat-message-text { - width: fit-content; - max-width: 100%; - display: inline-block; - border-radius: 12px 12px 2px 12px; - background-color: var(--vscode-button-background, var(--accent-color)); - color: var(--vscode-button-foreground, #ffffff); -} - -.chat-message.assistant .chat-message-text { - white-space: normal; -} - -.chat-panel .chat-model-selector-button.chat-model-selector-inline { - width: auto; - min-width: 0; - max-width: 240px; - height: auto; - flex: 0 1 auto; - padding: 4px 8px; - border: 1px solid var(--vscode-input-border, var(--line, #3c3c3c)); - border-radius: 4px; - background: transparent; - color: var(--vscode-descriptionForeground, inherit); -} - -.chat-panel .chat-model-selector-caret { - position: static; - inset: auto; - width: auto; - min-width: 0; - max-width: none; - height: auto; - display: inline; - flex: 0 0 auto; - padding: 0; - border: 0; - border-radius: 0; - background: transparent; - box-shadow: none; - color: inherit; - font-size: 10px; - line-height: 1; -} - -.chat-panel .chat-model-selector-menu { - left: 0; - right: auto; - width: max-content; - min-width: 180px; - max-width: min(360px, calc(100vw - 48px)); - height: auto; - padding: 6px; - border: 1px solid var(--vscode-dropdown-border, var(--line, #3c3c3c)); - border-radius: 4px; - background: var(--vscode-dropdown-background, var(--panel-1, #1e1e1e)); - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); -} - -.chat-panel .chat-message.user .chat-message-content { - width: max-content; - min-width: 0; - max-width: min(72%, 720px); - padding: 0; - border: 0; - border-radius: 0; - background: transparent; - box-shadow: none; -} - -.chat-panel .chat-message.user .chat-message-text.chat-user-message-text { - width: auto; - min-width: 0; - max-width: 100%; - display: inline-block; - box-sizing: border-box; - padding: 6px 12px; - line-height: 1.35; - white-space: pre-wrap; -} - -.chat-message.streaming .chat-message-text { - background: linear-gradient( - 90deg, - var(--vscode-input-background, var(--panel-2, #252526)) 0%, - var(--vscode-list-hoverBackground, rgba(255, 255, 255, 0.06)) 50%, - var(--vscode-input-background, var(--panel-2, #252526)) 100% - ); - background-size: 200% 100%; - animation: shimmer 2s infinite; -} - -@keyframes shimmer { - 0% { - background-position: 200% 0; - } - - 100% { - background-position: -200% 0; - } -} - -.chat-thinking-indicator { - display: flex; - gap: 4px; - padding: 12px 16px; -} - -.chat-thinking-indicator span { - width: 8px; - height: 8px; - border-radius: 50%; - background-color: var(--vscode-descriptionForeground, #8a8a8a); - animation: bounce 1.4s infinite ease-in-out both; -} - -.chat-thinking-indicator span:nth-child(1) { - animation-delay: -0.32s; -} - -.chat-thinking-indicator span:nth-child(2) { - animation-delay: -0.16s; -} - -@keyframes bounce { - 0%, - 80%, - 100% { - transform: scale(0); - } - - 40% { - transform: scale(1); - } -} - -.chat-tool-markers { - display: flex; - flex-direction: column; - gap: 4px; - margin-bottom: 8px; - padding: 8px 10px; - border-left: 3px solid var(--vscode-textLink-foreground, #3794ff); - border-radius: 0 4px 4px 0; - background-color: var(--vscode-textBlockQuote-background, rgba(127, 127, 127, 0.1)); -} - -.chat-tool-marker { - font-size: 12px; - color: var(--vscode-descriptionForeground, inherit); -} - -.chat-tool-marker summary { - display: flex; - align-items: center; - gap: 6px; - cursor: pointer; - list-style: none; -} - -.chat-tool-marker summary::-webkit-details-marker { - display: none; -} - -.chat-tool-marker-details { - margin: 6px 0 2px 20px; - padding: 8px; - border: 1px solid var(--vscode-editorGroup-border, var(--line, #3c3c3c)); - border-radius: 6px; - background-color: var(--vscode-editor-background, rgba(0, 0, 0, 0.18)); -} - -.chat-tool-marker-detail-label { - margin: 0 0 4px; - font-size: 11px; - font-weight: 600; - text-transform: uppercase; - color: var(--vscode-descriptionForeground, inherit); -} - -.chat-tool-marker-details pre { - margin: 0 0 8px; - white-space: pre-wrap; - overflow-wrap: anywhere; - font: 11px/1.45 "SFMono-Regular", Menlo, Monaco, Consolas, monospace; -} - -.chat-tool-marker.completed .chat-tool-marker-icon { - color: var(--vscode-testing-iconPassed, #89d185); -} - -.chat-tool-marker.pending .chat-tool-marker-icon { - color: var(--vscode-textLink-foreground, #3794ff); -} - -.chat-tool-marker-args { - opacity: 0.85; -} - -.chat-inline-surface, -.chat-tool-surface { - width: min(720px, calc(100% - 44px)); - margin-left: 44px; - box-sizing: border-box; - border: 1px solid var(--vscode-editorGroup-border, var(--line, #3c3c3c)); - border-radius: 12px; - background-color: var(--vscode-sideBar-background, var(--panel-2, #252526)); -} - -.chat-inline-surface { - width: 100%; - margin: 12px 0 0; - overflow: hidden; -} - -.chat-inline-surface-header { - display: flex; - align-items: center; - gap: 8px; - padding: 8px 12px; - cursor: pointer; - list-style: none; - background-color: var(--vscode-textBlockQuote-background, rgba(127, 127, 127, 0.1)); -} - -.chat-inline-surface-header::-webkit-details-marker { - display: none; -} - -.chat-inline-surface-title { - min-width: 0; - flex: 1; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - font-size: 13px; - font-weight: 600; -} - -.chat-inline-surface-dismiss { - border: 0; - border-radius: 4px; - padding: 2px 7px; - background: transparent; - color: var(--vscode-descriptionForeground, inherit); - cursor: pointer; - font-size: 15px; - line-height: 1.2; -} - -.chat-inline-surface-dismiss:hover { - background-color: var(--vscode-toolbar-hoverBackground, rgba(255, 255, 255, 0.08)); - color: var(--vscode-foreground, inherit); -} - -.chat-inline-surface-body { - padding: 14px; -} - -.chat-inline-surface h3, -.chat-tool-surface h3 { - margin: 0 0 12px; -} - -.chat-tool-surface-table { - width: 100%; - border-collapse: collapse; -} - -.chat-tool-surface-table th, -.chat-tool-surface-table td { - padding: 8px 12px; - border: 1px solid var(--vscode-editorGroup-border, var(--line, #3c3c3c)); - text-align: left; -} - -.chat-tool-surface-table th { - font-weight: 600; - background-color: var(--vscode-list-hoverBackground, rgba(255, 255, 255, 0.06)); -} - -.chat-tool-surface-table tr:nth-child(even) { - background-color: var(--vscode-list-hoverBackground, rgba(255, 255, 255, 0.04)); -} - -.chat-tool-surface-json { - margin: 0; - white-space: pre-wrap; - font: 12px/1.5 "SFMono-Regular", Menlo, Monaco, Consolas, monospace; -} - -.chat-surface-card { - display: flex; - flex-direction: column; - gap: 10px; -} - -.chat-surface-subtitle { - margin: -4px 0 0; - color: var(--vscode-descriptionForeground, inherit); -} - -.chat-surface-body, -.chat-surface-text { - margin: 0; - line-height: 1.5; - white-space: pre-wrap; -} - -.chat-surface-actions { - display: flex; - flex-wrap: wrap; - gap: 8px; -} - -.chat-surface-action-button, -.chat-surface-tab-button, -.api-key-submit { - padding: 8px 12px; - border: none; - border-radius: 6px; - background-color: var(--vscode-button-background, var(--accent-color)); - color: var(--vscode-button-foreground, #ffffff); - cursor: pointer; - transition: background-color 0.15s; -} - -.chat-surface-action-button:hover, -.chat-surface-tab-button:hover, -.api-key-submit:hover { - background-color: var(--vscode-button-hoverBackground, var(--accent-color)); -} - -.chat-surface-chart-type { - margin: -6px 0 12px; - color: var(--vscode-descriptionForeground, inherit); - text-transform: capitalize; -} - -.chat-surface-chart-list { - display: flex; - flex-direction: column; - gap: 10px; -} - -.chat-surface-chart-meta { - display: flex; - justify-content: space-between; - gap: 12px; - margin-bottom: 4px; -} - -.chat-surface-chart-bar { - height: 10px; - overflow: hidden; - border-radius: 999px; - background-color: var(--vscode-input-background, rgba(255, 255, 255, 0.08)); -} - -.chat-surface-chart-bar span { - display: block; - height: 100%; - border-radius: inherit; - background-color: var(--vscode-button-background, var(--accent-color)); -} - -.chat-surface-metric { - display: flex; - flex-direction: column; - gap: 6px; -} - -.chat-surface-metric-label { - color: var(--vscode-descriptionForeground, inherit); -} - -.chat-surface-metric-value { - font-size: 28px; - line-height: 1.1; -} - -.chat-surface-list, -.chat-surface-mindmap { - margin: 0; - padding-left: 18px; -} - -.chat-surface-list li, -.chat-surface-mindmap li { - margin: 6px 0; -} - -.chat-surface-mindmap-children { - margin-left: 8px; - color: var(--vscode-descriptionForeground, inherit); -} - -.chat-surface-tabs { - display: flex; - flex-direction: column; - gap: 12px; -} - -.chat-surface-tab-list { - display: flex; - flex-wrap: wrap; - gap: 8px; -} - -.chat-surface-tab-button { - border: 1px solid var(--vscode-input-border, var(--line, #3c3c3c)); - background: transparent; - color: var(--vscode-foreground, inherit); -} - -.chat-surface-tab-button.active { - border-color: var(--vscode-list-activeSelectionBackground, rgba(0, 122, 204, 0.18)); - background-color: var(--vscode-list-activeSelectionBackground, rgba(0, 122, 204, 0.18)); - color: var(--vscode-list-activeSelectionForeground, inherit); -} - -.chat-surface-tab-panel { - display: flex; - flex-direction: column; - gap: 12px; -} - -.chat-surface-tab-panel .chat-inline-surface { - width: 100%; - margin-left: 0; -} - -.chat-surface-form { - display: grid; - gap: 12px; -} - -.chat-surface-form-field { - display: grid; - gap: 6px; -} - -.chat-surface-form input, -.chat-surface-form textarea, -.chat-surface-form select { - width: 100%; - box-sizing: border-box; - padding: 10px 12px; - border: 1px solid var(--vscode-input-border, var(--line, #3c3c3c)); - border-radius: 6px; - background-color: var(--vscode-input-background, var(--panel-1, #1e1e1e)); - color: var(--vscode-input-foreground, inherit); - font: inherit; -} - -.chat-surface-form textarea { - min-height: 84px; - resize: vertical; -} - -.chat-surface-form-checkbox { - display: inline-flex; - align-items: center; - min-height: 40px; -} - -.chat-input-container { - padding: 8px 16px; - border-top: 1px solid var(--vscode-editorGroup-border, var(--line, #3c3c3c)); - background-color: var(--vscode-sideBar-background, var(--panel-1, #1e1e1e)); -} - -.chat-panel .chat-input-container { - padding: 8px 16px; -} - -.chat-abort-button { - display: block; - width: 100%; - margin-bottom: 8px; - padding: 8px; - border: 1px solid var(--vscode-errorForeground, #f48771); - border-radius: 4px; - background: transparent; - color: var(--vscode-errorForeground, #f48771); - font-size: 13px; - cursor: pointer; -} - -.chat-abort-button:hover { - background-color: var(--vscode-inputValidation-errorBackground, rgba(244, 135, 113, 0.12)); -} - -.chat-panel .chat-input-wrapper { - --chat-input-line-height: 20px; - --chat-input-min-height: 20px; - --chat-input-max-height: 160px; - display: flex; - align-items: center; - gap: 6px; - min-height: 30px; - padding: 4px 6px; - border: 1px solid var(--vscode-input-border, var(--line, #3c3c3c)); - border-radius: 8px; - background-color: var(--vscode-input-background, var(--panel-2, #252526)); -} - -.chat-panel .chat-input-wrapper:focus-within { - border-color: var(--vscode-focusBorder, var(--accent-color)); -} - -.chat-panel .chat-input { - flex: 1; - display: block; - box-sizing: border-box; - height: var(--chat-input-min-height); - min-height: var(--chat-input-min-height); - max-height: var(--chat-input-max-height); - margin: 0; - padding: 0; - border: none; - outline: none; - appearance: none; - background: transparent; - color: var(--vscode-input-foreground, inherit); - font: inherit; - line-height: var(--chat-input-line-height); - resize: none; - overflow-y: hidden; - vertical-align: top; -} - -.chat-panel .chat-input::placeholder { - color: var(--vscode-input-placeholderForeground, rgba(255, 255, 255, 0.45)); -} - -.chat-surface-input { - border-radius: 6px; -} - -.chat-surface-error { - margin: 12px 0 0; - color: var(--vscode-errorForeground, #f48771); - font-size: 12px; -} - -.chat-panel .chat-send-button { - flex-shrink: 0; - box-sizing: border-box; - width: 22px; - height: 22px; - min-width: 22px; - min-height: 22px; - max-width: 22px; - max-height: 22px; - padding: 0; - display: flex; - align-items: center; - justify-content: center; - border: none; - border-radius: 50%; - background-color: var(--vscode-button-background, var(--accent-color)); - color: var(--vscode-button-foreground, #ffffff); - font-size: 15px; - line-height: 1; - cursor: pointer; - transition: background-color 0.15s; -} - -.chat-panel .chat-send-button:hover:not(:disabled) { - background-color: var(--vscode-button-hoverBackground, var(--accent-color)); -} - -.chat-panel .chat-send-button:disabled, -.api-key-submit:disabled { - opacity: 0.5; - cursor: not-allowed; -} - -.api-key-form { - display: flex; - flex-direction: column; - gap: 8px; - margin-top: 16px; - width: 100%; - max-width: 400px; -} - -.chat-message-text p { - margin: 0 0 0.5em; -} - -.chat-message-text p:last-child { - margin-bottom: 0; -} - -.chat-message-text h1, -.chat-message-text h2, -.chat-message-text h3, -.chat-message-text h4 { - margin: 0.75em 0 0.5em; - font-weight: 600; - color: var(--vscode-foreground, inherit); -} - -.chat-message-text h1:first-child, -.chat-message-text h2:first-child, -.chat-message-text h3:first-child { - margin-top: 0; -} - -.chat-message-text h1 { - font-size: 1.3em; -} - -.chat-message-text h2 { - font-size: 1.2em; -} - -.chat-message-text h3 { - font-size: 1.1em; -} - -.chat-message-text h4 { - font-size: 1em; -} - -.chat-message-text ul, -.chat-message-text ol { - margin: 0.5em 0; - padding-left: 1.5em; -} - -.chat-message-text li { - margin: 0.25em 0; -} - -.chat-message-text code { - padding: 0.15em 0.4em; - border-radius: 3px; - background-color: var(--vscode-textCodeBlock-background, rgba(0, 0, 0, 0.2)); - font: 0.9em/1.4 "SFMono-Regular", Menlo, Monaco, Consolas, monospace; -} - -.chat-message-text pre { - margin: 0.75em 0; - padding: 12px; - overflow-x: auto; - border-radius: 6px; - background-color: var(--vscode-textCodeBlock-background, rgba(0, 0, 0, 0.2)); -} - -.chat-message-text pre code { - padding: 0; - background: transparent; - font-size: 0.85em; -} - -.chat-message-text table { - width: 100%; - margin: 0.75em 0; - border-collapse: collapse; - font-size: 0.9em; -} - -.chat-message-text th, -.chat-message-text td { - padding: 8px 12px; - border: 1px solid var(--vscode-editorGroup-border, var(--line, #3c3c3c)); - text-align: left; -} - -.chat-message-text th { - font-weight: 600; - background-color: var(--vscode-list-hoverBackground, rgba(255, 255, 255, 0.06)); -} - -.chat-message-text tr:nth-child(even) { - background-color: var(--vscode-list-hoverBackground, rgba(255, 255, 255, 0.04)); -} - -.chat-message-text blockquote { - margin: 0.75em 0; - padding: 0.5em 1em; - border-left: 3px solid var(--vscode-textLink-foreground, #3794ff); - background-color: var(--vscode-textBlockQuote-background, rgba(0, 0, 0, 0.1)); - color: var(--vscode-descriptionForeground, inherit); -} - -.chat-message-text blockquote p { - margin: 0; -} - -.chat-message-text a { - color: var(--vscode-textLink-foreground, #3794ff); - text-decoration: none; -} - -.chat-message-text a:hover { - text-decoration: underline; -} - -.chat-message-text hr { - margin: 1em 0; - border: none; - border-top: 1px solid var(--vscode-editorGroup-border, var(--line, #3c3c3c)); -} - -.chat-message-text strong { - font-weight: 600; -} - -.chat-message-text em { - font-style: italic; -} - -.misc-editor-shell { - height: 100%; - display: flex; - flex-direction: column; - background: var(--panel-1, #1e1e1e); -} - -.misc-editor-header { - padding: 18px 20px; - border-bottom: 1px solid var(--line, #3c3c3c); - display: flex; - align-items: flex-start; - justify-content: space-between; - gap: 16px; -} - -@media (max-width: 760px) { - .chat-inline-surface, - .chat-tool-surface { - width: 100%; - margin-left: 0; - } - - .chat-message-content { - max-width: calc(100% - 44px); - } - - .chat-panel-header { - padding: 12px; - } - - .chat-messages, - .chat-input-container { - padding: 12px; - } - - .chat-panel .chat-input-container { - padding: 6px 8px; - } -} - -@media (max-width: 720px) { - .insert-media-grid, - .gallery-overlay-grid { - grid-template-columns: repeat(2, minmax(0, 1fr)); - } - - .ai-suggestion-comparison { - grid-template-columns: 1fr; - } - - .ai-suggestion-arrow { - display: none; - } -} - -.sidebar-section-header { - display: flex; - justify-content: space-between; - margin-bottom: 8px; -} - -.sidebar-section-items { - display: flex; - flex-direction: column; - gap: 8px; -} - -.sidebar-item { - display: flex; - flex-direction: column; - align-items: flex-start; - gap: 4px; - width: 100%; - padding: 12px; - border-radius: 14px; - background: var(--panel-2); - color: var(--ink); -} - -.sidebar-item:hover, -.panel-tab:hover { - background: var(--accent-soft); -} - -.sidebar-item.active { - outline: 1px solid var(--accent); - background: rgba(79, 179, 255, 0.12); -} - -.sidebar-badge { - padding: 2px 8px; - border-radius: 999px; - background: rgba(110, 203, 139, 0.16); - color: var(--success); - font-size: 11px; -} - -.panel-shell { - min-height: 160px; - max-height: 160px; - border-top: 1px solid var(--line); -} - -.panel-shell.is-hidden { - display: none; -} - -.panel-tabs { - display: flex; - gap: 8px; -} - -.panel-tabs { - display: flex; - gap: 2px; -} - -.panel-tab { - background: transparent; - border: none; - padding: 6px 12px; - font-size: 12px; - color: var(--vscode-tab-inactiveForeground); - cursor: pointer; - border-bottom: 2px solid transparent; - border-radius: 0; -} - -.panel-tab:hover { - color: var(--vscode-tab-activeForeground); - background: transparent; -} - -.panel-tab.active { - color: var(--vscode-tab-activeForeground); - border-bottom-color: var(--vscode-focusBorder); - background: transparent; -} - -.assistant-content { - display: flex; - flex-direction: column; - gap: 12px; - padding: 12px; -} - -.assistant-sidebar-header { - display: flex; - align-items: flex-start; - justify-content: space-between; - gap: 12px; -} - -.assistant-sidebar-heading { - display: flex; - flex-direction: column; - gap: 4px; -} - -.assistant-sidebar-description, -.assistant-sidebar-context-text, -.assistant-sidebar-message-content { - color: var(--vscode-descriptionForeground); -} - -.assistant-sidebar-status { - border-radius: 999px; - border: 1px solid var(--vscode-panel-border); - padding: 2px 8px; - font-size: 11px; - line-height: 1.4; -} - -.assistant-sidebar-status.is-offline { - background: rgba(255, 196, 0, 0.18); - border-color: rgba(255, 196, 0, 0.35); - color: var(--vscode-editor-foreground); -} - -.assistant-sidebar-context { - display: flex; - flex-direction: column; - gap: 10px; - padding: 8px; - border: 1px solid var(--vscode-panel-border); - border-radius: 6px; - background: var(--vscode-editorWidget-background, rgba(0, 0, 0, 0.2)); -} - -.assistant-sidebar-context-row { - display: flex; - justify-content: space-between; - gap: 12px; -} - -.assistant-sidebar-context-label, -.assistant-sidebar-message-role { - font-size: 11px; - text-transform: uppercase; - letter-spacing: 0.04em; - color: var(--vscode-descriptionForeground); -} - -.assistant-sidebar-context-value { - text-align: right; - color: var(--vscode-editor-foreground); -} - -.assistant-sidebar-context-text, -.assistant-sidebar-message-content { - margin: 0; - white-space: pre-wrap; -} - -.assistant-sidebar-prompt-form, -.assistant-sidebar-welcome, -.assistant-sidebar-transcript { - display: flex; - flex-direction: column; - gap: 10px; -} - -.assistant-sidebar-prompt { - width: 100%; - min-height: 120px; - resize: vertical; - border: 1px solid var(--vscode-input-border); - border-radius: 6px; - background: var(--vscode-input-background); - color: var(--vscode-input-foreground); - padding: 10px; - font: inherit; -} - -.assistant-sidebar-prompt:focus { - outline: 1px solid var(--vscode-focusBorder); - outline-offset: 1px; -} - -.assistant-sidebar-start-button { - align-self: flex-start; - border: 1px solid var(--vscode-button-border, transparent); - border-radius: 999px; - background: var(--vscode-button-background); - color: var(--vscode-button-foreground); - padding: 7px 14px; - cursor: pointer; -} - -.assistant-sidebar-start-button:disabled { - cursor: default; - opacity: 0.55; -} - -.assistant-card, -.assistant-sidebar-message { - display: flex; - flex-direction: column; - gap: 6px; - padding: 12px; - border: 1px solid var(--vscode-panel-border); - border-radius: 6px; - border-bottom-width: 1px; - background: var(--vscode-editorWidget-background, rgba(0, 0, 0, 0.2)); -} - -.assistant-sidebar-message.user { - background: var(--vscode-list-hoverBackground); -} - -.assistant-sidebar-message.assistant { - background: var(--vscode-editorWidget-background, rgba(0, 0, 0, 0.2)); -} - -.status-bar { - height: 22px; - display: flex; - align-items: center; - justify-content: space-between; - background-color: var(--vscode-statusBar-background); - color: var(--vscode-statusBar-foreground); - font-size: 12px; - padding: 0 8px; - user-select: none; - flex-wrap: nowrap; - gap: 0; - border-top: none; -} - -.status-bar-left, -.status-bar-right { - display: flex; - align-items: center; - gap: 4px; - flex-shrink: 0; - min-width: 0; -} - -.status-bar-item { - display: flex; - align-items: center; - gap: 6px; - padding: 0 8px; - height: 100%; - max-width: none; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - border-radius: 0; - background: transparent; - font-size: 12px; -} - -.status-bar-item .task-message-text { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - max-width: 300px; -} - -.task-spinner { - width: 10px; - height: 10px; - border: 2px solid rgba(255, 255, 255, 0.3); - border-top-color: white; - border-radius: 50%; - animation: spin 0.8s linear infinite; -} - -@keyframes spin { - to { transform: rotate(360deg); } -} - -.panel-content { - padding: 8px; -} - -.task-list { - gap: 4px; -} - -.output-list, -.git-log-list { - gap: 6px; -} - -.task-entry { - padding: 8px; - border-bottom: none; - border-radius: 4px; - background-color: var(--vscode-sideBar-background); -} - -.output-entry { - padding: 8px; - border-bottom: none; - border-radius: 4px; - background-color: var(--vscode-sideBar-background); - font-size: 12px; - color: var(--vscode-editor-foreground); -} - -@media (max-width: 1100px) { - .editor-frame { - grid-template-columns: 1fr; - } - - .assistant-sidebar-shell { - display: none; - } - - .dashboard-grid { - grid-template-columns: 1fr; - } -} - -.text-muted { - color: var(--vscode-descriptionForeground); -} - -.editor-empty { - flex: 1; - display: flex; - align-items: flex-start; - justify-content: center; - background-color: var(--vscode-editor-background); - overflow-y: auto; - padding: 40px 20px; -} - -.dashboard-content { - max-width: 720px; - width: 100%; -} - -.dashboard-content h1 { - font-size: 24px; - font-weight: 400; - margin: 0 0 4px; - color: var(--vscode-editor-foreground); -} - -.dashboard-content > .text-muted { - margin-bottom: 24px; - display: block; -} - -.dashboard-stats { - display: grid; - grid-template-columns: repeat(3, minmax(0, 1fr)); - gap: 12px; - margin-bottom: 24px; -} - -.stat-card { - padding: 16px; - background-color: var(--vscode-sideBar-background); - border-radius: 6px; -} - -.stat-number { - font-size: 32px; - font-weight: 600; - color: var(--vscode-editor-foreground); - line-height: 1; - margin-bottom: 4px; -} - -.stat-label { - font-size: 12px; - color: var(--vscode-descriptionForeground); - text-transform: uppercase; - letter-spacing: 0.5px; - margin-bottom: 10px; -} - -.stat-breakdown { - display: flex; - flex-wrap: wrap; - gap: 6px; -} - -.stat-tag { - font-size: 11px; - padding: 2px 8px; - border-radius: 3px; - background-color: var(--vscode-input-background); - color: var(--vscode-descriptionForeground); -} - -.stat-published { - color: var(--vscode-testing-iconPassed); -} - -.stat-draft { - color: var(--vscode-editorWarning-foreground); -} - -.stat-archived { - color: var(--vscode-descriptionForeground); -} - -.dashboard-section { - background-color: var(--vscode-sideBar-background); - border-radius: 6px; - padding: 16px; - margin-bottom: 12px; -} - -.dashboard-section h4 { - font-size: 11px; - font-weight: 600; - color: var(--vscode-descriptionForeground); - text-transform: uppercase; - letter-spacing: 0.5px; - margin: 0 0 12px; -} - -.timeline-chart { - display: flex; - align-items: flex-end; - gap: 4px; - height: 100px; -} - -.timeline-bar-container { - flex: 1; - display: flex; - flex-direction: column; - align-items: center; - height: 100%; -} - -.timeline-bar { - width: 100%; - max-width: 40px; - background-color: var(--vscode-activityBarBadge-background); - border-radius: 3px 3px 0 0; - margin-top: auto; - min-height: 4px; - position: relative; - transition: opacity 0.15s; -} - -.timeline-bar:hover { - opacity: 0.8; -} - -.timeline-bar-count { - position: absolute; - top: -16px; - left: 50%; - transform: translateX(-50%); - font-size: 10px; - color: var(--vscode-descriptionForeground); -} - -.timeline-bar-label { - display: flex; - flex-direction: column; - align-items: center; - font-size: 9px; - color: var(--vscode-descriptionForeground); - margin-top: 4px; - line-height: 1.15; -} - -.timeline-bar-label-month { - white-space: nowrap; -} - -.timeline-bar-label-year { - font-size: 8px; -} - -.tag-cloud { - display: flex; - flex-wrap: wrap; - gap: 6px 10px; - align-items: baseline; - line-height: 1.6; -} - -.dashboard-tag { - padding: 2px 8px; - border-radius: 10px; - background-color: var(--vscode-input-background); - color: var(--vscode-editor-foreground); - cursor: default; - transition: opacity 0.15s; - white-space: nowrap; -} - -.dashboard-tag:hover { - opacity: 0.75; -} - -.dashboard-tag.has-color { - border-radius: 12px; -} - -.dashboard-tag.has-color:hover { - opacity: 0.85; -} - -.tag-cloud-more { - font-size: 11px; -} - -.tag-count { - font-size: 10px; - opacity: 0.5; - margin-left: 2px; -} - -.dashboard-category { - font-size: 12px; - border: 1px solid var(--vscode-input-border); -} - -.recent-posts-list { - display: flex; - flex-direction: column; -} - -.recent-post-item { - display: flex; - align-items: center; - gap: 10px; - padding: 6px 8px; - border-radius: 4px; - cursor: pointer; - font-size: 12px; - width: 100%; - border: none; - background: transparent; - text-align: left; - color: inherit; -} - -.recent-post-item:hover { - background-color: var(--vscode-list-hoverBackground); -} - -.recent-post-title { - flex: 1; - color: var(--vscode-editor-foreground); - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.recent-post-status { - font-size: 10px; - padding: 1px 6px; - border-radius: 3px; - background-color: var(--vscode-input-background); - text-transform: uppercase; - letter-spacing: 0.3px; -} - -.recent-post-status.status-published { - color: var(--vscode-testing-iconPassed); -} - -.recent-post-status.status-draft { - color: var(--vscode-editorWarning-foreground); -} - -.recent-post-status.status-archived { - color: var(--vscode-descriptionForeground); -} - -.recent-post-date { - color: var(--vscode-descriptionForeground); - white-space: nowrap; -} - -.sidebar-content { - flex: 1; - overflow-y: auto; - overflow-x: hidden; - padding: 0; -} - -.sidebar-section { - margin-bottom: 4px; - padding-bottom: 0; -} - -.sidebar-section-header { - display: flex; - align-items: center; - justify-content: space-between; - padding: 8px 12px; - font-size: 11px; - font-weight: 600; - text-transform: uppercase; - letter-spacing: 0.5px; - color: var(--vscode-sideBar-foreground); -} - -.sidebar-section-title { - display: flex; - align-items: center; - gap: 6px; - padding: 4px 12px; - font-size: 12px; - color: var(--vscode-descriptionForeground); -} - -.section-icon { - font-size: 8px; -} - -.section-icon.status-draft { - color: var(--vscode-editorWarning-foreground); -} - -.section-icon.status-published { - color: var(--vscode-testing-iconPassed); -} - -.section-icon.status-archived { - color: var(--vscode-descriptionForeground); -} - -.sidebar-list { - display: flex; - flex-direction: column; -} - -.sidebar-item-row { - display: flex; - align-items: stretch; -} - -.sidebar-item { - width: 100%; - display: flex; - align-items: flex-start; - gap: 8px; - padding: 6px 12px 6px 12px; - border: none; - border-left: 2px solid transparent; - border-radius: 0; - background: transparent; - color: inherit; - cursor: pointer; - text-align: left; -} - -.sidebar-item:hover { - background-color: var(--vscode-list-hoverBackground); -} - -.sidebar-item.selected { - background-color: var(--vscode-list-activeSelectionBackground); - border-left-color: var(--vscode-focusBorder); - color: var(--vscode-list-activeSelectionForeground); -} - -.sidebar-post-item { - flex-direction: row; -} - -.sidebar-item.post-type-picture { - background: linear-gradient(90deg, rgba(139, 92, 246, 0.05) 0%, transparent 100%); -} - -.sidebar-item.post-type-aside { - background: linear-gradient(90deg, rgba(245, 158, 11, 0.05) 0%, transparent 100%); -} - -.sidebar-item.post-type-quote { - background: linear-gradient(90deg, rgba(34, 197, 94, 0.05) 0%, transparent 100%); -} - -.sidebar-item.post-type-link { - background: linear-gradient(90deg, rgba(59, 130, 246, 0.05) 0%, transparent 100%); -} - -.sidebar-item.post-type-video { - background: linear-gradient(90deg, rgba(239, 68, 68, 0.05) 0%, transparent 100%); -} - -.post-type-icon { - font-size: 14px; - line-height: 1.4; - flex-shrink: 0; - opacity: 0.85; -} - -.sidebar-item-content { - display: flex; - flex: 1; - min-width: 0; - flex-direction: column; -} - -.sidebar-item-title-row { - display: flex; - align-items: center; - gap: 6px; -} - -.sidebar-item-title { - font-size: 13px; - color: var(--vscode-sideBar-foreground); - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.sidebar-item-language-badge { - flex-shrink: 0; - min-width: 18px; - padding: 1px 5px; - border-radius: 999px; - background: color-mix(in srgb, var(--vscode-badge-background) 82%, transparent); - color: var(--vscode-badge-foreground); - font-size: 10px; - font-weight: 700; - text-align: center; -} - -.sidebar-item-meta { - font-size: 11px; - color: var(--vscode-descriptionForeground); - margin-top: 2px; -} - -.media-grid { - display: grid; - grid-template-columns: 1fr; - gap: 2px; - padding: 4px; -} - -.media-item-row { - display: flex; - align-items: stretch; - gap: 4px; -} - -.media-item { - display: flex; - align-items: center; - gap: 8px; - width: 100%; - padding: 6px 8px; - border: none; - border-radius: 4px; - background: transparent; - color: inherit; - text-align: left; -} - -.media-item:hover { - background-color: var(--vscode-list-hoverBackground); -} - -.media-item.selected { - background-color: var(--vscode-list-activeSelectionBackground); - color: var(--vscode-list-activeSelectionForeground); -} - -.media-thumbnail { - width: 40px; - height: 40px; - display: flex; - align-items: center; - justify-content: center; - background-color: var(--vscode-input-background); - border-radius: 4px; - flex-shrink: 0; - overflow: hidden; - font-size: 20px; -} - -.media-thumbnail.has-image { - position: relative; -} - -.media-thumbnail-fallback { - display: flex; - align-items: center; - justify-content: center; - width: 100%; - height: 100%; -} - -.media-thumbnail-image { - position: absolute; - inset: 0; - width: 100%; - height: 100%; - object-fit: cover; - opacity: 0; - transition: opacity 0.15s ease; -} - -.media-thumbnail.is-loaded .media-thumbnail-image { - opacity: 1; -} - -.media-thumbnail.is-loaded .media-thumbnail-fallback { - opacity: 0; -} - -.media-item-info { - flex: 1; - min-width: 0; -} - -.media-item-name { - font-size: 12px; - color: var(--vscode-sideBar-foreground); - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.media-item-size { - font-size: 10px; - color: var(--vscode-descriptionForeground); -} - -.sidebar-item-row .sidebar-item, -.media-item-row .media-item { - flex: 1; - min-width: 0; -} - -.sidebar-actions { - display: flex; - gap: 4px; -} - -.sidebar-action { - background: transparent; - border: none; - padding: 2px; - color: var(--vscode-sideBar-foreground); - cursor: pointer; - opacity: 0.7; - display: flex; - align-items: center; - justify-content: center; - border-radius: 3px; -} - -.sidebar-action:hover { - opacity: 1; - background-color: var(--vscode-list-hoverBackground); -} - -.sidebar-action.active { - background-color: var(--vscode-list-activeSelectionBackground); - opacity: 1; -} - -.search-box { - display: flex; - align-items: center; - gap: 4px; - padding: 4px 12px 8px; - position: relative; -} - -.search-box input { - flex: 1; - min-width: 0; - padding: 6px 28px 6px 8px; - font-size: 12px; - background-color: var(--vscode-input-background); - border: 1px solid var(--vscode-input-border); - color: var(--vscode-input-foreground); - border-radius: 3px; -} - -.search-box input::placeholder { - color: var(--vscode-input-placeholderForeground); -} - -.search-box input:focus { - outline: none; - border-color: var(--vscode-focusBorder); -} - -.search-box button[type="submit"] { - position: absolute; - right: 40px; - background: transparent; - border: none; - padding: 4px; - color: var(--vscode-descriptionForeground); - cursor: pointer; - opacity: 0.7; -} - -.search-box button[type="submit"]:hover { - opacity: 1; -} - -.search-box .clear-search { - position: absolute; - right: 16px; - background: transparent; - border: none; - padding: 4px; - color: var(--vscode-descriptionForeground); - cursor: pointer; - font-size: 10px; - opacity: 0.7; -} - -.search-box .clear-search:hover { - opacity: 1; -} - -.calendar-view { - padding: 8px 12px; - border-bottom: 1px solid var(--vscode-sideBar-border); -} - -.calendar-header { - display: flex; - align-items: center; - justify-content: space-between; - font-size: 11px; - font-weight: 600; - text-transform: uppercase; - letter-spacing: 0.5px; - color: var(--vscode-descriptionForeground); - margin-bottom: 8px; -} - -.calendar-header.collapsible-header { - cursor: pointer; - padding: 4px 6px; - margin: 0 -6px 8px -6px; - border-radius: 3px; - user-select: none; -} - -.calendar-header.collapsible-header:hover { - background-color: var(--vscode-list-hoverBackground); -} - -.calendar-header.collapsible-header.collapsed { - margin-bottom: 0; -} - -.calendar-header .collapse-icon { - font-size: 9px; - margin-right: 4px; - opacity: 0.7; -} - -.calendar-header .clear-filter { - background: transparent; - border: none; - color: var(--vscode-descriptionForeground); - cursor: pointer; - font-size: 10px; - padding: 2px 4px; - opacity: 0.7; -} - -.calendar-header .clear-filter:hover { - opacity: 1; -} - -.calendar-years { - display: flex; - flex-direction: column; - gap: 2px; -} - -.calendar-year-header { - display: flex; - align-items: center; - gap: 6px; - padding: 4px 6px; - cursor: pointer; - border-radius: 3px; - font-size: 12px; - color: var(--vscode-sideBar-foreground); - background: transparent; - text-align: left; -} - -.calendar-year-header:hover { - background-color: var(--vscode-list-hoverBackground); -} - -.calendar-year-header.selected { - background-color: var(--vscode-list-activeSelectionBackground); -} - -.calendar-year-header .expand-icon { - font-size: 8px; - color: var(--vscode-descriptionForeground); - width: 10px; -} - -.calendar-year-header .year-label { - flex: 1; -} - -.calendar-year-header .year-count { - font-size: 10px; - color: var(--vscode-descriptionForeground); - background-color: var(--vscode-badge-background); - padding: 1px 6px; - border-radius: 8px; -} - -.calendar-months { - display: flex; - flex-direction: column; - gap: 1px; - padding-left: 16px; - margin-top: 2px; -} - -.calendar-month { - display: flex; - align-items: center; - justify-content: space-between; - padding: 3px 6px; - cursor: pointer; - border-radius: 3px; - font-size: 12px; - color: var(--vscode-sideBar-foreground); - background: transparent; - text-align: left; -} - -.calendar-month:hover { - background-color: var(--vscode-list-hoverBackground); -} - -.calendar-month.selected { - background-color: var(--vscode-list-activeSelectionBackground); -} - -.calendar-month .month-count { - font-size: 10px; - color: var(--vscode-descriptionForeground); -} - -.calendar-empty { - font-size: 12px; - color: var(--vscode-descriptionForeground); - padding: 8px; - text-align: center; -} - -.month-count, -.sidebar-section-count { - font-size: 10px; - color: var(--vscode-descriptionForeground); -} - -.filter-panel { - padding: 8px 12px; - border-bottom: 1px solid var(--vscode-sideBar-border); -} - -.filter-section { - margin-bottom: 12px; -} - -.filter-section:last-child { - margin-bottom: 0; -} - -.filter-header { - display: flex; - align-items: center; - font-size: 11px; - font-weight: 600; - text-transform: uppercase; - letter-spacing: 0.5px; - color: var(--vscode-descriptionForeground); - margin-bottom: 6px; -} - -.filter-header.collapsible-header { - cursor: pointer; - padding: 4px 6px; - margin: 0 -6px 6px -6px; - border-radius: 3px; - user-select: none; -} - -.filter-header.collapsible-header:hover { - background-color: var(--vscode-list-hoverBackground); -} - -.filter-header.collapsible-header.collapsed { - margin-bottom: 0; -} - -.filter-header .collapse-icon { - font-size: 9px; - margin-right: 4px; - opacity: 0.7; -} - -.filter-header .clear-filter { - background: transparent; - border: none; - color: var(--vscode-descriptionForeground); - cursor: pointer; - font-size: 10px; - padding: 2px 4px; - margin-left: auto; - opacity: 0.7; -} - -.filter-header .clear-filter:hover { - opacity: 1; -} - -.filter-chips { - display: flex; - flex-wrap: wrap; - gap: 4px; -} - -.filter-chip { - background-color: var(--vscode-button-secondaryBackground); - color: var(--vscode-button-secondaryForeground); - border: none; - padding: 2px 8px; - font-size: 11px; - border-radius: 12px; - cursor: pointer; - transition: background-color 0.15s, opacity 0.15s; -} - -.filter-chip:hover { - background-color: var(--vscode-button-secondaryHoverBackground); -} - -.filter-chip.active { - background-color: var(--vscode-button-background); - color: var(--vscode-button-foreground); -} - -.filter-chip.has-color { - border: 1px solid transparent; -} - -.filter-chip.has-color:hover { - opacity: 0.85; -} - -.filter-chip.has-color.active { - box-shadow: 0 0 0 2px var(--vscode-focusBorder, #007fd4); -} - -.filter-status { - display: flex; - align-items: center; - justify-content: space-between; - padding: 6px 12px; - font-size: 11px; - color: var(--vscode-descriptionForeground); - background-color: var(--vscode-list-hoverBackground); - border-bottom: 1px solid var(--vscode-sideBar-border); -} - -.filter-status button { - background: transparent; - border: none; - color: var(--accent-color); - cursor: pointer; - font-size: 11px; - padding: 0; -} - -.filter-status button:hover { - text-decoration: underline; - background: transparent; -} - -.sidebar-load-more { - padding: 12px 16px; - display: flex; - justify-content: center; -} - -.load-more-button { - width: 100%; - padding: 8px 16px; - background-color: var(--vscode-button-secondaryBackground); - color: var(--vscode-button-secondaryForeground); - border: none; - border-radius: 4px; - font-size: 12px; - cursor: pointer; - transition: background-color 0.2s; -} - -.import-analysis { - display: flex; - flex-direction: column; - gap: 16px; - padding: 18px 20px 26px; - color: var(--vscode-foreground); -} - -.import-analysis-header { - display: flex; - flex-direction: column; - gap: 8px; -} - -.import-analysis-header p { - margin: 0; - color: var(--vscode-descriptionForeground); - font-size: 13px; - line-height: 1.5; -} - -.import-definition-name { - width: min(480px, 100%); - border: 1px solid var(--vscode-input-border, transparent); - background: var(--vscode-input-background); - color: var(--vscode-input-foreground, var(--vscode-foreground)); - border-radius: 6px; - padding: 10px 12px; - font-size: 18px; - font-weight: 600; -} - -.import-file-selectors { - display: grid; - gap: 12px; -} - -.import-file-row { - display: grid; - grid-template-columns: 150px minmax(0, 1fr) auto; - gap: 12px; - align-items: center; - padding: 12px 14px; - border: 1px solid var(--vscode-panel-border); - border-radius: 8px; - background: color-mix(in srgb, var(--vscode-editor-background) 76%, var(--vscode-input-background)); -} - -.import-file-row label { - font-size: 12px; - font-weight: 600; - color: var(--vscode-descriptionForeground); - text-transform: uppercase; - letter-spacing: 0.04em; -} - -.import-file-path { - min-width: 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - font-family: var(--vscode-editor-font-family, ui-monospace, monospace); - font-size: 12px; -} - -.import-file-path.placeholder { - color: var(--vscode-descriptionForeground); -} - -.import-analysis button, -.import-analysis select { - border: 1px solid var(--vscode-button-border, transparent); - border-radius: 6px; - font-size: 12px; -} - -.import-analysis button { - background: var(--vscode-button-secondaryBackground, var(--vscode-button-background)); - color: var(--vscode-button-secondaryForeground, var(--vscode-button-foreground)); - padding: 8px 12px; - cursor: pointer; -} - -.import-analysis button:hover:not(:disabled) { - background: var(--vscode-button-secondaryHoverBackground, var(--vscode-button-hoverBackground)); -} - -.import-analyze-btn, -.import-execute-btn { - background: var(--vscode-button-background) !important; - color: var(--vscode-button-foreground) !important; -} - -.import-analysis button:disabled { - opacity: 0.65; - cursor: not-allowed; -} - -.import-loading { - display: flex; - align-items: center; - gap: 12px; - padding: 16px; - border: 1px solid var(--vscode-panel-border); - border-radius: 10px; - background: color-mix(in srgb, var(--vscode-editor-background) 84%, var(--vscode-input-background)); -} - -.import-spinner { - width: 18px; - height: 18px; - border: 2px solid var(--vscode-descriptionForeground); - border-top-color: var(--vscode-button-background); - border-radius: 50%; - animation: import-spinner-rotate 0.8s linear infinite; - flex-shrink: 0; -} - -.import-progress { - display: flex; - flex-direction: column; - gap: 2px; -} - -.import-progress-step { - font-size: 13px; - color: var(--vscode-foreground); -} - -.import-progress-detail { - font-size: 11px; - color: var(--vscode-descriptionForeground); -} - -@keyframes import-spinner-rotate { - to { - transform: rotate(360deg); - } -} - -.import-site-info { - display: grid; - grid-template-columns: repeat(4, minmax(0, 1fr)); - gap: 12px; -} - -.import-site-info-item, -.import-stat-card, -.import-date-distribution, -.import-detail-section, -.import-execute-section { - border: 1px solid var(--vscode-panel-border); - border-radius: 10px; - background: color-mix(in srgb, var(--vscode-editor-background) 84%, var(--vscode-input-background)); -} - -.import-site-info-item { - display: flex; - flex-direction: column; - gap: 6px; - padding: 14px; -} - -.info-label { - font-size: 11px; - font-weight: 600; - color: var(--vscode-descriptionForeground); - text-transform: uppercase; - letter-spacing: 0.05em; -} - -.info-value { - font-size: 13px; - font-weight: 500; - overflow-wrap: anywhere; -} - -.import-stat-cards { - display: grid; - grid-template-columns: repeat(5, minmax(0, 1fr)); - gap: 12px; -} - -.import-stat-card { - padding: 14px; -} - -.import-stat-card h3, -.import-date-distribution h3, -.import-detail-section h3, -.taxonomy-group h4 { - margin: 0; -} - -.import-stat-number { - margin-top: 10px; - font-size: 28px; - font-weight: 700; - line-height: 1; -} - -.import-stat-breakdown, -.import-execute-summary, -.import-taxonomy-list { - display: flex; - flex-wrap: wrap; - gap: 8px; -} - -.import-stat-breakdown { - margin-top: 12px; -} - -.import-stat-tag, -.import-count-tag, -.import-taxonomy-pill, -.macro-status-badge { - display: inline-flex; - align-items: center; - gap: 4px; - padding: 4px 9px; - border-radius: 999px; - font-size: 11px; - font-weight: 600; -} - -.stat-new, -.import-taxonomy-pill.new-tax { - background: rgba(117, 190, 255, 0.16); - color: #75beff; -} - -.stat-update, -.stat-mapped, -.import-taxonomy-pill.exists, -.import-taxonomy-pill.mapped, -.macro-status-badge.mapped, -.import-execution-complete { - background: rgba(115, 201, 145, 0.16); - color: #73c991; -} - -.stat-conflict { - background: rgba(255, 166, 87, 0.16); - color: #ffb169; -} - -.stat-duplicate, -.stat-missing, -.macro-status-badge.unmapped, -.import-execution-error { - background: rgba(204, 167, 0, 0.16); - color: #cca700; -} - -.import-date-distribution, -.import-detail-section, -.import-execute-section { - padding: 16px; -} - -.import-section-toggle { - width: 100%; - display: flex; - align-items: center; - justify-content: space-between; - gap: 10px; - padding: 0; - border: none !important; - background: transparent !important; - color: inherit !important; - font-size: 16px !important; - font-weight: 600; - text-align: left; -} - -.import-section-toggle:hover { - background: transparent !important; - opacity: 0.9; -} - -.toggle-icon { - font-size: 12px; - color: var(--vscode-descriptionForeground); -} - -.distribution-bars { - display: grid; - gap: 10px; - margin-top: 14px; -} - -.distribution-row { - display: grid; - grid-template-columns: 56px minmax(0, 1fr) 72px; - gap: 10px; - align-items: center; -} - -.distribution-year, -.distribution-count, -.slug-cell { - font-family: var(--vscode-editor-font-family, ui-monospace, monospace); - font-size: 11px; -} - -.distribution-bar-container { - height: 10px; - border-radius: 999px; - overflow: hidden; - background: var(--vscode-input-background); -} - -.distribution-bar { - height: 100%; - min-width: 8px; - border-radius: inherit; -} - -.distribution-bar-posts { - background: linear-gradient(90deg, rgba(117, 190, 255, 0.8), rgba(117, 190, 255, 0.35)); -} - -.import-execute-section { - display: flex; - align-items: center; - justify-content: space-between; - gap: 16px; -} - -.import-execute-summary { - color: var(--vscode-descriptionForeground); -} - -.import-execution-complete, -.import-execution-error { - padding: 10px 12px; - border-radius: 8px; - font-size: 12px; - font-weight: 600; -} - -.import-execution-progress { - display: grid; - gap: 10px; - padding: 16px; - border: 1px solid var(--vscode-panel-border); - border-radius: 10px; - background: color-mix(in srgb, var(--vscode-editor-background) 84%, var(--vscode-input-background)); -} - -.import-execution-header { - display: flex; - align-items: center; - justify-content: space-between; - gap: 12px; -} - -.import-execution-header h3 { - margin: 0; - font-size: 14px; -} - -.import-progress-bar { - height: 10px; - border-radius: 999px; - overflow: hidden; - background: var(--vscode-input-background); -} - -.import-progress-fill { - height: 100%; - background: linear-gradient(90deg, rgba(117, 190, 255, 0.85), rgba(117, 190, 255, 0.45)); -} - -.import-progress-info { - display: flex; - align-items: center; - gap: 12px; - flex-wrap: wrap; - font-size: 12px; -} - -.import-phase { - font-weight: 600; -} - -.import-detail, -.import-counter { - color: var(--vscode-descriptionForeground); -} - -.import-detail-table { - width: 100%; - border-collapse: collapse; - margin-top: 14px; -} - -.import-detail-table th, -.import-detail-table td { - padding: 10px 8px; - text-align: left; - border-bottom: 1px solid var(--vscode-panel-border); - vertical-align: middle; - font-size: 12px; -} - -.import-detail-table th { - font-size: 11px; - color: var(--vscode-descriptionForeground); - text-transform: uppercase; - letter-spacing: 0.04em; -} - -.import-detail-table .status-badge { - display: inline-flex; - align-items: center; - border-radius: 999px; - padding: 4px 9px; - font-size: 10px; - font-weight: 700; - text-transform: uppercase; - letter-spacing: 0.04em; -} - -.import-detail-table .status-badge.new { - background: rgba(117, 190, 255, 0.16); - color: #75beff; -} - -.import-detail-table .status-badge.update { - background: rgba(115, 201, 145, 0.16); - color: #73c991; -} - -.import-detail-table .status-badge.conflict { - background: rgba(255, 166, 87, 0.16); - color: #ffb169; -} - -.import-detail-table .status-badge.duplicate, -.import-detail-table .status-badge.missing { - background: rgba(204, 167, 0, 0.16); - color: #cca700; -} - -.categories-cell, -.existing-match, -.mime-type-cell, -.post-type-cell { - font-size: 11px; - color: var(--vscode-descriptionForeground); -} - -.mime-type-cell, -.post-type-cell, -.existing-match, -.slug-cell { - font-family: var(--vscode-editor-font-family, ui-monospace, monospace); -} - -.resolution-select, -.taxonomy-mapping-input { - min-width: 150px; - background: var(--vscode-dropdown-background, var(--vscode-input-background)); - color: var(--vscode-dropdown-foreground, var(--vscode-foreground)); - border: 1px solid var(--vscode-dropdown-border, var(--vscode-panel-border)); - padding: 6px 8px; -} - -.taxonomy-analyze-row { - display: flex; - align-items: center; - gap: 12px; - padding: 0 0 12px; - margin-top: 12px; - border-bottom: 1px solid var(--vscode-panel-border); -} - -.taxonomy-analyze-dropdown { - position: relative; -} - -.taxonomy-analyze-btn { - display: inline-flex; - align-items: center; - gap: 6px; - white-space: nowrap; -} - -.taxonomy-model-dropdown { - position: absolute; - top: calc(100% + 6px); - left: 0; - min-width: 220px; - max-height: 280px; - overflow-y: auto; - background: var(--vscode-dropdown-background, var(--vscode-sideBar-background)); - border: 1px solid var(--vscode-dropdown-border, var(--vscode-panel-border)); - border-radius: 6px; - box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24); - z-index: 20; -} - -.taxonomy-model-option { - width: 100%; - display: block; - border: none !important; - border-radius: 0 !important; - background: transparent !important; - color: var(--vscode-foreground) !important; - text-align: left; - padding: 8px 12px !important; -} - -.taxonomy-model-option:hover { - background: var(--vscode-list-hoverBackground) !important; -} - -.taxonomy-analyze-hint { - font-size: 11px; - color: var(--vscode-descriptionForeground); -} - -.import-taxonomy-groups { - display: grid; - grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 16px; - margin-top: 14px; -} - -.taxonomy-group { - display: flex; - flex-direction: column; - gap: 12px; -} - -.import-taxonomy-entry, -.import-taxonomy-edit-form { - display: inline-flex; - align-items: center; - gap: 8px; -} - -.import-taxonomy-entry, -.import-taxonomy-edit-form { - flex-wrap: wrap; -} - -.import-taxonomy-pill { - border: none; - cursor: default; -} - -button.import-taxonomy-pill { - cursor: pointer; -} - -.mapped-target { - background: rgba(115, 201, 145, 0.1); -} - -.taxonomy-mapping-arrow { - color: var(--vscode-descriptionForeground); - font-size: 12px; -} - -.taxonomy-mapping-input { - min-width: 170px; - border-radius: 6px; -} - -.taxonomy-edit-btn, -.taxonomy-clear-btn { - min-width: 28px; - min-height: 28px; - padding: 0 8px !important; - display: inline-flex; - align-items: center; - justify-content: center; -} - -.taxonomy-edit-btn.ghost, -.taxonomy-clear-btn { - background: transparent !important; - border: 1px solid var(--vscode-panel-border) !important; - color: var(--vscode-descriptionForeground) !important; -} - -.macros-list { - display: grid; - gap: 10px; - margin-top: 14px; -} - -.macro-item { - border: 1px solid var(--vscode-panel-border); - border-radius: 8px; - background: var(--vscode-input-background); -} - -.macro-item.unmapped { - border-left: 3px solid #cca700; -} - -.macro-header { - display: flex; - align-items: center; - gap: 10px; - padding: 12px 14px; -} - -.macro-name, -.import-taxonomy-pill { - font-family: var(--vscode-editor-font-family, ui-monospace, monospace); -} - -.macro-count { - margin-left: auto; - font-size: 11px; - color: var(--vscode-descriptionForeground); -} - -.import-empty-state { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - gap: 12px; - padding: 56px 20px; - color: var(--vscode-descriptionForeground); - border: 1px dashed var(--vscode-panel-border); - border-radius: 12px; -} - -.import-empty-state p { - margin: 0; - font-size: 13px; -} - -@media (max-width: 1100px) { - .import-site-info, - .import-stat-cards, - .import-taxonomy-groups { - grid-template-columns: repeat(2, minmax(0, 1fr)); - } -} - -@media (max-width: 780px) { - .import-analysis { - padding: 14px; - } - - .import-file-row, - .distribution-row, - .import-execute-section, - .import-site-info, - .import-stat-cards, - .import-taxonomy-groups { - grid-template-columns: 1fr; - } - - .import-execute-section { - align-items: stretch; - } - - .import-file-row { - align-items: stretch; - } - - .import-analysis button, - .resolution-select, - .taxonomy-mapping-input { - width: 100%; - } - - .taxonomy-analyze-row { - flex-direction: column; - align-items: stretch; - } - - .import-taxonomy-entry, - .import-taxonomy-edit-form { - width: 100%; - flex-direction: column; - align-items: stretch; - } -} - -.load-more-button:hover:not(:disabled) { - background-color: var(--vscode-button-secondaryHoverBackground); -} - -.filter-section { - padding-top: 4px; -} - -.filter-header { - width: 100%; - padding: 6px 0; - background: transparent; - color: var(--vscode-foreground); - text-align: left; -} - -.filter-chips { - flex-direction: row; - flex-wrap: wrap; -} - -.filter-chip { - padding: 5px 10px; - border-radius: 999px; - background: var(--vscode-input-background); - color: var(--vscode-foreground); -} - -.filter-status { - display: flex; - align-items: center; - justify-content: space-between; - gap: 12px; - color: var(--vscode-descriptionForeground); - font-size: 12px; -} - -.filter-status button, -.load-more-button { - padding: 6px 10px; - border-radius: 6px; - background: var(--vscode-input-background); - color: var(--vscode-foreground); -} - -.sidebar-load-more { - padding-bottom: 12px; -} - -.load-more-button { - width: 100%; -} - -.media-item-info { - display: flex; - flex-direction: column; - gap: 2px; -} - -.media-item-name { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.media-item-size { - color: var(--vscode-descriptionForeground); - font-size: 12px; -} - -.chat-list-item { - display: flex; - align-items: center; - width: 100%; - padding: 8px 12px; - border: none; - border-bottom: 1px solid var(--vscode-sideBar-border); - background: transparent; - color: inherit; - text-align: left; -} - -.chat-list-item:hover { - background: var(--vscode-list-hoverBackground); -} - -.chat-list-item.active { - background: var(--vscode-list-activeSelectionBackground); - color: var(--vscode-list-activeSelectionForeground); -} - -.chat-item-content { - display: flex; - flex: 1; - min-width: 0; - flex-direction: column; - gap: 2px; -} - -.chat-item-open { - display: flex; - flex: 1; - min-width: 0; - padding: 0; - border: none; - background: transparent; - color: inherit; - text-align: left; -} - -.chat-item-open:hover { - background: transparent; -} - -.chat-item-open:focus-visible { - outline: 1px solid var(--vscode-focusBorder); - outline-offset: 2px; -} - -.chat-item-title { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.chat-item-date { - color: var(--vscode-descriptionForeground); - font-size: 12px; -} - -.sidebar-delete-button { - background: transparent; - border: none; - color: var(--vscode-descriptionForeground); - cursor: pointer; - font-size: 16px; - line-height: 1; - padding: 0 6px; - flex-shrink: 0; - opacity: 1; - transition: opacity 0.15s, color 0.15s; -} - -.sidebar-item-row:hover .sidebar-delete-button, -.sidebar-item-row .sidebar-item.selected ~ .sidebar-delete-button, -.media-item-row:hover .sidebar-delete-button, -.media-item-row .media-item.selected ~ .sidebar-delete-button, -.chat-list-item:hover .sidebar-delete-button, -.chat-list-item.active .sidebar-delete-button { - opacity: 1; -} - -.sidebar-delete-button:hover { - color: var(--vscode-errorForeground); -} - -.sidebar-item-row .sidebar-item.selected ~ .sidebar-delete-button, -.media-item-row .media-item.selected ~ .sidebar-delete-button { - background-color: var(--vscode-list-activeSelectionBackground); - color: var(--vscode-list-activeSelectionForeground); -} - -.settings-nav-list { - display: flex; - flex-direction: column; - gap: 6px; - padding: 0 12px 12px; -} - -.settings-nav-entry { - display: flex; - align-items: center; - gap: 10px; - width: 100%; - padding: 10px 12px; - border: none; - border-radius: 10px; - background: transparent; - color: inherit; - text-align: left; -} - -.settings-nav-entry:hover { - background: var(--vscode-list-hoverBackground); -} - -.settings-nav-entry-icon { - width: 18px; - flex: 0 0 18px; - text-align: center; -} - -.sidebar-empty { - padding: 16px 12px; - color: var(--vscode-descriptionForeground); -} - -@media (max-width: 820px) { - .dashboard-stats { - grid-template-columns: 1fr; - } - - .recent-post-item { - align-items: flex-start; - flex-wrap: wrap; - } - - .media-grid { - grid-template-columns: 1fr; - } -} \ No newline at end of file diff --git a/test/bds/desktop/shell_live_test.exs b/test/bds/desktop/shell_live_test.exs index 4fe14f6..89f0a71 100644 --- a/test/bds/desktop/shell_live_test.exs +++ b/test/bds/desktop/shell_live_test.exs @@ -6,6 +6,27 @@ defmodule BDS.Desktop.ShellLiveTest do import Phoenix.LiveViewTest @shell_live_source_root Path.expand("../../../lib/bds/desktop/shell_live", __DIR__) + @css_source_files [ + "tokens.css", + "shell.css", + "sidebar.css", + "tabs.css", + "editor.css", + "forms.css", + "panel.css", + "assistant.css", + "overlays.css", + "menu_editor.css", + "media_editor.css", + "import_editor.css", + "utilities.css" + ] + + defp desktop_css_source do + @css_source_files + |> Enum.map(&File.read!(Path.expand("../../../assets/css/#{&1}", __DIR__))) + |> Enum.join("\n") + end test "shell live modules use contexts instead of direct Repo.get calls" do source_files = @@ -3264,7 +3285,7 @@ defmodule BDS.Desktop.ShellLiveTest do assert html =~ ~s(class="chat-model-selector-button chat-model-selector-inline") refute html =~ ~s(class="chat-panel-header-actions") - css = File.read!(Path.expand("../../../priv/ui/app.css", __DIR__)) + css = desktop_css_source() assert css =~ ".chat-model-selector-wrap" assert css =~ "left: 0;" assert css =~ "right: auto;" @@ -3313,7 +3334,7 @@ defmodule BDS.Desktop.ShellLiveTest do assert selector_html =~ ~s(data-testid="chat-model-selector-option") assert selector_html =~ "llama-current" - css = File.read!(Path.expand("../../../priv/ui/app.css", __DIR__)) + css = desktop_css_source() assert css =~ ".chat-panel-title {" assert css =~ "overflow: visible;" @@ -3628,7 +3649,7 @@ defmodule BDS.Desktop.ShellLiveTest do end test "chat editor hook reopens server-expanded A2UI surfaces after patches" do - live_js = File.read!(Path.expand("../../../priv/ui/live.js", __DIR__)) + live_js = File.read!(Path.expand("../../../assets/js/app.js", __DIR__)) chat_editor = File.read!(Path.expand("../../../lib/bds/desktop/shell_live/chat_editor.ex", __DIR__)) @@ -3738,7 +3759,7 @@ defmodule BDS.Desktop.ShellLiveTest do assert html =~ ~s(
wie viele Posts sind im Blog?
) - css = File.read!(Path.expand("../../../priv/ui/app.css", __DIR__)) + css = desktop_css_source() assert css =~ ".chat-panel .chat-message.user .chat-message-content" assert css =~ "background: transparent;" assert css =~ "border: 0;" @@ -3762,7 +3783,7 @@ defmodule BDS.Desktop.ShellLiveTest do assert html =~ ~s(rows="1") assert html =~ ~s(class="chat-input chat-surface-input") - css = File.read!(Path.expand("../../../priv/ui/app.css", __DIR__)) + css = desktop_css_source() assert css =~ "--chat-input-line-height: 20px;" assert css =~ "--chat-input-min-height: 20px;" assert css =~ ".chat-panel .chat-input-container" @@ -3784,7 +3805,7 @@ defmodule BDS.Desktop.ShellLiveTest do assert css =~ "max-height: 22px;" assert css =~ "padding: 0;" - live_js = File.read!(Path.expand("../../../priv/ui/live.js", __DIR__)) + live_js = File.read!(Path.expand("../../../assets/js/app.js", __DIR__)) assert live_js =~ "minHeight = parseFloat(styles.getPropertyValue(\"--chat-input-min-height\"))" diff --git a/test/bds/desktop_test.exs b/test/bds/desktop_test.exs index eae2122..dca6bda 100644 --- a/test/bds/desktop_test.exs +++ b/test/bds/desktop_test.exs @@ -171,7 +171,9 @@ defmodule BDS.DesktopTest do test "desktop external links point at the bDS2 GitHub project and issue tracker" do assert BDS.Desktop.ExternalLinks.github_url() == "https://github.com/rfc1437/bDS2" - assert BDS.Desktop.ExternalLinks.github_issues_url() == "https://github.com/rfc1437/bDS2/issues" + + assert BDS.Desktop.ExternalLinks.github_issues_url() == + "https://github.com/rfc1437/bDS2/issues" end test "icon menu quit requests app-owned shutdown" do @@ -254,7 +256,7 @@ defmodule BDS.DesktopTest do assert_receive :window_quit_requested end - test "desktop root html is a LiveView shell and references only the live bootstrap assets" do + test "desktop root html is a LiveView shell and references the generated asset entrypoints" do conn = conn(:get, "/?k=#{Desktop.Auth.login_key()}") conn = BDS.Desktop.Endpoint.call(conn, BDS.Desktop.Endpoint.init([])) @@ -270,9 +272,24 @@ defmodule BDS.DesktopTest do assert conn.resp_body =~ ~s(class="sidebar") assert conn.resp_body =~ ~s(class="status-bar") assert conn.resp_body =~ ~s(data-phx-main) - assert conn.resp_body =~ ~s(src="/assets/live.js") assert conn.resp_body =~ ~s(href="/assets/app.css") - refute conn.resp_body =~ ~s(src="/assets/app.js") + assert conn.resp_body =~ ~s(src="/assets/app.js") + refute conn.resp_body =~ ~s(src="/assets/live.js") + refute conn.resp_body =~ ~s(src="/vendor/phoenix/phoenix.min.js") + refute conn.resp_body =~ ~s(src="/vendor/live_view/phoenix_live_view.min.js") + end + + test "desktop endpoint serves generated Phoenix-style CSS and JS assets" do + css_conn = conn(:get, "/assets/app.css?k=#{Desktop.Auth.login_key()}") + css_conn = BDS.Desktop.Endpoint.call(css_conn, BDS.Desktop.Endpoint.init([])) + + js_conn = conn(:get, "/assets/app.js?k=#{Desktop.Auth.login_key()}") + js_conn = BDS.Desktop.Endpoint.call(js_conn, BDS.Desktop.Endpoint.init([])) + + assert css_conn.status == 200 + assert byte_size(css_conn.resp_body) > 0 + assert js_conn.status == 200 + assert byte_size(js_conn.resp_body) > 0 end test "desktop endpoint serves the live shell without extra router-side secret injection" do diff --git a/test/bds/ui/shell_test.exs b/test/bds/ui/shell_test.exs index 4dae96a..db36124 100644 --- a/test/bds/ui/shell_test.exs +++ b/test/bds/ui/shell_test.exs @@ -6,6 +6,28 @@ defmodule BDS.UI.ShellTest do alias BDS.UI.Session alias BDS.UI.Workbench + @css_sources [ + "tokens.css", + "shell.css", + "sidebar.css", + "tabs.css", + "editor.css", + "forms.css", + "panel.css", + "assistant.css", + "overlays.css", + "menu_editor.css", + "media_editor.css", + "import_editor.css", + "utilities.css" + ] + + defp css_source do + @css_sources + |> Enum.map(&File.read!("/Users/gb/Projects/bDS2/assets/css/#{&1}")) + |> Enum.join("\n") + end + test "registry exposes the shared sidebar and editor contracts for the base shell" do sidebar_views = Registry.sidebar_views() editor_routes = Registry.editor_routes() @@ -101,25 +123,100 @@ defmodule BDS.UI.ShellTest do end test "desktop shell keeps the compact frame metrics and live bootstrap assets" do - css = File.read!("/Users/gb/Projects/bDS2/priv/ui/app.css") - live_js = File.read!("/Users/gb/Projects/bDS2/priv/ui/live.js") + css = css_source() + live_js = File.read!("/Users/gb/Projects/bDS2/assets/js/app.js") template = File.read!("/Users/gb/Projects/bDS2/lib/bds/desktop/shell_live/index.html.heex") - assert File.exists?("/Users/gb/Projects/bDS2/priv/ui/app.css") - assert File.exists?("/Users/gb/Projects/bDS2/priv/ui/live.js") + assert File.exists?("/Users/gb/Projects/bDS2/assets/css/shell.css") + assert File.exists?("/Users/gb/Projects/bDS2/assets/js/app.js") assert css =~ ".window-titlebar" assert css =~ "height: 34px" assert css =~ "width: 48px" assert css =~ "height: 35px" assert css =~ "height: 22px" - assert live_js =~ "LiveView.LiveSocket" - assert live_js =~ "Phoenix.Socket" + assert live_js =~ "new LiveSocket" + assert live_js =~ "Socket" assert template =~ "data-project-id={@projects.active_project_id || \"\"}" assert template =~ "data-workbench-session={encoded_workbench_session(@workbench)}" end + test "desktop shell css keeps editor and help docs on the VS Code dark surface" do + css = css_source() + + assert css =~ ".post-editor .post-editor-markdown-surface" + assert css =~ ".scripts-monaco.monaco-editor-shell" + assert css =~ ".templates-monaco.monaco-editor-shell" + assert css =~ ".help-doc-markdown" + assert css =~ "background: var(--vscode-editor-background);" + assert css =~ "color: var(--vscode-editor-foreground);" + refute Regex.match?(~r/\.sidebar-item\s*\{[^}]*background:\s*var\(--panel-2\)/s, css) + refute Regex.match?(~r/\.sidebar-item\s*\{[^}]*color:\s*var\(--ink\)/s, css) + end + + test "desktop help documentation keeps the old markdown viewer styling contract" do + css = css_source() + + assert css =~ ".help-doc-view" + assert css =~ ".help-doc-view .misc-editor-content" + assert css =~ ".documentation-article" + assert css =~ ".documentation-content.markdown-body h1" + assert css =~ ".documentation-content.markdown-body table" + assert css =~ ".documentation-content.markdown-body ul" + assert css =~ "background: var(--doc-surface);" + assert css =~ "box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);" + end + + test "desktop settings editor keeps the old preferences styling contract" do + css = css_source() + + assert css =~ ".settings-view" + assert css =~ ".settings-header" + assert css =~ ".settings-content" + assert css =~ ".setting-section" + assert css =~ ".setting-section-header" + assert css =~ ".setting-section-content" + assert css =~ ".setting-row" + assert css =~ ".setting-control" + assert css =~ "grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);" + assert css =~ "background: var(--panel-2, #252526);" + assert css =~ "border: 1px solid var(--line, #3c3c3c);" + end + + test "monaco editor styling forces the internal editor surface to the dark theme" do + css = css_source() + live_js = File.read!("/Users/gb/Projects/bDS2/assets/js/app.js") + + assert css =~ ".monaco-editor .margin" + assert css =~ ".monaco-editor-background" + assert css =~ "background-color: var(--vscode-editor-background) !important;" + assert css =~ ".monaco-editor .view-line" + assert live_js =~ "base: \"vs-dark\"" + assert live_js =~ "monaco.editor.setTheme(\"bds-theme\");" + end + + test "monaco editor hook forces first visible layout and textarea content sync" do + live_js = File.read!("/Users/gb/Projects/bDS2/assets/js/app.js") + + assert live_js =~ "this.syncEditorFromTextarea" + assert live_js =~ "this.layoutEditorSoon" + assert live_js =~ "this.waitForMonacoVisibleSize" + assert live_js =~ "ResizeObserver" + assert live_js =~ "requestAnimationFrame" + assert live_js =~ "this.editor.layout()" + assert live_js =~ "this.syncEditorFromTextarea()" + end + + test "monaco theme uses normalized app colors before defining the dark theme" do + live_js = File.read!("/Users/gb/Projects/bDS2/assets/js/app.js") + + assert live_js =~ "normalizeMonacoColor" + assert live_js =~ "base: \"vs-dark\"" + assert live_js =~ "\"editor.background\": background" + assert live_js =~ "monaco.editor.defineTheme(\"bds-theme\"" + end + test "desktop shell assets persist workbench layout per project" do - live_js = File.read!("/Users/gb/Projects/bDS2/priv/ui/live.js") + live_js = File.read!("/Users/gb/Projects/bDS2/assets/js/app.js") live_ex = File.read!("/Users/gb/Projects/bDS2/lib/bds/desktop/shell_live.ex") session_util_ex = @@ -134,8 +231,8 @@ defmodule BDS.UI.ShellTest do end test "desktop shell assets reveal loaded media sidebar thumbnails" do - css = File.read!("/Users/gb/Projects/bDS2/priv/ui/app.css") - live_js = File.read!("/Users/gb/Projects/bDS2/priv/ui/live.js") + css = css_source() + live_js = File.read!("/Users/gb/Projects/bDS2/assets/js/app.js") assert css =~ ".media-thumbnail.is-loaded .media-thumbnail-image" assert css =~ ".media-thumbnail.is-loaded .media-thumbnail-fallback" @@ -145,7 +242,7 @@ defmodule BDS.UI.ShellTest do end test "desktop shell css keeps the status bar and hidden menu alignment rules" do - css = File.read!("/Users/gb/Projects/bDS2/priv/ui/app.css") + css = css_source() assert css =~ ".window-titlebar-menu-bar.is-hidden" assert css =~ "--vscode-statusBar-background: #007acc" @@ -162,8 +259,8 @@ defmodule BDS.UI.ShellTest do end test "desktop shell assets keep old activity, tab, focus, and titlebar overlay parity rules" do - css = File.read!("/Users/gb/Projects/bDS2/priv/ui/app.css") - live_js = File.read!("/Users/gb/Projects/bDS2/priv/ui/live.js") + css = css_source() + live_js = File.read!("/Users/gb/Projects/bDS2/assets/js/app.js") template = File.read!("/Users/gb/Projects/bDS2/lib/bds/desktop/shell_live/index.html.heex") assert css =~ "color: var(--vscode-activityBar-foreground)" @@ -194,14 +291,14 @@ defmodule BDS.UI.ShellTest do end test "desktop shell keeps sidebar delete buttons visible in the default state" do - css = File.read!("/Users/gb/Projects/bDS2/priv/ui/app.css") + css = css_source() assert Regex.match?(~r/\.sidebar-delete-button\s*\{[^}]*opacity:\s*1;/s, css) refute Regex.match?(~r/\.sidebar-delete-button\s*\{[^}]*opacity:\s*0;/s, css) end test "desktop shell css keeps the old activity bar active marker contrast" do - css = File.read!("/Users/gb/Projects/bDS2/priv/ui/app.css") + css = css_source() assert css =~ "--vscode-activityBar-foreground: #ffffff" assert css =~ ".activity-bar-item:hover {" @@ -211,8 +308,8 @@ defmodule BDS.UI.ShellTest do end test "desktop shell assets keep legacy titlebar menu keyboard and anchoring behavior" do - css = File.read!("/Users/gb/Projects/bDS2/priv/ui/app.css") - live_js = File.read!("/Users/gb/Projects/bDS2/priv/ui/live.js") + css = css_source() + live_js = File.read!("/Users/gb/Projects/bDS2/assets/js/app.js") live_ex = File.read!("/Users/gb/Projects/bDS2/lib/bds/desktop/shell_live.ex") template = File.read!("/Users/gb/Projects/bDS2/lib/bds/desktop/shell_live/index.html.heex") @@ -232,7 +329,7 @@ defmodule BDS.UI.ShellTest do end test "desktop shell css keeps the old media editor layout contract" do - css = File.read!("/Users/gb/Projects/bDS2/priv/ui/app.css") + css = css_source() template = File.read!( @@ -288,7 +385,7 @@ defmodule BDS.UI.ShellTest do end test "desktop shell css keeps old panel and output density" do - css = File.read!("/Users/gb/Projects/bDS2/priv/ui/app.css") + css = css_source() assert css =~ ".panel-content {" assert css =~ "padding: 8px;" @@ -302,7 +399,7 @@ defmodule BDS.UI.ShellTest do end test "desktop shell css keeps legacy sidebar header and post list layout" do - css = File.read!("/Users/gb/Projects/bDS2/priv/ui/app.css") + css = css_source() assert css =~ ".sidebar-section {" assert css =~ "margin-bottom: 4px;" @@ -317,7 +414,7 @@ defmodule BDS.UI.ShellTest do end test "desktop shell assets keep the assistant sidebar chat surface contract" do - css = File.read!("/Users/gb/Projects/bDS2/priv/ui/app.css") + css = css_source() template = File.read!("/Users/gb/Projects/bDS2/lib/bds/desktop/shell_live/index.html.heex") assert css =~ ".assistant-sidebar-context" @@ -332,7 +429,7 @@ defmodule BDS.UI.ShellTest do end test "desktop shell assets expose the shared overlay render contract" do - css = File.read!("/Users/gb/Projects/bDS2/priv/ui/app.css") + css = css_source() live_ex = File.read!("/Users/gb/Projects/bDS2/lib/bds/desktop/shell_live.ex") template = File.read!("/Users/gb/Projects/bDS2/lib/bds/desktop/shell_live/index.html.heex") @@ -439,7 +536,7 @@ defmodule BDS.UI.ShellTest do end test "desktop shell css keeps the old assistant sidebar panel styling" do - css = File.read!("/Users/gb/Projects/bDS2/priv/ui/app.css") + css = css_source() assert css =~ ".assistant-content {" assert css =~ "padding: 12px;"