From 597e2f9140114e6134befc6797e6c2f3eff2c3ed Mon Sep 17 00:00:00 2001 From: karimsemmoud Date: Wed, 18 Feb 2026 21:18:21 +0700 Subject: [PATCH 1/9] angle slider playground --- README.md | 89 ++++++--- assets/hooks/angle-slider.ts | 80 +++++--- e2e/assets/corex/components/angle-slider.css | 49 ++++- e2e/assets/corex/components/layout.css | 5 +- e2e/config/dev.exs | 2 +- e2e/lib/e2e_web/components/layouts.ex | 1 + .../live/angle_slider_controlled_live.ex | 2 +- .../e2e_web/live/angle_slider_play_live.ex | 176 ++++++++++++++++++ e2e/lib/e2e_web/router.ex | 1 + e2e/mix.exs | 2 +- e2e/mix.lock | 2 +- guides/installation.md | 78 ++++---- lib/components/angle_slider/connect.ex | 1 - priv/static/angle-slider.mjs | 34 +--- priv/static/corex.js | 40 +--- priv/static/corex.min.js | 8 +- 16 files changed, 405 insertions(+), 165 deletions(-) create mode 100644 e2e/lib/e2e_web/live/angle_slider_play_live.ex diff --git a/README.md b/README.md index 8956475..9e27708 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,14 @@ Corex bridges the gap between Phoenix and modern JavaScript UI patterns by lever > It's not recommended for production use at this time. > You can monitor development progress and contribute to the [project on GitHub](https://github.com/corex-ui/corex). +## Live Demo + +To preview the components, a Live Demo is available to showcase some uses of components, language switching, RTL, and Dark Mode and Site Navigation. + +This is still in an early stage and will evolve with future stable releases. + +Thanks to [Gigalixir](https://www.gigalixir.com/) for providing a reliable hosting solution for Elixir projects *(not sponsored, just a personal experience)*. + ## Documentation @@ -68,7 +76,11 @@ config :corex, ### Import Corex Hooks -In your `assets/js/app.js`, import and register the Corex hooks. +In your `assets/js/app.js`, import Corex and register its hooks on the LiveSocket. + +Each hook uses dynamic `import()` so component JavaScript is loaded only when a DOM element with that hook is mounted. If a component never appears on a page, its chunk is never fetched. See the Performance section below for how this works and the required build configuration. + +To load all hooks (in dev only): ```javascript import corex from "corex" @@ -82,7 +94,40 @@ const liveSocket = new LiveSocket("/live", Socket, { }) ``` -Each component chunk loads when first mounted. +To register only the hooks you use (recommended for production): + +```javascript +import { hooks } from "corex" +``` + +```javascript +const liveSocket = new LiveSocket("/live", Socket, { + longPollFallbackMs: 2500, + params: {_csrf_token: csrfToken}, + hooks: {...colocatedHooks, ...hooks(["Accordion", "Combobox", "Dialog"])} +}) +``` + +### Esbuild + +- Add `--format=esm` and `--splitting` to your esbuild config. ESM is required for dynamic `import()`. Splitting produces separate chunks for each component and shared code, so only the components used on a page are loaded. + +```elixir +config :esbuild, + version: "0.25.4", + e2e: [ + args: + ~w(js/app.js --bundle --format=esm --splitting --target=es2022 --outdir=../priv/static/assets/js --external:/fonts/* --external:/images/* --alias:@=.), + cd: Path.expand("../assets", __DIR__), + env: %{"NODE_PATH" => [Path.expand("../deps", __DIR__), Mix.Project.build_path()]} + ] +``` + +- Load your app script with `type="module"` in your root layout in `root.html.heex`: + +```heex + +``` ## Import Components @@ -357,36 +402,28 @@ In order to use the API, you must use an id on the component ## Performance -By default Phoenix esbuild is set to bundle all the JS into a single file. +During development only, you may experience a slowdown in performance and reactivity, especially on low specification local machines. +This is due to Esbuild and Tailwind compiler serving unminified assets during development. +In order to improve performance during development, you can `minify` assets. +You may not need to minify both; in my case, only Tailwind needs to be minified in order to improve performance. -### 1.Enable splitting - -In order to enable splitting add the following `--format=esm --splitting` to your esbuild config +- In your `mix.exs` add `--minify` option to Tailwind and/or Esbuild ```elixir -config :esbuild, - version: "0.25.4", - e2e: [ - args: - ~w(js/app.js --bundle --format=esm --splitting --target=es2022 --outdir=../priv/static/assets/js --external:/fonts/* --external:/images/* --alias:@=.), - cd: Path.expand("../assets", __DIR__), - env: %{"NODE_PATH" => [Path.expand("../deps", __DIR__), Mix.Project.build_path()]} - ] + "assets.build": [ + "compile", + "tailwind e2e --minify", + "esbuild e2e --minify" + ] ``` -Run `mix assets.build` and see the magic happening - -### 2.Enable gzip for Plug.Static - -In your `endpoint.ex` enable gzip for developement also +- In your `config/dev.exs` add `--minify` option to Tailwind and/or Esbuild watchers -```elexir - plug Plug.Static, - at: "/", - from: :e2e, - gzip: true, - only: E2eWeb.static_paths(), - raise_on_missing_only: code_reloading? +```elixir + watchers: [ + esbuild: {Esbuild, :install_and_run, [:e2e, ~w(--sourcemap=inline --watch --minify)]}, + tailwind: {Tailwind, :install_and_run, [:e2e, ~w(--watch --minify)]} + ] ``` See the [Production guide](https://hexdocs.pm/corex/production.html) for the final build in production environnement diff --git a/assets/hooks/angle-slider.ts b/assets/hooks/angle-slider.ts index 7227260..ad0327b 100644 --- a/assets/hooks/angle-slider.ts +++ b/assets/hooks/angle-slider.ts @@ -16,7 +16,6 @@ const AngleSliderHook: Hook = { const value = getNumber(el, "value"); const defaultValue = getNumber(el, "defaultValue"); const controlled = getBoolean(el, "controlled"); - let skipNextOnValueChange = false; const zag = new AngleSlider(el, { id: el.id, @@ -28,23 +27,42 @@ const AngleSliderHook: Hook = { name: getString(el, "name"), dir: getString<"ltr" | "rtl">(el, "dir", ["ltr", "rtl"]), onValueChange: (details: ValueChangeDetails) => { - if (skipNextOnValueChange) { - skipNextOnValueChange = false; - return; - } - if (controlled) { - skipNextOnValueChange = true; - zag.api.setValue(details.value); - } else { - const hiddenInput = el.querySelector( - '[data-scope="angle-slider"][data-part="hidden-input"]' - ); - if (hiddenInput) { - hiddenInput.value = String(details.value); - hiddenInput.dispatchEvent(new Event("input", { bubbles: true })); - hiddenInput.dispatchEvent(new Event("change", { bubbles: true })); - } - } + // if (skipNextOnValueChange) { + // skipNextOnValueChange = false; + // return; + // } + // if (controlled) { + // skipNextOnValueChange = true; + // zag.api.setValue(details.value); + // } else { + // const hiddenInput = el.querySelector( + // '[data-scope="angle-slider"][data-part="hidden-input"]' + // ); + // if (hiddenInput) { + // hiddenInput.value = String(details.value); + // hiddenInput.dispatchEvent(new Event("input", { bubbles: true })); + // hiddenInput.dispatchEvent(new Event("change", { bubbles: true })); + // } + // } + // if (skipNextOnValueChange) { + // skipNextOnValueChange = false; + // return; + // } + // if (controlled) { + // skipNextOnValueChange = true; + // zag.api.setValue(details.value); + // } + // const hiddenInput = el.querySelector( + // '[data-scope="angle-slider"][data-part="hidden-input"]' + // ); + // const hiddenInput = el.querySelector( + // '[data-scope="angle-slider"][data-part="hidden-input"]' + // ); + // if (hiddenInput) { + // hiddenInput.value = String(details.value); + // hiddenInput.dispatchEvent(new Event("input", { bubbles: true })); + // hiddenInput.dispatchEvent(new Event("change", { bubbles: true })); + // } const eventName = getString(el, "onValueChange"); if (eventName && !this.liveSocket.main.isDead && this.liveSocket.main.isConnected()) { this.pushEvent(eventName, { @@ -64,16 +82,16 @@ const AngleSliderHook: Hook = { } }, onValueChangeEnd: (details: ValueChangeDetails) => { - if (controlled) { - const hiddenInput = el.querySelector( - '[data-scope="angle-slider"][data-part="hidden-input"]' - ); - if (hiddenInput) { - hiddenInput.value = String(details.value); - hiddenInput.dispatchEvent(new Event("input", { bubbles: true })); - hiddenInput.dispatchEvent(new Event("change", { bubbles: true })); - } - } + // if (controlled) { + // const hiddenInput = el.querySelector( + // '[data-scope="angle-slider"][data-part="hidden-input"]' + // ); + // if (hiddenInput) { + // hiddenInput.value = String(details.value); + // hiddenInput.dispatchEvent(new Event("input", { bubbles: true })); + // hiddenInput.dispatchEvent(new Event("change", { bubbles: true })); + // } + // } const eventName = getString(el, "onValueChangeEnd"); if (eventName && !this.liveSocket.main.isDead && this.liveSocket.main.isConnected()) { this.pushEvent(eventName, { @@ -130,16 +148,20 @@ const AngleSliderHook: Hook = { updated(this: object & HookInterface & AngleSliderHookState) { const value = getNumber(this.el, "value"); + const defaultValue = getNumber(this.el, "defaultValue"); + const controlled = getBoolean(this.el, "controlled"); this.angleSlider?.updateProps({ id: this.el.id, - ...(controlled && value !== undefined ? { value } : {}), + ...(controlled && value !== undefined ? { value } : { defaultValue: defaultValue ?? 0 }), step: getNumber(this.el, "step") ?? 1, disabled: getBoolean(this.el, "disabled"), readOnly: getBoolean(this.el, "readOnly"), invalid: getBoolean(this.el, "invalid"), name: getString(this.el, "name"), + dir: getString<"ltr" | "rtl">(this.el, "dir", ["ltr", "rtl"]), } as Partial); + }, destroyed(this: object & HookInterface & AngleSliderHookState) { diff --git a/e2e/assets/corex/components/angle-slider.css b/e2e/assets/corex/components/angle-slider.css index deb2124..65b83d4 100644 --- a/e2e/assets/corex/components/angle-slider.css +++ b/e2e/assets/corex/components/angle-slider.css @@ -11,8 +11,16 @@ color: var(--color-root--text); border-radius: var(--radius-ui); border: 1px solid var(--color-root--border); + position: relative; + } + + .angle-slider + [data-scope="angle-slider"][data-part="root"][data-disabled] { + opacity: 0.6; + cursor: not-allowed; } + .angle-slider [data-scope="angle-slider"][data-part="label"] { @apply ui-label; } @@ -139,11 +147,14 @@ .angle-slider [data-scope="angle-slider"][data-part="root"][data-invalid] - [data-scope="angle-slider"][data-part="value-text"] - [data-part="text"] { - color: var(--color-root--alert); + [data-scope="angle-slider"][data-part="control"] { + border-color: var(--color-root--alert); } + .angle-slider + [data-scope="angle-slider"][data-part="root"][data-invalid] + [data-scope="angle-slider"][data-part="value-text"] + [data-part="text"], .angle-slider [data-scope="angle-slider"][data-part="root"][data-invalid] [data-scope="angle-slider"][data-part="value-text"] @@ -154,7 +165,37 @@ .angle-slider [data-scope="angle-slider"][data-part="root"][data-invalid] [data-scope="angle-slider"][data-part="thumb"]::before { - color: var(--color-root--alert); + background-color: var(--color-root--alert); + } + + .angle-slider + [data-scope="angle-slider"][data-part="root"][data-invalid] + [data-scope="angle-slider"][data-part="marker"][data-state="under-value"] { + --marker-color: var(--color-root--alert); + } + + /* .angle-slider + [data-scope="angle-slider"][data-part="root"][data-readonly], + .angle-slider + [data-scope="angle-slider"][data-part="root"][data-read-only] { + padding-inline-end: var(--spacing-ui-padding); + } */ + + .angle-slider + [data-scope="angle-slider"][data-part="root"][data-readonly]::after, + .angle-slider + [data-scope="angle-slider"][data-part="root"][data-read-only]::after { + content: ""; + position: absolute; + bottom: var(--spacing-ui-padding); + right: var(--spacing-ui-padding); + width: 1em; + height: 1em; + background-color: var(--color-ui--muted); + mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M10 1a4.5 4.5 0 0 0-4.5 4.5V9H5a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2h-.5V5.5A4.5 4.5 0 0 0 10 1ZM8.5 5.5V9H14V5.5a3.5 3.5 0 1 0-7 0Z' clip-rule='evenodd'/%3E%3C/svg%3E"); + mask-size: contain; + mask-repeat: no-repeat; + mask-position: center; } .angle-slider [data-scope="angle-slider"][data-part="hidden-input"] { diff --git a/e2e/assets/corex/components/layout.css b/e2e/assets/corex/components/layout.css index e4fc0f0..06c5394 100644 --- a/e2e/assets/corex/components/layout.css +++ b/e2e/assets/corex/components/layout.css @@ -58,7 +58,7 @@ display: flex; flex: 1; width: 100%; - justify-content: center; + justify-content: flex-start; margin-inline: auto; background-color: var(--color-root); position: relative; @@ -95,6 +95,7 @@ flex-direction: column; flex: 1; min-width: 0; + min-height: calc(100vh - var(--spacing-ui-lg)); width: 100%; height: 100%; margin-inline: auto; @@ -165,7 +166,7 @@ display: none; } - @media (min-width: theme("breakpoint.md")) { + @media (min-width: theme("breakpoint.lg")) { .layout .layout__side { display: flex; } diff --git a/e2e/config/dev.exs b/e2e/config/dev.exs index 29d5510..86d59a9 100644 --- a/e2e/config/dev.exs +++ b/e2e/config/dev.exs @@ -25,7 +25,7 @@ config :e2e, E2eWeb.Endpoint, debug_errors: true, secret_key_base: "JQ3bjpj3drUYoLh2G4QBZr8KpmxWvAJGLV6DZzv9mIRqOkQqhpZwtu9np9fwDeSX", watchers: [ - esbuild: {Esbuild, :install_and_run, [:e2e, ~w(--sourcemap=inline --watch --minify)]}, + esbuild: {Esbuild, :install_and_run, [:e2e, ~w(--sourcemap=inline --watch)]}, tailwind: {Tailwind, :install_and_run, [:e2e, ~w(--watch --minify)]} ] diff --git a/e2e/lib/e2e_web/components/layouts.ex b/e2e/lib/e2e_web/components/layouts.ex index 8465037..67369cd 100644 --- a/e2e/lib/e2e_web/components/layouts.ex +++ b/e2e/lib/e2e_web/components/layouts.ex @@ -340,6 +340,7 @@ defmodule E2eWeb.Layouts do children: [ [label: "Controller", id: "/#{locale}/angle-slider"], [label: "Live", id: "/#{locale}/live/angle-slider"], + [label: "Playground", id: "/#{locale}/playground/angle-slider"], [label: "Controlled", id: "/#{locale}/controlled/angle-slider"] ] ], diff --git a/e2e/lib/e2e_web/live/angle_slider_controlled_live.ex b/e2e/lib/e2e_web/live/angle_slider_controlled_live.ex index 67e9274..eec83dd 100644 --- a/e2e/lib/e2e_web/live/angle_slider_controlled_live.ex +++ b/e2e/lib/e2e_web/live/angle_slider_controlled_live.ex @@ -81,7 +81,7 @@ defmodule E2eWeb.AngleSliderControlledLive do class="angle-slider" marker_values={[0, 90, 180, 270]} value={@angle} - controlled + on_value_change="angle_changed" > <:label>Angle diff --git a/e2e/lib/e2e_web/live/angle_slider_play_live.ex b/e2e/lib/e2e_web/live/angle_slider_play_live.ex new file mode 100644 index 0000000..316bc51 --- /dev/null +++ b/e2e/lib/e2e_web/live/angle_slider_play_live.ex @@ -0,0 +1,176 @@ +defmodule E2eWeb.AngleSliderPlayLive do + use E2eWeb, :live_view + + @impl true + def mount(_params, _session, socket) do + controls = %{ + disabled: true, + read_only: true, + invalid: true, + step: 1, + show_markers: true + } + + socket = + socket + |> assign(:controls, controls) + |> assign(:angle, 90) + + {:ok, socket} + end + + @impl true + def handle_event("angle_changed", %{"value" => value}, socket) do + parsed_value = + case Float.parse(to_string(value)) do + {num, _} -> if num > 360, do: 360, else: if(num < 0, do: 0, else: num) + :error -> 0 + end + + {:noreply, assign(socket, :angle, parsed_value)} + end + + def handle_event( + "control_changed", + %{"checked" => checked, "id" => id}, + socket + ) do + {:noreply, update_control(socket, id, checked)} + end + + def handle_event( + "control_changed", + %{"value" => [value], "id" => id}, + socket + ) do + {:noreply, update_control(socket, id, value)} + end + + defp update_control(socket, "disabled", true) do + update(socket, :controls, &%{&1 | disabled: true}) + end + + defp update_control(socket, "disabled", false) do + update(socket, :controls, &Map.put(&1, :disabled, false)) + end + + defp update_control(socket, "read_only", true) do + update(socket, :controls, &%{&1 | read_only: true}) + end + + defp update_control(socket, "read_only", false) do + update(socket, :controls, &Map.put(&1, :read_only, false)) + end + + defp update_control(socket, "invalid", checked) do + update(socket, :controls, &Map.put(&1, :invalid, checked)) + end + + defp update_control(socket, "show_markers", checked) do + update(socket, :controls, &Map.put(&1, :show_markers, checked)) + end + + defp update_control(socket, "step", value) do + step = + case value do + "0.5" -> 0.5 + "1" -> 1 + "5" -> 5 + "15" -> 15 + "45" -> 45 + "90" -> 90 + _ -> 1 + end + + update(socket, :controls, &Map.put(&1, :step, step)) + end + + defp update_control(socket, _unknown, _checked), do: socket + + @impl true + def render(assigns) do + ~H""" + +
+

Angle Slider

+

Playground

+
+ +
+ <.switch + class="switch" + id="disabled" + + checked={@controls.disabled} + on_checked_change="control_changed" + > + <:label>Disabled + + + <.switch + class="switch" + id="read_only" + checked={@controls.read_only} + on_checked_change="control_changed" + > + <:label>Read Only + + + <.switch + class="switch" + id="invalid" + checked={@controls.invalid} + on_checked_change="control_changed" + > + <:label>Invalid + + + <.switch + class="switch" + id="show_markers" + + checked={@controls.show_markers} + on_checked_change="control_changed" + > + <:label>Show Markers (0°, 90°, 180°, 270°) + + + <.toggle_group + class="toggle-group" + id="step" + on_value_change="control_changed" + multiple={false} + deselectable={false} + value={[to_string(@controls.step)]} + > + <:item value="0.5">0.5 + <:item value="1">1 + <:item value="5">5 + <:item value="15">15 + <:item value="45">45 + <:item value="90">90 + +
+ +

+ Current value: {@angle}° +

+ + <.angle_slider + id="my-angle-slider" + class="angle-slider" + marker_values={if(@controls.show_markers, do: [0, 90, 180, 270], else: [])} + value={@angle} + step={@controls.step} + disabled={@controls.disabled} + read_only={@controls.read_only} + invalid={@controls.invalid} + + on_value_change="angle_changed" + > + <:label>Angle + +
+ """ + end +end diff --git a/e2e/lib/e2e_web/router.ex b/e2e/lib/e2e_web/router.ex index 696905e..a4a7058 100644 --- a/e2e/lib/e2e_web/router.ex +++ b/e2e/lib/e2e_web/router.ex @@ -47,6 +47,7 @@ defmodule E2eWeb.Router do live "/live/toggle-group", ToggleGroupLive live "/live/tree-view", TreeViewLive live "/live/angle-slider", AngleSliderLive + live "/playground/angle-slider", AngleSliderPlayLive live "/controlled/angle-slider", AngleSliderControlledLive live "/live/avatar", AvatarLive live "/live/carousel", CarouselLive diff --git a/e2e/mix.exs b/e2e/mix.exs index aea39ce..bc611a6 100644 --- a/e2e/mix.exs +++ b/e2e/mix.exs @@ -102,7 +102,7 @@ defmodule E2e.MixProject do &clean_static_assets/1, ©_static_images/1, "compile", - "tailwind e2e", + "tailwind e2e --minify", "esbuild e2e" ], "assets.deploy": [ diff --git a/e2e/mix.lock b/e2e/mix.lock index 3598d27..db3fbe7 100644 --- a/e2e/mix.lock +++ b/e2e/mix.lock @@ -36,7 +36,7 @@ "phoenix_html": {:hex, :phoenix_html, "4.3.0", "d3577a5df4b6954cd7890c84d955c470b5310bb49647f0a114a6eeecc850f7ad", [:mix], [], "hexpm", "3eaa290a78bab0f075f791a46a981bbe769d94bc776869f4f3063a14f30497ad"}, "phoenix_live_dashboard": {:hex, :phoenix_live_dashboard, "0.8.7", "405880012cb4b706f26dd1c6349125bfc903fb9e44d1ea668adaf4e04d4884b7", [:mix], [{:ecto, "~> 3.6.2 or ~> 3.7", [hex: :ecto, repo: "hexpm", optional: true]}, {:ecto_mysql_extras, "~> 0.5", [hex: :ecto_mysql_extras, repo: "hexpm", optional: true]}, {:ecto_psql_extras, "~> 0.7", [hex: :ecto_psql_extras, repo: "hexpm", optional: true]}, {:ecto_sqlite3_extras, "~> 1.1.7 or ~> 1.2.0", [hex: :ecto_sqlite3_extras, repo: "hexpm", optional: true]}, {:mime, "~> 1.6 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 0.19 or ~> 1.0", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}, {:telemetry_metrics, "~> 0.6 or ~> 1.0", [hex: :telemetry_metrics, repo: "hexpm", optional: false]}], "hexpm", "3a8625cab39ec261d48a13b7468dc619c0ede099601b084e343968309bd4d7d7"}, "phoenix_live_reload": {:hex, :phoenix_live_reload, "1.6.2", "b18b0773a1ba77f28c52decbb0f10fd1ac4d3ae5b8632399bbf6986e3b665f62", [:mix], [{:file_system, "~> 0.2.10 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm", "d1f89c18114c50d394721365ffb428cce24f1c13de0467ffa773e2ff4a30d5b9"}, - "phoenix_live_view": {:hex, :phoenix_live_view, "1.1.23", "5e41c63377d508dc9b22dcebcefa0a3a243695932f72eac6003831fd4ed96165", [:mix], [{:igniter, ">= 0.6.16 and < 1.0.0-0", [hex: :igniter, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:lazy_html, "~> 0.1.0", [hex: :lazy_html, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0 or ~> 1.8.0-rc", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.15", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "f5296ef67b41da7fe345e139ebaa621ceb5e7e84e37c89a12574cc0536a80604"}, + "phoenix_live_view": {:hex, :phoenix_live_view, "1.1.24", "1a000a048d5971b61a9efe29a3c4144ca955afd42224998d841c5011a5354838", [:mix], [{:igniter, ">= 0.6.16 and < 1.0.0-0", [hex: :igniter, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:lazy_html, "~> 0.1.0", [hex: :lazy_html, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0 or ~> 1.8.0-rc", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.15", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "0c724e6c65f197841cac49d73be4e0f9b93a7711eaa52d2d4d1b9f859c329267"}, "phoenix_pubsub": {:hex, :phoenix_pubsub, "2.2.0", "ff3a5616e1bed6804de7773b92cbccfc0b0f473faf1f63d7daf1206c7aeaaa6f", [:mix], [], "hexpm", "adc313a5bf7136039f63cfd9668fde73bba0765e0614cba80c06ac9460ff3e96"}, "phoenix_template": {:hex, :phoenix_template, "1.0.4", "e2092c132f3b5e5b2d49c96695342eb36d0ed514c5b252a77048d5969330d639", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "2c0c81f0e5c6753faf5cca2f229c9709919aba34fab866d3bc05060c9c444206"}, "plug": {:hex, :plug, "1.19.1", "09bac17ae7a001a68ae393658aa23c7e38782be5c5c00c80be82901262c394c0", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "560a0017a8f6d5d30146916862aaf9300b7280063651dd7e532b8be168511e62"}, diff --git a/guides/installation.md b/guides/installation.md index 32a2ee7..a2b0c84 100644 --- a/guides/installation.md +++ b/guides/installation.md @@ -18,12 +18,19 @@ Corex bridges the gap between Phoenix and modern JavaScript UI patterns by lever > You can monitor development progress and contribute to the [project on GitHub](https://github.com/corex-ui/corex). > +## Live Demo -This guide will walk you through installing and configuring Corex in your Phoenix application. +To preview the components, a Live Demo is available to showcase some uses of components, language switching, RTL, and Dark Mode and Site Navigation. + +This is still in an early stage and will evolve with future stable releases. + +Thanks to [Gigalixir](https://www.gigalixir.com/) for providing a reliable hosting solution for Elixir projects *(not sponsored, just a personal experience)*. ## Phoenix App +This guide will walk you through installing and configuring Corex in your Phoenix application. + If you don't already have a [Phoenix app up and running](https://hexdocs.pm/phoenix/up_and_running.html) you can run ```bash @@ -66,7 +73,7 @@ In your `assets/js/app.js`, import Corex and register its hooks on the LiveSocke Each hook uses dynamic `import()` so component JavaScript is loaded only when a DOM element with that hook is mounted. If a component never appears on a page, its chunk is never fetched. See the Performance section below for how this works and the required build configuration. -To load all hooks: +To load all hooks (in dev only): ```javascript import corex from "corex" @@ -80,7 +87,7 @@ const liveSocket = new LiveSocket("/live", Socket, { }) ``` -To register only the hooks you use: +To register only the hooks you use (recommended for production): ```javascript import { hooks } from "corex" @@ -94,13 +101,25 @@ const liveSocket = new LiveSocket("/live", Socket, { }) ``` -### Load app script +### Esbuild + +- Add `--format=esm` and `--splitting` to your esbuild config. ESM is required for dynamic `import()`. Splitting produces separate chunks for each component and shared code, so only the components used on a page are loaded. + +```elixir +config :esbuild, + version: "0.25.4", + e2e: [ + args: + ~w(js/app.js --bundle --format=esm --splitting --target=es2022 --outdir=../priv/static/assets/js --external:/fonts/* --external:/images/* --alias:@=.), + cd: Path.expand("../assets", __DIR__), + env: %{"NODE_PATH" => [Path.expand("../deps", __DIR__), Mix.Project.build_path()]} + ] +``` -Load your app script with `type="module"` in your root layout, for example in `root.html.heex`: +- Load your app script with `type="module"` in your root layout in `root.html.heex`: ```heex - + ``` ## Import Components @@ -375,40 +394,29 @@ In order to use the API, you must use an id on the component ## Performance -Corex hooks load component JavaScript only when a DOM element with that hook is mounted. This requires ESM format and code splitting. +During development only, you may experience a slowdown in performance and reactivity, especially on low specification local machines. +This is due to Esbuild and Tailwind compiler serving unminified assets during development. +In order to improve performance during development, you can `minify` assets. +You may not need to minify both; in my case, only Tailwind needs to be minified in order to improve performance. -### 1. Build configuration (ESM and splitting) - -Add `--format=esm` and `--splitting` to your esbuild config. ESM is required for dynamic `import()`. Splitting produces separate chunks for each component and shared code, so only the components used on a page are loaded. +- In your `mix.exs` add `--minify` option to Tailwind and/or Esbuild ```elixir -config :esbuild, - version: "0.25.4", - e2e: [ - args: - ~w(js/app.js --bundle --format=esm --splitting --target=es2022 --outdir=../priv/static/assets/js --external:/fonts/* --external:/images/* --alias:@=.), - cd: Path.expand("../assets", __DIR__), - env: %{"NODE_PATH" => [Path.expand("../deps", __DIR__), Mix.Project.build_path()]} - ] + "assets.build": [ + "compile", + "tailwind e2e --minify", + "esbuild e2e --minify" + ] ``` -### 2. Enable gzip for Plug.Static - -Set `gzip: true` on `Plug.Static` in your endpoint so that pre-compressed `.gz` files are served when the client supports them. - -### 3. How dynamic hook loading works - -1. **App start** – Corex registers small stubs (e.g. Accordion, Combobox) as LiveSocket hooks. Each stub stores a function like `() => import("corex/accordion")` but does not run it yet. -2. **Page load** – If the page has no Corex components, no component code is loaded. -3. **Component appears** – When LiveView renders an element with `phx-hook="Accordion"`, LiveSocket mounts that hook and calls the stub's `mounted()`. -4. **Dynamic load** – Inside `mounted()`, the stub runs `await import("corex/accordion")`. The browser fetches and executes the accordion chunk for the first time. The stub then delegates to the real hook. -5. **Result** – Each component's JavaScript is loaded only when a DOM element with its `phx-hook` is mounted. If a component never appears on a page, its chunk is never fetched. +- In your `config/dev.exs` add `--minify` option to Tailwind and/or Esbuild watchers -### 4. Compression and dev performance - -In development, watchers output unminified, uncompressed assets. `Plug.Static` with `gzip: true` only serves pre-existing `.gz` files; watchers do not create them. If the app feels slow in development (especially with many nested components): +```elixir + watchers: [ + esbuild: {Esbuild, :install_and_run, [:e2e, ~w(--sourcemap=inline --watch --minify)]}, + tailwind: {Tailwind, :install_and_run, [:e2e, ~w(--watch --minify)]} + ] +``` -1. Run `mix assets.deploy` instead of `mix assets.build` before `mix phx.server` for production-like asset output (minified and compressed). -2. Ensure `gzip: true` is set on `Plug.Static` in your endpoint. See the [Production guide](production.html) for the final build in production. \ No newline at end of file diff --git a/lib/components/angle_slider/connect.ex b/lib/components/angle_slider/connect.ex index 8119103..7c57414 100644 --- a/lib/components/angle_slider/connect.ex +++ b/lib/components/angle_slider/connect.ex @@ -47,7 +47,6 @@ defmodule Corex.AngleSlider.Connect do "data-scope" => "angle-slider", "data-part" => "root", "dir" => assigns.dir, - "id" => "angle-slider:#{assigns.id}", "style" => "--value:#{value};--angle:#{angle};" } end diff --git a/priv/static/angle-slider.mjs b/priv/static/angle-slider.mjs index dde35ee..8c9c1d5 100644 --- a/priv/static/angle-slider.mjs +++ b/priv/static/angle-slider.mjs @@ -466,7 +466,6 @@ var AngleSliderHook = { const value = getNumber(el, "value"); const defaultValue = getNumber(el, "defaultValue"); const controlled = getBoolean(el, "controlled"); - let skipNextOnValueChange = false; const zag = new AngleSlider(el, { id: el.id, ...controlled && value !== void 0 ? { value } : { defaultValue: defaultValue ?? 0 }, @@ -477,23 +476,6 @@ var AngleSliderHook = { name: getString(el, "name"), dir: getString(el, "dir", ["ltr", "rtl"]), onValueChange: (details) => { - if (skipNextOnValueChange) { - skipNextOnValueChange = false; - return; - } - if (controlled) { - skipNextOnValueChange = true; - zag.api.setValue(details.value); - } else { - const hiddenInput = el.querySelector( - '[data-scope="angle-slider"][data-part="hidden-input"]' - ); - if (hiddenInput) { - hiddenInput.value = String(details.value); - hiddenInput.dispatchEvent(new Event("input", { bubbles: true })); - hiddenInput.dispatchEvent(new Event("change", { bubbles: true })); - } - } const eventName = getString(el, "onValueChange"); if (eventName && !this.liveSocket.main.isDead && this.liveSocket.main.isConnected()) { this.pushEvent(eventName, { @@ -513,16 +495,6 @@ var AngleSliderHook = { } }, onValueChangeEnd: (details) => { - if (controlled) { - const hiddenInput = el.querySelector( - '[data-scope="angle-slider"][data-part="hidden-input"]' - ); - if (hiddenInput) { - hiddenInput.value = String(details.value); - hiddenInput.dispatchEvent(new Event("input", { bubbles: true })); - hiddenInput.dispatchEvent(new Event("change", { bubbles: true })); - } - } const eventName = getString(el, "onValueChangeEnd"); if (eventName && !this.liveSocket.main.isDead && this.liveSocket.main.isConnected()) { this.pushEvent(eventName, { @@ -575,15 +547,17 @@ var AngleSliderHook = { }, updated() { const value = getNumber(this.el, "value"); + const defaultValue = getNumber(this.el, "defaultValue"); const controlled = getBoolean(this.el, "controlled"); this.angleSlider?.updateProps({ id: this.el.id, - ...controlled && value !== void 0 ? { value } : {}, + ...controlled && value !== void 0 ? { value } : { defaultValue: defaultValue ?? 0 }, step: getNumber(this.el, "step") ?? 1, disabled: getBoolean(this.el, "disabled"), readOnly: getBoolean(this.el, "readOnly"), invalid: getBoolean(this.el, "invalid"), - name: getString(this.el, "name") + name: getString(this.el, "name"), + dir: getString(this.el, "dir", ["ltr", "rtl"]) }); }, destroyed() { diff --git a/priv/static/corex.js b/priv/static/corex.js index 4d9509e..8d7b10a 100644 --- a/priv/static/corex.js +++ b/priv/static/corex.js @@ -4048,7 +4048,6 @@ var Corex = (() => { const value = getNumber(el, "value"); const defaultValue = getNumber(el, "defaultValue"); const controlled = getBoolean(el, "controlled"); - let skipNextOnValueChange = false; const zag = new AngleSlider(el, __spreadProps(__spreadValues({ id: el.id }, controlled && value !== void 0 ? { value } : { defaultValue: defaultValue != null ? defaultValue : 0 }), { @@ -4059,23 +4058,6 @@ var Corex = (() => { name: getString(el, "name"), dir: getString(el, "dir", ["ltr", "rtl"]), onValueChange: (details) => { - if (skipNextOnValueChange) { - skipNextOnValueChange = false; - return; - } - if (controlled) { - skipNextOnValueChange = true; - zag.api.setValue(details.value); - } else { - const hiddenInput = el.querySelector( - '[data-scope="angle-slider"][data-part="hidden-input"]' - ); - if (hiddenInput) { - hiddenInput.value = String(details.value); - hiddenInput.dispatchEvent(new Event("input", { bubbles: true })); - hiddenInput.dispatchEvent(new Event("change", { bubbles: true })); - } - } const eventName = getString(el, "onValueChange"); if (eventName && !this.liveSocket.main.isDead && this.liveSocket.main.isConnected()) { this.pushEvent(eventName, { @@ -4095,16 +4077,6 @@ var Corex = (() => { } }, onValueChangeEnd: (details) => { - if (controlled) { - const hiddenInput = el.querySelector( - '[data-scope="angle-slider"][data-part="hidden-input"]' - ); - if (hiddenInput) { - hiddenInput.value = String(details.value); - hiddenInput.dispatchEvent(new Event("input", { bubbles: true })); - hiddenInput.dispatchEvent(new Event("change", { bubbles: true })); - } - } const eventName = getString(el, "onValueChangeEnd"); if (eventName && !this.liveSocket.main.isDead && this.liveSocket.main.isConnected()) { this.pushEvent(eventName, { @@ -4158,15 +4130,17 @@ var Corex = (() => { updated() { var _a, _b; const value = getNumber(this.el, "value"); + const defaultValue = getNumber(this.el, "defaultValue"); const controlled = getBoolean(this.el, "controlled"); (_b = this.angleSlider) == null ? void 0 : _b.updateProps(__spreadProps(__spreadValues({ id: this.el.id - }, controlled && value !== void 0 ? { value } : {}), { + }, controlled && value !== void 0 ? { value } : { defaultValue: defaultValue != null ? defaultValue : 0 }), { step: (_a = getNumber(this.el, "step")) != null ? _a : 1, disabled: getBoolean(this.el, "disabled"), readOnly: getBoolean(this.el, "readOnly"), invalid: getBoolean(this.el, "invalid"), - name: getString(this.el, "name") + name: getString(this.el, "name"), + dir: getString(this.el, "dir", ["ltr", "rtl"]) })); }, destroyed() { @@ -33222,6 +33196,12 @@ var Corex = (() => { ); }, updated() { + var _a; + if (!getBoolean(this.el, "controlled")) return; + (_a = this.treeView) == null ? void 0 : _a.updateProps({ + expandedValue: getStringList(this.el, "expandedValue"), + selectedValue: getStringList(this.el, "selectedValue") + }); }, destroyed() { var _a; diff --git a/priv/static/corex.min.js b/priv/static/corex.min.js index 6d25ace..fd9c660 100644 --- a/priv/static/corex.min.js +++ b/priv/static/corex.min.js @@ -1,11 +1,11 @@ -"use strict";var Corex=(()=>{var Kr=Object.defineProperty,Ff=Object.defineProperties,$f=Object.getOwnPropertyDescriptor,Hf=Object.getOwnPropertyDescriptors,Bf=Object.getOwnPropertyNames,Wr=Object.getOwnPropertySymbols;var Ha=Object.prototype.hasOwnProperty,rc=Object.prototype.propertyIsEnumerable;var Fa=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),_f=e=>{throw TypeError(e)};var $a=(e,t,n)=>t in e?Kr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g=(e,t)=>{for(var n in t||(t={}))Ha.call(t,n)&&$a(e,n,t[n]);if(Wr)for(var n of Wr(t))rc.call(t,n)&&$a(e,n,t[n]);return e},y=(e,t)=>Ff(e,Hf(t));var ft=(e,t)=>{var n={};for(var i in e)Ha.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&Wr)for(var i of Wr(e))t.indexOf(i)<0&&rc.call(e,i)&&(n[i]=e[i]);return n};var re=(e,t)=>()=>(e&&(t=e(e=0)),t);var he=(e,t)=>{for(var n in t)Kr(e,n,{get:t[n],enumerable:!0})},Gf=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Bf(t))!Ha.call(e,r)&&r!==n&&Kr(e,r,{get:()=>t[r],enumerable:!(i=$f(t,r))||i.enumerable});return e};var Uf=e=>Gf(Kr({},"__esModule",{value:!0}),e);var z=(e,t,n)=>$a(e,typeof t!="symbol"?t+"":t,n);var Ve=(e,t,n)=>new Promise((i,r)=>{var s=l=>{try{o(n.next(l))}catch(c){r(c)}},a=l=>{try{o(n.throw(l))}catch(c){r(c)}},o=l=>l.done?i(l.value):Promise.resolve(l.value).then(s,a);o((n=n.apply(e,t)).next())}),qf=function(e,t){this[0]=e,this[1]=t};var sc=e=>{var t=e[Fa("asyncIterator")],n=!1,i,r={};return t==null?(t=e[Fa("iterator")](),i=s=>r[s]=a=>t[s](a)):(t=t.call(e),i=s=>r[s]=a=>{if(n){if(n=!1,s==="throw")throw a;return a}return n=!0,{done:!1,value:new qf(new Promise(o=>{var l=t[s](a);l instanceof Object||_f("Object expected"),o(l)}),1)}}),r[Fa("iterator")]=()=>r,i("next"),"throw"in t?i("throw"):r.throw=s=>{throw s},"return"in t&&i("return"),r};function Oe(e){let t=e.dataset.dir;if(t!==void 0&&Wf.includes(t))return t;let n=document.documentElement.getAttribute("dir");return n==="ltr"||n==="rtl"?n:"ltr"}function tr(e){if(e)try{if(e.ownerDocument.activeElement!==e)return;let t=e.value.length;e.setSelectionRange(t,t)}catch(t){}}function em(e){return["html","body","#document"].includes(bc(e))}function es(e){if(!e)return!1;let t=e.getRootNode();return ui(t)===e}function Ot(e){if(e==null||!le(e))return!1;try{return nm(e)&&e.selectionStart!=null||rm.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function ce(e,t){var i;if(!e||!t||!le(e)||!le(t))return!1;let n=(i=t.getRootNode)==null?void 0:i.call(t);if(e===t||e.contains(t))return!0;if(n&&Ln(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Le(e){var t;return nr(e)?e:Qf(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function sm(e){return Le(e).documentElement}function ue(e){var t,n,i;return Ln(e)?ue(e.host):nr(e)?(t=e.defaultView)!=null?t:window:le(e)&&(i=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?i:window}function ui(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){let n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function am(e){if(bc(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Ln(e)&&e.host||sm(e);return Ln(t)?t.host:t}function Ya(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),nr(t)||Ln(t))return t}catch(i){}return(n=e.ownerDocument)!=null?n:document}function at(e){return Ga.has(e)||Ga.set(e,ue(e).getComputedStyle(e)),Ga.get(e)}function as(e,t){let n=new Set,i=Ya(e),r=s=>{let a=s.querySelectorAll("[aria-controls]");for(let o of a){if(o.getAttribute("aria-expanded")!=="true")continue;let l=Ec(o);for(let c of l){if(!c||n.has(c))continue;n.add(c);let u=i.getElementById(c);if(u){let h=u.getAttribute("role"),m=u.getAttribute("aria-modal")==="true";if(h&&om(h)&&!m&&(u===t||u.contains(t)||r(u)))return!0}}}return!1};return r(e)}function Xa(e,t){let n=Ya(e),i=new Set,r=s=>{let a=s.querySelectorAll("[aria-controls]");for(let o of a){if(o.getAttribute("aria-expanded")!=="true")continue;let l=Ec(o);for(let c of l){if(!c||i.has(c))continue;i.add(c);let u=n.getElementById(c);if(u){let h=u.getAttribute("role"),m=u.getAttribute("aria-modal")==="true";h&&ja.has(h)&&!m&&(t(u),r(u))}}}};r(e)}function Ic(e){let t=new Set;return Xa(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function lm(e){let t=e.getAttribute("role");return!!(t&&ja.has(t))}function cm(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function Pc(e){var t;return cm(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function Cc(e){if(!e.id)return!1;let t=Ya(e),n=CSS.escape(e.id),i=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(i)&&lm(e))}function Sc(e,t){let{type:n,quality:i=.92,background:r}=t;if(!e)throw new Error("[zag-js > getDataUrl]: Could not find the svg element");let s=ue(e),a=s.document,o=e.getBoundingClientRect(),l=e.cloneNode(!0);l.hasAttribute("viewBox")||l.setAttribute("viewBox",`0 0 ${o.width} ${o.height}`);let u=`\r -`+new s.XMLSerializer().serializeToString(l),h="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(u);if(n==="image/svg+xml")return Promise.resolve(h).then(I=>(l.remove(),I));let m=s.devicePixelRatio||1,d=a.createElement("canvas"),p=new s.Image;p.src=h,d.width=o.width*m,d.height=o.height*m;let v=d.getContext("2d");return(n==="image/jpeg"||r)&&(v.fillStyle=r||"white",v.fillRect(0,0,d.width,d.height)),new Promise(I=>{p.onload=()=>{v==null||v.drawImage(p,0,0,d.width,d.height),I(d.toDataURL(n,i)),l.remove()}})}function um(){var t;let e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}function dm(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Oc(e){let{selectionStart:t,selectionEnd:n,value:i}=e.currentTarget,r=e.data;return i.slice(0,t)+(r!=null?r:"")+i.slice(n)}function vm(e){var t,n,i,r;return(r=(t=e.composedPath)==null?void 0:t.call(e))!=null?r:(i=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:i.call(n)}function j(e){var n;let t=vm(e);return(n=t==null?void 0:t[0])!=null?n:e.target}function Fn(e){let t=e.currentTarget;if(!t||!t.matches("a[href], button[type='submit'], input[type='submit']"))return!1;let i=e.button===1,r=ls(e);return i||r}function rr(e){let t=e.currentTarget;if(!t)return!1;let n=t.localName;return e.altKey?n==="a"||n==="button"&&t.type==="submit"||n==="input"&&t.type==="submit":!1}function Re(e){return Yt(e).isComposing||e.keyCode===229}function ls(e){return di()?e.metaKey:e.ctrlKey}function wc(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}function Vc(e){return e.pointerType===""&&e.isTrusted?!0:mm()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function ge(e,t={}){var a;let{dir:n="ltr",orientation:i="horizontal"}=t,r=e.key;return r=(a=bm[r])!=null?a:r,n==="rtl"&&i==="horizontal"&&r in oc&&(r=oc[r]),r}function Yt(e){var t;return(t=e.nativeEvent)!=null?t:e}function gi(e){return e.ctrlKey||e.metaKey?.1:Em.has(e.key)||e.shiftKey&&Im.has(e.key)?10:1}function je(e,t="client"){let n=ym(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}function xc(e,t){var s;let{type:n="HTMLInputElement",property:i="value"}=t,r=ue(e)[n].prototype;return(s=Object.getOwnPropertyDescriptor(r,i))!=null?s:{}}function Pm(e){if(e.localName==="input")return"HTMLInputElement";if(e.localName==="textarea")return"HTMLTextAreaElement";if(e.localName==="select")return"HTMLSelectElement"}function Me(e,t,n="value"){var r;if(!e)return;let i=Pm(e);i&&((r=xc(e,{type:i,property:n}).set)==null||r.call(e,t)),e.setAttribute(n,t)}function sr(e,t){var i;if(!e)return;(i=xc(e,{type:"HTMLInputElement",property:"checked"}).set)==null||i.call(e,t),t?e.setAttribute("checked",""):e.removeAttribute("checked")}function Ac(e,t){let{value:n,bubbles:i=!0}=t;if(!e)return;let r=ue(e);e instanceof r.HTMLInputElement&&(Me(e,`${n}`),e.dispatchEvent(new r.Event("input",{bubbles:i})))}function pi(e,t){let{checked:n,bubbles:i=!0}=t;if(!e)return;let r=ue(e);e instanceof r.HTMLInputElement&&(sr(e,n),e.dispatchEvent(new r.Event("click",{bubbles:i})))}function Cm(e){return Sm(e)?e.form:e.closest("form")}function Sm(e){return e.matches("textarea, input, select, button")}function Tm(e,t){if(!e)return;let n=Cm(e),i=r=>{r.defaultPrevented||t()};return n==null||n.addEventListener("reset",i,{passive:!0}),()=>n==null?void 0:n.removeEventListener("reset",i)}function Om(e,t){let n=e==null?void 0:e.closest("fieldset");if(!n)return;t(n.disabled);let i=ue(n),r=new i.MutationObserver(()=>t(n.disabled));return r.observe(n,{attributes:!0,attributeFilter:["disabled"]}),()=>r.disconnect()}function wt(e,t){if(!e)return;let{onFieldsetDisabledChange:n,onFormReset:i}=t,r=[Tm(e,i),Om(e,n)];return()=>r.forEach(s=>s==null?void 0:s())}function Nc(e){let t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}function Am(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;let n=t(e);return(n===!0?e.shadowRoot:n)||null}function Rc(e,t,n){let i=[...e],r=[...e],s=new Set,a=new Map;e.forEach((l,c)=>a.set(l,c));let o=0;for(;o{a.set(d,m+p)});for(let d=m+u.length;d{a.set(d,m+p)})}r.push(...u)}}return i}function Ye(e){return!le(e)||e.closest("[inert]")?!1:e.matches(cs)&&im(e)}function jt(e,t={}){if(!e)return[];let{includeContainer:n,getShadowRoot:i}=t,r=Array.from(e.querySelectorAll(cs));n&&dn(e)&&r.unshift(e);let s=[];for(let a of r)if(dn(a)){if(kc(a)&&a.contentDocument){let o=a.contentDocument.body;s.push(...jt(o,{getShadowRoot:i}));continue}s.push(a)}if(i){let a=Rc(s,i,dn);return!a.length&&n?r:a}return!s.length&&n?r:s}function dn(e){return le(e)&&e.tabIndex>0?!0:Ye(e)&&!xm(e)}function km(e,t={}){let n=jt(e,t),i=n[0]||null,r=n[n.length-1]||null;return[i,r]}function fi(e){return e.tabIndex<0&&(wm.test(e.localName)||Ot(e))&&!Vm(e)?0:e.tabIndex}function us(e){let{root:t,getInitialEl:n,filter:i,enabled:r=!0}=e;if(!r)return;let s=null;if(s||(s=typeof n=="function"?n():n),s||(s=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!s){let a=jt(t);s=i?a.filter(i)[0]:a[0]}return s||t||void 0}function ds(e){let t=e.currentTarget;if(!t)return!1;let[n,i]=km(t);return!(es(n)&&e.shiftKey||es(i)&&!e.shiftKey||!n&&!i)}function H(e){let t=eo.create();return t.request(e),t.cleanup}function $n(e){let t=new Set;function n(i){let r=globalThis.requestAnimationFrame(i);t.add(()=>globalThis.cancelAnimationFrame(r))}return n(()=>n(e)),function(){t.forEach(r=>r())}}function Nm(e,t,n){let i=H(()=>{e.removeEventListener(t,r,!0),n()}),r=()=>{i(),n()};return e.addEventListener(t,r,{once:!0,capture:!0}),i}function Rm(e,t){if(!e)return;let{attributes:n,callback:i}=t,r=e.ownerDocument.defaultView||window,s=new r.MutationObserver(a=>{for(let o of a)o.type==="attributes"&&o.attributeName&&n.includes(o.attributeName)&&i(o)});return s.observe(e,{attributes:!0,attributeFilter:n}),()=>s.disconnect()}function ot(e,t){let{defer:n}=t,i=n?H:s=>s(),r=[];return r.push(i(()=>{let s=typeof e=="function"?e():e;r.push(Rm(s,t))})),()=>{r.forEach(s=>s==null?void 0:s())}}function Dm(e,t){let{callback:n}=t;if(!e)return;let i=e.ownerDocument.defaultView||window,r=new i.MutationObserver(n);return r.observe(e,{childList:!0,subtree:!0}),()=>r.disconnect()}function hs(e,t){let{defer:n}=t,i=n?H:s=>s(),r=[];return r.push(i(()=>{let s=typeof e=="function"?e():e;r.push(Dm(s,t))})),()=>{r.forEach(s=>s==null?void 0:s())}}function mi(e){let t=()=>{let n=ue(e);e.dispatchEvent(new n.MouseEvent("click"))};fm()?Nm(e,"keyup",t):queueMicrotask(t)}function gs(e){let t=am(e);return em(t)?Le(t).body:le(t)&&Lc(t)?t:gs(t)}function Lc(e){let t=ue(e),{overflow:n,overflowX:i,overflowY:r,display:s}=t.getComputedStyle(e);return Lm.test(n+r+i)&&!Mm.has(s)}function Fm(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function Xt(e,t){let r=t||{},{rootEl:n}=r,i=ft(r,["rootEl"]);!e||!n||!Lc(n)||!Fm(n)||e.scrollIntoView(i)}function to(e,t){let{left:n,top:i,width:r,height:s}=t.getBoundingClientRect(),a={x:e.x-n,y:e.y-i},o={x:ac(a.x/r),y:ac(a.y/s)};function l(c={}){let{dir:u="ltr",orientation:h="horizontal",inverted:m}=c,d=typeof m=="object"?m.x:m,p=typeof m=="object"?m.y:m;return h==="horizontal"?u==="rtl"||d?1-o.x:o.x:p?1-o.y:o.y}return{offset:a,percent:o,getPercentValue:l}}function Mc(e,t){let n=e.body,i="pointerLockElement"in e||"mozPointerLockElement"in e,r=()=>!!e.pointerLockElement;function s(){t==null||t(r())}function a(l){r()&&(t==null||t(!1)),console.error("PointerLock error occurred:",l),e.exitPointerLock()}if(!i)return;try{n.requestPointerLock()}catch(l){}let o=[ee(e,"pointerlockchange",s,!1),ee(e,"pointerlockerror",a,!1)];return()=>{o.forEach(l=>l()),e.exitPointerLock()}}function $m(e={}){let{target:t,doc:n}=e,i=n!=null?n:document,r=i.documentElement;return ir()?(ci==="default"&&(qa=r.style.webkitUserSelect,r.style.webkitUserSelect="none"),ci="disabled"):t&&(Xr.set(t,t.style.userSelect),t.style.userSelect="none"),()=>no({target:t,doc:i})}function no(e={}){let{target:t,doc:n}=e,r=(n!=null?n:document).documentElement;if(ir()){if(ci!=="disabled")return;ci="restoring",setTimeout(()=>{$n(()=>{ci==="restoring"&&(r.style.webkitUserSelect==="none"&&(r.style.webkitUserSelect=qa||""),qa="",ci="default")})},300)}else if(t&&Xr.has(t)){let s=Xr.get(t);t.style.userSelect==="none"&&(t.style.userSelect=s!=null?s:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Xr.delete(t)}}function io(e={}){let a=e,{defer:t,target:n}=a,i=ft(a,["defer","target"]),r=t?H:o=>o(),s=[];return s.push(r(()=>{let o=typeof n=="function"?n():n;s.push($m(y(g({},i),{target:o})))})),()=>{s.forEach(o=>o==null?void 0:o())}}function hn(e,t){let{onPointerMove:n,onPointerUp:i}=t,r=o=>{let l=je(o),c=Math.sqrt(l.x**2+l.y**2),u=o.pointerType==="touch"?10:5;if(!(c{let l=je(o);i({point:l,event:o})},a=[ee(e,"pointermove",r,!1),ee(e,"pointerup",s,!1),ee(e,"pointercancel",s,!1),ee(e,"contextmenu",s,!1),io({doc:e})];return()=>{a.forEach(o=>o())}}function ps(e){let{pointerNode:t,keyboardNode:n=t,onPress:i,onPressStart:r,onPressEnd:s,isValidKey:a=O=>O.key==="Enter"}=e;if(!t)return qt;let o=ue(t),l=qt,c=qt,u=qt,h=O=>({point:je(O),event:O});function m(O){r==null||r(h(O))}function d(O){s==null||s(h(O))}let v=ee(t,"pointerdown",O=>{c();let f=ee(o,"pointerup",P=>{let V=j(P);ce(t,V)?i==null||i(h(P)):s==null||s(h(P))},{passive:!i,once:!0}),S=ee(o,"pointercancel",d,{passive:!s,once:!0});c=_a(f,S),es(n)&&O.pointerType==="mouse"&&O.preventDefault(),m(O)},{passive:!r}),I=ee(n,"focus",T);l=_a(v,I);function T(){let O=P=>{if(!a(P))return;let V=x=>{if(!a(x))return;let k=new o.PointerEvent("pointerup"),N=h(k);i==null||i(N),s==null||s(N)};c(),c=ee(n,"keyup",V);let A=new o.PointerEvent("pointerdown");m(A)},b=()=>{let P=new o.PointerEvent("pointercancel");d(P)},f=ee(n,"keydown",O),S=ee(n,"blur",b);u=_a(f,S)}return()=>{l(),c(),u()}}function Fe(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function vi(e,t){var n;return(n=e==null?void 0:e.querySelector(t))!=null?n:null}function so(e,t,n=ro){return e.find(i=>n(i)===t)}function ao(e,t,n=ro){let i=so(e,t,n);return i?e.indexOf(i):-1}function yi(e,t,n=!0){let i=ao(e,t);return i=n?(i+1)%e.length:Math.min(i+1,e.length-1),e[i]}function bi(e,t,n=!0){let i=ao(e,t);return i===-1?n?e[e.length-1]:null:(i=n?(i-1+e.length)%e.length:Math.max(0,i-1),e[i])}function Hm(e){let t=new WeakMap,n,i=new WeakMap,r=o=>n||(n=new o.ResizeObserver(l=>{for(let c of l){i.set(c.target,c);let u=t.get(c.target);if(u)for(let h of u)h(c)}}),n);return{observe:(o,l)=>{let c=t.get(o)||new Set;c.add(l),t.set(o,c);let u=ue(o);return r(u).observe(o,e),()=>{let h=t.get(o);h&&(h.delete(l),h.size===0&&(t.delete(o),r(u).unobserve(o)))}},unobserve:o=>{t.delete(o),n==null||n.unobserve(o)}}}function Um(e,t,n,i=ro){let r=n?ao(e,n,i):-1,s=n?jf(e,r):e;return t.length===1&&(s=s.filter(o=>i(o)!==n)),s.find(o=>Gm(_m(o),t))}function Fc(e,t,n){let i=e.getAttribute(t),r=i!=null;return i===n?qt:(e.setAttribute(t,n),()=>{r?e.setAttribute(t,i):e.removeAttribute(t)})}function Hn(e,t){if(!e)return qt;let n=Object.keys(t).reduce((i,r)=>(i[r]=e.style.getPropertyValue(r),i),{});return qm(n,t)?qt:(Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")})}function $c(e,t,n){if(!e)return qt;let i=e.style.getPropertyValue(t);return i===n?qt:(e.style.setProperty(t,n),()=>{e.style.setProperty(t,i),e.style.length===0&&e.removeAttribute("style")})}function qm(e,t){return Object.keys(e).every(n=>e[n]===t[n])}function Wm(e,t){let{state:n,activeId:i,key:r,timeout:s=350,itemToId:a}=t,o=n.keysSoFar+r,c=o.length>1&&Array.from(o).every(p=>p===o[0])?o[0]:o,u=e.slice(),h=Um(u,c,i,a);function m(){clearTimeout(n.timer),n.timer=-1}function d(p){n.keysSoFar=p,m(),p!==""&&(n.timer=+setTimeout(()=>{d(""),m()},s))}return d(o),h}function Km(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}function zm(e,t,n){let{signal:i}=t;return[new Promise((a,o)=>{let l=setTimeout(()=>{o(new Error(`Timeout of ${n}ms exceeded`))},n);i.addEventListener("abort",()=>{clearTimeout(l),o(new Error("Promise aborted"))}),e.then(c=>{i.aborted||(clearTimeout(l),a(c))}).catch(c=>{i.aborted||(clearTimeout(l),o(c))})}),()=>t.abort()]}function Hc(e,t){let{timeout:n,rootNode:i}=t,r=ue(i),s=Le(i),a=new r.AbortController;return zm(new Promise(o=>{let l=e();if(l){o(l);return}let c=new r.MutationObserver(()=>{let u=e();u&&u.isConnected&&(c.disconnect(),o(u))});c.observe(s.body,{childList:!0,subtree:!0})}),a,n)}function or(e){return e==null?[]:Array.isArray(e)?e:[e]}function Ei(e,t,n={}){let{step:i=1,loop:r=!0}=n,s=t+i,a=e.length,o=a-1;return t===-1?i>0?0:o:s<0?r?o:0:s>=a?r?0:t>a?a:t:s}function _c(e,t,n={}){return e[Ei(e,t,n)]}function lr(e,t,n={}){let{step:i=1,loop:r=!0}=n;return Ei(e,t,{step:-i,loop:r})}function Gc(e,t,n={}){return e[lr(e,t,n)]}function cr(e,t){return e.reduce((n,i,r)=>{var s;return r%t===0?n.push([i]):(s=mt(n))==null||s.push(i),n},[])}function oo(e,t){return e.reduce(([n,i],r)=>(t(r)?n.push(r):i.push(r),[n,i]),[[],[]])}function Ce(e,t,...n){var r;if(e in t){let s=t[e];return Wt(s)?s(...n):s}let i=new Error(`No matching key: ${JSON.stringify(e)} in ${JSON.stringify(Object.keys(t))}`);throw(r=Error.captureStackTrace)==null||r.call(Error,i,Ce),i}function Yc(e,t=0){let n=0,i=null;return(...r)=>{let s=Date.now(),a=s-n;a>=t?(i&&(clearTimeout(i),i=null),e(...r),n=s):i||(i=setTimeout(()=>{e(...r),n=Date.now(),i=null},t-a))}}function Si(e){if(!Qi(e)||e===void 0)return e;let t=Reflect.ownKeys(e).filter(i=>typeof i=="string"),n={};for(let i of t){let r=e[i];r!==void 0&&(n[i]=Si(r))}return n}function fn(e,t){let n={};for(let i of t){let r=e[i];r!==void 0&&(n[i]=r)}return n}function uv(e,t){let n={},i={},r=new Set(t),s=Reflect.ownKeys(e);for(let a of s)r.has(a)?i[a]=e[a]:n[a]=e[a];return[i,n]}function su(e,t){let n=new ru(({now:i,deltaMs:r})=>{if(r>=t){let s=t>0?i-r%t:i;n.setStartMs(s),e({startMs:s,deltaMs:r})}});return n.start(),()=>n.stop()}function mn(e,t){let n=new ru(({deltaMs:i})=>{if(i>=t)return e(),!1});return n.start(),()=>n.stop()}function zt(...e){let t=e.length===1?e[0]:e[1];(e.length===2?e[0]:!0)&&console.warn(t)}function vs(...e){let t=e.length===1?e[0]:e[1];if(e.length===2?e[0]:!0)throw new Error(t)}function vn(e,t){if(e==null)throw new Error(t())}function yn(e,t,n){let i=[];for(let r of t)e[r]==null&&i.push(r);if(i.length>0)throw new Error(`[zag-js${n?` > ${n}`:""}] missing required props: ${i.join(", ")}`)}function au(...e){let t={};for(let n of e){if(!n)continue;for(let r in t){if(r.startsWith("on")&&typeof t[r]=="function"&&typeof n[r]=="function"){t[r]=At(n[r],t[r]);continue}if(r==="className"||r==="class"){t[r]=dv(t[r],n[r]);continue}if(r==="style"){t[r]=gv(t[r],n[r]);continue}t[r]=n[r]!==void 0?n[r]:t[r]}for(let r in n)t[r]===void 0&&(t[r]=n[r]);let i=Object.getOwnPropertySymbols(n);for(let r of i)t[r]=n[r]}return t}function Bn(e,t,n){let i=[],r;return s=>{var l;let a=e(s);return(a.length!==i.length||a.some((c,u)=>!fe(i[u],c)))&&(i=a,r=t(a,s),(l=n==null?void 0:n.onChange)==null||l.call(n,r)),r}}function Ee(){return{and:(...e)=>function(n){return e.every(i=>n.guard(i))},or:(...e)=>function(n){return e.some(i=>n.guard(i))},not:e=>function(n){return!n.guard(e)}}}function ut(){return{guards:Ee(),createMachine:e=>e,choose:e=>function({choose:n}){var i;return(i=n(e))==null?void 0:i.actions}}}function pv(e){let t=()=>{var a,o;return(o=(a=e.getRootNode)==null?void 0:a.call(e))!=null?o:document},n=()=>Le(t()),i=()=>{var a;return(a=n().defaultView)!=null?a:window},r=()=>ui(t()),s=a=>t().getElementById(a);return y(g({},e),{getRootNode:t,getDoc:n,getWin:i,getActiveElement:r,isActiveElement:es,getById:s})}function fv(e){return new Proxy({},{get(t,n){return n==="style"?i=>e({style:i}).style:e}})}function bv(){if(typeof globalThis!="undefined")return globalThis;if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global}function ou(e,t){let n=bv();return n?(n[e]||(n[e]=t()),n[e]):t()}function ys(e={}){return Tv(e)}function ns(e,t,n){let i=Dn.get(e);ts()&&!i&&console.warn("Please use proxy object");let r,s=[],a=i[3],o=!1,c=a(u=>{if(s.push(u),n){t(s.splice(0));return}r||(r=Promise.resolve().then(()=>{r=void 0,o&&t(s.splice(0))}))});return o=!0,()=>{o=!1,c()}}function Ov(e){let t=Dn.get(e);ts()&&!t&&console.warn("Please use proxy object");let[n,i,r]=t;return r(n,i())}function Rv(e,t,n){let i=n||"default",r=Yr.get(e);r||(r=new Map,Yr.set(e,r));let s=r.get(i)||{},a=Object.keys(t),o=(v,I)=>{e.addEventListener(v.toLowerCase(),I)},l=(v,I)=>{e.removeEventListener(v.toLowerCase(),I)},c=v=>v.startsWith("on"),u=v=>!v.startsWith("on"),h=v=>o(v.substring(2),t[v]),m=v=>l(v.substring(2),t[v]),d=v=>{let I=t[v],T=s[v];if(I!==T){if(v==="class"){e.className=I!=null?I:"";return}if(yc.has(v)){e[v]=I!=null?I:"";return}if(typeof I=="boolean"&&!v.includes("aria-")){e.toggleAttribute(jr(e,v),I);return}if(v==="children"){e.innerHTML=I;return}if(I!=null){e.setAttribute(jr(e,v),I);return}e.removeAttribute(jr(e,v))}};for(let v in s)t[v]==null&&(v==="class"?e.className="":yc.has(v)?e[v]="":e.removeAttribute(jr(e,v)));return Object.keys(s).filter(c).forEach(v=>{l(v.substring(2),s[v])}),a.filter(c).forEach(h),a.filter(u).forEach(d),r.set(i,t),function(){a.filter(c).forEach(m);let I=Yr.get(e);I&&(I.delete(i),I.size===0&&Yr.delete(e))}}function is(e){var s,a;let t=(s=e().value)!=null?s:e().defaultValue;e().debug&&console.log(`[bindable > ${e().debug}] initial`,t);let n=(a=e().isEqual)!=null?a:Object.is,i=ys({value:t}),r=()=>e().value!==void 0;return{initial:t,ref:i,get(){return r()?e().value:i.value},set(o){var u,h;let l=i.value,c=Wt(o)?o(l):o;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:c,prev:l}),r()||(i.value=c),n(c,l)||(h=(u=e()).onChange)==null||h.call(u,c,l)},invoke(o,l){var c,u;(u=(c=e()).onChange)==null||u.call(c,o,l)},hash(o){var l,c,u;return(u=(c=(l=e()).hash)==null?void 0:c.call(l,o))!=null?u:String(o)}}}function Dv(e){let t={current:e};return{get(n){return t.current[n]},set(n,i){t.current[n]=i}}}function lu(e,t){if(!Qi(e)||!Qi(t))return t===void 0?e:t;let n=g({},e);for(let i of Object.keys(t)){let r=t[i],s=e[i];r!==void 0&&(Qi(s)&&Qi(r)?n[i]=lu(s,r):n[i]=r)}return n}var Wf,w,Q,Y,C,Mn,U,li,Kf,zf,Yf,Ba,ac,jf,_a,qt,rs,ss,E,X,Xf,Zf,Jf,le,nr,Qf,bc,tm,Ln,nm,st,im,rm,Ga,ja,om,Ec,os,Za,Tc,hm,Ja,gm,pm,ir,Qa,di,Xe,fm,mm,pe,hi,xe,ym,bm,oc,Em,Im,ee,kc,wm,Vm,xm,cs,ar,eo,Lm,Mm,ci,qa,Xr,ro,gn,Bm,_m,Gm,Ue,Vt,Ym,Bc,jm,un,Xm,lc,Zm,lt,mt,Jm,Ze,ct,vt,fs,yt,cc,Qm,fe,pn,Uc,qc,xt,Zr,Wt,Wc,$e,ev,Kc,tv,Qi,nv,iv,rv,Kt,lo,sv,zc,At,ur,jc,uc,Xc,av,ov,lv,cv,Wa,Ii,Zc,Jc,Qc,Pi,He,dc,Ci,eu,ms,hc,tu,nu,iu,ye,B,zr,Jr,ru,dv,hv,gc,gv,er,Ua,_,n0,mv,pc,Ka,vv,yv,fc,Qr,Ev,Iv,Pv,Cv,za,mc,ts,Dn,Sv,Tv,wv,Vv,oe,vc,xv,Av,q,Yr,yc,kv,Nv,jr,W,K,se=re(()=>{"use strict";Wf=["ltr","rtl"];w=(e,t,n)=>{let i=e.dataset[t];if(i!==void 0&&(!n||n.includes(i)))return i},Q=(e,t)=>{let n=e.dataset[t];if(typeof n=="string")return n.split(",").map(i=>i.trim()).filter(i=>i.length>0)},Y=(e,t,n)=>{let i=e.dataset[t];if(i===void 0)return;let r=Number(i);if(!Number.isNaN(r))return n&&!n.includes(r)?0:r},C=(e,t)=>{let n=t.replace(/([A-Z])/g,"-$1").toLowerCase();return e.hasAttribute(`data-${n}`)},Mn=(e,t="element")=>e!=null&&e.id?e.id:`${t}-${Math.random().toString(36).substring(2,9)}`,U=(e,t=[])=>({parts:(...n)=>{if(Kf(t))return U(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>U(e,[...t,...n]),omit:(...n)=>U(e,t.filter(i=>!n.includes(i))),rename:n=>U(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,i)=>Object.assign(n,{[i]:{selector:[`&[data-scope="${li(e)}"][data-part="${li(i)}"]`,`& [data-scope="${li(e)}"][data-part="${li(i)}"]`].join(", "),attrs:{"data-scope":li(e),"data-part":li(i)}}}),{})}),li=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),Kf=e=>e.length===0,zf=Object.defineProperty,Yf=(e,t,n)=>t in e?zf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ba=(e,t,n)=>Yf(e,typeof t!="symbol"?t+"":t,n);ac=e=>Math.max(0,Math.min(1,e)),jf=(e,t)=>e.map((n,i)=>e[(Math.max(t,0)+i)%e.length]),_a=(...e)=>t=>e.reduce((n,i)=>i(n),t),qt=()=>{},rs=e=>typeof e=="object"&&e!==null,ss=2147483647,E=e=>e?"":void 0,X=e=>e?"true":void 0,Xf=1,Zf=9,Jf=11,le=e=>rs(e)&&e.nodeType===Xf&&typeof e.nodeName=="string",nr=e=>rs(e)&&e.nodeType===Zf,Qf=e=>rs(e)&&e===e.window,bc=e=>le(e)?e.localName||"":"#document";tm=e=>rs(e)&&e.nodeType!==void 0,Ln=e=>tm(e)&&e.nodeType===Jf&&"host"in e,nm=e=>le(e)&&e.localName==="input",st=e=>!!(e!=null&&e.matches("a[href]")),im=e=>le(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;rm=/(textarea|select)/;Ga=new WeakMap;ja=new Set(["menu","listbox","dialog","grid","tree","region"]),om=e=>ja.has(e),Ec=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};os=()=>typeof document!="undefined";Za=e=>os()&&e.test(um()),Tc=e=>os()&&e.test(dm()),hm=e=>os()&&e.test(navigator.vendor),Ja=()=>os()&&!!navigator.maxTouchPoints,gm=()=>Za(/^iPhone/i),pm=()=>Za(/^iPad/i)||di()&&navigator.maxTouchPoints>1,ir=()=>gm()||pm(),Qa=()=>di()||ir(),di=()=>Za(/^Mac/i),Xe=()=>Qa()&&hm(/apple/i),fm=()=>Tc(/Firefox/i),mm=()=>Tc(/Android/i);pe=e=>e.button===0,hi=e=>e.button===2||di()&&e.ctrlKey&&e.button===0,xe=e=>e.ctrlKey||e.altKey||e.metaKey,ym=e=>"touches"in e&&e.touches.length>0,bm={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},oc={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};Em=new Set(["PageUp","PageDown"]),Im=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]);ee=(e,t,n,i)=>{let r=typeof e=="function"?e():e;return r==null||r.addEventListener(t,n,i),()=>{r==null||r.removeEventListener(t,n,i)}};kc=e=>le(e)&&e.tagName==="IFRAME",wm=/^(audio|video|details)$/;Vm=e=>!Number.isNaN(Nc(e)),xm=e=>Nc(e)<0;cs="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",ar=(e,t={})=>{if(!e)return[];let{includeContainer:n=!1,getShadowRoot:i}=t,r=Array.from(e.querySelectorAll(cs));(n==!0||n=="if-empty"&&r.length===0)&&le(e)&&Ye(e)&&r.unshift(e);let a=[];for(let o of r)if(Ye(o)){if(kc(o)&&o.contentDocument){let l=o.contentDocument.body;a.push(...ar(l,{getShadowRoot:i}));continue}a.push(o)}return i?Rc(a,i,Ye):a};eo=class Dc{constructor(){Ba(this,"id",null),Ba(this,"fn_cleanup"),Ba(this,"cleanup",()=>{this.cancel()})}static create(){return new Dc}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};Lm=/auto|scroll|overlay|hidden|clip/,Mm=new Set(["inline","contents"]);ci="default",qa="",Xr=new WeakMap;ro=e=>e.id;gn=Hm({box:"border-box"}),Bm=e=>e.split("").map(t=>{let n=t.charCodeAt(0);return n>0&&n<128?t:n>=128&&n<=255?`/x${n.toString(16)}`.replace("/","\\"):""}).join("").trim(),_m=e=>{var t,n,i;return Bm((i=(n=(t=e.dataset)==null?void 0:t.valuetext)!=null?n:e.textContent)!=null?i:"")},Gm=(e,t)=>e.trim().toLowerCase().startsWith(t.toLowerCase());Ue=Object.assign(Wm,{defaultOptions:{keysSoFar:"",timer:-1},isValidEvent:Km});Vt={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"};Ym=Object.defineProperty,Bc=e=>{throw TypeError(e)},jm=(e,t,n)=>t in e?Ym(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,un=(e,t,n)=>jm(e,typeof t!="symbol"?t+"":t,n),Xm=(e,t,n)=>t.has(e)||Bc("Cannot "+n),lc=(e,t,n)=>(Xm(e,t,"read from private field"),t.get(e)),Zm=(e,t,n)=>t.has(e)?Bc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n);lt=e=>e[0],mt=e=>e[e.length-1],Jm=(e,t)=>e.indexOf(t)!==-1,Ze=(e,...t)=>e.concat(t),ct=(e,...t)=>e.filter(n=>!t.includes(n)),vt=e=>Array.from(new Set(e)),fs=(e,t)=>{let n=new Set(t);return e.filter(i=>!n.has(i))},yt=(e,t)=>Jm(e,t)?ct(e,t):Ze(e,t);cc=e=>(e==null?void 0:e.constructor.name)==="Array",Qm=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof(e==null?void 0:e.isEqual)=="function"&&typeof(t==null?void 0:t.isEqual)=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if(cc(e)&&cc(t))return Qm(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;let n=Object.keys(t!=null?t:Object.create(null)),i=n.length;for(let r=0;rArray.isArray(e),Uc=e=>e===!0||e===!1,qc=e=>e!=null&&typeof e=="object",xt=e=>qc(e)&&!pn(e),Zr=e=>typeof e=="string",Wt=e=>typeof e=="function",Wc=e=>e==null,$e=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),ev=e=>Object.prototype.toString.call(e),Kc=Function.prototype.toString,tv=Kc.call(Object),Qi=e=>{if(!qc(e)||ev(e)!="[object Object]"||rv(e))return!1;let t=Object.getPrototypeOf(e);if(t===null)return!0;let n=$e(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Kc.call(n)==tv},nv=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,iv=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,rv=e=>nv(e)||iv(e),Kt=(e,...t)=>{let n=typeof e=="function"?e(...t):e;return n!=null?n:void 0},lo=e=>e,sv=e=>e(),zc=()=>{},At=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})},ur=(()=>{let e=0;return()=>(e++,e.toString(36))})();({floor:jc,abs:uc,round:Xc,min:av,max:ov,pow:lv,sign:cv}=Math),Wa=e=>Number.isNaN(e),Ii=e=>Wa(e)?0:e,Zc=(e,t)=>(e%t+t)%t,Jc=(e,t)=>Ii(e)>=t,Qc=(e,t)=>Ii(e)<=t,Pi=(e,t,n)=>{let i=Ii(e),r=t==null||i>=t,s=n==null||i<=n;return r&&s},He=(e,t,n)=>av(ov(Ii(e),t),n),dc=(e,t)=>{let n=e,i=t.toString(),r=i.indexOf("."),s=r>=0?i.length-r:0;if(s>0){let a=lv(10,s);n=Xc(n*a)/a}return n},Ci=(e,t)=>typeof t=="number"?jc(e*t+.5)/t:Xc(e),eu=(e,t,n,i)=>{let r=t!=null?Number(t):0,s=Number(n),a=(e-r)%i,o=uc(a)*2>=i?e+cv(a)*(i-uc(a)):e-a;if(o=dc(o,i),!Wa(r)&&os){let l=jc((s-r)/i),c=r+l*i;o=l<=0||ce[t]===n?e:[...e.slice(0,t),n,...e.slice(t+1)],hc=e=>{if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n},tu=(e,t,n)=>{let i=t==="+"?e+n:e-n;if(e%1!==0||n%1!==0){let r=10**Math.max(hc(e),hc(n));e=Math.round(e*r),n=Math.round(n*r),i=t==="+"?e+n:e-n,i/=r}return i},nu=(e,t)=>tu(Ii(e),"+",t),iu=(e,t)=>tu(Ii(e),"-",t),ye=e=>typeof e=="number"?`${e}px`:e;B=e=>function(n){return uv(n,e)},zr=()=>performance.now(),ru=class{constructor(e){this.onTick=e,un(this,"frameId",null),un(this,"pausedAtMs",null),un(this,"context"),un(this,"cancelFrame",()=>{this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null)}),un(this,"setStartMs",t=>{this.context.startMs=t}),un(this,"start",()=>{if(this.frameId!==null)return;let t=zr();this.pausedAtMs!==null?(this.context.startMs+=t-this.pausedAtMs,this.pausedAtMs=null):this.context.startMs=t,this.frameId=requestAnimationFrame(lc(this,Jr))}),un(this,"pause",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=zr())}),un(this,"stop",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=null)}),Zm(this,Jr,t=>{if(this.context.now=t,this.context.deltaMs=t-this.context.startMs,this.onTick(this.context)===!1){this.stop();return}this.frameId=requestAnimationFrame(lc(this,Jr))}),this.context={now:0,startMs:zr(),deltaMs:0}}get elapsedMs(){return this.pausedAtMs!==null?this.pausedAtMs-this.context.startMs:zr()-this.context.startMs}};Jr=new WeakMap;dv=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),hv=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,gc=e=>{let t={},n;for(;n=hv.exec(e);)t[n[1]]=n[2];return t},gv=(e,t)=>{if(Zr(e)){if(Zr(t))return`${e};${t}`;e=gc(e)}else Zr(t)&&(t=gc(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};er=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(er||{}),Ua="__init__";_=()=>e=>Array.from(new Set(e)),n0=Symbol(),mv=Symbol(),pc=Object.getPrototypeOf,Ka=new WeakMap,vv=e=>e&&(Ka.has(e)?Ka.get(e):pc(e)===Object.prototype||pc(e)===Array.prototype),yv=e=>vv(e)&&e[mv]||null,fc=(e,t=!0)=>{Ka.set(e,t)};Qr=ou("__zag__refSet",()=>new WeakSet),Ev=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,Iv=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,Pv=e=>typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeName=="string",Cv=e=>Ev(e)||Iv(e)||Pv(e),za=e=>e!==null&&typeof e=="object",mc=e=>za(e)&&!Qr.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!Cv(e)&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)&&!(e instanceof Promise)&&!(e instanceof File)&&!(e instanceof Blob)&&!(e instanceof AbortController),ts=()=>!0,Dn=ou("__zag__proxyStateMap",()=>new WeakMap),Sv=(e=Object.is,t=(o,l)=>new Proxy(o,l),n=new WeakMap,i=(o,l)=>{let c=n.get(o);if((c==null?void 0:c[0])===l)return c[1];let u=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o));return fc(u,!0),n.set(o,[l,u]),Reflect.ownKeys(o).forEach(h=>{let m=Reflect.get(o,h);Qr.has(m)?(fc(m,!1),u[h]=m):Dn.has(m)?u[h]=Ov(m):u[h]=m}),Object.freeze(u)},r=new WeakMap,s=[1,1],a=o=>{if(!za(o))throw new Error("object required");let l=r.get(o);if(l)return l;let c=s[0],u=new Set,h=(V,A=++s[0])=>{c!==A&&(c=A,u.forEach(x=>x(V,A)))},m=s[1],d=(V=++s[1])=>(m!==V&&!u.size&&(m=V,v.forEach(([A])=>{let x=A[1](V);x>c&&(c=x)})),c),p=V=>(A,x)=>{let k=[...A];k[1]=[V,...k[1]],h(k,x)},v=new Map,I=(V,A)=>{if(ts()&&v.has(V))throw new Error("prop listener already exists");if(u.size){let x=A[3](p(V));v.set(V,[A,x])}else v.set(V,[A])},T=V=>{var x;let A=v.get(V);A&&(v.delete(V),(x=A[1])==null||x.call(A))},O=V=>(u.add(V),u.size===1&&v.forEach(([x,k],N)=>{if(ts()&&k)throw new Error("remove already exists");let D=x[3](p(N));v.set(N,[x,D])}),()=>{u.delete(V),u.size===0&&v.forEach(([x,k],N)=>{k&&(k(),v.set(N,[x]))})}),b=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o)),S=t(b,{deleteProperty(V,A){let x=Reflect.get(V,A);T(A);let k=Reflect.deleteProperty(V,A);return k&&h(["delete",[A],x]),k},set(V,A,x,k){var te;let N=Reflect.has(V,A),D=Reflect.get(V,A,k);if(N&&(e(D,x)||r.has(x)&&e(D,r.get(x))))return!0;T(A),za(x)&&(x=yv(x)||x);let $=x;if(!((te=Object.getOwnPropertyDescriptor(V,A))!=null&&te.set)){!Dn.has(x)&&mc(x)&&($=ys(x));let Z=!Qr.has($)&&Dn.get($);Z&&I(A,Z)}return Reflect.set(V,A,$,k),h(["set",[A],x,D]),!0}});r.set(o,S);let P=[b,d,i,O];return Dn.set(S,P),Reflect.ownKeys(o).forEach(V=>{let A=Object.getOwnPropertyDescriptor(o,V);A.get||A.set?Object.defineProperty(b,V,A):S[V]=o[V]}),S})=>[a,Dn,Qr,e,t,mc,n,i,r,s],[Tv]=Sv();wv=Object.defineProperty,Vv=(e,t,n)=>t in e?wv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oe=(e,t,n)=>Vv(e,typeof t!="symbol"?t+"":t,n),vc={onFocus:"onFocusin",onBlur:"onFocusout",onChange:"onInput",onDoubleClick:"onDblclick",htmlFor:"for",className:"class",defaultValue:"value",defaultChecked:"checked"},xv=new Set(["viewBox","preserveAspectRatio"]),Av=e=>{let t="";for(let n in e){let i=e[n];i!=null&&(n.startsWith("--")||(n=n.replace(/[A-Z]/g,r=>`-${r.toLowerCase()}`)),t+=`${n}:${i};`)}return t},q=fv(e=>Object.entries(e).reduce((t,[n,i])=>{if(i===void 0)return t;if(n in vc&&(n=vc[n]),n==="style"&&typeof i=="object")return t.style=Av(i),t;let r=xv.has(n)?n:n.toLowerCase();return t[r]=i,t},{})),Yr=new WeakMap,yc=new Set(["value","checked","selected"]),kv=new Set(["viewBox","preserveAspectRatio","clipPath","clipRule","fillRule","strokeWidth","strokeLinecap","strokeLinejoin","strokeDasharray","strokeDashoffset","strokeMiterlimit"]),Nv=e=>e.tagName==="svg"||e.namespaceURI==="http://www.w3.org/2000/svg",jr=(e,t)=>Nv(e)&&kv.has(t)?t:t.toLowerCase();is.cleanup=e=>{};is.ref=e=>{let t=e;return{get:()=>t,set:n=>{t=n}}};W=class{constructor(e,t={}){var h,m,d;this.machine=e,oe(this,"scope"),oe(this,"context"),oe(this,"prop"),oe(this,"state"),oe(this,"refs"),oe(this,"computed"),oe(this,"event",{type:""}),oe(this,"previousEvent",{type:""}),oe(this,"effects",new Map),oe(this,"transition",null),oe(this,"cleanups",[]),oe(this,"subscriptions",[]),oe(this,"userPropsRef"),oe(this,"getEvent",()=>y(g({},this.event),{current:()=>this.event,previous:()=>this.previousEvent})),oe(this,"getStateConfig",p=>this.machine.states[p]),oe(this,"getState",()=>y(g({},this.state),{matches:(...p)=>p.includes(this.state.get()),hasTag:p=>{var v,I;return!!((I=(v=this.getStateConfig(this.state.get()))==null?void 0:v.tags)!=null&&I.includes(p))}})),oe(this,"debug",(...p)=>{this.machine.debug&&console.log(...p)}),oe(this,"notify",()=>{this.publish()}),oe(this,"send",p=>{this.status===er.Started&&queueMicrotask(()=>{var S,P,V,A,x;if(!p)return;this.previousEvent=this.event,this.event=p,this.debug("send",p);let v=this.state.get(),I=p.type,T=(A=(P=(S=this.getStateConfig(v))==null?void 0:S.on)==null?void 0:P[I])!=null?A:(V=this.machine.on)==null?void 0:V[I],O=this.choose(T);if(!O)return;this.transition=O;let b=(x=O.target)!=null?x:v;this.debug("transition",O);let f=b!==v;f?this.state.set(b):O.reenter&&!f?this.state.invoke(v,v):this.action(O.actions)})}),oe(this,"action",p=>{let v=Wt(p)?p(this.getParams()):p;if(!v)return;let I=v.map(T=>{var b,f;let O=(f=(b=this.machine.implementations)==null?void 0:b.actions)==null?void 0:f[T];return O||zt(`[zag-js] No implementation found for action "${JSON.stringify(T)}"`),O});for(let T of I)T==null||T(this.getParams())}),oe(this,"guard",p=>{var v,I;return Wt(p)?p(this.getParams()):(I=(v=this.machine.implementations)==null?void 0:v.guards)==null?void 0:I[p](this.getParams())}),oe(this,"effect",p=>{let v=Wt(p)?p(this.getParams()):p;if(!v)return;let I=v.map(O=>{var f,S;let b=(S=(f=this.machine.implementations)==null?void 0:f.effects)==null?void 0:S[O];return b||zt(`[zag-js] No implementation found for effect "${JSON.stringify(O)}"`),b}),T=[];for(let O of I){let b=O==null?void 0:O(this.getParams());b&&T.push(b)}return()=>T.forEach(O=>O==null?void 0:O())}),oe(this,"choose",p=>or(p).find(v=>{let I=!v.guard;return Zr(v.guard)?I=!!this.guard(v.guard):Wt(v.guard)&&(I=v.guard(this.getParams())),I})),oe(this,"subscribe",p=>(this.subscriptions.push(p),()=>{let v=this.subscriptions.indexOf(p);v>-1&&this.subscriptions.splice(v,1)})),oe(this,"status",er.NotStarted),oe(this,"publish",()=>{this.callTrackers(),this.subscriptions.forEach(p=>p(this.service))}),oe(this,"trackers",[]),oe(this,"setupTrackers",()=>{var p,v;(v=(p=this.machine).watch)==null||v.call(p,this.getParams())}),oe(this,"callTrackers",()=>{this.trackers.forEach(({deps:p,fn:v})=>{let I=p.map(T=>T());fe(v.prev,I)||(v(),v.prev=I)})}),oe(this,"getParams",()=>({state:this.getState(),context:this.context,event:this.getEvent(),prop:this.prop,send:this.send,action:this.action,guard:this.guard,track:(p,v)=>{v.prev=p.map(I=>I()),this.trackers.push({deps:p,fn:v})},refs:this.refs,computed:this.computed,flush:sv,scope:this.scope,choose:this.choose})),this.userPropsRef={current:t};let{id:n,ids:i,getRootNode:r}=Kt(t);this.scope=pv({id:n,ids:i,getRootNode:r});let s=p=>{var T,O;let v=Kt(this.userPropsRef.current);return((O=(T=e.props)==null?void 0:T.call(e,{props:Si(v),scope:this.scope}))!=null?O:v)[p]};this.prop=s;let a=(h=e.context)==null?void 0:h.call(e,{prop:s,bindable:is,scope:this.scope,flush(p){queueMicrotask(p)},getContext(){return o},getComputed(){return l},getRefs(){return c},getEvent:this.getEvent.bind(this)});a&&Object.values(a).forEach(p=>{let v=ns(p.ref,()=>this.notify());this.cleanups.push(v)});let o={get(p){return a==null?void 0:a[p].get()},set(p,v){a==null||a[p].set(v)},initial(p){return a==null?void 0:a[p].initial},hash(p){let v=a==null?void 0:a[p].get();return a==null?void 0:a[p].hash(v)}};this.context=o;let l=p=>{var v,I;return(I=(v=e.computed)==null?void 0:v[p]({context:o,event:this.getEvent(),prop:s,refs:this.refs,scope:this.scope,computed:l}))!=null?I:{}};this.computed=l;let c=Dv((d=(m=e.refs)==null?void 0:m.call(e,{prop:s,context:o}))!=null?d:{});this.refs=c;let u=is(()=>({defaultValue:e.initialState({prop:s}),onChange:(p,v)=>{var T,O,b,f;if(v){let S=this.effects.get(v);S==null||S(),this.effects.delete(v)}v&&this.action((T=this.getStateConfig(v))==null?void 0:T.exit),this.action((O=this.transition)==null?void 0:O.actions);let I=this.effect((b=this.getStateConfig(p))==null?void 0:b.effects);if(I&&this.effects.set(p,I),v===Ua){this.action(e.entry);let S=this.effect(e.effects);S&&this.effects.set(Ua,S)}this.action((f=this.getStateConfig(p))==null?void 0:f.entry)}}));this.state=u,this.cleanups.push(ns(this.state.ref,()=>this.notify()))}updateProps(e){let t=this.userPropsRef.current;this.userPropsRef.current=()=>{let n=Kt(t),i=Kt(e);return lu(n,i)},this.notify()}start(){this.status=er.Started,this.debug("initializing..."),this.state.invoke(this.state.initial,Ua),this.setupTrackers()}stop(){this.effects.forEach(e=>e==null?void 0:e()),this.effects.clear(),this.transition=null,this.action(this.machine.exit),this.cleanups.forEach(e=>e()),this.cleanups=[],this.subscriptions=[],this.status=er.Stopped,this.debug("unmounting...")}get service(){return{state:this.getState(),send:this.send,context:this.context,prop:this.prop,scope:this.scope,refs:this.refs,computed:this.computed,event:this.getEvent(),getStatus:()=>this.status}}},K=class{constructor(e,t){z(this,"el");z(this,"doc");z(this,"machine");z(this,"api");z(this,"init",()=>{this.render(),this.machine.subscribe(()=>{this.api=this.initApi(),this.render()}),this.machine.start()});z(this,"destroy",()=>{this.machine.stop()});z(this,"spreadProps",(e,t)=>{Rv(e,t,this.machine.scope.id)});z(this,"updateProps",e=>{this.machine.updateProps(e)});if(!e)throw new Error("Root element not found");this.el=e,this.doc=document,this.machine=this.initMachine(t),this.api=this.initApi()}}});var cu={};he(cu,{Accordion:()=>jv});function Gv(e,t){let{send:n,context:i,prop:r,scope:s,computed:a}=e,o=i.get("focusedValue"),l=i.get("value"),c=r("multiple");function u(m){let d=m;!c&&d.length>1&&(d=[d[0]]),n({type:"VALUE.SET",value:d})}function h(m){var d;return{expanded:l.includes(m.value),focused:o===m.value,disabled:!!((d=m.disabled)!=null?d:r("disabled"))}}return{focusedValue:o,value:l,setValue:u,getItemState:h,getRootProps(){return t.element(y(g({},dr.root.attrs),{dir:r("dir"),id:bs(s),"data-orientation":r("orientation")}))},getItemProps(m){let d=h(m);return t.element(y(g({},dr.item.attrs),{dir:r("dir"),id:Mv(s,m.value),"data-state":d.expanded?"open":"closed","data-focus":E(d.focused),"data-disabled":E(d.disabled),"data-orientation":r("orientation")}))},getItemContentProps(m){let d=h(m);return t.element(y(g({},dr.itemContent.attrs),{dir:r("dir"),role:"region",id:co(s,m.value),"aria-labelledby":Es(s,m.value),hidden:!d.expanded,"data-state":d.expanded?"open":"closed","data-disabled":E(d.disabled),"data-focus":E(d.focused),"data-orientation":r("orientation")}))},getItemIndicatorProps(m){let d=h(m);return t.element(y(g({},dr.itemIndicator.attrs),{dir:r("dir"),"aria-hidden":!0,"data-state":d.expanded?"open":"closed","data-disabled":E(d.disabled),"data-focus":E(d.focused),"data-orientation":r("orientation")}))},getItemTriggerProps(m){let{value:d}=m,p=h(m);return t.button(y(g({},dr.itemTrigger.attrs),{type:"button",dir:r("dir"),id:Es(s,d),"aria-controls":co(s,d),"data-controls":co(s,d),"aria-expanded":p.expanded,disabled:p.disabled,"data-orientation":r("orientation"),"aria-disabled":p.disabled,"data-state":p.expanded?"open":"closed","data-ownedby":bs(s),onFocus(){p.disabled||n({type:"TRIGGER.FOCUS",value:d})},onBlur(){p.disabled||n({type:"TRIGGER.BLUR"})},onClick(v){p.disabled||(Xe()&&v.currentTarget.focus(),n({type:"TRIGGER.CLICK",value:d}))},onKeyDown(v){if(v.defaultPrevented||p.disabled)return;let I={ArrowDown(){a("isHorizontal")||n({type:"GOTO.NEXT",value:d})},ArrowUp(){a("isHorizontal")||n({type:"GOTO.PREV",value:d})},ArrowRight(){a("isHorizontal")&&n({type:"GOTO.NEXT",value:d})},ArrowLeft(){a("isHorizontal")&&n({type:"GOTO.PREV",value:d})},Home(){n({type:"GOTO.FIRST",value:d})},End(){n({type:"GOTO.LAST",value:d})}},T=ge(v,{dir:r("dir"),orientation:r("orientation")}),O=I[T];O&&(O(v),v.preventDefault())}}))}}}var Lv,dr,bs,Mv,co,Es,Fv,Is,$v,Hv,Bv,_v,Uv,qv,Wv,Kv,c0,zv,u0,Yv,jv,uu=re(()=>{"use strict";se();Lv=U("accordion").parts("root","item","itemTrigger","itemContent","itemIndicator"),dr=Lv.build(),bs=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`accordion:${e.id}`},Mv=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`accordion:${e.id}:item:${t}`},co=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemContent)==null?void 0:i.call(n,t))!=null?r:`accordion:${e.id}:content:${t}`},Es=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemTrigger)==null?void 0:i.call(n,t))!=null?r:`accordion:${e.id}:trigger:${t}`},Fv=e=>e.getById(bs(e)),Is=e=>{let n=`[data-controls][data-ownedby='${CSS.escape(bs(e))}']:not([disabled])`;return Fe(Fv(e),n)},$v=e=>lt(Is(e)),Hv=e=>mt(Is(e)),Bv=(e,t)=>yi(Is(e),Es(e,t)),_v=(e,t)=>bi(Is(e),Es(e,t));({and:Uv,not:qv}=Ee()),Wv={props({props:e}){return g({collapsible:!1,multiple:!1,orientation:"vertical",defaultValue:[]},e)},initialState(){return"idle"},context({prop:e,bindable:t}){return{focusedValue:t(()=>({defaultValue:null,sync:!0,onChange(n){var i;(i=e("onFocusChange"))==null||i({value:n})}})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var i;(i=e("onValueChange"))==null||i({value:n})}}))}},computed:{isHorizontal:({prop:e})=>e("orientation")==="horizontal"},on:{"VALUE.SET":{actions:["setValue"]}},states:{idle:{on:{"TRIGGER.FOCUS":{target:"focused",actions:["setFocusedValue"]}}},focused:{on:{"GOTO.NEXT":{actions:["focusNextTrigger"]},"GOTO.PREV":{actions:["focusPrevTrigger"]},"TRIGGER.CLICK":[{guard:Uv("isExpanded","canToggle"),actions:["collapse"]},{guard:qv("isExpanded"),actions:["expand"]}],"GOTO.FIRST":{actions:["focusFirstTrigger"]},"GOTO.LAST":{actions:["focusLastTrigger"]},"TRIGGER.BLUR":{target:"idle",actions:["clearFocusedValue"]}}}},implementations:{guards:{canToggle:({prop:e})=>!!e("collapsible")||!!e("multiple"),isExpanded:({context:e,event:t})=>e.get("value").includes(t.value)},actions:{collapse({context:e,prop:t,event:n}){let i=t("multiple")?ct(e.get("value"),n.value):[];e.set("value",i)},expand({context:e,prop:t,event:n}){let i=t("multiple")?Ze(e.get("value"),n.value):[n.value];e.set("value",i)},focusFirstTrigger({scope:e}){var t;(t=$v(e))==null||t.focus()},focusLastTrigger({scope:e}){var t;(t=Hv(e))==null||t.focus()},focusNextTrigger({context:e,scope:t}){let n=e.get("focusedValue");if(!n)return;let i=Bv(t,n);i==null||i.focus()},focusPrevTrigger({context:e,scope:t}){let n=e.get("focusedValue");if(!n)return;let i=_v(t,n);i==null||i.focus()},setFocusedValue({context:e,event:t}){e.set("focusedValue",t.value)},clearFocusedValue({context:e}){e.set("focusedValue",null)},setValue({context:e,event:t}){e.set("value",t.value)},coarseValue({context:e,prop:t}){!t("multiple")&&e.get("value").length>1&&(zt("The value of accordion should be a single value when multiple is false."),e.set("value",[e.get("value")[0]]))}}}},Kv=_()(["collapsible","dir","disabled","getRootNode","id","ids","multiple","onFocusChange","onValueChange","orientation","value","defaultValue"]),c0=B(Kv),zv=_()(["value","disabled"]),u0=B(zv),Yv=class extends K{initMachine(e){return new W(Wv,e)}initApi(){return Gv(this.machine.service,q)}render(){var i;let e=(i=this.el.querySelector('[data-scope="accordion"][data-part="root"]'))!=null?i:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.getItemsList(),n=e.querySelectorAll('[data-scope="accordion"][data-part="item"]');for(let r=0;r{var a,o;let r=w(e,"onValueChange");r&&this.liveSocket.main.isConnected()&&t(r,{id:e.id,value:(a=i.value)!=null?a:null});let s=w(e,"onValueChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{id:e.id,value:(o=i.value)!=null?o:null}}))},onFocusChange:i=>{var a,o;let r=w(e,"onFocusChange");r&&this.liveSocket.main.isConnected()&&t(r,{id:e.id,value:(a=i.value)!=null?a:null});let s=w(e,"onFocusChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{id:e.id,value:(o=i.value)!=null?o:null}}))}}));n.init(),this.accordion=n,this.onSetValue=i=>{let{value:r}=i.detail;n.api.setValue(r)},e.addEventListener("phx:accordion:set-value",this.onSetValue),this.handlers=[],this.handlers.push(this.handleEvent("accordion_set_value",i=>{let r=i.accordion_id;r&&!(e.id===r||e.id===`accordion:${r}`)||n.api.setValue(i.value)})),this.handlers.push(this.handleEvent("accordion_value",()=>{this.pushEvent("accordion_value_response",{value:n.api.value})})),this.handlers.push(this.handleEvent("accordion_focused_value",()=>{this.pushEvent("accordion_focused_value_response",{value:n.api.focusedValue})}))},updated(){var t,n,i,r;let e=C(this.el,"controlled");(r=this.accordion)==null||r.updateProps(y(g({id:this.el.id},e?{value:Q(this.el,"value")}:{defaultValue:(i=(n=(t=this.accordion)==null?void 0:t.api)==null?void 0:n.value)!=null?i:Q(this.el,"defaultValue")}),{collapsible:C(this.el,"collapsible"),multiple:C(this.el,"multiple"),orientation:w(this.el,"orientation",["horizontal","vertical"]),dir:Oe(this.el)}))},destroyed(){var e;if(this.onSetValue&&this.el.removeEventListener("phx:accordion:set-value",this.onSetValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.accordion)==null||e.destroy()}}});function yu(e,t,n=e.center){let i=t.x-n.x,r=t.y-n.y;return 360-(Math.atan2(i,r)*(180/Math.PI)+180)}function bn(e){let{x:t,y:n,width:i,height:r}=e,s=t+i/2,a=n+r/2;return{x:t,y:n,width:i,height:r,minX:t,minY:n,maxX:t+i,maxY:n+r,midX:s,midY:a,center:_n(s,a)}}function ey(e){let t=_n(e.minX,e.minY),n=_n(e.maxX,e.minY),i=_n(e.maxX,e.maxY),r=_n(e.minX,e.maxY);return{top:t,right:n,bottom:i,left:r}}function ty(e){if(!uo.has(e)){let t=e.ownerDocument.defaultView||window;uo.set(e,t.getComputedStyle(e))}return uo.get(e)}function po(e,t={}){return bn(ny(e,t))}function ny(e,t={}){let{excludeScrollbar:n=!1,excludeBorders:i=!1}=t,{x:r,y:s,width:a,height:o}=e.getBoundingClientRect(),l={x:r,y:s,width:a,height:o},c=ty(e),{borderLeftWidth:u,borderTopWidth:h,borderRightWidth:m,borderBottomWidth:d}=c,p=gu(u,m),v=gu(h,d);if(i&&(l.width-=p,l.height-=v,l.x+=ho(u),l.y+=ho(h)),n){let I=e.offsetWidth-e.clientWidth-p,T=e.offsetHeight-e.clientHeight-v;l.width-=I,l.height-=T}return l}function Cu(e,t={}){return bn(iy(e,t))}function iy(e,t){let{excludeScrollbar:n=!1}=t,{innerWidth:i,innerHeight:r,document:s,visualViewport:a}=e,o=(a==null?void 0:a.width)||i,l=(a==null?void 0:a.height)||r,c={x:0,y:0,width:o,height:l};if(n){let u=i-s.documentElement.clientWidth,h=r-s.documentElement.clientHeight;c.width-=u,c.height-=h}return c}function Su(e,t){let n=bn(e),{top:i,right:r,left:s,bottom:a}=ey(n),[o]=t.split("-");return{top:[s,i,r,a],right:[i,r,a,s],bottom:[i,s,a,r],left:[r,i,s,a]}[o]}function fo(e,t){let{x:n,y:i}=t,r=!1;for(let s=0,a=e.length-1;si!=u>i&&n<(c-o)*(i-l)/(u-l)+o&&(r=!r)}return r}function mu(e,t){let{minX:n,minY:i,maxX:r,maxY:s,midX:a,midY:o}=e,l=t.includes("w")?n:t.includes("e")?r:a,c=t.includes("n")?i:t.includes("s")?s:o;return{x:l,y:c}}function sy(e){return ry[e]}function Tu(e,t,n,i){let{scalingOriginMode:r,lockAspectRatio:s}=i,a=mu(e,n),o=sy(n),l=mu(e,o);r==="center"&&(t={x:t.x*2,y:t.y*2});let c={x:a.x+t.x,y:a.y+t.y},u={x:pu[n].x*2-1,y:pu[n].y*2-1},h={width:c.x-l.x,height:c.y-l.y},m=u.x*h.width/e.width,d=u.y*h.height/e.height,p=Ti(m)>Ti(d)?m:d,v=s?{x:p,y:p}:{x:a.x===l.x?1:m,y:a.y===l.y?1:d};switch(a.y===l.y?v.y=Ti(v.y):Ps(v.y)!==Ps(d)&&(v.y*=-1),a.x===l.x?v.x=Ti(v.x):Ps(v.x)!==Ps(m)&&(v.x*=-1),r){case"extent":return vu(e,du.scale(v.x,v.y,l),!1);case"center":return vu(e,du.scale(v.x,v.y,{x:e.midX,y:e.midY}),!1)}}function ay(e,t,n=!0){return n?{x:fu(t.x,e.x),y:fu(t.y,e.y),width:Ti(t.x-e.x),height:Ti(t.y-e.y)}:{x:e.x,y:e.y,width:t.x-e.x,height:t.y-e.y}}function vu(e,t,n=!0){let i=t.applyTo({x:e.minX,y:e.minY}),r=t.applyTo({x:e.maxX,y:e.maxY});return ay(i,r,n)}var Xv,Zv,Zt,du,hu,hr,Jv,Qv,gr,_n,go,bu,Eu,Iu,Pu,uo,ho,gu,g0,p0,pu,ry,Ps,Ti,fu,Cs=re(()=>{"use strict";Xv=Object.defineProperty,Zv=(e,t,n)=>t in e?Xv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zt=(e,t,n)=>Zv(e,typeof t!="symbol"?t+"":t,n),du=class Ae{constructor([t,n,i,r,s,a]=[0,0,0,0,0,0]){Zt(this,"m00"),Zt(this,"m01"),Zt(this,"m02"),Zt(this,"m10"),Zt(this,"m11"),Zt(this,"m12"),Zt(this,"rotate",(...o)=>this.prepend(Ae.rotate(...o))),Zt(this,"scale",(...o)=>this.prepend(Ae.scale(...o))),Zt(this,"translate",(...o)=>this.prepend(Ae.translate(...o))),this.m00=t,this.m01=n,this.m02=i,this.m10=r,this.m11=s,this.m12=a}applyTo(t){let{x:n,y:i}=t,{m00:r,m01:s,m02:a,m10:o,m11:l,m12:c}=this;return{x:r*n+s*i+a,y:o*n+l*i+c}}prepend(t){return new Ae([this.m00*t.m00+this.m01*t.m10,this.m00*t.m01+this.m01*t.m11,this.m00*t.m02+this.m01*t.m12+this.m02,this.m10*t.m00+this.m11*t.m10,this.m10*t.m01+this.m11*t.m11,this.m10*t.m02+this.m11*t.m12+this.m12])}append(t){return new Ae([t.m00*this.m00+t.m01*this.m10,t.m00*this.m01+t.m01*this.m11,t.m00*this.m02+t.m01*this.m12+t.m02,t.m10*this.m00+t.m11*this.m10,t.m10*this.m01+t.m11*this.m11,t.m10*this.m02+t.m11*this.m12+t.m12])}get determinant(){return this.m00*this.m11-this.m01*this.m10}get isInvertible(){let t=this.determinant;return isFinite(t)&&isFinite(this.m02)&&isFinite(this.m12)&&t!==0}invert(){let t=this.determinant;return new Ae([this.m11/t,-this.m01/t,(this.m01*this.m12-this.m11*this.m02)/t,-this.m10/t,this.m00/t,(this.m10*this.m02-this.m00*this.m12)/t])}get array(){return[this.m00,this.m01,this.m02,this.m10,this.m11,this.m12,0,0,1]}get float32Array(){return new Float32Array(this.array)}static get identity(){return new Ae([1,0,0,0,1,0])}static rotate(t,n){let i=new Ae([Math.cos(t),-Math.sin(t),0,Math.sin(t),Math.cos(t),0]);return n&&(n.x!==0||n.y!==0)?Ae.multiply(Ae.translate(n.x,n.y),i,Ae.translate(-n.x,-n.y)):i}static scale(t,n=t,i={x:0,y:0}){let r=new Ae([t,0,0,0,n,0]);return i.x!==0||i.y!==0?Ae.multiply(Ae.translate(i.x,i.y),r,Ae.translate(-i.x,-i.y)):r}static translate(t,n){return new Ae([1,0,t,0,1,n])}static multiply(...[t,...n]){return t?n.reduce((i,r)=>i.prepend(r),t):Ae.identity}get a(){return this.m00}get b(){return this.m10}get c(){return this.m01}get d(){return this.m11}get tx(){return this.m02}get ty(){return this.m12}get scaleComponents(){return{x:this.a,y:this.d}}get translationComponents(){return{x:this.tx,y:this.ty}}get skewComponents(){return{x:this.c,y:this.b}}toString(){return`matrix(${this.a}, ${this.b}, ${this.c}, ${this.d}, ${this.tx}, ${this.ty})`}};hu=(e,t,n)=>Math.min(Math.max(e,t),n),hr=(e,t,n)=>{let i=hu(e.x,n.x,n.x+n.width-t.width),r=hu(e.y,n.y,n.y+n.height-t.height);return{x:i,y:r}},Jv={width:0,height:0},Qv={width:1/0,height:1/0},gr=(e,t=Jv,n=Qv)=>({width:Math.min(Math.max(e.width,t.width),n.width),height:Math.min(Math.max(e.height,t.height),n.height)}),_n=(e,t)=>({x:e,y:t}),go=(e,t)=>t?_n(e.x-t.x,e.y-t.y):e,bu=(e,t)=>_n(e.x+t.x,e.y+t.y);Eu=(e,t)=>{let n=Math.max(t.x,Math.min(e.x,t.x+t.width-e.width)),i=Math.max(t.y,Math.min(e.y,t.y+t.height-e.height));return{x:n,y:i,width:Math.min(e.width,t.width),height:Math.min(e.height,t.height)}},Iu=(e,t)=>e.width===(t==null?void 0:t.width)&&e.height===(t==null?void 0:t.height),Pu=(e,t)=>e.x===(t==null?void 0:t.x)&&e.y===(t==null?void 0:t.y),uo=new WeakMap;ho=e=>parseFloat(e.replace("px","")),gu=(...e)=>e.reduce((t,n)=>t+(n?ho(n):0),0),{min:g0,max:p0}=Math;pu={n:{x:.5,y:0},ne:{x:1,y:0},e:{x:1,y:.5},se:{x:1,y:1},s:{x:.5,y:1},sw:{x:0,y:1},w:{x:0,y:.5},nw:{x:0,y:0}},ry={n:"s",ne:"sw",e:"w",se:"nw",s:"n",sw:"ne",w:"e",nw:"se"},{sign:Ps,abs:Ti,min:fu}=Math});var Nu={};he(Nu,{AngleSlider:()=>vy});function Au(e,t,n){let i=bn(e.getBoundingClientRect()),r=yu(i,t);return n!=null?r-n:r}function ku(e){return Math.min(Math.max(e,Ss),Ts)}function hy(e,t){let n=ku(e),i=Math.ceil(n/t),r=Math.round(n/t);return i>=n/t?i*t===Ts?Ss:i*t:r*t}function wu(e,t){return eu(e,Ss,Ts,t)}function gy(e,t){let{state:n,send:i,context:r,prop:s,computed:a,scope:o}=e,l=n.matches("dragging"),c=r.get("value"),u=a("valueAsDegree"),h=s("disabled"),m=s("invalid"),d=s("readOnly"),p=a("interactive"),v=s("aria-label"),I=s("aria-labelledby");return{value:c,valueAsDegree:u,dragging:l,setValue(T){i({type:"VALUE.SET",value:T})},getRootProps(){return t.element(y(g({},Gn.root.attrs),{id:ly(o),"data-disabled":E(h),"data-invalid":E(m),"data-readonly":E(d),style:{"--value":c,"--angle":u}}))},getLabelProps(){return t.label(y(g({},Gn.label.attrs),{id:Ou(o),htmlFor:mo(o),"data-disabled":E(h),"data-invalid":E(m),"data-readonly":E(d),onClick(T){var O;p&&(T.preventDefault(),(O=vo(o))==null||O.focus())}}))},getHiddenInputProps(){return t.element({type:"hidden",value:c,name:s("name"),id:mo(o)})},getControlProps(){return t.element(y(g({},Gn.control.attrs),{role:"presentation",id:xu(o),"data-disabled":E(h),"data-invalid":E(m),"data-readonly":E(d),onPointerDown(T){if(!p||!pe(T))return;let O=je(T),b=T.currentTarget,f=vo(o),S=Yt(T).composedPath(),P=f&&S.includes(f),V=null;P&&(V=Au(b,O)-c),i({type:"CONTROL.POINTER_DOWN",point:O,angularOffset:V}),T.stopPropagation()},style:{touchAction:"none",userSelect:"none",WebkitUserSelect:"none"}}))},getThumbProps(){return t.element(y(g({},Gn.thumb.attrs),{id:Vu(o),role:"slider","aria-label":v,"aria-labelledby":I!=null?I:Ou(o),"aria-valuemax":360,"aria-valuemin":0,"aria-valuenow":c,tabIndex:d||p?0:void 0,"data-disabled":E(h),"data-invalid":E(m),"data-readonly":E(d),onFocus(){i({type:"THUMB.FOCUS"})},onBlur(){i({type:"THUMB.BLUR"})},onKeyDown(T){if(!p)return;let O=gi(T)*s("step");switch(T.key){case"ArrowLeft":case"ArrowUp":T.preventDefault(),i({type:"THUMB.ARROW_DEC",step:O});break;case"ArrowRight":case"ArrowDown":T.preventDefault(),i({type:"THUMB.ARROW_INC",step:O});break;case"Home":T.preventDefault(),i({type:"THUMB.HOME"});break;case"End":T.preventDefault(),i({type:"THUMB.END"});break}},style:{rotate:"var(--angle)"}}))},getValueTextProps(){return t.element(y(g({},Gn.valueText.attrs),{id:cy(o)}))},getMarkerGroupProps(){return t.element(g({},Gn.markerGroup.attrs))},getMarkerProps(T){let O;return T.valuec?O="over-value":O="at-value",t.element(y(g({},Gn.marker.attrs),{"data-value":T.value,"data-state":O,"data-disabled":E(h),style:{"--marker-value":T.value,rotate:"calc(var(--marker-value) * 1deg)"}}))}}}var oy,Gn,ly,Vu,mo,xu,cy,Ou,uy,dy,vo,Ss,Ts,py,fy,y0,my,vy,Ru=re(()=>{"use strict";Cs();se();oy=U("angle-slider").parts("root","label","thumb","valueText","control","track","markerGroup","marker"),Gn=oy.build(),ly=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`angle-slider:${e.id}`},Vu=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.thumb)!=null?n:`angle-slider:${e.id}:thumb`},mo=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.hiddenInput)!=null?n:`angle-slider:${e.id}:input`},xu=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`angle-slider:${e.id}:control`},cy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.valueText)!=null?n:`angle-slider:${e.id}:value-text`},Ou=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`angle-slider:${e.id}:label`},uy=e=>e.getById(mo(e)),dy=e=>e.getById(xu(e)),vo=e=>e.getById(Vu(e)),Ss=0,Ts=359;py={props({props:e}){return g({step:1,defaultValue:0},e)},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var i;(i=e("onValueChange"))==null||i({value:n,valueAsDegree:`${n}deg`})}}))}},refs(){return{thumbDragOffset:null}},computed:{interactive:({prop:e})=>!(e("disabled")||e("readOnly")),valueAsDegree:({context:e})=>`${e.get("value")}deg`},watch({track:e,context:t,action:n}){e([()=>t.get("value")],()=>{n(["syncInputElement"])})},initialState(){return"idle"},on:{"VALUE.SET":{actions:["setValue"]}},states:{idle:{on:{"CONTROL.POINTER_DOWN":{target:"dragging",actions:["setThumbDragOffset","setPointerValue","focusThumb"]},"THUMB.FOCUS":{target:"focused"}}},focused:{on:{"CONTROL.POINTER_DOWN":{target:"dragging",actions:["setThumbDragOffset","setPointerValue","focusThumb"]},"THUMB.ARROW_DEC":{actions:["decrementValue","invokeOnChangeEnd"]},"THUMB.ARROW_INC":{actions:["incrementValue","invokeOnChangeEnd"]},"THUMB.HOME":{actions:["setValueToMin","invokeOnChangeEnd"]},"THUMB.END":{actions:["setValueToMax","invokeOnChangeEnd"]},"THUMB.BLUR":{target:"idle"}}},dragging:{entry:["focusThumb"],effects:["trackPointerMove"],on:{"DOC.POINTER_UP":{target:"focused",actions:["invokeOnChangeEnd","clearThumbDragOffset"]},"DOC.POINTER_MOVE":{actions:["setPointerValue"]}}}},implementations:{effects:{trackPointerMove({scope:e,send:t}){return hn(e.getDoc(),{onPointerMove(n){t({type:"DOC.POINTER_MOVE",point:n.point})},onPointerUp(){t({type:"DOC.POINTER_UP"})}})}},actions:{syncInputElement({scope:e,context:t}){let n=uy(e);Me(n,t.get("value").toString())},invokeOnChangeEnd({context:e,prop:t,computed:n}){var i;(i=t("onValueChangeEnd"))==null||i({value:e.get("value"),valueAsDegree:n("valueAsDegree")})},setPointerValue({scope:e,event:t,context:n,prop:i,refs:r}){let s=dy(e);if(!s)return;let a=r.get("thumbDragOffset"),o=Au(s,t.point,a);n.set("value",hy(o,i("step")))},setValueToMin({context:e}){e.set("value",Ss)},setValueToMax({context:e}){e.set("value",Ts)},setValue({context:e,event:t}){e.set("value",ku(t.value))},decrementValue({context:e,event:t,prop:n}){var r;let i=wu(e.get("value")-t.step,(r=t.step)!=null?r:n("step"));e.set("value",i)},incrementValue({context:e,event:t,prop:n}){var r;let i=wu(e.get("value")+t.step,(r=t.step)!=null?r:n("step"));e.set("value",i)},focusThumb({scope:e}){H(()=>{var t;(t=vo(e))==null||t.focus({preventScroll:!0})})},setThumbDragOffset({refs:e,event:t}){var n;e.set("thumbDragOffset",(n=t.angularOffset)!=null?n:null)},clearThumbDragOffset({refs:e}){e.set("thumbDragOffset",null)}}}},fy=_()(["aria-label","aria-labelledby","dir","disabled","getRootNode","id","ids","invalid","name","onValueChange","onValueChangeEnd","readOnly","step","value","defaultValue"]),y0=B(fy),my=class extends K{initMachine(e){return new W(py,e)}initApi(){return gy(this.machine.service,q)}render(){var o;let e=(o=this.el.querySelector('[data-scope="angle-slider"][data-part="root"]'))!=null?o:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="angle-slider"][data-part="label"]');t&&this.spreadProps(t,this.api.getLabelProps());let n=this.el.querySelector('[data-scope="angle-slider"][data-part="hidden-input"]');n&&this.spreadProps(n,this.api.getHiddenInputProps());let i=this.el.querySelector('[data-scope="angle-slider"][data-part="control"]');i&&this.spreadProps(i,this.api.getControlProps());let r=this.el.querySelector('[data-scope="angle-slider"][data-part="thumb"]');r&&this.spreadProps(r,this.api.getThumbProps());let s=this.el.querySelector('[data-scope="angle-slider"][data-part="value-text"]');if(s){this.spreadProps(s,this.api.getValueTextProps());let l=s.querySelector('[data-scope="angle-slider"][data-part="value"]');l&&l.textContent!==String(this.api.value)&&(l.textContent=String(this.api.value))}let a=this.el.querySelector('[data-scope="angle-slider"][data-part="marker-group"]');a&&this.spreadProps(a,this.api.getMarkerGroupProps()),this.el.querySelectorAll('[data-scope="angle-slider"][data-part="marker"]').forEach(l=>{let c=l.dataset.value;if(c==null)return;let u=Number(c);Number.isNaN(u)||this.spreadProps(l,this.api.getMarkerProps({value:u}))})}},vy={mounted(){var a;let e=this.el,t=Y(e,"value"),n=Y(e,"defaultValue"),i=C(e,"controlled"),r=!1,s=new my(e,y(g({id:e.id},i&&t!==void 0?{value:t}:{defaultValue:n!=null?n:0}),{step:(a=Y(e,"step"))!=null?a:1,disabled:C(e,"disabled"),readOnly:C(e,"readOnly"),invalid:C(e,"invalid"),name:w(e,"name"),dir:w(e,"dir",["ltr","rtl"]),onValueChange:o=>{if(r){r=!1;return}if(i)r=!0,s.api.setValue(o.value);else{let u=e.querySelector('[data-scope="angle-slider"][data-part="hidden-input"]');u&&(u.value=String(o.value),u.dispatchEvent(new Event("input",{bubbles:!0})),u.dispatchEvent(new Event("change",{bubbles:!0})))}let l=w(e,"onValueChange");l&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(l,{value:o.value,valueAsDegree:o.valueAsDegree,id:e.id});let c=w(e,"onValueChangeClient");c&&e.dispatchEvent(new CustomEvent(c,{bubbles:!0,detail:{value:o,id:e.id}}))},onValueChangeEnd:o=>{if(i){let u=e.querySelector('[data-scope="angle-slider"][data-part="hidden-input"]');u&&(u.value=String(o.value),u.dispatchEvent(new Event("input",{bubbles:!0})),u.dispatchEvent(new Event("change",{bubbles:!0})))}let l=w(e,"onValueChangeEnd");l&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(l,{value:o.value,valueAsDegree:o.valueAsDegree,id:e.id});let c=w(e,"onValueChangeEndClient");c&&e.dispatchEvent(new CustomEvent(c,{bubbles:!0,detail:{value:o,id:e.id}}))}}));s.init(),this.angleSlider=s,this.handlers=[],this.onSetValue=o=>{let{value:l}=o.detail;s.api.setValue(l)},e.addEventListener("phx:angle-slider:set-value",this.onSetValue),this.handlers.push(this.handleEvent("angle_slider_set_value",o=>{let l=o.angle_slider_id;l&&!(e.id===l||e.id===`angle-slider:${l}`)||s.api.setValue(o.value)})),this.handlers.push(this.handleEvent("angle_slider_value",()=>{this.pushEvent("angle_slider_value_response",{value:s.api.value,valueAsDegree:s.api.valueAsDegree,dragging:s.api.dragging})}))},updated(){var n,i;let e=Y(this.el,"value"),t=C(this.el,"controlled");(i=this.angleSlider)==null||i.updateProps(y(g({id:this.el.id},t&&e!==void 0?{value:e}:{}),{step:(n=Y(this.el,"step"))!=null?n:1,disabled:C(this.el,"disabled"),readOnly:C(this.el,"readOnly"),invalid:C(this.el,"invalid"),name:w(this.el,"name")}))},destroyed(){var e;if(this.onSetValue&&this.el.removeEventListener("phx:angle-slider:set-value",this.onSetValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.angleSlider)==null||e.destroy()}}});var Mu={};he(Mu,{Avatar:()=>Oy});function Iy(e,t){let{state:n,send:i,prop:r,scope:s}=e,a=n.matches("loaded");return{loaded:a,setSrc(o){let l=bo(s);l==null||l.setAttribute("src",o)},setLoaded(){i({type:"img.loaded",src:"api"})},setError(){i({type:"img.error",src:"api"})},getRootProps(){return t.element(y(g({},yo.root.attrs),{dir:r("dir"),id:Du(s)}))},getImageProps(){return t.img(y(g({},yo.image.attrs),{hidden:!a,dir:r("dir"),id:Lu(s),"data-state":a?"visible":"hidden",onLoad(){i({type:"img.loaded",src:"element"})},onError(){i({type:"img.error",src:"element"})}}))},getFallbackProps(){return t.element(y(g({},yo.fallback.attrs),{dir:r("dir"),id:by(s),hidden:a,"data-state":a?"hidden":"visible"}))}}}function Cy(e){return e.complete&&e.naturalWidth!==0&&e.naturalHeight!==0}var yy,yo,Du,Lu,by,Ey,bo,Py,Sy,P0,Ty,Oy,Fu=re(()=>{"use strict";se();yy=U("avatar").parts("root","image","fallback"),yo=yy.build(),Du=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`avatar:${e.id}`},Lu=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.image)!=null?n:`avatar:${e.id}:image`},by=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.fallback)!=null?n:`avatar:${e.id}:fallback`},Ey=e=>e.getById(Du(e)),bo=e=>e.getById(Lu(e));Py={initialState(){return"loading"},effects:["trackImageRemoval","trackSrcChange"],on:{"src.change":{target:"loading"},"img.unmount":{target:"error"}},states:{loading:{entry:["checkImageStatus"],on:{"img.loaded":{target:"loaded",actions:["invokeOnLoad"]},"img.error":{target:"error",actions:["invokeOnError"]}}},error:{on:{"img.loaded":{target:"loaded",actions:["invokeOnLoad"]}}},loaded:{on:{"img.error":{target:"error",actions:["invokeOnError"]}}}},implementations:{actions:{invokeOnLoad({prop:e}){var t;(t=e("onStatusChange"))==null||t({status:"loaded"})},invokeOnError({prop:e}){var t;(t=e("onStatusChange"))==null||t({status:"error"})},checkImageStatus({send:e,scope:t}){let n=bo(t);if(!(n!=null&&n.complete))return;let i=Cy(n)?"img.loaded":"img.error";e({type:i,src:"ssr"})}},effects:{trackImageRemoval({send:e,scope:t}){let n=Ey(t);return hs(n,{callback(i){Array.from(i[0].removedNodes).find(a=>a.nodeType===Node.ELEMENT_NODE&&a.matches("[data-scope=avatar][data-part=image]"))&&e({type:"img.unmount"})}})},trackSrcChange({send:e,scope:t}){let n=bo(t);return ot(n,{attributes:["src","srcset"],callback(){e({type:"src.change"})}})}}}};Sy=_()(["dir","id","ids","onStatusChange","getRootNode"]),P0=B(Sy),Ty=class extends K{initMachine(e){return new W(Py,e)}initApi(){return Iy(this.machine.service,q)}render(){var r;let e=(r=this.el.querySelector('[data-scope="avatar"][data-part="root"]'))!=null?r:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="avatar"][data-part="image"]');t&&this.spreadProps(t,this.api.getImageProps());let n=this.el.querySelector('[data-scope="avatar"][data-part="fallback"]');n&&this.spreadProps(n,this.api.getFallbackProps());let i=this.el.querySelector('[data-scope="avatar"][data-part="skeleton"]');if(i){let s=this.machine.service.state,a=s.matches("loaded"),o=s.matches("error");i.hidden=a||o,i.setAttribute("data-state",a||o?"hidden":"visible")}}},Oy={mounted(){let e=this.el,t=w(e,"src"),n=new Ty(e,g({id:e.id,onStatusChange:i=>{let r=w(e,"onStatusChange");r&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(r,{status:i.status,id:e.id});let s=w(e,"onStatusChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{value:i,id:e.id}}))}},t!==void 0?{}:{}));n.init(),this.avatar=n,t!==void 0&&n.api.setSrc(t),this.handlers=[]},updated(){let e=w(this.el,"src");e!==void 0&&this.avatar&&this.avatar.api.setSrc(e)},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.avatar)==null||e.destroy()}}});var qu={};he(qu,{Carousel:()=>qy});function Bu(e){let t=at(e),n=e.getBoundingClientRect(),i=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),r=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),s=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function o(m,d){let p=parseFloat(m);return/%/.test(m)&&(p/=100,p*=d),Number.isNaN(p)?0:p}let l=o(i,n.width),c=o(r,n.height),u=o(s,n.width),h=o(a,n.height);return{x:{before:l,after:u},y:{before:c,after:h}}}function wy(e,t,n="both"){return n==="x"&&e.right>=t.left&&e.left<=t.right||n==="y"&&e.bottom>=t.top&&e.top<=t.bottom||n==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function _u(e){let t=[];for(let n of e.children)t=t.concat(n,_u(n));return t}function Gu(e,t=!1){let n=e.getBoundingClientRect(),r=Po(e)==="rtl",s={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},a=t?_u(e):e.children;for(let o of["x","y"]){let l=o==="x"?"y":"x",c=o==="x"?"left":"top",u=o==="x"?"right":"bottom",h=o==="x"?"width":"height",m=o==="x"?"scrollLeft":"scrollTop",d=r&&o==="x";for(let p of a){let v=p.getBoundingClientRect();if(!wy(n,v,l))continue;let I=at(p),[T,O]=I.getPropertyValue("scroll-snap-align").split(" ");typeof O=="undefined"&&(O=T);let b=o==="x"?O:T,f,S,P;if(d){let V=Math.abs(e[m]),A=n[u]-v[u]+V;f=A,S=A+v[h],P=A+v[h]/2}else f=v[c]-n[c]+e[m],S=f+v[h],P=f+v[h]/2;switch(b){case"none":break;case"start":s[o].start.push({node:p,position:f});break;case"center":s[o].center.push({node:p,position:P});break;case"end":s[o].end.push({node:p,position:S});break}}}return s}function Vy(e){let t=Po(e),n=e.getBoundingClientRect(),i=Bu(e),r=Gu(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight},a=t==="rtl",o=a&&e.scrollLeft<=0,l;return a?(l=Eo([...r.x.start.map(c=>c.position-i.x.after),...r.x.center.map(c=>c.position-n.width/2),...r.x.end.map(c=>c.position-n.width+i.x.before)].map(Io(0,s.x))),o&&(l=l.map(c=>-c))):l=Eo([...r.x.start.map(c=>c.position-i.x.before),...r.x.center.map(c=>c.position-n.width/2),...r.x.end.map(c=>c.position-n.width+i.x.after)].map(Io(0,s.x))),{x:l,y:Eo([...r.y.start.map(c=>c.position-i.y.before),...r.y.center.map(c=>c.position-n.height/2),...r.y.end.map(c=>c.position-n.height+i.y.after)].map(Io(0,s.y)))}}function xy(e,t,n){let i=Po(e),r=Bu(e),s=Gu(e),a=[...s[t].start,...s[t].center,...s[t].end],o=i==="rtl",l=o&&t==="x"&&e.scrollLeft<=0;for(let c of a)if(n(c.node)){let u;return t==="x"&&o?(u=c.position-r.x.after,l&&(u=-u)):u=c.position-(t==="x"?r.x.before:r.y.before),u}}function Fy(e,t){let{state:n,context:i,computed:r,send:s,scope:a,prop:o}=e,l=n.matches("autoplay"),c=n.matches("dragging"),u=r("canScrollNext"),h=r("canScrollPrev"),m=r("isHorizontal"),d=o("autoSize"),p=Array.from(i.get("pageSnapPoints")),v=i.get("page"),I=o("slidesPerPage"),T=o("padding"),O=o("translations");return{isPlaying:l,isDragging:c,page:v,pageSnapPoints:p,canScrollNext:u,canScrollPrev:h,getProgress(){return v/p.length},getProgressText(){var f,S;let b={page:v+1,totalPages:p.length};return(S=(f=O.progressText)==null?void 0:f.call(O,b))!=null?S:""},scrollToIndex(b,f){s({type:"INDEX.SET",index:b,instant:f})},scrollTo(b,f){s({type:"PAGE.SET",index:b,instant:f})},scrollNext(b){s({type:"PAGE.NEXT",instant:b})},scrollPrev(b){s({type:"PAGE.PREV",instant:b})},play(){s({type:"AUTOPLAY.START"})},pause(){s({type:"AUTOPLAY.PAUSE"})},isInView(b){return Array.from(i.get("slidesInView")).includes(b)},refresh(){s({type:"SNAP.REFRESH"})},getRootProps(){return t.element(y(g({},kt.root.attrs),{id:ky(a),role:"region","aria-roledescription":"carousel","data-orientation":o("orientation"),dir:o("dir"),style:{"--slides-per-page":I,"--slide-spacing":o("spacing"),"--slide-item-size":d?"auto":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(y(g({},kt.itemGroup.attrs),{id:Os(a),"data-orientation":o("orientation"),"data-dragging":E(c),dir:o("dir"),"aria-live":l?"off":"polite",onFocus(b){ce(b.currentTarget,j(b))&&s({type:"VIEWPORT.FOCUS"})},onBlur(b){ce(b.currentTarget,b.relatedTarget)||s({type:"VIEWPORT.BLUR"})},onMouseDown(b){if(b.defaultPrevented||!o("allowMouseDrag")||!pe(b))return;let f=j(b);Ye(f)&&f!==b.currentTarget||(b.preventDefault(),s({type:"DRAGGING.START"}))},onWheel:Yc(b=>{let f=o("orientation")==="horizontal"?"deltaX":"deltaY";b[f]<0&&!r("canScrollPrev")||b[f]>0&&!r("canScrollNext")||s({type:"USER.SCROLL"})},150),onTouchStart(){s({type:"USER.SCROLL"})},style:{display:d?"flex":"grid",gap:"var(--slide-spacing)",scrollSnapType:[m?"x":"y",o("snapType")].join(" "),gridAutoFlow:m?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[m?"gridAutoColumns":"gridAutoRows"]:d?void 0:"var(--slide-item-size)",[m?"scrollPaddingInline":"scrollPaddingBlock"]:T,[m?"paddingInline":"paddingBlock"]:T,[m?"overflowX":"overflowY"]:"auto"}}))},getItemProps(b){let f=i.get("slidesInView").includes(b.index);return t.element(y(g({},kt.item.attrs),{id:Ny(a,b.index),dir:o("dir"),role:"group","data-index":b.index,"data-inview":E(f),"aria-roledescription":"slide","data-orientation":o("orientation"),"aria-label":O.item(b.index,o("slideCount")),"aria-hidden":X(!f),style:{flex:"0 0 auto",[m?"maxWidth":"maxHeight"]:"100%",scrollSnapAlign:(()=>{var x;let S=(x=b.snapAlign)!=null?x:"start",P=o("slidesPerMove"),V=P==="auto"?Math.floor(o("slidesPerPage")):P;return(b.index+V)%V===0?S:void 0})()}}))},getControlProps(){return t.element(y(g({},kt.control.attrs),{"data-orientation":o("orientation")}))},getPrevTriggerProps(){return t.button(y(g({},kt.prevTrigger.attrs),{id:Dy(a),type:"button",disabled:!h,dir:o("dir"),"aria-label":O.prevTrigger,"data-orientation":o("orientation"),"aria-controls":Os(a),onClick(b){b.defaultPrevented||s({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(y(g({},kt.nextTrigger.attrs),{dir:o("dir"),id:Ry(a),type:"button","aria-label":O.nextTrigger,"data-orientation":o("orientation"),"aria-controls":Os(a),disabled:!u,onClick(b){b.defaultPrevented||s({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(y(g({},kt.indicatorGroup.attrs),{dir:o("dir"),id:Ly(a),"data-orientation":o("orientation"),onKeyDown(b){if(b.defaultPrevented)return;let f="indicator",S={ArrowDown(A){m||(s({type:"PAGE.NEXT",src:f}),A.preventDefault())},ArrowUp(A){m||(s({type:"PAGE.PREV",src:f}),A.preventDefault())},ArrowRight(A){m&&(s({type:"PAGE.NEXT",src:f}),A.preventDefault())},ArrowLeft(A){m&&(s({type:"PAGE.PREV",src:f}),A.preventDefault())},Home(A){s({type:"PAGE.SET",index:0,src:f}),A.preventDefault()},End(A){s({type:"PAGE.SET",index:p.length-1,src:f}),A.preventDefault()}},P=ge(b,{dir:o("dir"),orientation:o("orientation")}),V=S[P];V==null||V(b)}}))},getIndicatorProps(b){return t.button(y(g({},kt.indicator.attrs),{dir:o("dir"),id:Uu(a,b.index),type:"button","data-orientation":o("orientation"),"data-index":b.index,"data-readonly":E(b.readOnly),"data-current":E(b.index===v),"aria-label":O.indicator(b.index),onClick(f){f.defaultPrevented||b.readOnly||s({type:"PAGE.SET",index:b.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(y(g({},kt.autoplayTrigger.attrs),{type:"button","data-orientation":o("orientation"),"data-pressed":E(l),"aria-label":l?O.autoplayStop:O.autoplayStart,onClick(b){b.defaultPrevented||s({type:l?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))},getProgressTextProps(){return t.element(g({},kt.progressText.attrs))}}}function Hy(e,t,n){if(e==null||n<=0)return[];let i=[],r=t==="auto"?Math.floor(n):t;if(r<=0)return[];for(let s=0;se);s+=r)i.push(s);return i}var Po,Eo,Io,Ay,kt,ky,Ny,Os,Ry,Dy,Ly,Uu,qe,$u,My,Hu,$y,By,O0,_y,w0,Gy,V0,Uy,qy,Wu=re(()=>{"use strict";se();Po=e=>at(e).direction;Eo=e=>[...new Set(e)],Io=(e,t)=>n=>Math.max(e,Math.min(t,n)),Ay=U("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger","progressText"),kt=Ay.build(),ky=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},Ny=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`carousel:${e.id}:item:${t}`},Os=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},Ry=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},Dy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},Ly=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},Uu=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.indicator)==null?void 0:i.call(n,t))!=null?r:`carousel:${e.id}:indicator:${t}`},qe=e=>e.getById(Os(e)),$u=e=>Fe(qe(e),"[data-part=item]"),My=(e,t)=>e.getById(Uu(e,t)),Hu=e=>{let t=qe(e);if(!t)return;let n=jt(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};$y={props({props:e}){return yn(e,["slideCount"],"carousel"),y(g({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6,autoSize:!1},e),{translations:g({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation",progressText:({page:t,totalPages:n})=>`${t} / ${n}`},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(i){var a;let s=n().get("pageSnapPoints");(a=e("onPageChange"))==null||a({page:i,pageSnapPoint:s[i]})}})),pageSnapPoints:t(()=>({defaultValue:e("autoSize")?Array.from({length:e("slideCount")},(i,r)=>r):Hy(e("slideCount"),e("slidesPerMove"),e("slidesPerPage"))})),slidesInView:t(()=>({defaultValue:[]}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isHorizontal:({prop:e})=>e("orientation")==="horizontal",canScrollNext:({prop:e,context:t})=>e("loop")||t.get("page")e("loop")||t.get("page")>0,autoplayInterval:({prop:e})=>{let t=e("autoplay");return xt(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:i,send:r}){e([()=>i("slidesPerPage"),()=>i("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>i("orientation"),()=>i("autoSize"),()=>i("dir")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>i("slideCount")],()=>{r({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!i("autoplay")],()=>{r({type:i("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(qe(e))},effects:{autoUpdateSlide({computed:e,send:t}){let n=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(n)},trackSlideMutation({scope:e,send:t}){let n=qe(e);if(!n)return;let i=e.getWin(),r=new i.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),Hu(e)});return Hu(e),r.observe(n,{childList:!0,subtree:!0}),()=>r.disconnect()},trackSlideResize({scope:e,send:t}){if(!qe(e))return;let i=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};H(()=>{i(),H(()=>{t({type:"PAGE.SCROLL",instant:!0})})});let r=$u(e);r.forEach(i);let s=r.map(a=>gn.observe(a,i));return At(...s)},trackSlideIntersections({scope:e,prop:t,context:n}){let i=qe(e),r=e.getWin(),s=new r.IntersectionObserver(a=>{let o=a.reduce((l,c)=>{var m;let u=c.target,h=Number((m=u.dataset.index)!=null?m:"-1");return h==null||Number.isNaN(h)||h===-1?l:c.isIntersecting?Ze(l,h):ct(l,h)},n.get("slidesInView"));n.set("slidesInView",vt(o))},{root:i,threshold:t("inViewThreshold")});return $u(e).forEach(a=>s.observe(a)),()=>s.disconnect()},trackScroll({send:e,refs:t,scope:n}){let i=qe(n);return i?ee(i,"scroll",()=>{clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0),t.set("timeoutRef",setTimeout(()=>{e({type:"SCROLL.END"})},150))},{passive:!0}):void 0},trackDocumentVisibility({scope:e,send:t}){let n=e.getDoc();return ee(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){let n=e.getDoc();return hn(n,{onPointerMove({event:i}){t({type:"DRAGGING",left:-i.movementX,top:-i.movementY})},onPointerUp(){t({type:"DRAGGING.END"})}})},trackKeyboardScroll({scope:e,send:t,context:n}){let i=e.getWin();return ee(i,"keydown",s=>{switch(s.key){case"ArrowRight":s.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":s.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":s.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":s.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:i,flush:r}){var c;let s=t.instant?"instant":"smooth",a=He((c=t.index)!=null?c:e.get("page"),0,e.get("pageSnapPoints").length-1),o=qe(n);if(!o)return;let l=i("isHorizontal")?"left":"top";r(()=>{o.scrollTo({[l]:e.get("pageSnapPoints")[a],behavior:s})})},setClosestPage({context:e,scope:t,computed:n}){let i=qe(t);if(!i)return;let r=n("isHorizontal")?i.scrollLeft:i.scrollTop,s=e.get("pageSnapPoints").findIndex(a=>Math.abs(a-r)<1);s!==-1&&e.set("page",s)},setNextPage({context:e,prop:t,state:n}){let i=n.matches("autoplay")||t("loop"),r=Ei(e.get("pageSnapPoints"),e.get("page"),{loop:i});e.set("page",r)},setPrevPage({context:e,prop:t,state:n}){let i=n.matches("autoplay")||t("loop"),r=lr(e.get("pageSnapPoints"),e.get("page"),{loop:i});e.set("page",r)},setMatchingPage({context:e,event:t,computed:n,scope:i}){let r=qe(i);if(!r)return;let s=xy(r,n("isHorizontal")?"x":"y",o=>o.dataset.index===t.index.toString());if(s==null)return;let a=e.get("pageSnapPoints").findIndex(o=>Math.abs(o-s)<1);e.set("page",a)},setPage({context:e,event:t}){var i;let n=(i=t.index)!=null?i:e.get("page");e.set("page",n)},clampPage({context:e}){let t=He(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){let i=qe(n);if(!i)return;let r=Vy(i);e.set("pageSnapPoints",t("isHorizontal")?r.x:r.y)},disableScrollSnap({scope:e}){let t=qe(e);if(!t)return;let n=getComputedStyle(t);t.dataset.scrollSnapType=n.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){let n=qe(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){let i=qe(e);if(!i)return;let r=n("isHorizontal"),s=r?i.scrollLeft:i.scrollTop,a=t.get("pageSnapPoints"),o=a.reduce((l,c)=>Math.abs(c-s){i.scrollTo({left:r?o:i.scrollLeft,top:r?i.scrollTop:o,behavior:"smooth"}),t.set("page",a.indexOf(o));let l=i.dataset.scrollSnapType;l&&(i.style.setProperty("scroll-snap-type",l),delete i.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;let i=My(n,e.get("page"));i&&H(()=>i.focus({preventScroll:!0}))},invokeDragStart({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.start",isDragging:!0,page:e.get("page")})},invokeDragging({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging",isDragging:!0,page:e.get("page")})},invokeDraggingEnd({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.end",isDragging:!1,page:e.get("page")})},invokeAutoplay({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay",isPlaying:!0,page:e.get("page")})},invokeAutoplayStart({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.start",isPlaying:!0,page:e.get("page")})},invokeAutoplayEnd({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.stop",isPlaying:!1,page:e.get("page")})}}}};By=_()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","autoSize","onDragStatusChange","onAutoplayStatusChange"]),O0=B(By),_y=_()(["index","readOnly"]),w0=B(_y),Gy=_()(["index","snapAlign"]),V0=B(Gy),Uy=class extends K{initMachine(e){return new W($y,e)}initApi(){return Fy(this.machine.service,q)}render(){var u;let e=(u=this.el.querySelector('[data-scope="carousel"][data-part="root"]'))!=null?u:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="carousel"][data-part="control"]');t&&this.spreadProps(t,this.api.getControlProps());let n=this.el.querySelector('[data-scope="carousel"][data-part="item-group"]');n&&this.spreadProps(n,this.api.getItemGroupProps());let i=Number(this.el.dataset.slideCount)||0;for(let h=0;h{let h=w(e,"onPageChange");h&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(h,{page:u.page,pageSnapPoint:u.pageSnapPoint,id:e.id});let m=w(e,"onPageChangeClient");m&&e.dispatchEvent(new CustomEvent(m,{bubbles:!0,detail:{value:u,id:e.id}}))}}));s.init(),this.carousel=s,this.handlers=[]},updated(){var i,r;let e=Y(this.el,"slideCount");if(e==null||e<1)return;let t=Y(this.el,"page"),n=C(this.el,"controlled");(r=this.carousel)==null||r.updateProps(y(g({id:this.el.id,slideCount:e},n&&t!==void 0?{page:t}:{}),{dir:Oe(this.el),orientation:w(this.el,"orientation",["horizontal","vertical"]),slidesPerPage:(i=Y(this.el,"slidesPerPage"))!=null?i:1,loop:C(this.el,"loop"),allowMouseDrag:C(this.el,"allowMouseDrag")}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.carousel)==null||e.destroy()}}});function Wy(e){return!(e.metaKey||!di()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function zy(e,t,n){let i=n?j(n):null,r=ue(i);return e=e||i instanceof r.HTMLInputElement&&!Ky.has(i==null?void 0:i.type)||i instanceof r.HTMLTextAreaElement||i instanceof r.HTMLElement&&i.isContentEditable,!(e&&t==="keyboard"&&n instanceof r.KeyboardEvent&&!Reflect.has(Yy,n.key))}function xs(e,t){for(let n of Co)n(e,t)}function Vs(e){Un=!0,Wy(e)&&(In="keyboard",xs("keyboard",e))}function dt(e){In="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Un=!0,xs("pointer",e))}function Ku(e){Vc(e)&&(Un=!0,In="virtual")}function zu(e){let t=j(e);t===ue(t)||t===Le(t)||(!Un&&!So&&(In="virtual",xs("virtual",e)),Un=!1,So=!1)}function Yu(){Un=!1,So=!0}function jy(e){if(typeof window=="undefined"||ws.get(ue(e)))return;let t=ue(e),n=Le(e),i=t.HTMLElement.prototype.focus;function r(){In="virtual",xs("virtual",null),Un=!0,i.apply(this,arguments)}try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:r})}catch(s){}n.addEventListener("keydown",Vs,!0),n.addEventListener("keyup",Vs,!0),n.addEventListener("click",Ku,!0),t.addEventListener("focus",zu,!0),t.addEventListener("blur",Yu,!1),typeof t.PointerEvent!="undefined"?(n.addEventListener("pointerdown",dt,!0),n.addEventListener("pointermove",dt,!0),n.addEventListener("pointerup",dt,!0)):(n.addEventListener("mousedown",dt,!0),n.addEventListener("mousemove",dt,!0),n.addEventListener("mouseup",dt,!0)),t.addEventListener("beforeunload",()=>{Xy(e)},{once:!0}),ws.set(t,{focus:i})}function ju(){return In}function En(){return In==="keyboard"}function Pn(e={}){let{isTextInput:t,autoFocus:n,onChange:i,root:r}=e;jy(r),i==null||i({isFocusVisible:n||En(),modality:In});let s=(a,o)=>{zy(!!t,a,o)&&(i==null||i({isFocusVisible:En(),modality:a}))};return Co.add(s),()=>{Co.delete(s)}}var Ky,In,Co,ws,Un,So,Yy,Xy,pr=re(()=>{"use strict";se();Ky=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);In=null,Co=new Set,ws=new Map,Un=!1,So=!1,Yy={Tab:!0,Escape:!0};Xy=(e,t)=>{let n=ue(e),i=Le(e),r=ws.get(n);if(r){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:r.focus})}catch(s){}i.removeEventListener("keydown",Vs,!0),i.removeEventListener("keyup",Vs,!0),i.removeEventListener("click",Ku,!0),n.removeEventListener("focus",zu,!0),n.removeEventListener("blur",Yu,!1),typeof n.PointerEvent!="undefined"?(i.removeEventListener("pointerdown",dt,!0),i.removeEventListener("pointermove",dt,!0),i.removeEventListener("pointerup",dt,!0)):(i.removeEventListener("mousedown",dt,!0),i.removeEventListener("mousemove",dt,!0),i.removeEventListener("mouseup",dt,!0)),ws.delete(n)}}});var Qu={};he(Qu,{Checkbox:()=>sb});function eb(e,t){let{send:n,context:i,prop:r,computed:s,scope:a}=e,o=!!r("disabled"),l=!!r("readOnly"),c=!!r("required"),u=!!r("invalid"),h=!o&&i.get("focused"),m=!o&&i.get("focusVisible"),d=s("checked"),p=s("indeterminate"),v=i.get("checked"),I={"data-active":E(i.get("active")),"data-focus":E(h),"data-focus-visible":E(m),"data-readonly":E(l),"data-hover":E(i.get("hovered")),"data-disabled":E(o),"data-state":p?"indeterminate":d?"checked":"unchecked","data-invalid":E(u),"data-required":E(c)};return{checked:d,disabled:o,indeterminate:p,focused:h,checkedState:v,setChecked(T){n({type:"CHECKED.SET",checked:T,isTrusted:!1})},toggleChecked(){n({type:"CHECKED.TOGGLE",checked:d,isTrusted:!1})},getRootProps(){return t.label(y(g(g({},As.root.attrs),I),{dir:r("dir"),id:Ju(a),htmlFor:To(a),onPointerMove(){o||n({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){o||n({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(T){j(T)===fr(a)&&T.stopPropagation()}}))},getLabelProps(){return t.element(y(g(g({},As.label.attrs),I),{dir:r("dir"),id:Xu(a)}))},getControlProps(){return t.element(y(g(g({},As.control.attrs),I),{dir:r("dir"),id:Jy(a),"aria-hidden":!0}))},getIndicatorProps(){return t.element(y(g(g({},As.indicator.attrs),I),{dir:r("dir"),hidden:!p&&!d}))},getHiddenInputProps(){return t.input({id:To(a),type:"checkbox",required:r("required"),defaultChecked:d,disabled:o,"aria-labelledby":Xu(a),"aria-invalid":u,name:r("name"),form:r("form"),value:r("value"),style:Vt,onFocus(){let T=En();n({type:"CONTEXT.SET",context:{focused:!0,focusVisible:T}})},onBlur(){n({type:"CONTEXT.SET",context:{focused:!1,focusVisible:!1}})},onClick(T){if(l){T.preventDefault();return}let O=T.currentTarget.checked;n({type:"CHECKED.SET",checked:O,isTrusted:!0})}})}}}function ks(e){return e==="indeterminate"}function nb(e){return ks(e)?!1:!!e}var Zy,As,Ju,Xu,Jy,To,Qy,fr,Zu,tb,ib,L0,rb,sb,ed=re(()=>{"use strict";pr();se();Zy=U("checkbox").parts("root","label","control","indicator"),As=Zy.build(),Ju=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`checkbox:${e.id}`},Xu=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`checkbox:${e.id}:label`},Jy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`checkbox:${e.id}:control`},To=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.hiddenInput)!=null?n:`checkbox:${e.id}:input`},Qy=e=>e.getById(Ju(e)),fr=e=>e.getById(To(e));({not:Zu}=Ee()),tb={props({props:e}){var t;return y(g({value:"on"},e),{defaultChecked:(t=e.defaultChecked)!=null?t:!1})},initialState(){return"ready"},context({prop:e,bindable:t}){return{checked:t(()=>({defaultValue:e("defaultChecked"),value:e("checked"),onChange(n){var i;(i=e("onCheckedChange"))==null||i({checked:n})}})),fieldsetDisabled:t(()=>({defaultValue:!1})),focusVisible:t(()=>({defaultValue:!1})),active:t(()=>({defaultValue:!1})),focused:t(()=>({defaultValue:!1})),hovered:t(()=>({defaultValue:!1}))}},watch({track:e,context:t,prop:n,action:i}){e([()=>n("disabled")],()=>{i(["removeFocusIfNeeded"])}),e([()=>t.get("checked")],()=>{i(["syncInputElement"])})},effects:["trackFormControlState","trackPressEvent","trackFocusVisible"],on:{"CHECKED.TOGGLE":[{guard:Zu("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:Zu("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},computed:{indeterminate:({context:e})=>ks(e.get("checked")),checked:({context:e})=>nb(e.get("checked")),disabled:({context:e,prop:t})=>!!t("disabled")||e.get("fieldsetDisabled")},states:{ready:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackPressEvent({context:e,computed:t,scope:n}){if(!t("disabled"))return ps({pointerNode:Qy(n),keyboardNode:fr(n),isValidKey:i=>i.key===" ",onPress:()=>e.set("active",!1),onPressStart:()=>e.set("active",!0),onPressEnd:()=>e.set("active",!1)})},trackFocusVisible({computed:e,scope:t}){var n;if(!e("disabled"))return Pn({root:(n=t.getRootNode)==null?void 0:n.call(t)})},trackFormControlState({context:e,scope:t}){return wt(fr(t),{onFieldsetDisabledChange(n){e.set("fieldsetDisabled",n)},onFormReset(){e.set("checked",e.initial("checked"))}})}},actions:{setContext({context:e,event:t}){for(let n in t.context)e.set(n,t.context[n])},syncInputElement({context:e,computed:t,scope:n}){let i=fr(n);i&&(sr(i,t("checked")),i.indeterminate=ks(e.get("checked")))},removeFocusIfNeeded({context:e,prop:t}){t("disabled")&&e.get("focused")&&(e.set("focused",!1),e.set("focusVisible",!1))},setChecked({context:e,event:t}){e.set("checked",t.checked)},toggleChecked({context:e,computed:t}){let n=ks(t("checked"))?!0:!t("checked");e.set("checked",n)},dispatchChangeEvent({computed:e,scope:t}){queueMicrotask(()=>{let n=fr(t);pi(n,{checked:e("checked")})})}}}};ib=_()(["defaultChecked","checked","dir","disabled","form","getRootNode","id","ids","invalid","name","onCheckedChange","readOnly","required","value"]),L0=B(ib),rb=class extends K{initMachine(e){return new W(tb,e)}initApi(){return eb(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="checkbox"][data-part="root"]');if(!e)return;this.spreadProps(e,this.api.getRootProps());let t=e.querySelector(':scope > [data-scope="checkbox"][data-part="hidden-input"]');t&&this.spreadProps(t,this.api.getHiddenInputProps());let n=e.querySelector(':scope > [data-scope="checkbox"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps());let i=e.querySelector(':scope > [data-scope="checkbox"][data-part="control"]');if(i){this.spreadProps(i,this.api.getControlProps());let r=i.querySelector(':scope > [data-scope="checkbox"][data-part="indicator"]');r&&this.spreadProps(r,this.api.getIndicatorProps())}}},sb={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=new rb(e,y(g({id:e.id},C(e,"controlled")?{checked:C(e,"checked")}:{defaultChecked:C(e,"defaultChecked")}),{disabled:C(e,"disabled"),name:w(e,"name"),form:w(e,"form"),value:w(e,"value"),dir:Oe(e),invalid:C(e,"invalid"),required:C(e,"required"),readOnly:C(e,"readOnly"),onCheckedChange:i=>{let r=w(e,"onCheckedChange");r&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&t(r,{checked:i.checked,id:e.id});let s=w(e,"onCheckedChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{value:i,id:e.id}}))}}));n.init(),this.checkbox=n,this.onSetChecked=i=>{let{checked:r}=i.detail;n.api.setChecked(r)},e.addEventListener("phx:checkbox:set-checked",this.onSetChecked),this.onToggleChecked=()=>{n.api.toggleChecked()},e.addEventListener("phx:checkbox:toggle-checked",this.onToggleChecked),this.handlers=[],this.handlers.push(this.handleEvent("checkbox_set_checked",i=>{let r=i.id;r&&r!==e.id||n.api.setChecked(i.checked)})),this.handlers.push(this.handleEvent("checkbox_toggle_checked",i=>{let r=i.id;r&&r!==e.id||n.api.toggleChecked()})),this.handlers.push(this.handleEvent("checkbox_checked",()=>{this.pushEvent("checkbox_checked_response",{value:n.api.checked})})),this.handlers.push(this.handleEvent("checkbox_focused",()=>{this.pushEvent("checkbox_focused_response",{value:n.api.focused})})),this.handlers.push(this.handleEvent("checkbox_disabled",()=>{this.pushEvent("checkbox_disabled_response",{value:n.api.disabled})}))},updated(){var e;(e=this.checkbox)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlled")?{checked:C(this.el,"checked")}:{defaultChecked:C(this.el,"defaultChecked")}),{disabled:C(this.el,"disabled"),name:w(this.el,"name"),form:w(this.el,"form"),value:w(this.el,"value"),dir:Oe(this.el),invalid:C(this.el,"invalid"),required:C(this.el,"required"),readOnly:C(this.el,"readOnly"),label:w(this.el,"label")}))},destroyed(){var e;if(this.onSetChecked&&this.el.removeEventListener("phx:checkbox:set-checked",this.onSetChecked),this.onToggleChecked&&this.el.removeEventListener("phx:checkbox:toggle-checked",this.onToggleChecked),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.checkbox)==null||e.destroy()}}});var td={};he(td,{Clipboard:()=>bb});function db(e,t){let n=e.createElement("pre");return Object.assign(n.style,{width:"1px",height:"1px",position:"fixed",top:"5px"}),n.textContent=t,n}function hb(e){let n=ue(e).getSelection();if(n==null)return Promise.reject(new Error);n.removeAllRanges();let i=e.ownerDocument,r=i.createRange();return r.selectNodeContents(e),n.addRange(r),i.execCommand("copy"),n.removeAllRanges(),Promise.resolve()}function gb(e,t){var r;let n=e.defaultView||window;if(((r=n.navigator.clipboard)==null?void 0:r.writeText)!==void 0)return n.navigator.clipboard.writeText(t);if(!e.body)return Promise.reject(new Error);let i=db(e,t);return e.body.appendChild(i),hb(i),e.body.removeChild(i),Promise.resolve()}function pb(e,t){let{state:n,send:i,context:r,scope:s}=e,a=n.matches("copied");return{copied:a,value:r.get("value"),setValue(o){i({type:"VALUE.SET",value:o})},copy(){i({type:"COPY"})},getRootProps(){return t.element(y(g({},Oi.root.attrs),{"data-copied":E(a),id:ob(s)}))},getLabelProps(){return t.label(y(g({},Oi.label.attrs),{htmlFor:Oo(s),"data-copied":E(a),id:lb(s)}))},getControlProps(){return t.element(y(g({},Oi.control.attrs),{"data-copied":E(a)}))},getInputProps(){return t.input(y(g({},Oi.input.attrs),{defaultValue:r.get("value"),"data-copied":E(a),readOnly:!0,"data-readonly":"true",id:Oo(s),onFocus(o){o.currentTarget.select()},onCopy(){i({type:"INPUT.COPY"})}}))},getTriggerProps(){return t.button(y(g({},Oi.trigger.attrs),{type:"button","aria-label":a?"Copied to clipboard":"Copy to clipboard","data-copied":E(a),onClick(){i({type:"COPY"})}}))},getIndicatorProps(o){return t.element(y(g({},Oi.indicator.attrs),{hidden:o.copied!==a}))}}}var ab,Oi,ob,Oo,lb,cb,ub,fb,mb,H0,vb,B0,yb,bb,nd=re(()=>{"use strict";se();ab=U("clipboard").parts("root","control","trigger","indicator","input","label"),Oi=ab.build(),ob=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`clip:${e.id}`},Oo=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.input)!=null?n:`clip:${e.id}:input`},lb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`clip:${e.id}:label`},cb=e=>e.getById(Oo(e)),ub=(e,t)=>gb(e.getDoc(),t);fb={props({props:e}){return g({timeout:3e3,defaultValue:""},e)},initialState(){return"idle"},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var i;(i=e("onValueChange"))==null||i({value:n})}}))}},watch({track:e,context:t,action:n}){e([()=>t.get("value")],()=>{n(["syncInputElement"])})},on:{"VALUE.SET":{actions:["setValue"]},COPY:{target:"copied",actions:["copyToClipboard","invokeOnCopy"]}},states:{idle:{on:{"INPUT.COPY":{target:"copied",actions:["invokeOnCopy"]}}},copied:{effects:["waitForTimeout"],on:{"COPY.DONE":{target:"idle"},COPY:{target:"copied",actions:["copyToClipboard","invokeOnCopy"]},"INPUT.COPY":{actions:["invokeOnCopy"]}}}},implementations:{effects:{waitForTimeout({prop:e,send:t}){return mn(()=>{t({type:"COPY.DONE"})},e("timeout"))}},actions:{setValue({context:e,event:t}){e.set("value",t.value)},copyToClipboard({context:e,scope:t}){ub(t,e.get("value"))},invokeOnCopy({prop:e}){var t;(t=e("onStatusChange"))==null||t({copied:!0})},syncInputElement({context:e,scope:t}){let n=cb(t);n&&Me(n,e.get("value"))}}}},mb=_()(["getRootNode","id","ids","value","defaultValue","timeout","onStatusChange","onValueChange"]),H0=B(mb),vb=_()(["copied"]),B0=B(vb),yb=class extends K{initMachine(e){return new W(fb,e)}initApi(){return pb(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="clipboard"][data-part="root"]');if(e){this.spreadProps(e,this.api.getRootProps());let t=e.querySelector('[data-scope="clipboard"][data-part="label"]');t&&this.spreadProps(t,this.api.getLabelProps());let n=e.querySelector('[data-scope="clipboard"][data-part="control"]');if(n){this.spreadProps(n,this.api.getControlProps());let i=n.querySelector('[data-scope="clipboard"][data-part="input"]');if(i){let s=g({},this.api.getInputProps()),a=this.el.dataset.inputAriaLabel;a&&(s["aria-label"]=a),this.spreadProps(i,s)}let r=n.querySelector('[data-scope="clipboard"][data-part="trigger"]');if(r){let s=g({},this.api.getTriggerProps()),a=this.el.dataset.triggerAriaLabel;a&&(s["aria-label"]=a),this.spreadProps(r,s)}}}}},bb={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=this.liveSocket,i=new yb(e,y(g({id:e.id,timeout:Y(e,"timeout")},C(e,"controlled")?{value:w(e,"value")}:{defaultValue:w(e,"defaultValue")}),{onValueChange:r=>{var a;let s=w(e,"onValueChange");s&&n.main.isConnected()&&t(s,{id:e.id,value:(a=r.value)!=null?a:null})},onStatusChange:r=>{let s=w(e,"onStatusChange");s&&n.main.isConnected()&&t(s,{id:e.id,copied:r.copied});let a=w(e,"onStatusChangeClient");a&&e.dispatchEvent(new CustomEvent(a,{bubbles:!0}))}}));i.init(),this.clipboard=i,this.onCopy=()=>{i.api.copy()},e.addEventListener("phx:clipboard:copy",this.onCopy),this.onSetValue=r=>{let{value:s}=r.detail;i.api.setValue(s)},e.addEventListener("phx:clipboard:set-value",this.onSetValue),this.handlers=[],this.handlers.push(this.handleEvent("clipboard_copy",r=>{let s=r.clipboard_id;s&&s!==e.id||i.api.copy()})),this.handlers.push(this.handleEvent("clipboard_set_value",r=>{let s=r.clipboard_id;s&&s!==e.id||i.api.setValue(r.value)})),this.handlers.push(this.handleEvent("clipboard_copied",()=>{this.pushEvent("clipboard_copied_response",{value:i.api.copied})}))},updated(){var e;(e=this.clipboard)==null||e.updateProps(y(g({id:this.el.id,timeout:Y(this.el,"timeout")},C(this.el,"controlled")?{value:w(this.el,"value")}:{defaultValue:w(this.el,"value")}),{dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(this.onCopy&&this.el.removeEventListener("phx:clipboard:copy",this.onCopy),this.onSetValue&&this.el.removeEventListener("phx:clipboard:set-value",this.onSetValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.clipboard)==null||e.destroy()}}});var id={};he(id,{Collapsible:()=>wb});function Cb(e,t){let{state:n,send:i,context:r,scope:s,prop:a}=e,o=n.matches("open")||n.matches("closing"),l=n.matches("open"),c=n.matches("closed"),{width:u,height:h}=r.get("size"),m=!!a("disabled"),d=a("collapsedHeight"),p=a("collapsedWidth"),v=d!=null,I=p!=null,T=v||I,O=!r.get("initial")&&l;return{disabled:m,visible:o,open:l,measureSize(){i({type:"size.measure"})},setOpen(b){n.matches("open")!==b&&i({type:b?"open":"close"})},getRootProps(){return t.element(y(g({},Ns.root.attrs),{"data-state":l?"open":"closed",dir:a("dir"),id:Ib(s)}))},getContentProps(){return t.element(y(g({},Ns.content.attrs),{id:wo(s),"data-collapsible":"","data-state":O?void 0:l?"open":"closed","data-disabled":E(m),"data-has-collapsed-size":E(T),hidden:!o&&!T,dir:a("dir"),style:g(g({"--height":ye(h),"--width":ye(u),"--collapsed-height":ye(d),"--collapsed-width":ye(p)},c&&v&&{overflow:"hidden",minHeight:ye(d),maxHeight:ye(d)}),c&&I&&{overflow:"hidden",minWidth:ye(p),maxWidth:ye(p)})}))},getTriggerProps(){return t.element(y(g({},Ns.trigger.attrs),{id:Pb(s),dir:a("dir"),type:"button","data-state":l?"open":"closed","data-disabled":E(m),"aria-controls":wo(s),"aria-expanded":o||!1,onClick(b){b.defaultPrevented||m||i({type:l?"close":"open"})}}))},getIndicatorProps(){return t.element(y(g({},Ns.indicator.attrs),{dir:a("dir"),"data-state":l?"open":"closed","data-disabled":E(m)}))}}}var Eb,Ns,Ib,wo,Pb,mr,Sb,Tb,q0,Ob,wb,rd=re(()=>{"use strict";se();Eb=U("collapsible").parts("root","trigger","content","indicator"),Ns=Eb.build(),Ib=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`collapsible:${e.id}`},wo=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`collapsible:${e.id}:content`},Pb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`collapsible:${e.id}:trigger`},mr=e=>e.getById(wo(e));Sb={initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{size:e(()=>({defaultValue:{height:0,width:0},sync:!0})),initial:e(()=>({defaultValue:!1}))}},refs(){return{cleanup:void 0,stylesRef:void 0}},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["setInitial","computeSize","toggleVisibility"])})},exit:["cleanupNode"],states:{closed:{effects:["trackTabbableElements"],on:{"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitial","computeSize","invokeOnOpen"]}]}},closing:{effects:["trackExitAnimation"],on:{"controlled.close":{target:"closed"},"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitial","invokeOnOpen"]}],close:[{guard:"isOpenControlled",actions:["invokeOnExitComplete"]},{target:"closed",actions:["setInitial","computeSize","invokeOnExitComplete"]}],"animation.end":{target:"closed",actions:["invokeOnExitComplete","clearInitial"]}}},open:{effects:["trackEnterAnimation"],on:{"controlled.close":{target:"closing"},close:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closing",actions:["setInitial","computeSize","invokeOnClose"]}],"size.measure":{actions:["measureSize"]},"animation.end":{actions:["clearInitial"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackEnterAnimation:({send:e,scope:t})=>{let n,i=H(()=>{let r=mr(t);if(!r)return;let s=at(r).animationName;if(!s||s==="none"){e({type:"animation.end"});return}let o=l=>{j(l)===r&&e({type:"animation.end"})};r.addEventListener("animationend",o),n=()=>{r.removeEventListener("animationend",o)}});return()=>{i(),n==null||n()}},trackExitAnimation:({send:e,scope:t})=>{let n,i=H(()=>{let r=mr(t);if(!r)return;let s=at(r).animationName;if(!s||s==="none"){e({type:"animation.end"});return}let o=c=>{j(c)===r&&e({type:"animation.end"})};r.addEventListener("animationend",o);let l=Hn(r,{animationFillMode:"forwards"});n=()=>{r.removeEventListener("animationend",o),$n(()=>l())}});return()=>{i(),n==null||n()}},trackTabbableElements:({scope:e,prop:t})=>{if(!t("collapsedHeight")&&!t("collapsedWidth"))return;let n=mr(e);if(!n)return;let i=()=>{let o=jt(n).map(l=>Fc(l,"inert",""));return()=>{o.forEach(l=>l())}},r=i(),s=hs(n,{callback(){r(),r=i()}});return()=>{r(),s()}}},actions:{setInitial:({context:e,flush:t})=>{t(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},cleanupNode:({refs:e})=>{e.set("stylesRef",null)},measureSize:({context:e,scope:t})=>{let n=mr(t);if(!n)return;let{height:i,width:r}=n.getBoundingClientRect();e.set("size",{height:i,width:r})},computeSize:({refs:e,scope:t,context:n})=>{var r;(r=e.get("cleanup"))==null||r();let i=H(()=>{let s=mr(t);if(!s)return;let a=s.hidden;s.style.animationName="none",s.style.animationDuration="0s",s.hidden=!1;let o=s.getBoundingClientRect();n.set("size",{height:o.height,width:o.width}),n.get("initial")&&(s.style.animationName="",s.style.animationDuration=""),s.hidden=a});e.set("cleanup",i)},invokeOnOpen:({prop:e})=>{var t;(t=e("onOpenChange"))==null||t({open:!0})},invokeOnClose:({prop:e})=>{var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},toggleVisibility:({prop:e,send:t})=>{t({type:e("open")?"controlled.open":"controlled.close"})}}}},Tb=_()(["dir","disabled","getRootNode","id","ids","collapsedHeight","collapsedWidth","onExitComplete","onOpenChange","defaultOpen","open"]),q0=B(Tb),Ob=class extends K{initMachine(e){return new W(Sb,e)}initApi(){return Cb(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="collapsible"][data-part="root"]');if(e){this.spreadProps(e,this.api.getRootProps());let t=e.querySelector('[data-scope="collapsible"][data-part="trigger"]');t&&this.spreadProps(t,this.api.getTriggerProps());let n=e.querySelector('[data-scope="collapsible"][data-part="content"]');n&&this.spreadProps(n,this.api.getContentProps())}}},wb={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=new Ob(e,y(g({id:e.id},C(e,"controlled")?{open:C(e,"open")}:{defaultOpen:C(e,"defaultOpen")}),{disabled:C(e,"disabled"),dir:w(e,"dir",["ltr","rtl"]),onOpenChange:i=>{let r=w(e,"onOpenChange");r&&this.liveSocket.main.isConnected()&&t(r,{id:e.id,open:i.open});let s=w(e,"onOpenChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{id:e.id,open:i.open}}))}}));n.init(),this.collapsible=n,this.onSetOpen=i=>{let{open:r}=i.detail;n.api.setOpen(r)},e.addEventListener("phx:collapsible:set-open",this.onSetOpen),this.handlers=[],this.handlers.push(this.handleEvent("collapsible_set_open",i=>{let r=i.collapsible_id;r&&r!==e.id||n.api.setOpen(i.open)})),this.handlers.push(this.handleEvent("collapsible_open",()=>{this.pushEvent("collapsible_open_response",{value:n.api.open})}))},updated(){var e;(e=this.collapsible)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlled")?{open:C(this.el,"open")}:{defaultOpen:C(this.el,"defaultOpen")}),{disabled:C(this.el,"disabled"),dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(this.onSetOpen&&this.el.removeEventListener("phx:collapsible:set-open",this.onSetOpen),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.collapsible)==null||e.destroy()}}});function vr(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function Rs(e,t,n){t=[...t].sort((r,s)=>r-s);let i=t.map(r=>e[r]);for(let r=t.length-1;r>=0;r--)e=[...e.slice(0,t[r]),...e.slice(t[r]+1)];return n=Math.max(0,n-t.filter(r=>rt[n])return 1}return e.length-t.length}function Nb(e){return e.sort(ud)}function Rb(e,t){let n;return Je(e,y(g({},t),{onEnter:(i,r)=>{if(t.predicate(i,r))return n=i,"stop"}})),n}function Db(e,t){let n=[];return Je(e,{onEnter:(i,r)=>{t.predicate(i,r)&&n.push(i)},getChildren:t.getChildren}),n}function sd(e,t){let n;return Je(e,{onEnter:(i,r)=>{if(t.predicate(i,r))return n=[...r],"stop"},getChildren:t.getChildren}),n}function Lb(e,t){let n=t.initialResult;return Je(e,y(g({},t),{onEnter:(i,r)=>{n=t.nextResult(n,i,r)}})),n}function Mb(e,t){return Lb(e,y(g({},t),{initialResult:[],nextResult:(n,i,r)=>(n.push(...t.transform(i,r)),n)}))}function Fb(e,t){let{predicate:n,create:i,getChildren:r}=t,s=(a,o)=>{let l=r(a,o),c=[];l.forEach((d,p)=>{let v=[...o,p],I=s(d,v);I&&c.push(I)});let u=o.length===0,h=n(a,o),m=c.length>0;return u||h||m?i(a,c,o):null};return s(e,[])||i(e,[],[])}function $b(e,t){let n=[],i=0,r=new Map,s=new Map;return Je(e,{getChildren:t.getChildren,onEnter:(a,o)=>{r.has(a)||r.set(a,i++);let l=t.getChildren(a,o);l.forEach(d=>{s.has(d)||s.set(d,a),r.has(d)||r.set(d,i++)});let c=l.length>0?l.map(d=>r.get(d)):void 0,u=s.get(a),h=u?r.get(u):void 0,m=r.get(a);n.push(y(g({},a),{_children:c,_parent:h,_index:m}))}}),n}function Hb(e,t){return{type:"insert",index:e,nodes:t}}function Bb(e){return{type:"remove",indexes:e}}function xo(){return{type:"replace"}}function dd(e){return[e.slice(0,-1),e[e.length-1]]}function hd(e,t,n=new Map){var a;let[i,r]=dd(e);for(let o=i.length-1;o>=0;o--){let l=i.slice(0,o).join();switch((a=n.get(l))==null?void 0:a.type){case"remove":continue}n.set(l,xo())}let s=n.get(i.join());switch(s==null?void 0:s.type){case"remove":n.set(i.join(),{type:"removeThenInsert",removeIndexes:s.indexes,insertIndex:r,insertNodes:t});break;default:n.set(i.join(),Hb(r,t))}return n}function gd(e){var i;let t=new Map,n=new Map;for(let r of e){let s=r.slice(0,-1).join(),a=(i=n.get(s))!=null?i:[];a.push(r[r.length-1]),n.set(s,a.sort((o,l)=>o-l))}for(let r of e)for(let s=r.length-2;s>=0;s--){let a=r.slice(0,s).join();t.has(a)||t.set(a,xo())}for(let[r,s]of n)t.set(r,Bb(s));return t}function _b(e,t){let n=new Map,[i,r]=dd(e);for(let s=i.length-1;s>=0;s--){let a=i.slice(0,s).join();n.set(a,xo())}return n.set(i.join(),{type:"removeThenInsert",removeIndexes:[r],insertIndex:r,insertNodes:[t]}),n}function Ms(e,t,n){return Gb(e,y(g({},n),{getChildren:(i,r)=>{let s=r.join(),a=t.get(s);switch(a==null?void 0:a.type){case"replace":case"remove":case"removeThenInsert":case"insert":return n.getChildren(i,r);default:return[]}},transform:(i,r,s)=>{let a=s.join(),o=t.get(a);switch(o==null?void 0:o.type){case"remove":return n.create(i,r.filter((u,h)=>!o.indexes.includes(h)),s);case"removeThenInsert":let l=r.filter((u,h)=>!o.removeIndexes.includes(h)),c=o.removeIndexes.reduce((u,h)=>h{var u,h;let s=[0,...r],a=s.join(),o=t.transform(i,(u=n[a])!=null?u:[],r),l=s.slice(0,-1).join(),c=(h=n[l])!=null?h:[];c.push(o),n[l]=c}})),n[""][0]}function Ub(e,t){let{nodes:n,at:i}=t;if(i.length===0)throw new Error("Can't insert nodes at the root");let r=hd(i,n);return Ms(e,r,t)}function qb(e,t){if(t.at.length===0)return t.node;let n=_b(t.at,t.node);return Ms(e,n,t)}function Wb(e,t){if(t.indexPaths.length===0)return e;for(let i of t.indexPaths)if(i.length===0)throw new Error("Can't remove the root node");let n=gd(t.indexPaths);return Ms(e,n,t)}function Kb(e,t){if(t.indexPaths.length===0)return e;for(let s of t.indexPaths)if(s.length===0)throw new Error("Can't move the root node");if(t.to.length===0)throw new Error("Can't move nodes to the root");let n=kb(t.indexPaths),i=n.map(s=>cd(e,s,t)),r=hd(t.to,i,gd(n));return Ms(e,r,t)}function Je(e,t){let{onEnter:n,onLeave:i,getChildren:r}=t,s=[],a=[{node:e}],o=t.reuseIndexPath?()=>s:()=>s.slice();for(;a.length>0;){let l=a[a.length-1];if(l.state===void 0){let u=n==null?void 0:n(l.node,o());if(u==="stop")return;l.state=u==="skip"?-1:0}let c=l.children||r(l.node,o());if(l.children||(l.children=c),l.state!==-1){if(l.state{"use strict";se();Vb=Object.defineProperty,xb=(e,t,n)=>t in e?Vb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,L=(e,t,n)=>xb(e,typeof t!="symbol"?t+"":t,n),Ds={itemToValue(e){return typeof e=="string"?e:xt(e)&&$e(e,"value")?e.value:""},itemToString(e){return typeof e=="string"?e:xt(e)&&$e(e,"label")?e.label:Ds.itemToValue(e)},isItemDisabled(e){return xt(e)&&$e(e,"disabled")?!!e.disabled:!1}},Nt=class od{constructor(t){this.options=t,L(this,"items"),L(this,"indexMap",null),L(this,"copy",n=>new od(y(g({},this.options),{items:n!=null?n:[...this.items]}))),L(this,"isEqual",n=>fe(this.items,n.items)),L(this,"setItems",n=>this.copy(n)),L(this,"getValues",(n=this.items)=>{let i=[];for(let r of n){let s=this.getItemValue(r);s!=null&&i.push(s)}return i}),L(this,"find",n=>{if(n==null)return null;let i=this.indexOf(n);return i!==-1?this.at(i):null}),L(this,"findMany",n=>{let i=[];for(let r of n){let s=this.find(r);s!=null&&i.push(s)}return i}),L(this,"at",n=>{var s;if(!this.options.groupBy&&!this.options.groupSort)return(s=this.items[n])!=null?s:null;let i=0,r=this.group();for(let[,a]of r)for(let o of a){if(i===n)return o;i++}return null}),L(this,"sortFn",(n,i)=>{let r=this.indexOf(n),s=this.indexOf(i);return(r!=null?r:0)-(s!=null?s:0)}),L(this,"sort",n=>[...n].sort(this.sortFn.bind(this))),L(this,"getItemValue",n=>{var i,r,s;return n==null?null:(s=(r=(i=this.options).itemToValue)==null?void 0:r.call(i,n))!=null?s:Ds.itemToValue(n)}),L(this,"getItemDisabled",n=>{var i,r,s;return n==null?!1:(s=(r=(i=this.options).isItemDisabled)==null?void 0:r.call(i,n))!=null?s:Ds.isItemDisabled(n)}),L(this,"stringifyItem",n=>{var i,r,s;return n==null?null:(s=(r=(i=this.options).itemToString)==null?void 0:r.call(i,n))!=null?s:Ds.itemToString(n)}),L(this,"stringify",n=>n==null?null:this.stringifyItem(this.find(n))),L(this,"stringifyItems",(n,i=", ")=>{let r=[];for(let s of n){let a=this.stringifyItem(s);a!=null&&r.push(a)}return r.join(i)}),L(this,"stringifyMany",(n,i)=>this.stringifyItems(this.findMany(n),i)),L(this,"has",n=>this.indexOf(n)!==-1),L(this,"hasItem",n=>n==null?!1:this.has(this.getItemValue(n))),L(this,"group",()=>{let{groupBy:n,groupSort:i}=this.options;if(!n)return[["",[...this.items]]];let r=new Map;this.items.forEach((a,o)=>{let l=n(a,o);r.has(l)||r.set(l,[]),r.get(l).push(a)});let s=Array.from(r.entries());return i&&s.sort(([a],[o])=>{if(typeof i=="function")return i(a,o);if(Array.isArray(i)){let l=i.indexOf(a),c=i.indexOf(o);return l===-1?1:c===-1?-1:l-c}return i==="asc"?a.localeCompare(o):i==="desc"?o.localeCompare(a):0}),s}),L(this,"getNextValue",(n,i=1,r=!1)=>{let s=this.indexOf(n);if(s===-1)return null;for(s=r?Math.min(s+i,this.size-1):s+i;s<=this.size&&this.getItemDisabled(this.at(s));)s++;return this.getItemValue(this.at(s))}),L(this,"getPreviousValue",(n,i=1,r=!1)=>{let s=this.indexOf(n);if(s===-1)return null;for(s=r?Math.max(s-i,0):s-i;s>=0&&this.getItemDisabled(this.at(s));)s--;return this.getItemValue(this.at(s))}),L(this,"indexOf",n=>{var i;if(n==null)return-1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex(r=>this.getItemValue(r)===n);if(!this.indexMap){this.indexMap=new Map;let r=0,s=this.group();for(let[,a]of s)for(let o of a){let l=this.getItemValue(o);l!=null&&this.indexMap.set(l,r),r++}}return(i=this.indexMap.get(n))!=null?i:-1}),L(this,"getByText",(n,i)=>{let r=i!=null?this.indexOf(i):-1,s=n.length===1;for(let a=0;a{let{state:r,currentValue:s,timeout:a=350}=i,o=r.keysSoFar+n,c=o.length>1&&Array.from(o).every(p=>p===o[0])?o[0]:o,u=this.getByText(c,s),h=this.getItemValue(u);function m(){clearTimeout(r.timer),r.timer=-1}function d(p){r.keysSoFar=p,m(),p!==""&&(r.timer=+setTimeout(()=>{d(""),m()},a))}return d(o),h}),L(this,"update",(n,i)=>{let r=this.indexOf(n);return r===-1?this:this.copy([...this.items.slice(0,r),i,...this.items.slice(r+1)])}),L(this,"upsert",(n,i,r="append")=>{let s=this.indexOf(n);return s===-1?(r==="append"?this.append:this.prepend)(i):this.copy([...this.items.slice(0,s),i,...this.items.slice(s+1)])}),L(this,"insert",(n,...i)=>this.copy(vr(this.items,n,...i))),L(this,"insertBefore",(n,...i)=>{let r=this.indexOf(n);if(r===-1)if(this.items.length===0)r=0;else return this;return this.copy(vr(this.items,r,...i))}),L(this,"insertAfter",(n,...i)=>{let r=this.indexOf(n);if(r===-1)if(this.items.length===0)r=0;else return this;return this.copy(vr(this.items,r+1,...i))}),L(this,"prepend",(...n)=>this.copy(vr(this.items,0,...n))),L(this,"append",(...n)=>this.copy(vr(this.items,this.items.length,...n))),L(this,"filter",n=>{let i=this.items.filter((r,s)=>n(this.stringifyItem(r),s,r));return this.copy(i)}),L(this,"remove",(...n)=>{let i=n.map(r=>typeof r=="string"?r:this.getItemValue(r));return this.copy(this.items.filter(r=>{let s=this.getItemValue(r);return s==null?!1:!i.includes(s)}))}),L(this,"move",(n,i)=>{let r=this.indexOf(n);return r===-1?this:this.copy(Rs(this.items,[r],i))}),L(this,"moveBefore",(n,...i)=>{let r=this.items.findIndex(a=>this.getItemValue(a)===n);if(r===-1)return this;let s=i.map(a=>this.items.findIndex(o=>this.getItemValue(o)===a)).sort((a,o)=>a-o);return this.copy(Rs(this.items,s,r))}),L(this,"moveAfter",(n,...i)=>{let r=this.items.findIndex(a=>this.getItemValue(a)===n);if(r===-1)return this;let s=i.map(a=>this.items.findIndex(o=>this.getItemValue(o)===a)).sort((a,o)=>a-o);return this.copy(Rs(this.items,s,r+1))}),L(this,"reorder",(n,i)=>this.copy(Rs(this.items,[n],i))),L(this,"compareValue",(n,i)=>{let r=this.indexOf(n),s=this.indexOf(i);return rs?1:0}),L(this,"range",(n,i)=>{let r=[],s=n;for(;s!=null;){if(this.find(s)&&r.push(s),s===i)return r;s=this.getNextValue(s)}return[]}),L(this,"getValueRange",(n,i)=>n&&i?this.compareValue(n,i)<=0?this.range(n,i):this.range(i,n):[]),L(this,"toString",()=>{let n="";for(let i of this.items){let r=this.getItemValue(i),s=this.stringifyItem(i),a=this.getItemDisabled(i),o=[r,s,a].filter(Boolean).join(":");n+=o+","}return n}),L(this,"toJSON",()=>({size:this.size,first:this.firstValue,last:this.lastValue})),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let t=0;for(;this.getItemDisabled(this.at(t));)t++;return this.getItemValue(this.at(t))}get lastValue(){let t=this.size-1;for(;this.getItemDisabled(this.at(t));)t--;return this.getItemValue(this.at(t))}*[Symbol.iterator](){yield*sc(this.items)}},Ab=(e,t)=>!!(e!=null&&e.toLowerCase().startsWith(t.toLowerCase()));Vo=class extends Nt{constructor(e){let{columnCount:t}=e;super(e),L(this,"columnCount"),L(this,"rows",null),L(this,"getRows",()=>(this.rows||(this.rows=cr([...this.items],this.columnCount)),this.rows)),L(this,"getRowCount",()=>Math.ceil(this.items.length/this.columnCount)),L(this,"getCellIndex",(n,i)=>n*this.columnCount+i),L(this,"getCell",(n,i)=>this.at(this.getCellIndex(n,i))),L(this,"getValueCell",n=>{let i=this.indexOf(n);if(i===-1)return null;let r=Math.floor(i/this.columnCount),s=i%this.columnCount;return{row:r,column:s}}),L(this,"getLastEnabledColumnIndex",n=>{for(let i=this.columnCount-1;i>=0;i--){let r=this.getCell(n,i);if(r&&!this.getItemDisabled(r))return i}return null}),L(this,"getFirstEnabledColumnIndex",n=>{for(let i=0;i{let r=this.getValueCell(n);if(r===null)return null;let s=this.getRows(),a=s.length,o=r.row,l=r.column;for(let c=1;c<=a;c++){o=lr(s,o,{loop:i});let u=s[o];if(!u)continue;if(!u[l]){let d=this.getLastEnabledColumnIndex(o);d!=null&&(l=d)}let m=this.getCell(o,l);if(!this.getItemDisabled(m))return this.getItemValue(m)}return this.firstValue}),L(this,"getNextRowValue",(n,i=!1)=>{let r=this.getValueCell(n);if(r===null)return null;let s=this.getRows(),a=s.length,o=r.row,l=r.column;for(let c=1;c<=a;c++){o=Ei(s,o,{loop:i});let u=s[o];if(!u)continue;if(!u[l]){let d=this.getLastEnabledColumnIndex(o);d!=null&&(l=d)}let m=this.getCell(o,l);if(!this.getItemDisabled(m))return this.getItemValue(m)}return this.lastValue}),this.columnCount=t}};ld=class Ls extends Set{constructor(t=[]){super(t),L(this,"selectionMode","single"),L(this,"deselectable",!0),L(this,"copy",()=>{let n=new Ls([...this]);return this.sync(n)}),L(this,"sync",n=>(n.selectionMode=this.selectionMode,n.deselectable=this.deselectable,n)),L(this,"isEmpty",()=>this.size===0),L(this,"isSelected",n=>this.selectionMode==="none"||n==null?!1:this.has(n)),L(this,"canSelect",(n,i)=>this.selectionMode!=="none"||!n.getItemDisabled(n.find(i))),L(this,"firstSelectedValue",n=>{let i=null;for(let r of this)(!i||n.compareValue(r,i)<0)&&(i=r);return i}),L(this,"lastSelectedValue",n=>{let i=null;for(let r of this)(!i||n.compareValue(r,i)>0)&&(i=r);return i}),L(this,"extendSelection",(n,i,r)=>{if(this.selectionMode==="none")return this;if(this.selectionMode==="single")return this.replaceSelection(n,r);let s=this.copy(),a=Array.from(this).pop();for(let o of n.getValueRange(i,a!=null?a:r))s.delete(o);for(let o of n.getValueRange(r,i))this.canSelect(n,o)&&s.add(o);return s}),L(this,"toggleSelection",(n,i)=>{if(this.selectionMode==="none")return this;if(this.selectionMode==="single"&&!this.isSelected(i))return this.replaceSelection(n,i);let r=this.copy();return r.has(i)?r.delete(i):r.canSelect(n,i)&&r.add(i),r}),L(this,"replaceSelection",(n,i)=>{if(this.selectionMode==="none")return this;if(i==null)return this;if(!this.canSelect(n,i))return this;let r=new Ls([i]);return this.sync(r)}),L(this,"setSelection",n=>{if(this.selectionMode==="none")return this;let i=new Ls;for(let r of n)if(r!=null&&(i.add(r),this.selectionMode==="single"))break;return this.sync(i)}),L(this,"clearSelection",()=>{let n=this.copy();return n.deselectable&&n.size>0&&n.clear(),n}),L(this,"select",(n,i,r)=>this.selectionMode==="none"?this:this.selectionMode==="single"?this.isSelected(i)&&this.deselectable?this.toggleSelection(n,i):this.replaceSelection(n,i):this.selectionMode==="multiple"||r?this.toggleSelection(n,i):this.replaceSelection(n,i)),L(this,"deselect",n=>{let i=this.copy();return i.delete(n),i}),L(this,"isEqual",n=>fe(Array.from(this),Array.from(n)))}};Ao=class pd{constructor(t){this.options=t,L(this,"rootNode"),L(this,"isEqual",n=>fe(this.rootNode,n.rootNode)),L(this,"getNodeChildren",n=>{var i,r,s,a;return(a=(s=(r=(i=this.options).nodeToChildren)==null?void 0:r.call(i,n))!=null?s:wi.nodeToChildren(n))!=null?a:[]}),L(this,"resolveIndexPath",n=>typeof n=="string"?this.getIndexPath(n):n),L(this,"resolveNode",n=>{let i=this.resolveIndexPath(n);return i?this.at(i):void 0}),L(this,"getNodeChildrenCount",n=>{var i,r,s;return(s=(r=(i=this.options).nodeToChildrenCount)==null?void 0:r.call(i,n))!=null?s:wi.nodeToChildrenCount(n)}),L(this,"getNodeValue",n=>{var i,r,s;return(s=(r=(i=this.options).nodeToValue)==null?void 0:r.call(i,n))!=null?s:wi.nodeToValue(n)}),L(this,"getNodeDisabled",n=>{var i,r,s;return(s=(r=(i=this.options).isNodeDisabled)==null?void 0:r.call(i,n))!=null?s:wi.isNodeDisabled(n)}),L(this,"stringify",n=>{let i=this.findNode(n);return i?this.stringifyNode(i):null}),L(this,"stringifyNode",n=>{var i,r,s;return(s=(r=(i=this.options).nodeToString)==null?void 0:r.call(i,n))!=null?s:wi.nodeToString(n)}),L(this,"getFirstNode",(n=this.rootNode,i={})=>{let r;return Je(n,{getChildren:this.getNodeChildren,onEnter:(s,a)=>{var o;if(!this.isSameNode(s,n)){if((o=i.skip)!=null&&o.call(i,{value:this.getNodeValue(s),node:s,indexPath:a}))return"skip";if(!r&&a.length>0&&!this.getNodeDisabled(s))return r=s,"stop"}}}),r}),L(this,"getLastNode",(n=this.rootNode,i={})=>{let r;return Je(n,{getChildren:this.getNodeChildren,onEnter:(s,a)=>{var o;if(!this.isSameNode(s,n)){if((o=i.skip)!=null&&o.call(i,{value:this.getNodeValue(s),node:s,indexPath:a}))return"skip";a.length>0&&!this.getNodeDisabled(s)&&(r=s)}}}),r}),L(this,"at",n=>cd(this.rootNode,n,{getChildren:this.getNodeChildren})),L(this,"findNode",(n,i=this.rootNode)=>Rb(i,{getChildren:this.getNodeChildren,predicate:r=>this.getNodeValue(r)===n})),L(this,"findNodes",(n,i=this.rootNode)=>{let r=new Set(n.filter(s=>s!=null));return Db(i,{getChildren:this.getNodeChildren,predicate:s=>r.has(this.getNodeValue(s))})}),L(this,"sort",n=>n.reduce((i,r)=>{let s=this.getIndexPath(r);return s&&i.push({value:r,indexPath:s}),i},[]).sort((i,r)=>ud(i.indexPath,r.indexPath)).map(({value:i})=>i)),L(this,"getIndexPath",n=>sd(this.rootNode,{getChildren:this.getNodeChildren,predicate:i=>this.getNodeValue(i)===n})),L(this,"getValue",n=>{let i=this.at(n);return i?this.getNodeValue(i):void 0}),L(this,"getValuePath",n=>{if(!n)return[];let i=[],r=[...n];for(;r.length>0;){let s=this.at(r);s&&i.unshift(this.getNodeValue(s)),r.pop()}return i}),L(this,"getDepth",n=>{var r;let i=sd(this.rootNode,{getChildren:this.getNodeChildren,predicate:s=>this.getNodeValue(s)===n});return(r=i==null?void 0:i.length)!=null?r:0}),L(this,"isSameNode",(n,i)=>this.getNodeValue(n)===this.getNodeValue(i)),L(this,"isRootNode",n=>this.isSameNode(n,this.rootNode)),L(this,"contains",(n,i)=>!n||!i?!1:i.slice(0,n.length).every((r,s)=>n[s]===i[s])),L(this,"getNextNode",(n,i={})=>{let r=!1,s;return Je(this.rootNode,{getChildren:this.getNodeChildren,onEnter:(a,o)=>{var c;if(this.isRootNode(a))return;let l=this.getNodeValue(a);if((c=i.skip)!=null&&c.call(i,{value:l,node:a,indexPath:o}))return l===n&&(r=!0),"skip";if(r&&!this.getNodeDisabled(a))return s=a,"stop";l===n&&(r=!0)}}),s}),L(this,"getPreviousNode",(n,i={})=>{let r,s=!1;return Je(this.rootNode,{getChildren:this.getNodeChildren,onEnter:(a,o)=>{var c;if(this.isRootNode(a))return;let l=this.getNodeValue(a);if((c=i.skip)!=null&&c.call(i,{value:l,node:a,indexPath:o}))return"skip";if(l===n)return s=!0,"stop";this.getNodeDisabled(a)||(r=a)}}),s?r:void 0}),L(this,"getParentNodes",n=>{var s;let i=(s=this.resolveIndexPath(n))==null?void 0:s.slice();if(!i)return[];let r=[];for(;i.length>0;){i.pop();let a=this.at(i);a&&!this.isRootNode(a)&&r.unshift(a)}return r}),L(this,"getDescendantNodes",(n,i)=>{let r=this.resolveNode(n);if(!r)return[];let s=[];return Je(r,{getChildren:this.getNodeChildren,onEnter:(a,o)=>{o.length!==0&&(!(i!=null&&i.withBranch)&&this.isBranchNode(a)||s.push(a))}}),s}),L(this,"getDescendantValues",(n,i)=>this.getDescendantNodes(n,i).map(s=>this.getNodeValue(s))),L(this,"getParentIndexPath",n=>n.slice(0,-1)),L(this,"getParentNode",n=>{let i=this.resolveIndexPath(n);return i?this.at(this.getParentIndexPath(i)):void 0}),L(this,"visit",n=>{let s=n,{skip:i}=s,r=ft(s,["skip"]);Je(this.rootNode,y(g({},r),{getChildren:this.getNodeChildren,onEnter:(a,o)=>{var l;if(!this.isRootNode(a))return i!=null&&i({value:this.getNodeValue(a),node:a,indexPath:o})?"skip":(l=r.onEnter)==null?void 0:l.call(r,a,o)}}))}),L(this,"getPreviousSibling",n=>{let i=this.getParentNode(n);if(!i)return;let r=this.getNodeChildren(i),s=n[n.length-1];for(;--s>=0;){let a=r[s];if(!this.getNodeDisabled(a))return a}}),L(this,"getNextSibling",n=>{let i=this.getParentNode(n);if(!i)return;let r=this.getNodeChildren(i),s=n[n.length-1];for(;++s{let i=this.getParentNode(n);return i?this.getNodeChildren(i):[]}),L(this,"getValues",(n=this.rootNode)=>Mb(n,{getChildren:this.getNodeChildren,transform:r=>[this.getNodeValue(r)]}).slice(1)),L(this,"isValidDepth",(n,i)=>i==null?!0:typeof i=="function"?i(n.length):n.length===i),L(this,"isBranchNode",n=>this.getNodeChildren(n).length>0||this.getNodeChildrenCount(n)!=null),L(this,"getBranchValues",(n=this.rootNode,i={})=>{let r=[];return Je(n,{getChildren:this.getNodeChildren,onEnter:(s,a)=>{var l;if(a.length===0)return;let o=this.getNodeValue(s);if((l=i.skip)!=null&&l.call(i,{value:o,node:s,indexPath:a}))return"skip";this.isBranchNode(s)&&this.isValidDepth(a,i.depth)&&r.push(this.getNodeValue(s))}}),r}),L(this,"flatten",(n=this.rootNode)=>$b(n,{getChildren:this.getNodeChildren})),L(this,"_create",(n,i)=>this.getNodeChildren(n).length>0||i.length>0?y(g({},n),{children:i}):g({},n)),L(this,"_insert",(n,i,r)=>this.copy(Ub(n,{at:i,nodes:r,getChildren:this.getNodeChildren,create:this._create}))),L(this,"copy",n=>new pd(y(g({},this.options),{rootNode:n}))),L(this,"_replace",(n,i,r)=>this.copy(qb(n,{at:i,node:r,getChildren:this.getNodeChildren,create:this._create}))),L(this,"_move",(n,i,r)=>this.copy(Kb(n,{indexPaths:i,to:r,getChildren:this.getNodeChildren,create:this._create}))),L(this,"_remove",(n,i)=>this.copy(Wb(n,{indexPaths:i,getChildren:this.getNodeChildren,create:this._create}))),L(this,"replace",(n,i)=>this._replace(this.rootNode,n,i)),L(this,"remove",n=>this._remove(this.rootNode,n)),L(this,"insertBefore",(n,i)=>this.getParentNode(n)?this._insert(this.rootNode,n,i):void 0),L(this,"insertAfter",(n,i)=>{if(!this.getParentNode(n))return;let s=[...n.slice(0,-1),n[n.length-1]+1];return this._insert(this.rootNode,s,i)}),L(this,"move",(n,i)=>this._move(this.rootNode,n,i)),L(this,"filter",n=>{let i=Fb(this.rootNode,{predicate:n,getChildren:this.getNodeChildren,create:this._create});return this.copy(i)}),L(this,"toJSON",()=>this.getValues(this.rootNode)),this.rootNode=t.rootNode}},wi={nodeToValue(e){return typeof e=="string"?e:xt(e)&&$e(e,"value")?e.value:""},nodeToString(e){return typeof e=="string"?e:xt(e)&&$e(e,"label")?e.label:wi.nodeToValue(e)},isNodeDisabled(e){return xt(e)&&$e(e,"disabled")?!!e.disabled:!1},nodeToChildren(e){return e.children},nodeToChildrenCount(e){if(xt(e)&&$e(e,"childrenCount"))return e.childrenCount}}});function No(e,t,n){return Qe(e,Sn(t,n))}function Qt(e,t){return typeof e=="function"?e(t):e}function en(e){return e.split("-")[0]}function Ai(e){return e.split("-")[1]}function Lo(e){return e==="x"?"y":"x"}function Mo(e){return e==="y"?"height":"width"}function Rt(e){return Xb.has(en(e))?"y":"x"}function Fo(e){return Lo(Rt(e))}function Zb(e,t,n){n===void 0&&(n=!1);let i=Ai(e),r=Fo(e),s=Mo(r),a=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Hs(a)),[a,Hs(a)]}function Jb(e){let t=Hs(e);return[Ro(e),t,Ro(t)]}function Ro(e){return e.replace(/start|end/g,t=>jb[t])}function tE(e,t,n){switch(e){case"top":case"bottom":return n?t?md:fd:t?fd:md;case"left":case"right":return t?Qb:eE;default:return[]}}function nE(e,t,n,i){let r=Ai(e),s=tE(en(e),n==="start",i);return r&&(s=s.map(a=>a+"-"+r),t&&(s=s.concat(s.map(Ro)))),s}function Hs(e){return e.replace(/left|right|bottom|top/g,t=>Yb[t])}function iE(e){return g({top:0,right:0,bottom:0,left:0},e)}function Od(e){return typeof e!="number"?iE(e):{top:e,right:e,bottom:e,left:e}}function Bs(e){let{x:t,y:n,width:i,height:r}=e;return{width:i,height:r,top:n,left:t,right:t+i,bottom:n+r,x:t,y:n}}function vd(e,t,n){let{reference:i,floating:r}=e,s=Rt(t),a=Fo(t),o=Mo(a),l=en(t),c=s==="y",u=i.x+i.width/2-r.width/2,h=i.y+i.height/2-r.height/2,m=i[o]/2-r[o]/2,d;switch(l){case"top":d={x:u,y:i.y-r.height};break;case"bottom":d={x:u,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:h};break;case"left":d={x:i.x-r.width,y:h};break;default:d={x:i.x,y:i.y}}switch(Ai(t)){case"start":d[a]-=m*(n&&c?-1:1);break;case"end":d[a]+=m*(n&&c?-1:1);break}return d}function rE(e,t){return Ve(this,null,function*(){var n;t===void 0&&(t={});let{x:i,y:r,platform:s,rects:a,elements:o,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:m=!1,padding:d=0}=Qt(t,e),p=Od(d),I=o[m?h==="floating"?"reference":"floating":h],T=Bs(yield s.getClippingRect({element:(n=yield s.isElement==null?void 0:s.isElement(I))==null||n?I:I.contextElement||(yield s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:c,rootBoundary:u,strategy:l})),O=h==="floating"?{x:i,y:r,width:a.floating.width,height:a.floating.height}:a.reference,b=yield s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating),f=(yield s.isElement==null?void 0:s.isElement(b))?(yield s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},S=Bs(s.convertOffsetParentRelativeRectToViewportRelativeRect?yield s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:O,offsetParent:b,strategy:l}):O);return{top:(T.top-S.top+p.top)/f.y,bottom:(S.bottom-T.bottom+p.bottom)/f.y,left:(T.left-S.left+p.left)/f.x,right:(S.right-T.right+p.right)/f.x}})}function yd(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bd(e){return zb.some(t=>e[t]>=0)}function cE(e,t){return Ve(this,null,function*(){let{placement:n,platform:i,elements:r}=e,s=yield i.isRTL==null?void 0:i.isRTL(r.floating),a=en(n),o=Ai(n),l=Rt(n)==="y",c=wd.has(a)?-1:1,u=s&&l?-1:1,h=Qt(t,e),{mainAxis:m,crossAxis:d,alignmentAxis:p}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return o&&typeof p=="number"&&(d=o==="end"?p*-1:p),l?{x:d*u,y:m*c}:{x:m*c,y:d*u}})}function _s(){return typeof window!="undefined"}function ki(e){return Vd(e)?(e.nodeName||"").toLowerCase():"#document"}function et(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mt(e){var t;return(t=(Vd(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Vd(e){return _s()?e instanceof Node||e instanceof et(e).Node:!1}function bt(e){return _s()?e instanceof Element||e instanceof et(e).Element:!1}function Lt(e){return _s()?e instanceof HTMLElement||e instanceof et(e).HTMLElement:!1}function Ed(e){return!_s()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof et(e).ShadowRoot}function Ir(e){let{overflow:t,overflowX:n,overflowY:i,display:r}=Et(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!pE.has(r)}function mE(e){return fE.has(ki(e))}function Gs(e){return vE.some(t=>{try{return e.matches(t)}catch(n){return!1}})}function $o(e){let t=Ho(),n=bt(e)?Et(e):e;return yE.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||bE.some(i=>(n.willChange||"").includes(i))||EE.some(i=>(n.contain||"").includes(i))}function IE(e){let t=Tn(e);for(;Lt(t)&&!xi(t);){if($o(t))return t;if(Gs(t))return null;t=Tn(t)}return null}function Ho(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function xi(e){return PE.has(ki(e))}function Et(e){return et(e).getComputedStyle(e)}function Us(e){return bt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Tn(e){if(ki(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Ed(e)&&e.host||Mt(e);return Ed(t)?t.host:t}function xd(e){let t=Tn(e);return xi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Lt(t)&&Ir(t)?t:xd(t)}function Er(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);let r=xd(e),s=r===((i=e.ownerDocument)==null?void 0:i.body),a=et(r);if(s){let o=Do(a);return t.concat(a,a.visualViewport||[],Ir(r)?r:[],o&&n?Er(o):[])}return t.concat(r,Er(r,[],n))}function Do(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ad(e){let t=Et(e),n=parseFloat(t.width)||0,i=parseFloat(t.height)||0,r=Lt(e),s=r?e.offsetWidth:n,a=r?e.offsetHeight:i,o=$s(n)!==s||$s(i)!==a;return o&&(n=s,i=a),{width:n,height:i,$:o}}function Bo(e){return bt(e)?e:e.contextElement}function Vi(e){let t=Bo(e);if(!Lt(t))return Dt(1);let n=t.getBoundingClientRect(),{width:i,height:r,$:s}=Ad(t),a=(s?$s(n.width):n.width)/i,o=(s?$s(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}function kd(e){let t=et(e);return!Ho()||!t.visualViewport?CE:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function SE(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==et(e)?!1:t}function qn(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);let r=e.getBoundingClientRect(),s=Bo(e),a=Dt(1);t&&(i?bt(i)&&(a=Vi(i)):a=Vi(e));let o=SE(s,n,i)?kd(s):Dt(0),l=(r.left+o.x)/a.x,c=(r.top+o.y)/a.y,u=r.width/a.x,h=r.height/a.y;if(s){let m=et(s),d=i&&bt(i)?et(i):i,p=m,v=Do(p);for(;v&&i&&d!==p;){let I=Vi(v),T=v.getBoundingClientRect(),O=Et(v),b=T.left+(v.clientLeft+parseFloat(O.paddingLeft))*I.x,f=T.top+(v.clientTop+parseFloat(O.paddingTop))*I.y;l*=I.x,c*=I.y,u*=I.x,h*=I.y,l+=b,c+=f,p=et(v),v=Do(p)}}return Bs({width:u,height:h,x:l,y:c})}function qs(e,t){let n=Us(e).scrollLeft;return t?t.left+n:qn(Mt(e)).left+n}function Nd(e,t){let n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-qs(e,n),r=n.top+t.scrollTop;return{x:i,y:r}}function TE(e){let{elements:t,rect:n,offsetParent:i,strategy:r}=e,s=r==="fixed",a=Mt(i),o=t?Gs(t.floating):!1;if(i===a||o&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Dt(1),u=Dt(0),h=Lt(i);if((h||!h&&!s)&&((ki(i)!=="body"||Ir(a))&&(l=Us(i)),Lt(i))){let d=qn(i);c=Vi(i),u.x=d.x+i.clientLeft,u.y=d.y+i.clientTop}let m=a&&!h&&!s?Nd(a,l):Dt(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+m.x,y:n.y*c.y-l.scrollTop*c.y+u.y+m.y}}function OE(e){return Array.from(e.getClientRects())}function wE(e){let t=Mt(e),n=Us(e),i=e.ownerDocument.body,r=Qe(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),s=Qe(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight),a=-n.scrollLeft+qs(e),o=-n.scrollTop;return Et(i).direction==="rtl"&&(a+=Qe(t.clientWidth,i.clientWidth)-r),{width:r,height:s,x:a,y:o}}function VE(e,t){let n=et(e),i=Mt(e),r=n.visualViewport,s=i.clientWidth,a=i.clientHeight,o=0,l=0;if(r){s=r.width,a=r.height;let u=Ho();(!u||u&&t==="fixed")&&(o=r.offsetLeft,l=r.offsetTop)}let c=qs(i);if(c<=0){let u=i.ownerDocument,h=u.body,m=getComputedStyle(h),d=u.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,p=Math.abs(i.clientWidth-h.clientWidth-d);p<=Id&&(s-=p)}else c<=Id&&(s+=c);return{width:s,height:a,x:o,y:l}}function AE(e,t){let n=qn(e,!0,t==="fixed"),i=n.top+e.clientTop,r=n.left+e.clientLeft,s=Lt(e)?Vi(e):Dt(1),a=e.clientWidth*s.x,o=e.clientHeight*s.y,l=r*s.x,c=i*s.y;return{width:a,height:o,x:l,y:c}}function Pd(e,t,n){let i;if(t==="viewport")i=VE(e,n);else if(t==="document")i=wE(Mt(e));else if(bt(t))i=AE(t,n);else{let r=kd(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Bs(i)}function Rd(e,t){let n=Tn(e);return n===t||!bt(n)||xi(n)?!1:Et(n).position==="fixed"||Rd(n,t)}function kE(e,t){let n=t.get(e);if(n)return n;let i=Er(e,[],!1).filter(o=>bt(o)&&ki(o)!=="body"),r=null,s=Et(e).position==="fixed",a=s?Tn(e):e;for(;bt(a)&&!xi(a);){let o=Et(a),l=$o(a);!l&&o.position==="fixed"&&(r=null),(s?!l&&!r:!l&&o.position==="static"&&!!r&&xE.has(r.position)||Ir(a)&&!l&&Rd(e,a))?i=i.filter(u=>u!==a):r=o,a=Tn(a)}return t.set(e,i),i}function NE(e){let{element:t,boundary:n,rootBoundary:i,strategy:r}=e,a=[...n==="clippingAncestors"?Gs(t)?[]:kE(t,this._c):[].concat(n),i],o=a[0],l=a.reduce((c,u)=>{let h=Pd(t,u,r);return c.top=Qe(h.top,c.top),c.right=Sn(h.right,c.right),c.bottom=Sn(h.bottom,c.bottom),c.left=Qe(h.left,c.left),c},Pd(t,o,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function RE(e){let{width:t,height:n}=Ad(e);return{width:t,height:n}}function DE(e,t,n){let i=Lt(t),r=Mt(t),s=n==="fixed",a=qn(e,!0,s,t),o={scrollLeft:0,scrollTop:0},l=Dt(0);function c(){l.x=qs(r)}if(i||!i&&!s)if((ki(t)!=="body"||Ir(r))&&(o=Us(t)),i){let d=qn(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else r&&c();s&&!i&&r&&c();let u=r&&!i&&!s?Nd(r,o):Dt(0),h=a.left+o.scrollLeft-l.x-u.x,m=a.top+o.scrollTop-l.y-u.y;return{x:h,y:m,width:a.width,height:a.height}}function ko(e){return Et(e).position==="static"}function Cd(e,t){if(!Lt(e)||Et(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Mt(e)===n&&(n=n.ownerDocument.body),n}function Dd(e,t){let n=et(e);if(Gs(e))return n;if(!Lt(e)){let r=Tn(e);for(;r&&!xi(r);){if(bt(r)&&!ko(r))return r;r=Tn(r)}return n}let i=Cd(e,t);for(;i&&mE(i)&&ko(i);)i=Cd(i,t);return i&&xi(i)&&ko(i)&&!$o(i)?n:i||IE(e)||n}function ME(e){return Et(e).direction==="rtl"}function Ld(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $E(e,t){let n=null,i,r=Mt(e);function s(){var o;clearTimeout(i),(o=n)==null||o.disconnect(),n=null}function a(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),s();let c=e.getBoundingClientRect(),{left:u,top:h,width:m,height:d}=c;if(o||t(),!m||!d)return;let p=Fs(h),v=Fs(r.clientWidth-(u+m)),I=Fs(r.clientHeight-(h+d)),T=Fs(u),b={rootMargin:-p+"px "+-v+"px "+-I+"px "+-T+"px",threshold:Qe(0,Sn(1,l))||1},f=!0;function S(P){let V=P[0].intersectionRatio;if(V!==l){if(!f)return a();V?a(!1,V):i=setTimeout(()=>{a(!1,1e-7)},1e3)}V===1&&!Ld(c,e.getBoundingClientRect())&&a(),f=!1}try{n=new IntersectionObserver(S,y(g({},b),{root:r.ownerDocument}))}catch(P){n=new IntersectionObserver(S,b)}n.observe(e)}return a(!0),s}function HE(e,t,n,i){i===void 0&&(i={});let{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=Bo(e),u=r||s?[...c?Er(c):[],...Er(t)]:[];u.forEach(T=>{r&&T.addEventListener("scroll",n,{passive:!0}),s&&T.addEventListener("resize",n)});let h=c&&o?$E(c,n):null,m=-1,d=null;a&&(d=new ResizeObserver(T=>{let[O]=T;O&&O.target===c&&d&&(d.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=d)==null||b.observe(t)})),n()}),c&&!l&&d.observe(c),d.observe(t));let p,v=l?qn(e):null;l&&I();function I(){let T=qn(e);v&&!Ld(v,T)&&n(),v=T,p=requestAnimationFrame(I)}return n(),()=>{var T;u.forEach(O=>{r&&O.removeEventListener("scroll",n),s&&O.removeEventListener("resize",n)}),h==null||h(),(T=d)==null||T.disconnect(),d=null,l&&cancelAnimationFrame(p)}}function Sd(e=0,t=0,n=0,i=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,i);let r={x:e,y:t,width:n,height:i,top:t,right:e+n,bottom:t+i,left:e};return y(g({},r),{toJSON:()=>r})}function YE(e){if(!e)return Sd();let{x:t,y:n,width:i,height:r}=e;return Sd(t,n,i,r)}function jE(e,t){return{contextElement:le(e)?e:e==null?void 0:e.contextElement,getBoundingClientRect:()=>{let n=e,i=t==null?void 0:t(n);return i||!n?YE(i):n.getBoundingClientRect()}}}function ZE(e,t){return{name:"transformOrigin",fn(n){var x,k,N,D,$;let{elements:i,middlewareData:r,placement:s,rects:a,y:o}=n,l=s.split("-")[0],c=XE(l),u=((x=r.arrow)==null?void 0:x.x)||0,h=((k=r.arrow)==null?void 0:k.y)||0,m=(t==null?void 0:t.clientWidth)||0,d=(t==null?void 0:t.clientHeight)||0,p=u+m/2,v=h+d/2,I=Math.abs(((N=r.shift)==null?void 0:N.y)||0),T=a.reference.height/2,O=d/2,b=($=(D=e.offset)==null?void 0:D.mainAxis)!=null?$:e.gutter,f=typeof b=="number"?b+O:b!=null?b:O,S=I>f,P={top:`${p}px calc(100% + ${f}px)`,bottom:`${p}px ${-f}px`,left:`calc(100% + ${f}px) ${v}px`,right:`${-f}px ${v}px`}[l],V=`${p}px ${a.reference.y+T-o}px`,A=!!e.overlap&&c==="y"&&S;return i.floating.style.setProperty(Jt.transformOrigin.variable,A?V:P),{data:{transformOrigin:A?V:P}}}}}function eI(e){let[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}function Md(e){return e.split("-")[0]}function Td(e,t){let n=e.devicePixelRatio||1;return Math.round(t*n)/n}function _o(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function nI(e,t,n){let i=e||t.createElement("div");return WE({element:i,padding:n.arrowPadding})}function iI(e,t){var n;if(!Wc((n=t.offset)!=null?n:t.gutter))return BE(({placement:i})=>{var u,h,m,d;let r=((e==null?void 0:e.clientHeight)||0)/2,s=(h=(u=t.offset)==null?void 0:u.mainAxis)!=null?h:t.gutter,a=typeof s=="number"?s+r:s!=null?s:r,{hasAlign:o}=eI(i),l=o?void 0:t.shift,c=(d=(m=t.offset)==null?void 0:m.crossAxis)!=null?d:l;return Si({crossAxis:c,mainAxis:a,alignmentAxis:t.shift})})}function rI(e){if(!e.flip)return;let t=_o(e.boundary);return GE(y(g({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function sI(e){if(!e.slide&&!e.overlap)return;let t=_o(e.boundary);return _E(y(g({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:KE()}))}function aI(e){return UE({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:i,availableWidth:r}){let s=t.floating,a=Math.round(n.reference.width),o=Math.round(n.reference.height);r=Math.floor(r),i=Math.floor(i),s.style.setProperty("--reference-width",`${a}px`),s.style.setProperty("--reference-height",`${o}px`),s.style.setProperty("--available-width",`${r}px`),s.style.setProperty("--available-height",`${i}px`)}})}function oI(e){var t;if(e.hideWhenDetached)return qE({strategy:"referenceHidden",boundary:(t=_o(e.boundary))!=null?t:"clippingAncestors"})}function lI(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function cI(e,t,n={}){var I,T;let i=(T=(I=n.getAnchorElement)==null?void 0:I.call(n))!=null?T:e,r=jE(i,n.getAnchorRect);if(!t||!r)return;let s=Object.assign({},tI,n),a=t.querySelector("[data-part=arrow]"),o=[iI(a,s),rI(s),sI(s),nI(a,t.ownerDocument,s),QE(a),ZE({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),aI(s),oI(s),JE],{placement:l,strategy:c,onComplete:u,onPositioned:h}=s,m=()=>Ve(null,null,function*(){var V;if(!r||!t)return;let O=yield zE(r,t,{placement:l,middleware:o,strategy:c});u==null||u(O),h==null||h({placed:!0});let b=ue(t),f=Td(b,O.x),S=Td(b,O.y);t.style.setProperty("--x",`${f}px`),t.style.setProperty("--y",`${S}px`),s.hideWhenDetached&&(((V=O.middlewareData.hide)==null?void 0:V.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));let P=t.firstElementChild;if(P){let A=at(P);t.style.setProperty("--z-index",A.zIndex)}}),d=()=>Ve(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),h==null||h({placed:!0})):yield m()}),p=lI(s.listeners),v=s.listeners?HE(r,t,d,p):zc;return d(),()=>{v==null||v(),h==null||h({placed:!1})}}function It(e,t,n={}){let o=n,{defer:i}=o,r=ft(o,["defer"]),s=i?H:l=>l(),a=[];return a.push(s(()=>{let l=typeof e=="function"?e():e,c=typeof t=="function"?t():t;a.push(cI(l,c,r))})),()=>{a.forEach(l=>l==null?void 0:l())}}function On(e={}){let{placement:t,sameWidth:n,fitViewport:i,strategy:r="absolute"}=e;return{arrow:{position:"absolute",width:Jt.arrowSize.reference,height:Jt.arrowSize.reference,[Jt.arrowSizeHalf.variable]:`calc(${Jt.arrowSize.reference} / 2)`,[Jt.arrowOffset.variable]:`calc(${Jt.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?uI[t.split("-")[0]]:void 0,background:Jt.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:r,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:i?"var(--available-width)":void 0,maxHeight:i?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var zb,Sn,Qe,$s,Fs,Dt,Yb,jb,Xb,fd,md,Qb,eE,sE,aE,oE,lE,wd,uE,dE,hE,gE,pE,fE,vE,yE,bE,EE,PE,CE,Id,xE,LE,FE,BE,_E,GE,UE,qE,WE,KE,zE,br,Jt,XE,JE,QE,tI,uI,Pr=re(()=>{"use strict";se();zb=["top","right","bottom","left"],Sn=Math.min,Qe=Math.max,$s=Math.round,Fs=Math.floor,Dt=e=>({x:e,y:e}),Yb={left:"right",right:"left",bottom:"top",top:"bottom"},jb={start:"end",end:"start"};Xb=new Set(["top","bottom"]);fd=["left","right"],md=["right","left"],Qb=["top","bottom"],eE=["bottom","top"];sE=(e,t,n)=>Ve(null,null,function*(){let{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:a}=n,o=s.filter(Boolean),l=yield a.isRTL==null?void 0:a.isRTL(t),c=yield a.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:h}=vd(c,i,l),m=i,d={},p=0;for(let I=0;I({name:"arrow",options:e,fn(n){return Ve(this,null,function*(){let{x:i,y:r,placement:s,rects:a,platform:o,elements:l,middlewareData:c}=n,{element:u,padding:h=0}=Qt(e,n)||{};if(u==null)return{};let m=Od(h),d={x:i,y:r},p=Fo(s),v=Mo(p),I=yield o.getDimensions(u),T=p==="y",O=T?"top":"left",b=T?"bottom":"right",f=T?"clientHeight":"clientWidth",S=a.reference[v]+a.reference[p]-d[p]-a.floating[v],P=d[p]-a.reference[p],V=yield o.getOffsetParent==null?void 0:o.getOffsetParent(u),A=V?V[f]:0;(!A||!(yield o.isElement==null?void 0:o.isElement(V)))&&(A=l.floating[f]||a.floating[v]);let x=S/2-P/2,k=A/2-I[v]/2-1,N=Sn(m[O],k),D=Sn(m[b],k),$=N,te=A-I[v]-D,Z=A/2-I[v]/2+x,ie=No($,Z,te),J=!c.arrow&&Ai(s)!=null&&Z!==ie&&a.reference[v]/2-(Z<$?N:D)-I[v]/2<0,Se=J?Z<$?Z-$:Z-te:0;return{[p]:d[p]+Se,data:g({[p]:ie,centerOffset:Z-ie-Se},J&&{alignmentOffset:Se}),reset:J}})}}),oE=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Ve(this,null,function*(){var i,r;let{placement:s,middlewareData:a,rects:o,initialPlacement:l,platform:c,elements:u}=n,Z=Qt(e,n),{mainAxis:h=!0,crossAxis:m=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:I=!0}=Z,T=ft(Z,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((i=a.arrow)!=null&&i.alignmentOffset)return{};let O=en(s),b=Rt(l),f=en(l)===l,S=yield c.isRTL==null?void 0:c.isRTL(u.floating),P=d||(f||!I?[Hs(l)]:Jb(l)),V=v!=="none";!d&&V&&P.push(...nE(l,I,v,S));let A=[l,...P],x=yield c.detectOverflow(n,T),k=[],N=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&k.push(x[O]),m){let ie=Zb(s,o,S);k.push(x[ie[0]],x[ie[1]])}if(N=[...N,{placement:s,overflows:k}],!k.every(ie=>ie<=0)){var D,$;let ie=(((D=a.flip)==null?void 0:D.index)||0)+1,J=A[ie];if(J&&(!(m==="alignment"?b!==Rt(J):!1)||N.every(ne=>Rt(ne.placement)===b?ne.overflows[0]>0:!0)))return{data:{index:ie,overflows:N},reset:{placement:J}};let Se=($=N.filter(Pe=>Pe.overflows[0]<=0).sort((Pe,ne)=>Pe.overflows[1]-ne.overflows[1])[0])==null?void 0:$.placement;if(!Se)switch(p){case"bestFit":{var te;let Pe=(te=N.filter(ne=>{if(V){let Ie=Rt(ne.placement);return Ie===b||Ie==="y"}return!0}).map(ne=>[ne.placement,ne.overflows.filter(Ie=>Ie>0).reduce((Ie,rt)=>Ie+rt,0)]).sort((ne,Ie)=>ne[1]-Ie[1])[0])==null?void 0:te[0];Pe&&(Se=Pe);break}case"initialPlacement":Se=l;break}if(s!==Se)return{reset:{placement:Se}}}return{}})}}};lE=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Ve(this,null,function*(){let{rects:i,platform:r}=n,o=Qt(e,n),{strategy:s="referenceHidden"}=o,a=ft(o,["strategy"]);switch(s){case"referenceHidden":{let l=yield r.detectOverflow(n,y(g({},a),{elementContext:"reference"})),c=yd(l,i.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:bd(c)}}}case"escaped":{let l=yield r.detectOverflow(n,y(g({},a),{altBoundary:!0})),c=yd(l,i.floating);return{data:{escapedOffsets:c,escaped:bd(c)}}}default:return{}}})}}},wd=new Set(["left","top"]);uE=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Ve(this,null,function*(){var i,r;let{x:s,y:a,placement:o,middlewareData:l}=n,c=yield cE(n,e);return o===((i=l.offset)==null?void 0:i.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:a+c.y,data:y(g({},c),{placement:o})}})}}},dE=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Ve(this,null,function*(){let{x:i,y:r,placement:s,platform:a}=n,O=Qt(e,n),{mainAxis:o=!0,crossAxis:l=!1,limiter:c={fn:b=>{let{x:f,y:S}=b;return{x:f,y:S}}}}=O,u=ft(O,["mainAxis","crossAxis","limiter"]),h={x:i,y:r},m=yield a.detectOverflow(n,u),d=Rt(en(s)),p=Lo(d),v=h[p],I=h[d];if(o){let b=p==="y"?"top":"left",f=p==="y"?"bottom":"right",S=v+m[b],P=v-m[f];v=No(S,v,P)}if(l){let b=d==="y"?"top":"left",f=d==="y"?"bottom":"right",S=I+m[b],P=I-m[f];I=No(S,I,P)}let T=c.fn(y(g({},n),{[p]:v,[d]:I}));return y(g({},T),{data:{x:T.x-i,y:T.y-r,enabled:{[p]:o,[d]:l}}})})}}},hE=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:i,placement:r,rects:s,middlewareData:a}=t,{offset:o=0,mainAxis:l=!0,crossAxis:c=!0}=Qt(e,t),u={x:n,y:i},h=Rt(r),m=Lo(h),d=u[m],p=u[h],v=Qt(o,t),I=typeof v=="number"?{mainAxis:v,crossAxis:0}:g({mainAxis:0,crossAxis:0},v);if(l){let b=m==="y"?"height":"width",f=s.reference[m]-s.floating[b]+I.mainAxis,S=s.reference[m]+s.reference[b]-I.mainAxis;dS&&(d=S)}if(c){var T,O;let b=m==="y"?"width":"height",f=wd.has(en(r)),S=s.reference[h]-s.floating[b]+(f&&((T=a.offset)==null?void 0:T[h])||0)+(f?0:I.crossAxis),P=s.reference[h]+s.reference[b]+(f?0:((O=a.offset)==null?void 0:O[h])||0)-(f?I.crossAxis:0);pP&&(p=P)}return{[m]:d,[h]:p}}}},gE=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Ve(this,null,function*(){var i,r;let{placement:s,rects:a,platform:o,elements:l}=n,N=Qt(e,n),{apply:c=()=>{}}=N,u=ft(N,["apply"]),h=yield o.detectOverflow(n,u),m=en(s),d=Ai(s),p=Rt(s)==="y",{width:v,height:I}=a.floating,T,O;m==="top"||m==="bottom"?(T=m,O=d===((yield o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(O=m,T=d==="end"?"top":"bottom");let b=I-h.top-h.bottom,f=v-h.left-h.right,S=Sn(I-h[T],b),P=Sn(v-h[O],f),V=!n.middlewareData.shift,A=S,x=P;if((i=n.middlewareData.shift)!=null&&i.enabled.x&&(x=f),(r=n.middlewareData.shift)!=null&&r.enabled.y&&(A=b),V&&!d){let D=Qe(h.left,0),$=Qe(h.right,0),te=Qe(h.top,0),Z=Qe(h.bottom,0);p?x=v-2*(D!==0||$!==0?D+$:Qe(h.left,h.right)):A=I-2*(te!==0||Z!==0?te+Z:Qe(h.top,h.bottom))}yield c(y(g({},n),{availableWidth:x,availableHeight:A}));let k=yield o.getDimensions(l.floating);return v!==k.width||I!==k.height?{reset:{rects:!0}}:{}})}}};pE=new Set(["inline","contents"]);fE=new Set(["table","td","th"]);vE=[":popover-open",":modal"];yE=["transform","translate","scale","rotate","perspective"],bE=["transform","translate","scale","rotate","perspective","filter"],EE=["paint","layout","strict","content"];PE=new Set(["html","body","#document"]);CE=Dt(0);Id=25;xE=new Set(["absolute","fixed"]);LE=function(e){return Ve(this,null,function*(){let t=this.getOffsetParent||Dd,n=this.getDimensions,i=yield n(e.floating);return{reference:DE(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}})};FE={convertOffsetParentRelativeRectToViewportRelativeRect:TE,getDocumentElement:Mt,getClippingRect:NE,getOffsetParent:Dd,getElementRects:LE,getClientRects:OE,getDimensions:RE,getScale:Vi,isElement:bt,isRTL:ME};BE=uE,_E=dE,GE=oE,UE=gE,qE=lE,WE=aE,KE=hE,zE=(e,t,n)=>{let i=new Map,r=g({platform:FE},n),s=y(g({},r.platform),{_c:i});return sE(e,t,y(g({},r),{platform:s}))};br=e=>({variable:e,reference:`var(${e})`}),Jt={arrowSize:br("--arrow-size"),arrowSizeHalf:br("--arrow-size-half"),arrowBg:br("--arrow-background"),transformOrigin:br("--transform-origin"),arrowOffset:br("--arrow-offset")},XE=e=>e==="top"||e==="bottom"?"y":"x";JE={name:"rects",fn({rects:e}){return{data:e}}},QE=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};let{x:i,y:r}=n.arrow,s=t.split("-")[0];return Object.assign(e.style,{left:i!=null?`${i}px`:"",top:r!=null?`${r}px`:"",[s]:`calc(100% + ${Jt.arrowOffset.reference})`}),{}}}};tI={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};uI={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"}});function dI(e){let t={each(n){var i;for(let r=0;r<((i=e.frames)==null?void 0:i.length);r+=1){let s=e.frames[r];s&&n(s)}},addEventListener(n,i,r){return t.each(s=>{try{s.document.addEventListener(n,i,r)}catch(a){}}),()=>{try{t.removeEventListener(n,i,r)}catch(s){}}},removeEventListener(n,i,r){t.each(s=>{try{s.document.removeEventListener(n,i,r)}catch(a){}})}};return t}function hI(e){let t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,i,r)=>{try{t==null||t.addEventListener(n,i,r)}catch(s){}return()=>{try{t==null||t.removeEventListener(n,i,r)}catch(s){}}},removeEventListener:(n,i,r)=>{try{t==null||t.removeEventListener(n,i,r)}catch(s){}}}}function gI(e){for(let t of e)if(le(t)&&Ye(t))return!0;return!1}function pI(e,t){if(!_d(t)||!e)return!1;let n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function fI(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function Hd(e,t){if(!t||!_d(e))return!1;let n=t.scrollHeight>t.clientHeight,i=n&&e.clientX>t.offsetLeft+t.clientWidth,r=t.scrollWidth>t.clientWidth,s=r&&e.clientY>t.offsetTop+t.clientHeight,a={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(r?16:0)},o={x:e.clientX,y:e.clientY};return fI(a,o)?i||s:!1}function mI(e,t){let{exclude:n,onFocusOutside:i,onPointerDownOutside:r,onInteractOutside:s,defer:a,followControlledElements:o=!0}=t;if(!e)return;let l=Le(e),c=ue(e),u=dI(c),h=hI(c);function m(b,f){if(!le(f)||!f.isConnected||ce(e,f)||pI(e,b)||o&&as(e,f))return!1;let S=l.querySelector(`[aria-controls="${e.id}"]`);if(S){let V=gs(S);if(Hd(b,V))return!1}let P=gs(e);return Hd(b,P)?!1:!(n!=null&&n(f))}let d=new Set,p=Ln(e==null?void 0:e.getRootNode());function v(b){function f(S){var x,k;let P=a&&!Ja()?H:N=>N(),V=S!=null?S:b,A=(k=(x=V==null?void 0:V.composedPath)==null?void 0:x.call(V))!=null?k:[V==null?void 0:V.target];P(()=>{let N=p?A[0]:j(b);if(!(!e||!m(b,N))){if(r||s){let D=At(r,s);e.addEventListener(Fd,D,{once:!0})}Bd(e,Fd,{bubbles:!1,cancelable:!0,detail:{originalEvent:V,contextmenu:hi(V),focusable:gI(A),target:N}})}})}b.pointerType==="touch"?(d.forEach(S=>S()),d.add(ee(l,"click",f,{once:!0})),d.add(h.addEventListener("click",f,{once:!0})),d.add(u.addEventListener("click",f,{once:!0}))):f()}let I=new Set,T=setTimeout(()=>{I.add(ee(l,"pointerdown",v,!0)),I.add(h.addEventListener("pointerdown",v,!0)),I.add(u.addEventListener("pointerdown",v,!0))},0);function O(b){(a?H:S=>S())(()=>{var V,A;let S=(A=(V=b==null?void 0:b.composedPath)==null?void 0:V.call(b))!=null?A:[b==null?void 0:b.target],P=p?S[0]:j(b);if(!(!e||!m(b,P))){if(i||s){let x=At(i,s);e.addEventListener($d,x,{once:!0})}Bd(e,$d,{bubbles:!1,cancelable:!0,detail:{originalEvent:b,contextmenu:!1,focusable:Ye(P),target:P}})}})}return Ja()||(I.add(ee(l,"focusin",O,!0)),I.add(h.addEventListener("focusin",O,!0)),I.add(u.addEventListener("focusin",O,!0))),()=>{clearTimeout(T),d.forEach(b=>b()),I.forEach(b=>b())}}function Ws(e,t){let{defer:n}=t,i=n?H:s=>s(),r=[];return r.push(i(()=>{let s=typeof e=="function"?e():e;r.push(mI(s,t))})),()=>{r.forEach(s=>s==null?void 0:s())}}function Bd(e,t,n){let i=e.ownerDocument.defaultView||window,r=new i.CustomEvent(t,n);return e.dispatchEvent(r)}var Fd,$d,_d,tn=re(()=>{"use strict";se();Fd="pointerdown.outside",$d="focus.outside";_d=e=>"clientY"in e});function vI(e,t){let n=i=>{i.key==="Escape"&&(i.isComposing||t==null||t(i))};return ee(Le(e),"keydown",n,{capture:!0})}function yI(e,t,n){let i=e.ownerDocument.defaultView||window,r=new i.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(r)}function bI(e,t,n){e.addEventListener(t,n,{once:!0})}function qd(){We.layers.forEach(({node:e})=>{e.style.pointerEvents=We.isBelowPointerBlockingLayer(e)?"none":"auto"})}function EI(e){e.style.pointerEvents=""}function II(e,t){let n=Le(e),i=[];return We.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(Ud=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(r=>{let[s,a]=Hc(()=>{let o=r();return le(o)?o:null},{timeout:1e3});s.then(o=>i.push(Hn(o,{pointerEvents:"auto"}))),i.push(a)}),()=>{We.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=Ud,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),i.forEach(r=>r()))}}function PI(e,t){let{warnOnMissingNode:n=!0}=t;if(n&&!e){zt("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;let{onDismiss:i,onRequestDismiss:r,pointerBlocking:s,exclude:a,debug:o,type:l="dialog"}=t,c={dismiss:i,node:e,type:l,pointerBlocking:s,requestDismiss:r};We.add(c),qd();function u(v){var T,O;let I=j(v.detail.originalEvent);We.isBelowPointerBlockingLayer(e)||We.isInBranch(I)||((T=t.onPointerDownOutside)==null||T.call(t,v),(O=t.onInteractOutside)==null||O.call(t,v),!v.defaultPrevented&&(o&&console.log("onPointerDownOutside:",v.detail.originalEvent),i==null||i()))}function h(v){var T,O;let I=j(v.detail.originalEvent);We.isInBranch(I)||((T=t.onFocusOutside)==null||T.call(t,v),(O=t.onInteractOutside)==null||O.call(t,v),!v.defaultPrevented&&(o&&console.log("onFocusOutside:",v.detail.originalEvent),i==null||i()))}function m(v){var I;We.isTopMost(e)&&((I=t.onEscapeKeyDown)==null||I.call(t,v),!v.defaultPrevented&&i&&(v.preventDefault(),i()))}function d(v){var b;if(!e)return!1;let I=typeof a=="function"?a():a,T=Array.isArray(I)?I:[I],O=(b=t.persistentElements)==null?void 0:b.map(f=>f()).filter(le);return O&&T.push(...O),T.some(f=>ce(f,v))||We.isInNestedLayer(e,v)}let p=[s?II(e,t.persistentElements):void 0,vI(e,m),Ws(e,{exclude:d,onFocusOutside:h,onPointerDownOutside:u,defer:t.defer})];return()=>{We.remove(e),qd(),EI(e),p.forEach(v=>v==null?void 0:v())}}function Ft(e,t){let{defer:n}=t,i=n?H:s=>s(),r=[];return r.push(i(()=>{let s=Wt(e)?e():e;r.push(PI(s,t))})),()=>{r.forEach(s=>s==null?void 0:s())}}function Wd(e,t={}){let{defer:n}=t,i=n?H:s=>s(),r=[];return r.push(i(()=>{let s=Wt(e)?e():e;if(!s){zt("[@zag-js/dismissable] branch node is `null` or `undefined`");return}We.addBranch(s),r.push(()=>{We.removeBranch(s)})})),()=>{r.forEach(s=>s==null?void 0:s())}}var Gd,We,Ud,Wn=re(()=>{"use strict";tn();se();Gd="layer:request-dismiss",We={layers:[],branches:[],recentlyRemoved:new Set,count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){var i;let t=this.indexOf(e),n=this.topMostPointerBlockingLayer()?this.indexOf((i=this.topMostPointerBlockingLayer())==null?void 0:i.node):-1;return tt.type===e)},getNestedLayersByType(e,t){let n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(i=>i.type===t)},getParentLayerOfType(e,t){let n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(i=>i.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return!!(this.getNestedLayers(e).some(i=>ce(i.node,t))||this.recentlyRemoved.size>0)},isInBranch(e){return Array.from(this.branches).some(t=>ce(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){let t=this.indexOf(e);t<0||(this.recentlyRemoved.add(e),$n(()=>this.recentlyRemoved.delete(e)),tWe.dismiss(i.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){let t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{e.node.style.setProperty("--layer-index",`${t}`),e.node.removeAttribute("data-nested"),e.node.removeAttribute("data-has-nested"),this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute("data-nested",e.type);let i=this.countNestedLayersOfType(e.node,e.type);i>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${i}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){let n=this.indexOf(e);if(n===-1)return;let i=this.layers[n];bI(e,Gd,r=>{var s;(s=i.requestDismiss)==null||s.call(i,r),r.defaultPrevented||i==null||i.dismiss()}),yI(e,Gd,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}}});var nh={};he(nh,{Combobox:()=>BI});function VI(e,t){let{context:n,prop:i,state:r,send:s,scope:a,computed:o,event:l}=e,c=i("translations"),u=i("collection"),h=!!i("disabled"),m=o("isInteractive"),d=!!i("invalid"),p=!!i("required"),v=!!i("readOnly"),I=r.hasTag("open"),T=r.hasTag("focused"),O=i("composite"),b=n.get("highlightedValue"),f=On(y(g({},i("positioning")),{placement:n.get("currentPlacement")}));function S(P){let V=u.getItemDisabled(P.item),A=u.getItemValue(P.item);return vn(A,()=>`[zag-js] No value found for item ${JSON.stringify(P.item)}`),{value:A,disabled:!!(V||V),highlighted:b===A,selected:n.get("value").includes(A)}}return{focused:T,open:I,inputValue:n.get("inputValue"),highlightedValue:b,highlightedItem:n.get("highlightedItem"),value:n.get("value"),valueAsString:o("valueAsString"),hasSelectedItems:o("hasSelectedItems"),selectedItems:n.get("selectedItems"),collection:i("collection"),multiple:!!i("multiple"),disabled:!!h,syncSelectedItems(){s({type:"SELECTED_ITEMS.SYNC"})},reposition(P={}){s({type:"POSITIONING.SET",options:P})},setHighlightValue(P){s({type:"HIGHLIGHTED_VALUE.SET",value:P})},clearHighlightValue(){s({type:"HIGHLIGHTED_VALUE.CLEAR"})},selectValue(P){s({type:"ITEM.SELECT",value:P})},setValue(P){s({type:"VALUE.SET",value:P})},setInputValue(P,V="script"){s({type:"INPUT_VALUE.SET",value:P,src:V})},clearValue(P){P!=null?s({type:"ITEM.CLEAR",value:P}):s({type:"VALUE.CLEAR"})},focus(){var P;(P=zn(a))==null||P.focus()},setOpen(P,V="script"){r.hasTag("open")!==P&&s({type:P?"OPEN":"CLOSE",src:V})},getRootProps(){return t.element(y(g({},Ke.root.attrs),{dir:i("dir"),id:SI(a),"data-invalid":E(d),"data-readonly":E(v)}))},getLabelProps(){return t.label(y(g({},Ke.label.attrs),{dir:i("dir"),htmlFor:Ks(a),id:Go(a),"data-readonly":E(v),"data-disabled":E(h),"data-invalid":E(d),"data-required":E(p),"data-focus":E(T),onClick(P){var V;O||(P.preventDefault(),(V=Cr(a))==null||V.focus({preventScroll:!0}))}}))},getControlProps(){return t.element(y(g({},Ke.control.attrs),{dir:i("dir"),id:Jd(a),"data-state":I?"open":"closed","data-focus":E(T),"data-disabled":E(h),"data-invalid":E(d)}))},getPositionerProps(){return t.element(y(g({},Ke.positioner.attrs),{dir:i("dir"),id:Qd(a),style:f.floating}))},getInputProps(){return t.input(y(g({},Ke.input.attrs),{dir:i("dir"),"aria-invalid":X(d),"data-invalid":E(d),"data-autofocus":E(i("autoFocus")),name:i("name"),form:i("form"),disabled:h,required:i("required"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"none",spellCheck:"false",readOnly:v,placeholder:i("placeholder"),id:Ks(a),type:"text",role:"combobox",defaultValue:n.get("inputValue"),"aria-autocomplete":o("autoComplete")?"both":"list","aria-controls":zs(a),"aria-expanded":I,"data-state":I?"open":"closed","aria-activedescendant":b?zd(a,b):void 0,onClick(P){P.defaultPrevented||i("openOnClick")&&m&&s({type:"INPUT.CLICK",src:"input-click"})},onFocus(){h||s({type:"INPUT.FOCUS"})},onBlur(){h||s({type:"INPUT.BLUR"})},onChange(P){s({type:"INPUT.CHANGE",value:P.currentTarget.value,src:"input-change"})},onKeyDown(P){if(P.defaultPrevented||!m||P.ctrlKey||P.shiftKey||Re(P))return;let V=i("openOnKeyPress"),A=P.ctrlKey||P.metaKey||P.shiftKey,x=!0,k={ArrowDown($){!V&&!I||(s({type:$.altKey?"OPEN":"INPUT.ARROW_DOWN",keypress:x,src:"arrow-key"}),$.preventDefault())},ArrowUp(){!V&&!I||(s({type:P.altKey?"CLOSE":"INPUT.ARROW_UP",keypress:x,src:"arrow-key"}),P.preventDefault())},Home($){A||(s({type:"INPUT.HOME",keypress:x}),I&&$.preventDefault())},End($){A||(s({type:"INPUT.END",keypress:x}),I&&$.preventDefault())},Enter($){var Se;s({type:"INPUT.ENTER",keypress:x,src:"item-select"});let te=o("isCustomValue")&&i("allowCustomValue"),Z=b!=null,ie=i("alwaysSubmitOnEnter");if(I&&!te&&!ie&&Z&&$.preventDefault(),b==null)return;let J=Ni(a,b);st(J)&&((Se=i("navigate"))==null||Se({value:b,node:J,href:J.href}))},Escape(){s({type:"INPUT.ESCAPE",keypress:x,src:"escape-key"}),P.preventDefault()}},N=ge(P,{dir:i("dir")}),D=k[N];D==null||D(P)}}))},getTriggerProps(P={}){return t.button(y(g({},Ke.trigger.attrs),{dir:i("dir"),id:eh(a),"aria-haspopup":O?"listbox":"dialog",type:"button",tabIndex:P.focusable?void 0:-1,"aria-label":c.triggerLabel,"aria-expanded":I,"data-state":I?"open":"closed","aria-controls":I?zs(a):void 0,disabled:h,"data-invalid":E(d),"data-focusable":E(P.focusable),"data-readonly":E(v),"data-disabled":E(h),onFocus(){P.focusable&&s({type:"INPUT.FOCUS",src:"trigger"})},onClick(V){V.defaultPrevented||m&&pe(V)&&s({type:"TRIGGER.CLICK",src:"trigger-click"})},onPointerDown(V){m&&V.pointerType!=="touch"&&pe(V)&&(V.preventDefault(),queueMicrotask(()=>{var A;(A=zn(a))==null||A.focus({preventScroll:!0})}))},onKeyDown(V){if(V.defaultPrevented||O)return;let A={ArrowDown(){s({type:"INPUT.ARROW_DOWN",src:"arrow-key"})},ArrowUp(){s({type:"INPUT.ARROW_UP",src:"arrow-key"})}},x=ge(V,{dir:i("dir")}),k=A[x];k&&(k(V),V.preventDefault())}}))},getContentProps(){return t.element(y(g({},Ke.content.attrs),{dir:i("dir"),id:zs(a),role:O?"listbox":"dialog",tabIndex:-1,hidden:!I,"data-state":I?"open":"closed","data-placement":n.get("currentPlacement"),"aria-labelledby":Go(a),"aria-multiselectable":i("multiple")&&O?!0:void 0,"data-empty":E(u.size===0),onPointerDown(P){pe(P)&&P.preventDefault()}}))},getListProps(){return t.element(y(g({},Ke.list.attrs),{role:O?void 0:"listbox","data-empty":E(u.size===0),"aria-labelledby":Go(a),"aria-multiselectable":i("multiple")&&!O?!0:void 0}))},getClearTriggerProps(){return t.button(y(g({},Ke.clearTrigger.attrs),{dir:i("dir"),id:th(a),type:"button",tabIndex:-1,disabled:h,"data-invalid":E(d),"aria-label":c.clearTriggerLabel,"aria-controls":Ks(a),hidden:!n.get("value").length,onPointerDown(P){pe(P)&&P.preventDefault()},onClick(P){P.defaultPrevented||m&&s({type:"VALUE.CLEAR",src:"clear-trigger"})}}))},getItemState:S,getItemProps(P){let V=S(P),A=V.value;return t.element(y(g({},Ke.item.attrs),{dir:i("dir"),id:zd(a,A),role:"option",tabIndex:-1,"data-highlighted":E(V.highlighted),"data-state":V.selected?"checked":"unchecked","aria-selected":X(V.highlighted),"aria-disabled":X(V.disabled),"data-disabled":E(V.disabled),"data-value":V.value,onPointerMove(){V.disabled||V.highlighted||s({type:"ITEM.POINTER_MOVE",value:A})},onPointerLeave(){if(P.persistFocus||V.disabled)return;let x=l.previous();x!=null&&x.type.includes("POINTER")&&s({type:"ITEM.POINTER_LEAVE",value:A})},onClick(x){rr(x)||Fn(x)||hi(x)||V.disabled||s({type:"ITEM.CLICK",src:"item-select",value:A})}}))},getItemTextProps(P){let V=S(P);return t.element(y(g({},Ke.itemText.attrs),{dir:i("dir"),"data-state":V.selected?"checked":"unchecked","data-disabled":E(V.disabled),"data-highlighted":E(V.highlighted)}))},getItemIndicatorProps(P){let V=S(P);return t.element(y(g({"aria-hidden":!0},Ke.itemIndicator.attrs),{dir:i("dir"),"data-state":V.selected?"checked":"unchecked",hidden:!V.selected}))},getItemGroupProps(P){let{id:V}=P;return t.element(y(g({},Ke.itemGroup.attrs),{dir:i("dir"),id:TI(a,V),"aria-labelledby":Kd(a,V),"data-empty":E(u.size===0),role:"group"}))},getItemGroupLabelProps(P){let{htmlFor:V}=P;return t.element(y(g({},Ke.itemGroupLabel.attrs),{dir:i("dir"),id:Kd(a,V),role:"presentation"}))}}}function Zd(e){return(e.previousEvent||e).src}function $I(e){return e.replace(/_([a-z])/g,(t,n)=>n.toUpperCase())}function HI(e){let t={};for(let[n,i]of Object.entries(e)){let r=$I(n);t[r]=i}return t}var CI,Ke,Ys,SI,Go,Jd,Ks,zs,Qd,eh,th,TI,Kd,zd,Kn,zn,Yd,jd,Cr,OI,Ni,Xd,wI,xI,AI,kI,we,tt,NI,RI,ux,DI,dx,LI,hx,MI,gx,FI,BI,ih=re(()=>{"use strict";yr();Pr();Wn();tn();se();CI=U("combobox").parts("root","clearTrigger","content","control","input","item","itemGroup","itemGroupLabel","itemIndicator","itemText","label","list","positioner","trigger"),Ke=CI.build(),Ys=e=>new Nt(e);Ys.empty=()=>new Nt({items:[]});SI=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`combobox:${e.id}`},Go=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`combobox:${e.id}:label`},Jd=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`combobox:${e.id}:control`},Ks=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.input)!=null?n:`combobox:${e.id}:input`},zs=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`combobox:${e.id}:content`},Qd=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`combobox:${e.id}:popper`},eh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`combobox:${e.id}:toggle-btn`},th=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.clearTrigger)!=null?n:`combobox:${e.id}:clear-btn`},TI=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemGroup)==null?void 0:i.call(n,t))!=null?r:`combobox:${e.id}:optgroup:${t}`},Kd=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemGroupLabel)==null?void 0:i.call(n,t))!=null?r:`combobox:${e.id}:optgroup-label:${t}`},zd=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`combobox:${e.id}:option:${t}`},Kn=e=>e.getById(zs(e)),zn=e=>e.getById(Ks(e)),Yd=e=>e.getById(Qd(e)),jd=e=>e.getById(Jd(e)),Cr=e=>e.getById(eh(e)),OI=e=>e.getById(th(e)),Ni=(e,t)=>{if(t==null)return null;let n=`[role=option][data-value="${CSS.escape(t)}"]`;return vi(Kn(e),n)},Xd=e=>{let t=zn(e);e.isActiveElement(t)||t==null||t.focus({preventScroll:!0})},wI=e=>{let t=Cr(e);e.isActiveElement(t)||t==null||t.focus({preventScroll:!0})};({guards:xI,createMachine:AI,choose:kI}=ut()),{and:we,not:tt}=xI,NI=AI({props({props:e}){return y(g({loopFocus:!0,openOnClick:!1,defaultValue:[],defaultInputValue:"",closeOnSelect:!e.multiple,allowCustomValue:!1,alwaysSubmitOnEnter:!1,inputBehavior:"none",selectionBehavior:e.multiple?"clear":"replace",openOnKeyPress:!0,openOnChange:!0,composite:!0,navigate({node:t}){mi(t)},collection:Ys.empty()},e),{positioning:g({placement:"bottom",sameWidth:!0},e.positioning),translations:g({triggerLabel:"Toggle suggestions",clearTriggerLabel:"Clear value"},e.translations)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"suggesting":"idle"},context({prop:e,bindable:t,getContext:n,getEvent:i}){return{currentPlacement:t(()=>({defaultValue:void 0})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:fe,hash(r){return r.join(",")},onChange(r){var c;let s=n(),a=s.get("selectedItems"),o=e("collection"),l=r.map(u=>a.find(m=>o.getItemValue(m)===u)||o.find(u));s.set("selectedItems",l),(c=e("onValueChange"))==null||c({value:r,items:l})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),onChange(r){var a;let s=e("collection").find(r);(a=e("onHighlightChange"))==null||a({highlightedValue:r,highlightedItem:s})}})),inputValue:t(()=>{let r=e("inputValue")||e("defaultInputValue"),s=e("value")||e("defaultValue");if(!r.trim()&&!e("multiple")){let a=e("collection").stringifyMany(s);r=Ce(e("selectionBehavior"),{preserve:r||a,replace:a,clear:""})}return{defaultValue:r,value:e("inputValue"),onChange(a){var c;let o=i(),l=(o.previousEvent||o).src;(c=e("onInputValueChange"))==null||c({inputValue:a,reason:l})}}}),highlightedItem:t(()=>{let r=e("highlightedValue");return{defaultValue:e("collection").find(r)}}),selectedItems:t(()=>{let r=e("value")||e("defaultValue")||[];return{defaultValue:e("collection").findMany(r)}})}},computed:{isInputValueEmpty:({context:e})=>e.get("inputValue").length===0,isInteractive:({prop:e})=>!(e("readOnly")||e("disabled")),autoComplete:({prop:e})=>e("inputBehavior")==="autocomplete",autoHighlight:({prop:e})=>e("inputBehavior")==="autohighlight",hasSelectedItems:({context:e})=>e.get("value").length>0,valueAsString:({context:e,prop:t})=>t("collection").stringifyItems(e.get("selectedItems")),isCustomValue:({context:e,computed:t})=>e.get("inputValue")!==t("valueAsString")},watch({context:e,prop:t,track:n,action:i,send:r}){n([()=>e.hash("value")],()=>{i(["syncSelectedItems"])}),n([()=>e.get("inputValue")],()=>{i(["syncInputValue"])}),n([()=>e.get("highlightedValue")],()=>{i(["syncHighlightedItem","autofillInputValue"])}),n([()=>t("open")],()=>{i(["toggleVisibility"])}),n([()=>t("collection").toString()],()=>{r({type:"CHILDREN_CHANGE"})})},on:{"SELECTED_ITEMS.SYNC":{actions:["syncSelectedItems"]},"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedValue"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedValue"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setValue"]},"INPUT_VALUE.SET":{actions:["setInputValue"]},"POSITIONING.SET":{actions:["reposition"]}},entry:kI([{guard:"autoFocus",actions:["setInitialFocus"]}]),states:{idle:{tags:["idle","closed"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":{target:"interacting"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{target:"focused",actions:["clearInputValue","clearSelectedItems","setInitialFocus"]}}},focused:{tags:["focused","closed"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":[{guard:"isChangeEvent",target:"suggesting"},{target:"interacting"}],"INPUT.CHANGE":[{guard:we("isOpenControlled","openOnChange"),actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{guard:"openOnChange",target:"suggesting",actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{actions:["setInputValue"]}],"LAYER.INTERACT_OUTSIDE":{target:"idle"},"INPUT.ESCAPE":{guard:we("isCustomValue",tt("allowCustomValue")),actions:["revertInputValue"]},"INPUT.BLUR":{target:"idle"},"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_DOWN":[{guard:we("isOpenControlled","autoComplete"),actions:["invokeOnOpen"]},{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{guard:"isOpenControlled",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_UP":[{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{target:"interacting",actions:["highlightLastOrSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightLastOrSelectedItem","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{actions:["clearInputValue","clearSelectedItems"]}}},interacting:{tags:["open","focused"],entry:["setInitialFocus"],effects:["scrollToHighlightedItem","trackDismissableLayer","trackPlacement"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["setFinalFocus"]},{target:"idle"}],CHILDREN_CHANGE:[{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]},{actions:["scrollToHighlightedItem"]}],"INPUT.HOME":{actions:["highlightFirstItem"]},"INPUT.END":{actions:["highlightLastItem"]},"INPUT.ARROW_DOWN":[{guard:we("autoComplete","isLastItemHighlighted"),actions:["clearHighlightedValue","scrollContentToTop"]},{actions:["highlightNextItem"]}],"INPUT.ARROW_UP":[{guard:we("autoComplete","isFirstItemHighlighted"),actions:["clearHighlightedValue"]},{actions:["highlightPrevItem"]}],"INPUT.ENTER":[{guard:we("isOpenControlled","isCustomValue",tt("hasHighlightedItem"),tt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:we("isCustomValue",tt("hasHighlightedItem"),tt("allowCustomValue")),target:"focused",actions:["revertInputValue","invokeOnClose"]},{guard:we("isOpenControlled","closeOnSelect"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","setFinalFocus"]},{actions:["selectHighlightedItem"]}],"INPUT.CHANGE":[{guard:"autoComplete",target:"suggesting",actions:["setInputValue"]},{target:"suggesting",actions:["clearHighlightedValue","setInputValue"]}],"ITEM.POINTER_MOVE":{actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]},"ITEM.CLICK":[{guard:we("isOpenControlled","closeOnSelect"),actions:["selectItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectItem","invokeOnClose","setFinalFocus"]},{actions:["selectItem"]}],"LAYER.ESCAPE":[{guard:we("isOpenControlled","autoComplete"),actions:["syncInputValue","invokeOnClose"]},{guard:"autoComplete",target:"focused",actions:["syncInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"LAYER.INTERACT_OUTSIDE":[{guard:we("isOpenControlled","isCustomValue",tt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:we("isCustomValue",tt("allowCustomValue")),target:"idle",actions:["revertInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"VALUE.CLEAR":[{guard:"isOpenControlled",actions:["clearInputValue","clearSelectedItems","invokeOnClose"]},{target:"focused",actions:["clearInputValue","clearSelectedItems","invokeOnClose","setFinalFocus"]}]}},suggesting:{tags:["open","focused"],effects:["trackDismissableLayer","scrollToHighlightedItem","trackPlacement"],entry:["setInitialFocus"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["setFinalFocus"]},{target:"idle"}],CHILDREN_CHANGE:[{guard:we("isHighlightedItemRemoved","hasCollectionItems","autoHighlight"),actions:["clearHighlightedValue","highlightFirstItem"]},{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]},{guard:"autoHighlight",actions:["highlightFirstItem"]}],"INPUT.ARROW_DOWN":{target:"interacting",actions:["highlightNextItem"]},"INPUT.ARROW_UP":{target:"interacting",actions:["highlightPrevItem"]},"INPUT.HOME":{target:"interacting",actions:["highlightFirstItem"]},"INPUT.END":{target:"interacting",actions:["highlightLastItem"]},"INPUT.ENTER":[{guard:we("isOpenControlled","isCustomValue",tt("hasHighlightedItem"),tt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:we("isCustomValue",tt("hasHighlightedItem"),tt("allowCustomValue")),target:"focused",actions:["revertInputValue","invokeOnClose"]},{guard:we("isOpenControlled","closeOnSelect"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","setFinalFocus"]},{actions:["selectHighlightedItem"]}],"INPUT.CHANGE":{actions:["setInputValue"]},"LAYER.ESCAPE":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"ITEM.POINTER_MOVE":{target:"interacting",actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]},"LAYER.INTERACT_OUTSIDE":[{guard:we("isOpenControlled","isCustomValue",tt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:we("isCustomValue",tt("allowCustomValue")),target:"idle",actions:["revertInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"ITEM.CLICK":[{guard:we("isOpenControlled","closeOnSelect"),actions:["selectItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectItem","invokeOnClose","setFinalFocus"]},{actions:["selectItem"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"VALUE.CLEAR":[{guard:"isOpenControlled",actions:["clearInputValue","clearSelectedItems","invokeOnClose"]},{target:"focused",actions:["clearInputValue","clearSelectedItems","invokeOnClose","setFinalFocus"]}]}}},implementations:{guards:{isInputValueEmpty:({computed:e})=>e("isInputValueEmpty"),autoComplete:({computed:e,prop:t})=>e("autoComplete")&&!t("multiple"),autoHighlight:({computed:e})=>e("autoHighlight"),isFirstItemHighlighted:({prop:e,context:t})=>e("collection").firstValue===t.get("highlightedValue"),isLastItemHighlighted:({prop:e,context:t})=>e("collection").lastValue===t.get("highlightedValue"),isCustomValue:({computed:e})=>e("isCustomValue"),allowCustomValue:({prop:e})=>!!e("allowCustomValue"),hasHighlightedItem:({context:e})=>e.get("highlightedValue")!=null,closeOnSelect:({prop:e})=>!!e("closeOnSelect"),isOpenControlled:({prop:e})=>e("open")!=null,openOnChange:({prop:e,context:t})=>{let n=e("openOnChange");return Uc(n)?n:!!(n!=null&&n({inputValue:t.get("inputValue")}))},restoreFocus:({event:e})=>{var n,i;let t=(i=e.restoreFocus)!=null?i:(n=e.previousEvent)==null?void 0:n.restoreFocus;return t==null?!0:!!t},isChangeEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="INPUT.CHANGE"},autoFocus:({prop:e})=>!!e("autoFocus"),isHighlightedItemRemoved:({prop:e,context:t})=>!e("collection").has(t.get("highlightedValue")),hasCollectionItems:({prop:e})=>e("collection").size>0},effects:{trackDismissableLayer({send:e,prop:t,scope:n}){return t("disableLayer")?void 0:Ft(()=>Kn(n),{type:"listbox",defer:!0,exclude:()=>[zn(n),Cr(n),OI(n)],onFocusOutside:t("onFocusOutside"),onPointerDownOutside:t("onPointerDownOutside"),onInteractOutside:t("onInteractOutside"),onEscapeKeyDown(r){r.preventDefault(),r.stopPropagation(),e({type:"LAYER.ESCAPE",src:"escape-key"})},onDismiss(){e({type:"LAYER.INTERACT_OUTSIDE",src:"interact-outside",restoreFocus:!1})}})},trackPlacement({context:e,prop:t,scope:n}){let i=()=>jd(n)||Cr(n),r=()=>Yd(n);return e.set("currentPlacement",t("positioning").placement),It(i,r,y(g({},t("positioning")),{defer:!0,onComplete(s){e.set("currentPlacement",s.placement)}}))},scrollToHighlightedItem({context:e,prop:t,scope:n,event:i}){let r=zn(n),s=[],a=c=>{let u=i.current().type.includes("POINTER"),h=e.get("highlightedValue");if(u||!h)return;let m=Kn(n),d=t("scrollToIndexFn");if(d){let I=t("collection").indexOf(h);d({index:I,immediate:c,getElement:()=>Ni(n,h)});return}let p=Ni(n,h),v=H(()=>{Xt(p,{rootEl:m,block:"nearest"})});s.push(v)},o=H(()=>a(!0));s.push(o);let l=ot(r,{attributes:["aria-activedescendant"],callback:()=>a(!1)});return s.push(l),()=>{s.forEach(c=>c())}}},actions:{reposition({context:e,prop:t,scope:n,event:i}){It(()=>jd(n),()=>Yd(n),y(g(g({},t("positioning")),i.options),{defer:!0,listeners:!1,onComplete(a){e.set("currentPlacement",a.placement)}}))},setHighlightedValue({context:e,event:t}){t.value!=null&&e.set("highlightedValue",t.value)},clearHighlightedValue({context:e}){e.set("highlightedValue",null)},selectHighlightedItem(e){var o;let{context:t,prop:n}=e,i=n("collection"),r=t.get("highlightedValue");if(!r||!i.has(r))return;let s=n("multiple")?yt(t.get("value"),r):[r];(o=n("onSelect"))==null||o({value:s,itemValue:r}),t.set("value",s);let a=Ce(n("selectionBehavior"),{preserve:t.get("inputValue"),replace:i.stringifyMany(s),clear:""});t.set("inputValue",a)},scrollToHighlightedItem({context:e,prop:t,scope:n}){$n(()=>{let i=e.get("highlightedValue");if(i==null)return;let r=Ni(n,i),s=Kn(n),a=t("scrollToIndexFn");if(a){let o=t("collection").indexOf(i);a({index:o,immediate:!0,getElement:()=>Ni(n,i)});return}Xt(r,{rootEl:s,block:"nearest"})})},selectItem(e){let{context:t,event:n,flush:i,prop:r}=e;n.value!=null&&i(()=>{var o;let s=r("multiple")?yt(t.get("value"),n.value):[n.value];(o=r("onSelect"))==null||o({value:s,itemValue:n.value}),t.set("value",s);let a=Ce(r("selectionBehavior"),{preserve:t.get("inputValue"),replace:r("collection").stringifyMany(s),clear:""});t.set("inputValue",a)})},clearItem(e){let{context:t,event:n,flush:i,prop:r}=e;n.value!=null&&i(()=>{let s=ct(t.get("value"),n.value);t.set("value",s);let a=Ce(r("selectionBehavior"),{preserve:t.get("inputValue"),replace:r("collection").stringifyMany(s),clear:""});t.set("inputValue",a)})},setInitialFocus({scope:e}){H(()=>{Xd(e)})},setFinalFocus({scope:e}){H(()=>{let t=Cr(e);(t==null?void 0:t.dataset.focusable)==null?Xd(e):wI(e)})},syncInputValue({context:e,scope:t,event:n}){let i=zn(t);i&&(i.value=e.get("inputValue"),queueMicrotask(()=>{n.current().type!=="INPUT.CHANGE"&&tr(i)}))},setInputValue({context:e,event:t}){e.set("inputValue",t.value)},clearInputValue({context:e}){e.set("inputValue","")},revertInputValue({context:e,prop:t,computed:n}){let i=t("selectionBehavior"),r=Ce(i,{replace:n("hasSelectedItems")?n("valueAsString"):"",preserve:e.get("inputValue"),clear:""});e.set("inputValue",r)},setValue(e){let{context:t,flush:n,event:i,prop:r}=e;n(()=>{t.set("value",i.value);let s=Ce(r("selectionBehavior"),{preserve:t.get("inputValue"),replace:r("collection").stringifyMany(i.value),clear:""});t.set("inputValue",s)})},clearSelectedItems(e){let{context:t,flush:n,prop:i}=e;n(()=>{t.set("value",[]);let r=Ce(i("selectionBehavior"),{preserve:t.get("inputValue"),replace:i("collection").stringifyMany([]),clear:""});t.set("inputValue",r)})},scrollContentToTop({prop:e,scope:t}){let n=e("scrollToIndexFn");if(n){let i=e("collection").firstValue;n({index:0,immediate:!0,getElement:()=>Ni(t,i)})}else{let i=Kn(t);if(!i)return;i.scrollTop=0}},invokeOnOpen({prop:e,event:t,context:n}){var r;let i=Zd(t);(r=e("onOpenChange"))==null||r({open:!0,reason:i,value:n.get("value")})},invokeOnClose({prop:e,event:t,context:n}){var r;let i=Zd(t);(r=e("onOpenChange"))==null||r({open:!1,reason:i,value:n.get("value")})},highlightFirstItem({context:e,prop:t,scope:n}){(Kn(n)?queueMicrotask:H)(()=>{let r=t("collection").firstValue;r&&e.set("highlightedValue",r)})},highlightFirstItemIfNeeded({computed:e,action:t}){e("autoHighlight")&&t(["highlightFirstItem"])},highlightLastItem({context:e,prop:t,scope:n}){(Kn(n)?queueMicrotask:H)(()=>{let r=t("collection").lastValue;r&&e.set("highlightedValue",r)})},highlightNextItem({context:e,prop:t}){let n=null,i=e.get("highlightedValue"),r=t("collection");i?(n=r.getNextValue(i),!n&&t("loopFocus")&&(n=r.firstValue)):n=r.firstValue,n&&e.set("highlightedValue",n)},highlightPrevItem({context:e,prop:t}){let n=null,i=e.get("highlightedValue"),r=t("collection");i?(n=r.getPreviousValue(i),!n&&t("loopFocus")&&(n=r.lastValue)):n=r.lastValue,n&&e.set("highlightedValue",n)},highlightFirstSelectedItem({context:e,prop:t}){H(()=>{let[n]=t("collection").sort(e.get("value"));n&&e.set("highlightedValue",n)})},highlightFirstOrSelectedItem({context:e,prop:t,computed:n}){H(()=>{let i=null;n("hasSelectedItems")?i=t("collection").sort(e.get("value"))[0]:i=t("collection").firstValue,i&&e.set("highlightedValue",i)})},highlightLastOrSelectedItem({context:e,prop:t,computed:n}){H(()=>{let i=t("collection"),r=null;n("hasSelectedItems")?r=i.sort(e.get("value"))[0]:r=i.lastValue,r&&e.set("highlightedValue",r)})},autofillInputValue({context:e,computed:t,prop:n,event:i,scope:r}){let s=zn(r),a=n("collection");if(!t("autoComplete")||!s||!i.keypress)return;let o=a.stringify(e.get("highlightedValue"));H(()=>{s.value=o||e.get("inputValue")})},syncSelectedItems(e){queueMicrotask(()=>{let{context:t,prop:n}=e,i=n("collection"),r=t.get("value"),s=r.map(o=>t.get("selectedItems").find(c=>i.getItemValue(c)===o)||i.find(o));t.set("selectedItems",s);let a=Ce(n("selectionBehavior"),{preserve:t.get("inputValue"),replace:i.stringifyMany(r),clear:""});t.set("inputValue",a)})},syncHighlightedItem({context:e,prop:t}){let n=t("collection").find(e.get("highlightedValue"));e.set("highlightedItem",n)},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}});RI=_()(["allowCustomValue","autoFocus","closeOnSelect","collection","composite","defaultHighlightedValue","defaultInputValue","defaultOpen","defaultValue","dir","disabled","disableLayer","form","getRootNode","highlightedValue","id","ids","inputBehavior","inputValue","invalid","loopFocus","multiple","name","navigate","onFocusOutside","onHighlightChange","onInputValueChange","onInteractOutside","onOpenChange","onOpenChange","onPointerDownOutside","onSelect","onValueChange","open","openOnChange","openOnClick","openOnKeyPress","placeholder","positioning","readOnly","required","scrollToIndexFn","selectionBehavior","translations","value","alwaysSubmitOnEnter"]),ux=B(RI),DI=_()(["htmlFor"]),dx=B(DI),LI=_()(["id"]),hx=B(LI),MI=_()(["item","persistFocus"]),gx=B(MI),FI=class extends K{constructor(){super(...arguments);z(this,"options",[]);z(this,"allOptions",[]);z(this,"hasGroups",!1)}setAllOptions(t){this.allOptions=t,this.options=t}getCollection(){let t=this.options||this.allOptions||[];return this.hasGroups?Ys({items:t,itemToValue:n=>{var i;return(i=n.id)!=null?i:""},itemToString:n=>n.label,isItemDisabled:n=>{var i;return(i=n.disabled)!=null?i:!1},groupBy:n=>{var i;return(i=n.group)!=null?i:""}}):Ys({items:t,itemToValue:n=>{var i;return(i=n.id)!=null?i:""},itemToString:n=>n.label,isItemDisabled:n=>{var i;return(i=n.disabled)!=null?i:!1}})}initMachine(t){let n=this.getCollection.bind(this);return new W(NI,y(g({},t),{get collection(){return n()},onOpenChange:i=>{i.open&&(this.options=this.allOptions),t.onOpenChange&&t.onOpenChange(i)},onInputValueChange:i=>{let r=this.allOptions.filter(s=>s.label.toLowerCase().includes(i.inputValue.toLowerCase()));this.options=r.length>0?r:this.allOptions,t.onInputValueChange&&t.onInputValueChange(i)}}))}initApi(){return VI(this.machine.service,q)}renderItems(){var i,r,s,a;let t=this.el.querySelector('[data-scope="combobox"][data-part="content"]');if(!t)return;let n=this.el.querySelector('[data-templates="combobox"]');if(n)if(t.querySelectorAll('[data-scope="combobox"][data-part="item"]:not([data-template])').forEach(o=>o.remove()),t.querySelectorAll('[data-scope="combobox"][data-part="item-group"]:not([data-template])').forEach(o=>o.remove()),this.hasGroups){let o=(s=(r=(i=this.api.collection).group)==null?void 0:r.call(i))!=null?s:[];this.renderGroupedItems(t,n,o)}else{let o=(a=this.options)!=null&&a.length?this.options:this.allOptions;this.renderFlatItems(t,n,o)}}renderGroupedItems(t,n,i){for(let[r,s]of i){if(r==null)continue;let a=n.querySelector(`[data-scope="combobox"][data-part="item-group"][data-id="${r}"][data-template]`);if(!a)continue;let o=a.cloneNode(!0);o.removeAttribute("data-template"),this.spreadProps(o,this.api.getItemGroupProps({id:r}));let l=o.querySelector('[data-scope="combobox"][data-part="item-group-label"]');l&&this.spreadProps(l,this.api.getItemGroupLabelProps({htmlFor:r}));let c=o.querySelector('[data-scope="combobox"][data-part="item-group-content"]');if(c){c.innerHTML="";for(let u of s){let h=this.cloneItem(n,u);h&&c.appendChild(h)}t.appendChild(o)}}}renderFlatItems(t,n,i){for(let r of i){let s=this.cloneItem(n,r);s&&t.appendChild(s)}}cloneItem(t,n){var l,c,u,h;let i=(h=(u=(c=(l=this.api.collection).getItemValue)==null?void 0:c.call(l,n))!=null?u:n.id)!=null?h:"",r=t.querySelector(`[data-scope="combobox"][data-part="item"][data-value="${i}"][data-template]`);if(!r)return null;let s=r.cloneNode(!0);s.removeAttribute("data-template"),this.spreadProps(s,this.api.getItemProps({item:n}));let a=s.querySelector('[data-scope="combobox"][data-part="item-text"]');a&&(this.spreadProps(a,this.api.getItemTextProps({item:n})),a.children.length===0&&(a.textContent=n.label||""));let o=s.querySelector('[data-scope="combobox"][data-part="item-indicator"]');return o&&this.spreadProps(o,this.api.getItemIndicatorProps({item:n})),s}render(){let t=this.el.querySelector('[data-scope="combobox"][data-part="root"]');if(!t)return;this.spreadProps(t,this.api.getRootProps()),["label","control","input","trigger","clear-trigger","positioner"].forEach(i=>{let r=this.el.querySelector(`[data-scope="combobox"][data-part="${i}"]`);if(!r)return;let s="get"+i.split("-").map(a=>a[0].toUpperCase()+a.slice(1)).join("")+"Props";this.spreadProps(r,this.api[s]())});let n=this.el.querySelector('[data-scope="combobox"][data-part="content"]');n&&(this.spreadProps(n,this.api.getContentProps()),this.renderItems())}};BI={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=JSON.parse(e.dataset.collection||"[]"),i=n.some(l=>!!l.group),r=y(g({id:e.id},C(e,"controlled")?{value:Q(e,"value")}:{defaultValue:Q(e,"defaultValue")}),{disabled:C(e,"disabled"),placeholder:w(e,"placeholder"),alwaysSubmitOnEnter:C(e,"alwaysSubmitOnEnter"),autoFocus:C(e,"autoFocus"),closeOnSelect:C(e,"closeOnSelect"),dir:w(e,"dir",["ltr","rtl"]),inputBehavior:w(e,"inputBehavior",["autohighlight","autocomplete","none"]),loopFocus:C(e,"loopFocus"),multiple:C(e,"multiple"),invalid:C(e,"invalid"),allowCustomValue:!1,selectionBehavior:"replace",name:"",form:w(e,"form"),readOnly:C(e,"readOnly"),required:C(e,"required"),positioning:(()=>{let l=e.dataset.positioning;if(l)try{let c=JSON.parse(l);return HI(c)}catch(c){return}})(),onOpenChange:l=>{let c=w(e,"onOpenChange");c&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&t(c,{open:l.open,reason:l.reason,value:l.value,id:e.id});let u=w(e,"onOpenChangeClient");u&&e.dispatchEvent(new CustomEvent(u,{bubbles:C(e,"bubble"),detail:{open:l.open,reason:l.reason,value:l.value,id:e.id}}))},onInputValueChange:l=>{let c=w(e,"onInputValueChange");c&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&t(c,{value:l.inputValue,reason:l.reason,id:e.id});let u=w(e,"onInputValueChangeClient");u&&e.dispatchEvent(new CustomEvent(u,{bubbles:C(e,"bubble"),detail:{value:l.inputValue,reason:l.reason,id:e.id}}))},onValueChange:l=>{let c=e.querySelector('[data-scope="combobox"][data-part="value-input"]');if(c){let m=O=>{var f;let b=n.find(S=>{var P;return String((P=S.id)!=null?P:"")===O||S.label===O});return b?String((f=b.id)!=null?f:""):O},d=l.value.length===0?"":l.value.length===1?m(String(l.value[0])):l.value.map(O=>m(String(O))).join(",");c.value=d;let p=c.getAttribute("form"),v=null;p?v=document.getElementById(p):v=c.closest("form");let I=new Event("change",{bubbles:!0,cancelable:!0});c.dispatchEvent(I);let T=new Event("input",{bubbles:!0,cancelable:!0});c.dispatchEvent(T),v&&v.hasAttribute("phx-change")&&requestAnimationFrame(()=>{let O=v.querySelector("input, select, textarea");if(O){let b=new Event("change",{bubbles:!0,cancelable:!0});O.dispatchEvent(b)}else{let b=new Event("change",{bubbles:!0,cancelable:!0});v.dispatchEvent(b)}})}let u=w(e,"onValueChange");u&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&t(u,{value:l.value,items:l.items,id:e.id});let h=w(e,"onValueChangeClient");h&&e.dispatchEvent(new CustomEvent(h,{bubbles:C(e,"bubble"),detail:{value:l.value,items:l.items,id:e.id}}))}}),s=new FI(e,r);s.hasGroups=i,s.setAllOptions(n),s.init();let a=e.querySelector('[data-scope="combobox"][data-part="input"]');a&&(a.removeAttribute("name"),a.removeAttribute("form"));let o=C(e,"controlled")?Q(e,"value"):Q(e,"defaultValue");if(o&&o.length>0){let l=n.filter(c=>{var u;return o.includes((u=c.id)!=null?u:"")});if(l.length>0){let c=l.map(u=>{var h;return(h=u.label)!=null?h:""}).join(", ");if(s.api&&typeof s.api.setInputValue=="function")s.api.setInputValue(c);else{let u=e.querySelector('[data-scope="combobox"][data-part="input"]');u&&(u.value=c)}}}this.combobox=s,this.handlers=[]},updated(){let e=JSON.parse(this.el.dataset.collection||"[]"),t=e.some(n=>!!n.group);if(this.combobox){this.combobox.hasGroups=t,this.combobox.setAllOptions(e),this.combobox.updateProps(y(g({},C(this.el,"controlled")?{value:Q(this.el,"value")}:{defaultValue:Q(this.el,"defaultValue")}),{name:w(this.el,"name"),form:w(this.el,"form"),disabled:C(this.el,"disabled"),multiple:C(this.el,"multiple"),dir:w(this.el,"dir",["ltr","rtl"]),invalid:C(this.el,"invalid"),required:C(this.el,"required"),readOnly:C(this.el,"readOnly")}));let n=this.el.querySelector('[data-scope="combobox"][data-part="input"]');n&&(n.removeAttribute("name"),n.removeAttribute("form"),n.name="")}},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.combobox)==null||e.destroy()}}});var eg={};he(eg,{DatePicker:()=>kC});function Uo(e,t){return e-t*Math.floor(e/t)}function js(e,t,n,i){t=al(e,t);let r=t-1,s=-2;return n<=2?s=0:na(t)&&(s=-1),bh-1+365*r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400)+Math.floor((367*n-362)/12+s+i)}function na(e){return e%4===0&&(e%100!==0||e%400===0)}function al(e,t){return e==="BC"?1-t:t}function _I(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}function Zn(e,t){return t=it(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function qI(e,t){return t=it(t,e.calendar),e=rn(e),t=rn(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function WI(e,t){return t=it(t,e.calendar),e=Or(e),t=Or(t),e.era===t.era&&e.year===t.year}function KI(e,t){return aa(e.calendar,t.calendar)&&Zn(e,t)}function zI(e,t){return aa(e.calendar,t.calendar)&&qI(e,t)}function YI(e,t){return aa(e.calendar,t.calendar)&&WI(e,t)}function aa(e,t){var n,i,r,s;return(s=(r=(n=e.isEqual)===null||n===void 0?void 0:n.call(e,t))!==null&&r!==void 0?r:(i=t.isEqual)===null||i===void 0?void 0:i.call(t,e))!==null&&s!==void 0?s:e.identifier===t.identifier}function jI(e,t){return Zn(e,oa(t))}function Eh(e,t,n){let i=e.calendar.toJulianDay(e),r=n?XI[n]:QI(t),s=Math.ceil(i+1-r)%7;return s<0&&(s+=7),s}function Ih(e){return sn(Date.now(),e)}function oa(e){return Yn(Ih(e))}function Ph(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function ZI(e,t){return rh(e)-rh(t)}function rh(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}function ol(){return qo==null&&(qo=new Intl.DateTimeFormat().resolvedOptions().timeZone),qo}function rn(e){return e.subtract({days:e.day-1})}function Zo(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function Or(e){return rn(e.subtract({months:e.month-1}))}function JI(e){return Zo(e.add({months:e.calendar.getMonthsInYear(e)-e.month}))}function wr(e,t,n){let i=Eh(e,t,n);return e.subtract({days:i})}function sh(e,t,n){return wr(e,t,n).add({days:6})}function Ch(e){if(Intl.Locale){let n=ah.get(e);return n||(n=new Intl.Locale(e).maximize().region,n&&ah.set(e,n)),n}let t=e.split("-")[1];return t==="u"?void 0:t}function QI(e){let t=Wo.get(e);if(!t){if(Intl.Locale){let i=new Intl.Locale(e);if("getWeekInfo"in i&&(t=i.getWeekInfo(),t))return Wo.set(e,t),t.firstDay}let n=Ch(e);if(e.includes("-fw-")){let i=e.split("-fw-")[1].split("-")[0];i==="mon"?t={firstDay:1}:i==="tue"?t={firstDay:2}:i==="wed"?t={firstDay:3}:i==="thu"?t={firstDay:4}:i==="fri"?t={firstDay:5}:i==="sat"?t={firstDay:6}:t={firstDay:0}}else e.includes("-ca-iso8601")?t={firstDay:1}:t={firstDay:n&&UI[n]||0};Wo.set(e,t)}return t.firstDay}function eP(e,t,n){let i=e.calendar.getDaysInMonth(e);return Math.ceil((Eh(rn(e),t,n)+i)/7)}function Sh(e,t){return e&&t?e.compare(t)<=0?e:t:e||t}function Th(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function nP(e,t){let n=e.calendar.toJulianDay(e),i=Math.ceil(n+1)%7;i<0&&(i+=7);let r=Ch(t),[s,a]=tP[r]||[6,0];return i===s||i===a}function Fi(e){e=it(e,new Mi);let t=al(e.era,e.year);return Oh(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Oh(e,t,n,i,r,s,a){let o=new Date;return o.setUTCHours(i,r,s,a),o.setUTCFullYear(e,t-1,n),o.getTime()}function Jo(e,t){if(t==="UTC")return 0;if(e>0&&t===ol())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:i,day:r,hour:s,minute:a,second:o}=wh(e,t);return Oh(n,i,r,s,a,o,0)-Math.floor(e/1e3)*1e3}function wh(e,t){let n=oh.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),oh.set(t,n));let i=n.formatToParts(new Date(e)),r={};for(let s of i)s.type!=="literal"&&(r[s.type]=s.value);return{year:r.era==="BC"||r.era==="B"?-r.year+1:+r.year,month:+r.month,day:+r.day,hour:r.hour==="24"?0:+r.hour,minute:+r.minute,second:+r.second}}function iP(e,t,n,i){return(n===i?[n]:[n,i]).filter(s=>rP(e,t,s))}function rP(e,t,n){let i=wh(n,t);return e.year===i.year&&e.month===i.month&&e.day===i.day&&e.hour===i.hour&&e.minute===i.minute&&e.second===i.second}function nn(e,t,n="compatible"){let i=jn(e);if(t==="UTC")return Fi(i);if(t===ol()&&n==="compatible"){i=it(i,new Mi);let l=new Date,c=al(i.era,i.year);return l.setFullYear(c,i.month-1,i.day),l.setHours(i.hour,i.minute,i.second,i.millisecond),l.getTime()}let r=Fi(i),s=Jo(r-lh,t),a=Jo(r+lh,t),o=iP(i,t,r-s,r-a);if(o.length===1)return o[0];if(o.length>1)switch(n){case"compatible":case"earlier":return o[0];case"later":return o[o.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(r-s,r-a);case"compatible":case"later":return Math.max(r-s,r-a);case"reject":throw new RangeError("No such absolute time found")}}function Vh(e,t,n="compatible"){return new Date(nn(e,t,n))}function sn(e,t){let n=Jo(e,t),i=new Date(e+n),r=i.getUTCFullYear(),s=i.getUTCMonth()+1,a=i.getUTCDate(),o=i.getUTCHours(),l=i.getUTCMinutes(),c=i.getUTCSeconds(),u=i.getUTCMilliseconds();return new Mh(r<1?"BC":"AD",r<1?-r+1:r,s,a,t,n,o,l,c,u)}function Yn(e){return new $i(e.calendar,e.era,e.year,e.month,e.day)}function jn(e,t){let n=0,i=0,r=0,s=0;if("timeZone"in e)({hour:n,minute:i,second:r,millisecond:s}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:i,second:r,millisecond:s}=t),new TP(e.calendar,e.era,e.year,e.month,e.day,n,i,r,s)}function it(e,t){if(aa(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),i=e.copy();return i.calendar=t,i.era=n.era,i.year=n.year,i.month=n.month,i.day=n.day,Xn(i),i}function sP(e,t,n){if(e instanceof Mh)return e.timeZone===t?e:oP(e,t);let i=nn(e,t,n);return sn(i,t)}function aP(e){let t=Fi(e)-e.offset;return new Date(t)}function oP(e,t){let n=Fi(e)-e.offset;return it(sn(n,t),e.calendar)}function la(e,t){let n=e.copy(),i="hour"in n?dP(n,t):0;Qo(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,el(n),xh(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=i,lP(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let r=n.calendar.getYearsInEra(n);if(n.year>r){var s,a;let l=(s=(a=n.calendar).isInverseEra)===null||s===void 0?void 0:s.call(a,n);n.year=r,n.month=l?1:n.calendar.getMonthsInYear(n),n.day=l?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let o=n.calendar.getMonthsInYear(n);return n.month>o&&(n.month=o,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function Qo(e,t){var n,i;!((n=(i=e.calendar).isInverseEra)===null||n===void 0)&&n.call(i,e)&&(t=-t),e.year+=t}function el(e){for(;e.month<1;)Qo(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,Qo(e,1)}function lP(e){for(;e.day<1;)e.month--,el(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,el(e)}function xh(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function Xn(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),xh(e)}function Ah(e){let t={};for(let n in e)typeof e[n]=="number"&&(t[n]=-e[n]);return t}function kh(e,t){return la(e,Ah(t))}function ll(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),Xn(n),n}function sa(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),uP(n),n}function cP(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=Xs(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=Xs(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=Xs(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=Xs(e.hour,24),t}function uP(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function Xs(e,t){let n=e%t;return n<0&&(n+=t),n}function dP(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,cP(e)}function cl(e,t,n,i){let r=e.copy();switch(t){case"era":{let o=e.calendar.getEras(),l=o.indexOf(e.era);if(l<0)throw new Error("Invalid era: "+e.era);l=an(l,n,0,o.length-1,i==null?void 0:i.round),r.era=o[l],Xn(r);break}case"year":var s,a;!((s=(a=r.calendar).isInverseEra)===null||s===void 0)&&s.call(a,r)&&(n=-n),r.year=an(e.year,n,-1/0,9999,i==null?void 0:i.round),r.year===-1/0&&(r.year=1),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e);break;case"month":r.month=an(e.month,n,1,e.calendar.getMonthsInYear(e),i==null?void 0:i.round);break;case"day":r.day=an(e.day,n,1,e.calendar.getDaysInMonth(e),i==null?void 0:i.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(r),Xn(r),r}function Nh(e,t,n,i){let r=e.copy();switch(t){case"hour":{let s=e.hour,a=0,o=23;if((i==null?void 0:i.hourCycle)===12){let l=s>=12;a=l?12:0,o=l?23:11}r.hour=an(s,n,a,o,i==null?void 0:i.round);break}case"minute":r.minute=an(e.minute,n,0,59,i==null?void 0:i.round);break;case"second":r.second=an(e.second,n,0,59,i==null?void 0:i.round);break;case"millisecond":r.millisecond=an(e.millisecond,n,0,999,i==null?void 0:i.round);break;default:throw new Error("Unsupported field "+t)}return r}function an(e,t,n,i,r=!1){if(r){e+=Math.sign(t),e0?e=Math.ceil(e/s)*s:e=Math.floor(e/s)*s,e>i&&(e=n)}else e+=t,ei&&(e=n+(e-i-1));return e}function Rh(e,t){let n;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let r=la(jn(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=nn(r,e.timeZone)}else n=Fi(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let i=sn(n,e.timeZone);return it(i,e.calendar)}function hP(e,t){return Rh(e,Ah(t))}function gP(e,t,n,i){switch(t){case"hour":{let r=0,s=23;if((i==null?void 0:i.hourCycle)===12){let p=e.hour>=12;r=p?12:0,s=p?23:11}let a=jn(e),o=it(sa(a,{hour:r}),new Mi),l=[nn(o,e.timeZone,"earlier"),nn(o,e.timeZone,"later")].filter(p=>sn(p,e.timeZone).day===o.day)[0],c=it(sa(a,{hour:s}),new Mi),u=[nn(c,e.timeZone,"earlier"),nn(c,e.timeZone,"later")].filter(p=>sn(p,e.timeZone).day===c.day).pop(),h=Fi(e)-e.offset,m=Math.floor(h/Sr),d=h%Sr;return h=an(m,n,Math.floor(l/Sr),Math.floor(u/Sr),i==null?void 0:i.round)*Sr+d,it(sn(h,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return Nh(e,t,n,i);case"era":case"year":case"month":case"day":{let r=cl(jn(e),t,n,i),s=nn(r,e.timeZone);return it(sn(s,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function pP(e,t,n){let i=jn(e),r=sa(ll(i,t),t);if(r.compare(i)===0)return e;let s=nn(r,e.timeZone,n);return it(sn(s,e.timeZone),e.calendar)}function yP(e){let t=e.match(fP);if(!t)throw mP.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let n=new $i(Ko(t[1],0,9999),Ko(t[2],1,12),1);return n.day=Ko(t[3],1,n.calendar.getDaysInMonth(n)),n}function Ko(e,t,n){let i=Number(e);if(in)throw new RangeError(`Value out of range: ${t} <= ${i} <= ${n}`);return i}function bP(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function Dh(e){let t=it(e,new Mi),n;return t.era==="BC"?n=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):n=String(t.year).padStart(4,"0"),`${n}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function Lh(e){return`${Dh(e)}T${bP(e)}`}function EP(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let n=Math.floor(e/36e5),i=Math.floor(e%36e5/6e4),r=Math.floor(e%36e5%6e4/1e3),s=`${t}${String(n).padStart(2,"0")}:${String(i).padStart(2,"0")}`;return r!==0&&(s+=`:${String(r).padStart(2,"0")}`),s}function IP(e){return`${Lh(e)}${EP(e.offset)}[${e.timeZone}]`}function PP(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ul(e,t,n){PP(e,t),t.set(e,n)}function dl(e){let t=typeof e[0]=="object"?e.shift():new Mi,n;if(typeof e[0]=="string")n=e.shift();else{let a=t.getEras();n=a[a.length-1]}let i=e.shift(),r=e.shift(),s=e.shift();return[t,n,i,r,s]}function Fh(e,t={}){if(typeof t.hour12=="boolean"&&VP()){t=g({},t);let r=wP[String(t.hour12)][e.split("-")[0]],s=t.hour12?"h12":"h23";t.hourCycle=r!=null?r:s,delete t.hour12}let n=e+(t?Object.entries(t).sort((r,s)=>r[0]s.type==="hour").value,10),r=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(s=>s.type==="hour").value,10);if(i===0&&r===23)return"h23";if(i===24&&r===23)return"h24";if(i===0&&r===11)return"h11";if(i===12&&r===11)return"h12";throw new Error("Unexpected hour cycle result")}function kP(e,t,n,i,r){let s={};for(let o in t){let l=o,c=t[l];c!=null&&(s[l]=Math.floor(c/2),s[l]>0&&c%2===0&&s[l]--)}let a=Jn(e,t,n).subtract(s);return Vr(e,a,t,n,i,r)}function Jn(e,t,n,i,r){let s=e;return t.years?s=Or(e):t.months?s=rn(e):t.weeks&&(s=wr(e,n)),Vr(e,s,t,n,i,r)}function hl(e,t,n,i,r){let s=g({},t);s.days?s.days--:s.weeks?s.weeks--:s.months?s.months--:s.years&&s.years--;let a=Jn(e,t,n).subtract(s);return Vr(e,a,t,n,i,r)}function Vr(e,t,n,i,r,s){return r&&e.compare(r)>=0&&(t=Th(t,Jn(Yn(r),n,i))),s&&e.compare(s)<=0&&(t=Sh(t,hl(Yn(s),n,i))),t}function Pt(e,t,n){let i=Yn(e);return t&&(i=Th(i,Yn(t))),n&&(i=Sh(i,Yn(n))),i}function ch(e,t,n,i,r,s){switch(t){case"start":return Jn(e,n,i,r,s);case"end":return hl(e,n,i,r,s);case"center":default:return kP(e,n,i,r,s)}}function nt(e,t){return e==null||t==null?e===t:Zn(e,t)}function uh(e,t,n,i,r){return e?t!=null&&t(e,n)?!0:$t(e,i,r):!1}function $t(e,t,n){return t!=null&&e.compare(t)<0||n!=null&&e.compare(n)>0}function NP(e,t,n){let i=e.subtract({days:1});return Zn(i,e)||$t(i,t,n)}function RP(e,t,n){let i=e.add({days:1});return Zn(i,e)||$t(i,t,n)}function gl(e){let t=g({},e);for(let n in t)t[n]=1;return t}function $h(e,t){let n=g({},t);return n.days?n.days--:n.days=-1,e.add(n)}function Hh(e){return(e==null?void 0:e.calendar.identifier)==="gregory"&&e.era==="BC"?"short":void 0}function Bh(e,t){let n=jn(oa(t));return new Ct(e,{weekday:"long",month:"long",year:"numeric",day:"numeric",era:Hh(n),timeZone:t})}function dh(e,t){let n=oa(t);return new Ct(e,{month:"long",year:"numeric",era:Hh(n),calendar:n==null?void 0:n.calendar.identifier,timeZone:t})}function DP(e,t,n,i,r){let s=n.formatRangeToParts(e.toDate(r),t.toDate(r)),a=-1;for(let c=0;ca&&(l+=s[c].value);return i(o,l)}function Zs(e,t,n,i){if(!e)return"";let r=e,s=t!=null?t:e,a=Bh(n,i);return Zn(r,s)?a.format(r.toDate(i)):DP(r,s,a,(o,l)=>`${o} \u2013 ${l}`,i)}function _h(e){return e!=null?LP[e]:void 0}function Gh(e,t,n){let i=_h(n);return wr(e,t,i)}function Uh(e,t,n,i){let r=t.add({weeks:e}),s=[],a=Gh(r,n,i);for(;s.length<7;){s.push(a);let o=a.add({days:1});if(Zn(a,o))break;a=o}return s}function MP(e,t,n,i){let r=_h(i),s=n!=null?n:eP(e,t,r);return[...new Array(s).keys()].map(o=>Uh(o,e,t,i))}function FP(e,t){let n=new Ct(e,{weekday:"long",timeZone:t}),i=new Ct(e,{weekday:"short",timeZone:t}),r=new Ct(e,{weekday:"narrow",timeZone:t});return s=>{let a=s instanceof Date?s:s.toDate(t);return{value:s,short:i.format(a),long:n.format(a),narrow:r.format(a)}}}function $P(e,t,n,i){let r=Gh(e,i,t),s=[...new Array(7).keys()],a=FP(i,n);return s.map(o=>a(r.add({days:o})))}function HP(e,t="long"){let n=new Date(2021,0,1),i=[];for(let r=0;r<12;r++)i.push(n.toLocaleString(e,{month:t})),n.setMonth(n.getMonth()+1);return i}function BP(e){let t=[];for(let n=e.from;n<=e.to;n+=1)t.push(n);return t}function GP(e){if(e){if(e.length===3)return e.padEnd(4,"0");if(e.length===2){let t=new Date().getFullYear(),n=Math.floor(t/100)*100,i=parseInt(e.slice(-2),10),r=n+i;return r>t+_P?(r-100).toString():r.toString()}return e}}function Li(e,t){let n=t!=null&&t.strict?10:12,i=e-e%10,r=[];for(let s=0;s0?{startDate:Jn(o,e,t,n,i),endDate:l,focusedDate:Pt(o,n,i)}:{startDate:a,endDate:l,focusedDate:Pt(o,n,i)}}}function qh(e,t,n,i,r,s){let a=xr(n,i,r,s),o=t.add(n);return a({focusedDate:e.add(n),startDate:Jn(Vr(e,o,n,i,r,s),n,i)})}function Wh(e,t,n,i,r,s){let a=xr(n,i,r,s),o=t.subtract(n);return a({focusedDate:e.subtract(n),startDate:Jn(Vr(e,o,n,i,r,s),n,i)})}function UP(e,t,n,i,r,s,a){let o=xr(i,r,s,a);if(!n&&!i.days)return o({focusedDate:e.add(gl(i)),startDate:t});if(i.days)return qh(e,t,i,r,s,a);if(i.weeks)return o({focusedDate:e.add({months:1}),startDate:t});if(i.months||i.years)return o({focusedDate:e.add({years:1}),startDate:t})}function qP(e,t,n,i,r,s,a){let o=xr(i,r,s,a);if(!n&&!i.days)return o({focusedDate:e.subtract(gl(i)),startDate:t});if(i.days)return Wh(e,t,i,r,s,a);if(i.weeks)return o({focusedDate:e.subtract({months:1}),startDate:t});if(i.months||i.years)return o({focusedDate:e.subtract({years:1}),startDate:t})}function zP(e,t,n){var c;let i=YP(t,n),{year:r,month:s,day:a}=(c=jP(i,e))!=null?c:{};if(r!=null||s!=null||a!=null){let u=new Date;r||(r=u.getFullYear().toString()),s||(s=(u.getMonth()+1).toString()),a||(a=u.getDate().toString())}if(hh(r)||(r=GP(r)),hh(r)&&WP(s)&&KP(a))return new $i(+r,+s,+a);let l=Date.parse(e);if(!isNaN(l)){let u=new Date(l);return new $i(u.getFullYear(),u.getMonth()+1,u.getDate())}}function YP(e,t){return new Ct(e,{day:"numeric",month:"numeric",year:"numeric",timeZone:t}).formatToParts(new Date(2e3,11,25)).map(({type:r,value:s})=>r==="literal"?`${s}?`:`((?!=<${r}>)\\d+)?`).join("")}function jP(e,t){var i;let n=t.match(e);return(i=e.toString().match(/<(.+?)>/g))==null?void 0:i.map(r=>{var a;let s=r.match(/<(.+)>/);return!s||s.length<=0?null:(a=r.match(/<(.+)>/))==null?void 0:a[1]}).reduce((r,s,a)=>(s&&(n&&n.length>a?r[s]=n[a+1]:r[s]=null),r),{})}function gh(e,t,n){let i=Yn(Ih(n));switch(e){case"thisWeek":return[wr(i,t),sh(i,t)];case"thisMonth":return[rn(i),i];case"thisQuarter":return[rn(i).add({months:-((i.month-1)%3)}),i];case"thisYear":return[Or(i),i];case"last3Days":return[i.add({days:-2}),i];case"last7Days":return[i.add({days:-6}),i];case"last14Days":return[i.add({days:-13}),i];case"last30Days":return[i.add({days:-29}),i];case"last90Days":return[i.add({days:-89}),i];case"lastMonth":return[rn(i.add({months:-1})),Zo(i.add({months:-1}))];case"lastQuarter":return[rn(i.add({months:-((i.month-1)%3)-3})),Zo(i.add({months:-((i.month-1)%3)-1}))];case"lastWeek":return[wr(i,t).add({weeks:-1}),sh(i,t).add({weeks:-1})];case"lastYear":return[Or(i.add({years:-1})),JI(i.add({years:-1}))];default:throw new Error(`Invalid date range preset: ${e}`)}}function XP(e={}){var c;let{level:t="polite",document:n=document,root:i,delay:r=0}=e,s=(c=n.defaultView)!=null?c:window,a=i!=null?i:n.body;function o(u,h){let m=n.getElementById(Js);m==null||m.remove(),h=h!=null?h:r;let d=n.createElement("span");d.id=Js,d.dataset.liveAnnouncer="true";let p=t!=="assertive"?"status":"alert";d.setAttribute("aria-live",t),d.setAttribute("role",p),Object.assign(d.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}),a.appendChild(d),s.setTimeout(()=>{d.textContent=u},h)}function l(){let u=n.getElementById(Js);u==null||u.remove()}return{announce:o,destroy:l,toJSON(){return Js}}}function sl(e){let[t,n]=e,i;return!t||!n?i=e:i=t.compare(n)<=0?e:[n,t],i}function Ri(e,t){let[n,i]=t;return!n||!i?!1:n.compare(e)<=0&&i.compare(e)>=0}function Qs(e){return e.slice().filter(t=>t!=null).sort((t,n)=>t.compare(n))}function lC(e){return Ce(e,{year:"calendar decade",month:"calendar year",day:"calendar month"})}function uC(e){return new Ct(e).formatToParts(new Date).map(t=>{var n;return(n=cC[t.type])!=null?n:t.value}).join("")}function hC(e){let i=new Intl.DateTimeFormat(e).formatToParts(new Date).find(r=>r.type==="literal");return i?i.value:"/"}function on(e,t){return e?e==="day"?0:e==="month"?1:2:t||0}function pl(e){return e===0?"day":e===1?"month":"year"}function fl(e,t,n){return pl(He(on(e,0),on(t,0),on(n,2)))}function pC(e,t){return on(e,0)>on(t,0)}function fC(e,t){return on(e,0)e(t))}function IC(e,t){let{state:n,context:i,prop:r,send:s,computed:a,scope:o}=e,l=i.get("startValue"),c=a("endValue"),u=i.get("value"),h=i.get("focusedValue"),m=i.get("hoveredValue"),d=m?sl([u[0],m]):[],p=!!r("disabled"),v=!!r("readOnly"),I=!!r("invalid"),T=a("isInteractive"),O=u.length===0,b=r("min"),f=r("max"),S=r("locale"),P=r("timeZone"),V=r("startOfWeek"),A=n.matches("focused"),x=n.matches("open"),k=r("selectionMode")==="range",N=r("isDateUnavailable"),D=i.get("currentPlacement"),$=On(y(g({},r("positioning")),{placement:D})),te=hC(S),Z=g(g({},gC),r("translations"));function ie(M=l){let R=r("fixedWeeks")?6:void 0;return MP(M,S,R,V)}function J(M={}){let{format:R}=M;return HP(S,R).map((F,G)=>{let ae=G+1,ze=h.set({month:ae}),Ne=$t(ze,b,f);return{label:F,value:ae,disabled:Ne}})}function Se(){var R,F;return BP({from:(R=b==null?void 0:b.year)!=null?R:1900,to:(F=f==null?void 0:f.year)!=null?F:2100}).map(G=>({label:G.toString(),value:G,disabled:!Pi(G,b==null?void 0:b.year,f==null?void 0:f.year)}))}function Pe(M){return uh(M,N,S,b,f)}function ne(M){let R=l!=null?l:Di(P);s({type:"FOCUS.SET",value:R.set({month:M})})}function Ie(M){let R=l!=null?l:Di(P);s({type:"FOCUS.SET",value:R.set({year:M})})}function rt(M){let{value:R,disabled:F}=M,G=h.set({year:R}),ze=!Li(l.year,{strict:!0}).includes(R),Ne=Pi(R,b==null?void 0:b.year,f==null?void 0:f.year),Tt={focused:h.year===M.value,selectable:ze||Ne,outsideRange:ze,selected:!!u.find(Zi=>Zi&&Zi.year===R),valueText:R.toString(),inRange:k&&(Ri(G,u)||Ri(G,d)),value:G,get disabled(){return F||!Tt.selectable}};return Tt}function Ut(M){let{value:R,disabled:F}=M,G=h.set({month:R}),ae=dh(S,P),ze={focused:h.month===M.value,selectable:!$t(G,b,f),selected:!!u.find(Ne=>Ne&&Ne.month===R&&Ne.year===h.year),valueText:ae.format(G.toDate(P)),inRange:k&&(Ri(G,u)||Ri(G,d)),value:G,get disabled(){return F||!ze.selectable}};return ze}function Xi(M){let{value:R,disabled:F,visibleRange:G=a("visibleRange")}=M,ae=Bh(S,P),ze=gl(a("visibleDuration")),Ne=r("outsideDaySelectable"),Tt=G.start.add(ze).subtract({days:1}),Zi=$t(R,G.start,Tt),kf=k&&Ri(R,u),Nf=k&&nt(R,u[0]),Rf=k&&nt(R,u[1]),Ma=k&&d.length>0,ic=Ma&&Ri(R,d),Df=Ma&&nt(R,d[0]),Lf=Ma&&nt(R,d[1]),Ji={invalid:$t(R,b,f),disabled:F||!Ne&&Zi||$t(R,b,f),selected:u.some(Mf=>nt(R,Mf)),unavailable:uh(R,N,S,b,f)&&!F,outsideRange:Zi,today:jI(R,P),weekend:nP(R,S),formattedDate:ae.format(R.toDate(P)),get focused(){return nt(R,h)&&(!Ji.outsideRange||Ne)},get ariaLabel(){return Z.dayCell(Ji)},get selectable(){return!Ji.disabled&&!Ji.unavailable},inRange:kf||ic,firstInRange:Nf,lastInRange:Rf,inHoveredRange:ic,firstInHoveredRange:Df,lastInHoveredRange:Lf};return Ji}function La(M){let{view:R="day",id:F}=M;return[R,F].filter(Boolean).join(" ")}return{focused:A,open:x,disabled:p,invalid:I,readOnly:v,inline:!!r("inline"),numOfMonths:r("numOfMonths"),selectionMode:r("selectionMode"),view:i.get("view"),getRangePresetValue(M){return gh(M,S,P)},getDaysInWeek(M,R=l){return Uh(M,R,S,V)},getOffset(M){let R=l.add(M),F=c.add(M),G=dh(S,P);return{visibleRange:{start:R,end:F},weeks:ie(R),visibleRangeText:{start:G.format(R.toDate(P)),end:G.format(F.toDate(P))}}},getMonthWeeks:ie,isUnavailable:Pe,weeks:ie(),weekDays:$P(Di(P),V,P,S),visibleRangeText:a("visibleRangeText"),value:u,valueAsDate:u.filter(M=>M!=null).map(M=>M.toDate(P)),valueAsString:a("valueAsString"),focusedValue:h,focusedValueAsDate:h==null?void 0:h.toDate(P),focusedValueAsString:r("format")(h,{locale:S,timeZone:P}),visibleRange:a("visibleRange"),selectToday(){let M=Pt(Di(P),b,f);s({type:"VALUE.SET",value:M})},setValue(M){let R=M.map(F=>Pt(F,b,f));s({type:"VALUE.SET",value:R})},clearValue(){s({type:"VALUE.CLEAR"})},setFocusedValue(M){s({type:"FOCUS.SET",value:M})},setOpen(M){r("inline")||n.matches("open")===M||s({type:M?"OPEN":"CLOSE"})},focusMonth:ne,focusYear:Ie,getYears:Se,getMonths:J,getYearsGrid(M={}){let{columns:R=1}=M,F=Li(l.year,{strict:!0}).map(G=>({label:G.toString(),value:G,disabled:!Pi(G,b==null?void 0:b.year,f==null?void 0:f.year)}));return cr(F,R)},getDecade(){let M=Li(l.year,{strict:!0});return{start:M.at(0),end:M.at(-1)}},getMonthsGrid(M={}){let{columns:R=1,format:F}=M;return cr(J({format:F}),R)},format(M,R={month:"long",year:"numeric"}){return new Ct(S,R).format(M.toDate(P))},setView(M){s({type:"VIEW.SET",view:M})},goToNext(){s({type:"GOTO.NEXT",view:i.get("view")})},goToPrev(){s({type:"GOTO.PREV",view:i.get("view")})},getRootProps(){return t.element(y(g({},de.root.attrs),{dir:r("dir"),id:QP(o),"data-state":x?"open":"closed","data-disabled":E(p),"data-readonly":E(v),"data-empty":E(O)}))},getLabelProps(M={}){let{index:R=0}=M;return t.label(y(g({},de.label.attrs),{id:JP(o,R),dir:r("dir"),htmlFor:ph(o,R),"data-state":x?"open":"closed","data-index":R,"data-disabled":E(p),"data-readonly":E(v)}))},getControlProps(){return t.element(y(g({},de.control.attrs),{dir:r("dir"),id:zh(o),"data-disabled":E(p),"data-placeholder-shown":E(O)}))},getRangeTextProps(){return t.element(y(g({},de.rangeText.attrs),{dir:r("dir")}))},getContentProps(){return t.element(y(g({},de.content.attrs),{hidden:!x,dir:r("dir"),"data-state":x?"open":"closed","data-placement":D,"data-inline":E(r("inline")),id:rl(o),tabIndex:-1,role:"application","aria-roledescription":"datepicker","aria-label":Z.content}))},getTableProps(M={}){let{view:R="day",columns:F=R==="day"?7:4}=M,G=La(M);return t.element(y(g({},de.table.attrs),{role:"grid","data-columns":F,"aria-roledescription":lC(R),id:eC(o,G),"aria-readonly":X(v),"aria-disabled":X(p),"aria-multiselectable":X(r("selectionMode")!=="single"),"data-view":R,dir:r("dir"),tabIndex:-1,onKeyDown(ae){if(ae.defaultPrevented)return;let Ne={Enter(){R==="day"&&Pe(h)||R==="month"&&!Ut({value:h.month}).selectable||R==="year"&&!rt({value:h.year}).selectable||s({type:"TABLE.ENTER",view:R,columns:F,focus:!0})},ArrowLeft(){s({type:"TABLE.ARROW_LEFT",view:R,columns:F,focus:!0})},ArrowRight(){s({type:"TABLE.ARROW_RIGHT",view:R,columns:F,focus:!0})},ArrowUp(){s({type:"TABLE.ARROW_UP",view:R,columns:F,focus:!0})},ArrowDown(){s({type:"TABLE.ARROW_DOWN",view:R,columns:F,focus:!0})},PageUp(Tt){s({type:"TABLE.PAGE_UP",larger:Tt.shiftKey,view:R,columns:F,focus:!0})},PageDown(Tt){s({type:"TABLE.PAGE_DOWN",larger:Tt.shiftKey,view:R,columns:F,focus:!0})},Home(){s({type:"TABLE.HOME",view:R,columns:F,focus:!0})},End(){s({type:"TABLE.END",view:R,columns:F,focus:!0})}}[ge(ae,{dir:r("dir")})];Ne&&(Ne(ae),ae.preventDefault(),ae.stopPropagation())},onPointerLeave(){s({type:"TABLE.POINTER_LEAVE"})},onPointerDown(){s({type:"TABLE.POINTER_DOWN",view:R})},onPointerUp(){s({type:"TABLE.POINTER_UP",view:R})}}))},getTableHeadProps(M={}){let{view:R="day"}=M;return t.element(y(g({},de.tableHead.attrs),{"aria-hidden":!0,dir:r("dir"),"data-view":R,"data-disabled":E(p)}))},getTableHeaderProps(M={}){let{view:R="day"}=M;return t.element(y(g({},de.tableHeader.attrs),{dir:r("dir"),"data-view":R,"data-disabled":E(p)}))},getTableBodyProps(M={}){let{view:R="day"}=M;return t.element(y(g({},de.tableBody.attrs),{"data-view":R,"data-disabled":E(p)}))},getTableRowProps(M={}){let{view:R="day"}=M;return t.element(y(g({},de.tableRow.attrs),{"aria-disabled":X(p),"data-disabled":E(p),"data-view":R}))},getDayTableCellState:Xi,getDayTableCellProps(M){let{value:R}=M,F=Xi(M);return t.element(y(g({},de.tableCell.attrs),{role:"gridcell","aria-disabled":X(!F.selectable),"aria-selected":F.selected||F.inRange,"aria-invalid":X(F.invalid),"aria-current":F.today?"date":void 0,"data-value":R.toString()}))},getDayTableCellTriggerProps(M){let{value:R}=M,F=Xi(M);return t.element(y(g({},de.tableCellTrigger.attrs),{id:Xo(o,R.toString()),role:"button",dir:r("dir"),tabIndex:F.focused?0:-1,"aria-label":F.ariaLabel,"aria-disabled":X(!F.selectable),"aria-invalid":X(F.invalid),"data-disabled":E(!F.selectable),"data-selected":E(F.selected),"data-value":R.toString(),"data-view":"day","data-today":E(F.today),"data-focus":E(F.focused),"data-unavailable":E(F.unavailable),"data-range-start":E(F.firstInRange),"data-range-end":E(F.lastInRange),"data-in-range":E(F.inRange),"data-outside-range":E(F.outsideRange),"data-weekend":E(F.weekend),"data-in-hover-range":E(F.inHoveredRange),"data-hover-range-start":E(F.firstInHoveredRange),"data-hover-range-end":E(F.lastInHoveredRange),onClick(G){G.defaultPrevented||F.selectable&&s({type:"CELL.CLICK",cell:"day",value:R})},onPointerMove:k?G=>{if(G.pointerType==="touch"||!F.selectable)return;let ae=!o.isActiveElement(G.currentTarget);m&&KI(R,m)||s({type:"CELL.POINTER_MOVE",cell:"day",value:R,focus:ae})}:void 0}))},getMonthTableCellState:Ut,getMonthTableCellProps(M){let{value:R,columns:F}=M,G=Ut(M);return t.element(y(g({},de.tableCell.attrs),{dir:r("dir"),colSpan:F,role:"gridcell","aria-selected":X(G.selected||G.inRange),"data-selected":E(G.selected),"aria-disabled":X(!G.selectable),"data-value":R}))},getMonthTableCellTriggerProps(M){let{value:R}=M,F=Ut(M);return t.element(y(g({},de.tableCellTrigger.attrs),{dir:r("dir"),role:"button",id:Xo(o,R.toString()),"data-selected":E(F.selected),"aria-disabled":X(!F.selectable),"data-disabled":E(!F.selectable),"data-focus":E(F.focused),"data-in-range":E(F.inRange),"data-outside-range":E(F.outsideRange),"aria-label":F.valueText,"data-view":"month","data-value":R,tabIndex:F.focused?0:-1,onClick(G){G.defaultPrevented||F.selectable&&s({type:"CELL.CLICK",cell:"month",value:R})},onPointerMove:k?G=>{if(G.pointerType==="touch"||!F.selectable)return;let ae=!o.isActiveElement(G.currentTarget);m&&F.value&&zI(F.value,m)||s({type:"CELL.POINTER_MOVE",cell:"month",value:F.value,focus:ae})}:void 0}))},getYearTableCellState:rt,getYearTableCellProps(M){let{value:R,columns:F}=M,G=rt(M);return t.element(y(g({},de.tableCell.attrs),{dir:r("dir"),colSpan:F,role:"gridcell","aria-selected":X(G.selected),"data-selected":E(G.selected),"aria-disabled":X(!G.selectable),"data-value":R}))},getYearTableCellTriggerProps(M){let{value:R}=M,F=rt(M);return t.element(y(g({},de.tableCellTrigger.attrs),{dir:r("dir"),role:"button",id:Xo(o,R.toString()),"data-selected":E(F.selected),"data-focus":E(F.focused),"data-in-range":E(F.inRange),"aria-disabled":X(!F.selectable),"data-disabled":E(!F.selectable),"aria-label":F.valueText,"data-outside-range":E(F.outsideRange),"data-value":R,"data-view":"year",tabIndex:F.focused?0:-1,onClick(G){G.defaultPrevented||F.selectable&&s({type:"CELL.CLICK",cell:"year",value:R})},onPointerMove:k?G=>{if(G.pointerType==="touch"||!F.selectable)return;let ae=!o.isActiveElement(G.currentTarget);m&&F.value&&YI(F.value,m)||s({type:"CELL.POINTER_MOVE",cell:"year",value:F.value,focus:ae})}:void 0}))},getNextTriggerProps(M={}){let{view:R="day"}=M,F=p||!a("isNextVisibleRangeValid");return t.button(y(g({},de.nextTrigger.attrs),{dir:r("dir"),id:nC(o,R),type:"button","aria-label":Z.nextTrigger(R),disabled:F,"data-disabled":E(F),onClick(G){G.defaultPrevented||s({type:"GOTO.NEXT",view:R})}}))},getPrevTriggerProps(M={}){let{view:R="day"}=M,F=p||!a("isPrevVisibleRangeValid");return t.button(y(g({},de.prevTrigger.attrs),{dir:r("dir"),id:tC(o,R),type:"button","aria-label":Z.prevTrigger(R),disabled:F,"data-disabled":E(F),onClick(G){G.defaultPrevented||s({type:"GOTO.PREV",view:R})}}))},getClearTriggerProps(){return t.button(y(g({},de.clearTrigger.attrs),{id:Kh(o),dir:r("dir"),type:"button","aria-label":Z.clearTrigger,hidden:!u.length,onClick(M){M.defaultPrevented||s({type:"VALUE.CLEAR"})}}))},getTriggerProps(){return t.button(y(g({},de.trigger.attrs),{id:Yh(o),dir:r("dir"),type:"button","data-placement":D,"aria-label":Z.trigger(x),"aria-controls":rl(o),"data-state":x?"open":"closed","data-placeholder-shown":E(O),"aria-haspopup":"grid",disabled:p,onClick(M){M.defaultPrevented||T&&s({type:"TRIGGER.CLICK"})}}))},getViewProps(M={}){let{view:R="day"}=M;return t.element(y(g({},de.view.attrs),{"data-view":R,hidden:i.get("view")!==R}))},getViewTriggerProps(M={}){let{view:R="day"}=M;return t.button(y(g({},de.viewTrigger.attrs),{"data-view":R,dir:r("dir"),id:iC(o,R),type:"button",disabled:p,"aria-label":Z.viewTrigger(R),onClick(F){F.defaultPrevented||T&&s({type:"VIEW.TOGGLE",src:"viewTrigger"})}}))},getViewControlProps(M={}){let{view:R="day"}=M;return t.element(y(g({},de.viewControl.attrs),{"data-view":R,dir:r("dir")}))},getInputProps(M={}){let{index:R=0,fixOnBlur:F=!0}=M;return t.input(y(g({},de.input.attrs),{id:ph(o,R),autoComplete:"off",autoCorrect:"off",spellCheck:"false",dir:r("dir"),name:r("name"),"data-index":R,"data-state":x?"open":"closed","data-placeholder-shown":E(O),readOnly:v,disabled:p,required:r("required"),"aria-invalid":X(I),"data-invalid":E(I),placeholder:r("placeholder")||uC(S),defaultValue:a("valueAsString")[R],onBeforeInput(G){let{data:ae}=Yt(G);Qh(ae,te)||G.preventDefault()},onFocus(){s({type:"INPUT.FOCUS",index:R})},onBlur(G){let ae=G.currentTarget.value.trim();s({type:"INPUT.BLUR",value:ae,index:R,fixOnBlur:F})},onKeyDown(G){if(G.defaultPrevented||!T)return;let ze={Enter(Ne){Re(Ne)||Pe(h)||Ne.currentTarget.value.trim()!==""&&s({type:"INPUT.ENTER",value:Ne.currentTarget.value,index:R})}}[G.key];ze&&(ze(G),G.preventDefault())},onInput(G){let ae=G.currentTarget.value;s({type:"INPUT.CHANGE",value:dC(ae,te),index:R})}}))},getMonthSelectProps(){return t.select(y(g({},de.monthSelect.attrs),{id:Xh(o),"aria-label":Z.monthSelect,disabled:p,dir:r("dir"),defaultValue:l.month,onChange(M){ne(Number(M.currentTarget.value))}}))},getYearSelectProps(){return t.select(y(g({},de.yearSelect.attrs),{id:Zh(o),disabled:p,"aria-label":Z.yearSelect,dir:r("dir"),defaultValue:l.year,onChange(M){Ie(Number(M.currentTarget.value))}}))},getPositionerProps(){return t.element(y(g({id:jh(o)},de.positioner.attrs),{dir:r("dir"),style:$.floating}))},getPresetTriggerProps(M){let R=Array.isArray(M.value)?M.value:gh(M.value,S,P),F=R.filter(G=>G!=null).map(G=>G.toDate(P).toDateString());return t.button(y(g({},de.presetTrigger.attrs),{"aria-label":Z.presetTrigger(F),type:"button",onClick(G){G.defaultPrevented||s({type:"PRESET.CLICK",value:R})}}))}}}function PC(e,t){if((e==null?void 0:e.length)!==(t==null?void 0:t.length))return!1;let n=Math.max(e.length,t.length);for(let i=0;in==null?"":t("format")(n,{locale:t("locale"),timeZone:t("timeZone")}))}function ve(e,t){let{context:n,prop:i,computed:r}=e;if(!t)return;let s=ra(e,t);if(nt(n.get("focusedValue"),s))return;let o=xr(r("visibleDuration"),i("locale"),i("min"),i("max"))({focusedDate:s,startDate:n.get("startValue")});n.set("startValue",o.startDate),n.set("focusedValue",o.focusedDate)}function ta(e,t){let{context:n}=e;n.set("startValue",t.startDate);let i=n.get("focusedValue");nt(i,t.focusedDate)||n.set("focusedValue",t.focusedDate)}function gt(e){return Array.isArray(e)?e.map(t=>gt(t)):e instanceof Date?new $i(e.getFullYear(),e.getMonth()+1,e.getDate()):yP(e)}function yh(e){let t=n=>String(n).padStart(2,"0");return`${e.year}-${t(e.month)}-${t(e.day)}`}var bh,GI,Mi,UI,XI,qo,ah,Wo,tP,oh,lh,Sr,fP,mP,vP,Ex,CP,$i,SP,TP,OP,Mh,zo,Ct,wP,Yo,jo,LP,_P,hh,WP,KP,Js,ZP,de,JP,QP,eC,rl,Xo,tC,nC,iC,Kh,zh,ph,Yh,jh,Xh,Zh,fh,mh,ia,Tr,rC,sC,aC,oC,Jh,cC,Qh,vh,dC,gC,yC,EC,ht,CC,ra,SC,Ix,TC,Px,OC,Cx,wC,Sx,VC,Tx,xC,Ox,AC,kC,tg=re(()=>{"use strict";Pr();Wn();tn();se();bh=1721426;GI={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]},Mi=class{fromJulianDay(e){let t=e,n=t-bh,i=Math.floor(n/146097),r=Uo(n,146097),s=Math.floor(r/36524),a=Uo(r,36524),o=Math.floor(a/1461),l=Uo(a,1461),c=Math.floor(l/365),u=i*400+s*100+o*4+c+(s!==4&&c!==4?1:0),[h,m]=_I(u),d=t-js(h,m,1,1),p=2;t= start date");return`${this.formatter.format(e)} \u2013 ${this.formatter.format(t)}`}formatRangeToParts(e,t){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(e,t);if(t= start date");let n=this.formatter.formatToParts(e),i=this.formatter.formatToParts(t);return[...n.map(r=>y(g({},r),{source:"startRange"})),{type:"literal",value:" \u2013 ",source:"shared"},...i.map(r=>y(g({},r),{source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return xP()&&(this.resolvedHourCycle||(this.resolvedHourCycle=AP(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),e.calendar==="ethiopic-amete-alem"&&(e.calendar="ethioaa"),e}constructor(e,t={}){this.formatter=Fh(e,t),this.options=t}},wP={true:{ja:"h11"},false:{}};Yo=null;jo=null;LP=["sun","mon","tue","wed","thu","fri","sat"];_P=10;hh=e=>e!=null&&e.length===4,WP=e=>e!=null&&parseFloat(e)<=12,KP=e=>e!=null&&parseFloat(e)<=31;Js="__live-region__";ZP=U("date-picker").parts("clearTrigger","content","control","input","label","monthSelect","nextTrigger","positioner","presetTrigger","prevTrigger","rangeText","root","table","tableBody","tableCell","tableCellTrigger","tableHead","tableHeader","tableRow","trigger","view","viewControl","viewTrigger","yearSelect"),de=ZP.build(),JP=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.label)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:label:${t}`},QP=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`datepicker:${e.id}`},eC=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.table)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:table:${t}`},rl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`datepicker:${e.id}:content`},Xo=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.cellTrigger)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:cell-trigger:${t}`},tC=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.prevTrigger)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:prev:${t}`},nC=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.nextTrigger)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:next:${t}`},iC=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.viewTrigger)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:view:${t}`},Kh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.clearTrigger)!=null?n:`datepicker:${e.id}:clear`},zh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`datepicker:${e.id}:control`},ph=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.input)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:input:${t}`},Yh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`datepicker:${e.id}:trigger`},jh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`datepicker:${e.id}:positioner`},Xh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.monthSelect)!=null?n:`datepicker:${e.id}:month-select`},Zh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.yearSelect)!=null?n:`datepicker:${e.id}:year-select`},fh=(e,t)=>vi(ia(e),`[data-part=table-cell-trigger][data-view=${t}][data-focus]:not([data-outside-range])`),mh=e=>e.getById(Yh(e)),ia=e=>e.getById(rl(e)),Tr=e=>Fe(Jh(e),"[data-part=input]"),rC=e=>e.getById(Zh(e)),sC=e=>e.getById(Xh(e)),aC=e=>e.getById(Kh(e)),oC=e=>e.getById(jh(e)),Jh=e=>e.getById(zh(e));cC={day:"dd",month:"mm",year:"yyyy"};Qh=(e,t)=>e?/\d/.test(e)||e===t||e.length!==1:!0,vh=e=>!Number.isNaN(e.day)&&!Number.isNaN(e.month)&&!Number.isNaN(e.year),dC=(e,t)=>e.split("").filter(n=>Qh(n,t)).join("");gC={dayCell(e){return e.unavailable?`Not available. ${e.formattedDate}`:e.selected?`Selected date. ${e.formattedDate}`:`Choose ${e.formattedDate}`},trigger(e){return e?"Close calendar":"Open calendar"},viewTrigger(e){return Ce(e,{year:"Switch to month view",month:"Switch to day view",day:"Switch to year view"})},presetTrigger(e){let[t="",n=""]=e;return`select ${t} to ${n}`},prevTrigger(e){return Ce(e,{year:"Switch to previous decade",month:"Switch to previous year",day:"Switch to previous month"})},nextTrigger(e){return Ce(e,{year:"Switch to next decade",month:"Switch to next year",day:"Switch to next month"})},placeholder(){return{day:"dd",month:"mm",year:"yyyy"}},content:"calendar",monthSelect:"Select month",yearSelect:"Select year",clearTrigger:"Clear selected dates"};yC=["day","month","year"];EC=Bn(e=>[e.view,e.startValue.toString(),e.endValue.toString(),e.locale],([e],t)=>{let{startValue:n,endValue:i,locale:r,timeZone:s,selectionMode:a}=t;if(e==="year"){let h=Li(n.year,{strict:!0}),m=h.at(0).toString(),d=h.at(-1).toString();return{start:m,end:d,formatted:`${m} - ${d}`}}if(e==="month"){let h=new Ct(r,{year:"numeric",timeZone:s}),m=h.format(n.toDate(s)),d=h.format(i.toDate(s)),p=a==="range"?`${m} - ${d}`:m;return{start:m,end:d,formatted:p}}let o=new Ct(r,{month:"long",year:"numeric",timeZone:s}),l=o.format(n.toDate(s)),c=o.format(i.toDate(s)),u=a==="range"?`${l} - ${c}`:l;return{start:l,end:c,formatted:u}});({and:ht}=Ee());CC={props({props:e}){let t=e.locale||"en-US",n=e.timeZone||"UTC",i=e.selectionMode||"single",r=e.numOfMonths||1,s=e.defaultValue?Qs(e.defaultValue).map(h=>Pt(h,e.min,e.max)):void 0,a=e.value?Qs(e.value).map(h=>Pt(h,e.min,e.max)):void 0,o=e.focusedValue||e.defaultFocusedValue||(a==null?void 0:a[0])||(s==null?void 0:s[0])||Di(n);o=Pt(o,e.min,e.max);let l="day",c="year",u=fl(e.view||l,l,c);return y(g({locale:t,numOfMonths:r,timeZone:n,selectionMode:i,defaultView:u,minView:l,maxView:c,outsideDaySelectable:!1,closeOnSelect:!0,format(h,{locale:m,timeZone:d}){return new Ct(m,{timeZone:d,day:"2-digit",month:"2-digit",year:"numeric"}).format(h.toDate(d))},parse(h,{locale:m,timeZone:d}){return zP(h,m,d)}},e),{focusedValue:typeof e.focusedValue=="undefined"?void 0:o,defaultFocusedValue:o,value:a,defaultValue:s!=null?s:[],positioning:g({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")||e("inline")?"open":"idle"},refs(){return{announcer:void 0}},context({prop:e,bindable:t,getContext:n}){return{focusedValue:t(()=>({defaultValue:e("defaultFocusedValue"),value:e("focusedValue"),isEqual:nt,hash:i=>i.toString(),sync:!0,onChange(i){var l;let r=n(),s=r.get("view"),a=r.get("value"),o=ea(a,e);(l=e("onFocusChange"))==null||l({value:a,valueAsString:o,view:s,focusedValue:i})}})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:PC,hash:i=>i.map(r=>{var s;return(s=r==null?void 0:r.toString())!=null?s:""}).join(","),onChange(i){var a;let r=n(),s=ea(i,e);(a=e("onValueChange"))==null||a({value:i,valueAsString:s,view:r.get("view")})}})),inputValue:t(()=>({defaultValue:""})),activeIndex:t(()=>({defaultValue:0,sync:!0})),hoveredValue:t(()=>({defaultValue:null,isEqual:nt})),view:t(()=>({defaultValue:e("defaultView"),value:e("view"),onChange(i){var r;(r=e("onViewChange"))==null||r({view:i})}})),startValue:t(()=>{let i=e("focusedValue")||e("defaultFocusedValue");return{defaultValue:ch(i,"start",{months:e("numOfMonths")},e("locale")),isEqual:nt,hash:r=>r.toString()}}),currentPlacement:t(()=>({defaultValue:void 0})),restoreFocus:t(()=>({defaultValue:!1}))}},computed:{isInteractive:({prop:e})=>!e("disabled")&&!e("readOnly"),visibleDuration:({prop:e})=>({months:e("numOfMonths")}),endValue:({context:e,computed:t})=>$h(e.get("startValue"),t("visibleDuration")),visibleRange:({context:e,computed:t})=>({start:e.get("startValue"),end:t("endValue")}),visibleRangeText:({context:e,prop:t,computed:n})=>EC({view:e.get("view"),startValue:e.get("startValue"),endValue:n("endValue"),locale:t("locale"),timeZone:t("timeZone"),selectionMode:t("selectionMode")}),isPrevVisibleRangeValid:({context:e,prop:t})=>!NP(e.get("startValue"),t("min"),t("max")),isNextVisibleRangeValid:({prop:e,computed:t})=>!RP(t("endValue"),e("min"),e("max")),valueAsString:({context:e,prop:t})=>ea(e.get("value"),t)},effects:["setupLiveRegion"],watch({track:e,prop:t,context:n,action:i,computed:r}){e([()=>t("locale")],()=>{i(["setStartValue","syncInputElement"])}),e([()=>n.hash("focusedValue")],()=>{i(["setStartValue","focusActiveCellIfNeeded","setHoveredValueIfKeyboard"])}),e([()=>n.hash("startValue")],()=>{i(["syncMonthSelectElement","syncYearSelectElement","invokeOnVisibleRangeChange"])}),e([()=>n.get("inputValue")],()=>{i(["syncInputValue"])}),e([()=>n.hash("value")],()=>{i(["syncInputElement"])}),e([()=>r("valueAsString").toString()],()=>{i(["announceValueText"])}),e([()=>n.get("view")],()=>{i(["focusActiveCell"])}),e([()=>t("open")],()=>{i(["toggleVisibility"])})},on:{"VALUE.SET":{actions:["setDateValue","setFocusedDate"]},"VIEW.SET":{actions:["setView"]},"FOCUS.SET":{actions:["setFocusedDate"]},"VALUE.CLEAR":{actions:["clearDateValue","clearFocusedDate","focusFirstInputElement"]},"INPUT.CHANGE":[{guard:"isInputValueEmpty",actions:["setInputValue","clearDateValue","clearFocusedDate"]},{actions:["setInputValue","focusParsedDate"]}],"INPUT.ENTER":{actions:["focusParsedDate","selectFocusedDate"]},"INPUT.FOCUS":{actions:["setActiveIndex"]},"INPUT.BLUR":[{guard:"shouldFixOnBlur",actions:["setActiveIndexToStart","selectParsedDate"]},{actions:["setActiveIndexToStart"]}],"PRESET.CLICK":[{guard:"isOpenControlled",actions:["setDateValue","setFocusedDate","invokeOnClose"]},{target:"focused",actions:["setDateValue","setFocusedDate","focusInputElement"]}],"GOTO.NEXT":[{guard:"isYearView",actions:["focusNextDecade","announceVisibleRange"]},{guard:"isMonthView",actions:["focusNextYear","announceVisibleRange"]},{actions:["focusNextPage"]}],"GOTO.PREV":[{guard:"isYearView",actions:["focusPreviousDecade","announceVisibleRange"]},{guard:"isMonthView",actions:["focusPreviousYear","announceVisibleRange"]},{actions:["focusPreviousPage"]}]},states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open",actions:["focusFirstSelectedDate","focusActiveCell"]},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}]}},focused:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open",actions:["focusFirstSelectedDate","focusActiveCell"]},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}]}},open:{tags:["open"],effects:["trackDismissableElement","trackPositioning"],exit:["clearHoveredDate","resetView"],on:{"CONTROLLED.CLOSE":[{guard:ht("shouldRestoreFocus","isInteractOutsideEvent"),target:"focused",actions:["focusTriggerElement"]},{guard:"shouldRestoreFocus",target:"focused",actions:["focusInputElement"]},{target:"idle"}],"CELL.CLICK":[{guard:"isAboveMinView",actions:["setFocusedValueForView","setPreviousView"]},{guard:ht("isRangePicker","hasSelectedRange"),actions:["setActiveIndexToStart","resetSelection","setActiveIndexToEnd"]},{guard:ht("isRangePicker","isSelectingEndDate","closeOnSelect","isOpenControlled"),actions:["setFocusedDate","setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose","setRestoreFocus"]},{guard:ht("isRangePicker","isSelectingEndDate","closeOnSelect"),target:"focused",actions:["setFocusedDate","setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose","focusInputElement"]},{guard:ht("isRangePicker","isSelectingEndDate"),actions:["setFocusedDate","setSelectedDate","setActiveIndexToStart","clearHoveredDate"]},{guard:"isRangePicker",actions:["setFocusedDate","setSelectedDate","setActiveIndexToEnd"]},{guard:"isMultiPicker",actions:["setFocusedDate","toggleSelectedDate"]},{guard:ht("closeOnSelect","isOpenControlled"),actions:["setFocusedDate","setSelectedDate","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["setFocusedDate","setSelectedDate","invokeOnClose","focusInputElement"]},{actions:["setFocusedDate","setSelectedDate"]}],"CELL.POINTER_MOVE":{guard:ht("isRangePicker","isSelectingEndDate"),actions:["setHoveredDate","setFocusedDate"]},"TABLE.POINTER_LEAVE":{guard:"isRangePicker",actions:["clearHoveredDate"]},"TABLE.POINTER_DOWN":{actions:["disableTextSelection"]},"TABLE.POINTER_UP":{actions:["enableTextSelection"]},"TABLE.ESCAPE":[{guard:"isOpenControlled",actions:["focusFirstSelectedDate","invokeOnClose"]},{target:"focused",actions:["focusFirstSelectedDate","invokeOnClose","focusTriggerElement"]}],"TABLE.ENTER":[{guard:"isAboveMinView",actions:["setPreviousView"]},{guard:ht("isRangePicker","hasSelectedRange"),actions:["setActiveIndexToStart","clearDateValue","setSelectedDate","setActiveIndexToEnd"]},{guard:ht("isRangePicker","isSelectingEndDate","closeOnSelect","isOpenControlled"),actions:["setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose"]},{guard:ht("isRangePicker","isSelectingEndDate","closeOnSelect"),target:"focused",actions:["setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose","focusInputElement"]},{guard:ht("isRangePicker","isSelectingEndDate"),actions:["setSelectedDate","setActiveIndexToStart","clearHoveredDate"]},{guard:"isRangePicker",actions:["setSelectedDate","setActiveIndexToEnd","focusNextDay"]},{guard:"isMultiPicker",actions:["toggleSelectedDate"]},{guard:ht("closeOnSelect","isOpenControlled"),actions:["selectFocusedDate","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectFocusedDate","invokeOnClose","focusInputElement"]},{actions:["selectFocusedDate"]}],"TABLE.ARROW_RIGHT":[{guard:"isMonthView",actions:["focusNextMonth"]},{guard:"isYearView",actions:["focusNextYear"]},{actions:["focusNextDay","setHoveredDate"]}],"TABLE.ARROW_LEFT":[{guard:"isMonthView",actions:["focusPreviousMonth"]},{guard:"isYearView",actions:["focusPreviousYear"]},{actions:["focusPreviousDay"]}],"TABLE.ARROW_UP":[{guard:"isMonthView",actions:["focusPreviousMonthColumn"]},{guard:"isYearView",actions:["focusPreviousYearColumn"]},{actions:["focusPreviousWeek"]}],"TABLE.ARROW_DOWN":[{guard:"isMonthView",actions:["focusNextMonthColumn"]},{guard:"isYearView",actions:["focusNextYearColumn"]},{actions:["focusNextWeek"]}],"TABLE.PAGE_UP":{actions:["focusPreviousSection"]},"TABLE.PAGE_DOWN":{actions:["focusNextSection"]},"TABLE.HOME":[{guard:"isMonthView",actions:["focusFirstMonth"]},{guard:"isYearView",actions:["focusFirstYear"]},{actions:["focusSectionStart"]}],"TABLE.END":[{guard:"isMonthView",actions:["focusLastMonth"]},{guard:"isYearView",actions:["focusLastYear"]},{actions:["focusSectionEnd"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"VIEW.TOGGLE":{actions:["setNextView"]},INTERACT_OUTSIDE:[{guard:"isOpenControlled",actions:["setActiveIndexToStart","invokeOnClose"]},{guard:"shouldRestoreFocus",target:"focused",actions:["setActiveIndexToStart","invokeOnClose","focusTriggerElement"]},{target:"idle",actions:["setActiveIndexToStart","invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["setActiveIndexToStart","invokeOnClose"]},{target:"idle",actions:["setActiveIndexToStart","invokeOnClose"]}]}}},implementations:{guards:{isAboveMinView:({context:e,prop:t})=>pC(e.get("view"),t("minView")),isDayView:({context:e,event:t})=>(t.view||e.get("view"))==="day",isMonthView:({context:e,event:t})=>(t.view||e.get("view"))==="month",isYearView:({context:e,event:t})=>(t.view||e.get("view"))==="year",isRangePicker:({prop:e})=>e("selectionMode")==="range",hasSelectedRange:({context:e})=>e.get("value").length===2,isMultiPicker:({prop:e})=>e("selectionMode")==="multiple",shouldRestoreFocus:({context:e})=>!!e.get("restoreFocus"),isSelectingEndDate:({context:e})=>e.get("activeIndex")===1,closeOnSelect:({prop:e})=>!!e("closeOnSelect"),isOpenControlled:({prop:e})=>e("open")!=null||!!e("inline"),isInteractOutsideEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="INTERACT_OUTSIDE"},isInputValueEmpty:({event:e})=>e.value.trim()==="",shouldFixOnBlur:({event:e})=>!!e.fixOnBlur},effects:{trackPositioning({context:e,prop:t,scope:n}){if(t("inline"))return;e.get("currentPlacement")||e.set("currentPlacement",t("positioning").placement);let i=Jh(n);return It(i,()=>oC(n),y(g({},t("positioning")),{defer:!0,onComplete(s){e.set("currentPlacement",s.placement)}}))},setupLiveRegion({scope:e,refs:t}){let n=e.getDoc();return t.set("announcer",XP({level:"assertive",document:n})),()=>{var i,r;return(r=(i=t.get("announcer"))==null?void 0:i.destroy)==null?void 0:r.call(i)}},trackDismissableElement({scope:e,send:t,context:n,prop:i}){return i("inline")?void 0:Ft(()=>ia(e),{type:"popover",defer:!0,exclude:[...Tr(e),mh(e),aC(e)],onInteractOutside(s){n.set("restoreFocus",!s.detail.focusable)},onDismiss(){t({type:"INTERACT_OUTSIDE"})},onEscapeKeyDown(s){s.preventDefault(),t({type:"TABLE.ESCAPE",src:"dismissable"})}})}},actions:{setNextView({context:e,prop:t}){let n=mC(e.get("view"),t("minView"),t("maxView"));e.set("view",n)},setPreviousView({context:e,prop:t}){let n=vC(e.get("view"),t("minView"),t("maxView"));e.set("view",n)},setView({context:e,event:t}){e.set("view",t.view)},setRestoreFocus({context:e}){e.set("restoreFocus",!0)},announceValueText({context:e,prop:t,refs:n}){var o;let i=e.get("value"),r=t("locale"),s=t("timeZone"),a;if(t("selectionMode")==="range"){let[l,c]=i;l&&c?a=Zs(l,c,r,s):l?a=Zs(l,null,r,s):c?a=Zs(c,null,r,s):a=""}else a=i.map(l=>Zs(l,null,r,s)).filter(Boolean).join(",");(o=n.get("announcer"))==null||o.announce(a,3e3)},announceVisibleRange({computed:e,refs:t}){var i;let{formatted:n}=e("visibleRangeText");(i=t.get("announcer"))==null||i.announce(n)},disableTextSelection({scope:e}){io({target:ia(e),doc:e.getDoc()})},enableTextSelection({scope:e}){no({doc:e.getDoc(),target:ia(e)})},focusFirstSelectedDate(e){let{context:t}=e;t.get("value").length&&ve(e,t.get("value")[0])},syncInputElement({scope:e,computed:t}){H(()=>{Tr(e).forEach((i,r)=>{Me(i,t("valueAsString")[r]||"")})})},setFocusedDate(e){let{event:t}=e,n=Array.isArray(t.value)?t.value[0]:t.value;ve(e,n)},setFocusedValueForView(e){let{context:t,event:n}=e;ve(e,t.get("focusedValue").set({[t.get("view")]:n.value}))},focusNextMonth(e){let{context:t}=e;ve(e,t.get("focusedValue").add({months:1}))},focusPreviousMonth(e){let{context:t}=e;ve(e,t.get("focusedValue").subtract({months:1}))},setDateValue({context:e,event:t,prop:n}){if(!Array.isArray(t.value))return;let i=t.value.map(r=>Pt(r,n("min"),n("max")));e.set("value",i)},clearDateValue({context:e}){e.set("value",[])},setSelectedDate(e){var r;let{context:t,event:n}=e,i=Array.from(t.get("value"));i[t.get("activeIndex")]=ra(e,(r=n.value)!=null?r:t.get("focusedValue")),t.set("value",sl(i))},resetSelection(e){var r;let{context:t,event:n}=e,i=ra(e,(r=n.value)!=null?r:t.get("focusedValue"));t.set("value",[i])},toggleSelectedDate(e){var s;let{context:t,event:n}=e,i=ra(e,(s=n.value)!=null?s:t.get("focusedValue")),r=t.get("value").findIndex(a=>nt(a,i));if(r===-1){let a=[...t.get("value"),i];t.set("value",Qs(a))}else{let a=Array.from(t.get("value"));a.splice(r,1),t.set("value",Qs(a))}},setHoveredDate({context:e,event:t}){e.set("hoveredValue",t.value)},clearHoveredDate({context:e}){e.set("hoveredValue",null)},selectFocusedDate({context:e,computed:t}){let n=Array.from(e.get("value")),i=e.get("activeIndex");n[i]=e.get("focusedValue").copy(),e.set("value",sl(n));let r=t("valueAsString");e.set("inputValue",r[i])},focusPreviousDay(e){let{context:t}=e,n=t.get("focusedValue").subtract({days:1});ve(e,n)},focusNextDay(e){let{context:t}=e,n=t.get("focusedValue").add({days:1});ve(e,n)},focusPreviousWeek(e){let{context:t}=e,n=t.get("focusedValue").subtract({weeks:1});ve(e,n)},focusNextWeek(e){let{context:t}=e,n=t.get("focusedValue").add({weeks:1});ve(e,n)},focusNextPage(e){let{context:t,computed:n,prop:i}=e,r=qh(t.get("focusedValue"),t.get("startValue"),n("visibleDuration"),i("locale"),i("min"),i("max"));ta(e,r)},focusPreviousPage(e){let{context:t,computed:n,prop:i}=e,r=Wh(t.get("focusedValue"),t.get("startValue"),n("visibleDuration"),i("locale"),i("min"),i("max"));ta(e,r)},focusSectionStart(e){let{context:t}=e;ve(e,t.get("startValue").copy())},focusSectionEnd(e){let{computed:t}=e;ve(e,t("endValue").copy())},focusNextSection(e){let{context:t,event:n,computed:i,prop:r}=e,s=UP(t.get("focusedValue"),t.get("startValue"),n.larger,i("visibleDuration"),r("locale"),r("min"),r("max"));s&&ta(e,s)},focusPreviousSection(e){let{context:t,event:n,computed:i,prop:r}=e,s=qP(t.get("focusedValue"),t.get("startValue"),n.larger,i("visibleDuration"),r("locale"),r("min"),r("max"));s&&ta(e,s)},focusNextYear(e){let{context:t}=e,n=t.get("focusedValue").add({years:1});ve(e,n)},focusPreviousYear(e){let{context:t}=e,n=t.get("focusedValue").subtract({years:1});ve(e,n)},focusNextDecade(e){let{context:t}=e,n=t.get("focusedValue").add({years:10});ve(e,n)},focusPreviousDecade(e){let{context:t}=e,n=t.get("focusedValue").subtract({years:10});ve(e,n)},clearFocusedDate(e){let{prop:t}=e;ve(e,Di(t("timeZone")))},focusPreviousMonthColumn(e){let{context:t,event:n}=e,i=t.get("focusedValue").subtract({months:n.columns});ve(e,i)},focusNextMonthColumn(e){let{context:t,event:n}=e,i=t.get("focusedValue").add({months:n.columns});ve(e,i)},focusPreviousYearColumn(e){let{context:t,event:n}=e,i=t.get("focusedValue").subtract({years:n.columns});ve(e,i)},focusNextYearColumn(e){let{context:t,event:n}=e,i=t.get("focusedValue").add({years:n.columns});ve(e,i)},focusFirstMonth(e){let{context:t}=e,n=t.get("focusedValue").set({month:1});ve(e,n)},focusLastMonth(e){let{context:t}=e,n=t.get("focusedValue").set({month:12});ve(e,n)},focusFirstYear(e){let{context:t}=e,n=Li(t.get("focusedValue").year),i=t.get("focusedValue").set({year:n[0]});ve(e,i)},focusLastYear(e){let{context:t}=e,n=Li(t.get("focusedValue").year),i=t.get("focusedValue").set({year:n[n.length-1]});ve(e,i)},setActiveIndex({context:e,event:t}){e.set("activeIndex",t.index)},setActiveIndexToEnd({context:e}){e.set("activeIndex",1)},setActiveIndexToStart({context:e}){e.set("activeIndex",0)},focusActiveCell({scope:e,context:t}){H(()=>{var i;let n=t.get("view");(i=fh(e,n))==null||i.focus({preventScroll:!0})})},focusActiveCellIfNeeded({scope:e,context:t,event:n}){n.focus&&H(()=>{var r;let i=t.get("view");(r=fh(e,i))==null||r.focus({preventScroll:!0})})},setHoveredValueIfKeyboard({context:e,event:t,prop:n}){!t.type.startsWith("TABLE.ARROW")||n("selectionMode")!=="range"||e.get("activeIndex")===0||e.set("hoveredValue",e.get("focusedValue").copy())},focusTriggerElement({scope:e}){H(()=>{var t;(t=mh(e))==null||t.focus({preventScroll:!0})})},focusFirstInputElement({scope:e}){H(()=>{let[t]=Tr(e);t==null||t.focus({preventScroll:!0})})},focusInputElement({scope:e}){H(()=>{let t=Tr(e),n=t.findLastIndex(s=>s.value!==""),i=Math.max(n,0),r=t[i];r==null||r.focus({preventScroll:!0}),r==null||r.setSelectionRange(r.value.length,r.value.length)})},syncMonthSelectElement({scope:e,context:t}){let n=sC(e);Me(n,t.get("startValue").month.toString())},syncYearSelectElement({scope:e,context:t}){let n=rC(e);Me(n,t.get("startValue").year.toString())},setInputValue({context:e,event:t}){e.get("activeIndex")===t.index&&e.set("inputValue",t.value)},syncInputValue({scope:e,context:t,event:n}){queueMicrotask(()=>{var s;let i=Tr(e),r=(s=n.index)!=null?s:t.get("activeIndex");Me(i[r],t.get("inputValue"))})},focusParsedDate(e){let{event:t,prop:n}=e;if(t.index==null)return;let r=n("parse")(t.value,{locale:n("locale"),timeZone:n("timeZone")});!r||!vh(r)||ve(e,r)},selectParsedDate({context:e,event:t,prop:n}){if(t.index==null)return;let r=n("parse")(t.value,{locale:n("locale"),timeZone:n("timeZone")});if((!r||!vh(r))&&t.value&&(r=e.get("focusedValue").copy()),!r)return;r=Pt(r,n("min"),n("max"));let s=Array.from(e.get("value"));s[t.index]=r,e.set("value",s);let a=ea(s,n);e.set("inputValue",a[t.index])},resetView({context:e}){e.set("view",e.initial("view"))},setStartValue({context:e,computed:t,prop:n}){let i=e.get("focusedValue");if(!$t(i,e.get("startValue"),t("endValue")))return;let s=ch(i,"start",{months:n("numOfMonths")},n("locale"));e.set("startValue",s)},invokeOnOpen({prop:e,context:t}){var n;e("inline")||(n=e("onOpenChange"))==null||n({open:!0,value:t.get("value")})},invokeOnClose({prop:e,context:t}){var n;e("inline")||(n=e("onOpenChange"))==null||n({open:!1,value:t.get("value")})},invokeOnVisibleRangeChange({prop:e,context:t,computed:n}){var i;(i=e("onVisibleRangeChange"))==null||i({view:t.get("view"),visibleRange:n("visibleRange")})},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}},ra=(e,t)=>{let{context:n,prop:i}=e,r=n.get("view"),s=typeof t=="number"?n.get("focusedValue").set({[r]:t}):t;return bC(a=>{fC(a,i("minView"))&&(s=s.set({[a]:a==="day"?1:0}))}),s};SC=_()(["closeOnSelect","dir","disabled","fixedWeeks","focusedValue","format","parse","placeholder","getRootNode","id","ids","inline","invalid","isDateUnavailable","locale","max","min","name","numOfMonths","onFocusChange","onOpenChange","onValueChange","onViewChange","onVisibleRangeChange","open","defaultOpen","positioning","readOnly","required","selectionMode","startOfWeek","timeZone","translations","value","defaultView","defaultValue","view","defaultFocusedValue","outsideDaySelectable","minView","maxView"]),Ix=B(SC),TC=_()(["index","fixOnBlur"]),Px=B(TC),OC=_()(["value"]),Cx=B(OC),wC=_()(["columns","id","view"]),Sx=B(wC),VC=_()(["disabled","value","columns"]),Tx=B(VC),xC=_()(["view"]),Ox=B(xC),AC=class extends K{constructor(){super(...arguments);z(this,"getDayView",()=>this.el.querySelector('[data-part="day-view"]'));z(this,"getMonthView",()=>this.el.querySelector('[data-part="month-view"]'));z(this,"getYearView",()=>this.el.querySelector('[data-part="year-view"]'));z(this,"renderDayTableHeader",()=>{let t=this.getDayView(),n=t==null?void 0:t.querySelector("thead");if(!n||!this.api.weekDays)return;let i=this.doc.createElement("tr");this.spreadProps(i,this.api.getTableRowProps({view:"day"})),this.api.weekDays.forEach(r=>{let s=this.doc.createElement("th");s.scope="col",s.setAttribute("aria-label",r.long),s.textContent=r.narrow,i.appendChild(s)}),n.innerHTML="",n.appendChild(i)});z(this,"renderDayTableBody",()=>{let t=this.getDayView(),n=t==null?void 0:t.querySelector("tbody");n&&(this.spreadProps(n,this.api.getTableBodyProps({view:"day"})),this.api.weeks&&(n.innerHTML="",this.api.weeks.forEach(i=>{let r=this.doc.createElement("tr");this.spreadProps(r,this.api.getTableRowProps({view:"day"})),i.forEach(s=>{let a=this.doc.createElement("td");this.spreadProps(a,this.api.getDayTableCellProps({value:s}));let o=this.doc.createElement("div");this.spreadProps(o,this.api.getDayTableCellTriggerProps({value:s})),o.textContent=String(s.day),a.appendChild(o),r.appendChild(a)}),n.appendChild(r)})))});z(this,"renderMonthTableBody",()=>{let t=this.getMonthView(),n=t==null?void 0:t.querySelector("tbody");if(!n)return;this.spreadProps(n,this.api.getTableBodyProps({view:"month"}));let i=this.api.getMonthsGrid({columns:4,format:"short"});n.innerHTML="",i.forEach(r=>{let s=this.doc.createElement("tr");this.spreadProps(s,this.api.getTableRowProps()),r.forEach(a=>{let o=this.doc.createElement("td");this.spreadProps(o,this.api.getMonthTableCellProps(y(g({},a),{columns:4})));let l=this.doc.createElement("div");this.spreadProps(l,this.api.getMonthTableCellTriggerProps(y(g({},a),{columns:4}))),l.textContent=a.label,o.appendChild(l),s.appendChild(o)}),n.appendChild(s)})});z(this,"renderYearTableBody",()=>{let t=this.getYearView(),n=t==null?void 0:t.querySelector("tbody");if(!n)return;this.spreadProps(n,this.api.getTableBodyProps());let i=this.api.getYearsGrid({columns:4});n.innerHTML="",i.forEach(r=>{let s=this.doc.createElement("tr");this.spreadProps(s,this.api.getTableRowProps({view:"year"})),r.forEach(a=>{let o=this.doc.createElement("td");this.spreadProps(o,this.api.getYearTableCellProps(y(g({},a),{columns:4})));let l=this.doc.createElement("div");this.spreadProps(l,this.api.getYearTableCellTriggerProps(y(g({},a),{columns:4}))),l.textContent=a.label,o.appendChild(l),s.appendChild(o)}),n.appendChild(s)})})}initMachine(t){return new W(CC,t)}initApi(){return IC(this.machine.service,q)}render(){let t=this.el.querySelector('[data-scope="date-picker"][data-part="root"]');t&&this.spreadProps(t,this.api.getRootProps());let n=this.el.querySelector('[data-scope="date-picker"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps());let i=this.el.querySelector('[data-scope="date-picker"][data-part="control"]');i&&this.spreadProps(i,this.api.getControlProps());let r=this.el.querySelector('[data-scope="date-picker"][data-part="input"]');r&&this.spreadProps(r,this.api.getInputProps());let s=this.el.querySelector('[data-scope="date-picker"][data-part="trigger"]');s&&this.spreadProps(s,this.api.getTriggerProps());let a=this.el.querySelector('[data-scope="date-picker"][data-part="positioner"]');a&&this.spreadProps(a,this.api.getPositionerProps());let o=this.el.querySelector('[data-scope="date-picker"][data-part="content"]');if(o&&this.spreadProps(o,this.api.getContentProps()),this.api.open){let l=this.getDayView(),c=this.getMonthView(),u=this.getYearView();if(l&&(l.hidden=this.api.view!=="day"),c&&(c.hidden=this.api.view!=="month"),u&&(u.hidden=this.api.view!=="year"),this.api.view==="day"&&l){let h=l.querySelector('[data-part="view-control"]');h&&this.spreadProps(h,this.api.getViewControlProps({view:"year"}));let m=l.querySelector('[data-part="prev-trigger"]');m&&this.spreadProps(m,this.api.getPrevTriggerProps());let d=l.querySelector('[data-part="view-trigger"]');d&&(this.spreadProps(d,this.api.getViewTriggerProps()),d.textContent=this.api.visibleRangeText.start);let p=l.querySelector('[data-part="next-trigger"]');p&&this.spreadProps(p,this.api.getNextTriggerProps());let v=l.querySelector("table");v&&this.spreadProps(v,this.api.getTableProps({view:"day"}));let I=l.querySelector("thead");I&&this.spreadProps(I,this.api.getTableHeaderProps({view:"day"})),this.renderDayTableHeader(),this.renderDayTableBody()}else if(this.api.view==="month"&&c){let h=c.querySelector('[data-part="view-control"]');h&&this.spreadProps(h,this.api.getViewControlProps({view:"month"}));let m=c.querySelector('[data-part="prev-trigger"]');m&&this.spreadProps(m,this.api.getPrevTriggerProps({view:"month"}));let d=c.querySelector('[data-part="view-trigger"]');d&&(this.spreadProps(d,this.api.getViewTriggerProps({view:"month"})),d.textContent=String(this.api.visibleRange.start.year));let p=c.querySelector('[data-part="next-trigger"]');p&&this.spreadProps(p,this.api.getNextTriggerProps({view:"month"}));let v=c.querySelector("table");v&&this.spreadProps(v,this.api.getTableProps({view:"month",columns:4})),this.renderMonthTableBody()}else if(this.api.view==="year"&&u){let h=u.querySelector('[data-part="view-control"]');h&&this.spreadProps(h,this.api.getViewControlProps({view:"year"}));let m=u.querySelector('[data-part="prev-trigger"]');m&&this.spreadProps(m,this.api.getPrevTriggerProps({view:"year"}));let d=u.querySelector('[data-part="decade"]');if(d){let I=this.api.getDecade();d.textContent=`${I.start} - ${I.end}`}let p=u.querySelector('[data-part="next-trigger"]');p&&this.spreadProps(p,this.api.getNextTriggerProps({view:"year"}));let v=u.querySelector("table");v&&this.spreadProps(v,this.api.getTableProps({view:"year",columns:4})),this.renderYearTableBody()}}}};kC={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=this.liveSocket,i=w(e,"min"),r=w(e,"max"),s=w(e,"positioning"),a=u=>u?u.map(h=>gt(h)):void 0,o=u=>u?gt(u):void 0,l=new AC(e,y(g({id:e.id},C(e,"controlled")?{value:a(Q(e,"value"))}:{defaultValue:a(Q(e,"defaultValue"))}),{defaultFocusedValue:o(w(e,"focusedValue")),defaultView:w(e,"defaultView",["day","month","year"]),dir:w(e,"dir",["ltr","rtl"]),locale:w(e,"locale"),timeZone:w(e,"timeZone"),disabled:C(e,"disabled"),readOnly:C(e,"readOnly"),required:C(e,"required"),invalid:C(e,"invalid"),outsideDaySelectable:C(e,"outsideDaySelectable"),closeOnSelect:C(e,"closeOnSelect"),min:i?gt(i):void 0,max:r?gt(r):void 0,numOfMonths:Y(e,"numOfMonths"),startOfWeek:Y(e,"startOfWeek"),fixedWeeks:C(e,"fixedWeeks"),selectionMode:w(e,"selectionMode",["single","multiple","range"]),placeholder:w(e,"placeholder"),minView:w(e,"minView",["day","month","year"]),maxView:w(e,"maxView",["day","month","year"]),inline:C(e,"inline"),positioning:s?JSON.parse(s):void 0,onValueChange:u=>{var p;let h=(p=u.value)!=null&&p.length?u.value.map(v=>yh(v)).join(","):"",m=e.querySelector(`#${e.id}-value`);m&&m.value!==h&&(m.value=h,m.dispatchEvent(new Event("input",{bubbles:!0})),m.dispatchEvent(new Event("change",{bubbles:!0})));let d=w(e,"onValueChange");d&&n.main.isConnected()&&t(d,{id:e.id,value:h||null})},onFocusChange:u=>{var m;let h=w(e,"onFocusChange");h&&n.main.isConnected()&&t(h,{id:e.id,focused:(m=u.focused)!=null?m:!1})},onViewChange:u=>{let h=w(e,"onViewChange");h&&n.main.isConnected()&&t(h,{id:e.id,view:u.view})},onVisibleRangeChange:u=>{let h=w(e,"onVisibleRangeChange");h&&n.main.isConnected()&&t(h,{id:e.id,start:u.start,end:u.end})},onOpenChange:u=>{let h=w(e,"onOpenChange");h&&n.main.isConnected()&&t(h,{id:e.id,open:u.open})}}));l.init(),this.datePicker=l;let c=e.querySelector('[data-scope="date-picker"][data-part="input-wrapper"]');c&&c.removeAttribute("data-loading"),this.handlers=[],this.handlers.push(this.handleEvent("date_picker_set_value",u=>{let h=u.date_picker_id;h&&h!==e.id||l.api.setValue([gt(u.value)])})),this.onSetValue=u=>{var m;let h=(m=u.detail)==null?void 0:m.value;typeof h=="string"&&l.api.setValue([gt(h)])},e.addEventListener("phx:date-picker:set-value",this.onSetValue)},updated(){var l,c;let e=this.el,t=e.querySelector('[data-scope="date-picker"][data-part="input-wrapper"]');t&&t.removeAttribute("data-loading");let n=u=>u?u.map(h=>gt(h)):void 0,i=w(e,"min"),r=w(e,"max"),s=w(e,"positioning"),a=C(e,"controlled"),o=w(e,"focusedValue");if((l=this.datePicker)==null||l.updateProps(y(g({},C(e,"controlled")?{value:n(Q(e,"value"))}:{defaultValue:n(Q(e,"defaultValue"))}),{defaultFocusedValue:o?gt(o):void 0,defaultView:w(e,"defaultView",["day","month","year"]),dir:w(this.el,"dir",["ltr","rtl"]),locale:w(this.el,"locale"),timeZone:w(this.el,"timeZone"),disabled:C(this.el,"disabled"),readOnly:C(this.el,"readOnly"),required:C(this.el,"required"),invalid:C(this.el,"invalid"),outsideDaySelectable:C(this.el,"outsideDaySelectable"),closeOnSelect:C(this.el,"closeOnSelect"),min:i?gt(i):void 0,max:r?gt(r):void 0,numOfMonths:Y(this.el,"numOfMonths"),startOfWeek:Y(this.el,"startOfWeek"),fixedWeeks:C(this.el,"fixedWeeks"),selectionMode:w(this.el,"selectionMode",["single","multiple","range"]),placeholder:w(this.el,"placeholder"),minView:w(this.el,"minView",["day","month","year"]),maxView:w(this.el,"maxView",["day","month","year"]),inline:C(this.el,"inline"),positioning:s?JSON.parse(s):void 0})),a&&this.datePicker){let u=Q(e,"value"),h=(c=u==null?void 0:u.join(","))!=null?c:"",m=this.datePicker.api.value,d=m!=null&&m.length?m.map(p=>yh(p)).join(","):"";if(h!==d){let p=u!=null&&u.length?u.map(v=>gt(v)):[];this.datePicker.api.setValue(p)}}},destroyed(){var e;if(this.onSetValue&&this.el.removeEventListener("phx:date-picker:set-value",this.onSetValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.datePicker)==null||e.destroy()}}});var ug={};he(ug,{Dialog:()=>lS});function HC(e,t={}){let{defer:n=!0}=t,i=n?$C:s=>s(),r=[];return r.push(i(()=>{let a=(typeof e=="function"?e():e).filter(Boolean);a.length!==0&&r.push(FC(a))})),()=>{r.forEach(s=>s==null?void 0:s())}}function YC(e,t={}){let n,i=H(()=>{let s=(Array.isArray(e)?e:[e]).map(o=>typeof o=="function"?o():o).filter(o=>o!=null);if(s.length===0)return;let a=s[0];n=new UC(s,y(g({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:a},t),{document:Le(a)}));try{n.activate()}catch(o){}});return function(){n==null||n.deactivate(),i()}}function jC(e){let t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function rg(e){let t=at(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function XC(e){var d;let t=e!=null?e:document,n=(d=t.defaultView)!=null?d:window,{documentElement:i,body:r}=t;if(r.hasAttribute(yl))return;let a=rg(i)||rg(r),o=n.innerWidth-i.clientWidth;r.setAttribute(yl,"");let l=()=>$c(i,"--scrollbar-width",`${o}px`),c=jC(i),u=()=>{let p={overflow:"hidden"};return!a&&o>0&&(p[c]=`${o}px`),Hn(r,p)},h=()=>{var S,P;let{scrollX:p,scrollY:v,visualViewport:I}=n,T=(S=I==null?void 0:I.offsetLeft)!=null?S:0,O=(P=I==null?void 0:I.offsetTop)!=null?P:0,b={position:"fixed",overflow:"hidden",top:`${-(v-Math.floor(O))}px`,left:`${-(p-Math.floor(T))}px`,right:"0"};!a&&o>0&&(b[c]=`${o}px`);let f=Hn(r,b);return()=>{f==null||f(),n.scrollTo({left:p,top:v,behavior:"instant"})}},m=[l(),ir()?h():u()];return()=>{m.forEach(p=>p==null?void 0:p()),r.removeAttribute(yl)}}function rS(e,t){let{state:n,send:i,context:r,prop:s,scope:a}=e,o=s("aria-label"),l=n.matches("open");return{open:l,setOpen(c){n.matches("open")!==c&&i({type:c?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(y(g({},Qn.trigger.attrs),{dir:s("dir"),id:lg(a),"aria-haspopup":"dialog",type:"button","aria-expanded":l,"data-state":l?"open":"closed","aria-controls":bl(a),onClick(c){c.defaultPrevented||i({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(y(g({},Qn.backdrop.attrs),{dir:s("dir"),hidden:!l,id:og(a),"data-state":l?"open":"closed"}))},getPositionerProps(){return t.element(y(g({},Qn.positioner.attrs),{dir:s("dir"),id:ag(a),style:{pointerEvents:l?void 0:"none"}}))},getContentProps(){let c=r.get("rendered");return t.element(y(g({},Qn.content.attrs),{dir:s("dir"),role:s("role"),hidden:!l,id:bl(a),tabIndex:-1,"data-state":l?"open":"closed","aria-modal":!0,"aria-label":o||void 0,"aria-labelledby":o||!c.title?void 0:El(a),"aria-describedby":c.description?Il(a):void 0}))},getTitleProps(){return t.element(y(g({},Qn.title.attrs),{dir:s("dir"),id:El(a)}))},getDescriptionProps(){return t.element(y(g({},Qn.description.attrs),{dir:s("dir"),id:Il(a)}))},getCloseTriggerProps(){return t.button(y(g({},Qn.closeTrigger.attrs),{dir:s("dir"),id:cg(a),type:"button",onClick(c){c.defaultPrevented||(c.stopPropagation(),i({type:"CLOSE"}))}}))}}}var Hi,ca,ua,ml,sg,NC,RC,DC,LC,MC,FC,$C,BC,_C,be,ng,GC,UC,Pl,vl,qC,WC,Ar,KC,ig,zC,yl,ZC,Qn,ag,og,bl,lg,El,Il,cg,da,JC,QC,eS,tS,nS,iS,sS,aS,Dx,oS,lS,dg=re(()=>{"use strict";Wn();tn();se();Hi=new WeakMap,ca=new WeakMap,ua={},ml=0,sg=e=>e&&(e.host||sg(e.parentNode)),NC=(e,t)=>t.map(n=>{if(e.contains(n))return n;let i=sg(n);return i&&e.contains(i)?i:(console.error("[zag-js > ariaHidden] target",n,"in not contained inside",e,". Doing nothing"),null)}).filter(n=>!!n),RC=new Set(["script","output","status","next-route-announcer"]),DC=e=>RC.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),LC=(e,t)=>{let{parentNode:n,markerName:i,controlAttribute:r,followControlledElements:s=!0}=t,a=NC(n,Array.isArray(e)?e:[e]);ua[i]||(ua[i]=new WeakMap);let o=ua[i],l=[],c=new Set,u=new Set(a),h=d=>{!d||c.has(d)||(c.add(d),h(d.parentNode))};a.forEach(d=>{h(d),s&&le(d)&&Xa(d,p=>{h(p)})});let m=d=>{!d||u.has(d)||Array.prototype.forEach.call(d.children,p=>{if(c.has(p))m(p);else try{if(DC(p))return;let I=p.getAttribute(r)==="true",T=(Hi.get(p)||0)+1,O=(o.get(p)||0)+1;Hi.set(p,T),o.set(p,O),l.push(p),T===1&&I&&ca.set(p,!0),O===1&&p.setAttribute(i,""),I||p.setAttribute(r,"true")}catch(v){console.error("[zag-js > ariaHidden] cannot operate on ",p,v)}})};return m(n),c.clear(),ml++,()=>{l.forEach(d=>{let p=Hi.get(d)-1,v=o.get(d)-1;Hi.set(d,p),o.set(d,v),p||(ca.has(d)||d.removeAttribute(r),ca.delete(d)),v||d.removeAttribute(i)}),ml--,ml||(Hi=new WeakMap,Hi=new WeakMap,ca=new WeakMap,ua={})}},MC=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,FC=(e,t=MC(e),n="data-aria-hidden",i=!0)=>{if(t)return LC(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:i})},$C=e=>{let t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};BC=Object.defineProperty,_C=(e,t,n)=>t in e?BC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,be=(e,t,n)=>_C(e,typeof t!="symbol"?t+"":t,n),ng={activateTrap(e,t){if(e.length>0){let i=e[e.length-1];i!==t&&i.pause()}let n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},GC=[],UC=class{constructor(e,t){be(this,"trapStack"),be(this,"config"),be(this,"doc"),be(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),be(this,"portalContainers",new Set),be(this,"listenerCleanups",[]),be(this,"handleFocus",i=>{let r=j(i),s=this.findContainerIndex(r,i)>=0;if(s||nr(r))s&&(this.state.mostRecentlyFocusedNode=r);else{i.stopImmediatePropagation();let a,o=!0;if(this.state.mostRecentlyFocusedNode)if(fi(this.state.mostRecentlyFocusedNode)>0){let l=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:c}=this.state.containerGroups[l];if(c.length>0){let u=c.findIndex(h=>h===this.state.mostRecentlyFocusedNode);u>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?u+1=0&&(a=c[u-1],o=!1))}}else this.state.containerGroups.some(l=>l.tabbableNodes.some(c=>fi(c)>0))||(o=!1);else o=!1;o&&(a=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),a?this.tryFocus(a):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),be(this,"handlePointerDown",i=>{let r=j(i);if(!(this.findContainerIndex(r,i)>=0)){if(Ar(this.config.clickOutsideDeactivates,i)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Ar(this.config.allowOutsideClick,i)||i.preventDefault()}}),be(this,"handleClick",i=>{let r=j(i);this.findContainerIndex(r,i)>=0||Ar(this.config.clickOutsideDeactivates,i)||Ar(this.config.allowOutsideClick,i)||(i.preventDefault(),i.stopImmediatePropagation())}),be(this,"handleTabKey",i=>{if(this.config.isKeyForward(i)||this.config.isKeyBackward(i)){this.state.recentNavEvent=i;let r=this.config.isKeyBackward(i),s=this.findNextNavNode({event:i,isBackward:r});if(!s)return;vl(i)&&i.preventDefault(),this.tryFocus(s)}}),be(this,"handleEscapeKey",i=>{KC(i)&&Ar(this.config.escapeDeactivates,i)!==!1&&(i.preventDefault(),this.deactivate())}),be(this,"_mutationObserver"),be(this,"setupMutationObserver",()=>{let i=this.doc.defaultView||window;this._mutationObserver=new i.MutationObserver(r=>{r.some(o=>Array.from(o.removedNodes).some(c=>c===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),r.some(o=>o.type==="attributes"&&(o.attributeName==="aria-controls"||o.attributeName==="aria-expanded")?!0:o.type==="childList"&&o.addedNodes.length>0?Array.from(o.addedNodes).some(l=>{if(l.nodeType!==Node.ELEMENT_NODE)return!1;let c=l;return Pc(c)?!0:c.id&&!this.state.containers.some(u=>u.contains(c))?Cc(c):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),be(this,"updateObservedNodes",()=>{var i;(i=this._mutationObserver)==null||i.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(r=>{var s;(s=this._mutationObserver)==null||s.observe(r,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(r=>{this.observePortalContainer(r)}))}),be(this,"getInitialFocusNode",()=>{let i=this.getNodeForOption("initialFocus",{hasFallback:!0});if(i===!1)return!1;if(i===void 0||i&&!Ye(i)){let r=ui(this.doc);if(r&&this.findContainerIndex(r)>=0)i=r;else{let s=this.state.tabbableGroups[0];i=s&&s.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else i===null&&(i=this.getNodeForOption("fallbackFocus"));if(!i)throw new Error("Your focus-trap needs to have at least one focusable element");return i.isConnected||(i=this.getNodeForOption("fallbackFocus")),i}),be(this,"tryFocus",i=>{if(i!==!1&&i!==ui(this.doc)){if(!i||!i.focus){this.tryFocus(this.getInitialFocusNode());return}i.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=i,zC(i)&&i.select()}}),be(this,"deactivate",i=>{if(!this.state.active)return this;let r=g({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},i);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),ng.deactivateTrap(this.trapStack,this),this.portalContainers.clear();let s=this.getOption(r,"onDeactivate"),a=this.getOption(r,"onPostDeactivate"),o=this.getOption(r,"checkCanReturnFocus"),l=this.getOption(r,"returnFocus","returnFocusOnDeactivate");s==null||s();let c=()=>{ig(()=>{if(l){let u=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(u)}a==null||a()})};if(l&&o){let u=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return o(u).then(c,c),this}return c(),this}),be(this,"pause",i=>{if(this.state.paused||!this.state.active)return this;let r=this.getOption(i,"onPause"),s=this.getOption(i,"onPostPause");return this.state.paused=!0,r==null||r(),this.removeListeners(),this.updateObservedNodes(),s==null||s(),this}),be(this,"unpause",i=>{if(!this.state.paused||!this.state.active)return this;let r=this.getOption(i,"onUnpause"),s=this.getOption(i,"onPostUnpause");return this.state.paused=!1,r==null||r(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),s==null||s(),this}),be(this,"updateContainerElements",i=>(this.state.containers=Array.isArray(i)?i.filter(Boolean):[i].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),be(this,"getReturnFocusNode",i=>{let r=this.getNodeForOption("setReturnFocus",{params:[i]});return r||(r===!1?!1:i)}),be(this,"getOption",(i,r,s)=>i&&i[r]!==void 0?i[r]:this.config[s||r]),be(this,"getNodeForOption",(i,{hasFallback:r=!1,params:s=[]}={})=>{let a=this.config[i];if(typeof a=="function"&&(a=a(...s)),a===!0&&(a=void 0),!a){if(a===void 0||a===!1)return a;throw new Error(`\`${i}\` was specified but was not a node, or did not return a node`)}let o=a;if(typeof a=="string"){try{o=this.doc.querySelector(a)}catch(l){throw new Error(`\`${i}\` appears to be an invalid selector; error="${l.message}"`)}if(!o&&!r)throw new Error(`\`${i}\` as selector refers to no known node`)}return o}),be(this,"findNextNavNode",i=>{let{event:r,isBackward:s=!1}=i,a=i.target||j(r);this.updateTabbableNodes();let o=null;if(this.state.tabbableGroups.length>0){let l=this.findContainerIndex(a,r),c=l>=0?this.state.containerGroups[l]:void 0;if(l<0)s?o=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:o=this.state.tabbableGroups[0].firstTabbableNode;else if(s){let u=this.state.tabbableGroups.findIndex(({firstTabbableNode:h})=>a===h);if(u<0&&((c==null?void 0:c.container)===a||Ye(a)&&!dn(a)&&!(c!=null&&c.nextTabbableNode(a,!1)))&&(u=l),u>=0){let h=u===0?this.state.tabbableGroups.length-1:u-1,m=this.state.tabbableGroups[h];o=fi(a)>=0?m.lastTabbableNode:m.lastDomTabbableNode}else vl(r)||(o=c==null?void 0:c.nextTabbableNode(a,!1))}else{let u=this.state.tabbableGroups.findIndex(({lastTabbableNode:h})=>a===h);if(u<0&&((c==null?void 0:c.container)===a||Ye(a)&&!dn(a)&&!(c!=null&&c.nextTabbableNode(a)))&&(u=l),u>=0){let h=u===this.state.tabbableGroups.length-1?0:u+1,m=this.state.tabbableGroups[h];o=fi(a)>=0?m.firstTabbableNode:m.firstDomTabbableNode}else vl(r)||(o=c==null?void 0:c.nextTabbableNode(a))}}else o=this.getNodeForOption("fallbackFocus");return o}),this.trapStack=t.trapStack||GC;let n=g({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward:qC,isKeyBackward:WC},t);this.doc=n.document||Le(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){let t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){var t;(t=this._mutationObserver)==null||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{Ic(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){let n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:i,tabbableNodes:r})=>i.contains(e)||(n==null?void 0:n.includes(i))||r.find(s=>s===e)||this.isControlledElement(i,e))}isControlledElement(e,t){return this.config.followControlledElements?as(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{let t=jt(e,{getShadowRoot:this.config.getShadowRoot}),n=ar(e,{getShadowRoot:this.config.getShadowRoot}),i=t[0],r=t[t.length-1],s=i,a=r,o=!1;for(let c=0;c0){o=!0;break}function l(c,u=!0){let h=t.indexOf(c);if(h>=0)return t[h+(u?1:-1)];let m=n.indexOf(c);if(!(m<0)){if(u){for(let d=m+1;d=0;d--)if(dn(n[d]))return n[d]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:o,firstTabbableNode:i,lastTabbableNode:r,firstDomTabbableNode:s,lastDomTabbableNode:a,nextTabbableNode:l}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return ng.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?ig(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(ee(this.doc,"focusin",this.handleFocus,!0),ee(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),ee(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),ee(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),ee(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),ee(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;let t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),i=this.getOption(e,"checkCanFocusTrap");i||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=ui(this.doc),t==null||t();let r=()=>{i&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return i?(i(this.state.containers.concat()).then(r,r),this):(r(),this)}},Pl=e=>e.type==="keydown",vl=e=>Pl(e)&&(e==null?void 0:e.key)==="Tab",qC=e=>Pl(e)&&e.key==="Tab"&&!(e!=null&&e.shiftKey),WC=e=>Pl(e)&&e.key==="Tab"&&(e==null?void 0:e.shiftKey),Ar=(e,...t)=>typeof e=="function"?e(...t):e,KC=e=>!e.isComposing&&e.key==="Escape",ig=e=>setTimeout(e,0),zC=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";yl="data-scroll-lock";ZC=U("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),Qn=ZC.build(),ag=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},og=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},bl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},lg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},El=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},Il=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},cg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},da=e=>e.getById(bl(e)),JC=e=>e.getById(ag(e)),QC=e=>e.getById(og(e)),eS=e=>e.getById(lg(e)),tS=e=>e.getById(El(e)),nS=e=>e.getById(Il(e)),iS=e=>e.getById(cg(e));sS={props({props:e,scope:t}){let n=e.role==="alertdialog",i=n?()=>iS(t):void 0,r=typeof e.modal=="boolean"?e.modal:!0;return g({role:"dialog",modal:r,trapFocus:r,preventScroll:r,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:i},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return Ft(()=>da(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[eS(e)],onInteractOutside(r){var s;(s=n("onInteractOutside"))==null||s(r),n("closeOnInteractOutside")||r.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(r){var s;(s=n("onEscapeKeyDown"))==null||s(r),n("closeOnEscape")||r.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return XC(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?YC(()=>da(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:i=>{var r,s;return(s=(r=t("finalFocusEl"))==null?void 0:r())!=null?s:i},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?HC(()=>[da(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){H(()=>{e.set("rendered",{title:!!tS(t),description:!!nS(t)})})},syncZIndex({scope:e}){H(()=>{let t=da(e);if(!t)return;let n=at(t);[JC(e),QC(e)].forEach(r=>{r==null||r.style.setProperty("--z-index",n.zIndex),r==null||r.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}},aS=_()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]),Dx=B(aS),oS=class extends K{initMachine(e){return new W(sS,e)}initApi(){return rS(this.machine.service,q)}render(){let e=this.el,t=e.querySelector('[data-scope="dialog"][data-part="trigger"]');t&&this.spreadProps(t,this.api.getTriggerProps());let n=e.querySelector('[data-scope="dialog"][data-part="backdrop"]');n&&this.spreadProps(n,this.api.getBackdropProps());let i=e.querySelector('[data-scope="dialog"][data-part="positioner"]');i&&this.spreadProps(i,this.api.getPositionerProps());let r=e.querySelector('[data-scope="dialog"][data-part="content"]');r&&this.spreadProps(r,this.api.getContentProps());let s=e.querySelector('[data-scope="dialog"][data-part="title"]');s&&this.spreadProps(s,this.api.getTitleProps());let a=e.querySelector('[data-scope="dialog"][data-part="description"]');a&&this.spreadProps(a,this.api.getDescriptionProps());let o=e.querySelector('[data-scope="dialog"][data-part="close-trigger"]');o&&this.spreadProps(o,this.api.getCloseTriggerProps())}},lS={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=new oS(e,y(g({id:e.id},C(e,"controlled")?{open:C(e,"open")}:{defaultOpen:C(e,"defaultOpen")}),{modal:C(e,"modal"),closeOnInteractOutside:C(e,"closeOnInteractOutside"),closeOnEscape:C(e,"closeOnEscapeKeyDown"),preventScroll:C(e,"preventScroll"),restoreFocus:C(e,"restoreFocus"),dir:w(e,"dir",["ltr","rtl"]),onOpenChange:i=>{let r=w(e,"onOpenChange");r&&this.liveSocket.main.isConnected()&&t(r,{id:e.id,open:i.open});let s=w(e,"onOpenChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{id:e.id,open:i.open}}))}}));n.init(),this.dialog=n,this.onSetOpen=i=>{let{open:r}=i.detail;n.api.setOpen(r)},e.addEventListener("phx:dialog:set-open",this.onSetOpen),this.handlers=[],this.handlers.push(this.handleEvent("dialog_set_open",i=>{let r=i.dialog_id;r&&r!==e.id||n.api.setOpen(i.open)})),this.handlers.push(this.handleEvent("dialog_open",()=>{this.pushEvent("dialog_open_response",{value:n.api.open})}))},updated(){var e;(e=this.dialog)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlled")?{open:C(this.el,"open")}:{defaultOpen:C(this.el,"defaultOpen")}),{modal:C(this.el,"modal"),closeOnInteractOutside:C(this.el,"closeOnInteractOutside"),closeOnEscape:C(this.el,"closeOnEscapeKeyDown"),preventScroll:C(this.el,"preventScroll"),restoreFocus:C(this.el,"restoreFocus"),dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(this.onSetOpen&&this.el.removeEventListener("phx:dialog:set-open",this.onSetOpen),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.dialog)==null||e.destroy()}}});var mg={};he(mg,{Editable:()=>PS});function yS(e,t){var S;let{state:n,context:i,send:r,prop:s,scope:a,computed:o}=e,l=!!s("disabled"),c=o("isInteractive"),u=!!s("readOnly"),h=!!s("required"),m=!!s("invalid"),d=!!s("autoResize"),p=s("translations"),v=n.matches("edit"),I=s("placeholder"),T=typeof I=="string"?{edit:I,preview:I}:I,O=i.get("value"),b=O.trim()==="",f=b?(S=T==null?void 0:T.preview)!=null?S:"":O;return{editing:v,empty:b,value:O,valueText:f,setValue(P){r({type:"VALUE.SET",value:P,src:"setValue"})},clearValue(){r({type:"VALUE.SET",value:"",src:"clearValue"})},edit(){c&&r({type:"EDIT"})},cancel(){c&&r({type:"CANCEL"})},submit(){c&&r({type:"SUBMIT"})},getRootProps(){return t.element(y(g({},ln.root.attrs),{id:uS(a),dir:s("dir")}))},getAreaProps(){return t.element(y(g({},ln.area.attrs),{id:dS(a),dir:s("dir"),style:d?{display:"inline-grid"}:void 0,"data-focus":E(v),"data-disabled":E(l),"data-placeholder-shown":E(b)}))},getLabelProps(){return t.label(y(g({},ln.label.attrs),{id:hS(a),dir:s("dir"),htmlFor:Cl(a),"data-focus":E(v),"data-invalid":E(m),"data-required":E(h),onClick(){if(v)return;let P=pS(a);P==null||P.focus({preventScroll:!0})}}))},getInputProps(){return t.input(y(g({},ln.input.attrs),{dir:s("dir"),"aria-label":p==null?void 0:p.input,name:s("name"),form:s("form"),id:Cl(a),hidden:d?void 0:!v,placeholder:T==null?void 0:T.edit,maxLength:s("maxLength"),required:s("required"),disabled:l,"data-disabled":E(l),readOnly:u,"data-readonly":E(u),"aria-invalid":X(m),"data-invalid":E(m),"data-autoresize":E(d),defaultValue:O,size:d?1:void 0,onChange(P){r({type:"VALUE.SET",src:"input.change",value:P.currentTarget.value})},onKeyDown(P){if(P.defaultPrevented||Re(P))return;let A={Escape(){r({type:"CANCEL"}),P.preventDefault()},Enter(x){if(!o("submitOnEnter"))return;let{localName:k}=x.currentTarget;if(k==="textarea"){if(!(Qa()?x.metaKey:x.ctrlKey))return;r({type:"SUBMIT",src:"keydown.enter"});return}k==="input"&&!x.shiftKey&&!x.metaKey&&(r({type:"SUBMIT",src:"keydown.enter"}),x.preventDefault())}}[P.key];A&&A(P)},style:d?{gridArea:"1 / 1 / auto / auto",visibility:v?void 0:"hidden"}:void 0}))},getPreviewProps(){return t.element(y(g({id:hg(a)},ln.preview.attrs),{dir:s("dir"),"data-placeholder-shown":E(b),"aria-readonly":X(u),"data-readonly":E(l),"data-disabled":E(l),"aria-disabled":X(l),"aria-invalid":X(m),"data-invalid":E(m),"aria-label":p==null?void 0:p.edit,"data-autoresize":E(d),children:f,hidden:d?void 0:v,tabIndex:c?0:void 0,onClick(){c&&s("activationMode")==="click"&&r({type:"EDIT",src:"click"})},onFocus(){c&&s("activationMode")==="focus"&&r({type:"EDIT",src:"focus"})},onDoubleClick(P){P.defaultPrevented||c&&s("activationMode")==="dblclick"&&r({type:"EDIT",src:"dblclick"})},style:d?{whiteSpace:"pre",gridArea:"1 / 1 / auto / auto",visibility:v?"hidden":void 0,overflow:"hidden",textOverflow:"ellipsis"}:void 0}))},getEditTriggerProps(){return t.button(y(g({},ln.editTrigger.attrs),{id:fg(a),dir:s("dir"),"aria-label":p==null?void 0:p.edit,hidden:v,type:"button",disabled:l,onClick(P){P.defaultPrevented||c&&r({type:"EDIT",src:"edit.click"})}}))},getControlProps(){return t.element(y(g({id:gS(a)},ln.control.attrs),{dir:s("dir")}))},getSubmitTriggerProps(){return t.button(y(g({},ln.submitTrigger.attrs),{dir:s("dir"),id:gg(a),"aria-label":p==null?void 0:p.submit,hidden:!v,disabled:l,type:"button",onClick(P){P.defaultPrevented||c&&r({type:"SUBMIT",src:"submit.click"})}}))},getCancelTriggerProps(){return t.button(y(g({},ln.cancelTrigger.attrs),{dir:s("dir"),"aria-label":p==null?void 0:p.cancel,id:pg(a),hidden:!v,type:"button",disabled:l,onClick(P){P.defaultPrevented||c&&r({type:"CANCEL",src:"cancel.click"})}}))}}}var cS,ln,uS,dS,hS,hg,Cl,gS,gg,pg,fg,ha,pS,fS,mS,vS,bS,ES,Bx,IS,PS,vg=re(()=>{"use strict";tn();se();cS=U("editable").parts("root","area","label","preview","input","editTrigger","submitTrigger","cancelTrigger","control"),ln=cS.build(),uS=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`editable:${e.id}`},dS=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.area)!=null?n:`editable:${e.id}:area`},hS=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`editable:${e.id}:label`},hg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.preview)!=null?n:`editable:${e.id}:preview`},Cl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.input)!=null?n:`editable:${e.id}:input`},gS=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`editable:${e.id}:control`},gg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.submitTrigger)!=null?n:`editable:${e.id}:submit`},pg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.cancelTrigger)!=null?n:`editable:${e.id}:cancel`},fg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.editTrigger)!=null?n:`editable:${e.id}:edit`},ha=e=>e.getById(Cl(e)),pS=e=>e.getById(hg(e)),fS=e=>e.getById(gg(e)),mS=e=>e.getById(pg(e)),vS=e=>e.getById(fg(e));bS={props({props:e}){return y(g({activationMode:"focus",submitMode:"both",defaultValue:"",selectOnFocus:!0},e),{translations:g({input:"editable input",edit:"edit",submit:"submit",cancel:"cancel"},e.translations)})},initialState({prop:e}){return e("edit")||e("defaultEdit")?"edit":"preview"},entry:["focusInputIfNeeded"],context:({bindable:e,prop:t})=>({value:e(()=>({defaultValue:t("defaultValue"),value:t("value"),onChange(n){var i;return(i=t("onValueChange"))==null?void 0:i({value:n})}})),previousValue:e(()=>({defaultValue:""}))}),watch({track:e,action:t,context:n,prop:i}){e([()=>n.get("value")],()=>{t(["syncInputValue"])}),e([()=>i("edit")],()=>{t(["toggleEditing"])})},computed:{submitOnEnter({prop:e}){let t=e("submitMode");return t==="both"||t==="enter"},submitOnBlur({prop:e}){let t=e("submitMode");return t==="both"||t==="blur"},isInteractive({prop:e}){return!(e("disabled")||e("readOnly"))}},on:{"VALUE.SET":{actions:["setValue"]}},states:{preview:{entry:["blurInput"],on:{"CONTROLLED.EDIT":{target:"edit",actions:["setPreviousValue","focusInput"]},EDIT:[{guard:"isEditControlled",actions:["invokeOnEdit"]},{target:"edit",actions:["setPreviousValue","focusInput","invokeOnEdit"]}]}},edit:{effects:["trackInteractOutside"],entry:["syncInputValue"],on:{"CONTROLLED.PREVIEW":[{guard:"isSubmitEvent",target:"preview",actions:["setPreviousValue","restoreFocus","invokeOnSubmit"]},{target:"preview",actions:["revertValue","restoreFocus","invokeOnCancel"]}],CANCEL:[{guard:"isEditControlled",actions:["invokeOnPreview"]},{target:"preview",actions:["revertValue","restoreFocus","invokeOnCancel","invokeOnPreview"]}],SUBMIT:[{guard:"isEditControlled",actions:["invokeOnPreview"]},{target:"preview",actions:["setPreviousValue","restoreFocus","invokeOnSubmit","invokeOnPreview"]}]}}},implementations:{guards:{isEditControlled:({prop:e})=>e("edit")!=null,isSubmitEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="SUBMIT"}},effects:{trackInteractOutside({send:e,scope:t,prop:n,computed:i}){return Ws(ha(t),{exclude(r){return[mS(t),fS(t)].some(a=>ce(a,r))},onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onInteractOutside(r){var a;if((a=n("onInteractOutside"))==null||a(r),r.defaultPrevented)return;let{focusable:s}=r.detail;e({type:i("submitOnBlur")?"SUBMIT":"CANCEL",src:"interact-outside",focusable:s})}})}},actions:{restoreFocus({event:e,scope:t,prop:n}){e.focusable||H(()=>{var r,s;let i=(s=(r=n("finalFocusEl"))==null?void 0:r())!=null?s:vS(t);i==null||i.focus({preventScroll:!0})})},clearValue({context:e}){e.set("value","")},focusInputIfNeeded({action:e,prop:t}){(t("edit")||t("defaultEdit"))&&e(["focusInput"])},focusInput({scope:e,prop:t}){H(()=>{let n=ha(e);n&&(t("selectOnFocus")?n.select():n.focus({preventScroll:!0}))})},invokeOnCancel({prop:e,context:t}){var i;let n=t.get("previousValue");(i=e("onValueRevert"))==null||i({value:n})},invokeOnSubmit({prop:e,context:t}){var i;let n=t.get("value");(i=e("onValueCommit"))==null||i({value:n})},invokeOnEdit({prop:e}){var t;(t=e("onEditChange"))==null||t({edit:!0})},invokeOnPreview({prop:e}){var t;(t=e("onEditChange"))==null||t({edit:!1})},toggleEditing({prop:e,send:t,event:n}){t({type:e("edit")?"CONTROLLED.EDIT":"CONTROLLED.PREVIEW",previousEvent:n})},syncInputValue({context:e,scope:t}){let n=ha(t);n&&Me(n,e.get("value"))},setValue({context:e,prop:t,event:n}){let i=t("maxLength"),r=i!=null?n.value.slice(0,i):n.value;e.set("value",r)},setPreviousValue({context:e}){e.set("previousValue",e.get("value"))},revertValue({context:e}){let t=e.get("previousValue");t&&e.set("value",t)},blurInput({scope:e}){var t;(t=ha(e))==null||t.blur()}}}},ES=_()(["activationMode","autoResize","dir","disabled","finalFocusEl","form","getRootNode","id","ids","invalid","maxLength","name","onEditChange","onFocusOutside","onInteractOutside","onPointerDownOutside","onValueChange","onValueCommit","onValueRevert","placeholder","readOnly","required","selectOnFocus","edit","defaultEdit","submitMode","translations","defaultValue","value"]),Bx=B(ES),IS=class extends K{initMachine(e){return new W(bS,e)}initApi(){return yS(this.machine.service,q)}render(){var l;let e=(l=this.el.querySelector('[data-scope="editable"][data-part="root"]'))!=null?l:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="editable"][data-part="area"]');t&&this.spreadProps(t,this.api.getAreaProps());let n=this.el.querySelector('[data-scope="editable"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps());let i=this.el.querySelector('[data-scope="editable"][data-part="input"]');i&&this.spreadProps(i,this.api.getInputProps());let r=this.el.querySelector('[data-scope="editable"][data-part="preview"]');r&&this.spreadProps(r,this.api.getPreviewProps());let s=this.el.querySelector('[data-scope="editable"][data-part="edit-trigger"]');s&&this.spreadProps(s,this.api.getEditTriggerProps());let a=this.el.querySelector('[data-scope="editable"][data-part="submit-trigger"]');a&&this.spreadProps(a,this.api.getSubmitTriggerProps());let o=this.el.querySelector('[data-scope="editable"][data-part="cancel-trigger"]');o&&this.spreadProps(o,this.api.getCancelTriggerProps())}},PS={mounted(){let e=this.el,t=w(e,"value"),n=w(e,"defaultValue"),i=C(e,"controlled"),r=w(e,"placeholder"),s=w(e,"activationMode"),a=C(e,"selectOnFocus"),o=new IS(e,y(g(g(g(g(y(g({id:e.id},i&&t!==void 0?{value:t}:{defaultValue:n!=null?n:""}),{disabled:C(e,"disabled"),readOnly:C(e,"readOnly"),required:C(e,"required"),invalid:C(e,"invalid"),name:w(e,"name"),form:w(e,"form"),dir:Oe(e)}),r!==void 0?{placeholder:r}:{}),s!==void 0?{activationMode:s}:{}),a!==void 0?{selectOnFocus:a}:{}),C(e,"controlledEdit")?{edit:C(e,"edit")}:{defaultEdit:C(e,"defaultEdit")}),{onValueChange:l=>{let c=e.querySelector('[data-scope="editable"][data-part="input"]');c&&(c.value=l.value,c.dispatchEvent(new Event("input",{bubbles:!0})),c.dispatchEvent(new Event("change",{bubbles:!0})));let u=w(e,"onValueChange");u&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(u,{value:l.value,id:e.id});let h=w(e,"onValueChangeClient");h&&e.dispatchEvent(new CustomEvent(h,{bubbles:!0,detail:{value:l,id:e.id}}))}}));o.init(),this.editable=o,this.handlers=[]},updated(){var n;let e=w(this.el,"value"),t=C(this.el,"controlled");(n=this.editable)==null||n.updateProps(y(g({id:this.el.id},t&&e!==void 0?{value:e}:{}),{disabled:C(this.el,"disabled"),readOnly:C(this.el,"readOnly"),required:C(this.el,"required"),invalid:C(this.el,"invalid"),name:w(this.el,"name"),form:w(this.el,"form")}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.editable)==null||e.destroy()}}});var Vg={};he(Vg,{FloatingPanel:()=>RS});function TS(e){switch(e){case"n":return{cursor:"n-resize",width:"100%",top:0,left:"50%",translate:"-50%"};case"e":return{cursor:"e-resize",height:"100%",right:0,top:"50%",translate:"0 -50%"};case"s":return{cursor:"s-resize",width:"100%",bottom:0,left:"50%",translate:"-50%"};case"w":return{cursor:"w-resize",height:"100%",left:0,top:"50%",translate:"0 -50%"};case"se":return{cursor:"se-resize",bottom:0,right:0};case"sw":return{cursor:"sw-resize",bottom:0,left:0};case"ne":return{cursor:"ne-resize",top:0,right:0};case"nw":return{cursor:"nw-resize",top:0,left:0};default:throw new Error(`Invalid axis: ${e}`)}}function OS(e,t){let{state:n,send:i,scope:r,prop:s,computed:a,context:o}=e,l=n.hasTag("open"),c=n.matches("open.dragging"),u=n.matches("open.resizing"),h=o.get("isTopmost"),m=o.get("size"),d=o.get("position"),p=a("isMaximized"),v=a("isMinimized"),I=a("isStaged"),T=a("canResize"),O=a("canDrag");return{open:l,resizable:s("resizable"),draggable:s("draggable"),setOpen(b){n.hasTag("open")!==b&&i({type:b?"OPEN":"CLOSE"})},dragging:c,resizing:u,position:d,size:m,setPosition(b){i({type:"SET_POSITION",position:b})},setSize(b){i({type:"SET_SIZE",size:b})},minimize(){i({type:"MINIMIZE"})},maximize(){i({type:"MAXIMIZE"})},restore(){i({type:"RESTORE"})},getTriggerProps(){return t.button(y(g({},St.trigger.attrs),{dir:s("dir"),type:"button",disabled:s("disabled"),id:Tg(r),"data-state":l?"open":"closed","data-dragging":E(c),"aria-controls":Sl(r),onClick(b){if(b.defaultPrevented||s("disabled"))return;let f=n.hasTag("open");i({type:f?"CLOSE":"OPEN",src:"trigger"})}}))},getPositionerProps(){return t.element(y(g({},St.positioner.attrs),{dir:s("dir"),id:Og(r),style:{"--width":ye(m==null?void 0:m.width),"--height":ye(m==null?void 0:m.height),"--x":ye(d==null?void 0:d.x),"--y":ye(d==null?void 0:d.y),position:s("strategy"),top:"var(--y)",left:"var(--x)"}}))},getContentProps(){return t.element(y(g({},St.content.attrs),{dir:s("dir"),role:"dialog",tabIndex:0,hidden:!l,id:Sl(r),"aria-labelledby":yg(r),"data-state":l?"open":"closed","data-dragging":E(c),"data-topmost":E(h),"data-behind":E(!h),"data-minimized":E(v),"data-maximized":E(p),"data-staged":E(I),style:{width:"var(--width)",height:"var(--height)",overflow:v?"hidden":void 0},onFocus(){i({type:"CONTENT_FOCUS"})},onKeyDown(b){if(b.defaultPrevented||b.currentTarget!==j(b))return;let f=gi(b)*s("gridSize"),P={Escape(){h&&i({type:"ESCAPE"})},ArrowLeft(){i({type:"MOVE",direction:"left",step:f})},ArrowRight(){i({type:"MOVE",direction:"right",step:f})},ArrowUp(){i({type:"MOVE",direction:"up",step:f})},ArrowDown(){i({type:"MOVE",direction:"down",step:f})}}[ge(b,{dir:s("dir")})];P&&(b.preventDefault(),P(b))}}))},getCloseTriggerProps(){return t.button(y(g({},St.closeTrigger.attrs),{dir:s("dir"),disabled:s("disabled"),"aria-label":"Close Window",type:"button",onClick(b){b.defaultPrevented||i({type:"CLOSE"})}}))},getStageTriggerProps(b){if(!Pg.has(b.stage))throw new Error(`[zag-js] Invalid stage: ${b.stage}. Must be one of: ${Array.from(Pg).join(", ")}`);let f=s("translations"),S=Ce(b.stage,{minimized:()=>({"aria-label":f.minimize,hidden:I}),maximized:()=>({"aria-label":f.maximize,hidden:I}),default:()=>({"aria-label":f.restore,hidden:!I})});return t.button(y(g(y(g({},St.stageTrigger.attrs),{dir:s("dir"),disabled:s("disabled"),"data-stage":b.stage}),S),{type:"button",onClick(P){if(P.defaultPrevented||!s("resizable"))return;let V=Ce(b.stage,{minimized:()=>"MINIMIZE",maximized:()=>"MAXIMIZE",default:()=>"RESTORE"});i({type:V.toUpperCase()})}}))},getResizeTriggerProps(b){return t.element(y(g({},St.resizeTrigger.attrs),{dir:s("dir"),"data-disabled":E(!T),"data-axis":b.axis,onPointerDown(f){T&&pe(f)&&(f.currentTarget.setPointerCapture(f.pointerId),f.stopPropagation(),i({type:"RESIZE_START",axis:b.axis,position:{x:f.clientX,y:f.clientY}}))},onPointerUp(f){if(!T)return;let S=f.currentTarget;S.hasPointerCapture(f.pointerId)&&S.releasePointerCapture(f.pointerId)},style:g({position:"absolute",touchAction:"none"},TS(b.axis))}))},getDragTriggerProps(){return t.element(y(g({},St.dragTrigger.attrs),{dir:s("dir"),"data-disabled":E(!O),onPointerDown(b){if(!O||!pe(b))return;let f=j(b);f!=null&&f.closest("button")||f!=null&&f.closest("[data-no-drag]")||(b.currentTarget.setPointerCapture(b.pointerId),b.stopPropagation(),i({type:"DRAG_START",pointerId:b.pointerId,position:{x:b.clientX,y:b.clientY}}))},onPointerUp(b){if(!O)return;let f=b.currentTarget;f.hasPointerCapture(b.pointerId)&&f.releasePointerCapture(b.pointerId)},onDoubleClick(b){b.defaultPrevented||s("resizable")&&i({type:I?"RESTORE":"MAXIMIZE"})},style:{WebkitUserSelect:"none",userSelect:"none",touchAction:"none",cursor:"move"}}))},getControlProps(){return t.element(y(g({},St.control.attrs),{dir:s("dir"),"data-disabled":E(s("disabled")),"data-stage":o.get("stage"),"data-minimized":E(v),"data-maximized":E(p),"data-staged":E(I)}))},getTitleProps(){return t.element(y(g({},St.title.attrs),{dir:s("dir"),id:yg(r)}))},getHeaderProps(){return t.element(y(g({},St.header.attrs),{dir:s("dir"),id:wg(r),"data-dragging":E(c),"data-topmost":E(h),"data-behind":E(!h),"data-minimized":E(v),"data-maximized":E(p),"data-staged":E(I)}))},getBodyProps(){return t.element(y(g({},St.body.attrs),{dir:s("dir"),"data-dragging":E(c),"data-minimized":E(v),"data-maximized":E(p),"data-staged":E(I),hidden:v}))}}}function ga(e){if(e)try{let t=JSON.parse(e);if(typeof t.width=="number"&&typeof t.height=="number")return{width:t.width,height:t.height}}catch(t){}}function Sg(e){if(e)try{let t=JSON.parse(e);if(typeof t.x=="number"&&typeof t.y=="number")return{x:t.x,y:t.y}}catch(t){}}var CS,St,Tg,Og,Sl,yg,wg,bg,Eg,Ig,SS,wn,Pg,kr,Cg,wS,VS,xS,AS,Wx,kS,Kx,NS,RS,xg=re(()=>{"use strict";Cs();se();CS=U("floating-panel").parts("trigger","positioner","content","header","body","title","resizeTrigger","dragTrigger","stageTrigger","closeTrigger","control"),St=CS.build(),Tg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`float:${e.id}:trigger`},Og=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`float:${e.id}:positioner`},Sl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`float:${e.id}:content`},yg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`float:${e.id}:title`},wg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.header)!=null?n:`float:${e.id}:header`},bg=e=>e.getById(Tg(e)),Eg=e=>e.getById(Og(e)),Ig=e=>e.getById(Sl(e)),SS=e=>e.getById(wg(e)),wn=(e,t,n)=>{let i;return le(t)?i=po(t):i=Cu(e.getWin()),n&&(i=bn({x:-i.width,y:i.minY,width:i.width*3,height:i.height*2})),fn(i,["x","y","width","height"])};Pg=new Set(["minimized","maximized","default"]);kr=ys({stack:[],count(){return this.stack.length},add(e){this.stack.includes(e)||this.stack.push(e)},remove(e){let t=this.stack.indexOf(e);t<0||this.stack.splice(t,1)},bringToFront(e){this.remove(e),this.add(e)},isTopmost(e){return this.stack[this.stack.length-1]===e},indexOf(e){return this.stack.indexOf(e)}}),{not:Cg,and:wS}=Ee(),VS={minimize:"Minimize window",maximize:"Maximize window",restore:"Restore window"},xS={props({props:e}){return yn(e,["id"],"floating-panel"),y(g({strategy:"fixed",gridSize:1,defaultSize:{width:320,height:240},defaultPosition:{x:300,y:100},allowOverflow:!0,resizable:!0,draggable:!0},e),{hasSpecifiedPosition:!!e.defaultPosition||!!e.position,translations:g(g({},VS),e.translations)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({prop:e,bindable:t}){return{size:t(()=>({defaultValue:e("defaultSize"),value:e("size"),isEqual:Iu,sync:!0,hash(n){return`W:${n.width} H:${n.height}`},onChange(n){var i;(i=e("onSizeChange"))==null||i({size:n})}})),position:t(()=>({defaultValue:e("defaultPosition"),value:e("position"),isEqual:Pu,sync:!0,hash(n){return`X:${n.x} Y:${n.y}`},onChange(n){var i;(i=e("onPositionChange"))==null||i({position:n})}})),stage:t(()=>({defaultValue:"default",onChange(n){var i;(i=e("onStageChange"))==null||i({stage:n})}})),lastEventPosition:t(()=>({defaultValue:null})),prevPosition:t(()=>({defaultValue:null})),prevSize:t(()=>({defaultValue:null})),isTopmost:t(()=>({defaultValue:void 0}))}},computed:{isMaximized:({context:e})=>e.get("stage")==="maximized",isMinimized:({context:e})=>e.get("stage")==="minimized",isStaged:({context:e})=>e.get("stage")!=="default",canResize:({context:e,prop:t})=>t("resizable")&&!t("disabled")&&e.get("stage")==="default",canDrag:({prop:e,computed:t})=>e("draggable")&&!e("disabled")&&!t("isMaximized")},watch({track:e,context:t,action:n,prop:i}){e([()=>t.hash("position")],()=>{n(["setPositionStyle"])}),e([()=>t.hash("size")],()=>{n(["setSizeStyle"])}),e([()=>i("open")],()=>{n(["toggleVisibility"])})},effects:["trackPanelStack"],on:{CONTENT_FOCUS:{actions:["bringToFrontOfPanelStack"]},SET_POSITION:{actions:["setPosition"]},SET_SIZE:{actions:["setSize"]}},states:{closed:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open",actions:["setAnchorPosition","setPositionStyle","setSizeStyle","focusContentEl"]},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setAnchorPosition","setPositionStyle","setSizeStyle","focusContentEl"]}]}},open:{tags:["open"],entry:["bringToFrontOfPanelStack"],effects:["trackBoundaryRect"],on:{DRAG_START:{guard:Cg("isMaximized"),target:"open.dragging",actions:["setPrevPosition"]},RESIZE_START:{guard:Cg("isMinimized"),target:"open.resizing",actions:["setPrevSize"]},"CONTROLLED.CLOSE":{target:"closed",actions:["resetRect","focusTriggerEl"]},CLOSE:[{guard:"isOpenControlled",target:"closed",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","resetRect","focusTriggerEl"]}],ESCAPE:[{guard:wS("isOpenControlled","closeOnEsc"),actions:["invokeOnClose"]},{guard:"closeOnEsc",target:"closed",actions:["invokeOnClose","resetRect","focusTriggerEl"]}],MINIMIZE:{actions:["setMinimized"]},MAXIMIZE:{actions:["setMaximized"]},RESTORE:{actions:["setRestored"]},MOVE:{actions:["setPositionFromKeyboard"]}}},"open.dragging":{tags:["open"],effects:["trackPointerMove"],exit:["clearPrevPosition"],on:{DRAG:{actions:["setPosition"]},DRAG_END:{target:"open",actions:["invokeOnDragEnd"]},"CONTROLLED.CLOSE":{target:"closed",actions:["resetRect"]},CLOSE:[{guard:"isOpenControlled",target:"closed",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","resetRect"]}],ESCAPE:{target:"open"}}},"open.resizing":{tags:["open"],effects:["trackPointerMove"],exit:["clearPrevSize"],on:{DRAG:{actions:["setSize"]},DRAG_END:{target:"open",actions:["invokeOnResizeEnd"]},"CONTROLLED.CLOSE":{target:"closed",actions:["resetRect"]},CLOSE:[{guard:"isOpenControlled",target:"closed",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","resetRect"]}],ESCAPE:{target:"open"}}}},implementations:{guards:{closeOnEsc:({prop:e})=>!!e("closeOnEscape"),isMaximized:({context:e})=>e.get("stage")==="maximized",isMinimized:({context:e})=>e.get("stage")==="minimized",isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPointerMove({scope:e,send:t,event:n,prop:i}){var o;let r=e.getDoc(),s=(o=i("getBoundaryEl"))==null?void 0:o(),a=wn(e,s,!1);return hn(r,{onPointerMove({point:l,event:c}){let{altKey:u,shiftKey:h}=c,m=He(l.x,a.x,a.x+a.width),d=He(l.y,a.y,a.y+a.height);t({type:"DRAG",position:{x:m,y:d},axis:n.axis,altKey:u,shiftKey:h})},onPointerUp(){t({type:"DRAG_END"})}})},trackBoundaryRect({context:e,scope:t,prop:n,computed:i}){var l;let r=t.getWin(),s=!0,a=()=>{var h;if(s){s=!1;return}let c=(h=n("getBoundaryEl"))==null?void 0:h(),u=wn(t,c,!1);if(!i("isMaximized")){let m=g(g({},e.get("position")),e.get("size"));u=Eu(m,u)}e.set("size",fn(u,["width","height"])),e.set("position",fn(u,["x","y"]))},o=(l=n("getBoundaryEl"))==null?void 0:l();return le(o)?gn.observe(o,a):ee(r,"resize",a)},trackPanelStack({context:e,scope:t}){let n=ns(kr,()=>{e.set("isTopmost",kr.isTopmost(t.id));let i=Ig(t);if(!i)return;let r=kr.indexOf(t.id);r!==-1&&i.style.setProperty("--z-index",`${r+1}`)});return()=>{kr.remove(t.id),n()}}},actions:{setAnchorPosition({context:e,prop:t,scope:n}){if(t("hasSpecifiedPosition"))return;let i=e.get("prevPosition")||e.get("prevSize");t("persistRect")&&i||H(()=>{var o,l;let r=bg(n),s=wn(n,(o=t("getBoundaryEl"))==null?void 0:o(),!1),a=(l=t("getAnchorPosition"))==null?void 0:l({triggerRect:r?DOMRect.fromRect(po(r)):null,boundaryRect:DOMRect.fromRect(s)});if(!a){let c=e.get("size");a={x:s.x+(s.width-c.width)/2,y:s.y+(s.height-c.height)/2}}a&&e.set("position",a)})},setPrevPosition({context:e,event:t}){e.set("prevPosition",g({},e.get("position"))),e.set("lastEventPosition",t.position)},clearPrevPosition({context:e,prop:t}){t("persistRect")||e.set("prevPosition",null),e.set("lastEventPosition",null)},setPosition({context:e,event:t,prop:n,scope:i}){var c;let r=go(t.position,e.get("lastEventPosition"));r.x=Math.round(r.x/n("gridSize"))*n("gridSize"),r.y=Math.round(r.y/n("gridSize"))*n("gridSize");let s=e.get("prevPosition");if(!s)return;let a=bu(s,r),o=(c=n("getBoundaryEl"))==null?void 0:c(),l=wn(i,o,n("allowOverflow"));a=hr(a,e.get("size"),l),e.set("position",a)},setPositionStyle({scope:e,context:t}){let n=Eg(e),i=t.get("position");n==null||n.style.setProperty("--x",`${i.x}px`),n==null||n.style.setProperty("--y",`${i.y}px`)},resetRect({context:e,prop:t}){e.set("stage","default"),t("persistRect")||(e.set("position",e.initial("position")),e.set("size",e.initial("size")))},setPrevSize({context:e,event:t}){e.set("prevSize",g({},e.get("size"))),e.set("prevPosition",g({},e.get("position"))),e.set("lastEventPosition",t.position)},clearPrevSize({context:e}){e.set("prevSize",null),e.set("prevPosition",null),e.set("lastEventPosition",null)},setSize({context:e,event:t,scope:n,prop:i}){var p;let r=e.get("prevSize"),s=e.get("prevPosition"),a=e.get("lastEventPosition");if(!r||!s||!a)return;let o=bn(g(g({},s),r)),l=go(t.position,a),c=Tu(o,l,t.axis,{scalingOriginMode:t.altKey?"center":"extent",lockAspectRatio:!!i("lockAspectRatio")||t.shiftKey}),u=fn(c,["width","height"]),h=fn(c,["x","y"]),m=(p=i("getBoundaryEl"))==null?void 0:p(),d=wn(n,m,!1);if(u=gr(u,i("minSize"),i("maxSize")),u=gr(u,i("minSize"),d),e.set("size",u),h){let v=hr(h,u,d);e.set("position",v)}},setSizeStyle({scope:e,context:t}){queueMicrotask(()=>{let n=Eg(e),i=t.get("size");n==null||n.style.setProperty("--width",`${i.width}px`),n==null||n.style.setProperty("--height",`${i.height}px`)})},setMaximized({context:e,prop:t,scope:n}){var s;e.set("stage","maximized"),e.set("prevSize",e.get("size")),e.set("prevPosition",e.get("position"));let i=(s=t("getBoundaryEl"))==null?void 0:s(),r=wn(n,i,!1);e.set("position",fn(r,["x","y"])),e.set("size",fn(r,["height","width"]))},setMinimized({context:e,scope:t}){e.set("stage","minimized"),e.set("prevSize",e.get("size")),e.set("prevPosition",e.get("position"));let n=SS(t);if(!n)return;let i=y(g({},e.get("size")),{height:n==null?void 0:n.offsetHeight});e.set("size",i)},setRestored({context:e,prop:t,scope:n}){var s;let i=wn(n,(s=t("getBoundaryEl"))==null?void 0:s(),!1);e.set("stage","default");let r=e.get("prevSize");if(r){let a=r;a=gr(a,t("minSize"),t("maxSize")),a=gr(a,t("minSize"),i),e.set("size",a),e.set("prevSize",null)}if(e.get("prevPosition")){let a=e.get("prevPosition");a=hr(a,e.get("size"),i),e.set("position",a),e.set("prevPosition",null)}},setPositionFromKeyboard({context:e,event:t,prop:n,scope:i}){var c;vs(t.step==null,"step is required");let r=e.get("position"),s=t.step,a=Ce(t.direction,{left:{x:r.x-s,y:r.y},right:{x:r.x+s,y:r.y},up:{x:r.x,y:r.y-s},down:{x:r.x,y:r.y+s}}),o=(c=n("getBoundaryEl"))==null?void 0:c(),l=wn(i,o,!1);a=hr(a,e.get("size"),l),e.set("position",a)},bringToFrontOfPanelStack({prop:e}){kr.bringToFront(e("id"))},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnDragEnd({context:e,prop:t}){var n;(n=t("onPositionChangeEnd"))==null||n({position:e.get("position")})},invokeOnResizeEnd({context:e,prop:t}){var n;(n=t("onSizeChangeEnd"))==null||n({size:e.get("size")})},focusTriggerEl({scope:e}){H(()=>{var t;(t=bg(e))==null||t.focus()})},focusContentEl({scope:e}){H(()=>{var t;(t=Ig(e))==null||t.focus()})},toggleVisibility({send:e,prop:t,event:n}){e({type:t("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}},AS=_()(["allowOverflow","closeOnEscape","defaultOpen","defaultPosition","defaultSize","dir","disabled","draggable","getAnchorPosition","getBoundaryEl","getRootNode","gridSize","id","ids","lockAspectRatio","maxSize","minSize","onOpenChange","onPositionChange","onPositionChangeEnd","onSizeChange","onSizeChangeEnd","onStageChange","open","persistRect","position","resizable","size","strategy","translations"]),Wx=B(AS),kS=_()(["axis"]),Kx=B(kS),NS=class extends K{initMachine(e){return new W(xS,e)}initApi(){return OS(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="floating-panel"][data-part="trigger"]');e&&this.spreadProps(e,this.api.getTriggerProps());let t=this.el.querySelector('[data-scope="floating-panel"][data-part="positioner"]');t&&this.spreadProps(t,this.api.getPositionerProps());let n=this.el.querySelector('[data-scope="floating-panel"][data-part="content"]');n&&this.spreadProps(n,this.api.getContentProps());let i=this.el.querySelector('[data-scope="floating-panel"][data-part="title"]');i&&this.spreadProps(i,this.api.getTitleProps());let r=this.el.querySelector('[data-scope="floating-panel"][data-part="header"]');r&&this.spreadProps(r,this.api.getHeaderProps());let s=this.el.querySelector('[data-scope="floating-panel"][data-part="body"]');s&&this.spreadProps(s,this.api.getBodyProps());let a=this.el.querySelector('[data-scope="floating-panel"][data-part="drag-trigger"]');a&&this.spreadProps(a,this.api.getDragTriggerProps()),["s","w","e","n","sw","nw","se","ne"].forEach(h=>{let m=this.el.querySelector(`[data-scope="floating-panel"][data-part="resize-trigger"][data-axis="${h}"]`);m&&this.spreadProps(m,this.api.getResizeTriggerProps({axis:h}))});let l=this.el.querySelector('[data-scope="floating-panel"][data-part="close-trigger"]');l&&this.spreadProps(l,this.api.getCloseTriggerProps());let c=this.el.querySelector('[data-scope="floating-panel"][data-part="control"]');c&&this.spreadProps(c,this.api.getControlProps()),["minimized","maximized","default"].forEach(h=>{let m=this.el.querySelector(`[data-scope="floating-panel"][data-part="stage-trigger"][data-stage="${h}"]`);m&&this.spreadProps(m,this.api.getStageTriggerProps({stage:h}))})}};RS={mounted(){let e=this.el,t=C(e,"open"),n=C(e,"defaultOpen"),i=C(e,"controlled"),r=ga(e.dataset.size),s=ga(e.dataset.defaultSize),a=Sg(e.dataset.position),o=Sg(e.dataset.defaultPosition),l=new NS(e,y(g({id:e.id},i?{open:t}:{defaultOpen:n}),{draggable:C(e,"draggable")!==!1,resizable:C(e,"resizable")!==!1,allowOverflow:C(e,"allowOverflow")!==!1,closeOnEscape:C(e,"closeOnEscape")!==!1,disabled:C(e,"disabled"),dir:Oe(e),size:r,defaultSize:s,position:a,defaultPosition:o,minSize:ga(e.dataset.minSize),maxSize:ga(e.dataset.maxSize),persistRect:C(e,"persistRect"),gridSize:Number(e.dataset.gridSize)||1,onOpenChange:c=>{let u=w(e,"onOpenChange");u&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(u,{open:c.open,id:e.id});let h=w(e,"onOpenChangeClient");h&&e.dispatchEvent(new CustomEvent(h,{bubbles:!0,detail:{value:c,id:e.id}}))},onPositionChange:c=>{let u=w(e,"onPositionChange");u&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(u,{position:c.position,id:e.id})},onSizeChange:c=>{let u=w(e,"onSizeChange");u&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(u,{size:c.size,id:e.id})},onStageChange:c=>{let u=w(e,"onStageChange");u&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(u,{stage:c.stage,id:e.id})}}));l.init(),this.floatingPanel=l,this.handlers=[]},updated(){var n;let e=C(this.el,"open"),t=C(this.el,"controlled");(n=this.floatingPanel)==null||n.updateProps(y(g({id:this.el.id},t?{open:e}:{}),{disabled:C(this.el,"disabled"),dir:Oe(this.el)}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.floatingPanel)==null||e.destroy()}}});var Dg={};he(Dg,{Listbox:()=>jS});function $S(e,t){let{context:n,prop:i,scope:r,computed:s,send:a,refs:o}=e,l=i("disabled"),c=i("collection"),u=Cn(c)?"grid":"list",h=n.get("focused"),m=o.get("focusVisible")&&h,d=o.get("inputState"),p=n.get("value"),v=n.get("selectedItems"),I=n.get("highlightedValue"),T=n.get("highlightedItem"),O=s("isTypingAhead"),b=s("isInteractive"),f=I?Ol(r,I):void 0;function S(P){let V=c.getItemDisabled(P.item),A=c.getItemValue(P.item);vn(A,()=>`[zag-js] No value found for item ${JSON.stringify(P.item)}`);let x=I===A;return{value:A,disabled:!!(l||V),focused:x&&h,focusVisible:x&&m,highlighted:x&&(d.focused?h:m),selected:n.get("value").includes(A)}}return{empty:p.length===0,highlightedItem:T,highlightedValue:I,clearHighlightedValue(){a({type:"HIGHLIGHTED_VALUE.SET",value:null})},selectedItems:v,hasSelectedItems:s("hasSelectedItems"),value:p,valueAsString:s("valueAsString"),collection:c,disabled:!!l,selectValue(P){a({type:"ITEM.SELECT",value:P})},setValue(P){a({type:"VALUE.SET",value:P})},selectAll(){if(!s("multiple"))throw new Error("[zag-js] Cannot select all items in a single-select listbox");a({type:"VALUE.SET",value:c.getValues()})},highlightValue(P){a({type:"HIGHLIGHTED_VALUE.SET",value:P})},clearValue(P){a(P?{type:"ITEM.CLEAR",value:P}:{type:"VALUE.CLEAR"})},getItemState:S,getRootProps(){return t.element(y(g({},Ht.root.attrs),{dir:i("dir"),id:MS(r),"data-orientation":i("orientation"),"data-disabled":E(l)}))},getInputProps(P={}){return t.input(y(g({},Ht.input.attrs),{dir:i("dir"),disabled:l,"data-disabled":E(l),autoComplete:"off",autoCorrect:"off","aria-haspopup":"listbox","aria-controls":Tl(r),"aria-autocomplete":"list","aria-activedescendant":f,spellCheck:!1,enterKeyHint:"go",onFocus(){queueMicrotask(()=>{a({type:"INPUT.FOCUS",autoHighlight:!!(P!=null&&P.autoHighlight)})})},onBlur(){a({type:"CONTENT.BLUR",src:"input"})},onInput(V){P!=null&&P.autoHighlight&&(V.currentTarget.value.trim()||queueMicrotask(()=>{a({type:"HIGHLIGHTED_VALUE.SET",value:null})}))},onKeyDown(V){if(V.defaultPrevented||Re(V))return;let A=Yt(V),x=()=>{var D;V.preventDefault();let k=r.getWin(),N=new k.KeyboardEvent(A.type,A);(D=pa(r))==null||D.dispatchEvent(N)};switch(A.key){case"ArrowLeft":case"ArrowRight":{if(!Cn(c)||V.ctrlKey)return;x()}case"Home":case"End":{if(I==null&&V.shiftKey)return;x()}case"ArrowDown":case"ArrowUp":{x();break}case"Enter":I!=null&&(V.preventDefault(),a({type:"ITEM.CLICK",value:I}));break}}}))},getLabelProps(){return t.element(y(g({dir:i("dir"),id:Ag(r)},Ht.label.attrs),{"data-disabled":E(l)}))},getValueTextProps(){return t.element(y(g({},Ht.valueText.attrs),{dir:i("dir"),"data-disabled":E(l)}))},getItemProps(P){let V=S(P);return t.element(y(g({id:Ol(r,V.value),role:"option"},Ht.item.attrs),{dir:i("dir"),"data-value":V.value,"aria-selected":V.selected,"data-selected":E(V.selected),"data-layout":u,"data-state":V.selected?"checked":"unchecked","data-orientation":i("orientation"),"data-highlighted":E(V.highlighted),"data-disabled":E(V.disabled),"aria-disabled":X(V.disabled),onPointerMove(A){P.highlightOnHover&&(V.disabled||A.pointerType!=="mouse"||V.highlighted||a({type:"ITEM.POINTER_MOVE",value:V.value}))},onMouseDown(A){var x;A.preventDefault(),(x=pa(r))==null||x.focus()},onClick(A){A.defaultPrevented||V.disabled||a({type:"ITEM.CLICK",value:V.value,shiftKey:A.shiftKey,anchorValue:I,metaKey:ls(A)})}}))},getItemTextProps(P){let V=S(P);return t.element(y(g({},Ht.itemText.attrs),{"data-state":V.selected?"checked":"unchecked","data-disabled":E(V.disabled),"data-highlighted":E(V.highlighted)}))},getItemIndicatorProps(P){let V=S(P);return t.element(y(g({},Ht.itemIndicator.attrs),{"aria-hidden":!0,"data-state":V.selected?"checked":"unchecked",hidden:!V.selected}))},getItemGroupLabelProps(P){let{htmlFor:V}=P;return t.element(y(g({},Ht.itemGroupLabel.attrs),{id:kg(r,V),dir:i("dir"),role:"presentation"}))},getItemGroupProps(P){let{id:V}=P;return t.element(y(g({},Ht.itemGroup.attrs),{"data-disabled":E(l),"data-orientation":i("orientation"),"data-empty":E(c.size===0),id:FS(r,V),"aria-labelledby":kg(r,V),role:"group",dir:i("dir")}))},getContentProps(){return t.element(y(g({dir:i("dir"),id:Tl(r),role:"listbox"},Ht.content.attrs),{"data-activedescendant":f,"aria-activedescendant":f,"data-orientation":i("orientation"),"aria-multiselectable":s("multiple")?!0:void 0,"aria-labelledby":Ag(r),tabIndex:0,"data-layout":u,"data-empty":E(c.size===0),style:{"--column-count":Cn(c)?c.columnCount:1},onFocus(){a({type:"CONTENT.FOCUS"})},onBlur(){a({type:"CONTENT.BLUR"})},onKeyDown(P){if(!b||!ce(P.currentTarget,j(P)))return;let V=P.shiftKey,A={ArrowUp(N){let D=null;Cn(c)&&I?D=c.getPreviousRowValue(I):I&&(D=c.getPreviousValue(I)),!D&&(i("loopFocus")||!I)&&(D=c.lastValue),D&&(N.preventDefault(),a({type:"NAVIGATE",value:D,shiftKey:V,anchorValue:I}))},ArrowDown(N){let D=null;Cn(c)&&I?D=c.getNextRowValue(I):I&&(D=c.getNextValue(I)),!D&&(i("loopFocus")||!I)&&(D=c.firstValue),D&&(N.preventDefault(),a({type:"NAVIGATE",value:D,shiftKey:V,anchorValue:I}))},ArrowLeft(){if(!Cn(c)&&i("orientation")==="vertical")return;let N=I?c.getPreviousValue(I):null;!N&&i("loopFocus")&&(N=c.lastValue),N&&(P.preventDefault(),a({type:"NAVIGATE",value:N,shiftKey:V,anchorValue:I}))},ArrowRight(){if(!Cn(c)&&i("orientation")==="vertical")return;let N=I?c.getNextValue(I):null;!N&&i("loopFocus")&&(N=c.firstValue),N&&(P.preventDefault(),a({type:"NAVIGATE",value:N,shiftKey:V,anchorValue:I}))},Home(N){N.preventDefault();let D=c.firstValue;a({type:"NAVIGATE",value:D,shiftKey:V,anchorValue:I})},End(N){N.preventDefault();let D=c.lastValue;a({type:"NAVIGATE",value:D,shiftKey:V,anchorValue:I})},Enter(){a({type:"ITEM.CLICK",value:I})},a(N){ls(N)&&s("multiple")&&!i("disallowSelectAll")&&(N.preventDefault(),a({type:"VALUE.SET",value:c.getValues()}))},Space(N){var D;O&&i("typeahead")?a({type:"CONTENT.TYPEAHEAD",key:N.key}):(D=A.Enter)==null||D.call(A,N)},Escape(N){i("deselectable")&&p.length>0&&(N.preventDefault(),N.stopPropagation(),a({type:"VALUE.CLEAR"}))}},x=A[ge(P)];if(x){x(P);return}let k=j(P);Ot(k)||Ue.isValidEvent(P)&&i("typeahead")&&(a({type:"CONTENT.TYPEAHEAD",key:P.key}),P.preventDefault())}}))}}}function Nr(e,t,n){let i=US(t,e);for(let r of i)n==null||n({value:r})}function Rg(e,t){return Bi(t?{items:e,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled,groupBy:n=>{var i;return(i=n.group)!=null?i:""}}:{items:e,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled})}var DS,Ht,Bi,LS,MS,Tl,Ag,Ol,FS,kg,pa,Ng,HS,BS,_S,GS,US,qS,Jx,WS,Qx,KS,eA,zS,tA,YS,jS,Lg=re(()=>{"use strict";pr();yr();se();DS=U("listbox").parts("label","input","item","itemText","itemIndicator","itemGroup","itemGroupLabel","content","root","valueText"),Ht=DS.build(),Bi=e=>new Nt(e);Bi.empty=()=>new Nt({items:[]});LS=e=>new Vo(e);LS.empty=()=>new Vo({items:[],columnCount:0});MS=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`select:${e.id}`},Tl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`select:${e.id}:content`},Ag=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`select:${e.id}:label`},Ol=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`select:${e.id}:option:${t}`},FS=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemGroup)==null?void 0:i.call(n,t))!=null?r:`select:${e.id}:optgroup:${t}`},kg=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemGroupLabel)==null?void 0:i.call(n,t))!=null?r:`select:${e.id}:optgroup-label:${t}`},pa=e=>e.getById(Tl(e)),Ng=(e,t)=>e.getById(Ol(e,t));({guards:HS,createMachine:BS}=ut()),{or:_S}=HS,GS=BS({props({props:e}){return g({loopFocus:!1,composite:!0,defaultValue:[],multiple:!1,typeahead:!0,collection:Bi.empty(),orientation:"vertical",selectionMode:"single"},e)},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:fe,onChange(n){var r;let i=e("collection").findMany(n);return(r=e("onValueChange"))==null?void 0:r({value:n,items:i})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),sync:!0,onChange(n){var i;(i=e("onHighlightChange"))==null||i({highlightedValue:n,highlightedItem:e("collection").find(n),highlightedIndex:e("collection").indexOf(n)})}})),highlightedItem:t(()=>({defaultValue:null})),selectedItems:t(()=>{var r,s;let n=(s=(r=e("value"))!=null?r:e("defaultValue"))!=null?s:[];return{defaultValue:e("collection").findMany(n)}}),focused:t(()=>({sync:!0,defaultValue:!1}))}},refs(){return{typeahead:g({},Ue.defaultOptions),focusVisible:!1,inputState:{autoHighlight:!1,focused:!1}}},computed:{hasSelectedItems:({context:e})=>e.get("value").length>0,isTypingAhead:({refs:e})=>e.get("typeahead").keysSoFar!=="",isInteractive:({prop:e})=>!e("disabled"),selection:({context:e,prop:t})=>{let n=new ld(e.get("value"));return n.selectionMode=t("selectionMode"),n.deselectable=!!t("deselectable"),n},multiple:({prop:e})=>e("selectionMode")==="multiple"||e("selectionMode")==="extended",valueAsString:({context:e,prop:t})=>t("collection").stringifyItems(e.get("selectedItems"))},initialState(){return"idle"},watch({context:e,prop:t,track:n,action:i}){n([()=>e.get("value").toString()],()=>{i(["syncSelectedItems"])}),n([()=>e.get("highlightedValue")],()=>{i(["syncHighlightedItem"])}),n([()=>t("collection").toString()],()=>{i(["syncHighlightedValue"])})},effects:["trackFocusVisible"],on:{"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedItem"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setSelectedItems"]},"VALUE.CLEAR":{actions:["clearSelectedItems"]}},states:{idle:{effects:["scrollToHighlightedItem"],on:{"INPUT.FOCUS":{actions:["setFocused","setInputState"]},"CONTENT.FOCUS":[{guard:_S("hasSelectedValue","hasHighlightedValue"),actions:["setFocused"]},{actions:["setFocused","setDefaultHighlightedValue"]}],"CONTENT.BLUR":{actions:["clearFocused","clearInputState"]},"ITEM.CLICK":{actions:["setHighlightedItem","selectHighlightedItem"]},"CONTENT.TYPEAHEAD":{actions:["setFocused","highlightMatchingItem"]},"ITEM.POINTER_MOVE":{actions:["highlightItem"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedItem"]},NAVIGATE:{actions:["setFocused","setHighlightedItem","selectWithKeyboard"]}}}},implementations:{guards:{hasSelectedValue:({context:e})=>e.get("value").length>0,hasHighlightedValue:({context:e})=>e.get("highlightedValue")!=null},effects:{trackFocusVisible:({scope:e,refs:t})=>{var n;return Pn({root:(n=e.getRootNode)==null?void 0:n.call(e),onChange(i){t.set("focusVisible",i.isFocusVisible)}})},scrollToHighlightedItem({context:e,prop:t,scope:n}){let i=s=>{let a=e.get("highlightedValue");if(a==null||ju()!=="keyboard")return;let l=pa(n),c=t("scrollToIndexFn");if(c){let h=t("collection").indexOf(a);c==null||c({index:h,immediate:s,getElement(){return Ng(n,a)}});return}let u=Ng(n,a);Xt(u,{rootEl:l,block:"nearest"})};return H(()=>i(!0)),ot(()=>pa(n),{defer:!0,attributes:["data-activedescendant"],callback(){i(!1)}})}},actions:{selectHighlightedItem({context:e,prop:t,event:n,computed:i}){var o;let r=(o=n.value)!=null?o:e.get("highlightedValue"),s=t("collection");if(r==null||!s.has(r))return;let a=i("selection");if(n.shiftKey&&i("multiple")&&n.anchorValue){let l=a.extendSelection(s,n.anchorValue,r);Nr(a,l,t("onSelect")),e.set("value",Array.from(l))}else{let l=a.select(s,r,n.metaKey);Nr(a,l,t("onSelect")),e.set("value",Array.from(l))}},selectWithKeyboard({context:e,prop:t,event:n,computed:i}){let r=i("selection"),s=t("collection");if(n.shiftKey&&i("multiple")&&n.anchorValue){let a=r.extendSelection(s,n.anchorValue,n.value);Nr(r,a,t("onSelect")),e.set("value",Array.from(a));return}if(t("selectOnHighlight")){let a=r.replaceSelection(s,n.value);Nr(r,a,t("onSelect")),e.set("value",Array.from(a))}},highlightItem({context:e,event:t}){e.set("highlightedValue",t.value)},highlightMatchingItem({context:e,prop:t,event:n,refs:i}){let r=t("collection").search(n.key,{state:i.get("typeahead"),currentValue:e.get("highlightedValue")});r!=null&&e.set("highlightedValue",r)},setHighlightedItem({context:e,event:t}){e.set("highlightedValue",t.value)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},selectItem({context:e,prop:t,event:n,computed:i}){let r=t("collection"),s=i("selection"),a=s.select(r,n.value);Nr(s,a,t("onSelect")),e.set("value",Array.from(a))},clearItem({context:e,event:t,computed:n}){let r=n("selection").deselect(t.value);e.set("value",Array.from(r))},setSelectedItems({context:e,event:t}){e.set("value",t.value)},clearSelectedItems({context:e}){e.set("value",[])},syncSelectedItems({context:e,prop:t}){let n=t("collection"),i=e.get("selectedItems"),s=e.get("value").map(a=>i.find(l=>n.getItemValue(l)===a)||n.find(a));e.set("selectedItems",s)},syncHighlightedItem({context:e,prop:t}){let n=t("collection"),i=e.get("highlightedValue"),r=i?n.find(i):null;e.set("highlightedItem",r)},syncHighlightedValue({context:e,prop:t,refs:n}){let i=t("collection"),r=e.get("highlightedValue"),{autoHighlight:s}=n.get("inputState");if(s){queueMicrotask(()=>{var a;e.set("highlightedValue",(a=t("collection").firstValue)!=null?a:null)});return}r!=null&&!i.has(r)&&queueMicrotask(()=>{e.set("highlightedValue",null)})},setFocused({context:e}){e.set("focused",!0)},setDefaultHighlightedValue({context:e,prop:t}){let i=t("collection").firstValue;i!=null&&e.set("highlightedValue",i)},clearFocused({context:e}){e.set("focused",!1)},setInputState({refs:e,event:t}){e.set("inputState",{autoHighlight:!!t.autoHighlight,focused:!0})},clearInputState({refs:e}){e.set("inputState",{autoHighlight:!1,focused:!1})}}}}),US=(e,t)=>{let n=new Set(e);for(let i of t)n.delete(i);return n};qS=_()(["collection","defaultHighlightedValue","defaultValue","dir","disabled","deselectable","disallowSelectAll","getRootNode","highlightedValue","id","ids","loopFocus","onHighlightChange","onSelect","onValueChange","orientation","scrollToIndexFn","selectionMode","selectOnHighlight","typeahead","value"]),Jx=B(qS),WS=_()(["item","highlightOnHover"]),Qx=B(WS),KS=_()(["id"]),eA=B(KS),zS=_()(["htmlFor"]),tA=B(zS),YS=class extends K{constructor(t,n){var r;super(t,n);z(this,"_options",[]);z(this,"hasGroups",!1);z(this,"init",()=>{this.machine.start(),this.render(),this.machine.subscribe(()=>{this.api=this.initApi(),this.render()})});let i=n.collection;this._options=(r=i==null?void 0:i.items)!=null?r:[]}get options(){return Array.isArray(this._options)?this._options:[]}setOptions(t){this._options=Array.isArray(t)?t:[]}getCollection(){let t=this.options;return this.hasGroups?Bi({items:t,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled,groupBy:n=>{var i;return(i=n.group)!=null?i:""}}):Bi({items:t,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled})}initMachine(t){let n=this.getCollection.bind(this),i=t.collection;return new W(GS,y(g({},t),{get collection(){return i!=null?i:n()}}))}initApi(){return $S(this.machine.service,q)}applyItemProps(){let t=this.el.querySelector('[data-scope="listbox"][data-part="content"]');t&&(t.querySelectorAll('[data-scope="listbox"][data-part="item-group"]').forEach(n=>{var s;let i=(s=n.dataset.id)!=null?s:"";this.spreadProps(n,this.api.getItemGroupProps({id:i}));let r=n.querySelector('[data-scope="listbox"][data-part="item-group-label"]');r&&this.spreadProps(r,this.api.getItemGroupLabelProps({htmlFor:i}))}),t.querySelectorAll('[data-scope="listbox"][data-part="item"]').forEach(n=>{var o;let i=(o=n.dataset.value)!=null?o:"",r=this.options.find(l=>{var c,u;return String((u=(c=l.id)!=null?c:l.value)!=null?u:"")===String(i)});if(!r)return;this.spreadProps(n,this.api.getItemProps({item:r}));let s=n.querySelector('[data-scope="listbox"][data-part="item-text"]');s&&this.spreadProps(s,this.api.getItemTextProps({item:r}));let a=n.querySelector('[data-scope="listbox"][data-part="item-indicator"]');a&&this.spreadProps(a,this.api.getItemIndicatorProps({item:r}))}))}render(){var a;let t=(a=this.el.querySelector('[data-scope="listbox"][data-part="root"]'))!=null?a:this.el;this.spreadProps(t,this.api.getRootProps());let n=this.el.querySelector('[data-scope="listbox"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps());let i=this.el.querySelector('[data-scope="listbox"][data-part="value-text"]');i&&this.spreadProps(i,this.api.getValueTextProps());let r=this.el.querySelector('[data-scope="listbox"][data-part="input"]');r&&this.spreadProps(r,this.api.getInputProps());let s=this.el.querySelector('[data-scope="listbox"][data-part="content"]');s&&(this.spreadProps(s,this.api.getContentProps()),this.applyItemProps())}};jS={mounted(){var o;let e=this.el,t=JSON.parse((o=e.dataset.collection)!=null?o:"[]"),n=t.some(l=>l.group!==void 0),i=Q(e,"value"),r=Q(e,"defaultValue"),s=C(e,"controlled"),a=new YS(e,y(g({id:e.id,collection:Rg(t,n)},s&&i?{value:i}:{defaultValue:r!=null?r:[]}),{disabled:C(e,"disabled"),dir:w(e,"dir",["ltr","rtl"]),orientation:w(e,"orientation",["horizontal","vertical"]),loopFocus:C(e,"loopFocus"),selectionMode:w(e,"selectionMode",["single","multiple","extended"]),selectOnHighlight:C(e,"selectOnHighlight"),deselectable:C(e,"deselectable"),typeahead:C(e,"typeahead"),onValueChange:l=>{let c=w(e,"onValueChange");c&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(c,{value:l.value,items:l.items,id:e.id});let u=w(e,"onValueChangeClient");u&&e.dispatchEvent(new CustomEvent(u,{bubbles:!0,detail:{value:l,id:e.id}}))}}));a.hasGroups=n,a.setOptions(t),a.init(),this.listbox=a,this.handlers=[]},updated(){var r;let e=JSON.parse((r=this.el.dataset.collection)!=null?r:"[]"),t=e.some(s=>s.group!==void 0),n=Q(this.el,"value"),i=C(this.el,"controlled");this.listbox&&(this.listbox.hasGroups=t,this.listbox.setOptions(e),this.listbox.updateProps(y(g({collection:Rg(e,t),id:this.el.id},i&&n?{value:n}:{}),{disabled:C(this.el,"disabled"),dir:w(this.el,"dir",["ltr","rtl"]),orientation:w(this.el,"orientation",["horizontal","vertical"])})))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.listbox)==null||e.destroy()}}});var Ug={};he(Ug,{Menu:()=>mT});function sT(e,t){if(!e)return;let n=ue(e),i=new n.CustomEvent(Vl,{detail:{value:t}});e.dispatchEvent(i)}function aT(e,t){let{context:n,send:i,state:r,computed:s,prop:a,scope:o}=e,l=r.hasTag("open"),c=n.get("isSubmenu"),u=s("isTypingAhead"),h=a("composite"),m=n.get("currentPlacement"),d=n.get("anchorPoint"),p=n.get("highlightedValue"),v=On(y(g({},a("positioning")),{placement:d?"bottom":m}));function I(f){return{id:Rr(o,f.value),disabled:!!f.disabled,highlighted:p===f.value}}function T(f){var P;let S=(P=f.valueText)!=null?P:f.value;return y(g({},f),{id:f.value,valueText:S})}function O(f){let S=I(T(f));return y(g({},S),{checked:!!f.checked})}function b(f){let{closeOnSelect:S,valueText:P,value:V}=f,A=I(f),x=Rr(o,V);return t.element(y(g({},Be.item.attrs),{id:x,role:"menuitem","aria-disabled":X(A.disabled),"data-disabled":E(A.disabled),"data-ownedby":Gi(o),"data-highlighted":E(A.highlighted),"data-value":V,"data-valuetext":P,onDragStart(k){k.currentTarget.matches("a[href]")&&k.preventDefault()},onPointerMove(k){if(A.disabled||k.pointerType!=="mouse")return;let N=k.currentTarget;if(A.highlighted)return;let D=je(k);i({type:"ITEM_POINTERMOVE",id:x,target:N,closeOnSelect:S,point:D})},onPointerLeave(k){var $;if(A.disabled||k.pointerType!=="mouse"||!(($=e.event.previous())==null?void 0:$.type.includes("POINTER")))return;let D=k.currentTarget;i({type:"ITEM_POINTERLEAVE",id:x,target:D,closeOnSelect:S})},onPointerDown(k){if(A.disabled)return;let N=k.currentTarget;i({type:"ITEM_POINTERDOWN",target:N,id:x,closeOnSelect:S})},onClick(k){if(rr(k)||Fn(k)||A.disabled)return;let N=k.currentTarget;i({type:"ITEM_CLICK",target:N,id:x,closeOnSelect:S})}}))}return{highlightedValue:p,open:l,setOpen(f){r.hasTag("open")!==f&&i({type:f?"OPEN":"CLOSE"})},setHighlightedValue(f){i({type:"HIGHLIGHTED.SET",value:f})},setParent(f){i({type:"PARENT.SET",value:f,id:f.prop("id")})},setChild(f){i({type:"CHILD.SET",value:f,id:f.prop("id")})},reposition(f={}){i({type:"POSITIONING.SET",options:f})},addItemListener(f){let S=o.getById(f.id);if(!S)return;let P=()=>{var V;return(V=f.onSelect)==null?void 0:V.call(f)};return S.addEventListener(Vl,P),()=>S.removeEventListener(Vl,P)},getContextTriggerProps(){return t.element(y(g({},Be.contextTrigger.attrs),{dir:a("dir"),id:_g(o),"data-state":l?"open":"closed",onPointerDown(f){if(f.pointerType==="mouse")return;let S=je(f);i({type:"CONTEXT_MENU_START",point:S})},onPointerCancel(f){f.pointerType!=="mouse"&&i({type:"CONTEXT_MENU_CANCEL"})},onPointerMove(f){f.pointerType!=="mouse"&&i({type:"CONTEXT_MENU_CANCEL"})},onPointerUp(f){f.pointerType!=="mouse"&&i({type:"CONTEXT_MENU_CANCEL"})},onContextMenu(f){let S=je(f);i({type:"CONTEXT_MENU",point:S}),f.preventDefault()},style:{WebkitTouchCallout:"none",WebkitUserSelect:"none",userSelect:"none"}}))},getTriggerItemProps(f){let S=f.getTriggerProps();return au(b({value:S.id}),S)},getTriggerProps(){return t.button(y(g({},c?Be.triggerItem.attrs:Be.trigger.attrs),{"data-placement":n.get("currentPlacement"),type:"button",dir:a("dir"),id:va(o),"data-uid":a("id"),"aria-haspopup":h?"menu":"dialog","aria-controls":Gi(o),"data-controls":Gi(o),"aria-expanded":l||void 0,"data-state":l?"open":"closed",onPointerMove(f){if(f.pointerType!=="mouse"||ma(f.currentTarget)||!c)return;let P=je(f);i({type:"TRIGGER_POINTERMOVE",target:f.currentTarget,point:P})},onPointerLeave(f){if(ma(f.currentTarget)||f.pointerType!=="mouse"||!c)return;let S=je(f);i({type:"TRIGGER_POINTERLEAVE",target:f.currentTarget,point:S})},onPointerDown(f){ma(f.currentTarget)||hi(f)||f.preventDefault()},onClick(f){f.defaultPrevented||ma(f.currentTarget)||i({type:"TRIGGER_CLICK",target:f.currentTarget})},onBlur(){i({type:"TRIGGER_BLUR"})},onFocus(){i({type:"TRIGGER_FOCUS"})},onKeyDown(f){if(f.defaultPrevented)return;let S={ArrowDown(){i({type:"ARROW_DOWN"})},ArrowUp(){i({type:"ARROW_UP"})},Enter(){i({type:"ARROW_DOWN",src:"enter"})},Space(){i({type:"ARROW_DOWN",src:"space"})}},P=ge(f,{orientation:"vertical",dir:a("dir")}),V=S[P];V&&(f.preventDefault(),V(f))}}))},getIndicatorProps(){return t.element(y(g({},Be.indicator.attrs),{dir:a("dir"),"data-state":l?"open":"closed"}))},getPositionerProps(){return t.element(y(g({},Be.positioner.attrs),{dir:a("dir"),id:Gg(o),style:v.floating}))},getArrowProps(){return t.element(y(g({id:ZS(o)},Be.arrow.attrs),{dir:a("dir"),style:v.arrow}))},getArrowTipProps(){return t.element(y(g({},Be.arrowTip.attrs),{dir:a("dir"),style:v.arrowTip}))},getContentProps(){return t.element(y(g({},Be.content.attrs),{id:Gi(o),"aria-label":a("aria-label"),hidden:!l,"data-state":l?"open":"closed",role:h?"menu":"dialog",tabIndex:0,dir:a("dir"),"aria-activedescendant":s("highlightedId")||void 0,"aria-labelledby":va(o),"data-placement":m,onPointerEnter(f){f.pointerType==="mouse"&&i({type:"MENU_POINTERENTER"})},onKeyDown(f){if(f.defaultPrevented||!ce(f.currentTarget,j(f)))return;let S=j(f);if(!((S==null?void 0:S.closest("[role=menu]"))===f.currentTarget||S===f.currentTarget))return;if(f.key==="Tab"&&!ds(f)){f.preventDefault();return}let V={ArrowDown(){i({type:"ARROW_DOWN"})},ArrowUp(){i({type:"ARROW_UP"})},ArrowLeft(){i({type:"ARROW_LEFT"})},ArrowRight(){i({type:"ARROW_RIGHT"})},Enter(){i({type:"ENTER"})},Space(k){var N;u?i({type:"TYPEAHEAD",key:k.key}):(N=V.Enter)==null||N.call(V,k)},Home(){i({type:"HOME"})},End(){i({type:"END"})}},A=ge(f,{dir:a("dir")}),x=V[A];if(x){x(f),f.stopPropagation(),f.preventDefault();return}a("typeahead")&&wc(f)&&(xe(f)||Ot(S)||(i({type:"TYPEAHEAD",key:f.key}),f.preventDefault()))}}))},getSeparatorProps(){return t.element(y(g({},Be.separator.attrs),{role:"separator",dir:a("dir"),"aria-orientation":"horizontal"}))},getItemState:I,getItemProps:b,getOptionItemState:O,getOptionItemProps(f){let{type:S,disabled:P,closeOnSelect:V}=f,A=T(f),x=O(f);return g(g({},b(A)),t.element(y(g({"data-type":S},Be.item.attrs),{dir:a("dir"),"data-value":A.value,role:`menuitem${S}`,"aria-checked":!!x.checked,"data-state":x.checked?"checked":"unchecked",onClick(k){if(P||rr(k)||Fn(k))return;let N=k.currentTarget;i({type:"ITEM_CLICK",target:N,option:A,closeOnSelect:V})}})))},getItemIndicatorProps(f){let S=O(lo(f)),P=S.checked?"checked":"unchecked";return t.element(y(g({},Be.itemIndicator.attrs),{dir:a("dir"),"data-disabled":E(S.disabled),"data-highlighted":E(S.highlighted),"data-state":$e(f,"checked")?P:void 0,hidden:$e(f,"checked")?!S.checked:void 0}))},getItemTextProps(f){let S=O(lo(f)),P=S.checked?"checked":"unchecked";return t.element(y(g({},Be.itemText.attrs),{dir:a("dir"),"data-disabled":E(S.disabled),"data-highlighted":E(S.highlighted),"data-state":$e(f,"checked")?P:void 0}))},getItemGroupLabelProps(f){return t.element(y(g({},Be.itemGroupLabel.attrs),{id:Mg(o,f.htmlFor),dir:a("dir")}))},getItemGroupProps(f){return t.element(y(g({id:JS(o,f.id)},Be.itemGroup.attrs),{dir:a("dir"),"aria-labelledby":Mg(o,f.id),role:"group"}))}}}function Hg(e){let t=e.parent;for(;t&&t.context.get("isSubmenu");)t=t.refs.get("parent");t==null||t.send({type:"CLOSE"})}function cT(e,t){return e?fo(e,t):!1}function uT(e,t,n){let i=Object.keys(e).length>0;if(!t)return null;if(!i)return Rr(n,t);for(let r in e){let s=e[r],a=va(s.scope);if(a===t)return a}return Rr(n,t)}var XS,Be,va,_g,Gi,ZS,Gg,JS,Rr,ei,Mg,cn,Fg,fa,QS,wl,Dr,eT,tT,xl,nT,iT,rT,ma,$g,Vl,pt,_i,oT,lT,dT,cA,hT,uA,gT,dA,pT,hA,fT,gA,Bg,mT,qg=re(()=>{"use strict";Cs();Pr();Wn();tn();se();XS=U("menu").parts("arrow","arrowTip","content","contextTrigger","indicator","item","itemGroup","itemGroupLabel","itemIndicator","itemText","positioner","separator","trigger","triggerItem"),Be=XS.build(),va=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`menu:${e.id}:trigger`},_g=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.contextTrigger)!=null?n:`menu:${e.id}:ctx-trigger`},Gi=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`menu:${e.id}:content`},ZS=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`menu:${e.id}:arrow`},Gg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`menu:${e.id}:popper`},JS=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.group)==null?void 0:i.call(n,t))!=null?r:`menu:${e.id}:group:${t}`},Rr=(e,t)=>`${e.id}/${t}`,ei=e=>{var t;return(t=e==null?void 0:e.dataset.value)!=null?t:null},Mg=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.groupLabel)==null?void 0:i.call(n,t))!=null?r:`menu:${e.id}:group-label:${t}`},cn=e=>e.getById(Gi(e)),Fg=e=>e.getById(Gg(e)),fa=e=>e.getById(va(e)),QS=(e,t)=>t?e.getById(Rr(e,t)):null,wl=e=>e.getById(_g(e)),Dr=e=>{let n=`[role^="menuitem"][data-ownedby=${CSS.escape(Gi(e))}]:not([data-disabled])`;return Fe(cn(e),n)},eT=e=>lt(Dr(e)),tT=e=>mt(Dr(e)),xl=(e,t)=>t?e.id===t||e.dataset.value===t:!1,nT=(e,t)=>{var r;let n=Dr(e),i=n.findIndex(s=>xl(s,t.value));return _c(n,i,{loop:(r=t.loop)!=null?r:t.loopFocus})},iT=(e,t)=>{var r;let n=Dr(e),i=n.findIndex(s=>xl(s,t.value));return Gc(n,i,{loop:(r=t.loop)!=null?r:t.loopFocus})},rT=(e,t)=>{var r;let n=Dr(e),i=n.find(s=>xl(s,t.value));return Ue(n,{state:t.typeaheadState,key:t.key,activeId:(r=i==null?void 0:i.id)!=null?r:null})},ma=e=>le(e)&&(e.dataset.disabled===""||e.hasAttribute("disabled")),$g=e=>{var t;return!!((t=e==null?void 0:e.getAttribute("role"))!=null&&t.startsWith("menuitem"))&&!!(e!=null&&e.hasAttribute("data-controls"))},Vl="menu:select";({not:pt,and:_i,or:oT}=Ee()),lT={props({props:e}){return y(g({closeOnSelect:!0,typeahead:!0,composite:!0,loopFocus:!1,navigate(t){mi(t.node)}},e),{positioning:g({placement:"bottom-start",gutter:8},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"idle"},context({bindable:e,prop:t}){return{suspendPointer:e(()=>({defaultValue:!1})),highlightedValue:e(()=>({defaultValue:t("defaultHighlightedValue")||null,value:t("highlightedValue"),onChange(n){var i;(i=t("onHighlightChange"))==null||i({highlightedValue:n})}})),lastHighlightedValue:e(()=>({defaultValue:null})),currentPlacement:e(()=>({defaultValue:void 0})),intentPolygon:e(()=>({defaultValue:null})),anchorPoint:e(()=>({defaultValue:null,hash(n){return`x: ${n==null?void 0:n.x}, y: ${n==null?void 0:n.y}`}})),isSubmenu:e(()=>({defaultValue:!1}))}},refs(){return{parent:null,children:{},typeaheadState:g({},Ue.defaultOptions),positioningOverride:{}}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isTypingAhead:({refs:e})=>e.get("typeaheadState").keysSoFar!=="",highlightedId:({context:e,scope:t,refs:n})=>uT(n.get("children"),e.get("highlightedValue"),t)},watch({track:e,action:t,context:n,prop:i}){e([()=>n.get("isSubmenu")],()=>{t(["setSubmenuPlacement"])}),e([()=>n.hash("anchorPoint")],()=>{n.get("anchorPoint")&&t(["reposition"])}),e([()=>i("open")],()=>{t(["toggleVisibility"])})},on:{"PARENT.SET":{actions:["setParentMenu"]},"CHILD.SET":{actions:["setChildMenu"]},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],OPEN_AUTOFOCUS:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["highlightFirstItem","invokeOnOpen"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"HIGHLIGHTED.RESTORE":{actions:["restoreHighlightedItem"]},"HIGHLIGHTED.SET":{actions:["setHighlightedItem"]}},states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed"},CONTEXT_MENU_START:{target:"opening:contextmenu",actions:["setAnchorPoint"]},CONTEXT_MENU:[{guard:"isOpenControlled",actions:["setAnchorPoint","invokeOnOpen"]},{target:"open",actions:["setAnchorPoint","invokeOnOpen"]}],TRIGGER_CLICK:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TRIGGER_FOCUS:{guard:pt("isSubmenu"),target:"closed"},TRIGGER_POINTERMOVE:{guard:"isSubmenu",target:"opening"}}},"opening:contextmenu":{tags:["closed"],effects:["waitForLongPress"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed"},CONTEXT_MENU_CANCEL:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"LONG_PRESS.OPEN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}},opening:{tags:["closed"],effects:["waitForOpenDelay"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed"},BLUR:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TRIGGER_POINTERLEAVE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"DELAY.OPEN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}},closing:{tags:["open"],effects:["trackPointerMove","trackInteractOutside","waitForCloseDelay"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem"]},MENU_POINTERENTER:{target:"open",actions:["clearIntentPolygon"]},POINTER_MOVED_AWAY_FROM_SUBMENU:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem"]}],"DELAY.CLOSE":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem","invokeOnClose"]}]}},closed:{tags:["closed"],entry:["clearHighlightedItem","focusTrigger","resumePointer","clearAnchorPoint"],on:{"CONTROLLED.OPEN":[{guard:oT("isOpenAutoFocusEvent","isArrowDownEvent"),target:"open",actions:["highlightFirstItem"]},{guard:"isArrowUpEvent",target:"open",actions:["highlightLastItem"]},{target:"open"}],CONTEXT_MENU_START:{target:"opening:contextmenu",actions:["setAnchorPoint"]},CONTEXT_MENU:[{guard:"isOpenControlled",actions:["setAnchorPoint","invokeOnOpen"]},{target:"open",actions:["setAnchorPoint","invokeOnOpen"]}],TRIGGER_CLICK:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TRIGGER_POINTERMOVE:{guard:"isTriggerItem",target:"opening"},TRIGGER_BLUR:{target:"idle"},ARROW_DOWN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["highlightFirstItem","invokeOnOpen"]}],ARROW_UP:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["highlightLastItem","invokeOnOpen"]}]}},open:{tags:["open"],effects:["trackInteractOutside","trackPositioning","scrollToHighlightedItem"],entry:["focusMenu","resumePointer"],on:{"CONTROLLED.CLOSE":[{target:"closed",guard:"isArrowLeftEvent",actions:["focusParentMenu"]},{target:"closed"}],TRIGGER_CLICK:[{guard:_i(pt("isTriggerItem"),"isOpenControlled"),actions:["invokeOnClose"]},{guard:pt("isTriggerItem"),target:"closed",actions:["invokeOnClose"]}],CONTEXT_MENU:{actions:["setAnchorPoint","focusMenu"]},ARROW_UP:{actions:["highlightPrevItem","focusMenu"]},ARROW_DOWN:{actions:["highlightNextItem","focusMenu"]},ARROW_LEFT:[{guard:_i("isSubmenu","isOpenControlled"),actions:["invokeOnClose"]},{guard:"isSubmenu",target:"closed",actions:["focusParentMenu","invokeOnClose"]}],HOME:{actions:["highlightFirstItem","focusMenu"]},END:{actions:["highlightLastItem","focusMenu"]},ARROW_RIGHT:{guard:"isTriggerItemHighlighted",actions:["openSubmenu"]},ENTER:[{guard:"isTriggerItemHighlighted",actions:["openSubmenu"]},{actions:["clickHighlightedItem"]}],ITEM_POINTERMOVE:[{guard:pt("isPointerSuspended"),actions:["setHighlightedItem","focusMenu","closeSiblingMenus"]},{actions:["setLastHighlightedItem","closeSiblingMenus"]}],ITEM_POINTERLEAVE:{guard:_i(pt("isPointerSuspended"),pt("isTriggerItem")),actions:["clearHighlightedItem"]},ITEM_CLICK:[{guard:_i(pt("isTriggerItemHighlighted"),pt("isHighlightedItemEditable"),"closeOnSelect","isOpenControlled"),actions:["invokeOnSelect","setOptionState","closeRootMenu","invokeOnClose"]},{guard:_i(pt("isTriggerItemHighlighted"),pt("isHighlightedItemEditable"),"closeOnSelect"),target:"closed",actions:["invokeOnSelect","setOptionState","closeRootMenu","invokeOnClose"]},{guard:_i(pt("isTriggerItemHighlighted"),pt("isHighlightedItemEditable")),actions:["invokeOnSelect","setOptionState"]},{actions:["setHighlightedItem"]}],TRIGGER_POINTERMOVE:{guard:"isTriggerItem",actions:["setIntentPolygon"]},TRIGGER_POINTERLEAVE:{target:"closing",actions:["setIntentPolygon"]},ITEM_POINTERDOWN:{actions:["setHighlightedItem"]},TYPEAHEAD:{actions:["highlightMatchedItem"]},FOCUS_MENU:{actions:["focusMenu"]},"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{closeOnSelect:({prop:e,event:t})=>{var n;return!!((n=t==null?void 0:t.closeOnSelect)!=null?n:e("closeOnSelect"))},isTriggerItem:({event:e})=>$g(e.target),isTriggerItemHighlighted:({event:e,scope:t,computed:n})=>{var r;let i=(r=e.target)!=null?r:t.getById(n("highlightedId"));return!!(i!=null&&i.hasAttribute("data-controls"))},isSubmenu:({context:e})=>e.get("isSubmenu"),isPointerSuspended:({context:e})=>e.get("suspendPointer"),isHighlightedItemEditable:({scope:e,computed:t})=>Ot(e.getById(t("highlightedId"))),isOpenControlled:({prop:e})=>e("open")!==void 0,isArrowLeftEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="ARROW_LEFT"},isArrowUpEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="ARROW_UP"},isArrowDownEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="ARROW_DOWN"},isOpenAutoFocusEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="OPEN_AUTOFOCUS"}},effects:{waitForOpenDelay({send:e}){let t=setTimeout(()=>{e({type:"DELAY.OPEN"})},200);return()=>clearTimeout(t)},waitForCloseDelay({send:e}){let t=setTimeout(()=>{e({type:"DELAY.CLOSE"})},100);return()=>clearTimeout(t)},waitForLongPress({send:e}){let t=setTimeout(()=>{e({type:"LONG_PRESS.OPEN"})},700);return()=>clearTimeout(t)},trackPositioning({context:e,prop:t,scope:n,refs:i}){if(wl(n))return;let r=g(g({},t("positioning")),i.get("positioningOverride"));e.set("currentPlacement",r.placement);let s=()=>Fg(n);return It(fa(n),s,y(g({},r),{defer:!0,onComplete(a){e.set("currentPlacement",a.placement)}}))},trackInteractOutside({refs:e,scope:t,prop:n,context:i,send:r}){let s=()=>cn(t),a=!0;return Ft(s,{type:"menu",defer:!0,exclude:[fa(t)],onInteractOutside:n("onInteractOutside"),onRequestDismiss:n("onRequestDismiss"),onFocusOutside(o){var u;(u=n("onFocusOutside"))==null||u(o);let l=j(o.detail.originalEvent);if(ce(wl(t),l)){o.preventDefault();return}},onEscapeKeyDown(o){var l;(l=n("onEscapeKeyDown"))==null||l(o),i.get("isSubmenu")&&o.preventDefault(),Hg({parent:e.get("parent")})},onPointerDownOutside(o){var u;(u=n("onPointerDownOutside"))==null||u(o);let l=j(o.detail.originalEvent);if(ce(wl(t),l)&&o.detail.contextmenu){o.preventDefault();return}a=!o.detail.focusable},onDismiss(){r({type:"CLOSE",src:"interact-outside",restoreFocus:a})}})},trackPointerMove({context:e,scope:t,send:n,refs:i,flush:r}){let s=i.get("parent");r(()=>{s.context.set("suspendPointer",!0)});let a=t.getDoc();return ee(a,"pointermove",o=>{cT(e.get("intentPolygon"),{x:o.clientX,y:o.clientY})||(n({type:"POINTER_MOVED_AWAY_FROM_SUBMENU"}),s.context.set("suspendPointer",!1))})},scrollToHighlightedItem({event:e,scope:t,computed:n}){let i=()=>{if(e.current().type.startsWith("ITEM_POINTER"))return;let s=t.getById(n("highlightedId")),a=cn(t);Xt(s,{rootEl:a,block:"nearest"})};return H(()=>i()),ot(()=>cn(t),{defer:!0,attributes:["aria-activedescendant"],callback:i})}},actions:{setAnchorPoint({context:e,event:t}){e.set("anchorPoint",n=>fe(n,t.point)?n:t.point)},setSubmenuPlacement({context:e,computed:t,refs:n}){if(!e.get("isSubmenu"))return;let i=t("isRtl")?"left-start":"right-start";n.set("positioningOverride",{placement:i,gutter:0})},reposition({context:e,scope:t,prop:n,event:i,refs:r}){var c;let s=()=>Fg(t),a=e.get("anchorPoint"),o=a?()=>g({width:0,height:0},a):void 0,l=g(g({},n("positioning")),r.get("positioningOverride"));It(fa(t),s,y(g(y(g({},l),{defer:!0,getAnchorRect:o}),(c=i.options)!=null?c:{}),{listeners:!1,onComplete(u){e.set("currentPlacement",u.placement)}}))},setOptionState({event:e}){if(!e.option)return;let{checked:t,onCheckedChange:n,type:i}=e.option;i==="radio"?n==null||n(!0):i==="checkbox"&&(n==null||n(!t))},clickHighlightedItem({scope:e,computed:t,prop:n,context:i}){var a;let r=e.getById(t("highlightedId"));if(!r||r.dataset.disabled)return;let s=i.get("highlightedValue");st(r)?(a=n("navigate"))==null||a({value:s,node:r,href:r.href}):queueMicrotask(()=>r.click())},setIntentPolygon({context:e,scope:t,event:n}){let i=cn(t),r=e.get("currentPlacement");if(!i||!r)return;let s=i.getBoundingClientRect(),a=Su(s,r);if(!a)return;let l=Md(r)==="right"?-5:5;e.set("intentPolygon",[y(g({},n.point),{x:n.point.x+l}),...a])},clearIntentPolygon({context:e}){e.set("intentPolygon",null)},clearAnchorPoint({context:e}){e.set("anchorPoint",null)},resumePointer({refs:e,flush:t}){let n=e.get("parent");n&&t(()=>{n.context.set("suspendPointer",!1)})},setHighlightedItem({context:e,event:t}){let n=t.value||ei(t.target);e.set("highlightedValue",n)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},focusMenu({scope:e}){H(()=>{let t=cn(e),n=us({root:t,enabled:!ce(t,e.getActiveElement()),filter(i){var r;return!((r=i.role)!=null&&r.startsWith("menuitem"))}});n==null||n.focus({preventScroll:!0})})},highlightFirstItem({context:e,scope:t}){(cn(t)?queueMicrotask:H)(()=>{let i=eT(t);i&&e.set("highlightedValue",ei(i))})},highlightLastItem({context:e,scope:t}){(cn(t)?queueMicrotask:H)(()=>{let i=tT(t);i&&e.set("highlightedValue",ei(i))})},highlightNextItem({context:e,scope:t,event:n,prop:i}){let r=nT(t,{loop:n.loop,value:e.get("highlightedValue"),loopFocus:i("loopFocus")});e.set("highlightedValue",ei(r))},highlightPrevItem({context:e,scope:t,event:n,prop:i}){let r=iT(t,{loop:n.loop,value:e.get("highlightedValue"),loopFocus:i("loopFocus")});e.set("highlightedValue",ei(r))},invokeOnSelect({context:e,prop:t,scope:n}){var s;let i=e.get("highlightedValue");if(i==null)return;let r=QS(n,i);sT(r,i),(s=t("onSelect"))==null||s({value:i})},focusTrigger({scope:e,context:t,event:n}){t.get("isSubmenu")||t.get("anchorPoint")||n.restoreFocus===!1||queueMicrotask(()=>{var i;return(i=fa(e))==null?void 0:i.focus({preventScroll:!0})})},highlightMatchedItem({scope:e,context:t,event:n,refs:i}){let r=rT(e,{key:n.key,value:t.get("highlightedValue"),typeaheadState:i.get("typeaheadState")});r&&t.set("highlightedValue",ei(r))},setParentMenu({refs:e,event:t,context:n}){e.set("parent",t.value),n.set("isSubmenu",!0)},setChildMenu({refs:e,event:t}){let n=e.get("children");n[t.id]=t.value,e.set("children",n)},closeSiblingMenus({refs:e,event:t,scope:n}){var a;let i=t.target;if(!$g(i))return;let r=i==null?void 0:i.getAttribute("data-uid"),s=e.get("children");for(let o in s){if(o===r)continue;let l=s[o],c=l.context.get("intentPolygon");c&&t.point&&fo(c,t.point)||((a=cn(n))==null||a.focus({preventScroll:!0}),l.send({type:"CLOSE"}))}},closeRootMenu({refs:e}){Hg({parent:e.get("parent")})},openSubmenu({refs:e,scope:t,computed:n}){let i=t.getById(n("highlightedId")),r=i==null?void 0:i.getAttribute("data-uid"),s=e.get("children"),a=r?s[r]:null;a==null||a.send({type:"OPEN_AUTOFOCUS"})},focusParentMenu({refs:e}){var t;(t=e.get("parent"))==null||t.send({type:"FOCUS_MENU"})},setLastHighlightedItem({context:e,event:t}){e.set("lastHighlightedValue",ei(t.target))},restoreHighlightedItem({context:e}){e.get("lastHighlightedValue")&&(e.set("highlightedValue",e.get("lastHighlightedValue")),e.set("lastHighlightedValue",null))},restoreParentHighlightedItem({refs:e}){var t;(t=e.get("parent"))==null||t.send({type:"HIGHLIGHTED.RESTORE"})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},toggleVisibility({prop:e,event:t,send:n}){n({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:t})}}}};dT=_()(["anchorPoint","aria-label","closeOnSelect","composite","defaultHighlightedValue","defaultOpen","dir","getRootNode","highlightedValue","id","ids","loopFocus","navigate","onEscapeKeyDown","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","onSelect","open","positioning","typeahead"]),cA=B(dT),hT=_()(["closeOnSelect","disabled","value","valueText"]),uA=B(hT),gT=_()(["htmlFor"]),dA=B(gT),pT=_()(["id"]),hA=B(pT),fT=_()(["checked","closeOnSelect","disabled","onCheckedChange","type","value","valueText"]),gA=B(fT),Bg=class extends K{constructor(){super(...arguments);z(this,"children",[])}initMachine(t){return new W(lT,t)}initApi(){return aT(this.machine.service,q)}setChild(t){this.api.setChild(t.machine.service),this.children.includes(t)||this.children.push(t)}setParent(t){this.api.setParent(t.machine.service)}isOwnElement(t){return t.closest('[phx-hook="Menu"]')===this.el}renderSubmenuTriggers(){let t=this.el.querySelector('[data-scope="menu"][data-part="content"]');if(!t)return;let n=t.querySelectorAll('[data-scope="menu"][data-nested-menu]');for(let i of n){if(!this.isOwnElement(i))continue;let r=i.dataset.nestedMenu;if(!r)continue;let s=this.children.find(o=>o.el.id===`menu:${r}`);if(!s)continue;let a=()=>{let o=this.api.getTriggerItemProps(s.api);this.spreadProps(i,o)};a(),this.machine.subscribe(a),s.machine.subscribe(a)}}render(){let t=this.el.querySelector('[data-scope="menu"][data-part="trigger"]');t&&this.spreadProps(t,this.api.getTriggerProps());let n=this.el.querySelector('[data-scope="menu"][data-part="positioner"]'),i=this.el.querySelector('[data-scope="menu"][data-part="content"]');if(n&&i){this.spreadProps(n,this.api.getPositionerProps()),this.spreadProps(i,this.api.getContentProps()),i.style.pointerEvents="auto",n.hidden=!this.api.open;let s=!this.el.querySelector('[data-scope="menu"][data-part="trigger"]');(this.api.open||s)&&(i.querySelectorAll('[data-scope="menu"][data-part="item"]').forEach(u=>{if(!this.isOwnElement(u))return;let h=u.dataset.value;if(h){let m=u.hasAttribute("data-disabled");this.spreadProps(u,this.api.getItemProps({value:h,disabled:m||void 0}))}}),i.querySelectorAll('[data-scope="menu"][data-part="item-group"]').forEach(u=>{if(!this.isOwnElement(u))return;let h=u.id;h&&this.spreadProps(u,this.api.getItemGroupProps({id:h}))}),i.querySelectorAll('[data-scope="menu"][data-part="separator"]').forEach(u=>{this.isOwnElement(u)&&this.spreadProps(u,this.api.getSeparatorProps())}))}let r=this.el.querySelector('[data-scope="menu"][data-part="indicator"]');r&&this.spreadProps(r,this.api.getIndicatorProps())}},mT={mounted(){let e=this.el;if(e.hasAttribute("data-nested"))return;let t=this.pushEvent.bind(this),n=()=>{var a;return(a=this.liveSocket)==null?void 0:a.main},i=new Bg(e,y(g({id:e.id.replace("menu:","")},C(e,"controlled")?{open:C(e,"open")}:{defaultOpen:C(e,"defaultOpen")}),{closeOnSelect:C(e,"closeOnSelect"),loopFocus:C(e,"loopFocus"),typeahead:C(e,"typeahead"),composite:C(e,"composite"),dir:w(e,"dir",["ltr","rtl"]),onSelect:a=>{var v,I,T;let o=C(e,"redirect"),l=[...e.querySelectorAll('[data-scope="menu"][data-part="item"]')].find(O=>O.getAttribute("data-value")===a.value),c=l==null?void 0:l.getAttribute("data-redirect"),u=l==null?void 0:l.hasAttribute("data-new-tab"),h=n();o&&a.value&&((v=h==null?void 0:h.isDead)!=null?v:!0)&&c!=="false"&&(u?window.open(a.value,"_blank","noopener,noreferrer"):window.location.href=a.value);let d=w(e,"onSelect");d&&h&&!h.isDead&&h.isConnected()&&t(d,{id:e.id,value:(I=a.value)!=null?I:null});let p=w(e,"onSelectClient");p&&e.dispatchEvent(new CustomEvent(p,{bubbles:!0,detail:{id:e.id,value:(T=a.value)!=null?T:null}}))},onOpenChange:a=>{var u,h;let o=n(),l=w(e,"onOpenChange");l&&o&&!o.isDead&&o.isConnected()&&t(l,{id:e.id,open:(u=a.open)!=null?u:!1});let c=w(e,"onOpenChangeClient");c&&e.dispatchEvent(new CustomEvent(c,{bubbles:!0,detail:{id:e.id,open:(h=a.open)!=null?h:!1}}))}}));i.init(),this.menu=i,this.nestedMenus=new Map;let r=e.querySelectorAll('[data-scope="menu"][data-nested="menu"]'),s=[];r.forEach((a,o)=>{var c;let l=a.id;if(l){let u=`${l}-${o}`,h=new Bg(a,{id:u,dir:w(a,"dir",["ltr","rtl"]),closeOnSelect:C(a,"closeOnSelect"),loopFocus:C(a,"loopFocus"),typeahead:C(a,"typeahead"),composite:C(a,"composite"),onSelect:m=>{var S,P,V;let d=C(e,"redirect"),p=[...e.querySelectorAll('[data-scope="menu"][data-part="item"]')].find(A=>A.getAttribute("data-value")===m.value),v=p==null?void 0:p.getAttribute("data-redirect"),I=p==null?void 0:p.hasAttribute("data-new-tab"),T=n();d&&m.value&&((S=T==null?void 0:T.isDead)!=null?S:!0)&&v!=="false"&&(I?window.open(m.value,"_blank","noopener,noreferrer"):window.location.href=m.value);let b=w(e,"onSelect");b&&T&&!T.isDead&&T.isConnected()&&t(b,{id:e.id,value:(P=m.value)!=null?P:null});let f=w(e,"onSelectClient");f&&e.dispatchEvent(new CustomEvent(f,{bubbles:!0,detail:{id:e.id,value:(V=m.value)!=null?V:null}}))}});h.init(),(c=this.nestedMenus)==null||c.set(l,h),s.push(h)}}),setTimeout(()=>{s.forEach(a=>{this.menu&&(this.menu.setChild(a),a.setParent(this.menu))}),this.menu&&this.menu.children.length>0&&this.menu.renderSubmenuTriggers()},0),this.onSetOpen=a=>{let{open:o}=a.detail;i.api.open!==o&&i.api.setOpen(o)},e.addEventListener("phx:menu:set-open",this.onSetOpen),this.handlers=[],this.handlers.push(this.handleEvent("menu_set_open",a=>{let o=a.menu_id;(!o||e.id===o||e.id===`menu:${o}`)&&i.api.setOpen(a.open)})),this.handlers.push(this.handleEvent("menu_open",()=>{this.pushEvent("menu_open_response",{open:i.api.open})}))},updated(){var e;this.el.hasAttribute("data-nested")||(e=this.menu)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlled")?{open:C(this.el,"open")}:{defaultOpen:C(this.el,"defaultOpen")}),{closeOnSelect:C(this.el,"closeOnSelect"),loopFocus:C(this.el,"loopFocus"),typeahead:C(this.el,"typeahead"),composite:C(this.el,"composite"),dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(!this.el.hasAttribute("data-nested")){if(this.onSetOpen&&this.el.removeEventListener("phx:menu:set-open",this.onSetOpen),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);if(this.nestedMenus)for(let[,t]of this.nestedMenus)t.destroy();(e=this.menu)==null||e.destroy()}}}});var rp={};he(rp,{NumberInput:()=>zT});function yT(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${n}`),t.style==="unit"&&!ya){var i;let{unit:a,unitDisplay:o="short"}=t;if(!a)throw new Error('unit option must be provided with style: "unit"');if(!(!((i=Jg[a])===null||i===void 0)&&i[o]))throw new Error(`Unsupported unit ${a} with unitDisplay = ${o}`);t=y(g({},t),{style:"decimal"})}let r=e+(t?Object.entries(t).sort((a,o)=>a[0]0||Object.is(n,0):t==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):i=n>0),i){let r=e.format(-n),s=e.format(n),a=r.replace(s,"").replace(/\u200e|\u061C/,"");return[...a].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),r.replace(s,"!!!").replace(a,"+").replace("!!!",s)}else return e.format(n)}}function kl(e,t,n){let i=Kg(e,t);if(!e.includes("-nu-")&&!i.isValidPartialNumber(n)){for(let r of IT)if(r!==i.options.numberingSystem){let s=Kg(e+(e.includes("-u-")?"-nu-":"-u-nu-")+r,t);if(s.isValidPartialNumber(n))return s}}return i}function Kg(e,t){let n=e+(t?Object.entries(t).sort((r,s)=>r[0]l.formatToParts(k));var m;let d=(m=(r=c.find(k=>k.type==="minusSign"))===null||r===void 0?void 0:r.value)!==null&&m!==void 0?m:"-",p=(s=u.find(k=>k.type==="plusSign"))===null||s===void 0?void 0:s.value;!p&&((i==null?void 0:i.signDisplay)==="exceptZero"||(i==null?void 0:i.signDisplay)==="always")&&(p="+");let I=(a=new Intl.NumberFormat(e,y(g({},n),{minimumFractionDigits:2,maximumFractionDigits:2})).formatToParts(.001).find(k=>k.type==="decimal"))===null||a===void 0?void 0:a.value,T=(o=c.find(k=>k.type==="group"))===null||o===void 0?void 0:o.value,O=c.filter(k=>!zg.has(k.type)).map(k=>Yg(k.value)),b=h.flatMap(k=>k.filter(N=>!zg.has(N.type)).map(N=>Yg(N.value))),f=[...new Set([...O,...b])].sort((k,N)=>N.length-k.length),S=f.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${f.join("|")}|[\\p{White_Space}]`,"gu"),P=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),V=new Map(P.map((k,N)=>[k,N])),A=new RegExp(`[${P.join("")}]`,"g");return{minusSign:d,plusSign:p,decimal:I,group:T,literals:S,numeral:A,index:k=>String(V.get(k))}}function Ui(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function Yg(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Dl(e,t){if(!(!e||!t.isActiveElement(e)))try{let{selectionStart:n,selectionEnd:i,value:r}=e;return n==null||i==null?void 0:{start:n,end:i,value:r}}catch(n){return}}function OT(e,t,n){if(!(!e||!n.isActiveElement(e))){if(!t){let i=e.value.length;e.setSelectionRange(i,i);return}try{let i=e.value,{start:r,end:s,value:a}=t;if(i===a){e.setSelectionRange(r,s);return}let o=jg(a,i,r),l=r===s?o:jg(a,i,s),c=Math.max(0,Math.min(o,i.length)),u=Math.max(c,Math.min(l,i.length));e.setSelectionRange(c,u)}catch(i){let r=e.value.length;e.setSelectionRange(r,r)}}}function jg(e,t,n){let i=e.slice(0,n),r=e.slice(n),s=0,a=Math.min(i.length,t.length);for(let c=0;c0&&s>=i.length)return s;if(o>=r.length)return t.length-o;if(s>0)return s;if(o>0)return t.length-o;if(n===0&&s===0&&o===0)return t.length;if(e.length>0){let c=n/e.length;return Math.round(c*t.length)}return t.length}function FT(e,t){let{state:n,send:i,prop:r,scope:s,computed:a}=e,o=n.hasTag("focus"),l=a("isDisabled"),c=!!r("readOnly"),u=!!r("required"),h=n.matches("scrubbing"),m=a("isValueEmpty"),d=a("isOutOfRange")||!!r("invalid"),p=l||!a("canIncrement")||c,v=l||!a("canDecrement")||c,I=r("translations");return{focused:o,invalid:d,empty:m,value:a("formattedValue"),valueAsNumber:a("valueAsNumber"),setValue(T){i({type:"VALUE.SET",value:T})},clearValue(){i({type:"VALUE.CLEAR"})},increment(){i({type:"VALUE.INCREMENT"})},decrement(){i({type:"VALUE.DECREMENT"})},setToMax(){i({type:"VALUE.SET",value:r("max")})},setToMin(){i({type:"VALUE.SET",value:r("min")})},focus(){var T;(T=ni(s))==null||T.focus()},getRootProps(){return t.element(y(g({id:wT(s)},Vn.root.attrs),{dir:r("dir"),"data-disabled":E(l),"data-focus":E(o),"data-invalid":E(d),"data-scrubbing":E(h)}))},getLabelProps(){return t.label(y(g({},Vn.label.attrs),{dir:r("dir"),"data-disabled":E(l),"data-focus":E(o),"data-invalid":E(d),"data-required":E(u),"data-scrubbing":E(h),id:xT(s),htmlFor:Lr(s),onClick(){H(()=>{tr(ni(s))})}}))},getControlProps(){return t.element(y(g({},Vn.control.attrs),{dir:r("dir"),role:"group","aria-disabled":l,"data-focus":E(o),"data-disabled":E(l),"data-invalid":E(d),"data-scrubbing":E(h),"aria-invalid":X(d)}))},getValueTextProps(){return t.element(y(g({},Vn.valueText.attrs),{dir:r("dir"),"data-disabled":E(l),"data-invalid":E(d),"data-focus":E(o),"data-scrubbing":E(h)}))},getInputProps(){return t.input(y(g({},Vn.input.attrs),{dir:r("dir"),name:r("name"),form:r("form"),id:Lr(s),role:"spinbutton",defaultValue:a("formattedValue"),pattern:r("formatOptions")?void 0:r("pattern"),inputMode:r("inputMode"),"aria-invalid":X(d),"data-invalid":E(d),disabled:l,"data-disabled":E(l),readOnly:c,required:r("required"),autoComplete:"off",autoCorrect:"off",spellCheck:"false",type:"text","aria-roledescription":"numberfield","aria-valuemin":r("min"),"aria-valuemax":r("max"),"aria-valuenow":Number.isNaN(a("valueAsNumber"))?void 0:a("valueAsNumber"),"aria-valuetext":a("valueText"),"data-scrubbing":E(h),onFocus(){i({type:"INPUT.FOCUS"})},onBlur(){i({type:"INPUT.BLUR"})},onInput(T){let O=Dl(T.currentTarget,s);i({type:"INPUT.CHANGE",target:T.currentTarget,hint:"set",selection:O})},onBeforeInput(T){var O;try{let{selectionStart:b,selectionEnd:f,value:S}=T.currentTarget,P=S.slice(0,b)+((O=T.data)!=null?O:"")+S.slice(f);a("parser").isValidPartialNumber(P)||T.preventDefault()}catch(b){}},onKeyDown(T){if(T.defaultPrevented||c||Re(T))return;let O=gi(T)*r("step"),f={ArrowUp(){i({type:"INPUT.ARROW_UP",step:O}),T.preventDefault()},ArrowDown(){i({type:"INPUT.ARROW_DOWN",step:O}),T.preventDefault()},Home(){xe(T)||(i({type:"INPUT.HOME"}),T.preventDefault())},End(){xe(T)||(i({type:"INPUT.END"}),T.preventDefault())},Enter(S){let P=Dl(S.currentTarget,s);i({type:"INPUT.ENTER",selection:P})}}[T.key];f==null||f(T)}}))},getDecrementTriggerProps(){return t.button(y(g({},Vn.decrementTrigger.attrs),{dir:r("dir"),id:tp(s),disabled:v,"data-disabled":E(v),"aria-label":I.decrementLabel,type:"button",tabIndex:-1,"aria-controls":Lr(s),"data-scrubbing":E(h),onPointerDown(T){var O;v||pe(T)&&(i({type:"TRIGGER.PRESS_DOWN",hint:"decrement",pointerType:T.pointerType}),T.pointerType==="mouse"&&T.preventDefault(),T.pointerType==="touch"&&((O=T.currentTarget)==null||O.focus({preventScroll:!0})))},onPointerUp(T){i({type:"TRIGGER.PRESS_UP",hint:"decrement",pointerType:T.pointerType})},onPointerLeave(){v||i({type:"TRIGGER.PRESS_UP",hint:"decrement"})}}))},getIncrementTriggerProps(){return t.button(y(g({},Vn.incrementTrigger.attrs),{dir:r("dir"),id:ep(s),disabled:p,"data-disabled":E(p),"aria-label":I.incrementLabel,type:"button",tabIndex:-1,"aria-controls":Lr(s),"data-scrubbing":E(h),onPointerDown(T){var O;p||!pe(T)||(i({type:"TRIGGER.PRESS_DOWN",hint:"increment",pointerType:T.pointerType}),T.pointerType==="mouse"&&T.preventDefault(),T.pointerType==="touch"&&((O=T.currentTarget)==null||O.focus({preventScroll:!0})))},onPointerUp(T){i({type:"TRIGGER.PRESS_UP",hint:"increment",pointerType:T.pointerType})},onPointerLeave(T){i({type:"TRIGGER.PRESS_UP",hint:"increment",pointerType:T.pointerType})}}))},getScrubberProps(){return t.element(y(g({},Vn.scrubber.attrs),{dir:r("dir"),"data-disabled":E(l),id:VT(s),role:"presentation","data-scrubbing":E(h),onMouseDown(T){if(l||!pe(T))return;let O=je(T),f=ue(T.currentTarget).devicePixelRatio;O.x=O.x-Ci(7.5,f),O.y=O.y-Ci(7.5,f),i({type:"SCRUBBER.PRESS_DOWN",point:O}),T.preventDefault(),H(()=>{tr(ni(s))})},style:{cursor:l?void 0:"ew-resize"}}))}}}var Al,Rl,ya,Jg,vT,ET,IT,Qg,Wg,PT,zg,CT,TT,Vn,wT,Lr,ep,tp,VT,np,xT,ni,AT,kT,ip,NT,RT,DT,LT,MT,$T,HT,Nl,ti,BT,_T,GT,UT,Xg,Zg,qT,WT,vA,KT,zT,sp=re(()=>{"use strict";se();Al=new Map,Rl=!1;try{Rl=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch(e){}ya=!1;try{ya=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch(e){}Jg={degree:{narrow:{default:"\xB0","ja-JP":" \u5EA6","zh-TW":"\u5EA6","sl-SI":" \xB0"}}},vT=class{format(e){let t="";if(!Rl&&this.options.signDisplay!=null?t=bT(this.numberFormatter,this.options.signDisplay,e):t=this.numberFormatter.format(e),this.options.style==="unit"&&!ya){var n;let{unit:i,unitDisplay:r="short",locale:s}=this.resolvedOptions();if(!i)return t;let a=(n=Jg[i])===null||n===void 0?void 0:n[r];t+=a[s]||a.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(e,t);if(t= start date");return`${this.format(e)} \u2013 ${this.format(t)}`}formatRangeToParts(e,t){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(e,t);if(t= start date");let n=this.numberFormatter.formatToParts(e),i=this.numberFormatter.formatToParts(t);return[...n.map(r=>y(g({},r),{source:"startRange"})),{type:"literal",value:" \u2013 ",source:"shared"},...i.map(r=>y(g({},r),{source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!Rl&&this.options.signDisplay!=null&&(e=y(g({},e),{signDisplay:this.options.signDisplay})),!ya&&this.options.style==="unit"&&(e=y(g({},e),{style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay})),e}constructor(e,t={}){this.numberFormatter=yT(e,t),this.options=t}};ET=new RegExp("^.*\\(.*\\).*$"),IT=["latn","arab","hanidec","deva","beng","fullwide"],Qg=class{parse(e){return kl(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,n){return kl(this.locale,this.options,e).isValidPartialNumber(e,t,n)}getNumberingSystem(e){return kl(this.locale,this.options,e).options.numberingSystem}constructor(e,t={}){this.locale=e,this.options=t}},Wg=new Map;PT=class{parse(e){let t=this.sanitize(e);if(this.symbols.group&&(t=Ui(t,this.symbols.group,"")),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(t=t.replace(this.symbols.minusSign,"-")),t=t.replace(this.symbols.numeral,this.symbols.index),this.options.style==="percent"){let s=t.indexOf("-");t=t.replace("-",""),t=t.replace("+","");let a=t.indexOf(".");a===-1&&(a=t.length),t=t.replace(".",""),a-2===0?t=`0.${t}`:a-2===-1?t=`0.0${t}`:a-2===-2?t="0.00":t=`${t.slice(0,a-2)}.${t.slice(a-2)}`,s>-1&&(t=`-${t}`)}let n=t?+t:NaN;if(isNaN(n))return NaN;if(this.options.style==="percent"){var i,r;let s=y(g({},this.options),{style:"decimal",minimumFractionDigits:Math.min(((i=this.options.minimumFractionDigits)!==null&&i!==void 0?i:0)+2,20),maximumFractionDigits:Math.min(((r=this.options.maximumFractionDigits)!==null&&r!==void 0?r:0)+2,20)});return new Qg(this.locale,s).parse(new vT(this.locale,s).format(n))}return this.options.currencySign==="accounting"&&ET.test(e)&&(n=-1*n),n}sanitize(e){return e=e.replace(this.symbols.literals,""),this.symbols.minusSign&&(e=e.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(e=e.replace(",",this.symbols.decimal),e=e.replace("\u060C",this.symbols.decimal)),this.symbols.group&&(e=Ui(e,".",this.symbols.group))),this.symbols.group==="\u2019"&&e.includes("'")&&(e=Ui(e,"'",this.symbols.group)),this.options.locale==="fr-FR"&&this.symbols.group&&(e=Ui(e," ",this.symbols.group),e=Ui(e,/\u00A0/g,this.symbols.group)),e}isValidPartialNumber(e,t=-1/0,n=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&n>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(e=Ui(e,this.symbols.group,"")),e=e.replace(this.symbols.numeral,""),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,"")),e.length===0)}constructor(e,t={}){this.locale=e,t.roundingIncrement!==1&&t.roundingIncrement!=null&&(t.maximumFractionDigits==null&&t.minimumFractionDigits==null?(t.maximumFractionDigits=0,t.minimumFractionDigits=0):t.maximumFractionDigits==null?t.maximumFractionDigits=t.minimumFractionDigits:t.minimumFractionDigits==null&&(t.minimumFractionDigits=t.maximumFractionDigits)),this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=ST(e,this.formatter,this.options,t);var n,i;this.options.style==="percent"&&(((n=this.options.minimumFractionDigits)!==null&&n!==void 0?n:0)>18||((i=this.options.maximumFractionDigits)!==null&&i!==void 0?i:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}},zg=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),CT=[0,4,2,1,11,20,3,7,100,21,.1,1.1];TT=U("numberInput").parts("root","label","input","control","valueText","incrementTrigger","decrementTrigger","scrubber"),Vn=TT.build();wT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`number-input:${e.id}`},Lr=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.input)!=null?n:`number-input:${e.id}:input`},ep=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.incrementTrigger)!=null?n:`number-input:${e.id}:inc`},tp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.decrementTrigger)!=null?n:`number-input:${e.id}:dec`},VT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.scrubber)!=null?n:`number-input:${e.id}:scrubber`},np=e=>`number-input:${e.id}:cursor`,xT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`number-input:${e.id}:label`},ni=e=>e.getById(Lr(e)),AT=e=>e.getById(ep(e)),kT=e=>e.getById(tp(e)),ip=e=>e.getDoc().getElementById(np(e)),NT=(e,t)=>{let n=null;return t==="increment"&&(n=AT(e)),t==="decrement"&&(n=kT(e)),n},RT=(e,t)=>{if(!Xe())return MT(e,t),()=>{var n;(n=ip(e))==null||n.remove()}},DT=e=>{let t=e.getDoc(),n=t.documentElement,i=t.body;return i.style.pointerEvents="none",n.style.userSelect="none",n.style.cursor="ew-resize",()=>{i.style.pointerEvents="",n.style.userSelect="",n.style.cursor="",n.style.length||n.removeAttribute("style"),i.style.length||i.removeAttribute("style")}},LT=(e,t)=>{let{point:n,isRtl:i,event:r}=t,s=e.getWin(),a=Ci(r.movementX,s.devicePixelRatio),o=Ci(r.movementY,s.devicePixelRatio),l=a>0?"increment":a<0?"decrement":null;i&&l==="increment"&&(l="decrement"),i&&l==="decrement"&&(l="increment");let c={x:n.x+a,y:n.y+o},u=s.innerWidth,h=Ci(7.5,s.devicePixelRatio);return c.x=Zc(c.x+h,u)-h,{hint:l,point:c}},MT=(e,t)=>{let n=e.getDoc(),i=n.createElement("div");i.className="scrubber--cursor",i.id=np(e),Object.assign(i.style,{width:"15px",height:"15px",position:"fixed",pointerEvents:"none",left:"0px",top:"0px",zIndex:ss,transform:t?`translate3d(${t.x}px, ${t.y}px, 0px)`:void 0,willChange:"transform"}),i.innerHTML=` +"use strict";var Corex=(()=>{var Kr=Object.defineProperty,Ff=Object.defineProperties,$f=Object.getOwnPropertyDescriptor,Hf=Object.getOwnPropertyDescriptors,Bf=Object.getOwnPropertyNames,Wr=Object.getOwnPropertySymbols;var Ha=Object.prototype.hasOwnProperty,rc=Object.prototype.propertyIsEnumerable;var Fa=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),_f=e=>{throw TypeError(e)};var $a=(e,t,n)=>t in e?Kr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g=(e,t)=>{for(var n in t||(t={}))Ha.call(t,n)&&$a(e,n,t[n]);if(Wr)for(var n of Wr(t))rc.call(t,n)&&$a(e,n,t[n]);return e},y=(e,t)=>Ff(e,Hf(t));var ft=(e,t)=>{var n={};for(var i in e)Ha.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&Wr)for(var i of Wr(e))t.indexOf(i)<0&&rc.call(e,i)&&(n[i]=e[i]);return n};var re=(e,t)=>()=>(e&&(t=e(e=0)),t);var he=(e,t)=>{for(var n in t)Kr(e,n,{get:t[n],enumerable:!0})},Gf=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Bf(t))!Ha.call(e,r)&&r!==n&&Kr(e,r,{get:()=>t[r],enumerable:!(i=$f(t,r))||i.enumerable});return e};var Uf=e=>Gf(Kr({},"__esModule",{value:!0}),e);var Y=(e,t,n)=>$a(e,typeof t!="symbol"?t+"":t,n);var Ve=(e,t,n)=>new Promise((i,r)=>{var s=l=>{try{o(n.next(l))}catch(c){r(c)}},a=l=>{try{o(n.throw(l))}catch(c){r(c)}},o=l=>l.done?i(l.value):Promise.resolve(l.value).then(s,a);o((n=n.apply(e,t)).next())}),qf=function(e,t){this[0]=e,this[1]=t};var sc=e=>{var t=e[Fa("asyncIterator")],n=!1,i,r={};return t==null?(t=e[Fa("iterator")](),i=s=>r[s]=a=>t[s](a)):(t=t.call(e),i=s=>r[s]=a=>{if(n){if(n=!1,s==="throw")throw a;return a}return n=!0,{done:!1,value:new qf(new Promise(o=>{var l=t[s](a);l instanceof Object||_f("Object expected"),o(l)}),1)}}),r[Fa("iterator")]=()=>r,i("next"),"throw"in t?i("throw"):r.throw=s=>{throw s},"return"in t&&i("return"),r};function Oe(e){let t=e.dataset.dir;if(t!==void 0&&Wf.includes(t))return t;let n=document.documentElement.getAttribute("dir");return n==="ltr"||n==="rtl"?n:"ltr"}function tr(e){if(e)try{if(e.ownerDocument.activeElement!==e)return;let t=e.value.length;e.setSelectionRange(t,t)}catch(t){}}function em(e){return["html","body","#document"].includes(bc(e))}function es(e){if(!e)return!1;let t=e.getRootNode();return ui(t)===e}function Ot(e){if(e==null||!le(e))return!1;try{return nm(e)&&e.selectionStart!=null||rm.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function ce(e,t){var i;if(!e||!t||!le(e)||!le(t))return!1;let n=(i=t.getRootNode)==null?void 0:i.call(t);if(e===t||e.contains(t))return!0;if(n&&Ln(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Le(e){var t;return nr(e)?e:Qf(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function sm(e){return Le(e).documentElement}function ue(e){var t,n,i;return Ln(e)?ue(e.host):nr(e)?(t=e.defaultView)!=null?t:window:le(e)&&(i=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?i:window}function ui(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){let n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function am(e){if(bc(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Ln(e)&&e.host||sm(e);return Ln(t)?t.host:t}function Ya(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),nr(t)||Ln(t))return t}catch(i){}return(n=e.ownerDocument)!=null?n:document}function at(e){return Ga.has(e)||Ga.set(e,ue(e).getComputedStyle(e)),Ga.get(e)}function as(e,t){let n=new Set,i=Ya(e),r=s=>{let a=s.querySelectorAll("[aria-controls]");for(let o of a){if(o.getAttribute("aria-expanded")!=="true")continue;let l=Ec(o);for(let c of l){if(!c||n.has(c))continue;n.add(c);let u=i.getElementById(c);if(u){let h=u.getAttribute("role"),m=u.getAttribute("aria-modal")==="true";if(h&&om(h)&&!m&&(u===t||u.contains(t)||r(u)))return!0}}}return!1};return r(e)}function Xa(e,t){let n=Ya(e),i=new Set,r=s=>{let a=s.querySelectorAll("[aria-controls]");for(let o of a){if(o.getAttribute("aria-expanded")!=="true")continue;let l=Ec(o);for(let c of l){if(!c||i.has(c))continue;i.add(c);let u=n.getElementById(c);if(u){let h=u.getAttribute("role"),m=u.getAttribute("aria-modal")==="true";h&&ja.has(h)&&!m&&(t(u),r(u))}}}};r(e)}function Ic(e){let t=new Set;return Xa(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function lm(e){let t=e.getAttribute("role");return!!(t&&ja.has(t))}function cm(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function Pc(e){var t;return cm(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function Cc(e){if(!e.id)return!1;let t=Ya(e),n=CSS.escape(e.id),i=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(i)&&lm(e))}function Sc(e,t){let{type:n,quality:i=.92,background:r}=t;if(!e)throw new Error("[zag-js > getDataUrl]: Could not find the svg element");let s=ue(e),a=s.document,o=e.getBoundingClientRect(),l=e.cloneNode(!0);l.hasAttribute("viewBox")||l.setAttribute("viewBox",`0 0 ${o.width} ${o.height}`);let u=`\r +`+new s.XMLSerializer().serializeToString(l),h="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(u);if(n==="image/svg+xml")return Promise.resolve(h).then(I=>(l.remove(),I));let m=s.devicePixelRatio||1,d=a.createElement("canvas"),p=new s.Image;p.src=h,d.width=o.width*m,d.height=o.height*m;let v=d.getContext("2d");return(n==="image/jpeg"||r)&&(v.fillStyle=r||"white",v.fillRect(0,0,d.width,d.height)),new Promise(I=>{p.onload=()=>{v==null||v.drawImage(p,0,0,d.width,d.height),I(d.toDataURL(n,i)),l.remove()}})}function um(){var t;let e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}function dm(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Oc(e){let{selectionStart:t,selectionEnd:n,value:i}=e.currentTarget,r=e.data;return i.slice(0,t)+(r!=null?r:"")+i.slice(n)}function vm(e){var t,n,i,r;return(r=(t=e.composedPath)==null?void 0:t.call(e))!=null?r:(i=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:i.call(n)}function j(e){var n;let t=vm(e);return(n=t==null?void 0:t[0])!=null?n:e.target}function Fn(e){let t=e.currentTarget;if(!t||!t.matches("a[href], button[type='submit'], input[type='submit']"))return!1;let i=e.button===1,r=ls(e);return i||r}function rr(e){let t=e.currentTarget;if(!t)return!1;let n=t.localName;return e.altKey?n==="a"||n==="button"&&t.type==="submit"||n==="input"&&t.type==="submit":!1}function Re(e){return Yt(e).isComposing||e.keyCode===229}function ls(e){return di()?e.metaKey:e.ctrlKey}function wc(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}function Vc(e){return e.pointerType===""&&e.isTrusted?!0:mm()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function ge(e,t={}){var a;let{dir:n="ltr",orientation:i="horizontal"}=t,r=e.key;return r=(a=bm[r])!=null?a:r,n==="rtl"&&i==="horizontal"&&r in oc&&(r=oc[r]),r}function Yt(e){var t;return(t=e.nativeEvent)!=null?t:e}function gi(e){return e.ctrlKey||e.metaKey?.1:Em.has(e.key)||e.shiftKey&&Im.has(e.key)?10:1}function je(e,t="client"){let n=ym(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}function xc(e,t){var s;let{type:n="HTMLInputElement",property:i="value"}=t,r=ue(e)[n].prototype;return(s=Object.getOwnPropertyDescriptor(r,i))!=null?s:{}}function Pm(e){if(e.localName==="input")return"HTMLInputElement";if(e.localName==="textarea")return"HTMLTextAreaElement";if(e.localName==="select")return"HTMLSelectElement"}function Me(e,t,n="value"){var r;if(!e)return;let i=Pm(e);i&&((r=xc(e,{type:i,property:n}).set)==null||r.call(e,t)),e.setAttribute(n,t)}function sr(e,t){var i;if(!e)return;(i=xc(e,{type:"HTMLInputElement",property:"checked"}).set)==null||i.call(e,t),t?e.setAttribute("checked",""):e.removeAttribute("checked")}function Ac(e,t){let{value:n,bubbles:i=!0}=t;if(!e)return;let r=ue(e);e instanceof r.HTMLInputElement&&(Me(e,`${n}`),e.dispatchEvent(new r.Event("input",{bubbles:i})))}function pi(e,t){let{checked:n,bubbles:i=!0}=t;if(!e)return;let r=ue(e);e instanceof r.HTMLInputElement&&(sr(e,n),e.dispatchEvent(new r.Event("click",{bubbles:i})))}function Cm(e){return Sm(e)?e.form:e.closest("form")}function Sm(e){return e.matches("textarea, input, select, button")}function Tm(e,t){if(!e)return;let n=Cm(e),i=r=>{r.defaultPrevented||t()};return n==null||n.addEventListener("reset",i,{passive:!0}),()=>n==null?void 0:n.removeEventListener("reset",i)}function Om(e,t){let n=e==null?void 0:e.closest("fieldset");if(!n)return;t(n.disabled);let i=ue(n),r=new i.MutationObserver(()=>t(n.disabled));return r.observe(n,{attributes:!0,attributeFilter:["disabled"]}),()=>r.disconnect()}function wt(e,t){if(!e)return;let{onFieldsetDisabledChange:n,onFormReset:i}=t,r=[Tm(e,i),Om(e,n)];return()=>r.forEach(s=>s==null?void 0:s())}function Nc(e){let t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}function Am(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;let n=t(e);return(n===!0?e.shadowRoot:n)||null}function Rc(e,t,n){let i=[...e],r=[...e],s=new Set,a=new Map;e.forEach((l,c)=>a.set(l,c));let o=0;for(;o{a.set(d,m+p)});for(let d=m+u.length;d{a.set(d,m+p)})}r.push(...u)}}return i}function Ye(e){return!le(e)||e.closest("[inert]")?!1:e.matches(cs)&&im(e)}function jt(e,t={}){if(!e)return[];let{includeContainer:n,getShadowRoot:i}=t,r=Array.from(e.querySelectorAll(cs));n&&dn(e)&&r.unshift(e);let s=[];for(let a of r)if(dn(a)){if(kc(a)&&a.contentDocument){let o=a.contentDocument.body;s.push(...jt(o,{getShadowRoot:i}));continue}s.push(a)}if(i){let a=Rc(s,i,dn);return!a.length&&n?r:a}return!s.length&&n?r:s}function dn(e){return le(e)&&e.tabIndex>0?!0:Ye(e)&&!xm(e)}function km(e,t={}){let n=jt(e,t),i=n[0]||null,r=n[n.length-1]||null;return[i,r]}function fi(e){return e.tabIndex<0&&(wm.test(e.localName)||Ot(e))&&!Vm(e)?0:e.tabIndex}function us(e){let{root:t,getInitialEl:n,filter:i,enabled:r=!0}=e;if(!r)return;let s=null;if(s||(s=typeof n=="function"?n():n),s||(s=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!s){let a=jt(t);s=i?a.filter(i)[0]:a[0]}return s||t||void 0}function ds(e){let t=e.currentTarget;if(!t)return!1;let[n,i]=km(t);return!(es(n)&&e.shiftKey||es(i)&&!e.shiftKey||!n&&!i)}function H(e){let t=eo.create();return t.request(e),t.cleanup}function $n(e){let t=new Set;function n(i){let r=globalThis.requestAnimationFrame(i);t.add(()=>globalThis.cancelAnimationFrame(r))}return n(()=>n(e)),function(){t.forEach(r=>r())}}function Nm(e,t,n){let i=H(()=>{e.removeEventListener(t,r,!0),n()}),r=()=>{i(),n()};return e.addEventListener(t,r,{once:!0,capture:!0}),i}function Rm(e,t){if(!e)return;let{attributes:n,callback:i}=t,r=e.ownerDocument.defaultView||window,s=new r.MutationObserver(a=>{for(let o of a)o.type==="attributes"&&o.attributeName&&n.includes(o.attributeName)&&i(o)});return s.observe(e,{attributes:!0,attributeFilter:n}),()=>s.disconnect()}function ot(e,t){let{defer:n}=t,i=n?H:s=>s(),r=[];return r.push(i(()=>{let s=typeof e=="function"?e():e;r.push(Rm(s,t))})),()=>{r.forEach(s=>s==null?void 0:s())}}function Dm(e,t){let{callback:n}=t;if(!e)return;let i=e.ownerDocument.defaultView||window,r=new i.MutationObserver(n);return r.observe(e,{childList:!0,subtree:!0}),()=>r.disconnect()}function hs(e,t){let{defer:n}=t,i=n?H:s=>s(),r=[];return r.push(i(()=>{let s=typeof e=="function"?e():e;r.push(Dm(s,t))})),()=>{r.forEach(s=>s==null?void 0:s())}}function mi(e){let t=()=>{let n=ue(e);e.dispatchEvent(new n.MouseEvent("click"))};fm()?Nm(e,"keyup",t):queueMicrotask(t)}function gs(e){let t=am(e);return em(t)?Le(t).body:le(t)&&Lc(t)?t:gs(t)}function Lc(e){let t=ue(e),{overflow:n,overflowX:i,overflowY:r,display:s}=t.getComputedStyle(e);return Lm.test(n+r+i)&&!Mm.has(s)}function Fm(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function Xt(e,t){let r=t||{},{rootEl:n}=r,i=ft(r,["rootEl"]);!e||!n||!Lc(n)||!Fm(n)||e.scrollIntoView(i)}function to(e,t){let{left:n,top:i,width:r,height:s}=t.getBoundingClientRect(),a={x:e.x-n,y:e.y-i},o={x:ac(a.x/r),y:ac(a.y/s)};function l(c={}){let{dir:u="ltr",orientation:h="horizontal",inverted:m}=c,d=typeof m=="object"?m.x:m,p=typeof m=="object"?m.y:m;return h==="horizontal"?u==="rtl"||d?1-o.x:o.x:p?1-o.y:o.y}return{offset:a,percent:o,getPercentValue:l}}function Mc(e,t){let n=e.body,i="pointerLockElement"in e||"mozPointerLockElement"in e,r=()=>!!e.pointerLockElement;function s(){t==null||t(r())}function a(l){r()&&(t==null||t(!1)),console.error("PointerLock error occurred:",l),e.exitPointerLock()}if(!i)return;try{n.requestPointerLock()}catch(l){}let o=[ee(e,"pointerlockchange",s,!1),ee(e,"pointerlockerror",a,!1)];return()=>{o.forEach(l=>l()),e.exitPointerLock()}}function $m(e={}){let{target:t,doc:n}=e,i=n!=null?n:document,r=i.documentElement;return ir()?(ci==="default"&&(qa=r.style.webkitUserSelect,r.style.webkitUserSelect="none"),ci="disabled"):t&&(Xr.set(t,t.style.userSelect),t.style.userSelect="none"),()=>no({target:t,doc:i})}function no(e={}){let{target:t,doc:n}=e,r=(n!=null?n:document).documentElement;if(ir()){if(ci!=="disabled")return;ci="restoring",setTimeout(()=>{$n(()=>{ci==="restoring"&&(r.style.webkitUserSelect==="none"&&(r.style.webkitUserSelect=qa||""),qa="",ci="default")})},300)}else if(t&&Xr.has(t)){let s=Xr.get(t);t.style.userSelect==="none"&&(t.style.userSelect=s!=null?s:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Xr.delete(t)}}function io(e={}){let a=e,{defer:t,target:n}=a,i=ft(a,["defer","target"]),r=t?H:o=>o(),s=[];return s.push(r(()=>{let o=typeof n=="function"?n():n;s.push($m(y(g({},i),{target:o})))})),()=>{s.forEach(o=>o==null?void 0:o())}}function hn(e,t){let{onPointerMove:n,onPointerUp:i}=t,r=o=>{let l=je(o),c=Math.sqrt(l.x**2+l.y**2),u=o.pointerType==="touch"?10:5;if(!(c{let l=je(o);i({point:l,event:o})},a=[ee(e,"pointermove",r,!1),ee(e,"pointerup",s,!1),ee(e,"pointercancel",s,!1),ee(e,"contextmenu",s,!1),io({doc:e})];return()=>{a.forEach(o=>o())}}function ps(e){let{pointerNode:t,keyboardNode:n=t,onPress:i,onPressStart:r,onPressEnd:s,isValidKey:a=O=>O.key==="Enter"}=e;if(!t)return qt;let o=ue(t),l=qt,c=qt,u=qt,h=O=>({point:je(O),event:O});function m(O){r==null||r(h(O))}function d(O){s==null||s(h(O))}let v=ee(t,"pointerdown",O=>{c();let f=ee(o,"pointerup",P=>{let V=j(P);ce(t,V)?i==null||i(h(P)):s==null||s(h(P))},{passive:!i,once:!0}),S=ee(o,"pointercancel",d,{passive:!s,once:!0});c=_a(f,S),es(n)&&O.pointerType==="mouse"&&O.preventDefault(),m(O)},{passive:!r}),I=ee(n,"focus",T);l=_a(v,I);function T(){let O=P=>{if(!a(P))return;let V=x=>{if(!a(x))return;let k=new o.PointerEvent("pointerup"),N=h(k);i==null||i(N),s==null||s(N)};c(),c=ee(n,"keyup",V);let A=new o.PointerEvent("pointerdown");m(A)},b=()=>{let P=new o.PointerEvent("pointercancel");d(P)},f=ee(n,"keydown",O),S=ee(n,"blur",b);u=_a(f,S)}return()=>{l(),c(),u()}}function Fe(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function vi(e,t){var n;return(n=e==null?void 0:e.querySelector(t))!=null?n:null}function so(e,t,n=ro){return e.find(i=>n(i)===t)}function ao(e,t,n=ro){let i=so(e,t,n);return i?e.indexOf(i):-1}function yi(e,t,n=!0){let i=ao(e,t);return i=n?(i+1)%e.length:Math.min(i+1,e.length-1),e[i]}function bi(e,t,n=!0){let i=ao(e,t);return i===-1?n?e[e.length-1]:null:(i=n?(i-1+e.length)%e.length:Math.max(0,i-1),e[i])}function Hm(e){let t=new WeakMap,n,i=new WeakMap,r=o=>n||(n=new o.ResizeObserver(l=>{for(let c of l){i.set(c.target,c);let u=t.get(c.target);if(u)for(let h of u)h(c)}}),n);return{observe:(o,l)=>{let c=t.get(o)||new Set;c.add(l),t.set(o,c);let u=ue(o);return r(u).observe(o,e),()=>{let h=t.get(o);h&&(h.delete(l),h.size===0&&(t.delete(o),r(u).unobserve(o)))}},unobserve:o=>{t.delete(o),n==null||n.unobserve(o)}}}function Um(e,t,n,i=ro){let r=n?ao(e,n,i):-1,s=n?jf(e,r):e;return t.length===1&&(s=s.filter(o=>i(o)!==n)),s.find(o=>Gm(_m(o),t))}function Fc(e,t,n){let i=e.getAttribute(t),r=i!=null;return i===n?qt:(e.setAttribute(t,n),()=>{r?e.setAttribute(t,i):e.removeAttribute(t)})}function Hn(e,t){if(!e)return qt;let n=Object.keys(t).reduce((i,r)=>(i[r]=e.style.getPropertyValue(r),i),{});return qm(n,t)?qt:(Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")})}function $c(e,t,n){if(!e)return qt;let i=e.style.getPropertyValue(t);return i===n?qt:(e.style.setProperty(t,n),()=>{e.style.setProperty(t,i),e.style.length===0&&e.removeAttribute("style")})}function qm(e,t){return Object.keys(e).every(n=>e[n]===t[n])}function Wm(e,t){let{state:n,activeId:i,key:r,timeout:s=350,itemToId:a}=t,o=n.keysSoFar+r,c=o.length>1&&Array.from(o).every(p=>p===o[0])?o[0]:o,u=e.slice(),h=Um(u,c,i,a);function m(){clearTimeout(n.timer),n.timer=-1}function d(p){n.keysSoFar=p,m(),p!==""&&(n.timer=+setTimeout(()=>{d(""),m()},s))}return d(o),h}function Km(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}function zm(e,t,n){let{signal:i}=t;return[new Promise((a,o)=>{let l=setTimeout(()=>{o(new Error(`Timeout of ${n}ms exceeded`))},n);i.addEventListener("abort",()=>{clearTimeout(l),o(new Error("Promise aborted"))}),e.then(c=>{i.aborted||(clearTimeout(l),a(c))}).catch(c=>{i.aborted||(clearTimeout(l),o(c))})}),()=>t.abort()]}function Hc(e,t){let{timeout:n,rootNode:i}=t,r=ue(i),s=Le(i),a=new r.AbortController;return zm(new Promise(o=>{let l=e();if(l){o(l);return}let c=new r.MutationObserver(()=>{let u=e();u&&u.isConnected&&(c.disconnect(),o(u))});c.observe(s.body,{childList:!0,subtree:!0})}),a,n)}function or(e){return e==null?[]:Array.isArray(e)?e:[e]}function Ei(e,t,n={}){let{step:i=1,loop:r=!0}=n,s=t+i,a=e.length,o=a-1;return t===-1?i>0?0:o:s<0?r?o:0:s>=a?r?0:t>a?a:t:s}function _c(e,t,n={}){return e[Ei(e,t,n)]}function lr(e,t,n={}){let{step:i=1,loop:r=!0}=n;return Ei(e,t,{step:-i,loop:r})}function Gc(e,t,n={}){return e[lr(e,t,n)]}function cr(e,t){return e.reduce((n,i,r)=>{var s;return r%t===0?n.push([i]):(s=mt(n))==null||s.push(i),n},[])}function oo(e,t){return e.reduce(([n,i],r)=>(t(r)?n.push(r):i.push(r),[n,i]),[[],[]])}function Ce(e,t,...n){var r;if(e in t){let s=t[e];return Wt(s)?s(...n):s}let i=new Error(`No matching key: ${JSON.stringify(e)} in ${JSON.stringify(Object.keys(t))}`);throw(r=Error.captureStackTrace)==null||r.call(Error,i,Ce),i}function Yc(e,t=0){let n=0,i=null;return(...r)=>{let s=Date.now(),a=s-n;a>=t?(i&&(clearTimeout(i),i=null),e(...r),n=s):i||(i=setTimeout(()=>{e(...r),n=Date.now(),i=null},t-a))}}function Si(e){if(!Qi(e)||e===void 0)return e;let t=Reflect.ownKeys(e).filter(i=>typeof i=="string"),n={};for(let i of t){let r=e[i];r!==void 0&&(n[i]=Si(r))}return n}function fn(e,t){let n={};for(let i of t){let r=e[i];r!==void 0&&(n[i]=r)}return n}function uv(e,t){let n={},i={},r=new Set(t),s=Reflect.ownKeys(e);for(let a of s)r.has(a)?i[a]=e[a]:n[a]=e[a];return[i,n]}function su(e,t){let n=new ru(({now:i,deltaMs:r})=>{if(r>=t){let s=t>0?i-r%t:i;n.setStartMs(s),e({startMs:s,deltaMs:r})}});return n.start(),()=>n.stop()}function mn(e,t){let n=new ru(({deltaMs:i})=>{if(i>=t)return e(),!1});return n.start(),()=>n.stop()}function zt(...e){let t=e.length===1?e[0]:e[1];(e.length===2?e[0]:!0)&&console.warn(t)}function vs(...e){let t=e.length===1?e[0]:e[1];if(e.length===2?e[0]:!0)throw new Error(t)}function vn(e,t){if(e==null)throw new Error(t())}function yn(e,t,n){let i=[];for(let r of t)e[r]==null&&i.push(r);if(i.length>0)throw new Error(`[zag-js${n?` > ${n}`:""}] missing required props: ${i.join(", ")}`)}function au(...e){let t={};for(let n of e){if(!n)continue;for(let r in t){if(r.startsWith("on")&&typeof t[r]=="function"&&typeof n[r]=="function"){t[r]=At(n[r],t[r]);continue}if(r==="className"||r==="class"){t[r]=dv(t[r],n[r]);continue}if(r==="style"){t[r]=gv(t[r],n[r]);continue}t[r]=n[r]!==void 0?n[r]:t[r]}for(let r in n)t[r]===void 0&&(t[r]=n[r]);let i=Object.getOwnPropertySymbols(n);for(let r of i)t[r]=n[r]}return t}function Bn(e,t,n){let i=[],r;return s=>{var l;let a=e(s);return(a.length!==i.length||a.some((c,u)=>!fe(i[u],c)))&&(i=a,r=t(a,s),(l=n==null?void 0:n.onChange)==null||l.call(n,r)),r}}function Ee(){return{and:(...e)=>function(n){return e.every(i=>n.guard(i))},or:(...e)=>function(n){return e.some(i=>n.guard(i))},not:e=>function(n){return!n.guard(e)}}}function ut(){return{guards:Ee(),createMachine:e=>e,choose:e=>function({choose:n}){var i;return(i=n(e))==null?void 0:i.actions}}}function pv(e){let t=()=>{var a,o;return(o=(a=e.getRootNode)==null?void 0:a.call(e))!=null?o:document},n=()=>Le(t()),i=()=>{var a;return(a=n().defaultView)!=null?a:window},r=()=>ui(t()),s=a=>t().getElementById(a);return y(g({},e),{getRootNode:t,getDoc:n,getWin:i,getActiveElement:r,isActiveElement:es,getById:s})}function fv(e){return new Proxy({},{get(t,n){return n==="style"?i=>e({style:i}).style:e}})}function bv(){if(typeof globalThis!="undefined")return globalThis;if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global}function ou(e,t){let n=bv();return n?(n[e]||(n[e]=t()),n[e]):t()}function ys(e={}){return Tv(e)}function ns(e,t,n){let i=Dn.get(e);ts()&&!i&&console.warn("Please use proxy object");let r,s=[],a=i[3],o=!1,c=a(u=>{if(s.push(u),n){t(s.splice(0));return}r||(r=Promise.resolve().then(()=>{r=void 0,o&&t(s.splice(0))}))});return o=!0,()=>{o=!1,c()}}function Ov(e){let t=Dn.get(e);ts()&&!t&&console.warn("Please use proxy object");let[n,i,r]=t;return r(n,i())}function Rv(e,t,n){let i=n||"default",r=Yr.get(e);r||(r=new Map,Yr.set(e,r));let s=r.get(i)||{},a=Object.keys(t),o=(v,I)=>{e.addEventListener(v.toLowerCase(),I)},l=(v,I)=>{e.removeEventListener(v.toLowerCase(),I)},c=v=>v.startsWith("on"),u=v=>!v.startsWith("on"),h=v=>o(v.substring(2),t[v]),m=v=>l(v.substring(2),t[v]),d=v=>{let I=t[v],T=s[v];if(I!==T){if(v==="class"){e.className=I!=null?I:"";return}if(yc.has(v)){e[v]=I!=null?I:"";return}if(typeof I=="boolean"&&!v.includes("aria-")){e.toggleAttribute(jr(e,v),I);return}if(v==="children"){e.innerHTML=I;return}if(I!=null){e.setAttribute(jr(e,v),I);return}e.removeAttribute(jr(e,v))}};for(let v in s)t[v]==null&&(v==="class"?e.className="":yc.has(v)?e[v]="":e.removeAttribute(jr(e,v)));return Object.keys(s).filter(c).forEach(v=>{l(v.substring(2),s[v])}),a.filter(c).forEach(h),a.filter(u).forEach(d),r.set(i,t),function(){a.filter(c).forEach(m);let I=Yr.get(e);I&&(I.delete(i),I.size===0&&Yr.delete(e))}}function is(e){var s,a;let t=(s=e().value)!=null?s:e().defaultValue;e().debug&&console.log(`[bindable > ${e().debug}] initial`,t);let n=(a=e().isEqual)!=null?a:Object.is,i=ys({value:t}),r=()=>e().value!==void 0;return{initial:t,ref:i,get(){return r()?e().value:i.value},set(o){var u,h;let l=i.value,c=Wt(o)?o(l):o;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:c,prev:l}),r()||(i.value=c),n(c,l)||(h=(u=e()).onChange)==null||h.call(u,c,l)},invoke(o,l){var c,u;(u=(c=e()).onChange)==null||u.call(c,o,l)},hash(o){var l,c,u;return(u=(c=(l=e()).hash)==null?void 0:c.call(l,o))!=null?u:String(o)}}}function Dv(e){let t={current:e};return{get(n){return t.current[n]},set(n,i){t.current[n]=i}}}function lu(e,t){if(!Qi(e)||!Qi(t))return t===void 0?e:t;let n=g({},e);for(let i of Object.keys(t)){let r=t[i],s=e[i];r!==void 0&&(Qi(s)&&Qi(r)?n[i]=lu(s,r):n[i]=r)}return n}var Wf,w,Z,z,C,Mn,U,li,Kf,zf,Yf,Ba,ac,jf,_a,qt,rs,ss,E,X,Xf,Zf,Jf,le,nr,Qf,bc,tm,Ln,nm,st,im,rm,Ga,ja,om,Ec,os,Za,Tc,hm,Ja,gm,pm,ir,Qa,di,Xe,fm,mm,pe,hi,xe,ym,bm,oc,Em,Im,ee,kc,wm,Vm,xm,cs,ar,eo,Lm,Mm,ci,qa,Xr,ro,gn,Bm,_m,Gm,Ue,Vt,Ym,Bc,jm,un,Xm,lc,Zm,lt,mt,Jm,Ze,ct,vt,fs,yt,cc,Qm,fe,pn,Uc,qc,xt,Zr,Wt,Wc,$e,ev,Kc,tv,Qi,nv,iv,rv,Kt,lo,sv,zc,At,ur,jc,uc,Xc,av,ov,lv,cv,Wa,Ii,Zc,Jc,Qc,Pi,He,dc,Ci,eu,ms,hc,tu,nu,iu,ye,B,zr,Jr,ru,dv,hv,gc,gv,er,Ua,_,n0,mv,pc,Ka,vv,yv,fc,Qr,Ev,Iv,Pv,Cv,za,mc,ts,Dn,Sv,Tv,wv,Vv,oe,vc,xv,Av,q,Yr,yc,kv,Nv,jr,W,K,se=re(()=>{"use strict";Wf=["ltr","rtl"];w=(e,t,n)=>{let i=e.dataset[t];if(i!==void 0&&(!n||n.includes(i)))return i},Z=(e,t)=>{let n=e.dataset[t];if(typeof n=="string")return n.split(",").map(i=>i.trim()).filter(i=>i.length>0)},z=(e,t,n)=>{let i=e.dataset[t];if(i===void 0)return;let r=Number(i);if(!Number.isNaN(r))return n&&!n.includes(r)?0:r},C=(e,t)=>{let n=t.replace(/([A-Z])/g,"-$1").toLowerCase();return e.hasAttribute(`data-${n}`)},Mn=(e,t="element")=>e!=null&&e.id?e.id:`${t}-${Math.random().toString(36).substring(2,9)}`,U=(e,t=[])=>({parts:(...n)=>{if(Kf(t))return U(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>U(e,[...t,...n]),omit:(...n)=>U(e,t.filter(i=>!n.includes(i))),rename:n=>U(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,i)=>Object.assign(n,{[i]:{selector:[`&[data-scope="${li(e)}"][data-part="${li(i)}"]`,`& [data-scope="${li(e)}"][data-part="${li(i)}"]`].join(", "),attrs:{"data-scope":li(e),"data-part":li(i)}}}),{})}),li=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),Kf=e=>e.length===0,zf=Object.defineProperty,Yf=(e,t,n)=>t in e?zf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ba=(e,t,n)=>Yf(e,typeof t!="symbol"?t+"":t,n);ac=e=>Math.max(0,Math.min(1,e)),jf=(e,t)=>e.map((n,i)=>e[(Math.max(t,0)+i)%e.length]),_a=(...e)=>t=>e.reduce((n,i)=>i(n),t),qt=()=>{},rs=e=>typeof e=="object"&&e!==null,ss=2147483647,E=e=>e?"":void 0,X=e=>e?"true":void 0,Xf=1,Zf=9,Jf=11,le=e=>rs(e)&&e.nodeType===Xf&&typeof e.nodeName=="string",nr=e=>rs(e)&&e.nodeType===Zf,Qf=e=>rs(e)&&e===e.window,bc=e=>le(e)?e.localName||"":"#document";tm=e=>rs(e)&&e.nodeType!==void 0,Ln=e=>tm(e)&&e.nodeType===Jf&&"host"in e,nm=e=>le(e)&&e.localName==="input",st=e=>!!(e!=null&&e.matches("a[href]")),im=e=>le(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;rm=/(textarea|select)/;Ga=new WeakMap;ja=new Set(["menu","listbox","dialog","grid","tree","region"]),om=e=>ja.has(e),Ec=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};os=()=>typeof document!="undefined";Za=e=>os()&&e.test(um()),Tc=e=>os()&&e.test(dm()),hm=e=>os()&&e.test(navigator.vendor),Ja=()=>os()&&!!navigator.maxTouchPoints,gm=()=>Za(/^iPhone/i),pm=()=>Za(/^iPad/i)||di()&&navigator.maxTouchPoints>1,ir=()=>gm()||pm(),Qa=()=>di()||ir(),di=()=>Za(/^Mac/i),Xe=()=>Qa()&&hm(/apple/i),fm=()=>Tc(/Firefox/i),mm=()=>Tc(/Android/i);pe=e=>e.button===0,hi=e=>e.button===2||di()&&e.ctrlKey&&e.button===0,xe=e=>e.ctrlKey||e.altKey||e.metaKey,ym=e=>"touches"in e&&e.touches.length>0,bm={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},oc={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};Em=new Set(["PageUp","PageDown"]),Im=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]);ee=(e,t,n,i)=>{let r=typeof e=="function"?e():e;return r==null||r.addEventListener(t,n,i),()=>{r==null||r.removeEventListener(t,n,i)}};kc=e=>le(e)&&e.tagName==="IFRAME",wm=/^(audio|video|details)$/;Vm=e=>!Number.isNaN(Nc(e)),xm=e=>Nc(e)<0;cs="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",ar=(e,t={})=>{if(!e)return[];let{includeContainer:n=!1,getShadowRoot:i}=t,r=Array.from(e.querySelectorAll(cs));(n==!0||n=="if-empty"&&r.length===0)&&le(e)&&Ye(e)&&r.unshift(e);let a=[];for(let o of r)if(Ye(o)){if(kc(o)&&o.contentDocument){let l=o.contentDocument.body;a.push(...ar(l,{getShadowRoot:i}));continue}a.push(o)}return i?Rc(a,i,Ye):a};eo=class Dc{constructor(){Ba(this,"id",null),Ba(this,"fn_cleanup"),Ba(this,"cleanup",()=>{this.cancel()})}static create(){return new Dc}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};Lm=/auto|scroll|overlay|hidden|clip/,Mm=new Set(["inline","contents"]);ci="default",qa="",Xr=new WeakMap;ro=e=>e.id;gn=Hm({box:"border-box"}),Bm=e=>e.split("").map(t=>{let n=t.charCodeAt(0);return n>0&&n<128?t:n>=128&&n<=255?`/x${n.toString(16)}`.replace("/","\\"):""}).join("").trim(),_m=e=>{var t,n,i;return Bm((i=(n=(t=e.dataset)==null?void 0:t.valuetext)!=null?n:e.textContent)!=null?i:"")},Gm=(e,t)=>e.trim().toLowerCase().startsWith(t.toLowerCase());Ue=Object.assign(Wm,{defaultOptions:{keysSoFar:"",timer:-1},isValidEvent:Km});Vt={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"};Ym=Object.defineProperty,Bc=e=>{throw TypeError(e)},jm=(e,t,n)=>t in e?Ym(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,un=(e,t,n)=>jm(e,typeof t!="symbol"?t+"":t,n),Xm=(e,t,n)=>t.has(e)||Bc("Cannot "+n),lc=(e,t,n)=>(Xm(e,t,"read from private field"),t.get(e)),Zm=(e,t,n)=>t.has(e)?Bc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n);lt=e=>e[0],mt=e=>e[e.length-1],Jm=(e,t)=>e.indexOf(t)!==-1,Ze=(e,...t)=>e.concat(t),ct=(e,...t)=>e.filter(n=>!t.includes(n)),vt=e=>Array.from(new Set(e)),fs=(e,t)=>{let n=new Set(t);return e.filter(i=>!n.has(i))},yt=(e,t)=>Jm(e,t)?ct(e,t):Ze(e,t);cc=e=>(e==null?void 0:e.constructor.name)==="Array",Qm=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof(e==null?void 0:e.isEqual)=="function"&&typeof(t==null?void 0:t.isEqual)=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if(cc(e)&&cc(t))return Qm(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;let n=Object.keys(t!=null?t:Object.create(null)),i=n.length;for(let r=0;rArray.isArray(e),Uc=e=>e===!0||e===!1,qc=e=>e!=null&&typeof e=="object",xt=e=>qc(e)&&!pn(e),Zr=e=>typeof e=="string",Wt=e=>typeof e=="function",Wc=e=>e==null,$e=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),ev=e=>Object.prototype.toString.call(e),Kc=Function.prototype.toString,tv=Kc.call(Object),Qi=e=>{if(!qc(e)||ev(e)!="[object Object]"||rv(e))return!1;let t=Object.getPrototypeOf(e);if(t===null)return!0;let n=$e(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Kc.call(n)==tv},nv=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,iv=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,rv=e=>nv(e)||iv(e),Kt=(e,...t)=>{let n=typeof e=="function"?e(...t):e;return n!=null?n:void 0},lo=e=>e,sv=e=>e(),zc=()=>{},At=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})},ur=(()=>{let e=0;return()=>(e++,e.toString(36))})();({floor:jc,abs:uc,round:Xc,min:av,max:ov,pow:lv,sign:cv}=Math),Wa=e=>Number.isNaN(e),Ii=e=>Wa(e)?0:e,Zc=(e,t)=>(e%t+t)%t,Jc=(e,t)=>Ii(e)>=t,Qc=(e,t)=>Ii(e)<=t,Pi=(e,t,n)=>{let i=Ii(e),r=t==null||i>=t,s=n==null||i<=n;return r&&s},He=(e,t,n)=>av(ov(Ii(e),t),n),dc=(e,t)=>{let n=e,i=t.toString(),r=i.indexOf("."),s=r>=0?i.length-r:0;if(s>0){let a=lv(10,s);n=Xc(n*a)/a}return n},Ci=(e,t)=>typeof t=="number"?jc(e*t+.5)/t:Xc(e),eu=(e,t,n,i)=>{let r=t!=null?Number(t):0,s=Number(n),a=(e-r)%i,o=uc(a)*2>=i?e+cv(a)*(i-uc(a)):e-a;if(o=dc(o,i),!Wa(r)&&os){let l=jc((s-r)/i),c=r+l*i;o=l<=0||ce[t]===n?e:[...e.slice(0,t),n,...e.slice(t+1)],hc=e=>{if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n},tu=(e,t,n)=>{let i=t==="+"?e+n:e-n;if(e%1!==0||n%1!==0){let r=10**Math.max(hc(e),hc(n));e=Math.round(e*r),n=Math.round(n*r),i=t==="+"?e+n:e-n,i/=r}return i},nu=(e,t)=>tu(Ii(e),"+",t),iu=(e,t)=>tu(Ii(e),"-",t),ye=e=>typeof e=="number"?`${e}px`:e;B=e=>function(n){return uv(n,e)},zr=()=>performance.now(),ru=class{constructor(e){this.onTick=e,un(this,"frameId",null),un(this,"pausedAtMs",null),un(this,"context"),un(this,"cancelFrame",()=>{this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null)}),un(this,"setStartMs",t=>{this.context.startMs=t}),un(this,"start",()=>{if(this.frameId!==null)return;let t=zr();this.pausedAtMs!==null?(this.context.startMs+=t-this.pausedAtMs,this.pausedAtMs=null):this.context.startMs=t,this.frameId=requestAnimationFrame(lc(this,Jr))}),un(this,"pause",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=zr())}),un(this,"stop",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=null)}),Zm(this,Jr,t=>{if(this.context.now=t,this.context.deltaMs=t-this.context.startMs,this.onTick(this.context)===!1){this.stop();return}this.frameId=requestAnimationFrame(lc(this,Jr))}),this.context={now:0,startMs:zr(),deltaMs:0}}get elapsedMs(){return this.pausedAtMs!==null?this.pausedAtMs-this.context.startMs:zr()-this.context.startMs}};Jr=new WeakMap;dv=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),hv=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,gc=e=>{let t={},n;for(;n=hv.exec(e);)t[n[1]]=n[2];return t},gv=(e,t)=>{if(Zr(e)){if(Zr(t))return`${e};${t}`;e=gc(e)}else Zr(t)&&(t=gc(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};er=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(er||{}),Ua="__init__";_=()=>e=>Array.from(new Set(e)),n0=Symbol(),mv=Symbol(),pc=Object.getPrototypeOf,Ka=new WeakMap,vv=e=>e&&(Ka.has(e)?Ka.get(e):pc(e)===Object.prototype||pc(e)===Array.prototype),yv=e=>vv(e)&&e[mv]||null,fc=(e,t=!0)=>{Ka.set(e,t)};Qr=ou("__zag__refSet",()=>new WeakSet),Ev=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,Iv=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,Pv=e=>typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeName=="string",Cv=e=>Ev(e)||Iv(e)||Pv(e),za=e=>e!==null&&typeof e=="object",mc=e=>za(e)&&!Qr.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!Cv(e)&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)&&!(e instanceof Promise)&&!(e instanceof File)&&!(e instanceof Blob)&&!(e instanceof AbortController),ts=()=>!0,Dn=ou("__zag__proxyStateMap",()=>new WeakMap),Sv=(e=Object.is,t=(o,l)=>new Proxy(o,l),n=new WeakMap,i=(o,l)=>{let c=n.get(o);if((c==null?void 0:c[0])===l)return c[1];let u=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o));return fc(u,!0),n.set(o,[l,u]),Reflect.ownKeys(o).forEach(h=>{let m=Reflect.get(o,h);Qr.has(m)?(fc(m,!1),u[h]=m):Dn.has(m)?u[h]=Ov(m):u[h]=m}),Object.freeze(u)},r=new WeakMap,s=[1,1],a=o=>{if(!za(o))throw new Error("object required");let l=r.get(o);if(l)return l;let c=s[0],u=new Set,h=(V,A=++s[0])=>{c!==A&&(c=A,u.forEach(x=>x(V,A)))},m=s[1],d=(V=++s[1])=>(m!==V&&!u.size&&(m=V,v.forEach(([A])=>{let x=A[1](V);x>c&&(c=x)})),c),p=V=>(A,x)=>{let k=[...A];k[1]=[V,...k[1]],h(k,x)},v=new Map,I=(V,A)=>{if(ts()&&v.has(V))throw new Error("prop listener already exists");if(u.size){let x=A[3](p(V));v.set(V,[A,x])}else v.set(V,[A])},T=V=>{var x;let A=v.get(V);A&&(v.delete(V),(x=A[1])==null||x.call(A))},O=V=>(u.add(V),u.size===1&&v.forEach(([x,k],N)=>{if(ts()&&k)throw new Error("remove already exists");let D=x[3](p(N));v.set(N,[x,D])}),()=>{u.delete(V),u.size===0&&v.forEach(([x,k],N)=>{k&&(k(),v.set(N,[x]))})}),b=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o)),S=t(b,{deleteProperty(V,A){let x=Reflect.get(V,A);T(A);let k=Reflect.deleteProperty(V,A);return k&&h(["delete",[A],x]),k},set(V,A,x,k){var te;let N=Reflect.has(V,A),D=Reflect.get(V,A,k);if(N&&(e(D,x)||r.has(x)&&e(D,r.get(x))))return!0;T(A),za(x)&&(x=yv(x)||x);let $=x;if(!((te=Object.getOwnPropertyDescriptor(V,A))!=null&&te.set)){!Dn.has(x)&&mc(x)&&($=ys(x));let J=!Qr.has($)&&Dn.get($);J&&I(A,J)}return Reflect.set(V,A,$,k),h(["set",[A],x,D]),!0}});r.set(o,S);let P=[b,d,i,O];return Dn.set(S,P),Reflect.ownKeys(o).forEach(V=>{let A=Object.getOwnPropertyDescriptor(o,V);A.get||A.set?Object.defineProperty(b,V,A):S[V]=o[V]}),S})=>[a,Dn,Qr,e,t,mc,n,i,r,s],[Tv]=Sv();wv=Object.defineProperty,Vv=(e,t,n)=>t in e?wv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oe=(e,t,n)=>Vv(e,typeof t!="symbol"?t+"":t,n),vc={onFocus:"onFocusin",onBlur:"onFocusout",onChange:"onInput",onDoubleClick:"onDblclick",htmlFor:"for",className:"class",defaultValue:"value",defaultChecked:"checked"},xv=new Set(["viewBox","preserveAspectRatio"]),Av=e=>{let t="";for(let n in e){let i=e[n];i!=null&&(n.startsWith("--")||(n=n.replace(/[A-Z]/g,r=>`-${r.toLowerCase()}`)),t+=`${n}:${i};`)}return t},q=fv(e=>Object.entries(e).reduce((t,[n,i])=>{if(i===void 0)return t;if(n in vc&&(n=vc[n]),n==="style"&&typeof i=="object")return t.style=Av(i),t;let r=xv.has(n)?n:n.toLowerCase();return t[r]=i,t},{})),Yr=new WeakMap,yc=new Set(["value","checked","selected"]),kv=new Set(["viewBox","preserveAspectRatio","clipPath","clipRule","fillRule","strokeWidth","strokeLinecap","strokeLinejoin","strokeDasharray","strokeDashoffset","strokeMiterlimit"]),Nv=e=>e.tagName==="svg"||e.namespaceURI==="http://www.w3.org/2000/svg",jr=(e,t)=>Nv(e)&&kv.has(t)?t:t.toLowerCase();is.cleanup=e=>{};is.ref=e=>{let t=e;return{get:()=>t,set:n=>{t=n}}};W=class{constructor(e,t={}){var h,m,d;this.machine=e,oe(this,"scope"),oe(this,"context"),oe(this,"prop"),oe(this,"state"),oe(this,"refs"),oe(this,"computed"),oe(this,"event",{type:""}),oe(this,"previousEvent",{type:""}),oe(this,"effects",new Map),oe(this,"transition",null),oe(this,"cleanups",[]),oe(this,"subscriptions",[]),oe(this,"userPropsRef"),oe(this,"getEvent",()=>y(g({},this.event),{current:()=>this.event,previous:()=>this.previousEvent})),oe(this,"getStateConfig",p=>this.machine.states[p]),oe(this,"getState",()=>y(g({},this.state),{matches:(...p)=>p.includes(this.state.get()),hasTag:p=>{var v,I;return!!((I=(v=this.getStateConfig(this.state.get()))==null?void 0:v.tags)!=null&&I.includes(p))}})),oe(this,"debug",(...p)=>{this.machine.debug&&console.log(...p)}),oe(this,"notify",()=>{this.publish()}),oe(this,"send",p=>{this.status===er.Started&&queueMicrotask(()=>{var S,P,V,A,x;if(!p)return;this.previousEvent=this.event,this.event=p,this.debug("send",p);let v=this.state.get(),I=p.type,T=(A=(P=(S=this.getStateConfig(v))==null?void 0:S.on)==null?void 0:P[I])!=null?A:(V=this.machine.on)==null?void 0:V[I],O=this.choose(T);if(!O)return;this.transition=O;let b=(x=O.target)!=null?x:v;this.debug("transition",O);let f=b!==v;f?this.state.set(b):O.reenter&&!f?this.state.invoke(v,v):this.action(O.actions)})}),oe(this,"action",p=>{let v=Wt(p)?p(this.getParams()):p;if(!v)return;let I=v.map(T=>{var b,f;let O=(f=(b=this.machine.implementations)==null?void 0:b.actions)==null?void 0:f[T];return O||zt(`[zag-js] No implementation found for action "${JSON.stringify(T)}"`),O});for(let T of I)T==null||T(this.getParams())}),oe(this,"guard",p=>{var v,I;return Wt(p)?p(this.getParams()):(I=(v=this.machine.implementations)==null?void 0:v.guards)==null?void 0:I[p](this.getParams())}),oe(this,"effect",p=>{let v=Wt(p)?p(this.getParams()):p;if(!v)return;let I=v.map(O=>{var f,S;let b=(S=(f=this.machine.implementations)==null?void 0:f.effects)==null?void 0:S[O];return b||zt(`[zag-js] No implementation found for effect "${JSON.stringify(O)}"`),b}),T=[];for(let O of I){let b=O==null?void 0:O(this.getParams());b&&T.push(b)}return()=>T.forEach(O=>O==null?void 0:O())}),oe(this,"choose",p=>or(p).find(v=>{let I=!v.guard;return Zr(v.guard)?I=!!this.guard(v.guard):Wt(v.guard)&&(I=v.guard(this.getParams())),I})),oe(this,"subscribe",p=>(this.subscriptions.push(p),()=>{let v=this.subscriptions.indexOf(p);v>-1&&this.subscriptions.splice(v,1)})),oe(this,"status",er.NotStarted),oe(this,"publish",()=>{this.callTrackers(),this.subscriptions.forEach(p=>p(this.service))}),oe(this,"trackers",[]),oe(this,"setupTrackers",()=>{var p,v;(v=(p=this.machine).watch)==null||v.call(p,this.getParams())}),oe(this,"callTrackers",()=>{this.trackers.forEach(({deps:p,fn:v})=>{let I=p.map(T=>T());fe(v.prev,I)||(v(),v.prev=I)})}),oe(this,"getParams",()=>({state:this.getState(),context:this.context,event:this.getEvent(),prop:this.prop,send:this.send,action:this.action,guard:this.guard,track:(p,v)=>{v.prev=p.map(I=>I()),this.trackers.push({deps:p,fn:v})},refs:this.refs,computed:this.computed,flush:sv,scope:this.scope,choose:this.choose})),this.userPropsRef={current:t};let{id:n,ids:i,getRootNode:r}=Kt(t);this.scope=pv({id:n,ids:i,getRootNode:r});let s=p=>{var T,O;let v=Kt(this.userPropsRef.current);return((O=(T=e.props)==null?void 0:T.call(e,{props:Si(v),scope:this.scope}))!=null?O:v)[p]};this.prop=s;let a=(h=e.context)==null?void 0:h.call(e,{prop:s,bindable:is,scope:this.scope,flush(p){queueMicrotask(p)},getContext(){return o},getComputed(){return l},getRefs(){return c},getEvent:this.getEvent.bind(this)});a&&Object.values(a).forEach(p=>{let v=ns(p.ref,()=>this.notify());this.cleanups.push(v)});let o={get(p){return a==null?void 0:a[p].get()},set(p,v){a==null||a[p].set(v)},initial(p){return a==null?void 0:a[p].initial},hash(p){let v=a==null?void 0:a[p].get();return a==null?void 0:a[p].hash(v)}};this.context=o;let l=p=>{var v,I;return(I=(v=e.computed)==null?void 0:v[p]({context:o,event:this.getEvent(),prop:s,refs:this.refs,scope:this.scope,computed:l}))!=null?I:{}};this.computed=l;let c=Dv((d=(m=e.refs)==null?void 0:m.call(e,{prop:s,context:o}))!=null?d:{});this.refs=c;let u=is(()=>({defaultValue:e.initialState({prop:s}),onChange:(p,v)=>{var T,O,b,f;if(v){let S=this.effects.get(v);S==null||S(),this.effects.delete(v)}v&&this.action((T=this.getStateConfig(v))==null?void 0:T.exit),this.action((O=this.transition)==null?void 0:O.actions);let I=this.effect((b=this.getStateConfig(p))==null?void 0:b.effects);if(I&&this.effects.set(p,I),v===Ua){this.action(e.entry);let S=this.effect(e.effects);S&&this.effects.set(Ua,S)}this.action((f=this.getStateConfig(p))==null?void 0:f.entry)}}));this.state=u,this.cleanups.push(ns(this.state.ref,()=>this.notify()))}updateProps(e){let t=this.userPropsRef.current;this.userPropsRef.current=()=>{let n=Kt(t),i=Kt(e);return lu(n,i)},this.notify()}start(){this.status=er.Started,this.debug("initializing..."),this.state.invoke(this.state.initial,Ua),this.setupTrackers()}stop(){this.effects.forEach(e=>e==null?void 0:e()),this.effects.clear(),this.transition=null,this.action(this.machine.exit),this.cleanups.forEach(e=>e()),this.cleanups=[],this.subscriptions=[],this.status=er.Stopped,this.debug("unmounting...")}get service(){return{state:this.getState(),send:this.send,context:this.context,prop:this.prop,scope:this.scope,refs:this.refs,computed:this.computed,event:this.getEvent(),getStatus:()=>this.status}}},K=class{constructor(e,t){Y(this,"el");Y(this,"doc");Y(this,"machine");Y(this,"api");Y(this,"init",()=>{this.render(),this.machine.subscribe(()=>{this.api=this.initApi(),this.render()}),this.machine.start()});Y(this,"destroy",()=>{this.machine.stop()});Y(this,"spreadProps",(e,t)=>{Rv(e,t,this.machine.scope.id)});Y(this,"updateProps",e=>{this.machine.updateProps(e)});if(!e)throw new Error("Root element not found");this.el=e,this.doc=document,this.machine=this.initMachine(t),this.api=this.initApi()}}});var cu={};he(cu,{Accordion:()=>jv});function Gv(e,t){let{send:n,context:i,prop:r,scope:s,computed:a}=e,o=i.get("focusedValue"),l=i.get("value"),c=r("multiple");function u(m){let d=m;!c&&d.length>1&&(d=[d[0]]),n({type:"VALUE.SET",value:d})}function h(m){var d;return{expanded:l.includes(m.value),focused:o===m.value,disabled:!!((d=m.disabled)!=null?d:r("disabled"))}}return{focusedValue:o,value:l,setValue:u,getItemState:h,getRootProps(){return t.element(y(g({},dr.root.attrs),{dir:r("dir"),id:bs(s),"data-orientation":r("orientation")}))},getItemProps(m){let d=h(m);return t.element(y(g({},dr.item.attrs),{dir:r("dir"),id:Mv(s,m.value),"data-state":d.expanded?"open":"closed","data-focus":E(d.focused),"data-disabled":E(d.disabled),"data-orientation":r("orientation")}))},getItemContentProps(m){let d=h(m);return t.element(y(g({},dr.itemContent.attrs),{dir:r("dir"),role:"region",id:co(s,m.value),"aria-labelledby":Es(s,m.value),hidden:!d.expanded,"data-state":d.expanded?"open":"closed","data-disabled":E(d.disabled),"data-focus":E(d.focused),"data-orientation":r("orientation")}))},getItemIndicatorProps(m){let d=h(m);return t.element(y(g({},dr.itemIndicator.attrs),{dir:r("dir"),"aria-hidden":!0,"data-state":d.expanded?"open":"closed","data-disabled":E(d.disabled),"data-focus":E(d.focused),"data-orientation":r("orientation")}))},getItemTriggerProps(m){let{value:d}=m,p=h(m);return t.button(y(g({},dr.itemTrigger.attrs),{type:"button",dir:r("dir"),id:Es(s,d),"aria-controls":co(s,d),"data-controls":co(s,d),"aria-expanded":p.expanded,disabled:p.disabled,"data-orientation":r("orientation"),"aria-disabled":p.disabled,"data-state":p.expanded?"open":"closed","data-ownedby":bs(s),onFocus(){p.disabled||n({type:"TRIGGER.FOCUS",value:d})},onBlur(){p.disabled||n({type:"TRIGGER.BLUR"})},onClick(v){p.disabled||(Xe()&&v.currentTarget.focus(),n({type:"TRIGGER.CLICK",value:d}))},onKeyDown(v){if(v.defaultPrevented||p.disabled)return;let I={ArrowDown(){a("isHorizontal")||n({type:"GOTO.NEXT",value:d})},ArrowUp(){a("isHorizontal")||n({type:"GOTO.PREV",value:d})},ArrowRight(){a("isHorizontal")&&n({type:"GOTO.NEXT",value:d})},ArrowLeft(){a("isHorizontal")&&n({type:"GOTO.PREV",value:d})},Home(){n({type:"GOTO.FIRST",value:d})},End(){n({type:"GOTO.LAST",value:d})}},T=ge(v,{dir:r("dir"),orientation:r("orientation")}),O=I[T];O&&(O(v),v.preventDefault())}}))}}}var Lv,dr,bs,Mv,co,Es,Fv,Is,$v,Hv,Bv,_v,Uv,qv,Wv,Kv,c0,zv,u0,Yv,jv,uu=re(()=>{"use strict";se();Lv=U("accordion").parts("root","item","itemTrigger","itemContent","itemIndicator"),dr=Lv.build(),bs=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`accordion:${e.id}`},Mv=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`accordion:${e.id}:item:${t}`},co=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemContent)==null?void 0:i.call(n,t))!=null?r:`accordion:${e.id}:content:${t}`},Es=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemTrigger)==null?void 0:i.call(n,t))!=null?r:`accordion:${e.id}:trigger:${t}`},Fv=e=>e.getById(bs(e)),Is=e=>{let n=`[data-controls][data-ownedby='${CSS.escape(bs(e))}']:not([disabled])`;return Fe(Fv(e),n)},$v=e=>lt(Is(e)),Hv=e=>mt(Is(e)),Bv=(e,t)=>yi(Is(e),Es(e,t)),_v=(e,t)=>bi(Is(e),Es(e,t));({and:Uv,not:qv}=Ee()),Wv={props({props:e}){return g({collapsible:!1,multiple:!1,orientation:"vertical",defaultValue:[]},e)},initialState(){return"idle"},context({prop:e,bindable:t}){return{focusedValue:t(()=>({defaultValue:null,sync:!0,onChange(n){var i;(i=e("onFocusChange"))==null||i({value:n})}})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var i;(i=e("onValueChange"))==null||i({value:n})}}))}},computed:{isHorizontal:({prop:e})=>e("orientation")==="horizontal"},on:{"VALUE.SET":{actions:["setValue"]}},states:{idle:{on:{"TRIGGER.FOCUS":{target:"focused",actions:["setFocusedValue"]}}},focused:{on:{"GOTO.NEXT":{actions:["focusNextTrigger"]},"GOTO.PREV":{actions:["focusPrevTrigger"]},"TRIGGER.CLICK":[{guard:Uv("isExpanded","canToggle"),actions:["collapse"]},{guard:qv("isExpanded"),actions:["expand"]}],"GOTO.FIRST":{actions:["focusFirstTrigger"]},"GOTO.LAST":{actions:["focusLastTrigger"]},"TRIGGER.BLUR":{target:"idle",actions:["clearFocusedValue"]}}}},implementations:{guards:{canToggle:({prop:e})=>!!e("collapsible")||!!e("multiple"),isExpanded:({context:e,event:t})=>e.get("value").includes(t.value)},actions:{collapse({context:e,prop:t,event:n}){let i=t("multiple")?ct(e.get("value"),n.value):[];e.set("value",i)},expand({context:e,prop:t,event:n}){let i=t("multiple")?Ze(e.get("value"),n.value):[n.value];e.set("value",i)},focusFirstTrigger({scope:e}){var t;(t=$v(e))==null||t.focus()},focusLastTrigger({scope:e}){var t;(t=Hv(e))==null||t.focus()},focusNextTrigger({context:e,scope:t}){let n=e.get("focusedValue");if(!n)return;let i=Bv(t,n);i==null||i.focus()},focusPrevTrigger({context:e,scope:t}){let n=e.get("focusedValue");if(!n)return;let i=_v(t,n);i==null||i.focus()},setFocusedValue({context:e,event:t}){e.set("focusedValue",t.value)},clearFocusedValue({context:e}){e.set("focusedValue",null)},setValue({context:e,event:t}){e.set("value",t.value)},coarseValue({context:e,prop:t}){!t("multiple")&&e.get("value").length>1&&(zt("The value of accordion should be a single value when multiple is false."),e.set("value",[e.get("value")[0]]))}}}},Kv=_()(["collapsible","dir","disabled","getRootNode","id","ids","multiple","onFocusChange","onValueChange","orientation","value","defaultValue"]),c0=B(Kv),zv=_()(["value","disabled"]),u0=B(zv),Yv=class extends K{initMachine(e){return new W(Wv,e)}initApi(){return Gv(this.machine.service,q)}render(){var i;let e=(i=this.el.querySelector('[data-scope="accordion"][data-part="root"]'))!=null?i:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.getItemsList(),n=e.querySelectorAll('[data-scope="accordion"][data-part="item"]');for(let r=0;r{var a,o;let r=w(e,"onValueChange");r&&this.liveSocket.main.isConnected()&&t(r,{id:e.id,value:(a=i.value)!=null?a:null});let s=w(e,"onValueChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{id:e.id,value:(o=i.value)!=null?o:null}}))},onFocusChange:i=>{var a,o;let r=w(e,"onFocusChange");r&&this.liveSocket.main.isConnected()&&t(r,{id:e.id,value:(a=i.value)!=null?a:null});let s=w(e,"onFocusChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{id:e.id,value:(o=i.value)!=null?o:null}}))}}));n.init(),this.accordion=n,this.onSetValue=i=>{let{value:r}=i.detail;n.api.setValue(r)},e.addEventListener("phx:accordion:set-value",this.onSetValue),this.handlers=[],this.handlers.push(this.handleEvent("accordion_set_value",i=>{let r=i.accordion_id;r&&!(e.id===r||e.id===`accordion:${r}`)||n.api.setValue(i.value)})),this.handlers.push(this.handleEvent("accordion_value",()=>{this.pushEvent("accordion_value_response",{value:n.api.value})})),this.handlers.push(this.handleEvent("accordion_focused_value",()=>{this.pushEvent("accordion_focused_value_response",{value:n.api.focusedValue})}))},updated(){var t,n,i,r;let e=C(this.el,"controlled");(r=this.accordion)==null||r.updateProps(y(g({id:this.el.id},e?{value:Z(this.el,"value")}:{defaultValue:(i=(n=(t=this.accordion)==null?void 0:t.api)==null?void 0:n.value)!=null?i:Z(this.el,"defaultValue")}),{collapsible:C(this.el,"collapsible"),multiple:C(this.el,"multiple"),orientation:w(this.el,"orientation",["horizontal","vertical"]),dir:Oe(this.el)}))},destroyed(){var e;if(this.onSetValue&&this.el.removeEventListener("phx:accordion:set-value",this.onSetValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.accordion)==null||e.destroy()}}});function yu(e,t,n=e.center){let i=t.x-n.x,r=t.y-n.y;return 360-(Math.atan2(i,r)*(180/Math.PI)+180)}function bn(e){let{x:t,y:n,width:i,height:r}=e,s=t+i/2,a=n+r/2;return{x:t,y:n,width:i,height:r,minX:t,minY:n,maxX:t+i,maxY:n+r,midX:s,midY:a,center:_n(s,a)}}function ey(e){let t=_n(e.minX,e.minY),n=_n(e.maxX,e.minY),i=_n(e.maxX,e.maxY),r=_n(e.minX,e.maxY);return{top:t,right:n,bottom:i,left:r}}function ty(e){if(!uo.has(e)){let t=e.ownerDocument.defaultView||window;uo.set(e,t.getComputedStyle(e))}return uo.get(e)}function po(e,t={}){return bn(ny(e,t))}function ny(e,t={}){let{excludeScrollbar:n=!1,excludeBorders:i=!1}=t,{x:r,y:s,width:a,height:o}=e.getBoundingClientRect(),l={x:r,y:s,width:a,height:o},c=ty(e),{borderLeftWidth:u,borderTopWidth:h,borderRightWidth:m,borderBottomWidth:d}=c,p=gu(u,m),v=gu(h,d);if(i&&(l.width-=p,l.height-=v,l.x+=ho(u),l.y+=ho(h)),n){let I=e.offsetWidth-e.clientWidth-p,T=e.offsetHeight-e.clientHeight-v;l.width-=I,l.height-=T}return l}function Cu(e,t={}){return bn(iy(e,t))}function iy(e,t){let{excludeScrollbar:n=!1}=t,{innerWidth:i,innerHeight:r,document:s,visualViewport:a}=e,o=(a==null?void 0:a.width)||i,l=(a==null?void 0:a.height)||r,c={x:0,y:0,width:o,height:l};if(n){let u=i-s.documentElement.clientWidth,h=r-s.documentElement.clientHeight;c.width-=u,c.height-=h}return c}function Su(e,t){let n=bn(e),{top:i,right:r,left:s,bottom:a}=ey(n),[o]=t.split("-");return{top:[s,i,r,a],right:[i,r,a,s],bottom:[i,s,a,r],left:[r,i,s,a]}[o]}function fo(e,t){let{x:n,y:i}=t,r=!1;for(let s=0,a=e.length-1;si!=u>i&&n<(c-o)*(i-l)/(u-l)+o&&(r=!r)}return r}function mu(e,t){let{minX:n,minY:i,maxX:r,maxY:s,midX:a,midY:o}=e,l=t.includes("w")?n:t.includes("e")?r:a,c=t.includes("n")?i:t.includes("s")?s:o;return{x:l,y:c}}function sy(e){return ry[e]}function Tu(e,t,n,i){let{scalingOriginMode:r,lockAspectRatio:s}=i,a=mu(e,n),o=sy(n),l=mu(e,o);r==="center"&&(t={x:t.x*2,y:t.y*2});let c={x:a.x+t.x,y:a.y+t.y},u={x:pu[n].x*2-1,y:pu[n].y*2-1},h={width:c.x-l.x,height:c.y-l.y},m=u.x*h.width/e.width,d=u.y*h.height/e.height,p=Ti(m)>Ti(d)?m:d,v=s?{x:p,y:p}:{x:a.x===l.x?1:m,y:a.y===l.y?1:d};switch(a.y===l.y?v.y=Ti(v.y):Ps(v.y)!==Ps(d)&&(v.y*=-1),a.x===l.x?v.x=Ti(v.x):Ps(v.x)!==Ps(m)&&(v.x*=-1),r){case"extent":return vu(e,du.scale(v.x,v.y,l),!1);case"center":return vu(e,du.scale(v.x,v.y,{x:e.midX,y:e.midY}),!1)}}function ay(e,t,n=!0){return n?{x:fu(t.x,e.x),y:fu(t.y,e.y),width:Ti(t.x-e.x),height:Ti(t.y-e.y)}:{x:e.x,y:e.y,width:t.x-e.x,height:t.y-e.y}}function vu(e,t,n=!0){let i=t.applyTo({x:e.minX,y:e.minY}),r=t.applyTo({x:e.maxX,y:e.maxY});return ay(i,r,n)}var Xv,Zv,Zt,du,hu,hr,Jv,Qv,gr,_n,go,bu,Eu,Iu,Pu,uo,ho,gu,g0,p0,pu,ry,Ps,Ti,fu,Cs=re(()=>{"use strict";Xv=Object.defineProperty,Zv=(e,t,n)=>t in e?Xv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zt=(e,t,n)=>Zv(e,typeof t!="symbol"?t+"":t,n),du=class Ae{constructor([t,n,i,r,s,a]=[0,0,0,0,0,0]){Zt(this,"m00"),Zt(this,"m01"),Zt(this,"m02"),Zt(this,"m10"),Zt(this,"m11"),Zt(this,"m12"),Zt(this,"rotate",(...o)=>this.prepend(Ae.rotate(...o))),Zt(this,"scale",(...o)=>this.prepend(Ae.scale(...o))),Zt(this,"translate",(...o)=>this.prepend(Ae.translate(...o))),this.m00=t,this.m01=n,this.m02=i,this.m10=r,this.m11=s,this.m12=a}applyTo(t){let{x:n,y:i}=t,{m00:r,m01:s,m02:a,m10:o,m11:l,m12:c}=this;return{x:r*n+s*i+a,y:o*n+l*i+c}}prepend(t){return new Ae([this.m00*t.m00+this.m01*t.m10,this.m00*t.m01+this.m01*t.m11,this.m00*t.m02+this.m01*t.m12+this.m02,this.m10*t.m00+this.m11*t.m10,this.m10*t.m01+this.m11*t.m11,this.m10*t.m02+this.m11*t.m12+this.m12])}append(t){return new Ae([t.m00*this.m00+t.m01*this.m10,t.m00*this.m01+t.m01*this.m11,t.m00*this.m02+t.m01*this.m12+t.m02,t.m10*this.m00+t.m11*this.m10,t.m10*this.m01+t.m11*this.m11,t.m10*this.m02+t.m11*this.m12+t.m12])}get determinant(){return this.m00*this.m11-this.m01*this.m10}get isInvertible(){let t=this.determinant;return isFinite(t)&&isFinite(this.m02)&&isFinite(this.m12)&&t!==0}invert(){let t=this.determinant;return new Ae([this.m11/t,-this.m01/t,(this.m01*this.m12-this.m11*this.m02)/t,-this.m10/t,this.m00/t,(this.m10*this.m02-this.m00*this.m12)/t])}get array(){return[this.m00,this.m01,this.m02,this.m10,this.m11,this.m12,0,0,1]}get float32Array(){return new Float32Array(this.array)}static get identity(){return new Ae([1,0,0,0,1,0])}static rotate(t,n){let i=new Ae([Math.cos(t),-Math.sin(t),0,Math.sin(t),Math.cos(t),0]);return n&&(n.x!==0||n.y!==0)?Ae.multiply(Ae.translate(n.x,n.y),i,Ae.translate(-n.x,-n.y)):i}static scale(t,n=t,i={x:0,y:0}){let r=new Ae([t,0,0,0,n,0]);return i.x!==0||i.y!==0?Ae.multiply(Ae.translate(i.x,i.y),r,Ae.translate(-i.x,-i.y)):r}static translate(t,n){return new Ae([1,0,t,0,1,n])}static multiply(...[t,...n]){return t?n.reduce((i,r)=>i.prepend(r),t):Ae.identity}get a(){return this.m00}get b(){return this.m10}get c(){return this.m01}get d(){return this.m11}get tx(){return this.m02}get ty(){return this.m12}get scaleComponents(){return{x:this.a,y:this.d}}get translationComponents(){return{x:this.tx,y:this.ty}}get skewComponents(){return{x:this.c,y:this.b}}toString(){return`matrix(${this.a}, ${this.b}, ${this.c}, ${this.d}, ${this.tx}, ${this.ty})`}};hu=(e,t,n)=>Math.min(Math.max(e,t),n),hr=(e,t,n)=>{let i=hu(e.x,n.x,n.x+n.width-t.width),r=hu(e.y,n.y,n.y+n.height-t.height);return{x:i,y:r}},Jv={width:0,height:0},Qv={width:1/0,height:1/0},gr=(e,t=Jv,n=Qv)=>({width:Math.min(Math.max(e.width,t.width),n.width),height:Math.min(Math.max(e.height,t.height),n.height)}),_n=(e,t)=>({x:e,y:t}),go=(e,t)=>t?_n(e.x-t.x,e.y-t.y):e,bu=(e,t)=>_n(e.x+t.x,e.y+t.y);Eu=(e,t)=>{let n=Math.max(t.x,Math.min(e.x,t.x+t.width-e.width)),i=Math.max(t.y,Math.min(e.y,t.y+t.height-e.height));return{x:n,y:i,width:Math.min(e.width,t.width),height:Math.min(e.height,t.height)}},Iu=(e,t)=>e.width===(t==null?void 0:t.width)&&e.height===(t==null?void 0:t.height),Pu=(e,t)=>e.x===(t==null?void 0:t.x)&&e.y===(t==null?void 0:t.y),uo=new WeakMap;ho=e=>parseFloat(e.replace("px","")),gu=(...e)=>e.reduce((t,n)=>t+(n?ho(n):0),0),{min:g0,max:p0}=Math;pu={n:{x:.5,y:0},ne:{x:1,y:0},e:{x:1,y:.5},se:{x:1,y:1},s:{x:.5,y:1},sw:{x:0,y:1},w:{x:0,y:.5},nw:{x:0,y:0}},ry={n:"s",ne:"sw",e:"w",se:"nw",s:"n",sw:"ne",w:"e",nw:"se"},{sign:Ps,abs:Ti,min:fu}=Math});var Nu={};he(Nu,{AngleSlider:()=>vy});function Au(e,t,n){let i=bn(e.getBoundingClientRect()),r=yu(i,t);return n!=null?r-n:r}function ku(e){return Math.min(Math.max(e,Ss),Ts)}function hy(e,t){let n=ku(e),i=Math.ceil(n/t),r=Math.round(n/t);return i>=n/t?i*t===Ts?Ss:i*t:r*t}function wu(e,t){return eu(e,Ss,Ts,t)}function gy(e,t){let{state:n,send:i,context:r,prop:s,computed:a,scope:o}=e,l=n.matches("dragging"),c=r.get("value"),u=a("valueAsDegree"),h=s("disabled"),m=s("invalid"),d=s("readOnly"),p=a("interactive"),v=s("aria-label"),I=s("aria-labelledby");return{value:c,valueAsDegree:u,dragging:l,setValue(T){i({type:"VALUE.SET",value:T})},getRootProps(){return t.element(y(g({},Gn.root.attrs),{id:ly(o),"data-disabled":E(h),"data-invalid":E(m),"data-readonly":E(d),style:{"--value":c,"--angle":u}}))},getLabelProps(){return t.label(y(g({},Gn.label.attrs),{id:Ou(o),htmlFor:mo(o),"data-disabled":E(h),"data-invalid":E(m),"data-readonly":E(d),onClick(T){var O;p&&(T.preventDefault(),(O=vo(o))==null||O.focus())}}))},getHiddenInputProps(){return t.element({type:"hidden",value:c,name:s("name"),id:mo(o)})},getControlProps(){return t.element(y(g({},Gn.control.attrs),{role:"presentation",id:xu(o),"data-disabled":E(h),"data-invalid":E(m),"data-readonly":E(d),onPointerDown(T){if(!p||!pe(T))return;let O=je(T),b=T.currentTarget,f=vo(o),S=Yt(T).composedPath(),P=f&&S.includes(f),V=null;P&&(V=Au(b,O)-c),i({type:"CONTROL.POINTER_DOWN",point:O,angularOffset:V}),T.stopPropagation()},style:{touchAction:"none",userSelect:"none",WebkitUserSelect:"none"}}))},getThumbProps(){return t.element(y(g({},Gn.thumb.attrs),{id:Vu(o),role:"slider","aria-label":v,"aria-labelledby":I!=null?I:Ou(o),"aria-valuemax":360,"aria-valuemin":0,"aria-valuenow":c,tabIndex:d||p?0:void 0,"data-disabled":E(h),"data-invalid":E(m),"data-readonly":E(d),onFocus(){i({type:"THUMB.FOCUS"})},onBlur(){i({type:"THUMB.BLUR"})},onKeyDown(T){if(!p)return;let O=gi(T)*s("step");switch(T.key){case"ArrowLeft":case"ArrowUp":T.preventDefault(),i({type:"THUMB.ARROW_DEC",step:O});break;case"ArrowRight":case"ArrowDown":T.preventDefault(),i({type:"THUMB.ARROW_INC",step:O});break;case"Home":T.preventDefault(),i({type:"THUMB.HOME"});break;case"End":T.preventDefault(),i({type:"THUMB.END"});break}},style:{rotate:"var(--angle)"}}))},getValueTextProps(){return t.element(y(g({},Gn.valueText.attrs),{id:cy(o)}))},getMarkerGroupProps(){return t.element(g({},Gn.markerGroup.attrs))},getMarkerProps(T){let O;return T.valuec?O="over-value":O="at-value",t.element(y(g({},Gn.marker.attrs),{"data-value":T.value,"data-state":O,"data-disabled":E(h),style:{"--marker-value":T.value,rotate:"calc(var(--marker-value) * 1deg)"}}))}}}var oy,Gn,ly,Vu,mo,xu,cy,Ou,uy,dy,vo,Ss,Ts,py,fy,y0,my,vy,Ru=re(()=>{"use strict";Cs();se();oy=U("angle-slider").parts("root","label","thumb","valueText","control","track","markerGroup","marker"),Gn=oy.build(),ly=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`angle-slider:${e.id}`},Vu=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.thumb)!=null?n:`angle-slider:${e.id}:thumb`},mo=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.hiddenInput)!=null?n:`angle-slider:${e.id}:input`},xu=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`angle-slider:${e.id}:control`},cy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.valueText)!=null?n:`angle-slider:${e.id}:value-text`},Ou=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`angle-slider:${e.id}:label`},uy=e=>e.getById(mo(e)),dy=e=>e.getById(xu(e)),vo=e=>e.getById(Vu(e)),Ss=0,Ts=359;py={props({props:e}){return g({step:1,defaultValue:0},e)},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var i;(i=e("onValueChange"))==null||i({value:n,valueAsDegree:`${n}deg`})}}))}},refs(){return{thumbDragOffset:null}},computed:{interactive:({prop:e})=>!(e("disabled")||e("readOnly")),valueAsDegree:({context:e})=>`${e.get("value")}deg`},watch({track:e,context:t,action:n}){e([()=>t.get("value")],()=>{n(["syncInputElement"])})},initialState(){return"idle"},on:{"VALUE.SET":{actions:["setValue"]}},states:{idle:{on:{"CONTROL.POINTER_DOWN":{target:"dragging",actions:["setThumbDragOffset","setPointerValue","focusThumb"]},"THUMB.FOCUS":{target:"focused"}}},focused:{on:{"CONTROL.POINTER_DOWN":{target:"dragging",actions:["setThumbDragOffset","setPointerValue","focusThumb"]},"THUMB.ARROW_DEC":{actions:["decrementValue","invokeOnChangeEnd"]},"THUMB.ARROW_INC":{actions:["incrementValue","invokeOnChangeEnd"]},"THUMB.HOME":{actions:["setValueToMin","invokeOnChangeEnd"]},"THUMB.END":{actions:["setValueToMax","invokeOnChangeEnd"]},"THUMB.BLUR":{target:"idle"}}},dragging:{entry:["focusThumb"],effects:["trackPointerMove"],on:{"DOC.POINTER_UP":{target:"focused",actions:["invokeOnChangeEnd","clearThumbDragOffset"]},"DOC.POINTER_MOVE":{actions:["setPointerValue"]}}}},implementations:{effects:{trackPointerMove({scope:e,send:t}){return hn(e.getDoc(),{onPointerMove(n){t({type:"DOC.POINTER_MOVE",point:n.point})},onPointerUp(){t({type:"DOC.POINTER_UP"})}})}},actions:{syncInputElement({scope:e,context:t}){let n=uy(e);Me(n,t.get("value").toString())},invokeOnChangeEnd({context:e,prop:t,computed:n}){var i;(i=t("onValueChangeEnd"))==null||i({value:e.get("value"),valueAsDegree:n("valueAsDegree")})},setPointerValue({scope:e,event:t,context:n,prop:i,refs:r}){let s=dy(e);if(!s)return;let a=r.get("thumbDragOffset"),o=Au(s,t.point,a);n.set("value",hy(o,i("step")))},setValueToMin({context:e}){e.set("value",Ss)},setValueToMax({context:e}){e.set("value",Ts)},setValue({context:e,event:t}){e.set("value",ku(t.value))},decrementValue({context:e,event:t,prop:n}){var r;let i=wu(e.get("value")-t.step,(r=t.step)!=null?r:n("step"));e.set("value",i)},incrementValue({context:e,event:t,prop:n}){var r;let i=wu(e.get("value")+t.step,(r=t.step)!=null?r:n("step"));e.set("value",i)},focusThumb({scope:e}){H(()=>{var t;(t=vo(e))==null||t.focus({preventScroll:!0})})},setThumbDragOffset({refs:e,event:t}){var n;e.set("thumbDragOffset",(n=t.angularOffset)!=null?n:null)},clearThumbDragOffset({refs:e}){e.set("thumbDragOffset",null)}}}},fy=_()(["aria-label","aria-labelledby","dir","disabled","getRootNode","id","ids","invalid","name","onValueChange","onValueChangeEnd","readOnly","step","value","defaultValue"]),y0=B(fy),my=class extends K{initMachine(e){return new W(py,e)}initApi(){return gy(this.machine.service,q)}render(){var o;let e=(o=this.el.querySelector('[data-scope="angle-slider"][data-part="root"]'))!=null?o:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="angle-slider"][data-part="label"]');t&&this.spreadProps(t,this.api.getLabelProps());let n=this.el.querySelector('[data-scope="angle-slider"][data-part="hidden-input"]');n&&this.spreadProps(n,this.api.getHiddenInputProps());let i=this.el.querySelector('[data-scope="angle-slider"][data-part="control"]');i&&this.spreadProps(i,this.api.getControlProps());let r=this.el.querySelector('[data-scope="angle-slider"][data-part="thumb"]');r&&this.spreadProps(r,this.api.getThumbProps());let s=this.el.querySelector('[data-scope="angle-slider"][data-part="value-text"]');if(s){this.spreadProps(s,this.api.getValueTextProps());let l=s.querySelector('[data-scope="angle-slider"][data-part="value"]');l&&l.textContent!==String(this.api.value)&&(l.textContent=String(this.api.value))}let a=this.el.querySelector('[data-scope="angle-slider"][data-part="marker-group"]');a&&this.spreadProps(a,this.api.getMarkerGroupProps()),this.el.querySelectorAll('[data-scope="angle-slider"][data-part="marker"]').forEach(l=>{let c=l.dataset.value;if(c==null)return;let u=Number(c);Number.isNaN(u)||this.spreadProps(l,this.api.getMarkerProps({value:u}))})}},vy={mounted(){var s;let e=this.el,t=z(e,"value"),n=z(e,"defaultValue"),i=C(e,"controlled"),r=new my(e,y(g({id:e.id},i&&t!==void 0?{value:t}:{defaultValue:n!=null?n:0}),{step:(s=z(e,"step"))!=null?s:1,disabled:C(e,"disabled"),readOnly:C(e,"readOnly"),invalid:C(e,"invalid"),name:w(e,"name"),dir:w(e,"dir",["ltr","rtl"]),onValueChange:a=>{let o=w(e,"onValueChange");o&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(o,{value:a.value,valueAsDegree:a.valueAsDegree,id:e.id});let l=w(e,"onValueChangeClient");l&&e.dispatchEvent(new CustomEvent(l,{bubbles:!0,detail:{value:a,id:e.id}}))},onValueChangeEnd:a=>{let o=w(e,"onValueChangeEnd");o&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(o,{value:a.value,valueAsDegree:a.valueAsDegree,id:e.id});let l=w(e,"onValueChangeEndClient");l&&e.dispatchEvent(new CustomEvent(l,{bubbles:!0,detail:{value:a,id:e.id}}))}}));r.init(),this.angleSlider=r,this.handlers=[],this.onSetValue=a=>{let{value:o}=a.detail;r.api.setValue(o)},e.addEventListener("phx:angle-slider:set-value",this.onSetValue),this.handlers.push(this.handleEvent("angle_slider_set_value",a=>{let o=a.angle_slider_id;o&&!(e.id===o||e.id===`angle-slider:${o}`)||r.api.setValue(a.value)})),this.handlers.push(this.handleEvent("angle_slider_value",()=>{this.pushEvent("angle_slider_value_response",{value:r.api.value,valueAsDegree:r.api.valueAsDegree,dragging:r.api.dragging})}))},updated(){var i,r;let e=z(this.el,"value"),t=z(this.el,"defaultValue"),n=C(this.el,"controlled");(r=this.angleSlider)==null||r.updateProps(y(g({id:this.el.id},n&&e!==void 0?{value:e}:{defaultValue:t!=null?t:0}),{step:(i=z(this.el,"step"))!=null?i:1,disabled:C(this.el,"disabled"),readOnly:C(this.el,"readOnly"),invalid:C(this.el,"invalid"),name:w(this.el,"name"),dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(this.onSetValue&&this.el.removeEventListener("phx:angle-slider:set-value",this.onSetValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.angleSlider)==null||e.destroy()}}});var Mu={};he(Mu,{Avatar:()=>Oy});function Iy(e,t){let{state:n,send:i,prop:r,scope:s}=e,a=n.matches("loaded");return{loaded:a,setSrc(o){let l=bo(s);l==null||l.setAttribute("src",o)},setLoaded(){i({type:"img.loaded",src:"api"})},setError(){i({type:"img.error",src:"api"})},getRootProps(){return t.element(y(g({},yo.root.attrs),{dir:r("dir"),id:Du(s)}))},getImageProps(){return t.img(y(g({},yo.image.attrs),{hidden:!a,dir:r("dir"),id:Lu(s),"data-state":a?"visible":"hidden",onLoad(){i({type:"img.loaded",src:"element"})},onError(){i({type:"img.error",src:"element"})}}))},getFallbackProps(){return t.element(y(g({},yo.fallback.attrs),{dir:r("dir"),id:by(s),hidden:a,"data-state":a?"hidden":"visible"}))}}}function Cy(e){return e.complete&&e.naturalWidth!==0&&e.naturalHeight!==0}var yy,yo,Du,Lu,by,Ey,bo,Py,Sy,P0,Ty,Oy,Fu=re(()=>{"use strict";se();yy=U("avatar").parts("root","image","fallback"),yo=yy.build(),Du=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`avatar:${e.id}`},Lu=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.image)!=null?n:`avatar:${e.id}:image`},by=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.fallback)!=null?n:`avatar:${e.id}:fallback`},Ey=e=>e.getById(Du(e)),bo=e=>e.getById(Lu(e));Py={initialState(){return"loading"},effects:["trackImageRemoval","trackSrcChange"],on:{"src.change":{target:"loading"},"img.unmount":{target:"error"}},states:{loading:{entry:["checkImageStatus"],on:{"img.loaded":{target:"loaded",actions:["invokeOnLoad"]},"img.error":{target:"error",actions:["invokeOnError"]}}},error:{on:{"img.loaded":{target:"loaded",actions:["invokeOnLoad"]}}},loaded:{on:{"img.error":{target:"error",actions:["invokeOnError"]}}}},implementations:{actions:{invokeOnLoad({prop:e}){var t;(t=e("onStatusChange"))==null||t({status:"loaded"})},invokeOnError({prop:e}){var t;(t=e("onStatusChange"))==null||t({status:"error"})},checkImageStatus({send:e,scope:t}){let n=bo(t);if(!(n!=null&&n.complete))return;let i=Cy(n)?"img.loaded":"img.error";e({type:i,src:"ssr"})}},effects:{trackImageRemoval({send:e,scope:t}){let n=Ey(t);return hs(n,{callback(i){Array.from(i[0].removedNodes).find(a=>a.nodeType===Node.ELEMENT_NODE&&a.matches("[data-scope=avatar][data-part=image]"))&&e({type:"img.unmount"})}})},trackSrcChange({send:e,scope:t}){let n=bo(t);return ot(n,{attributes:["src","srcset"],callback(){e({type:"src.change"})}})}}}};Sy=_()(["dir","id","ids","onStatusChange","getRootNode"]),P0=B(Sy),Ty=class extends K{initMachine(e){return new W(Py,e)}initApi(){return Iy(this.machine.service,q)}render(){var r;let e=(r=this.el.querySelector('[data-scope="avatar"][data-part="root"]'))!=null?r:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="avatar"][data-part="image"]');t&&this.spreadProps(t,this.api.getImageProps());let n=this.el.querySelector('[data-scope="avatar"][data-part="fallback"]');n&&this.spreadProps(n,this.api.getFallbackProps());let i=this.el.querySelector('[data-scope="avatar"][data-part="skeleton"]');if(i){let s=this.machine.service.state,a=s.matches("loaded"),o=s.matches("error");i.hidden=a||o,i.setAttribute("data-state",a||o?"hidden":"visible")}}},Oy={mounted(){let e=this.el,t=w(e,"src"),n=new Ty(e,g({id:e.id,onStatusChange:i=>{let r=w(e,"onStatusChange");r&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(r,{status:i.status,id:e.id});let s=w(e,"onStatusChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{value:i,id:e.id}}))}},t!==void 0?{}:{}));n.init(),this.avatar=n,t!==void 0&&n.api.setSrc(t),this.handlers=[]},updated(){let e=w(this.el,"src");e!==void 0&&this.avatar&&this.avatar.api.setSrc(e)},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.avatar)==null||e.destroy()}}});var qu={};he(qu,{Carousel:()=>qy});function Bu(e){let t=at(e),n=e.getBoundingClientRect(),i=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),r=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),s=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function o(m,d){let p=parseFloat(m);return/%/.test(m)&&(p/=100,p*=d),Number.isNaN(p)?0:p}let l=o(i,n.width),c=o(r,n.height),u=o(s,n.width),h=o(a,n.height);return{x:{before:l,after:u},y:{before:c,after:h}}}function wy(e,t,n="both"){return n==="x"&&e.right>=t.left&&e.left<=t.right||n==="y"&&e.bottom>=t.top&&e.top<=t.bottom||n==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function _u(e){let t=[];for(let n of e.children)t=t.concat(n,_u(n));return t}function Gu(e,t=!1){let n=e.getBoundingClientRect(),r=Po(e)==="rtl",s={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},a=t?_u(e):e.children;for(let o of["x","y"]){let l=o==="x"?"y":"x",c=o==="x"?"left":"top",u=o==="x"?"right":"bottom",h=o==="x"?"width":"height",m=o==="x"?"scrollLeft":"scrollTop",d=r&&o==="x";for(let p of a){let v=p.getBoundingClientRect();if(!wy(n,v,l))continue;let I=at(p),[T,O]=I.getPropertyValue("scroll-snap-align").split(" ");typeof O=="undefined"&&(O=T);let b=o==="x"?O:T,f,S,P;if(d){let V=Math.abs(e[m]),A=n[u]-v[u]+V;f=A,S=A+v[h],P=A+v[h]/2}else f=v[c]-n[c]+e[m],S=f+v[h],P=f+v[h]/2;switch(b){case"none":break;case"start":s[o].start.push({node:p,position:f});break;case"center":s[o].center.push({node:p,position:P});break;case"end":s[o].end.push({node:p,position:S});break}}}return s}function Vy(e){let t=Po(e),n=e.getBoundingClientRect(),i=Bu(e),r=Gu(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight},a=t==="rtl",o=a&&e.scrollLeft<=0,l;return a?(l=Eo([...r.x.start.map(c=>c.position-i.x.after),...r.x.center.map(c=>c.position-n.width/2),...r.x.end.map(c=>c.position-n.width+i.x.before)].map(Io(0,s.x))),o&&(l=l.map(c=>-c))):l=Eo([...r.x.start.map(c=>c.position-i.x.before),...r.x.center.map(c=>c.position-n.width/2),...r.x.end.map(c=>c.position-n.width+i.x.after)].map(Io(0,s.x))),{x:l,y:Eo([...r.y.start.map(c=>c.position-i.y.before),...r.y.center.map(c=>c.position-n.height/2),...r.y.end.map(c=>c.position-n.height+i.y.after)].map(Io(0,s.y)))}}function xy(e,t,n){let i=Po(e),r=Bu(e),s=Gu(e),a=[...s[t].start,...s[t].center,...s[t].end],o=i==="rtl",l=o&&t==="x"&&e.scrollLeft<=0;for(let c of a)if(n(c.node)){let u;return t==="x"&&o?(u=c.position-r.x.after,l&&(u=-u)):u=c.position-(t==="x"?r.x.before:r.y.before),u}}function Fy(e,t){let{state:n,context:i,computed:r,send:s,scope:a,prop:o}=e,l=n.matches("autoplay"),c=n.matches("dragging"),u=r("canScrollNext"),h=r("canScrollPrev"),m=r("isHorizontal"),d=o("autoSize"),p=Array.from(i.get("pageSnapPoints")),v=i.get("page"),I=o("slidesPerPage"),T=o("padding"),O=o("translations");return{isPlaying:l,isDragging:c,page:v,pageSnapPoints:p,canScrollNext:u,canScrollPrev:h,getProgress(){return v/p.length},getProgressText(){var f,S;let b={page:v+1,totalPages:p.length};return(S=(f=O.progressText)==null?void 0:f.call(O,b))!=null?S:""},scrollToIndex(b,f){s({type:"INDEX.SET",index:b,instant:f})},scrollTo(b,f){s({type:"PAGE.SET",index:b,instant:f})},scrollNext(b){s({type:"PAGE.NEXT",instant:b})},scrollPrev(b){s({type:"PAGE.PREV",instant:b})},play(){s({type:"AUTOPLAY.START"})},pause(){s({type:"AUTOPLAY.PAUSE"})},isInView(b){return Array.from(i.get("slidesInView")).includes(b)},refresh(){s({type:"SNAP.REFRESH"})},getRootProps(){return t.element(y(g({},kt.root.attrs),{id:ky(a),role:"region","aria-roledescription":"carousel","data-orientation":o("orientation"),dir:o("dir"),style:{"--slides-per-page":I,"--slide-spacing":o("spacing"),"--slide-item-size":d?"auto":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(y(g({},kt.itemGroup.attrs),{id:Os(a),"data-orientation":o("orientation"),"data-dragging":E(c),dir:o("dir"),"aria-live":l?"off":"polite",onFocus(b){ce(b.currentTarget,j(b))&&s({type:"VIEWPORT.FOCUS"})},onBlur(b){ce(b.currentTarget,b.relatedTarget)||s({type:"VIEWPORT.BLUR"})},onMouseDown(b){if(b.defaultPrevented||!o("allowMouseDrag")||!pe(b))return;let f=j(b);Ye(f)&&f!==b.currentTarget||(b.preventDefault(),s({type:"DRAGGING.START"}))},onWheel:Yc(b=>{let f=o("orientation")==="horizontal"?"deltaX":"deltaY";b[f]<0&&!r("canScrollPrev")||b[f]>0&&!r("canScrollNext")||s({type:"USER.SCROLL"})},150),onTouchStart(){s({type:"USER.SCROLL"})},style:{display:d?"flex":"grid",gap:"var(--slide-spacing)",scrollSnapType:[m?"x":"y",o("snapType")].join(" "),gridAutoFlow:m?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[m?"gridAutoColumns":"gridAutoRows"]:d?void 0:"var(--slide-item-size)",[m?"scrollPaddingInline":"scrollPaddingBlock"]:T,[m?"paddingInline":"paddingBlock"]:T,[m?"overflowX":"overflowY"]:"auto"}}))},getItemProps(b){let f=i.get("slidesInView").includes(b.index);return t.element(y(g({},kt.item.attrs),{id:Ny(a,b.index),dir:o("dir"),role:"group","data-index":b.index,"data-inview":E(f),"aria-roledescription":"slide","data-orientation":o("orientation"),"aria-label":O.item(b.index,o("slideCount")),"aria-hidden":X(!f),style:{flex:"0 0 auto",[m?"maxWidth":"maxHeight"]:"100%",scrollSnapAlign:(()=>{var x;let S=(x=b.snapAlign)!=null?x:"start",P=o("slidesPerMove"),V=P==="auto"?Math.floor(o("slidesPerPage")):P;return(b.index+V)%V===0?S:void 0})()}}))},getControlProps(){return t.element(y(g({},kt.control.attrs),{"data-orientation":o("orientation")}))},getPrevTriggerProps(){return t.button(y(g({},kt.prevTrigger.attrs),{id:Dy(a),type:"button",disabled:!h,dir:o("dir"),"aria-label":O.prevTrigger,"data-orientation":o("orientation"),"aria-controls":Os(a),onClick(b){b.defaultPrevented||s({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(y(g({},kt.nextTrigger.attrs),{dir:o("dir"),id:Ry(a),type:"button","aria-label":O.nextTrigger,"data-orientation":o("orientation"),"aria-controls":Os(a),disabled:!u,onClick(b){b.defaultPrevented||s({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(y(g({},kt.indicatorGroup.attrs),{dir:o("dir"),id:Ly(a),"data-orientation":o("orientation"),onKeyDown(b){if(b.defaultPrevented)return;let f="indicator",S={ArrowDown(A){m||(s({type:"PAGE.NEXT",src:f}),A.preventDefault())},ArrowUp(A){m||(s({type:"PAGE.PREV",src:f}),A.preventDefault())},ArrowRight(A){m&&(s({type:"PAGE.NEXT",src:f}),A.preventDefault())},ArrowLeft(A){m&&(s({type:"PAGE.PREV",src:f}),A.preventDefault())},Home(A){s({type:"PAGE.SET",index:0,src:f}),A.preventDefault()},End(A){s({type:"PAGE.SET",index:p.length-1,src:f}),A.preventDefault()}},P=ge(b,{dir:o("dir"),orientation:o("orientation")}),V=S[P];V==null||V(b)}}))},getIndicatorProps(b){return t.button(y(g({},kt.indicator.attrs),{dir:o("dir"),id:Uu(a,b.index),type:"button","data-orientation":o("orientation"),"data-index":b.index,"data-readonly":E(b.readOnly),"data-current":E(b.index===v),"aria-label":O.indicator(b.index),onClick(f){f.defaultPrevented||b.readOnly||s({type:"PAGE.SET",index:b.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(y(g({},kt.autoplayTrigger.attrs),{type:"button","data-orientation":o("orientation"),"data-pressed":E(l),"aria-label":l?O.autoplayStop:O.autoplayStart,onClick(b){b.defaultPrevented||s({type:l?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))},getProgressTextProps(){return t.element(g({},kt.progressText.attrs))}}}function Hy(e,t,n){if(e==null||n<=0)return[];let i=[],r=t==="auto"?Math.floor(n):t;if(r<=0)return[];for(let s=0;se);s+=r)i.push(s);return i}var Po,Eo,Io,Ay,kt,ky,Ny,Os,Ry,Dy,Ly,Uu,qe,$u,My,Hu,$y,By,O0,_y,w0,Gy,V0,Uy,qy,Wu=re(()=>{"use strict";se();Po=e=>at(e).direction;Eo=e=>[...new Set(e)],Io=(e,t)=>n=>Math.max(e,Math.min(t,n)),Ay=U("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger","progressText"),kt=Ay.build(),ky=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},Ny=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`carousel:${e.id}:item:${t}`},Os=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},Ry=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},Dy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},Ly=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},Uu=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.indicator)==null?void 0:i.call(n,t))!=null?r:`carousel:${e.id}:indicator:${t}`},qe=e=>e.getById(Os(e)),$u=e=>Fe(qe(e),"[data-part=item]"),My=(e,t)=>e.getById(Uu(e,t)),Hu=e=>{let t=qe(e);if(!t)return;let n=jt(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};$y={props({props:e}){return yn(e,["slideCount"],"carousel"),y(g({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6,autoSize:!1},e),{translations:g({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation",progressText:({page:t,totalPages:n})=>`${t} / ${n}`},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(i){var a;let s=n().get("pageSnapPoints");(a=e("onPageChange"))==null||a({page:i,pageSnapPoint:s[i]})}})),pageSnapPoints:t(()=>({defaultValue:e("autoSize")?Array.from({length:e("slideCount")},(i,r)=>r):Hy(e("slideCount"),e("slidesPerMove"),e("slidesPerPage"))})),slidesInView:t(()=>({defaultValue:[]}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isHorizontal:({prop:e})=>e("orientation")==="horizontal",canScrollNext:({prop:e,context:t})=>e("loop")||t.get("page")e("loop")||t.get("page")>0,autoplayInterval:({prop:e})=>{let t=e("autoplay");return xt(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:i,send:r}){e([()=>i("slidesPerPage"),()=>i("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>i("orientation"),()=>i("autoSize"),()=>i("dir")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>i("slideCount")],()=>{r({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!i("autoplay")],()=>{r({type:i("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(qe(e))},effects:{autoUpdateSlide({computed:e,send:t}){let n=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(n)},trackSlideMutation({scope:e,send:t}){let n=qe(e);if(!n)return;let i=e.getWin(),r=new i.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),Hu(e)});return Hu(e),r.observe(n,{childList:!0,subtree:!0}),()=>r.disconnect()},trackSlideResize({scope:e,send:t}){if(!qe(e))return;let i=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};H(()=>{i(),H(()=>{t({type:"PAGE.SCROLL",instant:!0})})});let r=$u(e);r.forEach(i);let s=r.map(a=>gn.observe(a,i));return At(...s)},trackSlideIntersections({scope:e,prop:t,context:n}){let i=qe(e),r=e.getWin(),s=new r.IntersectionObserver(a=>{let o=a.reduce((l,c)=>{var m;let u=c.target,h=Number((m=u.dataset.index)!=null?m:"-1");return h==null||Number.isNaN(h)||h===-1?l:c.isIntersecting?Ze(l,h):ct(l,h)},n.get("slidesInView"));n.set("slidesInView",vt(o))},{root:i,threshold:t("inViewThreshold")});return $u(e).forEach(a=>s.observe(a)),()=>s.disconnect()},trackScroll({send:e,refs:t,scope:n}){let i=qe(n);return i?ee(i,"scroll",()=>{clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0),t.set("timeoutRef",setTimeout(()=>{e({type:"SCROLL.END"})},150))},{passive:!0}):void 0},trackDocumentVisibility({scope:e,send:t}){let n=e.getDoc();return ee(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){let n=e.getDoc();return hn(n,{onPointerMove({event:i}){t({type:"DRAGGING",left:-i.movementX,top:-i.movementY})},onPointerUp(){t({type:"DRAGGING.END"})}})},trackKeyboardScroll({scope:e,send:t,context:n}){let i=e.getWin();return ee(i,"keydown",s=>{switch(s.key){case"ArrowRight":s.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":s.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":s.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":s.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:i,flush:r}){var c;let s=t.instant?"instant":"smooth",a=He((c=t.index)!=null?c:e.get("page"),0,e.get("pageSnapPoints").length-1),o=qe(n);if(!o)return;let l=i("isHorizontal")?"left":"top";r(()=>{o.scrollTo({[l]:e.get("pageSnapPoints")[a],behavior:s})})},setClosestPage({context:e,scope:t,computed:n}){let i=qe(t);if(!i)return;let r=n("isHorizontal")?i.scrollLeft:i.scrollTop,s=e.get("pageSnapPoints").findIndex(a=>Math.abs(a-r)<1);s!==-1&&e.set("page",s)},setNextPage({context:e,prop:t,state:n}){let i=n.matches("autoplay")||t("loop"),r=Ei(e.get("pageSnapPoints"),e.get("page"),{loop:i});e.set("page",r)},setPrevPage({context:e,prop:t,state:n}){let i=n.matches("autoplay")||t("loop"),r=lr(e.get("pageSnapPoints"),e.get("page"),{loop:i});e.set("page",r)},setMatchingPage({context:e,event:t,computed:n,scope:i}){let r=qe(i);if(!r)return;let s=xy(r,n("isHorizontal")?"x":"y",o=>o.dataset.index===t.index.toString());if(s==null)return;let a=e.get("pageSnapPoints").findIndex(o=>Math.abs(o-s)<1);e.set("page",a)},setPage({context:e,event:t}){var i;let n=(i=t.index)!=null?i:e.get("page");e.set("page",n)},clampPage({context:e}){let t=He(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){let i=qe(n);if(!i)return;let r=Vy(i);e.set("pageSnapPoints",t("isHorizontal")?r.x:r.y)},disableScrollSnap({scope:e}){let t=qe(e);if(!t)return;let n=getComputedStyle(t);t.dataset.scrollSnapType=n.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){let n=qe(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){let i=qe(e);if(!i)return;let r=n("isHorizontal"),s=r?i.scrollLeft:i.scrollTop,a=t.get("pageSnapPoints"),o=a.reduce((l,c)=>Math.abs(c-s){i.scrollTo({left:r?o:i.scrollLeft,top:r?i.scrollTop:o,behavior:"smooth"}),t.set("page",a.indexOf(o));let l=i.dataset.scrollSnapType;l&&(i.style.setProperty("scroll-snap-type",l),delete i.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;let i=My(n,e.get("page"));i&&H(()=>i.focus({preventScroll:!0}))},invokeDragStart({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.start",isDragging:!0,page:e.get("page")})},invokeDragging({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging",isDragging:!0,page:e.get("page")})},invokeDraggingEnd({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.end",isDragging:!1,page:e.get("page")})},invokeAutoplay({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay",isPlaying:!0,page:e.get("page")})},invokeAutoplayStart({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.start",isPlaying:!0,page:e.get("page")})},invokeAutoplayEnd({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.stop",isPlaying:!1,page:e.get("page")})}}}};By=_()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","autoSize","onDragStatusChange","onAutoplayStatusChange"]),O0=B(By),_y=_()(["index","readOnly"]),w0=B(_y),Gy=_()(["index","snapAlign"]),V0=B(Gy),Uy=class extends K{initMachine(e){return new W($y,e)}initApi(){return Fy(this.machine.service,q)}render(){var u;let e=(u=this.el.querySelector('[data-scope="carousel"][data-part="root"]'))!=null?u:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="carousel"][data-part="control"]');t&&this.spreadProps(t,this.api.getControlProps());let n=this.el.querySelector('[data-scope="carousel"][data-part="item-group"]');n&&this.spreadProps(n,this.api.getItemGroupProps());let i=Number(this.el.dataset.slideCount)||0;for(let h=0;h{let h=w(e,"onPageChange");h&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(h,{page:u.page,pageSnapPoint:u.pageSnapPoint,id:e.id});let m=w(e,"onPageChangeClient");m&&e.dispatchEvent(new CustomEvent(m,{bubbles:!0,detail:{value:u,id:e.id}}))}}));s.init(),this.carousel=s,this.handlers=[]},updated(){var i,r;let e=z(this.el,"slideCount");if(e==null||e<1)return;let t=z(this.el,"page"),n=C(this.el,"controlled");(r=this.carousel)==null||r.updateProps(y(g({id:this.el.id,slideCount:e},n&&t!==void 0?{page:t}:{}),{dir:Oe(this.el),orientation:w(this.el,"orientation",["horizontal","vertical"]),slidesPerPage:(i=z(this.el,"slidesPerPage"))!=null?i:1,loop:C(this.el,"loop"),allowMouseDrag:C(this.el,"allowMouseDrag")}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.carousel)==null||e.destroy()}}});function Wy(e){return!(e.metaKey||!di()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function zy(e,t,n){let i=n?j(n):null,r=ue(i);return e=e||i instanceof r.HTMLInputElement&&!Ky.has(i==null?void 0:i.type)||i instanceof r.HTMLTextAreaElement||i instanceof r.HTMLElement&&i.isContentEditable,!(e&&t==="keyboard"&&n instanceof r.KeyboardEvent&&!Reflect.has(Yy,n.key))}function xs(e,t){for(let n of Co)n(e,t)}function Vs(e){Un=!0,Wy(e)&&(In="keyboard",xs("keyboard",e))}function dt(e){In="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Un=!0,xs("pointer",e))}function Ku(e){Vc(e)&&(Un=!0,In="virtual")}function zu(e){let t=j(e);t===ue(t)||t===Le(t)||(!Un&&!So&&(In="virtual",xs("virtual",e)),Un=!1,So=!1)}function Yu(){Un=!1,So=!0}function jy(e){if(typeof window=="undefined"||ws.get(ue(e)))return;let t=ue(e),n=Le(e),i=t.HTMLElement.prototype.focus;function r(){In="virtual",xs("virtual",null),Un=!0,i.apply(this,arguments)}try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:r})}catch(s){}n.addEventListener("keydown",Vs,!0),n.addEventListener("keyup",Vs,!0),n.addEventListener("click",Ku,!0),t.addEventListener("focus",zu,!0),t.addEventListener("blur",Yu,!1),typeof t.PointerEvent!="undefined"?(n.addEventListener("pointerdown",dt,!0),n.addEventListener("pointermove",dt,!0),n.addEventListener("pointerup",dt,!0)):(n.addEventListener("mousedown",dt,!0),n.addEventListener("mousemove",dt,!0),n.addEventListener("mouseup",dt,!0)),t.addEventListener("beforeunload",()=>{Xy(e)},{once:!0}),ws.set(t,{focus:i})}function ju(){return In}function En(){return In==="keyboard"}function Pn(e={}){let{isTextInput:t,autoFocus:n,onChange:i,root:r}=e;jy(r),i==null||i({isFocusVisible:n||En(),modality:In});let s=(a,o)=>{zy(!!t,a,o)&&(i==null||i({isFocusVisible:En(),modality:a}))};return Co.add(s),()=>{Co.delete(s)}}var Ky,In,Co,ws,Un,So,Yy,Xy,pr=re(()=>{"use strict";se();Ky=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);In=null,Co=new Set,ws=new Map,Un=!1,So=!1,Yy={Tab:!0,Escape:!0};Xy=(e,t)=>{let n=ue(e),i=Le(e),r=ws.get(n);if(r){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:r.focus})}catch(s){}i.removeEventListener("keydown",Vs,!0),i.removeEventListener("keyup",Vs,!0),i.removeEventListener("click",Ku,!0),n.removeEventListener("focus",zu,!0),n.removeEventListener("blur",Yu,!1),typeof n.PointerEvent!="undefined"?(i.removeEventListener("pointerdown",dt,!0),i.removeEventListener("pointermove",dt,!0),i.removeEventListener("pointerup",dt,!0)):(i.removeEventListener("mousedown",dt,!0),i.removeEventListener("mousemove",dt,!0),i.removeEventListener("mouseup",dt,!0)),ws.delete(n)}}});var Qu={};he(Qu,{Checkbox:()=>sb});function eb(e,t){let{send:n,context:i,prop:r,computed:s,scope:a}=e,o=!!r("disabled"),l=!!r("readOnly"),c=!!r("required"),u=!!r("invalid"),h=!o&&i.get("focused"),m=!o&&i.get("focusVisible"),d=s("checked"),p=s("indeterminate"),v=i.get("checked"),I={"data-active":E(i.get("active")),"data-focus":E(h),"data-focus-visible":E(m),"data-readonly":E(l),"data-hover":E(i.get("hovered")),"data-disabled":E(o),"data-state":p?"indeterminate":d?"checked":"unchecked","data-invalid":E(u),"data-required":E(c)};return{checked:d,disabled:o,indeterminate:p,focused:h,checkedState:v,setChecked(T){n({type:"CHECKED.SET",checked:T,isTrusted:!1})},toggleChecked(){n({type:"CHECKED.TOGGLE",checked:d,isTrusted:!1})},getRootProps(){return t.label(y(g(g({},As.root.attrs),I),{dir:r("dir"),id:Ju(a),htmlFor:To(a),onPointerMove(){o||n({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){o||n({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(T){j(T)===fr(a)&&T.stopPropagation()}}))},getLabelProps(){return t.element(y(g(g({},As.label.attrs),I),{dir:r("dir"),id:Xu(a)}))},getControlProps(){return t.element(y(g(g({},As.control.attrs),I),{dir:r("dir"),id:Jy(a),"aria-hidden":!0}))},getIndicatorProps(){return t.element(y(g(g({},As.indicator.attrs),I),{dir:r("dir"),hidden:!p&&!d}))},getHiddenInputProps(){return t.input({id:To(a),type:"checkbox",required:r("required"),defaultChecked:d,disabled:o,"aria-labelledby":Xu(a),"aria-invalid":u,name:r("name"),form:r("form"),value:r("value"),style:Vt,onFocus(){let T=En();n({type:"CONTEXT.SET",context:{focused:!0,focusVisible:T}})},onBlur(){n({type:"CONTEXT.SET",context:{focused:!1,focusVisible:!1}})},onClick(T){if(l){T.preventDefault();return}let O=T.currentTarget.checked;n({type:"CHECKED.SET",checked:O,isTrusted:!0})}})}}}function ks(e){return e==="indeterminate"}function nb(e){return ks(e)?!1:!!e}var Zy,As,Ju,Xu,Jy,To,Qy,fr,Zu,tb,ib,L0,rb,sb,ed=re(()=>{"use strict";pr();se();Zy=U("checkbox").parts("root","label","control","indicator"),As=Zy.build(),Ju=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`checkbox:${e.id}`},Xu=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`checkbox:${e.id}:label`},Jy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`checkbox:${e.id}:control`},To=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.hiddenInput)!=null?n:`checkbox:${e.id}:input`},Qy=e=>e.getById(Ju(e)),fr=e=>e.getById(To(e));({not:Zu}=Ee()),tb={props({props:e}){var t;return y(g({value:"on"},e),{defaultChecked:(t=e.defaultChecked)!=null?t:!1})},initialState(){return"ready"},context({prop:e,bindable:t}){return{checked:t(()=>({defaultValue:e("defaultChecked"),value:e("checked"),onChange(n){var i;(i=e("onCheckedChange"))==null||i({checked:n})}})),fieldsetDisabled:t(()=>({defaultValue:!1})),focusVisible:t(()=>({defaultValue:!1})),active:t(()=>({defaultValue:!1})),focused:t(()=>({defaultValue:!1})),hovered:t(()=>({defaultValue:!1}))}},watch({track:e,context:t,prop:n,action:i}){e([()=>n("disabled")],()=>{i(["removeFocusIfNeeded"])}),e([()=>t.get("checked")],()=>{i(["syncInputElement"])})},effects:["trackFormControlState","trackPressEvent","trackFocusVisible"],on:{"CHECKED.TOGGLE":[{guard:Zu("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:Zu("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},computed:{indeterminate:({context:e})=>ks(e.get("checked")),checked:({context:e})=>nb(e.get("checked")),disabled:({context:e,prop:t})=>!!t("disabled")||e.get("fieldsetDisabled")},states:{ready:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackPressEvent({context:e,computed:t,scope:n}){if(!t("disabled"))return ps({pointerNode:Qy(n),keyboardNode:fr(n),isValidKey:i=>i.key===" ",onPress:()=>e.set("active",!1),onPressStart:()=>e.set("active",!0),onPressEnd:()=>e.set("active",!1)})},trackFocusVisible({computed:e,scope:t}){var n;if(!e("disabled"))return Pn({root:(n=t.getRootNode)==null?void 0:n.call(t)})},trackFormControlState({context:e,scope:t}){return wt(fr(t),{onFieldsetDisabledChange(n){e.set("fieldsetDisabled",n)},onFormReset(){e.set("checked",e.initial("checked"))}})}},actions:{setContext({context:e,event:t}){for(let n in t.context)e.set(n,t.context[n])},syncInputElement({context:e,computed:t,scope:n}){let i=fr(n);i&&(sr(i,t("checked")),i.indeterminate=ks(e.get("checked")))},removeFocusIfNeeded({context:e,prop:t}){t("disabled")&&e.get("focused")&&(e.set("focused",!1),e.set("focusVisible",!1))},setChecked({context:e,event:t}){e.set("checked",t.checked)},toggleChecked({context:e,computed:t}){let n=ks(t("checked"))?!0:!t("checked");e.set("checked",n)},dispatchChangeEvent({computed:e,scope:t}){queueMicrotask(()=>{let n=fr(t);pi(n,{checked:e("checked")})})}}}};ib=_()(["defaultChecked","checked","dir","disabled","form","getRootNode","id","ids","invalid","name","onCheckedChange","readOnly","required","value"]),L0=B(ib),rb=class extends K{initMachine(e){return new W(tb,e)}initApi(){return eb(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="checkbox"][data-part="root"]');if(!e)return;this.spreadProps(e,this.api.getRootProps());let t=e.querySelector(':scope > [data-scope="checkbox"][data-part="hidden-input"]');t&&this.spreadProps(t,this.api.getHiddenInputProps());let n=e.querySelector(':scope > [data-scope="checkbox"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps());let i=e.querySelector(':scope > [data-scope="checkbox"][data-part="control"]');if(i){this.spreadProps(i,this.api.getControlProps());let r=i.querySelector(':scope > [data-scope="checkbox"][data-part="indicator"]');r&&this.spreadProps(r,this.api.getIndicatorProps())}}},sb={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=new rb(e,y(g({id:e.id},C(e,"controlled")?{checked:C(e,"checked")}:{defaultChecked:C(e,"defaultChecked")}),{disabled:C(e,"disabled"),name:w(e,"name"),form:w(e,"form"),value:w(e,"value"),dir:Oe(e),invalid:C(e,"invalid"),required:C(e,"required"),readOnly:C(e,"readOnly"),onCheckedChange:i=>{let r=w(e,"onCheckedChange");r&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&t(r,{checked:i.checked,id:e.id});let s=w(e,"onCheckedChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{value:i,id:e.id}}))}}));n.init(),this.checkbox=n,this.onSetChecked=i=>{let{checked:r}=i.detail;n.api.setChecked(r)},e.addEventListener("phx:checkbox:set-checked",this.onSetChecked),this.onToggleChecked=()=>{n.api.toggleChecked()},e.addEventListener("phx:checkbox:toggle-checked",this.onToggleChecked),this.handlers=[],this.handlers.push(this.handleEvent("checkbox_set_checked",i=>{let r=i.id;r&&r!==e.id||n.api.setChecked(i.checked)})),this.handlers.push(this.handleEvent("checkbox_toggle_checked",i=>{let r=i.id;r&&r!==e.id||n.api.toggleChecked()})),this.handlers.push(this.handleEvent("checkbox_checked",()=>{this.pushEvent("checkbox_checked_response",{value:n.api.checked})})),this.handlers.push(this.handleEvent("checkbox_focused",()=>{this.pushEvent("checkbox_focused_response",{value:n.api.focused})})),this.handlers.push(this.handleEvent("checkbox_disabled",()=>{this.pushEvent("checkbox_disabled_response",{value:n.api.disabled})}))},updated(){var e;(e=this.checkbox)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlled")?{checked:C(this.el,"checked")}:{defaultChecked:C(this.el,"defaultChecked")}),{disabled:C(this.el,"disabled"),name:w(this.el,"name"),form:w(this.el,"form"),value:w(this.el,"value"),dir:Oe(this.el),invalid:C(this.el,"invalid"),required:C(this.el,"required"),readOnly:C(this.el,"readOnly"),label:w(this.el,"label")}))},destroyed(){var e;if(this.onSetChecked&&this.el.removeEventListener("phx:checkbox:set-checked",this.onSetChecked),this.onToggleChecked&&this.el.removeEventListener("phx:checkbox:toggle-checked",this.onToggleChecked),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.checkbox)==null||e.destroy()}}});var td={};he(td,{Clipboard:()=>bb});function db(e,t){let n=e.createElement("pre");return Object.assign(n.style,{width:"1px",height:"1px",position:"fixed",top:"5px"}),n.textContent=t,n}function hb(e){let n=ue(e).getSelection();if(n==null)return Promise.reject(new Error);n.removeAllRanges();let i=e.ownerDocument,r=i.createRange();return r.selectNodeContents(e),n.addRange(r),i.execCommand("copy"),n.removeAllRanges(),Promise.resolve()}function gb(e,t){var r;let n=e.defaultView||window;if(((r=n.navigator.clipboard)==null?void 0:r.writeText)!==void 0)return n.navigator.clipboard.writeText(t);if(!e.body)return Promise.reject(new Error);let i=db(e,t);return e.body.appendChild(i),hb(i),e.body.removeChild(i),Promise.resolve()}function pb(e,t){let{state:n,send:i,context:r,scope:s}=e,a=n.matches("copied");return{copied:a,value:r.get("value"),setValue(o){i({type:"VALUE.SET",value:o})},copy(){i({type:"COPY"})},getRootProps(){return t.element(y(g({},Oi.root.attrs),{"data-copied":E(a),id:ob(s)}))},getLabelProps(){return t.label(y(g({},Oi.label.attrs),{htmlFor:Oo(s),"data-copied":E(a),id:lb(s)}))},getControlProps(){return t.element(y(g({},Oi.control.attrs),{"data-copied":E(a)}))},getInputProps(){return t.input(y(g({},Oi.input.attrs),{defaultValue:r.get("value"),"data-copied":E(a),readOnly:!0,"data-readonly":"true",id:Oo(s),onFocus(o){o.currentTarget.select()},onCopy(){i({type:"INPUT.COPY"})}}))},getTriggerProps(){return t.button(y(g({},Oi.trigger.attrs),{type:"button","aria-label":a?"Copied to clipboard":"Copy to clipboard","data-copied":E(a),onClick(){i({type:"COPY"})}}))},getIndicatorProps(o){return t.element(y(g({},Oi.indicator.attrs),{hidden:o.copied!==a}))}}}var ab,Oi,ob,Oo,lb,cb,ub,fb,mb,H0,vb,B0,yb,bb,nd=re(()=>{"use strict";se();ab=U("clipboard").parts("root","control","trigger","indicator","input","label"),Oi=ab.build(),ob=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`clip:${e.id}`},Oo=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.input)!=null?n:`clip:${e.id}:input`},lb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`clip:${e.id}:label`},cb=e=>e.getById(Oo(e)),ub=(e,t)=>gb(e.getDoc(),t);fb={props({props:e}){return g({timeout:3e3,defaultValue:""},e)},initialState(){return"idle"},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var i;(i=e("onValueChange"))==null||i({value:n})}}))}},watch({track:e,context:t,action:n}){e([()=>t.get("value")],()=>{n(["syncInputElement"])})},on:{"VALUE.SET":{actions:["setValue"]},COPY:{target:"copied",actions:["copyToClipboard","invokeOnCopy"]}},states:{idle:{on:{"INPUT.COPY":{target:"copied",actions:["invokeOnCopy"]}}},copied:{effects:["waitForTimeout"],on:{"COPY.DONE":{target:"idle"},COPY:{target:"copied",actions:["copyToClipboard","invokeOnCopy"]},"INPUT.COPY":{actions:["invokeOnCopy"]}}}},implementations:{effects:{waitForTimeout({prop:e,send:t}){return mn(()=>{t({type:"COPY.DONE"})},e("timeout"))}},actions:{setValue({context:e,event:t}){e.set("value",t.value)},copyToClipboard({context:e,scope:t}){ub(t,e.get("value"))},invokeOnCopy({prop:e}){var t;(t=e("onStatusChange"))==null||t({copied:!0})},syncInputElement({context:e,scope:t}){let n=cb(t);n&&Me(n,e.get("value"))}}}},mb=_()(["getRootNode","id","ids","value","defaultValue","timeout","onStatusChange","onValueChange"]),H0=B(mb),vb=_()(["copied"]),B0=B(vb),yb=class extends K{initMachine(e){return new W(fb,e)}initApi(){return pb(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="clipboard"][data-part="root"]');if(e){this.spreadProps(e,this.api.getRootProps());let t=e.querySelector('[data-scope="clipboard"][data-part="label"]');t&&this.spreadProps(t,this.api.getLabelProps());let n=e.querySelector('[data-scope="clipboard"][data-part="control"]');if(n){this.spreadProps(n,this.api.getControlProps());let i=n.querySelector('[data-scope="clipboard"][data-part="input"]');if(i){let s=g({},this.api.getInputProps()),a=this.el.dataset.inputAriaLabel;a&&(s["aria-label"]=a),this.spreadProps(i,s)}let r=n.querySelector('[data-scope="clipboard"][data-part="trigger"]');if(r){let s=g({},this.api.getTriggerProps()),a=this.el.dataset.triggerAriaLabel;a&&(s["aria-label"]=a),this.spreadProps(r,s)}}}}},bb={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=this.liveSocket,i=new yb(e,y(g({id:e.id,timeout:z(e,"timeout")},C(e,"controlled")?{value:w(e,"value")}:{defaultValue:w(e,"defaultValue")}),{onValueChange:r=>{var a;let s=w(e,"onValueChange");s&&n.main.isConnected()&&t(s,{id:e.id,value:(a=r.value)!=null?a:null})},onStatusChange:r=>{let s=w(e,"onStatusChange");s&&n.main.isConnected()&&t(s,{id:e.id,copied:r.copied});let a=w(e,"onStatusChangeClient");a&&e.dispatchEvent(new CustomEvent(a,{bubbles:!0}))}}));i.init(),this.clipboard=i,this.onCopy=()=>{i.api.copy()},e.addEventListener("phx:clipboard:copy",this.onCopy),this.onSetValue=r=>{let{value:s}=r.detail;i.api.setValue(s)},e.addEventListener("phx:clipboard:set-value",this.onSetValue),this.handlers=[],this.handlers.push(this.handleEvent("clipboard_copy",r=>{let s=r.clipboard_id;s&&s!==e.id||i.api.copy()})),this.handlers.push(this.handleEvent("clipboard_set_value",r=>{let s=r.clipboard_id;s&&s!==e.id||i.api.setValue(r.value)})),this.handlers.push(this.handleEvent("clipboard_copied",()=>{this.pushEvent("clipboard_copied_response",{value:i.api.copied})}))},updated(){var e;(e=this.clipboard)==null||e.updateProps(y(g({id:this.el.id,timeout:z(this.el,"timeout")},C(this.el,"controlled")?{value:w(this.el,"value")}:{defaultValue:w(this.el,"value")}),{dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(this.onCopy&&this.el.removeEventListener("phx:clipboard:copy",this.onCopy),this.onSetValue&&this.el.removeEventListener("phx:clipboard:set-value",this.onSetValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.clipboard)==null||e.destroy()}}});var id={};he(id,{Collapsible:()=>wb});function Cb(e,t){let{state:n,send:i,context:r,scope:s,prop:a}=e,o=n.matches("open")||n.matches("closing"),l=n.matches("open"),c=n.matches("closed"),{width:u,height:h}=r.get("size"),m=!!a("disabled"),d=a("collapsedHeight"),p=a("collapsedWidth"),v=d!=null,I=p!=null,T=v||I,O=!r.get("initial")&&l;return{disabled:m,visible:o,open:l,measureSize(){i({type:"size.measure"})},setOpen(b){n.matches("open")!==b&&i({type:b?"open":"close"})},getRootProps(){return t.element(y(g({},Ns.root.attrs),{"data-state":l?"open":"closed",dir:a("dir"),id:Ib(s)}))},getContentProps(){return t.element(y(g({},Ns.content.attrs),{id:wo(s),"data-collapsible":"","data-state":O?void 0:l?"open":"closed","data-disabled":E(m),"data-has-collapsed-size":E(T),hidden:!o&&!T,dir:a("dir"),style:g(g({"--height":ye(h),"--width":ye(u),"--collapsed-height":ye(d),"--collapsed-width":ye(p)},c&&v&&{overflow:"hidden",minHeight:ye(d),maxHeight:ye(d)}),c&&I&&{overflow:"hidden",minWidth:ye(p),maxWidth:ye(p)})}))},getTriggerProps(){return t.element(y(g({},Ns.trigger.attrs),{id:Pb(s),dir:a("dir"),type:"button","data-state":l?"open":"closed","data-disabled":E(m),"aria-controls":wo(s),"aria-expanded":o||!1,onClick(b){b.defaultPrevented||m||i({type:l?"close":"open"})}}))},getIndicatorProps(){return t.element(y(g({},Ns.indicator.attrs),{dir:a("dir"),"data-state":l?"open":"closed","data-disabled":E(m)}))}}}var Eb,Ns,Ib,wo,Pb,mr,Sb,Tb,q0,Ob,wb,rd=re(()=>{"use strict";se();Eb=U("collapsible").parts("root","trigger","content","indicator"),Ns=Eb.build(),Ib=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`collapsible:${e.id}`},wo=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`collapsible:${e.id}:content`},Pb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`collapsible:${e.id}:trigger`},mr=e=>e.getById(wo(e));Sb={initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{size:e(()=>({defaultValue:{height:0,width:0},sync:!0})),initial:e(()=>({defaultValue:!1}))}},refs(){return{cleanup:void 0,stylesRef:void 0}},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["setInitial","computeSize","toggleVisibility"])})},exit:["cleanupNode"],states:{closed:{effects:["trackTabbableElements"],on:{"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitial","computeSize","invokeOnOpen"]}]}},closing:{effects:["trackExitAnimation"],on:{"controlled.close":{target:"closed"},"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitial","invokeOnOpen"]}],close:[{guard:"isOpenControlled",actions:["invokeOnExitComplete"]},{target:"closed",actions:["setInitial","computeSize","invokeOnExitComplete"]}],"animation.end":{target:"closed",actions:["invokeOnExitComplete","clearInitial"]}}},open:{effects:["trackEnterAnimation"],on:{"controlled.close":{target:"closing"},close:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closing",actions:["setInitial","computeSize","invokeOnClose"]}],"size.measure":{actions:["measureSize"]},"animation.end":{actions:["clearInitial"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackEnterAnimation:({send:e,scope:t})=>{let n,i=H(()=>{let r=mr(t);if(!r)return;let s=at(r).animationName;if(!s||s==="none"){e({type:"animation.end"});return}let o=l=>{j(l)===r&&e({type:"animation.end"})};r.addEventListener("animationend",o),n=()=>{r.removeEventListener("animationend",o)}});return()=>{i(),n==null||n()}},trackExitAnimation:({send:e,scope:t})=>{let n,i=H(()=>{let r=mr(t);if(!r)return;let s=at(r).animationName;if(!s||s==="none"){e({type:"animation.end"});return}let o=c=>{j(c)===r&&e({type:"animation.end"})};r.addEventListener("animationend",o);let l=Hn(r,{animationFillMode:"forwards"});n=()=>{r.removeEventListener("animationend",o),$n(()=>l())}});return()=>{i(),n==null||n()}},trackTabbableElements:({scope:e,prop:t})=>{if(!t("collapsedHeight")&&!t("collapsedWidth"))return;let n=mr(e);if(!n)return;let i=()=>{let o=jt(n).map(l=>Fc(l,"inert",""));return()=>{o.forEach(l=>l())}},r=i(),s=hs(n,{callback(){r(),r=i()}});return()=>{r(),s()}}},actions:{setInitial:({context:e,flush:t})=>{t(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},cleanupNode:({refs:e})=>{e.set("stylesRef",null)},measureSize:({context:e,scope:t})=>{let n=mr(t);if(!n)return;let{height:i,width:r}=n.getBoundingClientRect();e.set("size",{height:i,width:r})},computeSize:({refs:e,scope:t,context:n})=>{var r;(r=e.get("cleanup"))==null||r();let i=H(()=>{let s=mr(t);if(!s)return;let a=s.hidden;s.style.animationName="none",s.style.animationDuration="0s",s.hidden=!1;let o=s.getBoundingClientRect();n.set("size",{height:o.height,width:o.width}),n.get("initial")&&(s.style.animationName="",s.style.animationDuration=""),s.hidden=a});e.set("cleanup",i)},invokeOnOpen:({prop:e})=>{var t;(t=e("onOpenChange"))==null||t({open:!0})},invokeOnClose:({prop:e})=>{var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},toggleVisibility:({prop:e,send:t})=>{t({type:e("open")?"controlled.open":"controlled.close"})}}}},Tb=_()(["dir","disabled","getRootNode","id","ids","collapsedHeight","collapsedWidth","onExitComplete","onOpenChange","defaultOpen","open"]),q0=B(Tb),Ob=class extends K{initMachine(e){return new W(Sb,e)}initApi(){return Cb(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="collapsible"][data-part="root"]');if(e){this.spreadProps(e,this.api.getRootProps());let t=e.querySelector('[data-scope="collapsible"][data-part="trigger"]');t&&this.spreadProps(t,this.api.getTriggerProps());let n=e.querySelector('[data-scope="collapsible"][data-part="content"]');n&&this.spreadProps(n,this.api.getContentProps())}}},wb={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=new Ob(e,y(g({id:e.id},C(e,"controlled")?{open:C(e,"open")}:{defaultOpen:C(e,"defaultOpen")}),{disabled:C(e,"disabled"),dir:w(e,"dir",["ltr","rtl"]),onOpenChange:i=>{let r=w(e,"onOpenChange");r&&this.liveSocket.main.isConnected()&&t(r,{id:e.id,open:i.open});let s=w(e,"onOpenChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{id:e.id,open:i.open}}))}}));n.init(),this.collapsible=n,this.onSetOpen=i=>{let{open:r}=i.detail;n.api.setOpen(r)},e.addEventListener("phx:collapsible:set-open",this.onSetOpen),this.handlers=[],this.handlers.push(this.handleEvent("collapsible_set_open",i=>{let r=i.collapsible_id;r&&r!==e.id||n.api.setOpen(i.open)})),this.handlers.push(this.handleEvent("collapsible_open",()=>{this.pushEvent("collapsible_open_response",{value:n.api.open})}))},updated(){var e;(e=this.collapsible)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlled")?{open:C(this.el,"open")}:{defaultOpen:C(this.el,"defaultOpen")}),{disabled:C(this.el,"disabled"),dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(this.onSetOpen&&this.el.removeEventListener("phx:collapsible:set-open",this.onSetOpen),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.collapsible)==null||e.destroy()}}});function vr(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function Rs(e,t,n){t=[...t].sort((r,s)=>r-s);let i=t.map(r=>e[r]);for(let r=t.length-1;r>=0;r--)e=[...e.slice(0,t[r]),...e.slice(t[r]+1)];return n=Math.max(0,n-t.filter(r=>rt[n])return 1}return e.length-t.length}function Nb(e){return e.sort(ud)}function Rb(e,t){let n;return Je(e,y(g({},t),{onEnter:(i,r)=>{if(t.predicate(i,r))return n=i,"stop"}})),n}function Db(e,t){let n=[];return Je(e,{onEnter:(i,r)=>{t.predicate(i,r)&&n.push(i)},getChildren:t.getChildren}),n}function sd(e,t){let n;return Je(e,{onEnter:(i,r)=>{if(t.predicate(i,r))return n=[...r],"stop"},getChildren:t.getChildren}),n}function Lb(e,t){let n=t.initialResult;return Je(e,y(g({},t),{onEnter:(i,r)=>{n=t.nextResult(n,i,r)}})),n}function Mb(e,t){return Lb(e,y(g({},t),{initialResult:[],nextResult:(n,i,r)=>(n.push(...t.transform(i,r)),n)}))}function Fb(e,t){let{predicate:n,create:i,getChildren:r}=t,s=(a,o)=>{let l=r(a,o),c=[];l.forEach((d,p)=>{let v=[...o,p],I=s(d,v);I&&c.push(I)});let u=o.length===0,h=n(a,o),m=c.length>0;return u||h||m?i(a,c,o):null};return s(e,[])||i(e,[],[])}function $b(e,t){let n=[],i=0,r=new Map,s=new Map;return Je(e,{getChildren:t.getChildren,onEnter:(a,o)=>{r.has(a)||r.set(a,i++);let l=t.getChildren(a,o);l.forEach(d=>{s.has(d)||s.set(d,a),r.has(d)||r.set(d,i++)});let c=l.length>0?l.map(d=>r.get(d)):void 0,u=s.get(a),h=u?r.get(u):void 0,m=r.get(a);n.push(y(g({},a),{_children:c,_parent:h,_index:m}))}}),n}function Hb(e,t){return{type:"insert",index:e,nodes:t}}function Bb(e){return{type:"remove",indexes:e}}function xo(){return{type:"replace"}}function dd(e){return[e.slice(0,-1),e[e.length-1]]}function hd(e,t,n=new Map){var a;let[i,r]=dd(e);for(let o=i.length-1;o>=0;o--){let l=i.slice(0,o).join();switch((a=n.get(l))==null?void 0:a.type){case"remove":continue}n.set(l,xo())}let s=n.get(i.join());switch(s==null?void 0:s.type){case"remove":n.set(i.join(),{type:"removeThenInsert",removeIndexes:s.indexes,insertIndex:r,insertNodes:t});break;default:n.set(i.join(),Hb(r,t))}return n}function gd(e){var i;let t=new Map,n=new Map;for(let r of e){let s=r.slice(0,-1).join(),a=(i=n.get(s))!=null?i:[];a.push(r[r.length-1]),n.set(s,a.sort((o,l)=>o-l))}for(let r of e)for(let s=r.length-2;s>=0;s--){let a=r.slice(0,s).join();t.has(a)||t.set(a,xo())}for(let[r,s]of n)t.set(r,Bb(s));return t}function _b(e,t){let n=new Map,[i,r]=dd(e);for(let s=i.length-1;s>=0;s--){let a=i.slice(0,s).join();n.set(a,xo())}return n.set(i.join(),{type:"removeThenInsert",removeIndexes:[r],insertIndex:r,insertNodes:[t]}),n}function Ms(e,t,n){return Gb(e,y(g({},n),{getChildren:(i,r)=>{let s=r.join(),a=t.get(s);switch(a==null?void 0:a.type){case"replace":case"remove":case"removeThenInsert":case"insert":return n.getChildren(i,r);default:return[]}},transform:(i,r,s)=>{let a=s.join(),o=t.get(a);switch(o==null?void 0:o.type){case"remove":return n.create(i,r.filter((u,h)=>!o.indexes.includes(h)),s);case"removeThenInsert":let l=r.filter((u,h)=>!o.removeIndexes.includes(h)),c=o.removeIndexes.reduce((u,h)=>h{var u,h;let s=[0,...r],a=s.join(),o=t.transform(i,(u=n[a])!=null?u:[],r),l=s.slice(0,-1).join(),c=(h=n[l])!=null?h:[];c.push(o),n[l]=c}})),n[""][0]}function Ub(e,t){let{nodes:n,at:i}=t;if(i.length===0)throw new Error("Can't insert nodes at the root");let r=hd(i,n);return Ms(e,r,t)}function qb(e,t){if(t.at.length===0)return t.node;let n=_b(t.at,t.node);return Ms(e,n,t)}function Wb(e,t){if(t.indexPaths.length===0)return e;for(let i of t.indexPaths)if(i.length===0)throw new Error("Can't remove the root node");let n=gd(t.indexPaths);return Ms(e,n,t)}function Kb(e,t){if(t.indexPaths.length===0)return e;for(let s of t.indexPaths)if(s.length===0)throw new Error("Can't move the root node");if(t.to.length===0)throw new Error("Can't move nodes to the root");let n=kb(t.indexPaths),i=n.map(s=>cd(e,s,t)),r=hd(t.to,i,gd(n));return Ms(e,r,t)}function Je(e,t){let{onEnter:n,onLeave:i,getChildren:r}=t,s=[],a=[{node:e}],o=t.reuseIndexPath?()=>s:()=>s.slice();for(;a.length>0;){let l=a[a.length-1];if(l.state===void 0){let u=n==null?void 0:n(l.node,o());if(u==="stop")return;l.state=u==="skip"?-1:0}let c=l.children||r(l.node,o());if(l.children||(l.children=c),l.state!==-1){if(l.state{"use strict";se();Vb=Object.defineProperty,xb=(e,t,n)=>t in e?Vb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,L=(e,t,n)=>xb(e,typeof t!="symbol"?t+"":t,n),Ds={itemToValue(e){return typeof e=="string"?e:xt(e)&&$e(e,"value")?e.value:""},itemToString(e){return typeof e=="string"?e:xt(e)&&$e(e,"label")?e.label:Ds.itemToValue(e)},isItemDisabled(e){return xt(e)&&$e(e,"disabled")?!!e.disabled:!1}},Nt=class od{constructor(t){this.options=t,L(this,"items"),L(this,"indexMap",null),L(this,"copy",n=>new od(y(g({},this.options),{items:n!=null?n:[...this.items]}))),L(this,"isEqual",n=>fe(this.items,n.items)),L(this,"setItems",n=>this.copy(n)),L(this,"getValues",(n=this.items)=>{let i=[];for(let r of n){let s=this.getItemValue(r);s!=null&&i.push(s)}return i}),L(this,"find",n=>{if(n==null)return null;let i=this.indexOf(n);return i!==-1?this.at(i):null}),L(this,"findMany",n=>{let i=[];for(let r of n){let s=this.find(r);s!=null&&i.push(s)}return i}),L(this,"at",n=>{var s;if(!this.options.groupBy&&!this.options.groupSort)return(s=this.items[n])!=null?s:null;let i=0,r=this.group();for(let[,a]of r)for(let o of a){if(i===n)return o;i++}return null}),L(this,"sortFn",(n,i)=>{let r=this.indexOf(n),s=this.indexOf(i);return(r!=null?r:0)-(s!=null?s:0)}),L(this,"sort",n=>[...n].sort(this.sortFn.bind(this))),L(this,"getItemValue",n=>{var i,r,s;return n==null?null:(s=(r=(i=this.options).itemToValue)==null?void 0:r.call(i,n))!=null?s:Ds.itemToValue(n)}),L(this,"getItemDisabled",n=>{var i,r,s;return n==null?!1:(s=(r=(i=this.options).isItemDisabled)==null?void 0:r.call(i,n))!=null?s:Ds.isItemDisabled(n)}),L(this,"stringifyItem",n=>{var i,r,s;return n==null?null:(s=(r=(i=this.options).itemToString)==null?void 0:r.call(i,n))!=null?s:Ds.itemToString(n)}),L(this,"stringify",n=>n==null?null:this.stringifyItem(this.find(n))),L(this,"stringifyItems",(n,i=", ")=>{let r=[];for(let s of n){let a=this.stringifyItem(s);a!=null&&r.push(a)}return r.join(i)}),L(this,"stringifyMany",(n,i)=>this.stringifyItems(this.findMany(n),i)),L(this,"has",n=>this.indexOf(n)!==-1),L(this,"hasItem",n=>n==null?!1:this.has(this.getItemValue(n))),L(this,"group",()=>{let{groupBy:n,groupSort:i}=this.options;if(!n)return[["",[...this.items]]];let r=new Map;this.items.forEach((a,o)=>{let l=n(a,o);r.has(l)||r.set(l,[]),r.get(l).push(a)});let s=Array.from(r.entries());return i&&s.sort(([a],[o])=>{if(typeof i=="function")return i(a,o);if(Array.isArray(i)){let l=i.indexOf(a),c=i.indexOf(o);return l===-1?1:c===-1?-1:l-c}return i==="asc"?a.localeCompare(o):i==="desc"?o.localeCompare(a):0}),s}),L(this,"getNextValue",(n,i=1,r=!1)=>{let s=this.indexOf(n);if(s===-1)return null;for(s=r?Math.min(s+i,this.size-1):s+i;s<=this.size&&this.getItemDisabled(this.at(s));)s++;return this.getItemValue(this.at(s))}),L(this,"getPreviousValue",(n,i=1,r=!1)=>{let s=this.indexOf(n);if(s===-1)return null;for(s=r?Math.max(s-i,0):s-i;s>=0&&this.getItemDisabled(this.at(s));)s--;return this.getItemValue(this.at(s))}),L(this,"indexOf",n=>{var i;if(n==null)return-1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex(r=>this.getItemValue(r)===n);if(!this.indexMap){this.indexMap=new Map;let r=0,s=this.group();for(let[,a]of s)for(let o of a){let l=this.getItemValue(o);l!=null&&this.indexMap.set(l,r),r++}}return(i=this.indexMap.get(n))!=null?i:-1}),L(this,"getByText",(n,i)=>{let r=i!=null?this.indexOf(i):-1,s=n.length===1;for(let a=0;a{let{state:r,currentValue:s,timeout:a=350}=i,o=r.keysSoFar+n,c=o.length>1&&Array.from(o).every(p=>p===o[0])?o[0]:o,u=this.getByText(c,s),h=this.getItemValue(u);function m(){clearTimeout(r.timer),r.timer=-1}function d(p){r.keysSoFar=p,m(),p!==""&&(r.timer=+setTimeout(()=>{d(""),m()},a))}return d(o),h}),L(this,"update",(n,i)=>{let r=this.indexOf(n);return r===-1?this:this.copy([...this.items.slice(0,r),i,...this.items.slice(r+1)])}),L(this,"upsert",(n,i,r="append")=>{let s=this.indexOf(n);return s===-1?(r==="append"?this.append:this.prepend)(i):this.copy([...this.items.slice(0,s),i,...this.items.slice(s+1)])}),L(this,"insert",(n,...i)=>this.copy(vr(this.items,n,...i))),L(this,"insertBefore",(n,...i)=>{let r=this.indexOf(n);if(r===-1)if(this.items.length===0)r=0;else return this;return this.copy(vr(this.items,r,...i))}),L(this,"insertAfter",(n,...i)=>{let r=this.indexOf(n);if(r===-1)if(this.items.length===0)r=0;else return this;return this.copy(vr(this.items,r+1,...i))}),L(this,"prepend",(...n)=>this.copy(vr(this.items,0,...n))),L(this,"append",(...n)=>this.copy(vr(this.items,this.items.length,...n))),L(this,"filter",n=>{let i=this.items.filter((r,s)=>n(this.stringifyItem(r),s,r));return this.copy(i)}),L(this,"remove",(...n)=>{let i=n.map(r=>typeof r=="string"?r:this.getItemValue(r));return this.copy(this.items.filter(r=>{let s=this.getItemValue(r);return s==null?!1:!i.includes(s)}))}),L(this,"move",(n,i)=>{let r=this.indexOf(n);return r===-1?this:this.copy(Rs(this.items,[r],i))}),L(this,"moveBefore",(n,...i)=>{let r=this.items.findIndex(a=>this.getItemValue(a)===n);if(r===-1)return this;let s=i.map(a=>this.items.findIndex(o=>this.getItemValue(o)===a)).sort((a,o)=>a-o);return this.copy(Rs(this.items,s,r))}),L(this,"moveAfter",(n,...i)=>{let r=this.items.findIndex(a=>this.getItemValue(a)===n);if(r===-1)return this;let s=i.map(a=>this.items.findIndex(o=>this.getItemValue(o)===a)).sort((a,o)=>a-o);return this.copy(Rs(this.items,s,r+1))}),L(this,"reorder",(n,i)=>this.copy(Rs(this.items,[n],i))),L(this,"compareValue",(n,i)=>{let r=this.indexOf(n),s=this.indexOf(i);return rs?1:0}),L(this,"range",(n,i)=>{let r=[],s=n;for(;s!=null;){if(this.find(s)&&r.push(s),s===i)return r;s=this.getNextValue(s)}return[]}),L(this,"getValueRange",(n,i)=>n&&i?this.compareValue(n,i)<=0?this.range(n,i):this.range(i,n):[]),L(this,"toString",()=>{let n="";for(let i of this.items){let r=this.getItemValue(i),s=this.stringifyItem(i),a=this.getItemDisabled(i),o=[r,s,a].filter(Boolean).join(":");n+=o+","}return n}),L(this,"toJSON",()=>({size:this.size,first:this.firstValue,last:this.lastValue})),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let t=0;for(;this.getItemDisabled(this.at(t));)t++;return this.getItemValue(this.at(t))}get lastValue(){let t=this.size-1;for(;this.getItemDisabled(this.at(t));)t--;return this.getItemValue(this.at(t))}*[Symbol.iterator](){yield*sc(this.items)}},Ab=(e,t)=>!!(e!=null&&e.toLowerCase().startsWith(t.toLowerCase()));Vo=class extends Nt{constructor(e){let{columnCount:t}=e;super(e),L(this,"columnCount"),L(this,"rows",null),L(this,"getRows",()=>(this.rows||(this.rows=cr([...this.items],this.columnCount)),this.rows)),L(this,"getRowCount",()=>Math.ceil(this.items.length/this.columnCount)),L(this,"getCellIndex",(n,i)=>n*this.columnCount+i),L(this,"getCell",(n,i)=>this.at(this.getCellIndex(n,i))),L(this,"getValueCell",n=>{let i=this.indexOf(n);if(i===-1)return null;let r=Math.floor(i/this.columnCount),s=i%this.columnCount;return{row:r,column:s}}),L(this,"getLastEnabledColumnIndex",n=>{for(let i=this.columnCount-1;i>=0;i--){let r=this.getCell(n,i);if(r&&!this.getItemDisabled(r))return i}return null}),L(this,"getFirstEnabledColumnIndex",n=>{for(let i=0;i{let r=this.getValueCell(n);if(r===null)return null;let s=this.getRows(),a=s.length,o=r.row,l=r.column;for(let c=1;c<=a;c++){o=lr(s,o,{loop:i});let u=s[o];if(!u)continue;if(!u[l]){let d=this.getLastEnabledColumnIndex(o);d!=null&&(l=d)}let m=this.getCell(o,l);if(!this.getItemDisabled(m))return this.getItemValue(m)}return this.firstValue}),L(this,"getNextRowValue",(n,i=!1)=>{let r=this.getValueCell(n);if(r===null)return null;let s=this.getRows(),a=s.length,o=r.row,l=r.column;for(let c=1;c<=a;c++){o=Ei(s,o,{loop:i});let u=s[o];if(!u)continue;if(!u[l]){let d=this.getLastEnabledColumnIndex(o);d!=null&&(l=d)}let m=this.getCell(o,l);if(!this.getItemDisabled(m))return this.getItemValue(m)}return this.lastValue}),this.columnCount=t}};ld=class Ls extends Set{constructor(t=[]){super(t),L(this,"selectionMode","single"),L(this,"deselectable",!0),L(this,"copy",()=>{let n=new Ls([...this]);return this.sync(n)}),L(this,"sync",n=>(n.selectionMode=this.selectionMode,n.deselectable=this.deselectable,n)),L(this,"isEmpty",()=>this.size===0),L(this,"isSelected",n=>this.selectionMode==="none"||n==null?!1:this.has(n)),L(this,"canSelect",(n,i)=>this.selectionMode!=="none"||!n.getItemDisabled(n.find(i))),L(this,"firstSelectedValue",n=>{let i=null;for(let r of this)(!i||n.compareValue(r,i)<0)&&(i=r);return i}),L(this,"lastSelectedValue",n=>{let i=null;for(let r of this)(!i||n.compareValue(r,i)>0)&&(i=r);return i}),L(this,"extendSelection",(n,i,r)=>{if(this.selectionMode==="none")return this;if(this.selectionMode==="single")return this.replaceSelection(n,r);let s=this.copy(),a=Array.from(this).pop();for(let o of n.getValueRange(i,a!=null?a:r))s.delete(o);for(let o of n.getValueRange(r,i))this.canSelect(n,o)&&s.add(o);return s}),L(this,"toggleSelection",(n,i)=>{if(this.selectionMode==="none")return this;if(this.selectionMode==="single"&&!this.isSelected(i))return this.replaceSelection(n,i);let r=this.copy();return r.has(i)?r.delete(i):r.canSelect(n,i)&&r.add(i),r}),L(this,"replaceSelection",(n,i)=>{if(this.selectionMode==="none")return this;if(i==null)return this;if(!this.canSelect(n,i))return this;let r=new Ls([i]);return this.sync(r)}),L(this,"setSelection",n=>{if(this.selectionMode==="none")return this;let i=new Ls;for(let r of n)if(r!=null&&(i.add(r),this.selectionMode==="single"))break;return this.sync(i)}),L(this,"clearSelection",()=>{let n=this.copy();return n.deselectable&&n.size>0&&n.clear(),n}),L(this,"select",(n,i,r)=>this.selectionMode==="none"?this:this.selectionMode==="single"?this.isSelected(i)&&this.deselectable?this.toggleSelection(n,i):this.replaceSelection(n,i):this.selectionMode==="multiple"||r?this.toggleSelection(n,i):this.replaceSelection(n,i)),L(this,"deselect",n=>{let i=this.copy();return i.delete(n),i}),L(this,"isEqual",n=>fe(Array.from(this),Array.from(n)))}};Ao=class pd{constructor(t){this.options=t,L(this,"rootNode"),L(this,"isEqual",n=>fe(this.rootNode,n.rootNode)),L(this,"getNodeChildren",n=>{var i,r,s,a;return(a=(s=(r=(i=this.options).nodeToChildren)==null?void 0:r.call(i,n))!=null?s:wi.nodeToChildren(n))!=null?a:[]}),L(this,"resolveIndexPath",n=>typeof n=="string"?this.getIndexPath(n):n),L(this,"resolveNode",n=>{let i=this.resolveIndexPath(n);return i?this.at(i):void 0}),L(this,"getNodeChildrenCount",n=>{var i,r,s;return(s=(r=(i=this.options).nodeToChildrenCount)==null?void 0:r.call(i,n))!=null?s:wi.nodeToChildrenCount(n)}),L(this,"getNodeValue",n=>{var i,r,s;return(s=(r=(i=this.options).nodeToValue)==null?void 0:r.call(i,n))!=null?s:wi.nodeToValue(n)}),L(this,"getNodeDisabled",n=>{var i,r,s;return(s=(r=(i=this.options).isNodeDisabled)==null?void 0:r.call(i,n))!=null?s:wi.isNodeDisabled(n)}),L(this,"stringify",n=>{let i=this.findNode(n);return i?this.stringifyNode(i):null}),L(this,"stringifyNode",n=>{var i,r,s;return(s=(r=(i=this.options).nodeToString)==null?void 0:r.call(i,n))!=null?s:wi.nodeToString(n)}),L(this,"getFirstNode",(n=this.rootNode,i={})=>{let r;return Je(n,{getChildren:this.getNodeChildren,onEnter:(s,a)=>{var o;if(!this.isSameNode(s,n)){if((o=i.skip)!=null&&o.call(i,{value:this.getNodeValue(s),node:s,indexPath:a}))return"skip";if(!r&&a.length>0&&!this.getNodeDisabled(s))return r=s,"stop"}}}),r}),L(this,"getLastNode",(n=this.rootNode,i={})=>{let r;return Je(n,{getChildren:this.getNodeChildren,onEnter:(s,a)=>{var o;if(!this.isSameNode(s,n)){if((o=i.skip)!=null&&o.call(i,{value:this.getNodeValue(s),node:s,indexPath:a}))return"skip";a.length>0&&!this.getNodeDisabled(s)&&(r=s)}}}),r}),L(this,"at",n=>cd(this.rootNode,n,{getChildren:this.getNodeChildren})),L(this,"findNode",(n,i=this.rootNode)=>Rb(i,{getChildren:this.getNodeChildren,predicate:r=>this.getNodeValue(r)===n})),L(this,"findNodes",(n,i=this.rootNode)=>{let r=new Set(n.filter(s=>s!=null));return Db(i,{getChildren:this.getNodeChildren,predicate:s=>r.has(this.getNodeValue(s))})}),L(this,"sort",n=>n.reduce((i,r)=>{let s=this.getIndexPath(r);return s&&i.push({value:r,indexPath:s}),i},[]).sort((i,r)=>ud(i.indexPath,r.indexPath)).map(({value:i})=>i)),L(this,"getIndexPath",n=>sd(this.rootNode,{getChildren:this.getNodeChildren,predicate:i=>this.getNodeValue(i)===n})),L(this,"getValue",n=>{let i=this.at(n);return i?this.getNodeValue(i):void 0}),L(this,"getValuePath",n=>{if(!n)return[];let i=[],r=[...n];for(;r.length>0;){let s=this.at(r);s&&i.unshift(this.getNodeValue(s)),r.pop()}return i}),L(this,"getDepth",n=>{var r;let i=sd(this.rootNode,{getChildren:this.getNodeChildren,predicate:s=>this.getNodeValue(s)===n});return(r=i==null?void 0:i.length)!=null?r:0}),L(this,"isSameNode",(n,i)=>this.getNodeValue(n)===this.getNodeValue(i)),L(this,"isRootNode",n=>this.isSameNode(n,this.rootNode)),L(this,"contains",(n,i)=>!n||!i?!1:i.slice(0,n.length).every((r,s)=>n[s]===i[s])),L(this,"getNextNode",(n,i={})=>{let r=!1,s;return Je(this.rootNode,{getChildren:this.getNodeChildren,onEnter:(a,o)=>{var c;if(this.isRootNode(a))return;let l=this.getNodeValue(a);if((c=i.skip)!=null&&c.call(i,{value:l,node:a,indexPath:o}))return l===n&&(r=!0),"skip";if(r&&!this.getNodeDisabled(a))return s=a,"stop";l===n&&(r=!0)}}),s}),L(this,"getPreviousNode",(n,i={})=>{let r,s=!1;return Je(this.rootNode,{getChildren:this.getNodeChildren,onEnter:(a,o)=>{var c;if(this.isRootNode(a))return;let l=this.getNodeValue(a);if((c=i.skip)!=null&&c.call(i,{value:l,node:a,indexPath:o}))return"skip";if(l===n)return s=!0,"stop";this.getNodeDisabled(a)||(r=a)}}),s?r:void 0}),L(this,"getParentNodes",n=>{var s;let i=(s=this.resolveIndexPath(n))==null?void 0:s.slice();if(!i)return[];let r=[];for(;i.length>0;){i.pop();let a=this.at(i);a&&!this.isRootNode(a)&&r.unshift(a)}return r}),L(this,"getDescendantNodes",(n,i)=>{let r=this.resolveNode(n);if(!r)return[];let s=[];return Je(r,{getChildren:this.getNodeChildren,onEnter:(a,o)=>{o.length!==0&&(!(i!=null&&i.withBranch)&&this.isBranchNode(a)||s.push(a))}}),s}),L(this,"getDescendantValues",(n,i)=>this.getDescendantNodes(n,i).map(s=>this.getNodeValue(s))),L(this,"getParentIndexPath",n=>n.slice(0,-1)),L(this,"getParentNode",n=>{let i=this.resolveIndexPath(n);return i?this.at(this.getParentIndexPath(i)):void 0}),L(this,"visit",n=>{let s=n,{skip:i}=s,r=ft(s,["skip"]);Je(this.rootNode,y(g({},r),{getChildren:this.getNodeChildren,onEnter:(a,o)=>{var l;if(!this.isRootNode(a))return i!=null&&i({value:this.getNodeValue(a),node:a,indexPath:o})?"skip":(l=r.onEnter)==null?void 0:l.call(r,a,o)}}))}),L(this,"getPreviousSibling",n=>{let i=this.getParentNode(n);if(!i)return;let r=this.getNodeChildren(i),s=n[n.length-1];for(;--s>=0;){let a=r[s];if(!this.getNodeDisabled(a))return a}}),L(this,"getNextSibling",n=>{let i=this.getParentNode(n);if(!i)return;let r=this.getNodeChildren(i),s=n[n.length-1];for(;++s{let i=this.getParentNode(n);return i?this.getNodeChildren(i):[]}),L(this,"getValues",(n=this.rootNode)=>Mb(n,{getChildren:this.getNodeChildren,transform:r=>[this.getNodeValue(r)]}).slice(1)),L(this,"isValidDepth",(n,i)=>i==null?!0:typeof i=="function"?i(n.length):n.length===i),L(this,"isBranchNode",n=>this.getNodeChildren(n).length>0||this.getNodeChildrenCount(n)!=null),L(this,"getBranchValues",(n=this.rootNode,i={})=>{let r=[];return Je(n,{getChildren:this.getNodeChildren,onEnter:(s,a)=>{var l;if(a.length===0)return;let o=this.getNodeValue(s);if((l=i.skip)!=null&&l.call(i,{value:o,node:s,indexPath:a}))return"skip";this.isBranchNode(s)&&this.isValidDepth(a,i.depth)&&r.push(this.getNodeValue(s))}}),r}),L(this,"flatten",(n=this.rootNode)=>$b(n,{getChildren:this.getNodeChildren})),L(this,"_create",(n,i)=>this.getNodeChildren(n).length>0||i.length>0?y(g({},n),{children:i}):g({},n)),L(this,"_insert",(n,i,r)=>this.copy(Ub(n,{at:i,nodes:r,getChildren:this.getNodeChildren,create:this._create}))),L(this,"copy",n=>new pd(y(g({},this.options),{rootNode:n}))),L(this,"_replace",(n,i,r)=>this.copy(qb(n,{at:i,node:r,getChildren:this.getNodeChildren,create:this._create}))),L(this,"_move",(n,i,r)=>this.copy(Kb(n,{indexPaths:i,to:r,getChildren:this.getNodeChildren,create:this._create}))),L(this,"_remove",(n,i)=>this.copy(Wb(n,{indexPaths:i,getChildren:this.getNodeChildren,create:this._create}))),L(this,"replace",(n,i)=>this._replace(this.rootNode,n,i)),L(this,"remove",n=>this._remove(this.rootNode,n)),L(this,"insertBefore",(n,i)=>this.getParentNode(n)?this._insert(this.rootNode,n,i):void 0),L(this,"insertAfter",(n,i)=>{if(!this.getParentNode(n))return;let s=[...n.slice(0,-1),n[n.length-1]+1];return this._insert(this.rootNode,s,i)}),L(this,"move",(n,i)=>this._move(this.rootNode,n,i)),L(this,"filter",n=>{let i=Fb(this.rootNode,{predicate:n,getChildren:this.getNodeChildren,create:this._create});return this.copy(i)}),L(this,"toJSON",()=>this.getValues(this.rootNode)),this.rootNode=t.rootNode}},wi={nodeToValue(e){return typeof e=="string"?e:xt(e)&&$e(e,"value")?e.value:""},nodeToString(e){return typeof e=="string"?e:xt(e)&&$e(e,"label")?e.label:wi.nodeToValue(e)},isNodeDisabled(e){return xt(e)&&$e(e,"disabled")?!!e.disabled:!1},nodeToChildren(e){return e.children},nodeToChildrenCount(e){if(xt(e)&&$e(e,"childrenCount"))return e.childrenCount}}});function No(e,t,n){return Qe(e,Sn(t,n))}function Qt(e,t){return typeof e=="function"?e(t):e}function en(e){return e.split("-")[0]}function Ai(e){return e.split("-")[1]}function Lo(e){return e==="x"?"y":"x"}function Mo(e){return e==="y"?"height":"width"}function Rt(e){return Xb.has(en(e))?"y":"x"}function Fo(e){return Lo(Rt(e))}function Zb(e,t,n){n===void 0&&(n=!1);let i=Ai(e),r=Fo(e),s=Mo(r),a=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Hs(a)),[a,Hs(a)]}function Jb(e){let t=Hs(e);return[Ro(e),t,Ro(t)]}function Ro(e){return e.replace(/start|end/g,t=>jb[t])}function tE(e,t,n){switch(e){case"top":case"bottom":return n?t?md:fd:t?fd:md;case"left":case"right":return t?Qb:eE;default:return[]}}function nE(e,t,n,i){let r=Ai(e),s=tE(en(e),n==="start",i);return r&&(s=s.map(a=>a+"-"+r),t&&(s=s.concat(s.map(Ro)))),s}function Hs(e){return e.replace(/left|right|bottom|top/g,t=>Yb[t])}function iE(e){return g({top:0,right:0,bottom:0,left:0},e)}function Od(e){return typeof e!="number"?iE(e):{top:e,right:e,bottom:e,left:e}}function Bs(e){let{x:t,y:n,width:i,height:r}=e;return{width:i,height:r,top:n,left:t,right:t+i,bottom:n+r,x:t,y:n}}function vd(e,t,n){let{reference:i,floating:r}=e,s=Rt(t),a=Fo(t),o=Mo(a),l=en(t),c=s==="y",u=i.x+i.width/2-r.width/2,h=i.y+i.height/2-r.height/2,m=i[o]/2-r[o]/2,d;switch(l){case"top":d={x:u,y:i.y-r.height};break;case"bottom":d={x:u,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:h};break;case"left":d={x:i.x-r.width,y:h};break;default:d={x:i.x,y:i.y}}switch(Ai(t)){case"start":d[a]-=m*(n&&c?-1:1);break;case"end":d[a]+=m*(n&&c?-1:1);break}return d}function rE(e,t){return Ve(this,null,function*(){var n;t===void 0&&(t={});let{x:i,y:r,platform:s,rects:a,elements:o,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:m=!1,padding:d=0}=Qt(t,e),p=Od(d),I=o[m?h==="floating"?"reference":"floating":h],T=Bs(yield s.getClippingRect({element:(n=yield s.isElement==null?void 0:s.isElement(I))==null||n?I:I.contextElement||(yield s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:c,rootBoundary:u,strategy:l})),O=h==="floating"?{x:i,y:r,width:a.floating.width,height:a.floating.height}:a.reference,b=yield s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating),f=(yield s.isElement==null?void 0:s.isElement(b))?(yield s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},S=Bs(s.convertOffsetParentRelativeRectToViewportRelativeRect?yield s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:O,offsetParent:b,strategy:l}):O);return{top:(T.top-S.top+p.top)/f.y,bottom:(S.bottom-T.bottom+p.bottom)/f.y,left:(T.left-S.left+p.left)/f.x,right:(S.right-T.right+p.right)/f.x}})}function yd(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bd(e){return zb.some(t=>e[t]>=0)}function cE(e,t){return Ve(this,null,function*(){let{placement:n,platform:i,elements:r}=e,s=yield i.isRTL==null?void 0:i.isRTL(r.floating),a=en(n),o=Ai(n),l=Rt(n)==="y",c=wd.has(a)?-1:1,u=s&&l?-1:1,h=Qt(t,e),{mainAxis:m,crossAxis:d,alignmentAxis:p}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return o&&typeof p=="number"&&(d=o==="end"?p*-1:p),l?{x:d*u,y:m*c}:{x:m*c,y:d*u}})}function _s(){return typeof window!="undefined"}function ki(e){return Vd(e)?(e.nodeName||"").toLowerCase():"#document"}function et(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mt(e){var t;return(t=(Vd(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Vd(e){return _s()?e instanceof Node||e instanceof et(e).Node:!1}function bt(e){return _s()?e instanceof Element||e instanceof et(e).Element:!1}function Lt(e){return _s()?e instanceof HTMLElement||e instanceof et(e).HTMLElement:!1}function Ed(e){return!_s()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof et(e).ShadowRoot}function Ir(e){let{overflow:t,overflowX:n,overflowY:i,display:r}=Et(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!pE.has(r)}function mE(e){return fE.has(ki(e))}function Gs(e){return vE.some(t=>{try{return e.matches(t)}catch(n){return!1}})}function $o(e){let t=Ho(),n=bt(e)?Et(e):e;return yE.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||bE.some(i=>(n.willChange||"").includes(i))||EE.some(i=>(n.contain||"").includes(i))}function IE(e){let t=Tn(e);for(;Lt(t)&&!xi(t);){if($o(t))return t;if(Gs(t))return null;t=Tn(t)}return null}function Ho(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function xi(e){return PE.has(ki(e))}function Et(e){return et(e).getComputedStyle(e)}function Us(e){return bt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Tn(e){if(ki(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Ed(e)&&e.host||Mt(e);return Ed(t)?t.host:t}function xd(e){let t=Tn(e);return xi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Lt(t)&&Ir(t)?t:xd(t)}function Er(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);let r=xd(e),s=r===((i=e.ownerDocument)==null?void 0:i.body),a=et(r);if(s){let o=Do(a);return t.concat(a,a.visualViewport||[],Ir(r)?r:[],o&&n?Er(o):[])}return t.concat(r,Er(r,[],n))}function Do(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ad(e){let t=Et(e),n=parseFloat(t.width)||0,i=parseFloat(t.height)||0,r=Lt(e),s=r?e.offsetWidth:n,a=r?e.offsetHeight:i,o=$s(n)!==s||$s(i)!==a;return o&&(n=s,i=a),{width:n,height:i,$:o}}function Bo(e){return bt(e)?e:e.contextElement}function Vi(e){let t=Bo(e);if(!Lt(t))return Dt(1);let n=t.getBoundingClientRect(),{width:i,height:r,$:s}=Ad(t),a=(s?$s(n.width):n.width)/i,o=(s?$s(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}function kd(e){let t=et(e);return!Ho()||!t.visualViewport?CE:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function SE(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==et(e)?!1:t}function qn(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);let r=e.getBoundingClientRect(),s=Bo(e),a=Dt(1);t&&(i?bt(i)&&(a=Vi(i)):a=Vi(e));let o=SE(s,n,i)?kd(s):Dt(0),l=(r.left+o.x)/a.x,c=(r.top+o.y)/a.y,u=r.width/a.x,h=r.height/a.y;if(s){let m=et(s),d=i&&bt(i)?et(i):i,p=m,v=Do(p);for(;v&&i&&d!==p;){let I=Vi(v),T=v.getBoundingClientRect(),O=Et(v),b=T.left+(v.clientLeft+parseFloat(O.paddingLeft))*I.x,f=T.top+(v.clientTop+parseFloat(O.paddingTop))*I.y;l*=I.x,c*=I.y,u*=I.x,h*=I.y,l+=b,c+=f,p=et(v),v=Do(p)}}return Bs({width:u,height:h,x:l,y:c})}function qs(e,t){let n=Us(e).scrollLeft;return t?t.left+n:qn(Mt(e)).left+n}function Nd(e,t){let n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-qs(e,n),r=n.top+t.scrollTop;return{x:i,y:r}}function TE(e){let{elements:t,rect:n,offsetParent:i,strategy:r}=e,s=r==="fixed",a=Mt(i),o=t?Gs(t.floating):!1;if(i===a||o&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Dt(1),u=Dt(0),h=Lt(i);if((h||!h&&!s)&&((ki(i)!=="body"||Ir(a))&&(l=Us(i)),Lt(i))){let d=qn(i);c=Vi(i),u.x=d.x+i.clientLeft,u.y=d.y+i.clientTop}let m=a&&!h&&!s?Nd(a,l):Dt(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+m.x,y:n.y*c.y-l.scrollTop*c.y+u.y+m.y}}function OE(e){return Array.from(e.getClientRects())}function wE(e){let t=Mt(e),n=Us(e),i=e.ownerDocument.body,r=Qe(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),s=Qe(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight),a=-n.scrollLeft+qs(e),o=-n.scrollTop;return Et(i).direction==="rtl"&&(a+=Qe(t.clientWidth,i.clientWidth)-r),{width:r,height:s,x:a,y:o}}function VE(e,t){let n=et(e),i=Mt(e),r=n.visualViewport,s=i.clientWidth,a=i.clientHeight,o=0,l=0;if(r){s=r.width,a=r.height;let u=Ho();(!u||u&&t==="fixed")&&(o=r.offsetLeft,l=r.offsetTop)}let c=qs(i);if(c<=0){let u=i.ownerDocument,h=u.body,m=getComputedStyle(h),d=u.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,p=Math.abs(i.clientWidth-h.clientWidth-d);p<=Id&&(s-=p)}else c<=Id&&(s+=c);return{width:s,height:a,x:o,y:l}}function AE(e,t){let n=qn(e,!0,t==="fixed"),i=n.top+e.clientTop,r=n.left+e.clientLeft,s=Lt(e)?Vi(e):Dt(1),a=e.clientWidth*s.x,o=e.clientHeight*s.y,l=r*s.x,c=i*s.y;return{width:a,height:o,x:l,y:c}}function Pd(e,t,n){let i;if(t==="viewport")i=VE(e,n);else if(t==="document")i=wE(Mt(e));else if(bt(t))i=AE(t,n);else{let r=kd(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Bs(i)}function Rd(e,t){let n=Tn(e);return n===t||!bt(n)||xi(n)?!1:Et(n).position==="fixed"||Rd(n,t)}function kE(e,t){let n=t.get(e);if(n)return n;let i=Er(e,[],!1).filter(o=>bt(o)&&ki(o)!=="body"),r=null,s=Et(e).position==="fixed",a=s?Tn(e):e;for(;bt(a)&&!xi(a);){let o=Et(a),l=$o(a);!l&&o.position==="fixed"&&(r=null),(s?!l&&!r:!l&&o.position==="static"&&!!r&&xE.has(r.position)||Ir(a)&&!l&&Rd(e,a))?i=i.filter(u=>u!==a):r=o,a=Tn(a)}return t.set(e,i),i}function NE(e){let{element:t,boundary:n,rootBoundary:i,strategy:r}=e,a=[...n==="clippingAncestors"?Gs(t)?[]:kE(t,this._c):[].concat(n),i],o=a[0],l=a.reduce((c,u)=>{let h=Pd(t,u,r);return c.top=Qe(h.top,c.top),c.right=Sn(h.right,c.right),c.bottom=Sn(h.bottom,c.bottom),c.left=Qe(h.left,c.left),c},Pd(t,o,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function RE(e){let{width:t,height:n}=Ad(e);return{width:t,height:n}}function DE(e,t,n){let i=Lt(t),r=Mt(t),s=n==="fixed",a=qn(e,!0,s,t),o={scrollLeft:0,scrollTop:0},l=Dt(0);function c(){l.x=qs(r)}if(i||!i&&!s)if((ki(t)!=="body"||Ir(r))&&(o=Us(t)),i){let d=qn(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else r&&c();s&&!i&&r&&c();let u=r&&!i&&!s?Nd(r,o):Dt(0),h=a.left+o.scrollLeft-l.x-u.x,m=a.top+o.scrollTop-l.y-u.y;return{x:h,y:m,width:a.width,height:a.height}}function ko(e){return Et(e).position==="static"}function Cd(e,t){if(!Lt(e)||Et(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Mt(e)===n&&(n=n.ownerDocument.body),n}function Dd(e,t){let n=et(e);if(Gs(e))return n;if(!Lt(e)){let r=Tn(e);for(;r&&!xi(r);){if(bt(r)&&!ko(r))return r;r=Tn(r)}return n}let i=Cd(e,t);for(;i&&mE(i)&&ko(i);)i=Cd(i,t);return i&&xi(i)&&ko(i)&&!$o(i)?n:i||IE(e)||n}function ME(e){return Et(e).direction==="rtl"}function Ld(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $E(e,t){let n=null,i,r=Mt(e);function s(){var o;clearTimeout(i),(o=n)==null||o.disconnect(),n=null}function a(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),s();let c=e.getBoundingClientRect(),{left:u,top:h,width:m,height:d}=c;if(o||t(),!m||!d)return;let p=Fs(h),v=Fs(r.clientWidth-(u+m)),I=Fs(r.clientHeight-(h+d)),T=Fs(u),b={rootMargin:-p+"px "+-v+"px "+-I+"px "+-T+"px",threshold:Qe(0,Sn(1,l))||1},f=!0;function S(P){let V=P[0].intersectionRatio;if(V!==l){if(!f)return a();V?a(!1,V):i=setTimeout(()=>{a(!1,1e-7)},1e3)}V===1&&!Ld(c,e.getBoundingClientRect())&&a(),f=!1}try{n=new IntersectionObserver(S,y(g({},b),{root:r.ownerDocument}))}catch(P){n=new IntersectionObserver(S,b)}n.observe(e)}return a(!0),s}function HE(e,t,n,i){i===void 0&&(i={});let{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=Bo(e),u=r||s?[...c?Er(c):[],...Er(t)]:[];u.forEach(T=>{r&&T.addEventListener("scroll",n,{passive:!0}),s&&T.addEventListener("resize",n)});let h=c&&o?$E(c,n):null,m=-1,d=null;a&&(d=new ResizeObserver(T=>{let[O]=T;O&&O.target===c&&d&&(d.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=d)==null||b.observe(t)})),n()}),c&&!l&&d.observe(c),d.observe(t));let p,v=l?qn(e):null;l&&I();function I(){let T=qn(e);v&&!Ld(v,T)&&n(),v=T,p=requestAnimationFrame(I)}return n(),()=>{var T;u.forEach(O=>{r&&O.removeEventListener("scroll",n),s&&O.removeEventListener("resize",n)}),h==null||h(),(T=d)==null||T.disconnect(),d=null,l&&cancelAnimationFrame(p)}}function Sd(e=0,t=0,n=0,i=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,i);let r={x:e,y:t,width:n,height:i,top:t,right:e+n,bottom:t+i,left:e};return y(g({},r),{toJSON:()=>r})}function YE(e){if(!e)return Sd();let{x:t,y:n,width:i,height:r}=e;return Sd(t,n,i,r)}function jE(e,t){return{contextElement:le(e)?e:e==null?void 0:e.contextElement,getBoundingClientRect:()=>{let n=e,i=t==null?void 0:t(n);return i||!n?YE(i):n.getBoundingClientRect()}}}function ZE(e,t){return{name:"transformOrigin",fn(n){var x,k,N,D,$;let{elements:i,middlewareData:r,placement:s,rects:a,y:o}=n,l=s.split("-")[0],c=XE(l),u=((x=r.arrow)==null?void 0:x.x)||0,h=((k=r.arrow)==null?void 0:k.y)||0,m=(t==null?void 0:t.clientWidth)||0,d=(t==null?void 0:t.clientHeight)||0,p=u+m/2,v=h+d/2,I=Math.abs(((N=r.shift)==null?void 0:N.y)||0),T=a.reference.height/2,O=d/2,b=($=(D=e.offset)==null?void 0:D.mainAxis)!=null?$:e.gutter,f=typeof b=="number"?b+O:b!=null?b:O,S=I>f,P={top:`${p}px calc(100% + ${f}px)`,bottom:`${p}px ${-f}px`,left:`calc(100% + ${f}px) ${v}px`,right:`${-f}px ${v}px`}[l],V=`${p}px ${a.reference.y+T-o}px`,A=!!e.overlap&&c==="y"&&S;return i.floating.style.setProperty(Jt.transformOrigin.variable,A?V:P),{data:{transformOrigin:A?V:P}}}}}function eI(e){let[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}function Md(e){return e.split("-")[0]}function Td(e,t){let n=e.devicePixelRatio||1;return Math.round(t*n)/n}function _o(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function nI(e,t,n){let i=e||t.createElement("div");return WE({element:i,padding:n.arrowPadding})}function iI(e,t){var n;if(!Wc((n=t.offset)!=null?n:t.gutter))return BE(({placement:i})=>{var u,h,m,d;let r=((e==null?void 0:e.clientHeight)||0)/2,s=(h=(u=t.offset)==null?void 0:u.mainAxis)!=null?h:t.gutter,a=typeof s=="number"?s+r:s!=null?s:r,{hasAlign:o}=eI(i),l=o?void 0:t.shift,c=(d=(m=t.offset)==null?void 0:m.crossAxis)!=null?d:l;return Si({crossAxis:c,mainAxis:a,alignmentAxis:t.shift})})}function rI(e){if(!e.flip)return;let t=_o(e.boundary);return GE(y(g({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function sI(e){if(!e.slide&&!e.overlap)return;let t=_o(e.boundary);return _E(y(g({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:KE()}))}function aI(e){return UE({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:i,availableWidth:r}){let s=t.floating,a=Math.round(n.reference.width),o=Math.round(n.reference.height);r=Math.floor(r),i=Math.floor(i),s.style.setProperty("--reference-width",`${a}px`),s.style.setProperty("--reference-height",`${o}px`),s.style.setProperty("--available-width",`${r}px`),s.style.setProperty("--available-height",`${i}px`)}})}function oI(e){var t;if(e.hideWhenDetached)return qE({strategy:"referenceHidden",boundary:(t=_o(e.boundary))!=null?t:"clippingAncestors"})}function lI(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function cI(e,t,n={}){var I,T;let i=(T=(I=n.getAnchorElement)==null?void 0:I.call(n))!=null?T:e,r=jE(i,n.getAnchorRect);if(!t||!r)return;let s=Object.assign({},tI,n),a=t.querySelector("[data-part=arrow]"),o=[iI(a,s),rI(s),sI(s),nI(a,t.ownerDocument,s),QE(a),ZE({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),aI(s),oI(s),JE],{placement:l,strategy:c,onComplete:u,onPositioned:h}=s,m=()=>Ve(null,null,function*(){var V;if(!r||!t)return;let O=yield zE(r,t,{placement:l,middleware:o,strategy:c});u==null||u(O),h==null||h({placed:!0});let b=ue(t),f=Td(b,O.x),S=Td(b,O.y);t.style.setProperty("--x",`${f}px`),t.style.setProperty("--y",`${S}px`),s.hideWhenDetached&&(((V=O.middlewareData.hide)==null?void 0:V.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));let P=t.firstElementChild;if(P){let A=at(P);t.style.setProperty("--z-index",A.zIndex)}}),d=()=>Ve(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),h==null||h({placed:!0})):yield m()}),p=lI(s.listeners),v=s.listeners?HE(r,t,d,p):zc;return d(),()=>{v==null||v(),h==null||h({placed:!1})}}function It(e,t,n={}){let o=n,{defer:i}=o,r=ft(o,["defer"]),s=i?H:l=>l(),a=[];return a.push(s(()=>{let l=typeof e=="function"?e():e,c=typeof t=="function"?t():t;a.push(cI(l,c,r))})),()=>{a.forEach(l=>l==null?void 0:l())}}function On(e={}){let{placement:t,sameWidth:n,fitViewport:i,strategy:r="absolute"}=e;return{arrow:{position:"absolute",width:Jt.arrowSize.reference,height:Jt.arrowSize.reference,[Jt.arrowSizeHalf.variable]:`calc(${Jt.arrowSize.reference} / 2)`,[Jt.arrowOffset.variable]:`calc(${Jt.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?uI[t.split("-")[0]]:void 0,background:Jt.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:r,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:i?"var(--available-width)":void 0,maxHeight:i?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var zb,Sn,Qe,$s,Fs,Dt,Yb,jb,Xb,fd,md,Qb,eE,sE,aE,oE,lE,wd,uE,dE,hE,gE,pE,fE,vE,yE,bE,EE,PE,CE,Id,xE,LE,FE,BE,_E,GE,UE,qE,WE,KE,zE,br,Jt,XE,JE,QE,tI,uI,Pr=re(()=>{"use strict";se();zb=["top","right","bottom","left"],Sn=Math.min,Qe=Math.max,$s=Math.round,Fs=Math.floor,Dt=e=>({x:e,y:e}),Yb={left:"right",right:"left",bottom:"top",top:"bottom"},jb={start:"end",end:"start"};Xb=new Set(["top","bottom"]);fd=["left","right"],md=["right","left"],Qb=["top","bottom"],eE=["bottom","top"];sE=(e,t,n)=>Ve(null,null,function*(){let{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:a}=n,o=s.filter(Boolean),l=yield a.isRTL==null?void 0:a.isRTL(t),c=yield a.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:h}=vd(c,i,l),m=i,d={},p=0;for(let I=0;I({name:"arrow",options:e,fn(n){return Ve(this,null,function*(){let{x:i,y:r,placement:s,rects:a,platform:o,elements:l,middlewareData:c}=n,{element:u,padding:h=0}=Qt(e,n)||{};if(u==null)return{};let m=Od(h),d={x:i,y:r},p=Fo(s),v=Mo(p),I=yield o.getDimensions(u),T=p==="y",O=T?"top":"left",b=T?"bottom":"right",f=T?"clientHeight":"clientWidth",S=a.reference[v]+a.reference[p]-d[p]-a.floating[v],P=d[p]-a.reference[p],V=yield o.getOffsetParent==null?void 0:o.getOffsetParent(u),A=V?V[f]:0;(!A||!(yield o.isElement==null?void 0:o.isElement(V)))&&(A=l.floating[f]||a.floating[v]);let x=S/2-P/2,k=A/2-I[v]/2-1,N=Sn(m[O],k),D=Sn(m[b],k),$=N,te=A-I[v]-D,J=A/2-I[v]/2+x,ie=No($,J,te),Q=!c.arrow&&Ai(s)!=null&&J!==ie&&a.reference[v]/2-(J<$?N:D)-I[v]/2<0,Se=Q?J<$?J-$:J-te:0;return{[p]:d[p]+Se,data:g({[p]:ie,centerOffset:J-ie-Se},Q&&{alignmentOffset:Se}),reset:Q}})}}),oE=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Ve(this,null,function*(){var i,r;let{placement:s,middlewareData:a,rects:o,initialPlacement:l,platform:c,elements:u}=n,J=Qt(e,n),{mainAxis:h=!0,crossAxis:m=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:I=!0}=J,T=ft(J,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((i=a.arrow)!=null&&i.alignmentOffset)return{};let O=en(s),b=Rt(l),f=en(l)===l,S=yield c.isRTL==null?void 0:c.isRTL(u.floating),P=d||(f||!I?[Hs(l)]:Jb(l)),V=v!=="none";!d&&V&&P.push(...nE(l,I,v,S));let A=[l,...P],x=yield c.detectOverflow(n,T),k=[],N=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&k.push(x[O]),m){let ie=Zb(s,o,S);k.push(x[ie[0]],x[ie[1]])}if(N=[...N,{placement:s,overflows:k}],!k.every(ie=>ie<=0)){var D,$;let ie=(((D=a.flip)==null?void 0:D.index)||0)+1,Q=A[ie];if(Q&&(!(m==="alignment"?b!==Rt(Q):!1)||N.every(ne=>Rt(ne.placement)===b?ne.overflows[0]>0:!0)))return{data:{index:ie,overflows:N},reset:{placement:Q}};let Se=($=N.filter(Pe=>Pe.overflows[0]<=0).sort((Pe,ne)=>Pe.overflows[1]-ne.overflows[1])[0])==null?void 0:$.placement;if(!Se)switch(p){case"bestFit":{var te;let Pe=(te=N.filter(ne=>{if(V){let Ie=Rt(ne.placement);return Ie===b||Ie==="y"}return!0}).map(ne=>[ne.placement,ne.overflows.filter(Ie=>Ie>0).reduce((Ie,rt)=>Ie+rt,0)]).sort((ne,Ie)=>ne[1]-Ie[1])[0])==null?void 0:te[0];Pe&&(Se=Pe);break}case"initialPlacement":Se=l;break}if(s!==Se)return{reset:{placement:Se}}}return{}})}}};lE=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Ve(this,null,function*(){let{rects:i,platform:r}=n,o=Qt(e,n),{strategy:s="referenceHidden"}=o,a=ft(o,["strategy"]);switch(s){case"referenceHidden":{let l=yield r.detectOverflow(n,y(g({},a),{elementContext:"reference"})),c=yd(l,i.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:bd(c)}}}case"escaped":{let l=yield r.detectOverflow(n,y(g({},a),{altBoundary:!0})),c=yd(l,i.floating);return{data:{escapedOffsets:c,escaped:bd(c)}}}default:return{}}})}}},wd=new Set(["left","top"]);uE=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Ve(this,null,function*(){var i,r;let{x:s,y:a,placement:o,middlewareData:l}=n,c=yield cE(n,e);return o===((i=l.offset)==null?void 0:i.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:a+c.y,data:y(g({},c),{placement:o})}})}}},dE=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Ve(this,null,function*(){let{x:i,y:r,placement:s,platform:a}=n,O=Qt(e,n),{mainAxis:o=!0,crossAxis:l=!1,limiter:c={fn:b=>{let{x:f,y:S}=b;return{x:f,y:S}}}}=O,u=ft(O,["mainAxis","crossAxis","limiter"]),h={x:i,y:r},m=yield a.detectOverflow(n,u),d=Rt(en(s)),p=Lo(d),v=h[p],I=h[d];if(o){let b=p==="y"?"top":"left",f=p==="y"?"bottom":"right",S=v+m[b],P=v-m[f];v=No(S,v,P)}if(l){let b=d==="y"?"top":"left",f=d==="y"?"bottom":"right",S=I+m[b],P=I-m[f];I=No(S,I,P)}let T=c.fn(y(g({},n),{[p]:v,[d]:I}));return y(g({},T),{data:{x:T.x-i,y:T.y-r,enabled:{[p]:o,[d]:l}}})})}}},hE=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:i,placement:r,rects:s,middlewareData:a}=t,{offset:o=0,mainAxis:l=!0,crossAxis:c=!0}=Qt(e,t),u={x:n,y:i},h=Rt(r),m=Lo(h),d=u[m],p=u[h],v=Qt(o,t),I=typeof v=="number"?{mainAxis:v,crossAxis:0}:g({mainAxis:0,crossAxis:0},v);if(l){let b=m==="y"?"height":"width",f=s.reference[m]-s.floating[b]+I.mainAxis,S=s.reference[m]+s.reference[b]-I.mainAxis;dS&&(d=S)}if(c){var T,O;let b=m==="y"?"width":"height",f=wd.has(en(r)),S=s.reference[h]-s.floating[b]+(f&&((T=a.offset)==null?void 0:T[h])||0)+(f?0:I.crossAxis),P=s.reference[h]+s.reference[b]+(f?0:((O=a.offset)==null?void 0:O[h])||0)-(f?I.crossAxis:0);pP&&(p=P)}return{[m]:d,[h]:p}}}},gE=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Ve(this,null,function*(){var i,r;let{placement:s,rects:a,platform:o,elements:l}=n,N=Qt(e,n),{apply:c=()=>{}}=N,u=ft(N,["apply"]),h=yield o.detectOverflow(n,u),m=en(s),d=Ai(s),p=Rt(s)==="y",{width:v,height:I}=a.floating,T,O;m==="top"||m==="bottom"?(T=m,O=d===((yield o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(O=m,T=d==="end"?"top":"bottom");let b=I-h.top-h.bottom,f=v-h.left-h.right,S=Sn(I-h[T],b),P=Sn(v-h[O],f),V=!n.middlewareData.shift,A=S,x=P;if((i=n.middlewareData.shift)!=null&&i.enabled.x&&(x=f),(r=n.middlewareData.shift)!=null&&r.enabled.y&&(A=b),V&&!d){let D=Qe(h.left,0),$=Qe(h.right,0),te=Qe(h.top,0),J=Qe(h.bottom,0);p?x=v-2*(D!==0||$!==0?D+$:Qe(h.left,h.right)):A=I-2*(te!==0||J!==0?te+J:Qe(h.top,h.bottom))}yield c(y(g({},n),{availableWidth:x,availableHeight:A}));let k=yield o.getDimensions(l.floating);return v!==k.width||I!==k.height?{reset:{rects:!0}}:{}})}}};pE=new Set(["inline","contents"]);fE=new Set(["table","td","th"]);vE=[":popover-open",":modal"];yE=["transform","translate","scale","rotate","perspective"],bE=["transform","translate","scale","rotate","perspective","filter"],EE=["paint","layout","strict","content"];PE=new Set(["html","body","#document"]);CE=Dt(0);Id=25;xE=new Set(["absolute","fixed"]);LE=function(e){return Ve(this,null,function*(){let t=this.getOffsetParent||Dd,n=this.getDimensions,i=yield n(e.floating);return{reference:DE(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}})};FE={convertOffsetParentRelativeRectToViewportRelativeRect:TE,getDocumentElement:Mt,getClippingRect:NE,getOffsetParent:Dd,getElementRects:LE,getClientRects:OE,getDimensions:RE,getScale:Vi,isElement:bt,isRTL:ME};BE=uE,_E=dE,GE=oE,UE=gE,qE=lE,WE=aE,KE=hE,zE=(e,t,n)=>{let i=new Map,r=g({platform:FE},n),s=y(g({},r.platform),{_c:i});return sE(e,t,y(g({},r),{platform:s}))};br=e=>({variable:e,reference:`var(${e})`}),Jt={arrowSize:br("--arrow-size"),arrowSizeHalf:br("--arrow-size-half"),arrowBg:br("--arrow-background"),transformOrigin:br("--transform-origin"),arrowOffset:br("--arrow-offset")},XE=e=>e==="top"||e==="bottom"?"y":"x";JE={name:"rects",fn({rects:e}){return{data:e}}},QE=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};let{x:i,y:r}=n.arrow,s=t.split("-")[0];return Object.assign(e.style,{left:i!=null?`${i}px`:"",top:r!=null?`${r}px`:"",[s]:`calc(100% + ${Jt.arrowOffset.reference})`}),{}}}};tI={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};uI={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"}});function dI(e){let t={each(n){var i;for(let r=0;r<((i=e.frames)==null?void 0:i.length);r+=1){let s=e.frames[r];s&&n(s)}},addEventListener(n,i,r){return t.each(s=>{try{s.document.addEventListener(n,i,r)}catch(a){}}),()=>{try{t.removeEventListener(n,i,r)}catch(s){}}},removeEventListener(n,i,r){t.each(s=>{try{s.document.removeEventListener(n,i,r)}catch(a){}})}};return t}function hI(e){let t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,i,r)=>{try{t==null||t.addEventListener(n,i,r)}catch(s){}return()=>{try{t==null||t.removeEventListener(n,i,r)}catch(s){}}},removeEventListener:(n,i,r)=>{try{t==null||t.removeEventListener(n,i,r)}catch(s){}}}}function gI(e){for(let t of e)if(le(t)&&Ye(t))return!0;return!1}function pI(e,t){if(!_d(t)||!e)return!1;let n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function fI(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function Hd(e,t){if(!t||!_d(e))return!1;let n=t.scrollHeight>t.clientHeight,i=n&&e.clientX>t.offsetLeft+t.clientWidth,r=t.scrollWidth>t.clientWidth,s=r&&e.clientY>t.offsetTop+t.clientHeight,a={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(r?16:0)},o={x:e.clientX,y:e.clientY};return fI(a,o)?i||s:!1}function mI(e,t){let{exclude:n,onFocusOutside:i,onPointerDownOutside:r,onInteractOutside:s,defer:a,followControlledElements:o=!0}=t;if(!e)return;let l=Le(e),c=ue(e),u=dI(c),h=hI(c);function m(b,f){if(!le(f)||!f.isConnected||ce(e,f)||pI(e,b)||o&&as(e,f))return!1;let S=l.querySelector(`[aria-controls="${e.id}"]`);if(S){let V=gs(S);if(Hd(b,V))return!1}let P=gs(e);return Hd(b,P)?!1:!(n!=null&&n(f))}let d=new Set,p=Ln(e==null?void 0:e.getRootNode());function v(b){function f(S){var x,k;let P=a&&!Ja()?H:N=>N(),V=S!=null?S:b,A=(k=(x=V==null?void 0:V.composedPath)==null?void 0:x.call(V))!=null?k:[V==null?void 0:V.target];P(()=>{let N=p?A[0]:j(b);if(!(!e||!m(b,N))){if(r||s){let D=At(r,s);e.addEventListener(Fd,D,{once:!0})}Bd(e,Fd,{bubbles:!1,cancelable:!0,detail:{originalEvent:V,contextmenu:hi(V),focusable:gI(A),target:N}})}})}b.pointerType==="touch"?(d.forEach(S=>S()),d.add(ee(l,"click",f,{once:!0})),d.add(h.addEventListener("click",f,{once:!0})),d.add(u.addEventListener("click",f,{once:!0}))):f()}let I=new Set,T=setTimeout(()=>{I.add(ee(l,"pointerdown",v,!0)),I.add(h.addEventListener("pointerdown",v,!0)),I.add(u.addEventListener("pointerdown",v,!0))},0);function O(b){(a?H:S=>S())(()=>{var V,A;let S=(A=(V=b==null?void 0:b.composedPath)==null?void 0:V.call(b))!=null?A:[b==null?void 0:b.target],P=p?S[0]:j(b);if(!(!e||!m(b,P))){if(i||s){let x=At(i,s);e.addEventListener($d,x,{once:!0})}Bd(e,$d,{bubbles:!1,cancelable:!0,detail:{originalEvent:b,contextmenu:!1,focusable:Ye(P),target:P}})}})}return Ja()||(I.add(ee(l,"focusin",O,!0)),I.add(h.addEventListener("focusin",O,!0)),I.add(u.addEventListener("focusin",O,!0))),()=>{clearTimeout(T),d.forEach(b=>b()),I.forEach(b=>b())}}function Ws(e,t){let{defer:n}=t,i=n?H:s=>s(),r=[];return r.push(i(()=>{let s=typeof e=="function"?e():e;r.push(mI(s,t))})),()=>{r.forEach(s=>s==null?void 0:s())}}function Bd(e,t,n){let i=e.ownerDocument.defaultView||window,r=new i.CustomEvent(t,n);return e.dispatchEvent(r)}var Fd,$d,_d,tn=re(()=>{"use strict";se();Fd="pointerdown.outside",$d="focus.outside";_d=e=>"clientY"in e});function vI(e,t){let n=i=>{i.key==="Escape"&&(i.isComposing||t==null||t(i))};return ee(Le(e),"keydown",n,{capture:!0})}function yI(e,t,n){let i=e.ownerDocument.defaultView||window,r=new i.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(r)}function bI(e,t,n){e.addEventListener(t,n,{once:!0})}function qd(){We.layers.forEach(({node:e})=>{e.style.pointerEvents=We.isBelowPointerBlockingLayer(e)?"none":"auto"})}function EI(e){e.style.pointerEvents=""}function II(e,t){let n=Le(e),i=[];return We.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(Ud=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(r=>{let[s,a]=Hc(()=>{let o=r();return le(o)?o:null},{timeout:1e3});s.then(o=>i.push(Hn(o,{pointerEvents:"auto"}))),i.push(a)}),()=>{We.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=Ud,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),i.forEach(r=>r()))}}function PI(e,t){let{warnOnMissingNode:n=!0}=t;if(n&&!e){zt("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;let{onDismiss:i,onRequestDismiss:r,pointerBlocking:s,exclude:a,debug:o,type:l="dialog"}=t,c={dismiss:i,node:e,type:l,pointerBlocking:s,requestDismiss:r};We.add(c),qd();function u(v){var T,O;let I=j(v.detail.originalEvent);We.isBelowPointerBlockingLayer(e)||We.isInBranch(I)||((T=t.onPointerDownOutside)==null||T.call(t,v),(O=t.onInteractOutside)==null||O.call(t,v),!v.defaultPrevented&&(o&&console.log("onPointerDownOutside:",v.detail.originalEvent),i==null||i()))}function h(v){var T,O;let I=j(v.detail.originalEvent);We.isInBranch(I)||((T=t.onFocusOutside)==null||T.call(t,v),(O=t.onInteractOutside)==null||O.call(t,v),!v.defaultPrevented&&(o&&console.log("onFocusOutside:",v.detail.originalEvent),i==null||i()))}function m(v){var I;We.isTopMost(e)&&((I=t.onEscapeKeyDown)==null||I.call(t,v),!v.defaultPrevented&&i&&(v.preventDefault(),i()))}function d(v){var b;if(!e)return!1;let I=typeof a=="function"?a():a,T=Array.isArray(I)?I:[I],O=(b=t.persistentElements)==null?void 0:b.map(f=>f()).filter(le);return O&&T.push(...O),T.some(f=>ce(f,v))||We.isInNestedLayer(e,v)}let p=[s?II(e,t.persistentElements):void 0,vI(e,m),Ws(e,{exclude:d,onFocusOutside:h,onPointerDownOutside:u,defer:t.defer})];return()=>{We.remove(e),qd(),EI(e),p.forEach(v=>v==null?void 0:v())}}function Ft(e,t){let{defer:n}=t,i=n?H:s=>s(),r=[];return r.push(i(()=>{let s=Wt(e)?e():e;r.push(PI(s,t))})),()=>{r.forEach(s=>s==null?void 0:s())}}function Wd(e,t={}){let{defer:n}=t,i=n?H:s=>s(),r=[];return r.push(i(()=>{let s=Wt(e)?e():e;if(!s){zt("[@zag-js/dismissable] branch node is `null` or `undefined`");return}We.addBranch(s),r.push(()=>{We.removeBranch(s)})})),()=>{r.forEach(s=>s==null?void 0:s())}}var Gd,We,Ud,Wn=re(()=>{"use strict";tn();se();Gd="layer:request-dismiss",We={layers:[],branches:[],recentlyRemoved:new Set,count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){var i;let t=this.indexOf(e),n=this.topMostPointerBlockingLayer()?this.indexOf((i=this.topMostPointerBlockingLayer())==null?void 0:i.node):-1;return tt.type===e)},getNestedLayersByType(e,t){let n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(i=>i.type===t)},getParentLayerOfType(e,t){let n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(i=>i.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return!!(this.getNestedLayers(e).some(i=>ce(i.node,t))||this.recentlyRemoved.size>0)},isInBranch(e){return Array.from(this.branches).some(t=>ce(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){let t=this.indexOf(e);t<0||(this.recentlyRemoved.add(e),$n(()=>this.recentlyRemoved.delete(e)),tWe.dismiss(i.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){let t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{e.node.style.setProperty("--layer-index",`${t}`),e.node.removeAttribute("data-nested"),e.node.removeAttribute("data-has-nested"),this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute("data-nested",e.type);let i=this.countNestedLayersOfType(e.node,e.type);i>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${i}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){let n=this.indexOf(e);if(n===-1)return;let i=this.layers[n];bI(e,Gd,r=>{var s;(s=i.requestDismiss)==null||s.call(i,r),r.defaultPrevented||i==null||i.dismiss()}),yI(e,Gd,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}}});var nh={};he(nh,{Combobox:()=>BI});function VI(e,t){let{context:n,prop:i,state:r,send:s,scope:a,computed:o,event:l}=e,c=i("translations"),u=i("collection"),h=!!i("disabled"),m=o("isInteractive"),d=!!i("invalid"),p=!!i("required"),v=!!i("readOnly"),I=r.hasTag("open"),T=r.hasTag("focused"),O=i("composite"),b=n.get("highlightedValue"),f=On(y(g({},i("positioning")),{placement:n.get("currentPlacement")}));function S(P){let V=u.getItemDisabled(P.item),A=u.getItemValue(P.item);return vn(A,()=>`[zag-js] No value found for item ${JSON.stringify(P.item)}`),{value:A,disabled:!!(V||V),highlighted:b===A,selected:n.get("value").includes(A)}}return{focused:T,open:I,inputValue:n.get("inputValue"),highlightedValue:b,highlightedItem:n.get("highlightedItem"),value:n.get("value"),valueAsString:o("valueAsString"),hasSelectedItems:o("hasSelectedItems"),selectedItems:n.get("selectedItems"),collection:i("collection"),multiple:!!i("multiple"),disabled:!!h,syncSelectedItems(){s({type:"SELECTED_ITEMS.SYNC"})},reposition(P={}){s({type:"POSITIONING.SET",options:P})},setHighlightValue(P){s({type:"HIGHLIGHTED_VALUE.SET",value:P})},clearHighlightValue(){s({type:"HIGHLIGHTED_VALUE.CLEAR"})},selectValue(P){s({type:"ITEM.SELECT",value:P})},setValue(P){s({type:"VALUE.SET",value:P})},setInputValue(P,V="script"){s({type:"INPUT_VALUE.SET",value:P,src:V})},clearValue(P){P!=null?s({type:"ITEM.CLEAR",value:P}):s({type:"VALUE.CLEAR"})},focus(){var P;(P=zn(a))==null||P.focus()},setOpen(P,V="script"){r.hasTag("open")!==P&&s({type:P?"OPEN":"CLOSE",src:V})},getRootProps(){return t.element(y(g({},Ke.root.attrs),{dir:i("dir"),id:SI(a),"data-invalid":E(d),"data-readonly":E(v)}))},getLabelProps(){return t.label(y(g({},Ke.label.attrs),{dir:i("dir"),htmlFor:Ks(a),id:Go(a),"data-readonly":E(v),"data-disabled":E(h),"data-invalid":E(d),"data-required":E(p),"data-focus":E(T),onClick(P){var V;O||(P.preventDefault(),(V=Cr(a))==null||V.focus({preventScroll:!0}))}}))},getControlProps(){return t.element(y(g({},Ke.control.attrs),{dir:i("dir"),id:Jd(a),"data-state":I?"open":"closed","data-focus":E(T),"data-disabled":E(h),"data-invalid":E(d)}))},getPositionerProps(){return t.element(y(g({},Ke.positioner.attrs),{dir:i("dir"),id:Qd(a),style:f.floating}))},getInputProps(){return t.input(y(g({},Ke.input.attrs),{dir:i("dir"),"aria-invalid":X(d),"data-invalid":E(d),"data-autofocus":E(i("autoFocus")),name:i("name"),form:i("form"),disabled:h,required:i("required"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"none",spellCheck:"false",readOnly:v,placeholder:i("placeholder"),id:Ks(a),type:"text",role:"combobox",defaultValue:n.get("inputValue"),"aria-autocomplete":o("autoComplete")?"both":"list","aria-controls":zs(a),"aria-expanded":I,"data-state":I?"open":"closed","aria-activedescendant":b?zd(a,b):void 0,onClick(P){P.defaultPrevented||i("openOnClick")&&m&&s({type:"INPUT.CLICK",src:"input-click"})},onFocus(){h||s({type:"INPUT.FOCUS"})},onBlur(){h||s({type:"INPUT.BLUR"})},onChange(P){s({type:"INPUT.CHANGE",value:P.currentTarget.value,src:"input-change"})},onKeyDown(P){if(P.defaultPrevented||!m||P.ctrlKey||P.shiftKey||Re(P))return;let V=i("openOnKeyPress"),A=P.ctrlKey||P.metaKey||P.shiftKey,x=!0,k={ArrowDown($){!V&&!I||(s({type:$.altKey?"OPEN":"INPUT.ARROW_DOWN",keypress:x,src:"arrow-key"}),$.preventDefault())},ArrowUp(){!V&&!I||(s({type:P.altKey?"CLOSE":"INPUT.ARROW_UP",keypress:x,src:"arrow-key"}),P.preventDefault())},Home($){A||(s({type:"INPUT.HOME",keypress:x}),I&&$.preventDefault())},End($){A||(s({type:"INPUT.END",keypress:x}),I&&$.preventDefault())},Enter($){var Se;s({type:"INPUT.ENTER",keypress:x,src:"item-select"});let te=o("isCustomValue")&&i("allowCustomValue"),J=b!=null,ie=i("alwaysSubmitOnEnter");if(I&&!te&&!ie&&J&&$.preventDefault(),b==null)return;let Q=Ni(a,b);st(Q)&&((Se=i("navigate"))==null||Se({value:b,node:Q,href:Q.href}))},Escape(){s({type:"INPUT.ESCAPE",keypress:x,src:"escape-key"}),P.preventDefault()}},N=ge(P,{dir:i("dir")}),D=k[N];D==null||D(P)}}))},getTriggerProps(P={}){return t.button(y(g({},Ke.trigger.attrs),{dir:i("dir"),id:eh(a),"aria-haspopup":O?"listbox":"dialog",type:"button",tabIndex:P.focusable?void 0:-1,"aria-label":c.triggerLabel,"aria-expanded":I,"data-state":I?"open":"closed","aria-controls":I?zs(a):void 0,disabled:h,"data-invalid":E(d),"data-focusable":E(P.focusable),"data-readonly":E(v),"data-disabled":E(h),onFocus(){P.focusable&&s({type:"INPUT.FOCUS",src:"trigger"})},onClick(V){V.defaultPrevented||m&&pe(V)&&s({type:"TRIGGER.CLICK",src:"trigger-click"})},onPointerDown(V){m&&V.pointerType!=="touch"&&pe(V)&&(V.preventDefault(),queueMicrotask(()=>{var A;(A=zn(a))==null||A.focus({preventScroll:!0})}))},onKeyDown(V){if(V.defaultPrevented||O)return;let A={ArrowDown(){s({type:"INPUT.ARROW_DOWN",src:"arrow-key"})},ArrowUp(){s({type:"INPUT.ARROW_UP",src:"arrow-key"})}},x=ge(V,{dir:i("dir")}),k=A[x];k&&(k(V),V.preventDefault())}}))},getContentProps(){return t.element(y(g({},Ke.content.attrs),{dir:i("dir"),id:zs(a),role:O?"listbox":"dialog",tabIndex:-1,hidden:!I,"data-state":I?"open":"closed","data-placement":n.get("currentPlacement"),"aria-labelledby":Go(a),"aria-multiselectable":i("multiple")&&O?!0:void 0,"data-empty":E(u.size===0),onPointerDown(P){pe(P)&&P.preventDefault()}}))},getListProps(){return t.element(y(g({},Ke.list.attrs),{role:O?void 0:"listbox","data-empty":E(u.size===0),"aria-labelledby":Go(a),"aria-multiselectable":i("multiple")&&!O?!0:void 0}))},getClearTriggerProps(){return t.button(y(g({},Ke.clearTrigger.attrs),{dir:i("dir"),id:th(a),type:"button",tabIndex:-1,disabled:h,"data-invalid":E(d),"aria-label":c.clearTriggerLabel,"aria-controls":Ks(a),hidden:!n.get("value").length,onPointerDown(P){pe(P)&&P.preventDefault()},onClick(P){P.defaultPrevented||m&&s({type:"VALUE.CLEAR",src:"clear-trigger"})}}))},getItemState:S,getItemProps(P){let V=S(P),A=V.value;return t.element(y(g({},Ke.item.attrs),{dir:i("dir"),id:zd(a,A),role:"option",tabIndex:-1,"data-highlighted":E(V.highlighted),"data-state":V.selected?"checked":"unchecked","aria-selected":X(V.highlighted),"aria-disabled":X(V.disabled),"data-disabled":E(V.disabled),"data-value":V.value,onPointerMove(){V.disabled||V.highlighted||s({type:"ITEM.POINTER_MOVE",value:A})},onPointerLeave(){if(P.persistFocus||V.disabled)return;let x=l.previous();x!=null&&x.type.includes("POINTER")&&s({type:"ITEM.POINTER_LEAVE",value:A})},onClick(x){rr(x)||Fn(x)||hi(x)||V.disabled||s({type:"ITEM.CLICK",src:"item-select",value:A})}}))},getItemTextProps(P){let V=S(P);return t.element(y(g({},Ke.itemText.attrs),{dir:i("dir"),"data-state":V.selected?"checked":"unchecked","data-disabled":E(V.disabled),"data-highlighted":E(V.highlighted)}))},getItemIndicatorProps(P){let V=S(P);return t.element(y(g({"aria-hidden":!0},Ke.itemIndicator.attrs),{dir:i("dir"),"data-state":V.selected?"checked":"unchecked",hidden:!V.selected}))},getItemGroupProps(P){let{id:V}=P;return t.element(y(g({},Ke.itemGroup.attrs),{dir:i("dir"),id:TI(a,V),"aria-labelledby":Kd(a,V),"data-empty":E(u.size===0),role:"group"}))},getItemGroupLabelProps(P){let{htmlFor:V}=P;return t.element(y(g({},Ke.itemGroupLabel.attrs),{dir:i("dir"),id:Kd(a,V),role:"presentation"}))}}}function Zd(e){return(e.previousEvent||e).src}function $I(e){return e.replace(/_([a-z])/g,(t,n)=>n.toUpperCase())}function HI(e){let t={};for(let[n,i]of Object.entries(e)){let r=$I(n);t[r]=i}return t}var CI,Ke,Ys,SI,Go,Jd,Ks,zs,Qd,eh,th,TI,Kd,zd,Kn,zn,Yd,jd,Cr,OI,Ni,Xd,wI,xI,AI,kI,we,tt,NI,RI,ux,DI,dx,LI,hx,MI,gx,FI,BI,ih=re(()=>{"use strict";yr();Pr();Wn();tn();se();CI=U("combobox").parts("root","clearTrigger","content","control","input","item","itemGroup","itemGroupLabel","itemIndicator","itemText","label","list","positioner","trigger"),Ke=CI.build(),Ys=e=>new Nt(e);Ys.empty=()=>new Nt({items:[]});SI=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`combobox:${e.id}`},Go=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`combobox:${e.id}:label`},Jd=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`combobox:${e.id}:control`},Ks=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.input)!=null?n:`combobox:${e.id}:input`},zs=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`combobox:${e.id}:content`},Qd=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`combobox:${e.id}:popper`},eh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`combobox:${e.id}:toggle-btn`},th=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.clearTrigger)!=null?n:`combobox:${e.id}:clear-btn`},TI=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemGroup)==null?void 0:i.call(n,t))!=null?r:`combobox:${e.id}:optgroup:${t}`},Kd=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemGroupLabel)==null?void 0:i.call(n,t))!=null?r:`combobox:${e.id}:optgroup-label:${t}`},zd=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`combobox:${e.id}:option:${t}`},Kn=e=>e.getById(zs(e)),zn=e=>e.getById(Ks(e)),Yd=e=>e.getById(Qd(e)),jd=e=>e.getById(Jd(e)),Cr=e=>e.getById(eh(e)),OI=e=>e.getById(th(e)),Ni=(e,t)=>{if(t==null)return null;let n=`[role=option][data-value="${CSS.escape(t)}"]`;return vi(Kn(e),n)},Xd=e=>{let t=zn(e);e.isActiveElement(t)||t==null||t.focus({preventScroll:!0})},wI=e=>{let t=Cr(e);e.isActiveElement(t)||t==null||t.focus({preventScroll:!0})};({guards:xI,createMachine:AI,choose:kI}=ut()),{and:we,not:tt}=xI,NI=AI({props({props:e}){return y(g({loopFocus:!0,openOnClick:!1,defaultValue:[],defaultInputValue:"",closeOnSelect:!e.multiple,allowCustomValue:!1,alwaysSubmitOnEnter:!1,inputBehavior:"none",selectionBehavior:e.multiple?"clear":"replace",openOnKeyPress:!0,openOnChange:!0,composite:!0,navigate({node:t}){mi(t)},collection:Ys.empty()},e),{positioning:g({placement:"bottom",sameWidth:!0},e.positioning),translations:g({triggerLabel:"Toggle suggestions",clearTriggerLabel:"Clear value"},e.translations)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"suggesting":"idle"},context({prop:e,bindable:t,getContext:n,getEvent:i}){return{currentPlacement:t(()=>({defaultValue:void 0})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:fe,hash(r){return r.join(",")},onChange(r){var c;let s=n(),a=s.get("selectedItems"),o=e("collection"),l=r.map(u=>a.find(m=>o.getItemValue(m)===u)||o.find(u));s.set("selectedItems",l),(c=e("onValueChange"))==null||c({value:r,items:l})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),onChange(r){var a;let s=e("collection").find(r);(a=e("onHighlightChange"))==null||a({highlightedValue:r,highlightedItem:s})}})),inputValue:t(()=>{let r=e("inputValue")||e("defaultInputValue"),s=e("value")||e("defaultValue");if(!r.trim()&&!e("multiple")){let a=e("collection").stringifyMany(s);r=Ce(e("selectionBehavior"),{preserve:r||a,replace:a,clear:""})}return{defaultValue:r,value:e("inputValue"),onChange(a){var c;let o=i(),l=(o.previousEvent||o).src;(c=e("onInputValueChange"))==null||c({inputValue:a,reason:l})}}}),highlightedItem:t(()=>{let r=e("highlightedValue");return{defaultValue:e("collection").find(r)}}),selectedItems:t(()=>{let r=e("value")||e("defaultValue")||[];return{defaultValue:e("collection").findMany(r)}})}},computed:{isInputValueEmpty:({context:e})=>e.get("inputValue").length===0,isInteractive:({prop:e})=>!(e("readOnly")||e("disabled")),autoComplete:({prop:e})=>e("inputBehavior")==="autocomplete",autoHighlight:({prop:e})=>e("inputBehavior")==="autohighlight",hasSelectedItems:({context:e})=>e.get("value").length>0,valueAsString:({context:e,prop:t})=>t("collection").stringifyItems(e.get("selectedItems")),isCustomValue:({context:e,computed:t})=>e.get("inputValue")!==t("valueAsString")},watch({context:e,prop:t,track:n,action:i,send:r}){n([()=>e.hash("value")],()=>{i(["syncSelectedItems"])}),n([()=>e.get("inputValue")],()=>{i(["syncInputValue"])}),n([()=>e.get("highlightedValue")],()=>{i(["syncHighlightedItem","autofillInputValue"])}),n([()=>t("open")],()=>{i(["toggleVisibility"])}),n([()=>t("collection").toString()],()=>{r({type:"CHILDREN_CHANGE"})})},on:{"SELECTED_ITEMS.SYNC":{actions:["syncSelectedItems"]},"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedValue"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedValue"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setValue"]},"INPUT_VALUE.SET":{actions:["setInputValue"]},"POSITIONING.SET":{actions:["reposition"]}},entry:kI([{guard:"autoFocus",actions:["setInitialFocus"]}]),states:{idle:{tags:["idle","closed"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":{target:"interacting"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{target:"focused",actions:["clearInputValue","clearSelectedItems","setInitialFocus"]}}},focused:{tags:["focused","closed"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":[{guard:"isChangeEvent",target:"suggesting"},{target:"interacting"}],"INPUT.CHANGE":[{guard:we("isOpenControlled","openOnChange"),actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{guard:"openOnChange",target:"suggesting",actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{actions:["setInputValue"]}],"LAYER.INTERACT_OUTSIDE":{target:"idle"},"INPUT.ESCAPE":{guard:we("isCustomValue",tt("allowCustomValue")),actions:["revertInputValue"]},"INPUT.BLUR":{target:"idle"},"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_DOWN":[{guard:we("isOpenControlled","autoComplete"),actions:["invokeOnOpen"]},{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{guard:"isOpenControlled",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_UP":[{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{target:"interacting",actions:["highlightLastOrSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightLastOrSelectedItem","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{actions:["clearInputValue","clearSelectedItems"]}}},interacting:{tags:["open","focused"],entry:["setInitialFocus"],effects:["scrollToHighlightedItem","trackDismissableLayer","trackPlacement"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["setFinalFocus"]},{target:"idle"}],CHILDREN_CHANGE:[{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]},{actions:["scrollToHighlightedItem"]}],"INPUT.HOME":{actions:["highlightFirstItem"]},"INPUT.END":{actions:["highlightLastItem"]},"INPUT.ARROW_DOWN":[{guard:we("autoComplete","isLastItemHighlighted"),actions:["clearHighlightedValue","scrollContentToTop"]},{actions:["highlightNextItem"]}],"INPUT.ARROW_UP":[{guard:we("autoComplete","isFirstItemHighlighted"),actions:["clearHighlightedValue"]},{actions:["highlightPrevItem"]}],"INPUT.ENTER":[{guard:we("isOpenControlled","isCustomValue",tt("hasHighlightedItem"),tt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:we("isCustomValue",tt("hasHighlightedItem"),tt("allowCustomValue")),target:"focused",actions:["revertInputValue","invokeOnClose"]},{guard:we("isOpenControlled","closeOnSelect"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","setFinalFocus"]},{actions:["selectHighlightedItem"]}],"INPUT.CHANGE":[{guard:"autoComplete",target:"suggesting",actions:["setInputValue"]},{target:"suggesting",actions:["clearHighlightedValue","setInputValue"]}],"ITEM.POINTER_MOVE":{actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]},"ITEM.CLICK":[{guard:we("isOpenControlled","closeOnSelect"),actions:["selectItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectItem","invokeOnClose","setFinalFocus"]},{actions:["selectItem"]}],"LAYER.ESCAPE":[{guard:we("isOpenControlled","autoComplete"),actions:["syncInputValue","invokeOnClose"]},{guard:"autoComplete",target:"focused",actions:["syncInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"LAYER.INTERACT_OUTSIDE":[{guard:we("isOpenControlled","isCustomValue",tt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:we("isCustomValue",tt("allowCustomValue")),target:"idle",actions:["revertInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"VALUE.CLEAR":[{guard:"isOpenControlled",actions:["clearInputValue","clearSelectedItems","invokeOnClose"]},{target:"focused",actions:["clearInputValue","clearSelectedItems","invokeOnClose","setFinalFocus"]}]}},suggesting:{tags:["open","focused"],effects:["trackDismissableLayer","scrollToHighlightedItem","trackPlacement"],entry:["setInitialFocus"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["setFinalFocus"]},{target:"idle"}],CHILDREN_CHANGE:[{guard:we("isHighlightedItemRemoved","hasCollectionItems","autoHighlight"),actions:["clearHighlightedValue","highlightFirstItem"]},{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]},{guard:"autoHighlight",actions:["highlightFirstItem"]}],"INPUT.ARROW_DOWN":{target:"interacting",actions:["highlightNextItem"]},"INPUT.ARROW_UP":{target:"interacting",actions:["highlightPrevItem"]},"INPUT.HOME":{target:"interacting",actions:["highlightFirstItem"]},"INPUT.END":{target:"interacting",actions:["highlightLastItem"]},"INPUT.ENTER":[{guard:we("isOpenControlled","isCustomValue",tt("hasHighlightedItem"),tt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:we("isCustomValue",tt("hasHighlightedItem"),tt("allowCustomValue")),target:"focused",actions:["revertInputValue","invokeOnClose"]},{guard:we("isOpenControlled","closeOnSelect"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","setFinalFocus"]},{actions:["selectHighlightedItem"]}],"INPUT.CHANGE":{actions:["setInputValue"]},"LAYER.ESCAPE":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"ITEM.POINTER_MOVE":{target:"interacting",actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]},"LAYER.INTERACT_OUTSIDE":[{guard:we("isOpenControlled","isCustomValue",tt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:we("isCustomValue",tt("allowCustomValue")),target:"idle",actions:["revertInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"ITEM.CLICK":[{guard:we("isOpenControlled","closeOnSelect"),actions:["selectItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectItem","invokeOnClose","setFinalFocus"]},{actions:["selectItem"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"VALUE.CLEAR":[{guard:"isOpenControlled",actions:["clearInputValue","clearSelectedItems","invokeOnClose"]},{target:"focused",actions:["clearInputValue","clearSelectedItems","invokeOnClose","setFinalFocus"]}]}}},implementations:{guards:{isInputValueEmpty:({computed:e})=>e("isInputValueEmpty"),autoComplete:({computed:e,prop:t})=>e("autoComplete")&&!t("multiple"),autoHighlight:({computed:e})=>e("autoHighlight"),isFirstItemHighlighted:({prop:e,context:t})=>e("collection").firstValue===t.get("highlightedValue"),isLastItemHighlighted:({prop:e,context:t})=>e("collection").lastValue===t.get("highlightedValue"),isCustomValue:({computed:e})=>e("isCustomValue"),allowCustomValue:({prop:e})=>!!e("allowCustomValue"),hasHighlightedItem:({context:e})=>e.get("highlightedValue")!=null,closeOnSelect:({prop:e})=>!!e("closeOnSelect"),isOpenControlled:({prop:e})=>e("open")!=null,openOnChange:({prop:e,context:t})=>{let n=e("openOnChange");return Uc(n)?n:!!(n!=null&&n({inputValue:t.get("inputValue")}))},restoreFocus:({event:e})=>{var n,i;let t=(i=e.restoreFocus)!=null?i:(n=e.previousEvent)==null?void 0:n.restoreFocus;return t==null?!0:!!t},isChangeEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="INPUT.CHANGE"},autoFocus:({prop:e})=>!!e("autoFocus"),isHighlightedItemRemoved:({prop:e,context:t})=>!e("collection").has(t.get("highlightedValue")),hasCollectionItems:({prop:e})=>e("collection").size>0},effects:{trackDismissableLayer({send:e,prop:t,scope:n}){return t("disableLayer")?void 0:Ft(()=>Kn(n),{type:"listbox",defer:!0,exclude:()=>[zn(n),Cr(n),OI(n)],onFocusOutside:t("onFocusOutside"),onPointerDownOutside:t("onPointerDownOutside"),onInteractOutside:t("onInteractOutside"),onEscapeKeyDown(r){r.preventDefault(),r.stopPropagation(),e({type:"LAYER.ESCAPE",src:"escape-key"})},onDismiss(){e({type:"LAYER.INTERACT_OUTSIDE",src:"interact-outside",restoreFocus:!1})}})},trackPlacement({context:e,prop:t,scope:n}){let i=()=>jd(n)||Cr(n),r=()=>Yd(n);return e.set("currentPlacement",t("positioning").placement),It(i,r,y(g({},t("positioning")),{defer:!0,onComplete(s){e.set("currentPlacement",s.placement)}}))},scrollToHighlightedItem({context:e,prop:t,scope:n,event:i}){let r=zn(n),s=[],a=c=>{let u=i.current().type.includes("POINTER"),h=e.get("highlightedValue");if(u||!h)return;let m=Kn(n),d=t("scrollToIndexFn");if(d){let I=t("collection").indexOf(h);d({index:I,immediate:c,getElement:()=>Ni(n,h)});return}let p=Ni(n,h),v=H(()=>{Xt(p,{rootEl:m,block:"nearest"})});s.push(v)},o=H(()=>a(!0));s.push(o);let l=ot(r,{attributes:["aria-activedescendant"],callback:()=>a(!1)});return s.push(l),()=>{s.forEach(c=>c())}}},actions:{reposition({context:e,prop:t,scope:n,event:i}){It(()=>jd(n),()=>Yd(n),y(g(g({},t("positioning")),i.options),{defer:!0,listeners:!1,onComplete(a){e.set("currentPlacement",a.placement)}}))},setHighlightedValue({context:e,event:t}){t.value!=null&&e.set("highlightedValue",t.value)},clearHighlightedValue({context:e}){e.set("highlightedValue",null)},selectHighlightedItem(e){var o;let{context:t,prop:n}=e,i=n("collection"),r=t.get("highlightedValue");if(!r||!i.has(r))return;let s=n("multiple")?yt(t.get("value"),r):[r];(o=n("onSelect"))==null||o({value:s,itemValue:r}),t.set("value",s);let a=Ce(n("selectionBehavior"),{preserve:t.get("inputValue"),replace:i.stringifyMany(s),clear:""});t.set("inputValue",a)},scrollToHighlightedItem({context:e,prop:t,scope:n}){$n(()=>{let i=e.get("highlightedValue");if(i==null)return;let r=Ni(n,i),s=Kn(n),a=t("scrollToIndexFn");if(a){let o=t("collection").indexOf(i);a({index:o,immediate:!0,getElement:()=>Ni(n,i)});return}Xt(r,{rootEl:s,block:"nearest"})})},selectItem(e){let{context:t,event:n,flush:i,prop:r}=e;n.value!=null&&i(()=>{var o;let s=r("multiple")?yt(t.get("value"),n.value):[n.value];(o=r("onSelect"))==null||o({value:s,itemValue:n.value}),t.set("value",s);let a=Ce(r("selectionBehavior"),{preserve:t.get("inputValue"),replace:r("collection").stringifyMany(s),clear:""});t.set("inputValue",a)})},clearItem(e){let{context:t,event:n,flush:i,prop:r}=e;n.value!=null&&i(()=>{let s=ct(t.get("value"),n.value);t.set("value",s);let a=Ce(r("selectionBehavior"),{preserve:t.get("inputValue"),replace:r("collection").stringifyMany(s),clear:""});t.set("inputValue",a)})},setInitialFocus({scope:e}){H(()=>{Xd(e)})},setFinalFocus({scope:e}){H(()=>{let t=Cr(e);(t==null?void 0:t.dataset.focusable)==null?Xd(e):wI(e)})},syncInputValue({context:e,scope:t,event:n}){let i=zn(t);i&&(i.value=e.get("inputValue"),queueMicrotask(()=>{n.current().type!=="INPUT.CHANGE"&&tr(i)}))},setInputValue({context:e,event:t}){e.set("inputValue",t.value)},clearInputValue({context:e}){e.set("inputValue","")},revertInputValue({context:e,prop:t,computed:n}){let i=t("selectionBehavior"),r=Ce(i,{replace:n("hasSelectedItems")?n("valueAsString"):"",preserve:e.get("inputValue"),clear:""});e.set("inputValue",r)},setValue(e){let{context:t,flush:n,event:i,prop:r}=e;n(()=>{t.set("value",i.value);let s=Ce(r("selectionBehavior"),{preserve:t.get("inputValue"),replace:r("collection").stringifyMany(i.value),clear:""});t.set("inputValue",s)})},clearSelectedItems(e){let{context:t,flush:n,prop:i}=e;n(()=>{t.set("value",[]);let r=Ce(i("selectionBehavior"),{preserve:t.get("inputValue"),replace:i("collection").stringifyMany([]),clear:""});t.set("inputValue",r)})},scrollContentToTop({prop:e,scope:t}){let n=e("scrollToIndexFn");if(n){let i=e("collection").firstValue;n({index:0,immediate:!0,getElement:()=>Ni(t,i)})}else{let i=Kn(t);if(!i)return;i.scrollTop=0}},invokeOnOpen({prop:e,event:t,context:n}){var r;let i=Zd(t);(r=e("onOpenChange"))==null||r({open:!0,reason:i,value:n.get("value")})},invokeOnClose({prop:e,event:t,context:n}){var r;let i=Zd(t);(r=e("onOpenChange"))==null||r({open:!1,reason:i,value:n.get("value")})},highlightFirstItem({context:e,prop:t,scope:n}){(Kn(n)?queueMicrotask:H)(()=>{let r=t("collection").firstValue;r&&e.set("highlightedValue",r)})},highlightFirstItemIfNeeded({computed:e,action:t}){e("autoHighlight")&&t(["highlightFirstItem"])},highlightLastItem({context:e,prop:t,scope:n}){(Kn(n)?queueMicrotask:H)(()=>{let r=t("collection").lastValue;r&&e.set("highlightedValue",r)})},highlightNextItem({context:e,prop:t}){let n=null,i=e.get("highlightedValue"),r=t("collection");i?(n=r.getNextValue(i),!n&&t("loopFocus")&&(n=r.firstValue)):n=r.firstValue,n&&e.set("highlightedValue",n)},highlightPrevItem({context:e,prop:t}){let n=null,i=e.get("highlightedValue"),r=t("collection");i?(n=r.getPreviousValue(i),!n&&t("loopFocus")&&(n=r.lastValue)):n=r.lastValue,n&&e.set("highlightedValue",n)},highlightFirstSelectedItem({context:e,prop:t}){H(()=>{let[n]=t("collection").sort(e.get("value"));n&&e.set("highlightedValue",n)})},highlightFirstOrSelectedItem({context:e,prop:t,computed:n}){H(()=>{let i=null;n("hasSelectedItems")?i=t("collection").sort(e.get("value"))[0]:i=t("collection").firstValue,i&&e.set("highlightedValue",i)})},highlightLastOrSelectedItem({context:e,prop:t,computed:n}){H(()=>{let i=t("collection"),r=null;n("hasSelectedItems")?r=i.sort(e.get("value"))[0]:r=i.lastValue,r&&e.set("highlightedValue",r)})},autofillInputValue({context:e,computed:t,prop:n,event:i,scope:r}){let s=zn(r),a=n("collection");if(!t("autoComplete")||!s||!i.keypress)return;let o=a.stringify(e.get("highlightedValue"));H(()=>{s.value=o||e.get("inputValue")})},syncSelectedItems(e){queueMicrotask(()=>{let{context:t,prop:n}=e,i=n("collection"),r=t.get("value"),s=r.map(o=>t.get("selectedItems").find(c=>i.getItemValue(c)===o)||i.find(o));t.set("selectedItems",s);let a=Ce(n("selectionBehavior"),{preserve:t.get("inputValue"),replace:i.stringifyMany(r),clear:""});t.set("inputValue",a)})},syncHighlightedItem({context:e,prop:t}){let n=t("collection").find(e.get("highlightedValue"));e.set("highlightedItem",n)},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}});RI=_()(["allowCustomValue","autoFocus","closeOnSelect","collection","composite","defaultHighlightedValue","defaultInputValue","defaultOpen","defaultValue","dir","disabled","disableLayer","form","getRootNode","highlightedValue","id","ids","inputBehavior","inputValue","invalid","loopFocus","multiple","name","navigate","onFocusOutside","onHighlightChange","onInputValueChange","onInteractOutside","onOpenChange","onOpenChange","onPointerDownOutside","onSelect","onValueChange","open","openOnChange","openOnClick","openOnKeyPress","placeholder","positioning","readOnly","required","scrollToIndexFn","selectionBehavior","translations","value","alwaysSubmitOnEnter"]),ux=B(RI),DI=_()(["htmlFor"]),dx=B(DI),LI=_()(["id"]),hx=B(LI),MI=_()(["item","persistFocus"]),gx=B(MI),FI=class extends K{constructor(){super(...arguments);Y(this,"options",[]);Y(this,"allOptions",[]);Y(this,"hasGroups",!1)}setAllOptions(t){this.allOptions=t,this.options=t}getCollection(){let t=this.options||this.allOptions||[];return this.hasGroups?Ys({items:t,itemToValue:n=>{var i;return(i=n.id)!=null?i:""},itemToString:n=>n.label,isItemDisabled:n=>{var i;return(i=n.disabled)!=null?i:!1},groupBy:n=>{var i;return(i=n.group)!=null?i:""}}):Ys({items:t,itemToValue:n=>{var i;return(i=n.id)!=null?i:""},itemToString:n=>n.label,isItemDisabled:n=>{var i;return(i=n.disabled)!=null?i:!1}})}initMachine(t){let n=this.getCollection.bind(this);return new W(NI,y(g({},t),{get collection(){return n()},onOpenChange:i=>{i.open&&(this.options=this.allOptions),t.onOpenChange&&t.onOpenChange(i)},onInputValueChange:i=>{let r=this.allOptions.filter(s=>s.label.toLowerCase().includes(i.inputValue.toLowerCase()));this.options=r.length>0?r:this.allOptions,t.onInputValueChange&&t.onInputValueChange(i)}}))}initApi(){return VI(this.machine.service,q)}renderItems(){var i,r,s,a;let t=this.el.querySelector('[data-scope="combobox"][data-part="content"]');if(!t)return;let n=this.el.querySelector('[data-templates="combobox"]');if(n)if(t.querySelectorAll('[data-scope="combobox"][data-part="item"]:not([data-template])').forEach(o=>o.remove()),t.querySelectorAll('[data-scope="combobox"][data-part="item-group"]:not([data-template])').forEach(o=>o.remove()),this.hasGroups){let o=(s=(r=(i=this.api.collection).group)==null?void 0:r.call(i))!=null?s:[];this.renderGroupedItems(t,n,o)}else{let o=(a=this.options)!=null&&a.length?this.options:this.allOptions;this.renderFlatItems(t,n,o)}}renderGroupedItems(t,n,i){for(let[r,s]of i){if(r==null)continue;let a=n.querySelector(`[data-scope="combobox"][data-part="item-group"][data-id="${r}"][data-template]`);if(!a)continue;let o=a.cloneNode(!0);o.removeAttribute("data-template"),this.spreadProps(o,this.api.getItemGroupProps({id:r}));let l=o.querySelector('[data-scope="combobox"][data-part="item-group-label"]');l&&this.spreadProps(l,this.api.getItemGroupLabelProps({htmlFor:r}));let c=o.querySelector('[data-scope="combobox"][data-part="item-group-content"]');if(c){c.innerHTML="";for(let u of s){let h=this.cloneItem(n,u);h&&c.appendChild(h)}t.appendChild(o)}}}renderFlatItems(t,n,i){for(let r of i){let s=this.cloneItem(n,r);s&&t.appendChild(s)}}cloneItem(t,n){var l,c,u,h;let i=(h=(u=(c=(l=this.api.collection).getItemValue)==null?void 0:c.call(l,n))!=null?u:n.id)!=null?h:"",r=t.querySelector(`[data-scope="combobox"][data-part="item"][data-value="${i}"][data-template]`);if(!r)return null;let s=r.cloneNode(!0);s.removeAttribute("data-template"),this.spreadProps(s,this.api.getItemProps({item:n}));let a=s.querySelector('[data-scope="combobox"][data-part="item-text"]');a&&(this.spreadProps(a,this.api.getItemTextProps({item:n})),a.children.length===0&&(a.textContent=n.label||""));let o=s.querySelector('[data-scope="combobox"][data-part="item-indicator"]');return o&&this.spreadProps(o,this.api.getItemIndicatorProps({item:n})),s}render(){let t=this.el.querySelector('[data-scope="combobox"][data-part="root"]');if(!t)return;this.spreadProps(t,this.api.getRootProps()),["label","control","input","trigger","clear-trigger","positioner"].forEach(i=>{let r=this.el.querySelector(`[data-scope="combobox"][data-part="${i}"]`);if(!r)return;let s="get"+i.split("-").map(a=>a[0].toUpperCase()+a.slice(1)).join("")+"Props";this.spreadProps(r,this.api[s]())});let n=this.el.querySelector('[data-scope="combobox"][data-part="content"]');n&&(this.spreadProps(n,this.api.getContentProps()),this.renderItems())}};BI={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=JSON.parse(e.dataset.collection||"[]"),i=n.some(l=>!!l.group),r=y(g({id:e.id},C(e,"controlled")?{value:Z(e,"value")}:{defaultValue:Z(e,"defaultValue")}),{disabled:C(e,"disabled"),placeholder:w(e,"placeholder"),alwaysSubmitOnEnter:C(e,"alwaysSubmitOnEnter"),autoFocus:C(e,"autoFocus"),closeOnSelect:C(e,"closeOnSelect"),dir:w(e,"dir",["ltr","rtl"]),inputBehavior:w(e,"inputBehavior",["autohighlight","autocomplete","none"]),loopFocus:C(e,"loopFocus"),multiple:C(e,"multiple"),invalid:C(e,"invalid"),allowCustomValue:!1,selectionBehavior:"replace",name:"",form:w(e,"form"),readOnly:C(e,"readOnly"),required:C(e,"required"),positioning:(()=>{let l=e.dataset.positioning;if(l)try{let c=JSON.parse(l);return HI(c)}catch(c){return}})(),onOpenChange:l=>{let c=w(e,"onOpenChange");c&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&t(c,{open:l.open,reason:l.reason,value:l.value,id:e.id});let u=w(e,"onOpenChangeClient");u&&e.dispatchEvent(new CustomEvent(u,{bubbles:C(e,"bubble"),detail:{open:l.open,reason:l.reason,value:l.value,id:e.id}}))},onInputValueChange:l=>{let c=w(e,"onInputValueChange");c&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&t(c,{value:l.inputValue,reason:l.reason,id:e.id});let u=w(e,"onInputValueChangeClient");u&&e.dispatchEvent(new CustomEvent(u,{bubbles:C(e,"bubble"),detail:{value:l.inputValue,reason:l.reason,id:e.id}}))},onValueChange:l=>{let c=e.querySelector('[data-scope="combobox"][data-part="value-input"]');if(c){let m=O=>{var f;let b=n.find(S=>{var P;return String((P=S.id)!=null?P:"")===O||S.label===O});return b?String((f=b.id)!=null?f:""):O},d=l.value.length===0?"":l.value.length===1?m(String(l.value[0])):l.value.map(O=>m(String(O))).join(",");c.value=d;let p=c.getAttribute("form"),v=null;p?v=document.getElementById(p):v=c.closest("form");let I=new Event("change",{bubbles:!0,cancelable:!0});c.dispatchEvent(I);let T=new Event("input",{bubbles:!0,cancelable:!0});c.dispatchEvent(T),v&&v.hasAttribute("phx-change")&&requestAnimationFrame(()=>{let O=v.querySelector("input, select, textarea");if(O){let b=new Event("change",{bubbles:!0,cancelable:!0});O.dispatchEvent(b)}else{let b=new Event("change",{bubbles:!0,cancelable:!0});v.dispatchEvent(b)}})}let u=w(e,"onValueChange");u&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&t(u,{value:l.value,items:l.items,id:e.id});let h=w(e,"onValueChangeClient");h&&e.dispatchEvent(new CustomEvent(h,{bubbles:C(e,"bubble"),detail:{value:l.value,items:l.items,id:e.id}}))}}),s=new FI(e,r);s.hasGroups=i,s.setAllOptions(n),s.init();let a=e.querySelector('[data-scope="combobox"][data-part="input"]');a&&(a.removeAttribute("name"),a.removeAttribute("form"));let o=C(e,"controlled")?Z(e,"value"):Z(e,"defaultValue");if(o&&o.length>0){let l=n.filter(c=>{var u;return o.includes((u=c.id)!=null?u:"")});if(l.length>0){let c=l.map(u=>{var h;return(h=u.label)!=null?h:""}).join(", ");if(s.api&&typeof s.api.setInputValue=="function")s.api.setInputValue(c);else{let u=e.querySelector('[data-scope="combobox"][data-part="input"]');u&&(u.value=c)}}}this.combobox=s,this.handlers=[]},updated(){let e=JSON.parse(this.el.dataset.collection||"[]"),t=e.some(n=>!!n.group);if(this.combobox){this.combobox.hasGroups=t,this.combobox.setAllOptions(e),this.combobox.updateProps(y(g({},C(this.el,"controlled")?{value:Z(this.el,"value")}:{defaultValue:Z(this.el,"defaultValue")}),{name:w(this.el,"name"),form:w(this.el,"form"),disabled:C(this.el,"disabled"),multiple:C(this.el,"multiple"),dir:w(this.el,"dir",["ltr","rtl"]),invalid:C(this.el,"invalid"),required:C(this.el,"required"),readOnly:C(this.el,"readOnly")}));let n=this.el.querySelector('[data-scope="combobox"][data-part="input"]');n&&(n.removeAttribute("name"),n.removeAttribute("form"),n.name="")}},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.combobox)==null||e.destroy()}}});var eg={};he(eg,{DatePicker:()=>kC});function Uo(e,t){return e-t*Math.floor(e/t)}function js(e,t,n,i){t=al(e,t);let r=t-1,s=-2;return n<=2?s=0:na(t)&&(s=-1),bh-1+365*r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400)+Math.floor((367*n-362)/12+s+i)}function na(e){return e%4===0&&(e%100!==0||e%400===0)}function al(e,t){return e==="BC"?1-t:t}function _I(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}function Zn(e,t){return t=it(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function qI(e,t){return t=it(t,e.calendar),e=rn(e),t=rn(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function WI(e,t){return t=it(t,e.calendar),e=Or(e),t=Or(t),e.era===t.era&&e.year===t.year}function KI(e,t){return aa(e.calendar,t.calendar)&&Zn(e,t)}function zI(e,t){return aa(e.calendar,t.calendar)&&qI(e,t)}function YI(e,t){return aa(e.calendar,t.calendar)&&WI(e,t)}function aa(e,t){var n,i,r,s;return(s=(r=(n=e.isEqual)===null||n===void 0?void 0:n.call(e,t))!==null&&r!==void 0?r:(i=t.isEqual)===null||i===void 0?void 0:i.call(t,e))!==null&&s!==void 0?s:e.identifier===t.identifier}function jI(e,t){return Zn(e,oa(t))}function Eh(e,t,n){let i=e.calendar.toJulianDay(e),r=n?XI[n]:QI(t),s=Math.ceil(i+1-r)%7;return s<0&&(s+=7),s}function Ih(e){return sn(Date.now(),e)}function oa(e){return Yn(Ih(e))}function Ph(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function ZI(e,t){return rh(e)-rh(t)}function rh(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}function ol(){return qo==null&&(qo=new Intl.DateTimeFormat().resolvedOptions().timeZone),qo}function rn(e){return e.subtract({days:e.day-1})}function Zo(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function Or(e){return rn(e.subtract({months:e.month-1}))}function JI(e){return Zo(e.add({months:e.calendar.getMonthsInYear(e)-e.month}))}function wr(e,t,n){let i=Eh(e,t,n);return e.subtract({days:i})}function sh(e,t,n){return wr(e,t,n).add({days:6})}function Ch(e){if(Intl.Locale){let n=ah.get(e);return n||(n=new Intl.Locale(e).maximize().region,n&&ah.set(e,n)),n}let t=e.split("-")[1];return t==="u"?void 0:t}function QI(e){let t=Wo.get(e);if(!t){if(Intl.Locale){let i=new Intl.Locale(e);if("getWeekInfo"in i&&(t=i.getWeekInfo(),t))return Wo.set(e,t),t.firstDay}let n=Ch(e);if(e.includes("-fw-")){let i=e.split("-fw-")[1].split("-")[0];i==="mon"?t={firstDay:1}:i==="tue"?t={firstDay:2}:i==="wed"?t={firstDay:3}:i==="thu"?t={firstDay:4}:i==="fri"?t={firstDay:5}:i==="sat"?t={firstDay:6}:t={firstDay:0}}else e.includes("-ca-iso8601")?t={firstDay:1}:t={firstDay:n&&UI[n]||0};Wo.set(e,t)}return t.firstDay}function eP(e,t,n){let i=e.calendar.getDaysInMonth(e);return Math.ceil((Eh(rn(e),t,n)+i)/7)}function Sh(e,t){return e&&t?e.compare(t)<=0?e:t:e||t}function Th(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function nP(e,t){let n=e.calendar.toJulianDay(e),i=Math.ceil(n+1)%7;i<0&&(i+=7);let r=Ch(t),[s,a]=tP[r]||[6,0];return i===s||i===a}function Fi(e){e=it(e,new Mi);let t=al(e.era,e.year);return Oh(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Oh(e,t,n,i,r,s,a){let o=new Date;return o.setUTCHours(i,r,s,a),o.setUTCFullYear(e,t-1,n),o.getTime()}function Jo(e,t){if(t==="UTC")return 0;if(e>0&&t===ol())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:i,day:r,hour:s,minute:a,second:o}=wh(e,t);return Oh(n,i,r,s,a,o,0)-Math.floor(e/1e3)*1e3}function wh(e,t){let n=oh.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),oh.set(t,n));let i=n.formatToParts(new Date(e)),r={};for(let s of i)s.type!=="literal"&&(r[s.type]=s.value);return{year:r.era==="BC"||r.era==="B"?-r.year+1:+r.year,month:+r.month,day:+r.day,hour:r.hour==="24"?0:+r.hour,minute:+r.minute,second:+r.second}}function iP(e,t,n,i){return(n===i?[n]:[n,i]).filter(s=>rP(e,t,s))}function rP(e,t,n){let i=wh(n,t);return e.year===i.year&&e.month===i.month&&e.day===i.day&&e.hour===i.hour&&e.minute===i.minute&&e.second===i.second}function nn(e,t,n="compatible"){let i=jn(e);if(t==="UTC")return Fi(i);if(t===ol()&&n==="compatible"){i=it(i,new Mi);let l=new Date,c=al(i.era,i.year);return l.setFullYear(c,i.month-1,i.day),l.setHours(i.hour,i.minute,i.second,i.millisecond),l.getTime()}let r=Fi(i),s=Jo(r-lh,t),a=Jo(r+lh,t),o=iP(i,t,r-s,r-a);if(o.length===1)return o[0];if(o.length>1)switch(n){case"compatible":case"earlier":return o[0];case"later":return o[o.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(r-s,r-a);case"compatible":case"later":return Math.max(r-s,r-a);case"reject":throw new RangeError("No such absolute time found")}}function Vh(e,t,n="compatible"){return new Date(nn(e,t,n))}function sn(e,t){let n=Jo(e,t),i=new Date(e+n),r=i.getUTCFullYear(),s=i.getUTCMonth()+1,a=i.getUTCDate(),o=i.getUTCHours(),l=i.getUTCMinutes(),c=i.getUTCSeconds(),u=i.getUTCMilliseconds();return new Mh(r<1?"BC":"AD",r<1?-r+1:r,s,a,t,n,o,l,c,u)}function Yn(e){return new $i(e.calendar,e.era,e.year,e.month,e.day)}function jn(e,t){let n=0,i=0,r=0,s=0;if("timeZone"in e)({hour:n,minute:i,second:r,millisecond:s}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:i,second:r,millisecond:s}=t),new TP(e.calendar,e.era,e.year,e.month,e.day,n,i,r,s)}function it(e,t){if(aa(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),i=e.copy();return i.calendar=t,i.era=n.era,i.year=n.year,i.month=n.month,i.day=n.day,Xn(i),i}function sP(e,t,n){if(e instanceof Mh)return e.timeZone===t?e:oP(e,t);let i=nn(e,t,n);return sn(i,t)}function aP(e){let t=Fi(e)-e.offset;return new Date(t)}function oP(e,t){let n=Fi(e)-e.offset;return it(sn(n,t),e.calendar)}function la(e,t){let n=e.copy(),i="hour"in n?dP(n,t):0;Qo(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,el(n),xh(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=i,lP(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let r=n.calendar.getYearsInEra(n);if(n.year>r){var s,a;let l=(s=(a=n.calendar).isInverseEra)===null||s===void 0?void 0:s.call(a,n);n.year=r,n.month=l?1:n.calendar.getMonthsInYear(n),n.day=l?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let o=n.calendar.getMonthsInYear(n);return n.month>o&&(n.month=o,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function Qo(e,t){var n,i;!((n=(i=e.calendar).isInverseEra)===null||n===void 0)&&n.call(i,e)&&(t=-t),e.year+=t}function el(e){for(;e.month<1;)Qo(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,Qo(e,1)}function lP(e){for(;e.day<1;)e.month--,el(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,el(e)}function xh(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function Xn(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),xh(e)}function Ah(e){let t={};for(let n in e)typeof e[n]=="number"&&(t[n]=-e[n]);return t}function kh(e,t){return la(e,Ah(t))}function ll(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),Xn(n),n}function sa(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),uP(n),n}function cP(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=Xs(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=Xs(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=Xs(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=Xs(e.hour,24),t}function uP(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function Xs(e,t){let n=e%t;return n<0&&(n+=t),n}function dP(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,cP(e)}function cl(e,t,n,i){let r=e.copy();switch(t){case"era":{let o=e.calendar.getEras(),l=o.indexOf(e.era);if(l<0)throw new Error("Invalid era: "+e.era);l=an(l,n,0,o.length-1,i==null?void 0:i.round),r.era=o[l],Xn(r);break}case"year":var s,a;!((s=(a=r.calendar).isInverseEra)===null||s===void 0)&&s.call(a,r)&&(n=-n),r.year=an(e.year,n,-1/0,9999,i==null?void 0:i.round),r.year===-1/0&&(r.year=1),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e);break;case"month":r.month=an(e.month,n,1,e.calendar.getMonthsInYear(e),i==null?void 0:i.round);break;case"day":r.day=an(e.day,n,1,e.calendar.getDaysInMonth(e),i==null?void 0:i.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(r),Xn(r),r}function Nh(e,t,n,i){let r=e.copy();switch(t){case"hour":{let s=e.hour,a=0,o=23;if((i==null?void 0:i.hourCycle)===12){let l=s>=12;a=l?12:0,o=l?23:11}r.hour=an(s,n,a,o,i==null?void 0:i.round);break}case"minute":r.minute=an(e.minute,n,0,59,i==null?void 0:i.round);break;case"second":r.second=an(e.second,n,0,59,i==null?void 0:i.round);break;case"millisecond":r.millisecond=an(e.millisecond,n,0,999,i==null?void 0:i.round);break;default:throw new Error("Unsupported field "+t)}return r}function an(e,t,n,i,r=!1){if(r){e+=Math.sign(t),e0?e=Math.ceil(e/s)*s:e=Math.floor(e/s)*s,e>i&&(e=n)}else e+=t,ei&&(e=n+(e-i-1));return e}function Rh(e,t){let n;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let r=la(jn(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=nn(r,e.timeZone)}else n=Fi(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let i=sn(n,e.timeZone);return it(i,e.calendar)}function hP(e,t){return Rh(e,Ah(t))}function gP(e,t,n,i){switch(t){case"hour":{let r=0,s=23;if((i==null?void 0:i.hourCycle)===12){let p=e.hour>=12;r=p?12:0,s=p?23:11}let a=jn(e),o=it(sa(a,{hour:r}),new Mi),l=[nn(o,e.timeZone,"earlier"),nn(o,e.timeZone,"later")].filter(p=>sn(p,e.timeZone).day===o.day)[0],c=it(sa(a,{hour:s}),new Mi),u=[nn(c,e.timeZone,"earlier"),nn(c,e.timeZone,"later")].filter(p=>sn(p,e.timeZone).day===c.day).pop(),h=Fi(e)-e.offset,m=Math.floor(h/Sr),d=h%Sr;return h=an(m,n,Math.floor(l/Sr),Math.floor(u/Sr),i==null?void 0:i.round)*Sr+d,it(sn(h,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return Nh(e,t,n,i);case"era":case"year":case"month":case"day":{let r=cl(jn(e),t,n,i),s=nn(r,e.timeZone);return it(sn(s,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function pP(e,t,n){let i=jn(e),r=sa(ll(i,t),t);if(r.compare(i)===0)return e;let s=nn(r,e.timeZone,n);return it(sn(s,e.timeZone),e.calendar)}function yP(e){let t=e.match(fP);if(!t)throw mP.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let n=new $i(Ko(t[1],0,9999),Ko(t[2],1,12),1);return n.day=Ko(t[3],1,n.calendar.getDaysInMonth(n)),n}function Ko(e,t,n){let i=Number(e);if(in)throw new RangeError(`Value out of range: ${t} <= ${i} <= ${n}`);return i}function bP(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function Dh(e){let t=it(e,new Mi),n;return t.era==="BC"?n=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):n=String(t.year).padStart(4,"0"),`${n}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function Lh(e){return`${Dh(e)}T${bP(e)}`}function EP(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let n=Math.floor(e/36e5),i=Math.floor(e%36e5/6e4),r=Math.floor(e%36e5%6e4/1e3),s=`${t}${String(n).padStart(2,"0")}:${String(i).padStart(2,"0")}`;return r!==0&&(s+=`:${String(r).padStart(2,"0")}`),s}function IP(e){return`${Lh(e)}${EP(e.offset)}[${e.timeZone}]`}function PP(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ul(e,t,n){PP(e,t),t.set(e,n)}function dl(e){let t=typeof e[0]=="object"?e.shift():new Mi,n;if(typeof e[0]=="string")n=e.shift();else{let a=t.getEras();n=a[a.length-1]}let i=e.shift(),r=e.shift(),s=e.shift();return[t,n,i,r,s]}function Fh(e,t={}){if(typeof t.hour12=="boolean"&&VP()){t=g({},t);let r=wP[String(t.hour12)][e.split("-")[0]],s=t.hour12?"h12":"h23";t.hourCycle=r!=null?r:s,delete t.hour12}let n=e+(t?Object.entries(t).sort((r,s)=>r[0]s.type==="hour").value,10),r=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(s=>s.type==="hour").value,10);if(i===0&&r===23)return"h23";if(i===24&&r===23)return"h24";if(i===0&&r===11)return"h11";if(i===12&&r===11)return"h12";throw new Error("Unexpected hour cycle result")}function kP(e,t,n,i,r){let s={};for(let o in t){let l=o,c=t[l];c!=null&&(s[l]=Math.floor(c/2),s[l]>0&&c%2===0&&s[l]--)}let a=Jn(e,t,n).subtract(s);return Vr(e,a,t,n,i,r)}function Jn(e,t,n,i,r){let s=e;return t.years?s=Or(e):t.months?s=rn(e):t.weeks&&(s=wr(e,n)),Vr(e,s,t,n,i,r)}function hl(e,t,n,i,r){let s=g({},t);s.days?s.days--:s.weeks?s.weeks--:s.months?s.months--:s.years&&s.years--;let a=Jn(e,t,n).subtract(s);return Vr(e,a,t,n,i,r)}function Vr(e,t,n,i,r,s){return r&&e.compare(r)>=0&&(t=Th(t,Jn(Yn(r),n,i))),s&&e.compare(s)<=0&&(t=Sh(t,hl(Yn(s),n,i))),t}function Pt(e,t,n){let i=Yn(e);return t&&(i=Th(i,Yn(t))),n&&(i=Sh(i,Yn(n))),i}function ch(e,t,n,i,r,s){switch(t){case"start":return Jn(e,n,i,r,s);case"end":return hl(e,n,i,r,s);case"center":default:return kP(e,n,i,r,s)}}function nt(e,t){return e==null||t==null?e===t:Zn(e,t)}function uh(e,t,n,i,r){return e?t!=null&&t(e,n)?!0:$t(e,i,r):!1}function $t(e,t,n){return t!=null&&e.compare(t)<0||n!=null&&e.compare(n)>0}function NP(e,t,n){let i=e.subtract({days:1});return Zn(i,e)||$t(i,t,n)}function RP(e,t,n){let i=e.add({days:1});return Zn(i,e)||$t(i,t,n)}function gl(e){let t=g({},e);for(let n in t)t[n]=1;return t}function $h(e,t){let n=g({},t);return n.days?n.days--:n.days=-1,e.add(n)}function Hh(e){return(e==null?void 0:e.calendar.identifier)==="gregory"&&e.era==="BC"?"short":void 0}function Bh(e,t){let n=jn(oa(t));return new Ct(e,{weekday:"long",month:"long",year:"numeric",day:"numeric",era:Hh(n),timeZone:t})}function dh(e,t){let n=oa(t);return new Ct(e,{month:"long",year:"numeric",era:Hh(n),calendar:n==null?void 0:n.calendar.identifier,timeZone:t})}function DP(e,t,n,i,r){let s=n.formatRangeToParts(e.toDate(r),t.toDate(r)),a=-1;for(let c=0;ca&&(l+=s[c].value);return i(o,l)}function Zs(e,t,n,i){if(!e)return"";let r=e,s=t!=null?t:e,a=Bh(n,i);return Zn(r,s)?a.format(r.toDate(i)):DP(r,s,a,(o,l)=>`${o} \u2013 ${l}`,i)}function _h(e){return e!=null?LP[e]:void 0}function Gh(e,t,n){let i=_h(n);return wr(e,t,i)}function Uh(e,t,n,i){let r=t.add({weeks:e}),s=[],a=Gh(r,n,i);for(;s.length<7;){s.push(a);let o=a.add({days:1});if(Zn(a,o))break;a=o}return s}function MP(e,t,n,i){let r=_h(i),s=n!=null?n:eP(e,t,r);return[...new Array(s).keys()].map(o=>Uh(o,e,t,i))}function FP(e,t){let n=new Ct(e,{weekday:"long",timeZone:t}),i=new Ct(e,{weekday:"short",timeZone:t}),r=new Ct(e,{weekday:"narrow",timeZone:t});return s=>{let a=s instanceof Date?s:s.toDate(t);return{value:s,short:i.format(a),long:n.format(a),narrow:r.format(a)}}}function $P(e,t,n,i){let r=Gh(e,i,t),s=[...new Array(7).keys()],a=FP(i,n);return s.map(o=>a(r.add({days:o})))}function HP(e,t="long"){let n=new Date(2021,0,1),i=[];for(let r=0;r<12;r++)i.push(n.toLocaleString(e,{month:t})),n.setMonth(n.getMonth()+1);return i}function BP(e){let t=[];for(let n=e.from;n<=e.to;n+=1)t.push(n);return t}function GP(e){if(e){if(e.length===3)return e.padEnd(4,"0");if(e.length===2){let t=new Date().getFullYear(),n=Math.floor(t/100)*100,i=parseInt(e.slice(-2),10),r=n+i;return r>t+_P?(r-100).toString():r.toString()}return e}}function Li(e,t){let n=t!=null&&t.strict?10:12,i=e-e%10,r=[];for(let s=0;s0?{startDate:Jn(o,e,t,n,i),endDate:l,focusedDate:Pt(o,n,i)}:{startDate:a,endDate:l,focusedDate:Pt(o,n,i)}}}function qh(e,t,n,i,r,s){let a=xr(n,i,r,s),o=t.add(n);return a({focusedDate:e.add(n),startDate:Jn(Vr(e,o,n,i,r,s),n,i)})}function Wh(e,t,n,i,r,s){let a=xr(n,i,r,s),o=t.subtract(n);return a({focusedDate:e.subtract(n),startDate:Jn(Vr(e,o,n,i,r,s),n,i)})}function UP(e,t,n,i,r,s,a){let o=xr(i,r,s,a);if(!n&&!i.days)return o({focusedDate:e.add(gl(i)),startDate:t});if(i.days)return qh(e,t,i,r,s,a);if(i.weeks)return o({focusedDate:e.add({months:1}),startDate:t});if(i.months||i.years)return o({focusedDate:e.add({years:1}),startDate:t})}function qP(e,t,n,i,r,s,a){let o=xr(i,r,s,a);if(!n&&!i.days)return o({focusedDate:e.subtract(gl(i)),startDate:t});if(i.days)return Wh(e,t,i,r,s,a);if(i.weeks)return o({focusedDate:e.subtract({months:1}),startDate:t});if(i.months||i.years)return o({focusedDate:e.subtract({years:1}),startDate:t})}function zP(e,t,n){var c;let i=YP(t,n),{year:r,month:s,day:a}=(c=jP(i,e))!=null?c:{};if(r!=null||s!=null||a!=null){let u=new Date;r||(r=u.getFullYear().toString()),s||(s=(u.getMonth()+1).toString()),a||(a=u.getDate().toString())}if(hh(r)||(r=GP(r)),hh(r)&&WP(s)&&KP(a))return new $i(+r,+s,+a);let l=Date.parse(e);if(!isNaN(l)){let u=new Date(l);return new $i(u.getFullYear(),u.getMonth()+1,u.getDate())}}function YP(e,t){return new Ct(e,{day:"numeric",month:"numeric",year:"numeric",timeZone:t}).formatToParts(new Date(2e3,11,25)).map(({type:r,value:s})=>r==="literal"?`${s}?`:`((?!=<${r}>)\\d+)?`).join("")}function jP(e,t){var i;let n=t.match(e);return(i=e.toString().match(/<(.+?)>/g))==null?void 0:i.map(r=>{var a;let s=r.match(/<(.+)>/);return!s||s.length<=0?null:(a=r.match(/<(.+)>/))==null?void 0:a[1]}).reduce((r,s,a)=>(s&&(n&&n.length>a?r[s]=n[a+1]:r[s]=null),r),{})}function gh(e,t,n){let i=Yn(Ih(n));switch(e){case"thisWeek":return[wr(i,t),sh(i,t)];case"thisMonth":return[rn(i),i];case"thisQuarter":return[rn(i).add({months:-((i.month-1)%3)}),i];case"thisYear":return[Or(i),i];case"last3Days":return[i.add({days:-2}),i];case"last7Days":return[i.add({days:-6}),i];case"last14Days":return[i.add({days:-13}),i];case"last30Days":return[i.add({days:-29}),i];case"last90Days":return[i.add({days:-89}),i];case"lastMonth":return[rn(i.add({months:-1})),Zo(i.add({months:-1}))];case"lastQuarter":return[rn(i.add({months:-((i.month-1)%3)-3})),Zo(i.add({months:-((i.month-1)%3)-1}))];case"lastWeek":return[wr(i,t).add({weeks:-1}),sh(i,t).add({weeks:-1})];case"lastYear":return[Or(i.add({years:-1})),JI(i.add({years:-1}))];default:throw new Error(`Invalid date range preset: ${e}`)}}function XP(e={}){var c;let{level:t="polite",document:n=document,root:i,delay:r=0}=e,s=(c=n.defaultView)!=null?c:window,a=i!=null?i:n.body;function o(u,h){let m=n.getElementById(Js);m==null||m.remove(),h=h!=null?h:r;let d=n.createElement("span");d.id=Js,d.dataset.liveAnnouncer="true";let p=t!=="assertive"?"status":"alert";d.setAttribute("aria-live",t),d.setAttribute("role",p),Object.assign(d.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}),a.appendChild(d),s.setTimeout(()=>{d.textContent=u},h)}function l(){let u=n.getElementById(Js);u==null||u.remove()}return{announce:o,destroy:l,toJSON(){return Js}}}function sl(e){let[t,n]=e,i;return!t||!n?i=e:i=t.compare(n)<=0?e:[n,t],i}function Ri(e,t){let[n,i]=t;return!n||!i?!1:n.compare(e)<=0&&i.compare(e)>=0}function Qs(e){return e.slice().filter(t=>t!=null).sort((t,n)=>t.compare(n))}function lC(e){return Ce(e,{year:"calendar decade",month:"calendar year",day:"calendar month"})}function uC(e){return new Ct(e).formatToParts(new Date).map(t=>{var n;return(n=cC[t.type])!=null?n:t.value}).join("")}function hC(e){let i=new Intl.DateTimeFormat(e).formatToParts(new Date).find(r=>r.type==="literal");return i?i.value:"/"}function on(e,t){return e?e==="day"?0:e==="month"?1:2:t||0}function pl(e){return e===0?"day":e===1?"month":"year"}function fl(e,t,n){return pl(He(on(e,0),on(t,0),on(n,2)))}function pC(e,t){return on(e,0)>on(t,0)}function fC(e,t){return on(e,0)e(t))}function IC(e,t){let{state:n,context:i,prop:r,send:s,computed:a,scope:o}=e,l=i.get("startValue"),c=a("endValue"),u=i.get("value"),h=i.get("focusedValue"),m=i.get("hoveredValue"),d=m?sl([u[0],m]):[],p=!!r("disabled"),v=!!r("readOnly"),I=!!r("invalid"),T=a("isInteractive"),O=u.length===0,b=r("min"),f=r("max"),S=r("locale"),P=r("timeZone"),V=r("startOfWeek"),A=n.matches("focused"),x=n.matches("open"),k=r("selectionMode")==="range",N=r("isDateUnavailable"),D=i.get("currentPlacement"),$=On(y(g({},r("positioning")),{placement:D})),te=hC(S),J=g(g({},gC),r("translations"));function ie(M=l){let R=r("fixedWeeks")?6:void 0;return MP(M,S,R,V)}function Q(M={}){let{format:R}=M;return HP(S,R).map((F,G)=>{let ae=G+1,ze=h.set({month:ae}),Ne=$t(ze,b,f);return{label:F,value:ae,disabled:Ne}})}function Se(){var R,F;return BP({from:(R=b==null?void 0:b.year)!=null?R:1900,to:(F=f==null?void 0:f.year)!=null?F:2100}).map(G=>({label:G.toString(),value:G,disabled:!Pi(G,b==null?void 0:b.year,f==null?void 0:f.year)}))}function Pe(M){return uh(M,N,S,b,f)}function ne(M){let R=l!=null?l:Di(P);s({type:"FOCUS.SET",value:R.set({month:M})})}function Ie(M){let R=l!=null?l:Di(P);s({type:"FOCUS.SET",value:R.set({year:M})})}function rt(M){let{value:R,disabled:F}=M,G=h.set({year:R}),ze=!Li(l.year,{strict:!0}).includes(R),Ne=Pi(R,b==null?void 0:b.year,f==null?void 0:f.year),Tt={focused:h.year===M.value,selectable:ze||Ne,outsideRange:ze,selected:!!u.find(Zi=>Zi&&Zi.year===R),valueText:R.toString(),inRange:k&&(Ri(G,u)||Ri(G,d)),value:G,get disabled(){return F||!Tt.selectable}};return Tt}function Ut(M){let{value:R,disabled:F}=M,G=h.set({month:R}),ae=dh(S,P),ze={focused:h.month===M.value,selectable:!$t(G,b,f),selected:!!u.find(Ne=>Ne&&Ne.month===R&&Ne.year===h.year),valueText:ae.format(G.toDate(P)),inRange:k&&(Ri(G,u)||Ri(G,d)),value:G,get disabled(){return F||!ze.selectable}};return ze}function Xi(M){let{value:R,disabled:F,visibleRange:G=a("visibleRange")}=M,ae=Bh(S,P),ze=gl(a("visibleDuration")),Ne=r("outsideDaySelectable"),Tt=G.start.add(ze).subtract({days:1}),Zi=$t(R,G.start,Tt),kf=k&&Ri(R,u),Nf=k&&nt(R,u[0]),Rf=k&&nt(R,u[1]),Ma=k&&d.length>0,ic=Ma&&Ri(R,d),Df=Ma&&nt(R,d[0]),Lf=Ma&&nt(R,d[1]),Ji={invalid:$t(R,b,f),disabled:F||!Ne&&Zi||$t(R,b,f),selected:u.some(Mf=>nt(R,Mf)),unavailable:uh(R,N,S,b,f)&&!F,outsideRange:Zi,today:jI(R,P),weekend:nP(R,S),formattedDate:ae.format(R.toDate(P)),get focused(){return nt(R,h)&&(!Ji.outsideRange||Ne)},get ariaLabel(){return J.dayCell(Ji)},get selectable(){return!Ji.disabled&&!Ji.unavailable},inRange:kf||ic,firstInRange:Nf,lastInRange:Rf,inHoveredRange:ic,firstInHoveredRange:Df,lastInHoveredRange:Lf};return Ji}function La(M){let{view:R="day",id:F}=M;return[R,F].filter(Boolean).join(" ")}return{focused:A,open:x,disabled:p,invalid:I,readOnly:v,inline:!!r("inline"),numOfMonths:r("numOfMonths"),selectionMode:r("selectionMode"),view:i.get("view"),getRangePresetValue(M){return gh(M,S,P)},getDaysInWeek(M,R=l){return Uh(M,R,S,V)},getOffset(M){let R=l.add(M),F=c.add(M),G=dh(S,P);return{visibleRange:{start:R,end:F},weeks:ie(R),visibleRangeText:{start:G.format(R.toDate(P)),end:G.format(F.toDate(P))}}},getMonthWeeks:ie,isUnavailable:Pe,weeks:ie(),weekDays:$P(Di(P),V,P,S),visibleRangeText:a("visibleRangeText"),value:u,valueAsDate:u.filter(M=>M!=null).map(M=>M.toDate(P)),valueAsString:a("valueAsString"),focusedValue:h,focusedValueAsDate:h==null?void 0:h.toDate(P),focusedValueAsString:r("format")(h,{locale:S,timeZone:P}),visibleRange:a("visibleRange"),selectToday(){let M=Pt(Di(P),b,f);s({type:"VALUE.SET",value:M})},setValue(M){let R=M.map(F=>Pt(F,b,f));s({type:"VALUE.SET",value:R})},clearValue(){s({type:"VALUE.CLEAR"})},setFocusedValue(M){s({type:"FOCUS.SET",value:M})},setOpen(M){r("inline")||n.matches("open")===M||s({type:M?"OPEN":"CLOSE"})},focusMonth:ne,focusYear:Ie,getYears:Se,getMonths:Q,getYearsGrid(M={}){let{columns:R=1}=M,F=Li(l.year,{strict:!0}).map(G=>({label:G.toString(),value:G,disabled:!Pi(G,b==null?void 0:b.year,f==null?void 0:f.year)}));return cr(F,R)},getDecade(){let M=Li(l.year,{strict:!0});return{start:M.at(0),end:M.at(-1)}},getMonthsGrid(M={}){let{columns:R=1,format:F}=M;return cr(Q({format:F}),R)},format(M,R={month:"long",year:"numeric"}){return new Ct(S,R).format(M.toDate(P))},setView(M){s({type:"VIEW.SET",view:M})},goToNext(){s({type:"GOTO.NEXT",view:i.get("view")})},goToPrev(){s({type:"GOTO.PREV",view:i.get("view")})},getRootProps(){return t.element(y(g({},de.root.attrs),{dir:r("dir"),id:QP(o),"data-state":x?"open":"closed","data-disabled":E(p),"data-readonly":E(v),"data-empty":E(O)}))},getLabelProps(M={}){let{index:R=0}=M;return t.label(y(g({},de.label.attrs),{id:JP(o,R),dir:r("dir"),htmlFor:ph(o,R),"data-state":x?"open":"closed","data-index":R,"data-disabled":E(p),"data-readonly":E(v)}))},getControlProps(){return t.element(y(g({},de.control.attrs),{dir:r("dir"),id:zh(o),"data-disabled":E(p),"data-placeholder-shown":E(O)}))},getRangeTextProps(){return t.element(y(g({},de.rangeText.attrs),{dir:r("dir")}))},getContentProps(){return t.element(y(g({},de.content.attrs),{hidden:!x,dir:r("dir"),"data-state":x?"open":"closed","data-placement":D,"data-inline":E(r("inline")),id:rl(o),tabIndex:-1,role:"application","aria-roledescription":"datepicker","aria-label":J.content}))},getTableProps(M={}){let{view:R="day",columns:F=R==="day"?7:4}=M,G=La(M);return t.element(y(g({},de.table.attrs),{role:"grid","data-columns":F,"aria-roledescription":lC(R),id:eC(o,G),"aria-readonly":X(v),"aria-disabled":X(p),"aria-multiselectable":X(r("selectionMode")!=="single"),"data-view":R,dir:r("dir"),tabIndex:-1,onKeyDown(ae){if(ae.defaultPrevented)return;let Ne={Enter(){R==="day"&&Pe(h)||R==="month"&&!Ut({value:h.month}).selectable||R==="year"&&!rt({value:h.year}).selectable||s({type:"TABLE.ENTER",view:R,columns:F,focus:!0})},ArrowLeft(){s({type:"TABLE.ARROW_LEFT",view:R,columns:F,focus:!0})},ArrowRight(){s({type:"TABLE.ARROW_RIGHT",view:R,columns:F,focus:!0})},ArrowUp(){s({type:"TABLE.ARROW_UP",view:R,columns:F,focus:!0})},ArrowDown(){s({type:"TABLE.ARROW_DOWN",view:R,columns:F,focus:!0})},PageUp(Tt){s({type:"TABLE.PAGE_UP",larger:Tt.shiftKey,view:R,columns:F,focus:!0})},PageDown(Tt){s({type:"TABLE.PAGE_DOWN",larger:Tt.shiftKey,view:R,columns:F,focus:!0})},Home(){s({type:"TABLE.HOME",view:R,columns:F,focus:!0})},End(){s({type:"TABLE.END",view:R,columns:F,focus:!0})}}[ge(ae,{dir:r("dir")})];Ne&&(Ne(ae),ae.preventDefault(),ae.stopPropagation())},onPointerLeave(){s({type:"TABLE.POINTER_LEAVE"})},onPointerDown(){s({type:"TABLE.POINTER_DOWN",view:R})},onPointerUp(){s({type:"TABLE.POINTER_UP",view:R})}}))},getTableHeadProps(M={}){let{view:R="day"}=M;return t.element(y(g({},de.tableHead.attrs),{"aria-hidden":!0,dir:r("dir"),"data-view":R,"data-disabled":E(p)}))},getTableHeaderProps(M={}){let{view:R="day"}=M;return t.element(y(g({},de.tableHeader.attrs),{dir:r("dir"),"data-view":R,"data-disabled":E(p)}))},getTableBodyProps(M={}){let{view:R="day"}=M;return t.element(y(g({},de.tableBody.attrs),{"data-view":R,"data-disabled":E(p)}))},getTableRowProps(M={}){let{view:R="day"}=M;return t.element(y(g({},de.tableRow.attrs),{"aria-disabled":X(p),"data-disabled":E(p),"data-view":R}))},getDayTableCellState:Xi,getDayTableCellProps(M){let{value:R}=M,F=Xi(M);return t.element(y(g({},de.tableCell.attrs),{role:"gridcell","aria-disabled":X(!F.selectable),"aria-selected":F.selected||F.inRange,"aria-invalid":X(F.invalid),"aria-current":F.today?"date":void 0,"data-value":R.toString()}))},getDayTableCellTriggerProps(M){let{value:R}=M,F=Xi(M);return t.element(y(g({},de.tableCellTrigger.attrs),{id:Xo(o,R.toString()),role:"button",dir:r("dir"),tabIndex:F.focused?0:-1,"aria-label":F.ariaLabel,"aria-disabled":X(!F.selectable),"aria-invalid":X(F.invalid),"data-disabled":E(!F.selectable),"data-selected":E(F.selected),"data-value":R.toString(),"data-view":"day","data-today":E(F.today),"data-focus":E(F.focused),"data-unavailable":E(F.unavailable),"data-range-start":E(F.firstInRange),"data-range-end":E(F.lastInRange),"data-in-range":E(F.inRange),"data-outside-range":E(F.outsideRange),"data-weekend":E(F.weekend),"data-in-hover-range":E(F.inHoveredRange),"data-hover-range-start":E(F.firstInHoveredRange),"data-hover-range-end":E(F.lastInHoveredRange),onClick(G){G.defaultPrevented||F.selectable&&s({type:"CELL.CLICK",cell:"day",value:R})},onPointerMove:k?G=>{if(G.pointerType==="touch"||!F.selectable)return;let ae=!o.isActiveElement(G.currentTarget);m&&KI(R,m)||s({type:"CELL.POINTER_MOVE",cell:"day",value:R,focus:ae})}:void 0}))},getMonthTableCellState:Ut,getMonthTableCellProps(M){let{value:R,columns:F}=M,G=Ut(M);return t.element(y(g({},de.tableCell.attrs),{dir:r("dir"),colSpan:F,role:"gridcell","aria-selected":X(G.selected||G.inRange),"data-selected":E(G.selected),"aria-disabled":X(!G.selectable),"data-value":R}))},getMonthTableCellTriggerProps(M){let{value:R}=M,F=Ut(M);return t.element(y(g({},de.tableCellTrigger.attrs),{dir:r("dir"),role:"button",id:Xo(o,R.toString()),"data-selected":E(F.selected),"aria-disabled":X(!F.selectable),"data-disabled":E(!F.selectable),"data-focus":E(F.focused),"data-in-range":E(F.inRange),"data-outside-range":E(F.outsideRange),"aria-label":F.valueText,"data-view":"month","data-value":R,tabIndex:F.focused?0:-1,onClick(G){G.defaultPrevented||F.selectable&&s({type:"CELL.CLICK",cell:"month",value:R})},onPointerMove:k?G=>{if(G.pointerType==="touch"||!F.selectable)return;let ae=!o.isActiveElement(G.currentTarget);m&&F.value&&zI(F.value,m)||s({type:"CELL.POINTER_MOVE",cell:"month",value:F.value,focus:ae})}:void 0}))},getYearTableCellState:rt,getYearTableCellProps(M){let{value:R,columns:F}=M,G=rt(M);return t.element(y(g({},de.tableCell.attrs),{dir:r("dir"),colSpan:F,role:"gridcell","aria-selected":X(G.selected),"data-selected":E(G.selected),"aria-disabled":X(!G.selectable),"data-value":R}))},getYearTableCellTriggerProps(M){let{value:R}=M,F=rt(M);return t.element(y(g({},de.tableCellTrigger.attrs),{dir:r("dir"),role:"button",id:Xo(o,R.toString()),"data-selected":E(F.selected),"data-focus":E(F.focused),"data-in-range":E(F.inRange),"aria-disabled":X(!F.selectable),"data-disabled":E(!F.selectable),"aria-label":F.valueText,"data-outside-range":E(F.outsideRange),"data-value":R,"data-view":"year",tabIndex:F.focused?0:-1,onClick(G){G.defaultPrevented||F.selectable&&s({type:"CELL.CLICK",cell:"year",value:R})},onPointerMove:k?G=>{if(G.pointerType==="touch"||!F.selectable)return;let ae=!o.isActiveElement(G.currentTarget);m&&F.value&&YI(F.value,m)||s({type:"CELL.POINTER_MOVE",cell:"year",value:F.value,focus:ae})}:void 0}))},getNextTriggerProps(M={}){let{view:R="day"}=M,F=p||!a("isNextVisibleRangeValid");return t.button(y(g({},de.nextTrigger.attrs),{dir:r("dir"),id:nC(o,R),type:"button","aria-label":J.nextTrigger(R),disabled:F,"data-disabled":E(F),onClick(G){G.defaultPrevented||s({type:"GOTO.NEXT",view:R})}}))},getPrevTriggerProps(M={}){let{view:R="day"}=M,F=p||!a("isPrevVisibleRangeValid");return t.button(y(g({},de.prevTrigger.attrs),{dir:r("dir"),id:tC(o,R),type:"button","aria-label":J.prevTrigger(R),disabled:F,"data-disabled":E(F),onClick(G){G.defaultPrevented||s({type:"GOTO.PREV",view:R})}}))},getClearTriggerProps(){return t.button(y(g({},de.clearTrigger.attrs),{id:Kh(o),dir:r("dir"),type:"button","aria-label":J.clearTrigger,hidden:!u.length,onClick(M){M.defaultPrevented||s({type:"VALUE.CLEAR"})}}))},getTriggerProps(){return t.button(y(g({},de.trigger.attrs),{id:Yh(o),dir:r("dir"),type:"button","data-placement":D,"aria-label":J.trigger(x),"aria-controls":rl(o),"data-state":x?"open":"closed","data-placeholder-shown":E(O),"aria-haspopup":"grid",disabled:p,onClick(M){M.defaultPrevented||T&&s({type:"TRIGGER.CLICK"})}}))},getViewProps(M={}){let{view:R="day"}=M;return t.element(y(g({},de.view.attrs),{"data-view":R,hidden:i.get("view")!==R}))},getViewTriggerProps(M={}){let{view:R="day"}=M;return t.button(y(g({},de.viewTrigger.attrs),{"data-view":R,dir:r("dir"),id:iC(o,R),type:"button",disabled:p,"aria-label":J.viewTrigger(R),onClick(F){F.defaultPrevented||T&&s({type:"VIEW.TOGGLE",src:"viewTrigger"})}}))},getViewControlProps(M={}){let{view:R="day"}=M;return t.element(y(g({},de.viewControl.attrs),{"data-view":R,dir:r("dir")}))},getInputProps(M={}){let{index:R=0,fixOnBlur:F=!0}=M;return t.input(y(g({},de.input.attrs),{id:ph(o,R),autoComplete:"off",autoCorrect:"off",spellCheck:"false",dir:r("dir"),name:r("name"),"data-index":R,"data-state":x?"open":"closed","data-placeholder-shown":E(O),readOnly:v,disabled:p,required:r("required"),"aria-invalid":X(I),"data-invalid":E(I),placeholder:r("placeholder")||uC(S),defaultValue:a("valueAsString")[R],onBeforeInput(G){let{data:ae}=Yt(G);Qh(ae,te)||G.preventDefault()},onFocus(){s({type:"INPUT.FOCUS",index:R})},onBlur(G){let ae=G.currentTarget.value.trim();s({type:"INPUT.BLUR",value:ae,index:R,fixOnBlur:F})},onKeyDown(G){if(G.defaultPrevented||!T)return;let ze={Enter(Ne){Re(Ne)||Pe(h)||Ne.currentTarget.value.trim()!==""&&s({type:"INPUT.ENTER",value:Ne.currentTarget.value,index:R})}}[G.key];ze&&(ze(G),G.preventDefault())},onInput(G){let ae=G.currentTarget.value;s({type:"INPUT.CHANGE",value:dC(ae,te),index:R})}}))},getMonthSelectProps(){return t.select(y(g({},de.monthSelect.attrs),{id:Xh(o),"aria-label":J.monthSelect,disabled:p,dir:r("dir"),defaultValue:l.month,onChange(M){ne(Number(M.currentTarget.value))}}))},getYearSelectProps(){return t.select(y(g({},de.yearSelect.attrs),{id:Zh(o),disabled:p,"aria-label":J.yearSelect,dir:r("dir"),defaultValue:l.year,onChange(M){Ie(Number(M.currentTarget.value))}}))},getPositionerProps(){return t.element(y(g({id:jh(o)},de.positioner.attrs),{dir:r("dir"),style:$.floating}))},getPresetTriggerProps(M){let R=Array.isArray(M.value)?M.value:gh(M.value,S,P),F=R.filter(G=>G!=null).map(G=>G.toDate(P).toDateString());return t.button(y(g({},de.presetTrigger.attrs),{"aria-label":J.presetTrigger(F),type:"button",onClick(G){G.defaultPrevented||s({type:"PRESET.CLICK",value:R})}}))}}}function PC(e,t){if((e==null?void 0:e.length)!==(t==null?void 0:t.length))return!1;let n=Math.max(e.length,t.length);for(let i=0;in==null?"":t("format")(n,{locale:t("locale"),timeZone:t("timeZone")}))}function ve(e,t){let{context:n,prop:i,computed:r}=e;if(!t)return;let s=ra(e,t);if(nt(n.get("focusedValue"),s))return;let o=xr(r("visibleDuration"),i("locale"),i("min"),i("max"))({focusedDate:s,startDate:n.get("startValue")});n.set("startValue",o.startDate),n.set("focusedValue",o.focusedDate)}function ta(e,t){let{context:n}=e;n.set("startValue",t.startDate);let i=n.get("focusedValue");nt(i,t.focusedDate)||n.set("focusedValue",t.focusedDate)}function gt(e){return Array.isArray(e)?e.map(t=>gt(t)):e instanceof Date?new $i(e.getFullYear(),e.getMonth()+1,e.getDate()):yP(e)}function yh(e){let t=n=>String(n).padStart(2,"0");return`${e.year}-${t(e.month)}-${t(e.day)}`}var bh,GI,Mi,UI,XI,qo,ah,Wo,tP,oh,lh,Sr,fP,mP,vP,Ex,CP,$i,SP,TP,OP,Mh,zo,Ct,wP,Yo,jo,LP,_P,hh,WP,KP,Js,ZP,de,JP,QP,eC,rl,Xo,tC,nC,iC,Kh,zh,ph,Yh,jh,Xh,Zh,fh,mh,ia,Tr,rC,sC,aC,oC,Jh,cC,Qh,vh,dC,gC,yC,EC,ht,CC,ra,SC,Ix,TC,Px,OC,Cx,wC,Sx,VC,Tx,xC,Ox,AC,kC,tg=re(()=>{"use strict";Pr();Wn();tn();se();bh=1721426;GI={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]},Mi=class{fromJulianDay(e){let t=e,n=t-bh,i=Math.floor(n/146097),r=Uo(n,146097),s=Math.floor(r/36524),a=Uo(r,36524),o=Math.floor(a/1461),l=Uo(a,1461),c=Math.floor(l/365),u=i*400+s*100+o*4+c+(s!==4&&c!==4?1:0),[h,m]=_I(u),d=t-js(h,m,1,1),p=2;t= start date");return`${this.formatter.format(e)} \u2013 ${this.formatter.format(t)}`}formatRangeToParts(e,t){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(e,t);if(t= start date");let n=this.formatter.formatToParts(e),i=this.formatter.formatToParts(t);return[...n.map(r=>y(g({},r),{source:"startRange"})),{type:"literal",value:" \u2013 ",source:"shared"},...i.map(r=>y(g({},r),{source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return xP()&&(this.resolvedHourCycle||(this.resolvedHourCycle=AP(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),e.calendar==="ethiopic-amete-alem"&&(e.calendar="ethioaa"),e}constructor(e,t={}){this.formatter=Fh(e,t),this.options=t}},wP={true:{ja:"h11"},false:{}};Yo=null;jo=null;LP=["sun","mon","tue","wed","thu","fri","sat"];_P=10;hh=e=>e!=null&&e.length===4,WP=e=>e!=null&&parseFloat(e)<=12,KP=e=>e!=null&&parseFloat(e)<=31;Js="__live-region__";ZP=U("date-picker").parts("clearTrigger","content","control","input","label","monthSelect","nextTrigger","positioner","presetTrigger","prevTrigger","rangeText","root","table","tableBody","tableCell","tableCellTrigger","tableHead","tableHeader","tableRow","trigger","view","viewControl","viewTrigger","yearSelect"),de=ZP.build(),JP=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.label)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:label:${t}`},QP=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`datepicker:${e.id}`},eC=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.table)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:table:${t}`},rl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`datepicker:${e.id}:content`},Xo=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.cellTrigger)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:cell-trigger:${t}`},tC=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.prevTrigger)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:prev:${t}`},nC=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.nextTrigger)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:next:${t}`},iC=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.viewTrigger)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:view:${t}`},Kh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.clearTrigger)!=null?n:`datepicker:${e.id}:clear`},zh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`datepicker:${e.id}:control`},ph=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.input)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:input:${t}`},Yh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`datepicker:${e.id}:trigger`},jh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`datepicker:${e.id}:positioner`},Xh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.monthSelect)!=null?n:`datepicker:${e.id}:month-select`},Zh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.yearSelect)!=null?n:`datepicker:${e.id}:year-select`},fh=(e,t)=>vi(ia(e),`[data-part=table-cell-trigger][data-view=${t}][data-focus]:not([data-outside-range])`),mh=e=>e.getById(Yh(e)),ia=e=>e.getById(rl(e)),Tr=e=>Fe(Jh(e),"[data-part=input]"),rC=e=>e.getById(Zh(e)),sC=e=>e.getById(Xh(e)),aC=e=>e.getById(Kh(e)),oC=e=>e.getById(jh(e)),Jh=e=>e.getById(zh(e));cC={day:"dd",month:"mm",year:"yyyy"};Qh=(e,t)=>e?/\d/.test(e)||e===t||e.length!==1:!0,vh=e=>!Number.isNaN(e.day)&&!Number.isNaN(e.month)&&!Number.isNaN(e.year),dC=(e,t)=>e.split("").filter(n=>Qh(n,t)).join("");gC={dayCell(e){return e.unavailable?`Not available. ${e.formattedDate}`:e.selected?`Selected date. ${e.formattedDate}`:`Choose ${e.formattedDate}`},trigger(e){return e?"Close calendar":"Open calendar"},viewTrigger(e){return Ce(e,{year:"Switch to month view",month:"Switch to day view",day:"Switch to year view"})},presetTrigger(e){let[t="",n=""]=e;return`select ${t} to ${n}`},prevTrigger(e){return Ce(e,{year:"Switch to previous decade",month:"Switch to previous year",day:"Switch to previous month"})},nextTrigger(e){return Ce(e,{year:"Switch to next decade",month:"Switch to next year",day:"Switch to next month"})},placeholder(){return{day:"dd",month:"mm",year:"yyyy"}},content:"calendar",monthSelect:"Select month",yearSelect:"Select year",clearTrigger:"Clear selected dates"};yC=["day","month","year"];EC=Bn(e=>[e.view,e.startValue.toString(),e.endValue.toString(),e.locale],([e],t)=>{let{startValue:n,endValue:i,locale:r,timeZone:s,selectionMode:a}=t;if(e==="year"){let h=Li(n.year,{strict:!0}),m=h.at(0).toString(),d=h.at(-1).toString();return{start:m,end:d,formatted:`${m} - ${d}`}}if(e==="month"){let h=new Ct(r,{year:"numeric",timeZone:s}),m=h.format(n.toDate(s)),d=h.format(i.toDate(s)),p=a==="range"?`${m} - ${d}`:m;return{start:m,end:d,formatted:p}}let o=new Ct(r,{month:"long",year:"numeric",timeZone:s}),l=o.format(n.toDate(s)),c=o.format(i.toDate(s)),u=a==="range"?`${l} - ${c}`:l;return{start:l,end:c,formatted:u}});({and:ht}=Ee());CC={props({props:e}){let t=e.locale||"en-US",n=e.timeZone||"UTC",i=e.selectionMode||"single",r=e.numOfMonths||1,s=e.defaultValue?Qs(e.defaultValue).map(h=>Pt(h,e.min,e.max)):void 0,a=e.value?Qs(e.value).map(h=>Pt(h,e.min,e.max)):void 0,o=e.focusedValue||e.defaultFocusedValue||(a==null?void 0:a[0])||(s==null?void 0:s[0])||Di(n);o=Pt(o,e.min,e.max);let l="day",c="year",u=fl(e.view||l,l,c);return y(g({locale:t,numOfMonths:r,timeZone:n,selectionMode:i,defaultView:u,minView:l,maxView:c,outsideDaySelectable:!1,closeOnSelect:!0,format(h,{locale:m,timeZone:d}){return new Ct(m,{timeZone:d,day:"2-digit",month:"2-digit",year:"numeric"}).format(h.toDate(d))},parse(h,{locale:m,timeZone:d}){return zP(h,m,d)}},e),{focusedValue:typeof e.focusedValue=="undefined"?void 0:o,defaultFocusedValue:o,value:a,defaultValue:s!=null?s:[],positioning:g({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")||e("inline")?"open":"idle"},refs(){return{announcer:void 0}},context({prop:e,bindable:t,getContext:n}){return{focusedValue:t(()=>({defaultValue:e("defaultFocusedValue"),value:e("focusedValue"),isEqual:nt,hash:i=>i.toString(),sync:!0,onChange(i){var l;let r=n(),s=r.get("view"),a=r.get("value"),o=ea(a,e);(l=e("onFocusChange"))==null||l({value:a,valueAsString:o,view:s,focusedValue:i})}})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:PC,hash:i=>i.map(r=>{var s;return(s=r==null?void 0:r.toString())!=null?s:""}).join(","),onChange(i){var a;let r=n(),s=ea(i,e);(a=e("onValueChange"))==null||a({value:i,valueAsString:s,view:r.get("view")})}})),inputValue:t(()=>({defaultValue:""})),activeIndex:t(()=>({defaultValue:0,sync:!0})),hoveredValue:t(()=>({defaultValue:null,isEqual:nt})),view:t(()=>({defaultValue:e("defaultView"),value:e("view"),onChange(i){var r;(r=e("onViewChange"))==null||r({view:i})}})),startValue:t(()=>{let i=e("focusedValue")||e("defaultFocusedValue");return{defaultValue:ch(i,"start",{months:e("numOfMonths")},e("locale")),isEqual:nt,hash:r=>r.toString()}}),currentPlacement:t(()=>({defaultValue:void 0})),restoreFocus:t(()=>({defaultValue:!1}))}},computed:{isInteractive:({prop:e})=>!e("disabled")&&!e("readOnly"),visibleDuration:({prop:e})=>({months:e("numOfMonths")}),endValue:({context:e,computed:t})=>$h(e.get("startValue"),t("visibleDuration")),visibleRange:({context:e,computed:t})=>({start:e.get("startValue"),end:t("endValue")}),visibleRangeText:({context:e,prop:t,computed:n})=>EC({view:e.get("view"),startValue:e.get("startValue"),endValue:n("endValue"),locale:t("locale"),timeZone:t("timeZone"),selectionMode:t("selectionMode")}),isPrevVisibleRangeValid:({context:e,prop:t})=>!NP(e.get("startValue"),t("min"),t("max")),isNextVisibleRangeValid:({prop:e,computed:t})=>!RP(t("endValue"),e("min"),e("max")),valueAsString:({context:e,prop:t})=>ea(e.get("value"),t)},effects:["setupLiveRegion"],watch({track:e,prop:t,context:n,action:i,computed:r}){e([()=>t("locale")],()=>{i(["setStartValue","syncInputElement"])}),e([()=>n.hash("focusedValue")],()=>{i(["setStartValue","focusActiveCellIfNeeded","setHoveredValueIfKeyboard"])}),e([()=>n.hash("startValue")],()=>{i(["syncMonthSelectElement","syncYearSelectElement","invokeOnVisibleRangeChange"])}),e([()=>n.get("inputValue")],()=>{i(["syncInputValue"])}),e([()=>n.hash("value")],()=>{i(["syncInputElement"])}),e([()=>r("valueAsString").toString()],()=>{i(["announceValueText"])}),e([()=>n.get("view")],()=>{i(["focusActiveCell"])}),e([()=>t("open")],()=>{i(["toggleVisibility"])})},on:{"VALUE.SET":{actions:["setDateValue","setFocusedDate"]},"VIEW.SET":{actions:["setView"]},"FOCUS.SET":{actions:["setFocusedDate"]},"VALUE.CLEAR":{actions:["clearDateValue","clearFocusedDate","focusFirstInputElement"]},"INPUT.CHANGE":[{guard:"isInputValueEmpty",actions:["setInputValue","clearDateValue","clearFocusedDate"]},{actions:["setInputValue","focusParsedDate"]}],"INPUT.ENTER":{actions:["focusParsedDate","selectFocusedDate"]},"INPUT.FOCUS":{actions:["setActiveIndex"]},"INPUT.BLUR":[{guard:"shouldFixOnBlur",actions:["setActiveIndexToStart","selectParsedDate"]},{actions:["setActiveIndexToStart"]}],"PRESET.CLICK":[{guard:"isOpenControlled",actions:["setDateValue","setFocusedDate","invokeOnClose"]},{target:"focused",actions:["setDateValue","setFocusedDate","focusInputElement"]}],"GOTO.NEXT":[{guard:"isYearView",actions:["focusNextDecade","announceVisibleRange"]},{guard:"isMonthView",actions:["focusNextYear","announceVisibleRange"]},{actions:["focusNextPage"]}],"GOTO.PREV":[{guard:"isYearView",actions:["focusPreviousDecade","announceVisibleRange"]},{guard:"isMonthView",actions:["focusPreviousYear","announceVisibleRange"]},{actions:["focusPreviousPage"]}]},states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open",actions:["focusFirstSelectedDate","focusActiveCell"]},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}]}},focused:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open",actions:["focusFirstSelectedDate","focusActiveCell"]},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}]}},open:{tags:["open"],effects:["trackDismissableElement","trackPositioning"],exit:["clearHoveredDate","resetView"],on:{"CONTROLLED.CLOSE":[{guard:ht("shouldRestoreFocus","isInteractOutsideEvent"),target:"focused",actions:["focusTriggerElement"]},{guard:"shouldRestoreFocus",target:"focused",actions:["focusInputElement"]},{target:"idle"}],"CELL.CLICK":[{guard:"isAboveMinView",actions:["setFocusedValueForView","setPreviousView"]},{guard:ht("isRangePicker","hasSelectedRange"),actions:["setActiveIndexToStart","resetSelection","setActiveIndexToEnd"]},{guard:ht("isRangePicker","isSelectingEndDate","closeOnSelect","isOpenControlled"),actions:["setFocusedDate","setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose","setRestoreFocus"]},{guard:ht("isRangePicker","isSelectingEndDate","closeOnSelect"),target:"focused",actions:["setFocusedDate","setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose","focusInputElement"]},{guard:ht("isRangePicker","isSelectingEndDate"),actions:["setFocusedDate","setSelectedDate","setActiveIndexToStart","clearHoveredDate"]},{guard:"isRangePicker",actions:["setFocusedDate","setSelectedDate","setActiveIndexToEnd"]},{guard:"isMultiPicker",actions:["setFocusedDate","toggleSelectedDate"]},{guard:ht("closeOnSelect","isOpenControlled"),actions:["setFocusedDate","setSelectedDate","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["setFocusedDate","setSelectedDate","invokeOnClose","focusInputElement"]},{actions:["setFocusedDate","setSelectedDate"]}],"CELL.POINTER_MOVE":{guard:ht("isRangePicker","isSelectingEndDate"),actions:["setHoveredDate","setFocusedDate"]},"TABLE.POINTER_LEAVE":{guard:"isRangePicker",actions:["clearHoveredDate"]},"TABLE.POINTER_DOWN":{actions:["disableTextSelection"]},"TABLE.POINTER_UP":{actions:["enableTextSelection"]},"TABLE.ESCAPE":[{guard:"isOpenControlled",actions:["focusFirstSelectedDate","invokeOnClose"]},{target:"focused",actions:["focusFirstSelectedDate","invokeOnClose","focusTriggerElement"]}],"TABLE.ENTER":[{guard:"isAboveMinView",actions:["setPreviousView"]},{guard:ht("isRangePicker","hasSelectedRange"),actions:["setActiveIndexToStart","clearDateValue","setSelectedDate","setActiveIndexToEnd"]},{guard:ht("isRangePicker","isSelectingEndDate","closeOnSelect","isOpenControlled"),actions:["setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose"]},{guard:ht("isRangePicker","isSelectingEndDate","closeOnSelect"),target:"focused",actions:["setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose","focusInputElement"]},{guard:ht("isRangePicker","isSelectingEndDate"),actions:["setSelectedDate","setActiveIndexToStart","clearHoveredDate"]},{guard:"isRangePicker",actions:["setSelectedDate","setActiveIndexToEnd","focusNextDay"]},{guard:"isMultiPicker",actions:["toggleSelectedDate"]},{guard:ht("closeOnSelect","isOpenControlled"),actions:["selectFocusedDate","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectFocusedDate","invokeOnClose","focusInputElement"]},{actions:["selectFocusedDate"]}],"TABLE.ARROW_RIGHT":[{guard:"isMonthView",actions:["focusNextMonth"]},{guard:"isYearView",actions:["focusNextYear"]},{actions:["focusNextDay","setHoveredDate"]}],"TABLE.ARROW_LEFT":[{guard:"isMonthView",actions:["focusPreviousMonth"]},{guard:"isYearView",actions:["focusPreviousYear"]},{actions:["focusPreviousDay"]}],"TABLE.ARROW_UP":[{guard:"isMonthView",actions:["focusPreviousMonthColumn"]},{guard:"isYearView",actions:["focusPreviousYearColumn"]},{actions:["focusPreviousWeek"]}],"TABLE.ARROW_DOWN":[{guard:"isMonthView",actions:["focusNextMonthColumn"]},{guard:"isYearView",actions:["focusNextYearColumn"]},{actions:["focusNextWeek"]}],"TABLE.PAGE_UP":{actions:["focusPreviousSection"]},"TABLE.PAGE_DOWN":{actions:["focusNextSection"]},"TABLE.HOME":[{guard:"isMonthView",actions:["focusFirstMonth"]},{guard:"isYearView",actions:["focusFirstYear"]},{actions:["focusSectionStart"]}],"TABLE.END":[{guard:"isMonthView",actions:["focusLastMonth"]},{guard:"isYearView",actions:["focusLastYear"]},{actions:["focusSectionEnd"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"VIEW.TOGGLE":{actions:["setNextView"]},INTERACT_OUTSIDE:[{guard:"isOpenControlled",actions:["setActiveIndexToStart","invokeOnClose"]},{guard:"shouldRestoreFocus",target:"focused",actions:["setActiveIndexToStart","invokeOnClose","focusTriggerElement"]},{target:"idle",actions:["setActiveIndexToStart","invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["setActiveIndexToStart","invokeOnClose"]},{target:"idle",actions:["setActiveIndexToStart","invokeOnClose"]}]}}},implementations:{guards:{isAboveMinView:({context:e,prop:t})=>pC(e.get("view"),t("minView")),isDayView:({context:e,event:t})=>(t.view||e.get("view"))==="day",isMonthView:({context:e,event:t})=>(t.view||e.get("view"))==="month",isYearView:({context:e,event:t})=>(t.view||e.get("view"))==="year",isRangePicker:({prop:e})=>e("selectionMode")==="range",hasSelectedRange:({context:e})=>e.get("value").length===2,isMultiPicker:({prop:e})=>e("selectionMode")==="multiple",shouldRestoreFocus:({context:e})=>!!e.get("restoreFocus"),isSelectingEndDate:({context:e})=>e.get("activeIndex")===1,closeOnSelect:({prop:e})=>!!e("closeOnSelect"),isOpenControlled:({prop:e})=>e("open")!=null||!!e("inline"),isInteractOutsideEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="INTERACT_OUTSIDE"},isInputValueEmpty:({event:e})=>e.value.trim()==="",shouldFixOnBlur:({event:e})=>!!e.fixOnBlur},effects:{trackPositioning({context:e,prop:t,scope:n}){if(t("inline"))return;e.get("currentPlacement")||e.set("currentPlacement",t("positioning").placement);let i=Jh(n);return It(i,()=>oC(n),y(g({},t("positioning")),{defer:!0,onComplete(s){e.set("currentPlacement",s.placement)}}))},setupLiveRegion({scope:e,refs:t}){let n=e.getDoc();return t.set("announcer",XP({level:"assertive",document:n})),()=>{var i,r;return(r=(i=t.get("announcer"))==null?void 0:i.destroy)==null?void 0:r.call(i)}},trackDismissableElement({scope:e,send:t,context:n,prop:i}){return i("inline")?void 0:Ft(()=>ia(e),{type:"popover",defer:!0,exclude:[...Tr(e),mh(e),aC(e)],onInteractOutside(s){n.set("restoreFocus",!s.detail.focusable)},onDismiss(){t({type:"INTERACT_OUTSIDE"})},onEscapeKeyDown(s){s.preventDefault(),t({type:"TABLE.ESCAPE",src:"dismissable"})}})}},actions:{setNextView({context:e,prop:t}){let n=mC(e.get("view"),t("minView"),t("maxView"));e.set("view",n)},setPreviousView({context:e,prop:t}){let n=vC(e.get("view"),t("minView"),t("maxView"));e.set("view",n)},setView({context:e,event:t}){e.set("view",t.view)},setRestoreFocus({context:e}){e.set("restoreFocus",!0)},announceValueText({context:e,prop:t,refs:n}){var o;let i=e.get("value"),r=t("locale"),s=t("timeZone"),a;if(t("selectionMode")==="range"){let[l,c]=i;l&&c?a=Zs(l,c,r,s):l?a=Zs(l,null,r,s):c?a=Zs(c,null,r,s):a=""}else a=i.map(l=>Zs(l,null,r,s)).filter(Boolean).join(",");(o=n.get("announcer"))==null||o.announce(a,3e3)},announceVisibleRange({computed:e,refs:t}){var i;let{formatted:n}=e("visibleRangeText");(i=t.get("announcer"))==null||i.announce(n)},disableTextSelection({scope:e}){io({target:ia(e),doc:e.getDoc()})},enableTextSelection({scope:e}){no({doc:e.getDoc(),target:ia(e)})},focusFirstSelectedDate(e){let{context:t}=e;t.get("value").length&&ve(e,t.get("value")[0])},syncInputElement({scope:e,computed:t}){H(()=>{Tr(e).forEach((i,r)=>{Me(i,t("valueAsString")[r]||"")})})},setFocusedDate(e){let{event:t}=e,n=Array.isArray(t.value)?t.value[0]:t.value;ve(e,n)},setFocusedValueForView(e){let{context:t,event:n}=e;ve(e,t.get("focusedValue").set({[t.get("view")]:n.value}))},focusNextMonth(e){let{context:t}=e;ve(e,t.get("focusedValue").add({months:1}))},focusPreviousMonth(e){let{context:t}=e;ve(e,t.get("focusedValue").subtract({months:1}))},setDateValue({context:e,event:t,prop:n}){if(!Array.isArray(t.value))return;let i=t.value.map(r=>Pt(r,n("min"),n("max")));e.set("value",i)},clearDateValue({context:e}){e.set("value",[])},setSelectedDate(e){var r;let{context:t,event:n}=e,i=Array.from(t.get("value"));i[t.get("activeIndex")]=ra(e,(r=n.value)!=null?r:t.get("focusedValue")),t.set("value",sl(i))},resetSelection(e){var r;let{context:t,event:n}=e,i=ra(e,(r=n.value)!=null?r:t.get("focusedValue"));t.set("value",[i])},toggleSelectedDate(e){var s;let{context:t,event:n}=e,i=ra(e,(s=n.value)!=null?s:t.get("focusedValue")),r=t.get("value").findIndex(a=>nt(a,i));if(r===-1){let a=[...t.get("value"),i];t.set("value",Qs(a))}else{let a=Array.from(t.get("value"));a.splice(r,1),t.set("value",Qs(a))}},setHoveredDate({context:e,event:t}){e.set("hoveredValue",t.value)},clearHoveredDate({context:e}){e.set("hoveredValue",null)},selectFocusedDate({context:e,computed:t}){let n=Array.from(e.get("value")),i=e.get("activeIndex");n[i]=e.get("focusedValue").copy(),e.set("value",sl(n));let r=t("valueAsString");e.set("inputValue",r[i])},focusPreviousDay(e){let{context:t}=e,n=t.get("focusedValue").subtract({days:1});ve(e,n)},focusNextDay(e){let{context:t}=e,n=t.get("focusedValue").add({days:1});ve(e,n)},focusPreviousWeek(e){let{context:t}=e,n=t.get("focusedValue").subtract({weeks:1});ve(e,n)},focusNextWeek(e){let{context:t}=e,n=t.get("focusedValue").add({weeks:1});ve(e,n)},focusNextPage(e){let{context:t,computed:n,prop:i}=e,r=qh(t.get("focusedValue"),t.get("startValue"),n("visibleDuration"),i("locale"),i("min"),i("max"));ta(e,r)},focusPreviousPage(e){let{context:t,computed:n,prop:i}=e,r=Wh(t.get("focusedValue"),t.get("startValue"),n("visibleDuration"),i("locale"),i("min"),i("max"));ta(e,r)},focusSectionStart(e){let{context:t}=e;ve(e,t.get("startValue").copy())},focusSectionEnd(e){let{computed:t}=e;ve(e,t("endValue").copy())},focusNextSection(e){let{context:t,event:n,computed:i,prop:r}=e,s=UP(t.get("focusedValue"),t.get("startValue"),n.larger,i("visibleDuration"),r("locale"),r("min"),r("max"));s&&ta(e,s)},focusPreviousSection(e){let{context:t,event:n,computed:i,prop:r}=e,s=qP(t.get("focusedValue"),t.get("startValue"),n.larger,i("visibleDuration"),r("locale"),r("min"),r("max"));s&&ta(e,s)},focusNextYear(e){let{context:t}=e,n=t.get("focusedValue").add({years:1});ve(e,n)},focusPreviousYear(e){let{context:t}=e,n=t.get("focusedValue").subtract({years:1});ve(e,n)},focusNextDecade(e){let{context:t}=e,n=t.get("focusedValue").add({years:10});ve(e,n)},focusPreviousDecade(e){let{context:t}=e,n=t.get("focusedValue").subtract({years:10});ve(e,n)},clearFocusedDate(e){let{prop:t}=e;ve(e,Di(t("timeZone")))},focusPreviousMonthColumn(e){let{context:t,event:n}=e,i=t.get("focusedValue").subtract({months:n.columns});ve(e,i)},focusNextMonthColumn(e){let{context:t,event:n}=e,i=t.get("focusedValue").add({months:n.columns});ve(e,i)},focusPreviousYearColumn(e){let{context:t,event:n}=e,i=t.get("focusedValue").subtract({years:n.columns});ve(e,i)},focusNextYearColumn(e){let{context:t,event:n}=e,i=t.get("focusedValue").add({years:n.columns});ve(e,i)},focusFirstMonth(e){let{context:t}=e,n=t.get("focusedValue").set({month:1});ve(e,n)},focusLastMonth(e){let{context:t}=e,n=t.get("focusedValue").set({month:12});ve(e,n)},focusFirstYear(e){let{context:t}=e,n=Li(t.get("focusedValue").year),i=t.get("focusedValue").set({year:n[0]});ve(e,i)},focusLastYear(e){let{context:t}=e,n=Li(t.get("focusedValue").year),i=t.get("focusedValue").set({year:n[n.length-1]});ve(e,i)},setActiveIndex({context:e,event:t}){e.set("activeIndex",t.index)},setActiveIndexToEnd({context:e}){e.set("activeIndex",1)},setActiveIndexToStart({context:e}){e.set("activeIndex",0)},focusActiveCell({scope:e,context:t}){H(()=>{var i;let n=t.get("view");(i=fh(e,n))==null||i.focus({preventScroll:!0})})},focusActiveCellIfNeeded({scope:e,context:t,event:n}){n.focus&&H(()=>{var r;let i=t.get("view");(r=fh(e,i))==null||r.focus({preventScroll:!0})})},setHoveredValueIfKeyboard({context:e,event:t,prop:n}){!t.type.startsWith("TABLE.ARROW")||n("selectionMode")!=="range"||e.get("activeIndex")===0||e.set("hoveredValue",e.get("focusedValue").copy())},focusTriggerElement({scope:e}){H(()=>{var t;(t=mh(e))==null||t.focus({preventScroll:!0})})},focusFirstInputElement({scope:e}){H(()=>{let[t]=Tr(e);t==null||t.focus({preventScroll:!0})})},focusInputElement({scope:e}){H(()=>{let t=Tr(e),n=t.findLastIndex(s=>s.value!==""),i=Math.max(n,0),r=t[i];r==null||r.focus({preventScroll:!0}),r==null||r.setSelectionRange(r.value.length,r.value.length)})},syncMonthSelectElement({scope:e,context:t}){let n=sC(e);Me(n,t.get("startValue").month.toString())},syncYearSelectElement({scope:e,context:t}){let n=rC(e);Me(n,t.get("startValue").year.toString())},setInputValue({context:e,event:t}){e.get("activeIndex")===t.index&&e.set("inputValue",t.value)},syncInputValue({scope:e,context:t,event:n}){queueMicrotask(()=>{var s;let i=Tr(e),r=(s=n.index)!=null?s:t.get("activeIndex");Me(i[r],t.get("inputValue"))})},focusParsedDate(e){let{event:t,prop:n}=e;if(t.index==null)return;let r=n("parse")(t.value,{locale:n("locale"),timeZone:n("timeZone")});!r||!vh(r)||ve(e,r)},selectParsedDate({context:e,event:t,prop:n}){if(t.index==null)return;let r=n("parse")(t.value,{locale:n("locale"),timeZone:n("timeZone")});if((!r||!vh(r))&&t.value&&(r=e.get("focusedValue").copy()),!r)return;r=Pt(r,n("min"),n("max"));let s=Array.from(e.get("value"));s[t.index]=r,e.set("value",s);let a=ea(s,n);e.set("inputValue",a[t.index])},resetView({context:e}){e.set("view",e.initial("view"))},setStartValue({context:e,computed:t,prop:n}){let i=e.get("focusedValue");if(!$t(i,e.get("startValue"),t("endValue")))return;let s=ch(i,"start",{months:n("numOfMonths")},n("locale"));e.set("startValue",s)},invokeOnOpen({prop:e,context:t}){var n;e("inline")||(n=e("onOpenChange"))==null||n({open:!0,value:t.get("value")})},invokeOnClose({prop:e,context:t}){var n;e("inline")||(n=e("onOpenChange"))==null||n({open:!1,value:t.get("value")})},invokeOnVisibleRangeChange({prop:e,context:t,computed:n}){var i;(i=e("onVisibleRangeChange"))==null||i({view:t.get("view"),visibleRange:n("visibleRange")})},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}},ra=(e,t)=>{let{context:n,prop:i}=e,r=n.get("view"),s=typeof t=="number"?n.get("focusedValue").set({[r]:t}):t;return bC(a=>{fC(a,i("minView"))&&(s=s.set({[a]:a==="day"?1:0}))}),s};SC=_()(["closeOnSelect","dir","disabled","fixedWeeks","focusedValue","format","parse","placeholder","getRootNode","id","ids","inline","invalid","isDateUnavailable","locale","max","min","name","numOfMonths","onFocusChange","onOpenChange","onValueChange","onViewChange","onVisibleRangeChange","open","defaultOpen","positioning","readOnly","required","selectionMode","startOfWeek","timeZone","translations","value","defaultView","defaultValue","view","defaultFocusedValue","outsideDaySelectable","minView","maxView"]),Ix=B(SC),TC=_()(["index","fixOnBlur"]),Px=B(TC),OC=_()(["value"]),Cx=B(OC),wC=_()(["columns","id","view"]),Sx=B(wC),VC=_()(["disabled","value","columns"]),Tx=B(VC),xC=_()(["view"]),Ox=B(xC),AC=class extends K{constructor(){super(...arguments);Y(this,"getDayView",()=>this.el.querySelector('[data-part="day-view"]'));Y(this,"getMonthView",()=>this.el.querySelector('[data-part="month-view"]'));Y(this,"getYearView",()=>this.el.querySelector('[data-part="year-view"]'));Y(this,"renderDayTableHeader",()=>{let t=this.getDayView(),n=t==null?void 0:t.querySelector("thead");if(!n||!this.api.weekDays)return;let i=this.doc.createElement("tr");this.spreadProps(i,this.api.getTableRowProps({view:"day"})),this.api.weekDays.forEach(r=>{let s=this.doc.createElement("th");s.scope="col",s.setAttribute("aria-label",r.long),s.textContent=r.narrow,i.appendChild(s)}),n.innerHTML="",n.appendChild(i)});Y(this,"renderDayTableBody",()=>{let t=this.getDayView(),n=t==null?void 0:t.querySelector("tbody");n&&(this.spreadProps(n,this.api.getTableBodyProps({view:"day"})),this.api.weeks&&(n.innerHTML="",this.api.weeks.forEach(i=>{let r=this.doc.createElement("tr");this.spreadProps(r,this.api.getTableRowProps({view:"day"})),i.forEach(s=>{let a=this.doc.createElement("td");this.spreadProps(a,this.api.getDayTableCellProps({value:s}));let o=this.doc.createElement("div");this.spreadProps(o,this.api.getDayTableCellTriggerProps({value:s})),o.textContent=String(s.day),a.appendChild(o),r.appendChild(a)}),n.appendChild(r)})))});Y(this,"renderMonthTableBody",()=>{let t=this.getMonthView(),n=t==null?void 0:t.querySelector("tbody");if(!n)return;this.spreadProps(n,this.api.getTableBodyProps({view:"month"}));let i=this.api.getMonthsGrid({columns:4,format:"short"});n.innerHTML="",i.forEach(r=>{let s=this.doc.createElement("tr");this.spreadProps(s,this.api.getTableRowProps()),r.forEach(a=>{let o=this.doc.createElement("td");this.spreadProps(o,this.api.getMonthTableCellProps(y(g({},a),{columns:4})));let l=this.doc.createElement("div");this.spreadProps(l,this.api.getMonthTableCellTriggerProps(y(g({},a),{columns:4}))),l.textContent=a.label,o.appendChild(l),s.appendChild(o)}),n.appendChild(s)})});Y(this,"renderYearTableBody",()=>{let t=this.getYearView(),n=t==null?void 0:t.querySelector("tbody");if(!n)return;this.spreadProps(n,this.api.getTableBodyProps());let i=this.api.getYearsGrid({columns:4});n.innerHTML="",i.forEach(r=>{let s=this.doc.createElement("tr");this.spreadProps(s,this.api.getTableRowProps({view:"year"})),r.forEach(a=>{let o=this.doc.createElement("td");this.spreadProps(o,this.api.getYearTableCellProps(y(g({},a),{columns:4})));let l=this.doc.createElement("div");this.spreadProps(l,this.api.getYearTableCellTriggerProps(y(g({},a),{columns:4}))),l.textContent=a.label,o.appendChild(l),s.appendChild(o)}),n.appendChild(s)})})}initMachine(t){return new W(CC,t)}initApi(){return IC(this.machine.service,q)}render(){let t=this.el.querySelector('[data-scope="date-picker"][data-part="root"]');t&&this.spreadProps(t,this.api.getRootProps());let n=this.el.querySelector('[data-scope="date-picker"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps());let i=this.el.querySelector('[data-scope="date-picker"][data-part="control"]');i&&this.spreadProps(i,this.api.getControlProps());let r=this.el.querySelector('[data-scope="date-picker"][data-part="input"]');r&&this.spreadProps(r,this.api.getInputProps());let s=this.el.querySelector('[data-scope="date-picker"][data-part="trigger"]');s&&this.spreadProps(s,this.api.getTriggerProps());let a=this.el.querySelector('[data-scope="date-picker"][data-part="positioner"]');a&&this.spreadProps(a,this.api.getPositionerProps());let o=this.el.querySelector('[data-scope="date-picker"][data-part="content"]');if(o&&this.spreadProps(o,this.api.getContentProps()),this.api.open){let l=this.getDayView(),c=this.getMonthView(),u=this.getYearView();if(l&&(l.hidden=this.api.view!=="day"),c&&(c.hidden=this.api.view!=="month"),u&&(u.hidden=this.api.view!=="year"),this.api.view==="day"&&l){let h=l.querySelector('[data-part="view-control"]');h&&this.spreadProps(h,this.api.getViewControlProps({view:"year"}));let m=l.querySelector('[data-part="prev-trigger"]');m&&this.spreadProps(m,this.api.getPrevTriggerProps());let d=l.querySelector('[data-part="view-trigger"]');d&&(this.spreadProps(d,this.api.getViewTriggerProps()),d.textContent=this.api.visibleRangeText.start);let p=l.querySelector('[data-part="next-trigger"]');p&&this.spreadProps(p,this.api.getNextTriggerProps());let v=l.querySelector("table");v&&this.spreadProps(v,this.api.getTableProps({view:"day"}));let I=l.querySelector("thead");I&&this.spreadProps(I,this.api.getTableHeaderProps({view:"day"})),this.renderDayTableHeader(),this.renderDayTableBody()}else if(this.api.view==="month"&&c){let h=c.querySelector('[data-part="view-control"]');h&&this.spreadProps(h,this.api.getViewControlProps({view:"month"}));let m=c.querySelector('[data-part="prev-trigger"]');m&&this.spreadProps(m,this.api.getPrevTriggerProps({view:"month"}));let d=c.querySelector('[data-part="view-trigger"]');d&&(this.spreadProps(d,this.api.getViewTriggerProps({view:"month"})),d.textContent=String(this.api.visibleRange.start.year));let p=c.querySelector('[data-part="next-trigger"]');p&&this.spreadProps(p,this.api.getNextTriggerProps({view:"month"}));let v=c.querySelector("table");v&&this.spreadProps(v,this.api.getTableProps({view:"month",columns:4})),this.renderMonthTableBody()}else if(this.api.view==="year"&&u){let h=u.querySelector('[data-part="view-control"]');h&&this.spreadProps(h,this.api.getViewControlProps({view:"year"}));let m=u.querySelector('[data-part="prev-trigger"]');m&&this.spreadProps(m,this.api.getPrevTriggerProps({view:"year"}));let d=u.querySelector('[data-part="decade"]');if(d){let I=this.api.getDecade();d.textContent=`${I.start} - ${I.end}`}let p=u.querySelector('[data-part="next-trigger"]');p&&this.spreadProps(p,this.api.getNextTriggerProps({view:"year"}));let v=u.querySelector("table");v&&this.spreadProps(v,this.api.getTableProps({view:"year",columns:4})),this.renderYearTableBody()}}}};kC={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=this.liveSocket,i=w(e,"min"),r=w(e,"max"),s=w(e,"positioning"),a=u=>u?u.map(h=>gt(h)):void 0,o=u=>u?gt(u):void 0,l=new AC(e,y(g({id:e.id},C(e,"controlled")?{value:a(Z(e,"value"))}:{defaultValue:a(Z(e,"defaultValue"))}),{defaultFocusedValue:o(w(e,"focusedValue")),defaultView:w(e,"defaultView",["day","month","year"]),dir:w(e,"dir",["ltr","rtl"]),locale:w(e,"locale"),timeZone:w(e,"timeZone"),disabled:C(e,"disabled"),readOnly:C(e,"readOnly"),required:C(e,"required"),invalid:C(e,"invalid"),outsideDaySelectable:C(e,"outsideDaySelectable"),closeOnSelect:C(e,"closeOnSelect"),min:i?gt(i):void 0,max:r?gt(r):void 0,numOfMonths:z(e,"numOfMonths"),startOfWeek:z(e,"startOfWeek"),fixedWeeks:C(e,"fixedWeeks"),selectionMode:w(e,"selectionMode",["single","multiple","range"]),placeholder:w(e,"placeholder"),minView:w(e,"minView",["day","month","year"]),maxView:w(e,"maxView",["day","month","year"]),inline:C(e,"inline"),positioning:s?JSON.parse(s):void 0,onValueChange:u=>{var p;let h=(p=u.value)!=null&&p.length?u.value.map(v=>yh(v)).join(","):"",m=e.querySelector(`#${e.id}-value`);m&&m.value!==h&&(m.value=h,m.dispatchEvent(new Event("input",{bubbles:!0})),m.dispatchEvent(new Event("change",{bubbles:!0})));let d=w(e,"onValueChange");d&&n.main.isConnected()&&t(d,{id:e.id,value:h||null})},onFocusChange:u=>{var m;let h=w(e,"onFocusChange");h&&n.main.isConnected()&&t(h,{id:e.id,focused:(m=u.focused)!=null?m:!1})},onViewChange:u=>{let h=w(e,"onViewChange");h&&n.main.isConnected()&&t(h,{id:e.id,view:u.view})},onVisibleRangeChange:u=>{let h=w(e,"onVisibleRangeChange");h&&n.main.isConnected()&&t(h,{id:e.id,start:u.start,end:u.end})},onOpenChange:u=>{let h=w(e,"onOpenChange");h&&n.main.isConnected()&&t(h,{id:e.id,open:u.open})}}));l.init(),this.datePicker=l;let c=e.querySelector('[data-scope="date-picker"][data-part="input-wrapper"]');c&&c.removeAttribute("data-loading"),this.handlers=[],this.handlers.push(this.handleEvent("date_picker_set_value",u=>{let h=u.date_picker_id;h&&h!==e.id||l.api.setValue([gt(u.value)])})),this.onSetValue=u=>{var m;let h=(m=u.detail)==null?void 0:m.value;typeof h=="string"&&l.api.setValue([gt(h)])},e.addEventListener("phx:date-picker:set-value",this.onSetValue)},updated(){var l,c;let e=this.el,t=e.querySelector('[data-scope="date-picker"][data-part="input-wrapper"]');t&&t.removeAttribute("data-loading");let n=u=>u?u.map(h=>gt(h)):void 0,i=w(e,"min"),r=w(e,"max"),s=w(e,"positioning"),a=C(e,"controlled"),o=w(e,"focusedValue");if((l=this.datePicker)==null||l.updateProps(y(g({},C(e,"controlled")?{value:n(Z(e,"value"))}:{defaultValue:n(Z(e,"defaultValue"))}),{defaultFocusedValue:o?gt(o):void 0,defaultView:w(e,"defaultView",["day","month","year"]),dir:w(this.el,"dir",["ltr","rtl"]),locale:w(this.el,"locale"),timeZone:w(this.el,"timeZone"),disabled:C(this.el,"disabled"),readOnly:C(this.el,"readOnly"),required:C(this.el,"required"),invalid:C(this.el,"invalid"),outsideDaySelectable:C(this.el,"outsideDaySelectable"),closeOnSelect:C(this.el,"closeOnSelect"),min:i?gt(i):void 0,max:r?gt(r):void 0,numOfMonths:z(this.el,"numOfMonths"),startOfWeek:z(this.el,"startOfWeek"),fixedWeeks:C(this.el,"fixedWeeks"),selectionMode:w(this.el,"selectionMode",["single","multiple","range"]),placeholder:w(this.el,"placeholder"),minView:w(this.el,"minView",["day","month","year"]),maxView:w(this.el,"maxView",["day","month","year"]),inline:C(this.el,"inline"),positioning:s?JSON.parse(s):void 0})),a&&this.datePicker){let u=Z(e,"value"),h=(c=u==null?void 0:u.join(","))!=null?c:"",m=this.datePicker.api.value,d=m!=null&&m.length?m.map(p=>yh(p)).join(","):"";if(h!==d){let p=u!=null&&u.length?u.map(v=>gt(v)):[];this.datePicker.api.setValue(p)}}},destroyed(){var e;if(this.onSetValue&&this.el.removeEventListener("phx:date-picker:set-value",this.onSetValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.datePicker)==null||e.destroy()}}});var ug={};he(ug,{Dialog:()=>lS});function HC(e,t={}){let{defer:n=!0}=t,i=n?$C:s=>s(),r=[];return r.push(i(()=>{let a=(typeof e=="function"?e():e).filter(Boolean);a.length!==0&&r.push(FC(a))})),()=>{r.forEach(s=>s==null?void 0:s())}}function YC(e,t={}){let n,i=H(()=>{let s=(Array.isArray(e)?e:[e]).map(o=>typeof o=="function"?o():o).filter(o=>o!=null);if(s.length===0)return;let a=s[0];n=new UC(s,y(g({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:a},t),{document:Le(a)}));try{n.activate()}catch(o){}});return function(){n==null||n.deactivate(),i()}}function jC(e){let t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function rg(e){let t=at(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function XC(e){var d;let t=e!=null?e:document,n=(d=t.defaultView)!=null?d:window,{documentElement:i,body:r}=t;if(r.hasAttribute(yl))return;let a=rg(i)||rg(r),o=n.innerWidth-i.clientWidth;r.setAttribute(yl,"");let l=()=>$c(i,"--scrollbar-width",`${o}px`),c=jC(i),u=()=>{let p={overflow:"hidden"};return!a&&o>0&&(p[c]=`${o}px`),Hn(r,p)},h=()=>{var S,P;let{scrollX:p,scrollY:v,visualViewport:I}=n,T=(S=I==null?void 0:I.offsetLeft)!=null?S:0,O=(P=I==null?void 0:I.offsetTop)!=null?P:0,b={position:"fixed",overflow:"hidden",top:`${-(v-Math.floor(O))}px`,left:`${-(p-Math.floor(T))}px`,right:"0"};!a&&o>0&&(b[c]=`${o}px`);let f=Hn(r,b);return()=>{f==null||f(),n.scrollTo({left:p,top:v,behavior:"instant"})}},m=[l(),ir()?h():u()];return()=>{m.forEach(p=>p==null?void 0:p()),r.removeAttribute(yl)}}function rS(e,t){let{state:n,send:i,context:r,prop:s,scope:a}=e,o=s("aria-label"),l=n.matches("open");return{open:l,setOpen(c){n.matches("open")!==c&&i({type:c?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(y(g({},Qn.trigger.attrs),{dir:s("dir"),id:lg(a),"aria-haspopup":"dialog",type:"button","aria-expanded":l,"data-state":l?"open":"closed","aria-controls":bl(a),onClick(c){c.defaultPrevented||i({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(y(g({},Qn.backdrop.attrs),{dir:s("dir"),hidden:!l,id:og(a),"data-state":l?"open":"closed"}))},getPositionerProps(){return t.element(y(g({},Qn.positioner.attrs),{dir:s("dir"),id:ag(a),style:{pointerEvents:l?void 0:"none"}}))},getContentProps(){let c=r.get("rendered");return t.element(y(g({},Qn.content.attrs),{dir:s("dir"),role:s("role"),hidden:!l,id:bl(a),tabIndex:-1,"data-state":l?"open":"closed","aria-modal":!0,"aria-label":o||void 0,"aria-labelledby":o||!c.title?void 0:El(a),"aria-describedby":c.description?Il(a):void 0}))},getTitleProps(){return t.element(y(g({},Qn.title.attrs),{dir:s("dir"),id:El(a)}))},getDescriptionProps(){return t.element(y(g({},Qn.description.attrs),{dir:s("dir"),id:Il(a)}))},getCloseTriggerProps(){return t.button(y(g({},Qn.closeTrigger.attrs),{dir:s("dir"),id:cg(a),type:"button",onClick(c){c.defaultPrevented||(c.stopPropagation(),i({type:"CLOSE"}))}}))}}}var Hi,ca,ua,ml,sg,NC,RC,DC,LC,MC,FC,$C,BC,_C,be,ng,GC,UC,Pl,vl,qC,WC,Ar,KC,ig,zC,yl,ZC,Qn,ag,og,bl,lg,El,Il,cg,da,JC,QC,eS,tS,nS,iS,sS,aS,Dx,oS,lS,dg=re(()=>{"use strict";Wn();tn();se();Hi=new WeakMap,ca=new WeakMap,ua={},ml=0,sg=e=>e&&(e.host||sg(e.parentNode)),NC=(e,t)=>t.map(n=>{if(e.contains(n))return n;let i=sg(n);return i&&e.contains(i)?i:(console.error("[zag-js > ariaHidden] target",n,"in not contained inside",e,". Doing nothing"),null)}).filter(n=>!!n),RC=new Set(["script","output","status","next-route-announcer"]),DC=e=>RC.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),LC=(e,t)=>{let{parentNode:n,markerName:i,controlAttribute:r,followControlledElements:s=!0}=t,a=NC(n,Array.isArray(e)?e:[e]);ua[i]||(ua[i]=new WeakMap);let o=ua[i],l=[],c=new Set,u=new Set(a),h=d=>{!d||c.has(d)||(c.add(d),h(d.parentNode))};a.forEach(d=>{h(d),s&&le(d)&&Xa(d,p=>{h(p)})});let m=d=>{!d||u.has(d)||Array.prototype.forEach.call(d.children,p=>{if(c.has(p))m(p);else try{if(DC(p))return;let I=p.getAttribute(r)==="true",T=(Hi.get(p)||0)+1,O=(o.get(p)||0)+1;Hi.set(p,T),o.set(p,O),l.push(p),T===1&&I&&ca.set(p,!0),O===1&&p.setAttribute(i,""),I||p.setAttribute(r,"true")}catch(v){console.error("[zag-js > ariaHidden] cannot operate on ",p,v)}})};return m(n),c.clear(),ml++,()=>{l.forEach(d=>{let p=Hi.get(d)-1,v=o.get(d)-1;Hi.set(d,p),o.set(d,v),p||(ca.has(d)||d.removeAttribute(r),ca.delete(d)),v||d.removeAttribute(i)}),ml--,ml||(Hi=new WeakMap,Hi=new WeakMap,ca=new WeakMap,ua={})}},MC=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,FC=(e,t=MC(e),n="data-aria-hidden",i=!0)=>{if(t)return LC(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:i})},$C=e=>{let t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};BC=Object.defineProperty,_C=(e,t,n)=>t in e?BC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,be=(e,t,n)=>_C(e,typeof t!="symbol"?t+"":t,n),ng={activateTrap(e,t){if(e.length>0){let i=e[e.length-1];i!==t&&i.pause()}let n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},GC=[],UC=class{constructor(e,t){be(this,"trapStack"),be(this,"config"),be(this,"doc"),be(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),be(this,"portalContainers",new Set),be(this,"listenerCleanups",[]),be(this,"handleFocus",i=>{let r=j(i),s=this.findContainerIndex(r,i)>=0;if(s||nr(r))s&&(this.state.mostRecentlyFocusedNode=r);else{i.stopImmediatePropagation();let a,o=!0;if(this.state.mostRecentlyFocusedNode)if(fi(this.state.mostRecentlyFocusedNode)>0){let l=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:c}=this.state.containerGroups[l];if(c.length>0){let u=c.findIndex(h=>h===this.state.mostRecentlyFocusedNode);u>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?u+1=0&&(a=c[u-1],o=!1))}}else this.state.containerGroups.some(l=>l.tabbableNodes.some(c=>fi(c)>0))||(o=!1);else o=!1;o&&(a=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),a?this.tryFocus(a):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),be(this,"handlePointerDown",i=>{let r=j(i);if(!(this.findContainerIndex(r,i)>=0)){if(Ar(this.config.clickOutsideDeactivates,i)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Ar(this.config.allowOutsideClick,i)||i.preventDefault()}}),be(this,"handleClick",i=>{let r=j(i);this.findContainerIndex(r,i)>=0||Ar(this.config.clickOutsideDeactivates,i)||Ar(this.config.allowOutsideClick,i)||(i.preventDefault(),i.stopImmediatePropagation())}),be(this,"handleTabKey",i=>{if(this.config.isKeyForward(i)||this.config.isKeyBackward(i)){this.state.recentNavEvent=i;let r=this.config.isKeyBackward(i),s=this.findNextNavNode({event:i,isBackward:r});if(!s)return;vl(i)&&i.preventDefault(),this.tryFocus(s)}}),be(this,"handleEscapeKey",i=>{KC(i)&&Ar(this.config.escapeDeactivates,i)!==!1&&(i.preventDefault(),this.deactivate())}),be(this,"_mutationObserver"),be(this,"setupMutationObserver",()=>{let i=this.doc.defaultView||window;this._mutationObserver=new i.MutationObserver(r=>{r.some(o=>Array.from(o.removedNodes).some(c=>c===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),r.some(o=>o.type==="attributes"&&(o.attributeName==="aria-controls"||o.attributeName==="aria-expanded")?!0:o.type==="childList"&&o.addedNodes.length>0?Array.from(o.addedNodes).some(l=>{if(l.nodeType!==Node.ELEMENT_NODE)return!1;let c=l;return Pc(c)?!0:c.id&&!this.state.containers.some(u=>u.contains(c))?Cc(c):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),be(this,"updateObservedNodes",()=>{var i;(i=this._mutationObserver)==null||i.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(r=>{var s;(s=this._mutationObserver)==null||s.observe(r,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(r=>{this.observePortalContainer(r)}))}),be(this,"getInitialFocusNode",()=>{let i=this.getNodeForOption("initialFocus",{hasFallback:!0});if(i===!1)return!1;if(i===void 0||i&&!Ye(i)){let r=ui(this.doc);if(r&&this.findContainerIndex(r)>=0)i=r;else{let s=this.state.tabbableGroups[0];i=s&&s.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else i===null&&(i=this.getNodeForOption("fallbackFocus"));if(!i)throw new Error("Your focus-trap needs to have at least one focusable element");return i.isConnected||(i=this.getNodeForOption("fallbackFocus")),i}),be(this,"tryFocus",i=>{if(i!==!1&&i!==ui(this.doc)){if(!i||!i.focus){this.tryFocus(this.getInitialFocusNode());return}i.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=i,zC(i)&&i.select()}}),be(this,"deactivate",i=>{if(!this.state.active)return this;let r=g({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},i);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),ng.deactivateTrap(this.trapStack,this),this.portalContainers.clear();let s=this.getOption(r,"onDeactivate"),a=this.getOption(r,"onPostDeactivate"),o=this.getOption(r,"checkCanReturnFocus"),l=this.getOption(r,"returnFocus","returnFocusOnDeactivate");s==null||s();let c=()=>{ig(()=>{if(l){let u=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(u)}a==null||a()})};if(l&&o){let u=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return o(u).then(c,c),this}return c(),this}),be(this,"pause",i=>{if(this.state.paused||!this.state.active)return this;let r=this.getOption(i,"onPause"),s=this.getOption(i,"onPostPause");return this.state.paused=!0,r==null||r(),this.removeListeners(),this.updateObservedNodes(),s==null||s(),this}),be(this,"unpause",i=>{if(!this.state.paused||!this.state.active)return this;let r=this.getOption(i,"onUnpause"),s=this.getOption(i,"onPostUnpause");return this.state.paused=!1,r==null||r(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),s==null||s(),this}),be(this,"updateContainerElements",i=>(this.state.containers=Array.isArray(i)?i.filter(Boolean):[i].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),be(this,"getReturnFocusNode",i=>{let r=this.getNodeForOption("setReturnFocus",{params:[i]});return r||(r===!1?!1:i)}),be(this,"getOption",(i,r,s)=>i&&i[r]!==void 0?i[r]:this.config[s||r]),be(this,"getNodeForOption",(i,{hasFallback:r=!1,params:s=[]}={})=>{let a=this.config[i];if(typeof a=="function"&&(a=a(...s)),a===!0&&(a=void 0),!a){if(a===void 0||a===!1)return a;throw new Error(`\`${i}\` was specified but was not a node, or did not return a node`)}let o=a;if(typeof a=="string"){try{o=this.doc.querySelector(a)}catch(l){throw new Error(`\`${i}\` appears to be an invalid selector; error="${l.message}"`)}if(!o&&!r)throw new Error(`\`${i}\` as selector refers to no known node`)}return o}),be(this,"findNextNavNode",i=>{let{event:r,isBackward:s=!1}=i,a=i.target||j(r);this.updateTabbableNodes();let o=null;if(this.state.tabbableGroups.length>0){let l=this.findContainerIndex(a,r),c=l>=0?this.state.containerGroups[l]:void 0;if(l<0)s?o=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:o=this.state.tabbableGroups[0].firstTabbableNode;else if(s){let u=this.state.tabbableGroups.findIndex(({firstTabbableNode:h})=>a===h);if(u<0&&((c==null?void 0:c.container)===a||Ye(a)&&!dn(a)&&!(c!=null&&c.nextTabbableNode(a,!1)))&&(u=l),u>=0){let h=u===0?this.state.tabbableGroups.length-1:u-1,m=this.state.tabbableGroups[h];o=fi(a)>=0?m.lastTabbableNode:m.lastDomTabbableNode}else vl(r)||(o=c==null?void 0:c.nextTabbableNode(a,!1))}else{let u=this.state.tabbableGroups.findIndex(({lastTabbableNode:h})=>a===h);if(u<0&&((c==null?void 0:c.container)===a||Ye(a)&&!dn(a)&&!(c!=null&&c.nextTabbableNode(a)))&&(u=l),u>=0){let h=u===this.state.tabbableGroups.length-1?0:u+1,m=this.state.tabbableGroups[h];o=fi(a)>=0?m.firstTabbableNode:m.firstDomTabbableNode}else vl(r)||(o=c==null?void 0:c.nextTabbableNode(a))}}else o=this.getNodeForOption("fallbackFocus");return o}),this.trapStack=t.trapStack||GC;let n=g({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward:qC,isKeyBackward:WC},t);this.doc=n.document||Le(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){let t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){var t;(t=this._mutationObserver)==null||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{Ic(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){let n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:i,tabbableNodes:r})=>i.contains(e)||(n==null?void 0:n.includes(i))||r.find(s=>s===e)||this.isControlledElement(i,e))}isControlledElement(e,t){return this.config.followControlledElements?as(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{let t=jt(e,{getShadowRoot:this.config.getShadowRoot}),n=ar(e,{getShadowRoot:this.config.getShadowRoot}),i=t[0],r=t[t.length-1],s=i,a=r,o=!1;for(let c=0;c0){o=!0;break}function l(c,u=!0){let h=t.indexOf(c);if(h>=0)return t[h+(u?1:-1)];let m=n.indexOf(c);if(!(m<0)){if(u){for(let d=m+1;d=0;d--)if(dn(n[d]))return n[d]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:o,firstTabbableNode:i,lastTabbableNode:r,firstDomTabbableNode:s,lastDomTabbableNode:a,nextTabbableNode:l}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return ng.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?ig(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(ee(this.doc,"focusin",this.handleFocus,!0),ee(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),ee(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),ee(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),ee(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),ee(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;let t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),i=this.getOption(e,"checkCanFocusTrap");i||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=ui(this.doc),t==null||t();let r=()=>{i&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return i?(i(this.state.containers.concat()).then(r,r),this):(r(),this)}},Pl=e=>e.type==="keydown",vl=e=>Pl(e)&&(e==null?void 0:e.key)==="Tab",qC=e=>Pl(e)&&e.key==="Tab"&&!(e!=null&&e.shiftKey),WC=e=>Pl(e)&&e.key==="Tab"&&(e==null?void 0:e.shiftKey),Ar=(e,...t)=>typeof e=="function"?e(...t):e,KC=e=>!e.isComposing&&e.key==="Escape",ig=e=>setTimeout(e,0),zC=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";yl="data-scroll-lock";ZC=U("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),Qn=ZC.build(),ag=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},og=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},bl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},lg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},El=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},Il=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},cg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},da=e=>e.getById(bl(e)),JC=e=>e.getById(ag(e)),QC=e=>e.getById(og(e)),eS=e=>e.getById(lg(e)),tS=e=>e.getById(El(e)),nS=e=>e.getById(Il(e)),iS=e=>e.getById(cg(e));sS={props({props:e,scope:t}){let n=e.role==="alertdialog",i=n?()=>iS(t):void 0,r=typeof e.modal=="boolean"?e.modal:!0;return g({role:"dialog",modal:r,trapFocus:r,preventScroll:r,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:i},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return Ft(()=>da(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[eS(e)],onInteractOutside(r){var s;(s=n("onInteractOutside"))==null||s(r),n("closeOnInteractOutside")||r.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(r){var s;(s=n("onEscapeKeyDown"))==null||s(r),n("closeOnEscape")||r.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return XC(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?YC(()=>da(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:i=>{var r,s;return(s=(r=t("finalFocusEl"))==null?void 0:r())!=null?s:i},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?HC(()=>[da(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){H(()=>{e.set("rendered",{title:!!tS(t),description:!!nS(t)})})},syncZIndex({scope:e}){H(()=>{let t=da(e);if(!t)return;let n=at(t);[JC(e),QC(e)].forEach(r=>{r==null||r.style.setProperty("--z-index",n.zIndex),r==null||r.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}},aS=_()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]),Dx=B(aS),oS=class extends K{initMachine(e){return new W(sS,e)}initApi(){return rS(this.machine.service,q)}render(){let e=this.el,t=e.querySelector('[data-scope="dialog"][data-part="trigger"]');t&&this.spreadProps(t,this.api.getTriggerProps());let n=e.querySelector('[data-scope="dialog"][data-part="backdrop"]');n&&this.spreadProps(n,this.api.getBackdropProps());let i=e.querySelector('[data-scope="dialog"][data-part="positioner"]');i&&this.spreadProps(i,this.api.getPositionerProps());let r=e.querySelector('[data-scope="dialog"][data-part="content"]');r&&this.spreadProps(r,this.api.getContentProps());let s=e.querySelector('[data-scope="dialog"][data-part="title"]');s&&this.spreadProps(s,this.api.getTitleProps());let a=e.querySelector('[data-scope="dialog"][data-part="description"]');a&&this.spreadProps(a,this.api.getDescriptionProps());let o=e.querySelector('[data-scope="dialog"][data-part="close-trigger"]');o&&this.spreadProps(o,this.api.getCloseTriggerProps())}},lS={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=new oS(e,y(g({id:e.id},C(e,"controlled")?{open:C(e,"open")}:{defaultOpen:C(e,"defaultOpen")}),{modal:C(e,"modal"),closeOnInteractOutside:C(e,"closeOnInteractOutside"),closeOnEscape:C(e,"closeOnEscapeKeyDown"),preventScroll:C(e,"preventScroll"),restoreFocus:C(e,"restoreFocus"),dir:w(e,"dir",["ltr","rtl"]),onOpenChange:i=>{let r=w(e,"onOpenChange");r&&this.liveSocket.main.isConnected()&&t(r,{id:e.id,open:i.open});let s=w(e,"onOpenChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{id:e.id,open:i.open}}))}}));n.init(),this.dialog=n,this.onSetOpen=i=>{let{open:r}=i.detail;n.api.setOpen(r)},e.addEventListener("phx:dialog:set-open",this.onSetOpen),this.handlers=[],this.handlers.push(this.handleEvent("dialog_set_open",i=>{let r=i.dialog_id;r&&r!==e.id||n.api.setOpen(i.open)})),this.handlers.push(this.handleEvent("dialog_open",()=>{this.pushEvent("dialog_open_response",{value:n.api.open})}))},updated(){var e;(e=this.dialog)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlled")?{open:C(this.el,"open")}:{defaultOpen:C(this.el,"defaultOpen")}),{modal:C(this.el,"modal"),closeOnInteractOutside:C(this.el,"closeOnInteractOutside"),closeOnEscape:C(this.el,"closeOnEscapeKeyDown"),preventScroll:C(this.el,"preventScroll"),restoreFocus:C(this.el,"restoreFocus"),dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(this.onSetOpen&&this.el.removeEventListener("phx:dialog:set-open",this.onSetOpen),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.dialog)==null||e.destroy()}}});var mg={};he(mg,{Editable:()=>PS});function yS(e,t){var S;let{state:n,context:i,send:r,prop:s,scope:a,computed:o}=e,l=!!s("disabled"),c=o("isInteractive"),u=!!s("readOnly"),h=!!s("required"),m=!!s("invalid"),d=!!s("autoResize"),p=s("translations"),v=n.matches("edit"),I=s("placeholder"),T=typeof I=="string"?{edit:I,preview:I}:I,O=i.get("value"),b=O.trim()==="",f=b?(S=T==null?void 0:T.preview)!=null?S:"":O;return{editing:v,empty:b,value:O,valueText:f,setValue(P){r({type:"VALUE.SET",value:P,src:"setValue"})},clearValue(){r({type:"VALUE.SET",value:"",src:"clearValue"})},edit(){c&&r({type:"EDIT"})},cancel(){c&&r({type:"CANCEL"})},submit(){c&&r({type:"SUBMIT"})},getRootProps(){return t.element(y(g({},ln.root.attrs),{id:uS(a),dir:s("dir")}))},getAreaProps(){return t.element(y(g({},ln.area.attrs),{id:dS(a),dir:s("dir"),style:d?{display:"inline-grid"}:void 0,"data-focus":E(v),"data-disabled":E(l),"data-placeholder-shown":E(b)}))},getLabelProps(){return t.label(y(g({},ln.label.attrs),{id:hS(a),dir:s("dir"),htmlFor:Cl(a),"data-focus":E(v),"data-invalid":E(m),"data-required":E(h),onClick(){if(v)return;let P=pS(a);P==null||P.focus({preventScroll:!0})}}))},getInputProps(){return t.input(y(g({},ln.input.attrs),{dir:s("dir"),"aria-label":p==null?void 0:p.input,name:s("name"),form:s("form"),id:Cl(a),hidden:d?void 0:!v,placeholder:T==null?void 0:T.edit,maxLength:s("maxLength"),required:s("required"),disabled:l,"data-disabled":E(l),readOnly:u,"data-readonly":E(u),"aria-invalid":X(m),"data-invalid":E(m),"data-autoresize":E(d),defaultValue:O,size:d?1:void 0,onChange(P){r({type:"VALUE.SET",src:"input.change",value:P.currentTarget.value})},onKeyDown(P){if(P.defaultPrevented||Re(P))return;let A={Escape(){r({type:"CANCEL"}),P.preventDefault()},Enter(x){if(!o("submitOnEnter"))return;let{localName:k}=x.currentTarget;if(k==="textarea"){if(!(Qa()?x.metaKey:x.ctrlKey))return;r({type:"SUBMIT",src:"keydown.enter"});return}k==="input"&&!x.shiftKey&&!x.metaKey&&(r({type:"SUBMIT",src:"keydown.enter"}),x.preventDefault())}}[P.key];A&&A(P)},style:d?{gridArea:"1 / 1 / auto / auto",visibility:v?void 0:"hidden"}:void 0}))},getPreviewProps(){return t.element(y(g({id:hg(a)},ln.preview.attrs),{dir:s("dir"),"data-placeholder-shown":E(b),"aria-readonly":X(u),"data-readonly":E(l),"data-disabled":E(l),"aria-disabled":X(l),"aria-invalid":X(m),"data-invalid":E(m),"aria-label":p==null?void 0:p.edit,"data-autoresize":E(d),children:f,hidden:d?void 0:v,tabIndex:c?0:void 0,onClick(){c&&s("activationMode")==="click"&&r({type:"EDIT",src:"click"})},onFocus(){c&&s("activationMode")==="focus"&&r({type:"EDIT",src:"focus"})},onDoubleClick(P){P.defaultPrevented||c&&s("activationMode")==="dblclick"&&r({type:"EDIT",src:"dblclick"})},style:d?{whiteSpace:"pre",gridArea:"1 / 1 / auto / auto",visibility:v?"hidden":void 0,overflow:"hidden",textOverflow:"ellipsis"}:void 0}))},getEditTriggerProps(){return t.button(y(g({},ln.editTrigger.attrs),{id:fg(a),dir:s("dir"),"aria-label":p==null?void 0:p.edit,hidden:v,type:"button",disabled:l,onClick(P){P.defaultPrevented||c&&r({type:"EDIT",src:"edit.click"})}}))},getControlProps(){return t.element(y(g({id:gS(a)},ln.control.attrs),{dir:s("dir")}))},getSubmitTriggerProps(){return t.button(y(g({},ln.submitTrigger.attrs),{dir:s("dir"),id:gg(a),"aria-label":p==null?void 0:p.submit,hidden:!v,disabled:l,type:"button",onClick(P){P.defaultPrevented||c&&r({type:"SUBMIT",src:"submit.click"})}}))},getCancelTriggerProps(){return t.button(y(g({},ln.cancelTrigger.attrs),{dir:s("dir"),"aria-label":p==null?void 0:p.cancel,id:pg(a),hidden:!v,type:"button",disabled:l,onClick(P){P.defaultPrevented||c&&r({type:"CANCEL",src:"cancel.click"})}}))}}}var cS,ln,uS,dS,hS,hg,Cl,gS,gg,pg,fg,ha,pS,fS,mS,vS,bS,ES,Bx,IS,PS,vg=re(()=>{"use strict";tn();se();cS=U("editable").parts("root","area","label","preview","input","editTrigger","submitTrigger","cancelTrigger","control"),ln=cS.build(),uS=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`editable:${e.id}`},dS=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.area)!=null?n:`editable:${e.id}:area`},hS=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`editable:${e.id}:label`},hg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.preview)!=null?n:`editable:${e.id}:preview`},Cl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.input)!=null?n:`editable:${e.id}:input`},gS=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`editable:${e.id}:control`},gg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.submitTrigger)!=null?n:`editable:${e.id}:submit`},pg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.cancelTrigger)!=null?n:`editable:${e.id}:cancel`},fg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.editTrigger)!=null?n:`editable:${e.id}:edit`},ha=e=>e.getById(Cl(e)),pS=e=>e.getById(hg(e)),fS=e=>e.getById(gg(e)),mS=e=>e.getById(pg(e)),vS=e=>e.getById(fg(e));bS={props({props:e}){return y(g({activationMode:"focus",submitMode:"both",defaultValue:"",selectOnFocus:!0},e),{translations:g({input:"editable input",edit:"edit",submit:"submit",cancel:"cancel"},e.translations)})},initialState({prop:e}){return e("edit")||e("defaultEdit")?"edit":"preview"},entry:["focusInputIfNeeded"],context:({bindable:e,prop:t})=>({value:e(()=>({defaultValue:t("defaultValue"),value:t("value"),onChange(n){var i;return(i=t("onValueChange"))==null?void 0:i({value:n})}})),previousValue:e(()=>({defaultValue:""}))}),watch({track:e,action:t,context:n,prop:i}){e([()=>n.get("value")],()=>{t(["syncInputValue"])}),e([()=>i("edit")],()=>{t(["toggleEditing"])})},computed:{submitOnEnter({prop:e}){let t=e("submitMode");return t==="both"||t==="enter"},submitOnBlur({prop:e}){let t=e("submitMode");return t==="both"||t==="blur"},isInteractive({prop:e}){return!(e("disabled")||e("readOnly"))}},on:{"VALUE.SET":{actions:["setValue"]}},states:{preview:{entry:["blurInput"],on:{"CONTROLLED.EDIT":{target:"edit",actions:["setPreviousValue","focusInput"]},EDIT:[{guard:"isEditControlled",actions:["invokeOnEdit"]},{target:"edit",actions:["setPreviousValue","focusInput","invokeOnEdit"]}]}},edit:{effects:["trackInteractOutside"],entry:["syncInputValue"],on:{"CONTROLLED.PREVIEW":[{guard:"isSubmitEvent",target:"preview",actions:["setPreviousValue","restoreFocus","invokeOnSubmit"]},{target:"preview",actions:["revertValue","restoreFocus","invokeOnCancel"]}],CANCEL:[{guard:"isEditControlled",actions:["invokeOnPreview"]},{target:"preview",actions:["revertValue","restoreFocus","invokeOnCancel","invokeOnPreview"]}],SUBMIT:[{guard:"isEditControlled",actions:["invokeOnPreview"]},{target:"preview",actions:["setPreviousValue","restoreFocus","invokeOnSubmit","invokeOnPreview"]}]}}},implementations:{guards:{isEditControlled:({prop:e})=>e("edit")!=null,isSubmitEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="SUBMIT"}},effects:{trackInteractOutside({send:e,scope:t,prop:n,computed:i}){return Ws(ha(t),{exclude(r){return[mS(t),fS(t)].some(a=>ce(a,r))},onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onInteractOutside(r){var a;if((a=n("onInteractOutside"))==null||a(r),r.defaultPrevented)return;let{focusable:s}=r.detail;e({type:i("submitOnBlur")?"SUBMIT":"CANCEL",src:"interact-outside",focusable:s})}})}},actions:{restoreFocus({event:e,scope:t,prop:n}){e.focusable||H(()=>{var r,s;let i=(s=(r=n("finalFocusEl"))==null?void 0:r())!=null?s:vS(t);i==null||i.focus({preventScroll:!0})})},clearValue({context:e}){e.set("value","")},focusInputIfNeeded({action:e,prop:t}){(t("edit")||t("defaultEdit"))&&e(["focusInput"])},focusInput({scope:e,prop:t}){H(()=>{let n=ha(e);n&&(t("selectOnFocus")?n.select():n.focus({preventScroll:!0}))})},invokeOnCancel({prop:e,context:t}){var i;let n=t.get("previousValue");(i=e("onValueRevert"))==null||i({value:n})},invokeOnSubmit({prop:e,context:t}){var i;let n=t.get("value");(i=e("onValueCommit"))==null||i({value:n})},invokeOnEdit({prop:e}){var t;(t=e("onEditChange"))==null||t({edit:!0})},invokeOnPreview({prop:e}){var t;(t=e("onEditChange"))==null||t({edit:!1})},toggleEditing({prop:e,send:t,event:n}){t({type:e("edit")?"CONTROLLED.EDIT":"CONTROLLED.PREVIEW",previousEvent:n})},syncInputValue({context:e,scope:t}){let n=ha(t);n&&Me(n,e.get("value"))},setValue({context:e,prop:t,event:n}){let i=t("maxLength"),r=i!=null?n.value.slice(0,i):n.value;e.set("value",r)},setPreviousValue({context:e}){e.set("previousValue",e.get("value"))},revertValue({context:e}){let t=e.get("previousValue");t&&e.set("value",t)},blurInput({scope:e}){var t;(t=ha(e))==null||t.blur()}}}},ES=_()(["activationMode","autoResize","dir","disabled","finalFocusEl","form","getRootNode","id","ids","invalid","maxLength","name","onEditChange","onFocusOutside","onInteractOutside","onPointerDownOutside","onValueChange","onValueCommit","onValueRevert","placeholder","readOnly","required","selectOnFocus","edit","defaultEdit","submitMode","translations","defaultValue","value"]),Bx=B(ES),IS=class extends K{initMachine(e){return new W(bS,e)}initApi(){return yS(this.machine.service,q)}render(){var l;let e=(l=this.el.querySelector('[data-scope="editable"][data-part="root"]'))!=null?l:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="editable"][data-part="area"]');t&&this.spreadProps(t,this.api.getAreaProps());let n=this.el.querySelector('[data-scope="editable"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps());let i=this.el.querySelector('[data-scope="editable"][data-part="input"]');i&&this.spreadProps(i,this.api.getInputProps());let r=this.el.querySelector('[data-scope="editable"][data-part="preview"]');r&&this.spreadProps(r,this.api.getPreviewProps());let s=this.el.querySelector('[data-scope="editable"][data-part="edit-trigger"]');s&&this.spreadProps(s,this.api.getEditTriggerProps());let a=this.el.querySelector('[data-scope="editable"][data-part="submit-trigger"]');a&&this.spreadProps(a,this.api.getSubmitTriggerProps());let o=this.el.querySelector('[data-scope="editable"][data-part="cancel-trigger"]');o&&this.spreadProps(o,this.api.getCancelTriggerProps())}},PS={mounted(){let e=this.el,t=w(e,"value"),n=w(e,"defaultValue"),i=C(e,"controlled"),r=w(e,"placeholder"),s=w(e,"activationMode"),a=C(e,"selectOnFocus"),o=new IS(e,y(g(g(g(g(y(g({id:e.id},i&&t!==void 0?{value:t}:{defaultValue:n!=null?n:""}),{disabled:C(e,"disabled"),readOnly:C(e,"readOnly"),required:C(e,"required"),invalid:C(e,"invalid"),name:w(e,"name"),form:w(e,"form"),dir:Oe(e)}),r!==void 0?{placeholder:r}:{}),s!==void 0?{activationMode:s}:{}),a!==void 0?{selectOnFocus:a}:{}),C(e,"controlledEdit")?{edit:C(e,"edit")}:{defaultEdit:C(e,"defaultEdit")}),{onValueChange:l=>{let c=e.querySelector('[data-scope="editable"][data-part="input"]');c&&(c.value=l.value,c.dispatchEvent(new Event("input",{bubbles:!0})),c.dispatchEvent(new Event("change",{bubbles:!0})));let u=w(e,"onValueChange");u&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(u,{value:l.value,id:e.id});let h=w(e,"onValueChangeClient");h&&e.dispatchEvent(new CustomEvent(h,{bubbles:!0,detail:{value:l,id:e.id}}))}}));o.init(),this.editable=o,this.handlers=[]},updated(){var n;let e=w(this.el,"value"),t=C(this.el,"controlled");(n=this.editable)==null||n.updateProps(y(g({id:this.el.id},t&&e!==void 0?{value:e}:{}),{disabled:C(this.el,"disabled"),readOnly:C(this.el,"readOnly"),required:C(this.el,"required"),invalid:C(this.el,"invalid"),name:w(this.el,"name"),form:w(this.el,"form")}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.editable)==null||e.destroy()}}});var Vg={};he(Vg,{FloatingPanel:()=>RS});function TS(e){switch(e){case"n":return{cursor:"n-resize",width:"100%",top:0,left:"50%",translate:"-50%"};case"e":return{cursor:"e-resize",height:"100%",right:0,top:"50%",translate:"0 -50%"};case"s":return{cursor:"s-resize",width:"100%",bottom:0,left:"50%",translate:"-50%"};case"w":return{cursor:"w-resize",height:"100%",left:0,top:"50%",translate:"0 -50%"};case"se":return{cursor:"se-resize",bottom:0,right:0};case"sw":return{cursor:"sw-resize",bottom:0,left:0};case"ne":return{cursor:"ne-resize",top:0,right:0};case"nw":return{cursor:"nw-resize",top:0,left:0};default:throw new Error(`Invalid axis: ${e}`)}}function OS(e,t){let{state:n,send:i,scope:r,prop:s,computed:a,context:o}=e,l=n.hasTag("open"),c=n.matches("open.dragging"),u=n.matches("open.resizing"),h=o.get("isTopmost"),m=o.get("size"),d=o.get("position"),p=a("isMaximized"),v=a("isMinimized"),I=a("isStaged"),T=a("canResize"),O=a("canDrag");return{open:l,resizable:s("resizable"),draggable:s("draggable"),setOpen(b){n.hasTag("open")!==b&&i({type:b?"OPEN":"CLOSE"})},dragging:c,resizing:u,position:d,size:m,setPosition(b){i({type:"SET_POSITION",position:b})},setSize(b){i({type:"SET_SIZE",size:b})},minimize(){i({type:"MINIMIZE"})},maximize(){i({type:"MAXIMIZE"})},restore(){i({type:"RESTORE"})},getTriggerProps(){return t.button(y(g({},St.trigger.attrs),{dir:s("dir"),type:"button",disabled:s("disabled"),id:Tg(r),"data-state":l?"open":"closed","data-dragging":E(c),"aria-controls":Sl(r),onClick(b){if(b.defaultPrevented||s("disabled"))return;let f=n.hasTag("open");i({type:f?"CLOSE":"OPEN",src:"trigger"})}}))},getPositionerProps(){return t.element(y(g({},St.positioner.attrs),{dir:s("dir"),id:Og(r),style:{"--width":ye(m==null?void 0:m.width),"--height":ye(m==null?void 0:m.height),"--x":ye(d==null?void 0:d.x),"--y":ye(d==null?void 0:d.y),position:s("strategy"),top:"var(--y)",left:"var(--x)"}}))},getContentProps(){return t.element(y(g({},St.content.attrs),{dir:s("dir"),role:"dialog",tabIndex:0,hidden:!l,id:Sl(r),"aria-labelledby":yg(r),"data-state":l?"open":"closed","data-dragging":E(c),"data-topmost":E(h),"data-behind":E(!h),"data-minimized":E(v),"data-maximized":E(p),"data-staged":E(I),style:{width:"var(--width)",height:"var(--height)",overflow:v?"hidden":void 0},onFocus(){i({type:"CONTENT_FOCUS"})},onKeyDown(b){if(b.defaultPrevented||b.currentTarget!==j(b))return;let f=gi(b)*s("gridSize"),P={Escape(){h&&i({type:"ESCAPE"})},ArrowLeft(){i({type:"MOVE",direction:"left",step:f})},ArrowRight(){i({type:"MOVE",direction:"right",step:f})},ArrowUp(){i({type:"MOVE",direction:"up",step:f})},ArrowDown(){i({type:"MOVE",direction:"down",step:f})}}[ge(b,{dir:s("dir")})];P&&(b.preventDefault(),P(b))}}))},getCloseTriggerProps(){return t.button(y(g({},St.closeTrigger.attrs),{dir:s("dir"),disabled:s("disabled"),"aria-label":"Close Window",type:"button",onClick(b){b.defaultPrevented||i({type:"CLOSE"})}}))},getStageTriggerProps(b){if(!Pg.has(b.stage))throw new Error(`[zag-js] Invalid stage: ${b.stage}. Must be one of: ${Array.from(Pg).join(", ")}`);let f=s("translations"),S=Ce(b.stage,{minimized:()=>({"aria-label":f.minimize,hidden:I}),maximized:()=>({"aria-label":f.maximize,hidden:I}),default:()=>({"aria-label":f.restore,hidden:!I})});return t.button(y(g(y(g({},St.stageTrigger.attrs),{dir:s("dir"),disabled:s("disabled"),"data-stage":b.stage}),S),{type:"button",onClick(P){if(P.defaultPrevented||!s("resizable"))return;let V=Ce(b.stage,{minimized:()=>"MINIMIZE",maximized:()=>"MAXIMIZE",default:()=>"RESTORE"});i({type:V.toUpperCase()})}}))},getResizeTriggerProps(b){return t.element(y(g({},St.resizeTrigger.attrs),{dir:s("dir"),"data-disabled":E(!T),"data-axis":b.axis,onPointerDown(f){T&&pe(f)&&(f.currentTarget.setPointerCapture(f.pointerId),f.stopPropagation(),i({type:"RESIZE_START",axis:b.axis,position:{x:f.clientX,y:f.clientY}}))},onPointerUp(f){if(!T)return;let S=f.currentTarget;S.hasPointerCapture(f.pointerId)&&S.releasePointerCapture(f.pointerId)},style:g({position:"absolute",touchAction:"none"},TS(b.axis))}))},getDragTriggerProps(){return t.element(y(g({},St.dragTrigger.attrs),{dir:s("dir"),"data-disabled":E(!O),onPointerDown(b){if(!O||!pe(b))return;let f=j(b);f!=null&&f.closest("button")||f!=null&&f.closest("[data-no-drag]")||(b.currentTarget.setPointerCapture(b.pointerId),b.stopPropagation(),i({type:"DRAG_START",pointerId:b.pointerId,position:{x:b.clientX,y:b.clientY}}))},onPointerUp(b){if(!O)return;let f=b.currentTarget;f.hasPointerCapture(b.pointerId)&&f.releasePointerCapture(b.pointerId)},onDoubleClick(b){b.defaultPrevented||s("resizable")&&i({type:I?"RESTORE":"MAXIMIZE"})},style:{WebkitUserSelect:"none",userSelect:"none",touchAction:"none",cursor:"move"}}))},getControlProps(){return t.element(y(g({},St.control.attrs),{dir:s("dir"),"data-disabled":E(s("disabled")),"data-stage":o.get("stage"),"data-minimized":E(v),"data-maximized":E(p),"data-staged":E(I)}))},getTitleProps(){return t.element(y(g({},St.title.attrs),{dir:s("dir"),id:yg(r)}))},getHeaderProps(){return t.element(y(g({},St.header.attrs),{dir:s("dir"),id:wg(r),"data-dragging":E(c),"data-topmost":E(h),"data-behind":E(!h),"data-minimized":E(v),"data-maximized":E(p),"data-staged":E(I)}))},getBodyProps(){return t.element(y(g({},St.body.attrs),{dir:s("dir"),"data-dragging":E(c),"data-minimized":E(v),"data-maximized":E(p),"data-staged":E(I),hidden:v}))}}}function ga(e){if(e)try{let t=JSON.parse(e);if(typeof t.width=="number"&&typeof t.height=="number")return{width:t.width,height:t.height}}catch(t){}}function Sg(e){if(e)try{let t=JSON.parse(e);if(typeof t.x=="number"&&typeof t.y=="number")return{x:t.x,y:t.y}}catch(t){}}var CS,St,Tg,Og,Sl,yg,wg,bg,Eg,Ig,SS,wn,Pg,kr,Cg,wS,VS,xS,AS,Wx,kS,Kx,NS,RS,xg=re(()=>{"use strict";Cs();se();CS=U("floating-panel").parts("trigger","positioner","content","header","body","title","resizeTrigger","dragTrigger","stageTrigger","closeTrigger","control"),St=CS.build(),Tg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`float:${e.id}:trigger`},Og=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`float:${e.id}:positioner`},Sl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`float:${e.id}:content`},yg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`float:${e.id}:title`},wg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.header)!=null?n:`float:${e.id}:header`},bg=e=>e.getById(Tg(e)),Eg=e=>e.getById(Og(e)),Ig=e=>e.getById(Sl(e)),SS=e=>e.getById(wg(e)),wn=(e,t,n)=>{let i;return le(t)?i=po(t):i=Cu(e.getWin()),n&&(i=bn({x:-i.width,y:i.minY,width:i.width*3,height:i.height*2})),fn(i,["x","y","width","height"])};Pg=new Set(["minimized","maximized","default"]);kr=ys({stack:[],count(){return this.stack.length},add(e){this.stack.includes(e)||this.stack.push(e)},remove(e){let t=this.stack.indexOf(e);t<0||this.stack.splice(t,1)},bringToFront(e){this.remove(e),this.add(e)},isTopmost(e){return this.stack[this.stack.length-1]===e},indexOf(e){return this.stack.indexOf(e)}}),{not:Cg,and:wS}=Ee(),VS={minimize:"Minimize window",maximize:"Maximize window",restore:"Restore window"},xS={props({props:e}){return yn(e,["id"],"floating-panel"),y(g({strategy:"fixed",gridSize:1,defaultSize:{width:320,height:240},defaultPosition:{x:300,y:100},allowOverflow:!0,resizable:!0,draggable:!0},e),{hasSpecifiedPosition:!!e.defaultPosition||!!e.position,translations:g(g({},VS),e.translations)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({prop:e,bindable:t}){return{size:t(()=>({defaultValue:e("defaultSize"),value:e("size"),isEqual:Iu,sync:!0,hash(n){return`W:${n.width} H:${n.height}`},onChange(n){var i;(i=e("onSizeChange"))==null||i({size:n})}})),position:t(()=>({defaultValue:e("defaultPosition"),value:e("position"),isEqual:Pu,sync:!0,hash(n){return`X:${n.x} Y:${n.y}`},onChange(n){var i;(i=e("onPositionChange"))==null||i({position:n})}})),stage:t(()=>({defaultValue:"default",onChange(n){var i;(i=e("onStageChange"))==null||i({stage:n})}})),lastEventPosition:t(()=>({defaultValue:null})),prevPosition:t(()=>({defaultValue:null})),prevSize:t(()=>({defaultValue:null})),isTopmost:t(()=>({defaultValue:void 0}))}},computed:{isMaximized:({context:e})=>e.get("stage")==="maximized",isMinimized:({context:e})=>e.get("stage")==="minimized",isStaged:({context:e})=>e.get("stage")!=="default",canResize:({context:e,prop:t})=>t("resizable")&&!t("disabled")&&e.get("stage")==="default",canDrag:({prop:e,computed:t})=>e("draggable")&&!e("disabled")&&!t("isMaximized")},watch({track:e,context:t,action:n,prop:i}){e([()=>t.hash("position")],()=>{n(["setPositionStyle"])}),e([()=>t.hash("size")],()=>{n(["setSizeStyle"])}),e([()=>i("open")],()=>{n(["toggleVisibility"])})},effects:["trackPanelStack"],on:{CONTENT_FOCUS:{actions:["bringToFrontOfPanelStack"]},SET_POSITION:{actions:["setPosition"]},SET_SIZE:{actions:["setSize"]}},states:{closed:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open",actions:["setAnchorPosition","setPositionStyle","setSizeStyle","focusContentEl"]},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setAnchorPosition","setPositionStyle","setSizeStyle","focusContentEl"]}]}},open:{tags:["open"],entry:["bringToFrontOfPanelStack"],effects:["trackBoundaryRect"],on:{DRAG_START:{guard:Cg("isMaximized"),target:"open.dragging",actions:["setPrevPosition"]},RESIZE_START:{guard:Cg("isMinimized"),target:"open.resizing",actions:["setPrevSize"]},"CONTROLLED.CLOSE":{target:"closed",actions:["resetRect","focusTriggerEl"]},CLOSE:[{guard:"isOpenControlled",target:"closed",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","resetRect","focusTriggerEl"]}],ESCAPE:[{guard:wS("isOpenControlled","closeOnEsc"),actions:["invokeOnClose"]},{guard:"closeOnEsc",target:"closed",actions:["invokeOnClose","resetRect","focusTriggerEl"]}],MINIMIZE:{actions:["setMinimized"]},MAXIMIZE:{actions:["setMaximized"]},RESTORE:{actions:["setRestored"]},MOVE:{actions:["setPositionFromKeyboard"]}}},"open.dragging":{tags:["open"],effects:["trackPointerMove"],exit:["clearPrevPosition"],on:{DRAG:{actions:["setPosition"]},DRAG_END:{target:"open",actions:["invokeOnDragEnd"]},"CONTROLLED.CLOSE":{target:"closed",actions:["resetRect"]},CLOSE:[{guard:"isOpenControlled",target:"closed",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","resetRect"]}],ESCAPE:{target:"open"}}},"open.resizing":{tags:["open"],effects:["trackPointerMove"],exit:["clearPrevSize"],on:{DRAG:{actions:["setSize"]},DRAG_END:{target:"open",actions:["invokeOnResizeEnd"]},"CONTROLLED.CLOSE":{target:"closed",actions:["resetRect"]},CLOSE:[{guard:"isOpenControlled",target:"closed",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","resetRect"]}],ESCAPE:{target:"open"}}}},implementations:{guards:{closeOnEsc:({prop:e})=>!!e("closeOnEscape"),isMaximized:({context:e})=>e.get("stage")==="maximized",isMinimized:({context:e})=>e.get("stage")==="minimized",isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPointerMove({scope:e,send:t,event:n,prop:i}){var o;let r=e.getDoc(),s=(o=i("getBoundaryEl"))==null?void 0:o(),a=wn(e,s,!1);return hn(r,{onPointerMove({point:l,event:c}){let{altKey:u,shiftKey:h}=c,m=He(l.x,a.x,a.x+a.width),d=He(l.y,a.y,a.y+a.height);t({type:"DRAG",position:{x:m,y:d},axis:n.axis,altKey:u,shiftKey:h})},onPointerUp(){t({type:"DRAG_END"})}})},trackBoundaryRect({context:e,scope:t,prop:n,computed:i}){var l;let r=t.getWin(),s=!0,a=()=>{var h;if(s){s=!1;return}let c=(h=n("getBoundaryEl"))==null?void 0:h(),u=wn(t,c,!1);if(!i("isMaximized")){let m=g(g({},e.get("position")),e.get("size"));u=Eu(m,u)}e.set("size",fn(u,["width","height"])),e.set("position",fn(u,["x","y"]))},o=(l=n("getBoundaryEl"))==null?void 0:l();return le(o)?gn.observe(o,a):ee(r,"resize",a)},trackPanelStack({context:e,scope:t}){let n=ns(kr,()=>{e.set("isTopmost",kr.isTopmost(t.id));let i=Ig(t);if(!i)return;let r=kr.indexOf(t.id);r!==-1&&i.style.setProperty("--z-index",`${r+1}`)});return()=>{kr.remove(t.id),n()}}},actions:{setAnchorPosition({context:e,prop:t,scope:n}){if(t("hasSpecifiedPosition"))return;let i=e.get("prevPosition")||e.get("prevSize");t("persistRect")&&i||H(()=>{var o,l;let r=bg(n),s=wn(n,(o=t("getBoundaryEl"))==null?void 0:o(),!1),a=(l=t("getAnchorPosition"))==null?void 0:l({triggerRect:r?DOMRect.fromRect(po(r)):null,boundaryRect:DOMRect.fromRect(s)});if(!a){let c=e.get("size");a={x:s.x+(s.width-c.width)/2,y:s.y+(s.height-c.height)/2}}a&&e.set("position",a)})},setPrevPosition({context:e,event:t}){e.set("prevPosition",g({},e.get("position"))),e.set("lastEventPosition",t.position)},clearPrevPosition({context:e,prop:t}){t("persistRect")||e.set("prevPosition",null),e.set("lastEventPosition",null)},setPosition({context:e,event:t,prop:n,scope:i}){var c;let r=go(t.position,e.get("lastEventPosition"));r.x=Math.round(r.x/n("gridSize"))*n("gridSize"),r.y=Math.round(r.y/n("gridSize"))*n("gridSize");let s=e.get("prevPosition");if(!s)return;let a=bu(s,r),o=(c=n("getBoundaryEl"))==null?void 0:c(),l=wn(i,o,n("allowOverflow"));a=hr(a,e.get("size"),l),e.set("position",a)},setPositionStyle({scope:e,context:t}){let n=Eg(e),i=t.get("position");n==null||n.style.setProperty("--x",`${i.x}px`),n==null||n.style.setProperty("--y",`${i.y}px`)},resetRect({context:e,prop:t}){e.set("stage","default"),t("persistRect")||(e.set("position",e.initial("position")),e.set("size",e.initial("size")))},setPrevSize({context:e,event:t}){e.set("prevSize",g({},e.get("size"))),e.set("prevPosition",g({},e.get("position"))),e.set("lastEventPosition",t.position)},clearPrevSize({context:e}){e.set("prevSize",null),e.set("prevPosition",null),e.set("lastEventPosition",null)},setSize({context:e,event:t,scope:n,prop:i}){var p;let r=e.get("prevSize"),s=e.get("prevPosition"),a=e.get("lastEventPosition");if(!r||!s||!a)return;let o=bn(g(g({},s),r)),l=go(t.position,a),c=Tu(o,l,t.axis,{scalingOriginMode:t.altKey?"center":"extent",lockAspectRatio:!!i("lockAspectRatio")||t.shiftKey}),u=fn(c,["width","height"]),h=fn(c,["x","y"]),m=(p=i("getBoundaryEl"))==null?void 0:p(),d=wn(n,m,!1);if(u=gr(u,i("minSize"),i("maxSize")),u=gr(u,i("minSize"),d),e.set("size",u),h){let v=hr(h,u,d);e.set("position",v)}},setSizeStyle({scope:e,context:t}){queueMicrotask(()=>{let n=Eg(e),i=t.get("size");n==null||n.style.setProperty("--width",`${i.width}px`),n==null||n.style.setProperty("--height",`${i.height}px`)})},setMaximized({context:e,prop:t,scope:n}){var s;e.set("stage","maximized"),e.set("prevSize",e.get("size")),e.set("prevPosition",e.get("position"));let i=(s=t("getBoundaryEl"))==null?void 0:s(),r=wn(n,i,!1);e.set("position",fn(r,["x","y"])),e.set("size",fn(r,["height","width"]))},setMinimized({context:e,scope:t}){e.set("stage","minimized"),e.set("prevSize",e.get("size")),e.set("prevPosition",e.get("position"));let n=SS(t);if(!n)return;let i=y(g({},e.get("size")),{height:n==null?void 0:n.offsetHeight});e.set("size",i)},setRestored({context:e,prop:t,scope:n}){var s;let i=wn(n,(s=t("getBoundaryEl"))==null?void 0:s(),!1);e.set("stage","default");let r=e.get("prevSize");if(r){let a=r;a=gr(a,t("minSize"),t("maxSize")),a=gr(a,t("minSize"),i),e.set("size",a),e.set("prevSize",null)}if(e.get("prevPosition")){let a=e.get("prevPosition");a=hr(a,e.get("size"),i),e.set("position",a),e.set("prevPosition",null)}},setPositionFromKeyboard({context:e,event:t,prop:n,scope:i}){var c;vs(t.step==null,"step is required");let r=e.get("position"),s=t.step,a=Ce(t.direction,{left:{x:r.x-s,y:r.y},right:{x:r.x+s,y:r.y},up:{x:r.x,y:r.y-s},down:{x:r.x,y:r.y+s}}),o=(c=n("getBoundaryEl"))==null?void 0:c(),l=wn(i,o,!1);a=hr(a,e.get("size"),l),e.set("position",a)},bringToFrontOfPanelStack({prop:e}){kr.bringToFront(e("id"))},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnDragEnd({context:e,prop:t}){var n;(n=t("onPositionChangeEnd"))==null||n({position:e.get("position")})},invokeOnResizeEnd({context:e,prop:t}){var n;(n=t("onSizeChangeEnd"))==null||n({size:e.get("size")})},focusTriggerEl({scope:e}){H(()=>{var t;(t=bg(e))==null||t.focus()})},focusContentEl({scope:e}){H(()=>{var t;(t=Ig(e))==null||t.focus()})},toggleVisibility({send:e,prop:t,event:n}){e({type:t("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}},AS=_()(["allowOverflow","closeOnEscape","defaultOpen","defaultPosition","defaultSize","dir","disabled","draggable","getAnchorPosition","getBoundaryEl","getRootNode","gridSize","id","ids","lockAspectRatio","maxSize","minSize","onOpenChange","onPositionChange","onPositionChangeEnd","onSizeChange","onSizeChangeEnd","onStageChange","open","persistRect","position","resizable","size","strategy","translations"]),Wx=B(AS),kS=_()(["axis"]),Kx=B(kS),NS=class extends K{initMachine(e){return new W(xS,e)}initApi(){return OS(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="floating-panel"][data-part="trigger"]');e&&this.spreadProps(e,this.api.getTriggerProps());let t=this.el.querySelector('[data-scope="floating-panel"][data-part="positioner"]');t&&this.spreadProps(t,this.api.getPositionerProps());let n=this.el.querySelector('[data-scope="floating-panel"][data-part="content"]');n&&this.spreadProps(n,this.api.getContentProps());let i=this.el.querySelector('[data-scope="floating-panel"][data-part="title"]');i&&this.spreadProps(i,this.api.getTitleProps());let r=this.el.querySelector('[data-scope="floating-panel"][data-part="header"]');r&&this.spreadProps(r,this.api.getHeaderProps());let s=this.el.querySelector('[data-scope="floating-panel"][data-part="body"]');s&&this.spreadProps(s,this.api.getBodyProps());let a=this.el.querySelector('[data-scope="floating-panel"][data-part="drag-trigger"]');a&&this.spreadProps(a,this.api.getDragTriggerProps()),["s","w","e","n","sw","nw","se","ne"].forEach(h=>{let m=this.el.querySelector(`[data-scope="floating-panel"][data-part="resize-trigger"][data-axis="${h}"]`);m&&this.spreadProps(m,this.api.getResizeTriggerProps({axis:h}))});let l=this.el.querySelector('[data-scope="floating-panel"][data-part="close-trigger"]');l&&this.spreadProps(l,this.api.getCloseTriggerProps());let c=this.el.querySelector('[data-scope="floating-panel"][data-part="control"]');c&&this.spreadProps(c,this.api.getControlProps()),["minimized","maximized","default"].forEach(h=>{let m=this.el.querySelector(`[data-scope="floating-panel"][data-part="stage-trigger"][data-stage="${h}"]`);m&&this.spreadProps(m,this.api.getStageTriggerProps({stage:h}))})}};RS={mounted(){let e=this.el,t=C(e,"open"),n=C(e,"defaultOpen"),i=C(e,"controlled"),r=ga(e.dataset.size),s=ga(e.dataset.defaultSize),a=Sg(e.dataset.position),o=Sg(e.dataset.defaultPosition),l=new NS(e,y(g({id:e.id},i?{open:t}:{defaultOpen:n}),{draggable:C(e,"draggable")!==!1,resizable:C(e,"resizable")!==!1,allowOverflow:C(e,"allowOverflow")!==!1,closeOnEscape:C(e,"closeOnEscape")!==!1,disabled:C(e,"disabled"),dir:Oe(e),size:r,defaultSize:s,position:a,defaultPosition:o,minSize:ga(e.dataset.minSize),maxSize:ga(e.dataset.maxSize),persistRect:C(e,"persistRect"),gridSize:Number(e.dataset.gridSize)||1,onOpenChange:c=>{let u=w(e,"onOpenChange");u&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(u,{open:c.open,id:e.id});let h=w(e,"onOpenChangeClient");h&&e.dispatchEvent(new CustomEvent(h,{bubbles:!0,detail:{value:c,id:e.id}}))},onPositionChange:c=>{let u=w(e,"onPositionChange");u&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(u,{position:c.position,id:e.id})},onSizeChange:c=>{let u=w(e,"onSizeChange");u&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(u,{size:c.size,id:e.id})},onStageChange:c=>{let u=w(e,"onStageChange");u&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(u,{stage:c.stage,id:e.id})}}));l.init(),this.floatingPanel=l,this.handlers=[]},updated(){var n;let e=C(this.el,"open"),t=C(this.el,"controlled");(n=this.floatingPanel)==null||n.updateProps(y(g({id:this.el.id},t?{open:e}:{}),{disabled:C(this.el,"disabled"),dir:Oe(this.el)}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.floatingPanel)==null||e.destroy()}}});var Dg={};he(Dg,{Listbox:()=>jS});function $S(e,t){let{context:n,prop:i,scope:r,computed:s,send:a,refs:o}=e,l=i("disabled"),c=i("collection"),u=Cn(c)?"grid":"list",h=n.get("focused"),m=o.get("focusVisible")&&h,d=o.get("inputState"),p=n.get("value"),v=n.get("selectedItems"),I=n.get("highlightedValue"),T=n.get("highlightedItem"),O=s("isTypingAhead"),b=s("isInteractive"),f=I?Ol(r,I):void 0;function S(P){let V=c.getItemDisabled(P.item),A=c.getItemValue(P.item);vn(A,()=>`[zag-js] No value found for item ${JSON.stringify(P.item)}`);let x=I===A;return{value:A,disabled:!!(l||V),focused:x&&h,focusVisible:x&&m,highlighted:x&&(d.focused?h:m),selected:n.get("value").includes(A)}}return{empty:p.length===0,highlightedItem:T,highlightedValue:I,clearHighlightedValue(){a({type:"HIGHLIGHTED_VALUE.SET",value:null})},selectedItems:v,hasSelectedItems:s("hasSelectedItems"),value:p,valueAsString:s("valueAsString"),collection:c,disabled:!!l,selectValue(P){a({type:"ITEM.SELECT",value:P})},setValue(P){a({type:"VALUE.SET",value:P})},selectAll(){if(!s("multiple"))throw new Error("[zag-js] Cannot select all items in a single-select listbox");a({type:"VALUE.SET",value:c.getValues()})},highlightValue(P){a({type:"HIGHLIGHTED_VALUE.SET",value:P})},clearValue(P){a(P?{type:"ITEM.CLEAR",value:P}:{type:"VALUE.CLEAR"})},getItemState:S,getRootProps(){return t.element(y(g({},Ht.root.attrs),{dir:i("dir"),id:MS(r),"data-orientation":i("orientation"),"data-disabled":E(l)}))},getInputProps(P={}){return t.input(y(g({},Ht.input.attrs),{dir:i("dir"),disabled:l,"data-disabled":E(l),autoComplete:"off",autoCorrect:"off","aria-haspopup":"listbox","aria-controls":Tl(r),"aria-autocomplete":"list","aria-activedescendant":f,spellCheck:!1,enterKeyHint:"go",onFocus(){queueMicrotask(()=>{a({type:"INPUT.FOCUS",autoHighlight:!!(P!=null&&P.autoHighlight)})})},onBlur(){a({type:"CONTENT.BLUR",src:"input"})},onInput(V){P!=null&&P.autoHighlight&&(V.currentTarget.value.trim()||queueMicrotask(()=>{a({type:"HIGHLIGHTED_VALUE.SET",value:null})}))},onKeyDown(V){if(V.defaultPrevented||Re(V))return;let A=Yt(V),x=()=>{var D;V.preventDefault();let k=r.getWin(),N=new k.KeyboardEvent(A.type,A);(D=pa(r))==null||D.dispatchEvent(N)};switch(A.key){case"ArrowLeft":case"ArrowRight":{if(!Cn(c)||V.ctrlKey)return;x()}case"Home":case"End":{if(I==null&&V.shiftKey)return;x()}case"ArrowDown":case"ArrowUp":{x();break}case"Enter":I!=null&&(V.preventDefault(),a({type:"ITEM.CLICK",value:I}));break}}}))},getLabelProps(){return t.element(y(g({dir:i("dir"),id:Ag(r)},Ht.label.attrs),{"data-disabled":E(l)}))},getValueTextProps(){return t.element(y(g({},Ht.valueText.attrs),{dir:i("dir"),"data-disabled":E(l)}))},getItemProps(P){let V=S(P);return t.element(y(g({id:Ol(r,V.value),role:"option"},Ht.item.attrs),{dir:i("dir"),"data-value":V.value,"aria-selected":V.selected,"data-selected":E(V.selected),"data-layout":u,"data-state":V.selected?"checked":"unchecked","data-orientation":i("orientation"),"data-highlighted":E(V.highlighted),"data-disabled":E(V.disabled),"aria-disabled":X(V.disabled),onPointerMove(A){P.highlightOnHover&&(V.disabled||A.pointerType!=="mouse"||V.highlighted||a({type:"ITEM.POINTER_MOVE",value:V.value}))},onMouseDown(A){var x;A.preventDefault(),(x=pa(r))==null||x.focus()},onClick(A){A.defaultPrevented||V.disabled||a({type:"ITEM.CLICK",value:V.value,shiftKey:A.shiftKey,anchorValue:I,metaKey:ls(A)})}}))},getItemTextProps(P){let V=S(P);return t.element(y(g({},Ht.itemText.attrs),{"data-state":V.selected?"checked":"unchecked","data-disabled":E(V.disabled),"data-highlighted":E(V.highlighted)}))},getItemIndicatorProps(P){let V=S(P);return t.element(y(g({},Ht.itemIndicator.attrs),{"aria-hidden":!0,"data-state":V.selected?"checked":"unchecked",hidden:!V.selected}))},getItemGroupLabelProps(P){let{htmlFor:V}=P;return t.element(y(g({},Ht.itemGroupLabel.attrs),{id:kg(r,V),dir:i("dir"),role:"presentation"}))},getItemGroupProps(P){let{id:V}=P;return t.element(y(g({},Ht.itemGroup.attrs),{"data-disabled":E(l),"data-orientation":i("orientation"),"data-empty":E(c.size===0),id:FS(r,V),"aria-labelledby":kg(r,V),role:"group",dir:i("dir")}))},getContentProps(){return t.element(y(g({dir:i("dir"),id:Tl(r),role:"listbox"},Ht.content.attrs),{"data-activedescendant":f,"aria-activedescendant":f,"data-orientation":i("orientation"),"aria-multiselectable":s("multiple")?!0:void 0,"aria-labelledby":Ag(r),tabIndex:0,"data-layout":u,"data-empty":E(c.size===0),style:{"--column-count":Cn(c)?c.columnCount:1},onFocus(){a({type:"CONTENT.FOCUS"})},onBlur(){a({type:"CONTENT.BLUR"})},onKeyDown(P){if(!b||!ce(P.currentTarget,j(P)))return;let V=P.shiftKey,A={ArrowUp(N){let D=null;Cn(c)&&I?D=c.getPreviousRowValue(I):I&&(D=c.getPreviousValue(I)),!D&&(i("loopFocus")||!I)&&(D=c.lastValue),D&&(N.preventDefault(),a({type:"NAVIGATE",value:D,shiftKey:V,anchorValue:I}))},ArrowDown(N){let D=null;Cn(c)&&I?D=c.getNextRowValue(I):I&&(D=c.getNextValue(I)),!D&&(i("loopFocus")||!I)&&(D=c.firstValue),D&&(N.preventDefault(),a({type:"NAVIGATE",value:D,shiftKey:V,anchorValue:I}))},ArrowLeft(){if(!Cn(c)&&i("orientation")==="vertical")return;let N=I?c.getPreviousValue(I):null;!N&&i("loopFocus")&&(N=c.lastValue),N&&(P.preventDefault(),a({type:"NAVIGATE",value:N,shiftKey:V,anchorValue:I}))},ArrowRight(){if(!Cn(c)&&i("orientation")==="vertical")return;let N=I?c.getNextValue(I):null;!N&&i("loopFocus")&&(N=c.firstValue),N&&(P.preventDefault(),a({type:"NAVIGATE",value:N,shiftKey:V,anchorValue:I}))},Home(N){N.preventDefault();let D=c.firstValue;a({type:"NAVIGATE",value:D,shiftKey:V,anchorValue:I})},End(N){N.preventDefault();let D=c.lastValue;a({type:"NAVIGATE",value:D,shiftKey:V,anchorValue:I})},Enter(){a({type:"ITEM.CLICK",value:I})},a(N){ls(N)&&s("multiple")&&!i("disallowSelectAll")&&(N.preventDefault(),a({type:"VALUE.SET",value:c.getValues()}))},Space(N){var D;O&&i("typeahead")?a({type:"CONTENT.TYPEAHEAD",key:N.key}):(D=A.Enter)==null||D.call(A,N)},Escape(N){i("deselectable")&&p.length>0&&(N.preventDefault(),N.stopPropagation(),a({type:"VALUE.CLEAR"}))}},x=A[ge(P)];if(x){x(P);return}let k=j(P);Ot(k)||Ue.isValidEvent(P)&&i("typeahead")&&(a({type:"CONTENT.TYPEAHEAD",key:P.key}),P.preventDefault())}}))}}}function Nr(e,t,n){let i=US(t,e);for(let r of i)n==null||n({value:r})}function Rg(e,t){return Bi(t?{items:e,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled,groupBy:n=>{var i;return(i=n.group)!=null?i:""}}:{items:e,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled})}var DS,Ht,Bi,LS,MS,Tl,Ag,Ol,FS,kg,pa,Ng,HS,BS,_S,GS,US,qS,Jx,WS,Qx,KS,eA,zS,tA,YS,jS,Lg=re(()=>{"use strict";pr();yr();se();DS=U("listbox").parts("label","input","item","itemText","itemIndicator","itemGroup","itemGroupLabel","content","root","valueText"),Ht=DS.build(),Bi=e=>new Nt(e);Bi.empty=()=>new Nt({items:[]});LS=e=>new Vo(e);LS.empty=()=>new Vo({items:[],columnCount:0});MS=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`select:${e.id}`},Tl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`select:${e.id}:content`},Ag=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`select:${e.id}:label`},Ol=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`select:${e.id}:option:${t}`},FS=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemGroup)==null?void 0:i.call(n,t))!=null?r:`select:${e.id}:optgroup:${t}`},kg=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemGroupLabel)==null?void 0:i.call(n,t))!=null?r:`select:${e.id}:optgroup-label:${t}`},pa=e=>e.getById(Tl(e)),Ng=(e,t)=>e.getById(Ol(e,t));({guards:HS,createMachine:BS}=ut()),{or:_S}=HS,GS=BS({props({props:e}){return g({loopFocus:!1,composite:!0,defaultValue:[],multiple:!1,typeahead:!0,collection:Bi.empty(),orientation:"vertical",selectionMode:"single"},e)},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:fe,onChange(n){var r;let i=e("collection").findMany(n);return(r=e("onValueChange"))==null?void 0:r({value:n,items:i})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),sync:!0,onChange(n){var i;(i=e("onHighlightChange"))==null||i({highlightedValue:n,highlightedItem:e("collection").find(n),highlightedIndex:e("collection").indexOf(n)})}})),highlightedItem:t(()=>({defaultValue:null})),selectedItems:t(()=>{var r,s;let n=(s=(r=e("value"))!=null?r:e("defaultValue"))!=null?s:[];return{defaultValue:e("collection").findMany(n)}}),focused:t(()=>({sync:!0,defaultValue:!1}))}},refs(){return{typeahead:g({},Ue.defaultOptions),focusVisible:!1,inputState:{autoHighlight:!1,focused:!1}}},computed:{hasSelectedItems:({context:e})=>e.get("value").length>0,isTypingAhead:({refs:e})=>e.get("typeahead").keysSoFar!=="",isInteractive:({prop:e})=>!e("disabled"),selection:({context:e,prop:t})=>{let n=new ld(e.get("value"));return n.selectionMode=t("selectionMode"),n.deselectable=!!t("deselectable"),n},multiple:({prop:e})=>e("selectionMode")==="multiple"||e("selectionMode")==="extended",valueAsString:({context:e,prop:t})=>t("collection").stringifyItems(e.get("selectedItems"))},initialState(){return"idle"},watch({context:e,prop:t,track:n,action:i}){n([()=>e.get("value").toString()],()=>{i(["syncSelectedItems"])}),n([()=>e.get("highlightedValue")],()=>{i(["syncHighlightedItem"])}),n([()=>t("collection").toString()],()=>{i(["syncHighlightedValue"])})},effects:["trackFocusVisible"],on:{"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedItem"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setSelectedItems"]},"VALUE.CLEAR":{actions:["clearSelectedItems"]}},states:{idle:{effects:["scrollToHighlightedItem"],on:{"INPUT.FOCUS":{actions:["setFocused","setInputState"]},"CONTENT.FOCUS":[{guard:_S("hasSelectedValue","hasHighlightedValue"),actions:["setFocused"]},{actions:["setFocused","setDefaultHighlightedValue"]}],"CONTENT.BLUR":{actions:["clearFocused","clearInputState"]},"ITEM.CLICK":{actions:["setHighlightedItem","selectHighlightedItem"]},"CONTENT.TYPEAHEAD":{actions:["setFocused","highlightMatchingItem"]},"ITEM.POINTER_MOVE":{actions:["highlightItem"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedItem"]},NAVIGATE:{actions:["setFocused","setHighlightedItem","selectWithKeyboard"]}}}},implementations:{guards:{hasSelectedValue:({context:e})=>e.get("value").length>0,hasHighlightedValue:({context:e})=>e.get("highlightedValue")!=null},effects:{trackFocusVisible:({scope:e,refs:t})=>{var n;return Pn({root:(n=e.getRootNode)==null?void 0:n.call(e),onChange(i){t.set("focusVisible",i.isFocusVisible)}})},scrollToHighlightedItem({context:e,prop:t,scope:n}){let i=s=>{let a=e.get("highlightedValue");if(a==null||ju()!=="keyboard")return;let l=pa(n),c=t("scrollToIndexFn");if(c){let h=t("collection").indexOf(a);c==null||c({index:h,immediate:s,getElement(){return Ng(n,a)}});return}let u=Ng(n,a);Xt(u,{rootEl:l,block:"nearest"})};return H(()=>i(!0)),ot(()=>pa(n),{defer:!0,attributes:["data-activedescendant"],callback(){i(!1)}})}},actions:{selectHighlightedItem({context:e,prop:t,event:n,computed:i}){var o;let r=(o=n.value)!=null?o:e.get("highlightedValue"),s=t("collection");if(r==null||!s.has(r))return;let a=i("selection");if(n.shiftKey&&i("multiple")&&n.anchorValue){let l=a.extendSelection(s,n.anchorValue,r);Nr(a,l,t("onSelect")),e.set("value",Array.from(l))}else{let l=a.select(s,r,n.metaKey);Nr(a,l,t("onSelect")),e.set("value",Array.from(l))}},selectWithKeyboard({context:e,prop:t,event:n,computed:i}){let r=i("selection"),s=t("collection");if(n.shiftKey&&i("multiple")&&n.anchorValue){let a=r.extendSelection(s,n.anchorValue,n.value);Nr(r,a,t("onSelect")),e.set("value",Array.from(a));return}if(t("selectOnHighlight")){let a=r.replaceSelection(s,n.value);Nr(r,a,t("onSelect")),e.set("value",Array.from(a))}},highlightItem({context:e,event:t}){e.set("highlightedValue",t.value)},highlightMatchingItem({context:e,prop:t,event:n,refs:i}){let r=t("collection").search(n.key,{state:i.get("typeahead"),currentValue:e.get("highlightedValue")});r!=null&&e.set("highlightedValue",r)},setHighlightedItem({context:e,event:t}){e.set("highlightedValue",t.value)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},selectItem({context:e,prop:t,event:n,computed:i}){let r=t("collection"),s=i("selection"),a=s.select(r,n.value);Nr(s,a,t("onSelect")),e.set("value",Array.from(a))},clearItem({context:e,event:t,computed:n}){let r=n("selection").deselect(t.value);e.set("value",Array.from(r))},setSelectedItems({context:e,event:t}){e.set("value",t.value)},clearSelectedItems({context:e}){e.set("value",[])},syncSelectedItems({context:e,prop:t}){let n=t("collection"),i=e.get("selectedItems"),s=e.get("value").map(a=>i.find(l=>n.getItemValue(l)===a)||n.find(a));e.set("selectedItems",s)},syncHighlightedItem({context:e,prop:t}){let n=t("collection"),i=e.get("highlightedValue"),r=i?n.find(i):null;e.set("highlightedItem",r)},syncHighlightedValue({context:e,prop:t,refs:n}){let i=t("collection"),r=e.get("highlightedValue"),{autoHighlight:s}=n.get("inputState");if(s){queueMicrotask(()=>{var a;e.set("highlightedValue",(a=t("collection").firstValue)!=null?a:null)});return}r!=null&&!i.has(r)&&queueMicrotask(()=>{e.set("highlightedValue",null)})},setFocused({context:e}){e.set("focused",!0)},setDefaultHighlightedValue({context:e,prop:t}){let i=t("collection").firstValue;i!=null&&e.set("highlightedValue",i)},clearFocused({context:e}){e.set("focused",!1)},setInputState({refs:e,event:t}){e.set("inputState",{autoHighlight:!!t.autoHighlight,focused:!0})},clearInputState({refs:e}){e.set("inputState",{autoHighlight:!1,focused:!1})}}}}),US=(e,t)=>{let n=new Set(e);for(let i of t)n.delete(i);return n};qS=_()(["collection","defaultHighlightedValue","defaultValue","dir","disabled","deselectable","disallowSelectAll","getRootNode","highlightedValue","id","ids","loopFocus","onHighlightChange","onSelect","onValueChange","orientation","scrollToIndexFn","selectionMode","selectOnHighlight","typeahead","value"]),Jx=B(qS),WS=_()(["item","highlightOnHover"]),Qx=B(WS),KS=_()(["id"]),eA=B(KS),zS=_()(["htmlFor"]),tA=B(zS),YS=class extends K{constructor(t,n){var r;super(t,n);Y(this,"_options",[]);Y(this,"hasGroups",!1);Y(this,"init",()=>{this.machine.start(),this.render(),this.machine.subscribe(()=>{this.api=this.initApi(),this.render()})});let i=n.collection;this._options=(r=i==null?void 0:i.items)!=null?r:[]}get options(){return Array.isArray(this._options)?this._options:[]}setOptions(t){this._options=Array.isArray(t)?t:[]}getCollection(){let t=this.options;return this.hasGroups?Bi({items:t,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled,groupBy:n=>{var i;return(i=n.group)!=null?i:""}}):Bi({items:t,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled})}initMachine(t){let n=this.getCollection.bind(this),i=t.collection;return new W(GS,y(g({},t),{get collection(){return i!=null?i:n()}}))}initApi(){return $S(this.machine.service,q)}applyItemProps(){let t=this.el.querySelector('[data-scope="listbox"][data-part="content"]');t&&(t.querySelectorAll('[data-scope="listbox"][data-part="item-group"]').forEach(n=>{var s;let i=(s=n.dataset.id)!=null?s:"";this.spreadProps(n,this.api.getItemGroupProps({id:i}));let r=n.querySelector('[data-scope="listbox"][data-part="item-group-label"]');r&&this.spreadProps(r,this.api.getItemGroupLabelProps({htmlFor:i}))}),t.querySelectorAll('[data-scope="listbox"][data-part="item"]').forEach(n=>{var o;let i=(o=n.dataset.value)!=null?o:"",r=this.options.find(l=>{var c,u;return String((u=(c=l.id)!=null?c:l.value)!=null?u:"")===String(i)});if(!r)return;this.spreadProps(n,this.api.getItemProps({item:r}));let s=n.querySelector('[data-scope="listbox"][data-part="item-text"]');s&&this.spreadProps(s,this.api.getItemTextProps({item:r}));let a=n.querySelector('[data-scope="listbox"][data-part="item-indicator"]');a&&this.spreadProps(a,this.api.getItemIndicatorProps({item:r}))}))}render(){var a;let t=(a=this.el.querySelector('[data-scope="listbox"][data-part="root"]'))!=null?a:this.el;this.spreadProps(t,this.api.getRootProps());let n=this.el.querySelector('[data-scope="listbox"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps());let i=this.el.querySelector('[data-scope="listbox"][data-part="value-text"]');i&&this.spreadProps(i,this.api.getValueTextProps());let r=this.el.querySelector('[data-scope="listbox"][data-part="input"]');r&&this.spreadProps(r,this.api.getInputProps());let s=this.el.querySelector('[data-scope="listbox"][data-part="content"]');s&&(this.spreadProps(s,this.api.getContentProps()),this.applyItemProps())}};jS={mounted(){var o;let e=this.el,t=JSON.parse((o=e.dataset.collection)!=null?o:"[]"),n=t.some(l=>l.group!==void 0),i=Z(e,"value"),r=Z(e,"defaultValue"),s=C(e,"controlled"),a=new YS(e,y(g({id:e.id,collection:Rg(t,n)},s&&i?{value:i}:{defaultValue:r!=null?r:[]}),{disabled:C(e,"disabled"),dir:w(e,"dir",["ltr","rtl"]),orientation:w(e,"orientation",["horizontal","vertical"]),loopFocus:C(e,"loopFocus"),selectionMode:w(e,"selectionMode",["single","multiple","extended"]),selectOnHighlight:C(e,"selectOnHighlight"),deselectable:C(e,"deselectable"),typeahead:C(e,"typeahead"),onValueChange:l=>{let c=w(e,"onValueChange");c&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(c,{value:l.value,items:l.items,id:e.id});let u=w(e,"onValueChangeClient");u&&e.dispatchEvent(new CustomEvent(u,{bubbles:!0,detail:{value:l,id:e.id}}))}}));a.hasGroups=n,a.setOptions(t),a.init(),this.listbox=a,this.handlers=[]},updated(){var r;let e=JSON.parse((r=this.el.dataset.collection)!=null?r:"[]"),t=e.some(s=>s.group!==void 0),n=Z(this.el,"value"),i=C(this.el,"controlled");this.listbox&&(this.listbox.hasGroups=t,this.listbox.setOptions(e),this.listbox.updateProps(y(g({collection:Rg(e,t),id:this.el.id},i&&n?{value:n}:{}),{disabled:C(this.el,"disabled"),dir:w(this.el,"dir",["ltr","rtl"]),orientation:w(this.el,"orientation",["horizontal","vertical"])})))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.listbox)==null||e.destroy()}}});var Ug={};he(Ug,{Menu:()=>mT});function sT(e,t){if(!e)return;let n=ue(e),i=new n.CustomEvent(Vl,{detail:{value:t}});e.dispatchEvent(i)}function aT(e,t){let{context:n,send:i,state:r,computed:s,prop:a,scope:o}=e,l=r.hasTag("open"),c=n.get("isSubmenu"),u=s("isTypingAhead"),h=a("composite"),m=n.get("currentPlacement"),d=n.get("anchorPoint"),p=n.get("highlightedValue"),v=On(y(g({},a("positioning")),{placement:d?"bottom":m}));function I(f){return{id:Rr(o,f.value),disabled:!!f.disabled,highlighted:p===f.value}}function T(f){var P;let S=(P=f.valueText)!=null?P:f.value;return y(g({},f),{id:f.value,valueText:S})}function O(f){let S=I(T(f));return y(g({},S),{checked:!!f.checked})}function b(f){let{closeOnSelect:S,valueText:P,value:V}=f,A=I(f),x=Rr(o,V);return t.element(y(g({},Be.item.attrs),{id:x,role:"menuitem","aria-disabled":X(A.disabled),"data-disabled":E(A.disabled),"data-ownedby":Gi(o),"data-highlighted":E(A.highlighted),"data-value":V,"data-valuetext":P,onDragStart(k){k.currentTarget.matches("a[href]")&&k.preventDefault()},onPointerMove(k){if(A.disabled||k.pointerType!=="mouse")return;let N=k.currentTarget;if(A.highlighted)return;let D=je(k);i({type:"ITEM_POINTERMOVE",id:x,target:N,closeOnSelect:S,point:D})},onPointerLeave(k){var $;if(A.disabled||k.pointerType!=="mouse"||!(($=e.event.previous())==null?void 0:$.type.includes("POINTER")))return;let D=k.currentTarget;i({type:"ITEM_POINTERLEAVE",id:x,target:D,closeOnSelect:S})},onPointerDown(k){if(A.disabled)return;let N=k.currentTarget;i({type:"ITEM_POINTERDOWN",target:N,id:x,closeOnSelect:S})},onClick(k){if(rr(k)||Fn(k)||A.disabled)return;let N=k.currentTarget;i({type:"ITEM_CLICK",target:N,id:x,closeOnSelect:S})}}))}return{highlightedValue:p,open:l,setOpen(f){r.hasTag("open")!==f&&i({type:f?"OPEN":"CLOSE"})},setHighlightedValue(f){i({type:"HIGHLIGHTED.SET",value:f})},setParent(f){i({type:"PARENT.SET",value:f,id:f.prop("id")})},setChild(f){i({type:"CHILD.SET",value:f,id:f.prop("id")})},reposition(f={}){i({type:"POSITIONING.SET",options:f})},addItemListener(f){let S=o.getById(f.id);if(!S)return;let P=()=>{var V;return(V=f.onSelect)==null?void 0:V.call(f)};return S.addEventListener(Vl,P),()=>S.removeEventListener(Vl,P)},getContextTriggerProps(){return t.element(y(g({},Be.contextTrigger.attrs),{dir:a("dir"),id:_g(o),"data-state":l?"open":"closed",onPointerDown(f){if(f.pointerType==="mouse")return;let S=je(f);i({type:"CONTEXT_MENU_START",point:S})},onPointerCancel(f){f.pointerType!=="mouse"&&i({type:"CONTEXT_MENU_CANCEL"})},onPointerMove(f){f.pointerType!=="mouse"&&i({type:"CONTEXT_MENU_CANCEL"})},onPointerUp(f){f.pointerType!=="mouse"&&i({type:"CONTEXT_MENU_CANCEL"})},onContextMenu(f){let S=je(f);i({type:"CONTEXT_MENU",point:S}),f.preventDefault()},style:{WebkitTouchCallout:"none",WebkitUserSelect:"none",userSelect:"none"}}))},getTriggerItemProps(f){let S=f.getTriggerProps();return au(b({value:S.id}),S)},getTriggerProps(){return t.button(y(g({},c?Be.triggerItem.attrs:Be.trigger.attrs),{"data-placement":n.get("currentPlacement"),type:"button",dir:a("dir"),id:va(o),"data-uid":a("id"),"aria-haspopup":h?"menu":"dialog","aria-controls":Gi(o),"data-controls":Gi(o),"aria-expanded":l||void 0,"data-state":l?"open":"closed",onPointerMove(f){if(f.pointerType!=="mouse"||ma(f.currentTarget)||!c)return;let P=je(f);i({type:"TRIGGER_POINTERMOVE",target:f.currentTarget,point:P})},onPointerLeave(f){if(ma(f.currentTarget)||f.pointerType!=="mouse"||!c)return;let S=je(f);i({type:"TRIGGER_POINTERLEAVE",target:f.currentTarget,point:S})},onPointerDown(f){ma(f.currentTarget)||hi(f)||f.preventDefault()},onClick(f){f.defaultPrevented||ma(f.currentTarget)||i({type:"TRIGGER_CLICK",target:f.currentTarget})},onBlur(){i({type:"TRIGGER_BLUR"})},onFocus(){i({type:"TRIGGER_FOCUS"})},onKeyDown(f){if(f.defaultPrevented)return;let S={ArrowDown(){i({type:"ARROW_DOWN"})},ArrowUp(){i({type:"ARROW_UP"})},Enter(){i({type:"ARROW_DOWN",src:"enter"})},Space(){i({type:"ARROW_DOWN",src:"space"})}},P=ge(f,{orientation:"vertical",dir:a("dir")}),V=S[P];V&&(f.preventDefault(),V(f))}}))},getIndicatorProps(){return t.element(y(g({},Be.indicator.attrs),{dir:a("dir"),"data-state":l?"open":"closed"}))},getPositionerProps(){return t.element(y(g({},Be.positioner.attrs),{dir:a("dir"),id:Gg(o),style:v.floating}))},getArrowProps(){return t.element(y(g({id:ZS(o)},Be.arrow.attrs),{dir:a("dir"),style:v.arrow}))},getArrowTipProps(){return t.element(y(g({},Be.arrowTip.attrs),{dir:a("dir"),style:v.arrowTip}))},getContentProps(){return t.element(y(g({},Be.content.attrs),{id:Gi(o),"aria-label":a("aria-label"),hidden:!l,"data-state":l?"open":"closed",role:h?"menu":"dialog",tabIndex:0,dir:a("dir"),"aria-activedescendant":s("highlightedId")||void 0,"aria-labelledby":va(o),"data-placement":m,onPointerEnter(f){f.pointerType==="mouse"&&i({type:"MENU_POINTERENTER"})},onKeyDown(f){if(f.defaultPrevented||!ce(f.currentTarget,j(f)))return;let S=j(f);if(!((S==null?void 0:S.closest("[role=menu]"))===f.currentTarget||S===f.currentTarget))return;if(f.key==="Tab"&&!ds(f)){f.preventDefault();return}let V={ArrowDown(){i({type:"ARROW_DOWN"})},ArrowUp(){i({type:"ARROW_UP"})},ArrowLeft(){i({type:"ARROW_LEFT"})},ArrowRight(){i({type:"ARROW_RIGHT"})},Enter(){i({type:"ENTER"})},Space(k){var N;u?i({type:"TYPEAHEAD",key:k.key}):(N=V.Enter)==null||N.call(V,k)},Home(){i({type:"HOME"})},End(){i({type:"END"})}},A=ge(f,{dir:a("dir")}),x=V[A];if(x){x(f),f.stopPropagation(),f.preventDefault();return}a("typeahead")&&wc(f)&&(xe(f)||Ot(S)||(i({type:"TYPEAHEAD",key:f.key}),f.preventDefault()))}}))},getSeparatorProps(){return t.element(y(g({},Be.separator.attrs),{role:"separator",dir:a("dir"),"aria-orientation":"horizontal"}))},getItemState:I,getItemProps:b,getOptionItemState:O,getOptionItemProps(f){let{type:S,disabled:P,closeOnSelect:V}=f,A=T(f),x=O(f);return g(g({},b(A)),t.element(y(g({"data-type":S},Be.item.attrs),{dir:a("dir"),"data-value":A.value,role:`menuitem${S}`,"aria-checked":!!x.checked,"data-state":x.checked?"checked":"unchecked",onClick(k){if(P||rr(k)||Fn(k))return;let N=k.currentTarget;i({type:"ITEM_CLICK",target:N,option:A,closeOnSelect:V})}})))},getItemIndicatorProps(f){let S=O(lo(f)),P=S.checked?"checked":"unchecked";return t.element(y(g({},Be.itemIndicator.attrs),{dir:a("dir"),"data-disabled":E(S.disabled),"data-highlighted":E(S.highlighted),"data-state":$e(f,"checked")?P:void 0,hidden:$e(f,"checked")?!S.checked:void 0}))},getItemTextProps(f){let S=O(lo(f)),P=S.checked?"checked":"unchecked";return t.element(y(g({},Be.itemText.attrs),{dir:a("dir"),"data-disabled":E(S.disabled),"data-highlighted":E(S.highlighted),"data-state":$e(f,"checked")?P:void 0}))},getItemGroupLabelProps(f){return t.element(y(g({},Be.itemGroupLabel.attrs),{id:Mg(o,f.htmlFor),dir:a("dir")}))},getItemGroupProps(f){return t.element(y(g({id:JS(o,f.id)},Be.itemGroup.attrs),{dir:a("dir"),"aria-labelledby":Mg(o,f.id),role:"group"}))}}}function Hg(e){let t=e.parent;for(;t&&t.context.get("isSubmenu");)t=t.refs.get("parent");t==null||t.send({type:"CLOSE"})}function cT(e,t){return e?fo(e,t):!1}function uT(e,t,n){let i=Object.keys(e).length>0;if(!t)return null;if(!i)return Rr(n,t);for(let r in e){let s=e[r],a=va(s.scope);if(a===t)return a}return Rr(n,t)}var XS,Be,va,_g,Gi,ZS,Gg,JS,Rr,ei,Mg,cn,Fg,fa,QS,wl,Dr,eT,tT,xl,nT,iT,rT,ma,$g,Vl,pt,_i,oT,lT,dT,cA,hT,uA,gT,dA,pT,hA,fT,gA,Bg,mT,qg=re(()=>{"use strict";Cs();Pr();Wn();tn();se();XS=U("menu").parts("arrow","arrowTip","content","contextTrigger","indicator","item","itemGroup","itemGroupLabel","itemIndicator","itemText","positioner","separator","trigger","triggerItem"),Be=XS.build(),va=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`menu:${e.id}:trigger`},_g=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.contextTrigger)!=null?n:`menu:${e.id}:ctx-trigger`},Gi=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`menu:${e.id}:content`},ZS=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`menu:${e.id}:arrow`},Gg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`menu:${e.id}:popper`},JS=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.group)==null?void 0:i.call(n,t))!=null?r:`menu:${e.id}:group:${t}`},Rr=(e,t)=>`${e.id}/${t}`,ei=e=>{var t;return(t=e==null?void 0:e.dataset.value)!=null?t:null},Mg=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.groupLabel)==null?void 0:i.call(n,t))!=null?r:`menu:${e.id}:group-label:${t}`},cn=e=>e.getById(Gi(e)),Fg=e=>e.getById(Gg(e)),fa=e=>e.getById(va(e)),QS=(e,t)=>t?e.getById(Rr(e,t)):null,wl=e=>e.getById(_g(e)),Dr=e=>{let n=`[role^="menuitem"][data-ownedby=${CSS.escape(Gi(e))}]:not([data-disabled])`;return Fe(cn(e),n)},eT=e=>lt(Dr(e)),tT=e=>mt(Dr(e)),xl=(e,t)=>t?e.id===t||e.dataset.value===t:!1,nT=(e,t)=>{var r;let n=Dr(e),i=n.findIndex(s=>xl(s,t.value));return _c(n,i,{loop:(r=t.loop)!=null?r:t.loopFocus})},iT=(e,t)=>{var r;let n=Dr(e),i=n.findIndex(s=>xl(s,t.value));return Gc(n,i,{loop:(r=t.loop)!=null?r:t.loopFocus})},rT=(e,t)=>{var r;let n=Dr(e),i=n.find(s=>xl(s,t.value));return Ue(n,{state:t.typeaheadState,key:t.key,activeId:(r=i==null?void 0:i.id)!=null?r:null})},ma=e=>le(e)&&(e.dataset.disabled===""||e.hasAttribute("disabled")),$g=e=>{var t;return!!((t=e==null?void 0:e.getAttribute("role"))!=null&&t.startsWith("menuitem"))&&!!(e!=null&&e.hasAttribute("data-controls"))},Vl="menu:select";({not:pt,and:_i,or:oT}=Ee()),lT={props({props:e}){return y(g({closeOnSelect:!0,typeahead:!0,composite:!0,loopFocus:!1,navigate(t){mi(t.node)}},e),{positioning:g({placement:"bottom-start",gutter:8},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"idle"},context({bindable:e,prop:t}){return{suspendPointer:e(()=>({defaultValue:!1})),highlightedValue:e(()=>({defaultValue:t("defaultHighlightedValue")||null,value:t("highlightedValue"),onChange(n){var i;(i=t("onHighlightChange"))==null||i({highlightedValue:n})}})),lastHighlightedValue:e(()=>({defaultValue:null})),currentPlacement:e(()=>({defaultValue:void 0})),intentPolygon:e(()=>({defaultValue:null})),anchorPoint:e(()=>({defaultValue:null,hash(n){return`x: ${n==null?void 0:n.x}, y: ${n==null?void 0:n.y}`}})),isSubmenu:e(()=>({defaultValue:!1}))}},refs(){return{parent:null,children:{},typeaheadState:g({},Ue.defaultOptions),positioningOverride:{}}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isTypingAhead:({refs:e})=>e.get("typeaheadState").keysSoFar!=="",highlightedId:({context:e,scope:t,refs:n})=>uT(n.get("children"),e.get("highlightedValue"),t)},watch({track:e,action:t,context:n,prop:i}){e([()=>n.get("isSubmenu")],()=>{t(["setSubmenuPlacement"])}),e([()=>n.hash("anchorPoint")],()=>{n.get("anchorPoint")&&t(["reposition"])}),e([()=>i("open")],()=>{t(["toggleVisibility"])})},on:{"PARENT.SET":{actions:["setParentMenu"]},"CHILD.SET":{actions:["setChildMenu"]},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],OPEN_AUTOFOCUS:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["highlightFirstItem","invokeOnOpen"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"HIGHLIGHTED.RESTORE":{actions:["restoreHighlightedItem"]},"HIGHLIGHTED.SET":{actions:["setHighlightedItem"]}},states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed"},CONTEXT_MENU_START:{target:"opening:contextmenu",actions:["setAnchorPoint"]},CONTEXT_MENU:[{guard:"isOpenControlled",actions:["setAnchorPoint","invokeOnOpen"]},{target:"open",actions:["setAnchorPoint","invokeOnOpen"]}],TRIGGER_CLICK:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TRIGGER_FOCUS:{guard:pt("isSubmenu"),target:"closed"},TRIGGER_POINTERMOVE:{guard:"isSubmenu",target:"opening"}}},"opening:contextmenu":{tags:["closed"],effects:["waitForLongPress"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed"},CONTEXT_MENU_CANCEL:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"LONG_PRESS.OPEN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}},opening:{tags:["closed"],effects:["waitForOpenDelay"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed"},BLUR:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TRIGGER_POINTERLEAVE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"DELAY.OPEN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}},closing:{tags:["open"],effects:["trackPointerMove","trackInteractOutside","waitForCloseDelay"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem"]},MENU_POINTERENTER:{target:"open",actions:["clearIntentPolygon"]},POINTER_MOVED_AWAY_FROM_SUBMENU:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem"]}],"DELAY.CLOSE":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem","invokeOnClose"]}]}},closed:{tags:["closed"],entry:["clearHighlightedItem","focusTrigger","resumePointer","clearAnchorPoint"],on:{"CONTROLLED.OPEN":[{guard:oT("isOpenAutoFocusEvent","isArrowDownEvent"),target:"open",actions:["highlightFirstItem"]},{guard:"isArrowUpEvent",target:"open",actions:["highlightLastItem"]},{target:"open"}],CONTEXT_MENU_START:{target:"opening:contextmenu",actions:["setAnchorPoint"]},CONTEXT_MENU:[{guard:"isOpenControlled",actions:["setAnchorPoint","invokeOnOpen"]},{target:"open",actions:["setAnchorPoint","invokeOnOpen"]}],TRIGGER_CLICK:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TRIGGER_POINTERMOVE:{guard:"isTriggerItem",target:"opening"},TRIGGER_BLUR:{target:"idle"},ARROW_DOWN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["highlightFirstItem","invokeOnOpen"]}],ARROW_UP:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["highlightLastItem","invokeOnOpen"]}]}},open:{tags:["open"],effects:["trackInteractOutside","trackPositioning","scrollToHighlightedItem"],entry:["focusMenu","resumePointer"],on:{"CONTROLLED.CLOSE":[{target:"closed",guard:"isArrowLeftEvent",actions:["focusParentMenu"]},{target:"closed"}],TRIGGER_CLICK:[{guard:_i(pt("isTriggerItem"),"isOpenControlled"),actions:["invokeOnClose"]},{guard:pt("isTriggerItem"),target:"closed",actions:["invokeOnClose"]}],CONTEXT_MENU:{actions:["setAnchorPoint","focusMenu"]},ARROW_UP:{actions:["highlightPrevItem","focusMenu"]},ARROW_DOWN:{actions:["highlightNextItem","focusMenu"]},ARROW_LEFT:[{guard:_i("isSubmenu","isOpenControlled"),actions:["invokeOnClose"]},{guard:"isSubmenu",target:"closed",actions:["focusParentMenu","invokeOnClose"]}],HOME:{actions:["highlightFirstItem","focusMenu"]},END:{actions:["highlightLastItem","focusMenu"]},ARROW_RIGHT:{guard:"isTriggerItemHighlighted",actions:["openSubmenu"]},ENTER:[{guard:"isTriggerItemHighlighted",actions:["openSubmenu"]},{actions:["clickHighlightedItem"]}],ITEM_POINTERMOVE:[{guard:pt("isPointerSuspended"),actions:["setHighlightedItem","focusMenu","closeSiblingMenus"]},{actions:["setLastHighlightedItem","closeSiblingMenus"]}],ITEM_POINTERLEAVE:{guard:_i(pt("isPointerSuspended"),pt("isTriggerItem")),actions:["clearHighlightedItem"]},ITEM_CLICK:[{guard:_i(pt("isTriggerItemHighlighted"),pt("isHighlightedItemEditable"),"closeOnSelect","isOpenControlled"),actions:["invokeOnSelect","setOptionState","closeRootMenu","invokeOnClose"]},{guard:_i(pt("isTriggerItemHighlighted"),pt("isHighlightedItemEditable"),"closeOnSelect"),target:"closed",actions:["invokeOnSelect","setOptionState","closeRootMenu","invokeOnClose"]},{guard:_i(pt("isTriggerItemHighlighted"),pt("isHighlightedItemEditable")),actions:["invokeOnSelect","setOptionState"]},{actions:["setHighlightedItem"]}],TRIGGER_POINTERMOVE:{guard:"isTriggerItem",actions:["setIntentPolygon"]},TRIGGER_POINTERLEAVE:{target:"closing",actions:["setIntentPolygon"]},ITEM_POINTERDOWN:{actions:["setHighlightedItem"]},TYPEAHEAD:{actions:["highlightMatchedItem"]},FOCUS_MENU:{actions:["focusMenu"]},"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{closeOnSelect:({prop:e,event:t})=>{var n;return!!((n=t==null?void 0:t.closeOnSelect)!=null?n:e("closeOnSelect"))},isTriggerItem:({event:e})=>$g(e.target),isTriggerItemHighlighted:({event:e,scope:t,computed:n})=>{var r;let i=(r=e.target)!=null?r:t.getById(n("highlightedId"));return!!(i!=null&&i.hasAttribute("data-controls"))},isSubmenu:({context:e})=>e.get("isSubmenu"),isPointerSuspended:({context:e})=>e.get("suspendPointer"),isHighlightedItemEditable:({scope:e,computed:t})=>Ot(e.getById(t("highlightedId"))),isOpenControlled:({prop:e})=>e("open")!==void 0,isArrowLeftEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="ARROW_LEFT"},isArrowUpEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="ARROW_UP"},isArrowDownEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="ARROW_DOWN"},isOpenAutoFocusEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="OPEN_AUTOFOCUS"}},effects:{waitForOpenDelay({send:e}){let t=setTimeout(()=>{e({type:"DELAY.OPEN"})},200);return()=>clearTimeout(t)},waitForCloseDelay({send:e}){let t=setTimeout(()=>{e({type:"DELAY.CLOSE"})},100);return()=>clearTimeout(t)},waitForLongPress({send:e}){let t=setTimeout(()=>{e({type:"LONG_PRESS.OPEN"})},700);return()=>clearTimeout(t)},trackPositioning({context:e,prop:t,scope:n,refs:i}){if(wl(n))return;let r=g(g({},t("positioning")),i.get("positioningOverride"));e.set("currentPlacement",r.placement);let s=()=>Fg(n);return It(fa(n),s,y(g({},r),{defer:!0,onComplete(a){e.set("currentPlacement",a.placement)}}))},trackInteractOutside({refs:e,scope:t,prop:n,context:i,send:r}){let s=()=>cn(t),a=!0;return Ft(s,{type:"menu",defer:!0,exclude:[fa(t)],onInteractOutside:n("onInteractOutside"),onRequestDismiss:n("onRequestDismiss"),onFocusOutside(o){var u;(u=n("onFocusOutside"))==null||u(o);let l=j(o.detail.originalEvent);if(ce(wl(t),l)){o.preventDefault();return}},onEscapeKeyDown(o){var l;(l=n("onEscapeKeyDown"))==null||l(o),i.get("isSubmenu")&&o.preventDefault(),Hg({parent:e.get("parent")})},onPointerDownOutside(o){var u;(u=n("onPointerDownOutside"))==null||u(o);let l=j(o.detail.originalEvent);if(ce(wl(t),l)&&o.detail.contextmenu){o.preventDefault();return}a=!o.detail.focusable},onDismiss(){r({type:"CLOSE",src:"interact-outside",restoreFocus:a})}})},trackPointerMove({context:e,scope:t,send:n,refs:i,flush:r}){let s=i.get("parent");r(()=>{s.context.set("suspendPointer",!0)});let a=t.getDoc();return ee(a,"pointermove",o=>{cT(e.get("intentPolygon"),{x:o.clientX,y:o.clientY})||(n({type:"POINTER_MOVED_AWAY_FROM_SUBMENU"}),s.context.set("suspendPointer",!1))})},scrollToHighlightedItem({event:e,scope:t,computed:n}){let i=()=>{if(e.current().type.startsWith("ITEM_POINTER"))return;let s=t.getById(n("highlightedId")),a=cn(t);Xt(s,{rootEl:a,block:"nearest"})};return H(()=>i()),ot(()=>cn(t),{defer:!0,attributes:["aria-activedescendant"],callback:i})}},actions:{setAnchorPoint({context:e,event:t}){e.set("anchorPoint",n=>fe(n,t.point)?n:t.point)},setSubmenuPlacement({context:e,computed:t,refs:n}){if(!e.get("isSubmenu"))return;let i=t("isRtl")?"left-start":"right-start";n.set("positioningOverride",{placement:i,gutter:0})},reposition({context:e,scope:t,prop:n,event:i,refs:r}){var c;let s=()=>Fg(t),a=e.get("anchorPoint"),o=a?()=>g({width:0,height:0},a):void 0,l=g(g({},n("positioning")),r.get("positioningOverride"));It(fa(t),s,y(g(y(g({},l),{defer:!0,getAnchorRect:o}),(c=i.options)!=null?c:{}),{listeners:!1,onComplete(u){e.set("currentPlacement",u.placement)}}))},setOptionState({event:e}){if(!e.option)return;let{checked:t,onCheckedChange:n,type:i}=e.option;i==="radio"?n==null||n(!0):i==="checkbox"&&(n==null||n(!t))},clickHighlightedItem({scope:e,computed:t,prop:n,context:i}){var a;let r=e.getById(t("highlightedId"));if(!r||r.dataset.disabled)return;let s=i.get("highlightedValue");st(r)?(a=n("navigate"))==null||a({value:s,node:r,href:r.href}):queueMicrotask(()=>r.click())},setIntentPolygon({context:e,scope:t,event:n}){let i=cn(t),r=e.get("currentPlacement");if(!i||!r)return;let s=i.getBoundingClientRect(),a=Su(s,r);if(!a)return;let l=Md(r)==="right"?-5:5;e.set("intentPolygon",[y(g({},n.point),{x:n.point.x+l}),...a])},clearIntentPolygon({context:e}){e.set("intentPolygon",null)},clearAnchorPoint({context:e}){e.set("anchorPoint",null)},resumePointer({refs:e,flush:t}){let n=e.get("parent");n&&t(()=>{n.context.set("suspendPointer",!1)})},setHighlightedItem({context:e,event:t}){let n=t.value||ei(t.target);e.set("highlightedValue",n)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},focusMenu({scope:e}){H(()=>{let t=cn(e),n=us({root:t,enabled:!ce(t,e.getActiveElement()),filter(i){var r;return!((r=i.role)!=null&&r.startsWith("menuitem"))}});n==null||n.focus({preventScroll:!0})})},highlightFirstItem({context:e,scope:t}){(cn(t)?queueMicrotask:H)(()=>{let i=eT(t);i&&e.set("highlightedValue",ei(i))})},highlightLastItem({context:e,scope:t}){(cn(t)?queueMicrotask:H)(()=>{let i=tT(t);i&&e.set("highlightedValue",ei(i))})},highlightNextItem({context:e,scope:t,event:n,prop:i}){let r=nT(t,{loop:n.loop,value:e.get("highlightedValue"),loopFocus:i("loopFocus")});e.set("highlightedValue",ei(r))},highlightPrevItem({context:e,scope:t,event:n,prop:i}){let r=iT(t,{loop:n.loop,value:e.get("highlightedValue"),loopFocus:i("loopFocus")});e.set("highlightedValue",ei(r))},invokeOnSelect({context:e,prop:t,scope:n}){var s;let i=e.get("highlightedValue");if(i==null)return;let r=QS(n,i);sT(r,i),(s=t("onSelect"))==null||s({value:i})},focusTrigger({scope:e,context:t,event:n}){t.get("isSubmenu")||t.get("anchorPoint")||n.restoreFocus===!1||queueMicrotask(()=>{var i;return(i=fa(e))==null?void 0:i.focus({preventScroll:!0})})},highlightMatchedItem({scope:e,context:t,event:n,refs:i}){let r=rT(e,{key:n.key,value:t.get("highlightedValue"),typeaheadState:i.get("typeaheadState")});r&&t.set("highlightedValue",ei(r))},setParentMenu({refs:e,event:t,context:n}){e.set("parent",t.value),n.set("isSubmenu",!0)},setChildMenu({refs:e,event:t}){let n=e.get("children");n[t.id]=t.value,e.set("children",n)},closeSiblingMenus({refs:e,event:t,scope:n}){var a;let i=t.target;if(!$g(i))return;let r=i==null?void 0:i.getAttribute("data-uid"),s=e.get("children");for(let o in s){if(o===r)continue;let l=s[o],c=l.context.get("intentPolygon");c&&t.point&&fo(c,t.point)||((a=cn(n))==null||a.focus({preventScroll:!0}),l.send({type:"CLOSE"}))}},closeRootMenu({refs:e}){Hg({parent:e.get("parent")})},openSubmenu({refs:e,scope:t,computed:n}){let i=t.getById(n("highlightedId")),r=i==null?void 0:i.getAttribute("data-uid"),s=e.get("children"),a=r?s[r]:null;a==null||a.send({type:"OPEN_AUTOFOCUS"})},focusParentMenu({refs:e}){var t;(t=e.get("parent"))==null||t.send({type:"FOCUS_MENU"})},setLastHighlightedItem({context:e,event:t}){e.set("lastHighlightedValue",ei(t.target))},restoreHighlightedItem({context:e}){e.get("lastHighlightedValue")&&(e.set("highlightedValue",e.get("lastHighlightedValue")),e.set("lastHighlightedValue",null))},restoreParentHighlightedItem({refs:e}){var t;(t=e.get("parent"))==null||t.send({type:"HIGHLIGHTED.RESTORE"})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},toggleVisibility({prop:e,event:t,send:n}){n({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:t})}}}};dT=_()(["anchorPoint","aria-label","closeOnSelect","composite","defaultHighlightedValue","defaultOpen","dir","getRootNode","highlightedValue","id","ids","loopFocus","navigate","onEscapeKeyDown","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","onSelect","open","positioning","typeahead"]),cA=B(dT),hT=_()(["closeOnSelect","disabled","value","valueText"]),uA=B(hT),gT=_()(["htmlFor"]),dA=B(gT),pT=_()(["id"]),hA=B(pT),fT=_()(["checked","closeOnSelect","disabled","onCheckedChange","type","value","valueText"]),gA=B(fT),Bg=class extends K{constructor(){super(...arguments);Y(this,"children",[])}initMachine(t){return new W(lT,t)}initApi(){return aT(this.machine.service,q)}setChild(t){this.api.setChild(t.machine.service),this.children.includes(t)||this.children.push(t)}setParent(t){this.api.setParent(t.machine.service)}isOwnElement(t){return t.closest('[phx-hook="Menu"]')===this.el}renderSubmenuTriggers(){let t=this.el.querySelector('[data-scope="menu"][data-part="content"]');if(!t)return;let n=t.querySelectorAll('[data-scope="menu"][data-nested-menu]');for(let i of n){if(!this.isOwnElement(i))continue;let r=i.dataset.nestedMenu;if(!r)continue;let s=this.children.find(o=>o.el.id===`menu:${r}`);if(!s)continue;let a=()=>{let o=this.api.getTriggerItemProps(s.api);this.spreadProps(i,o)};a(),this.machine.subscribe(a),s.machine.subscribe(a)}}render(){let t=this.el.querySelector('[data-scope="menu"][data-part="trigger"]');t&&this.spreadProps(t,this.api.getTriggerProps());let n=this.el.querySelector('[data-scope="menu"][data-part="positioner"]'),i=this.el.querySelector('[data-scope="menu"][data-part="content"]');if(n&&i){this.spreadProps(n,this.api.getPositionerProps()),this.spreadProps(i,this.api.getContentProps()),i.style.pointerEvents="auto",n.hidden=!this.api.open;let s=!this.el.querySelector('[data-scope="menu"][data-part="trigger"]');(this.api.open||s)&&(i.querySelectorAll('[data-scope="menu"][data-part="item"]').forEach(u=>{if(!this.isOwnElement(u))return;let h=u.dataset.value;if(h){let m=u.hasAttribute("data-disabled");this.spreadProps(u,this.api.getItemProps({value:h,disabled:m||void 0}))}}),i.querySelectorAll('[data-scope="menu"][data-part="item-group"]').forEach(u=>{if(!this.isOwnElement(u))return;let h=u.id;h&&this.spreadProps(u,this.api.getItemGroupProps({id:h}))}),i.querySelectorAll('[data-scope="menu"][data-part="separator"]').forEach(u=>{this.isOwnElement(u)&&this.spreadProps(u,this.api.getSeparatorProps())}))}let r=this.el.querySelector('[data-scope="menu"][data-part="indicator"]');r&&this.spreadProps(r,this.api.getIndicatorProps())}},mT={mounted(){let e=this.el;if(e.hasAttribute("data-nested"))return;let t=this.pushEvent.bind(this),n=()=>{var a;return(a=this.liveSocket)==null?void 0:a.main},i=new Bg(e,y(g({id:e.id.replace("menu:","")},C(e,"controlled")?{open:C(e,"open")}:{defaultOpen:C(e,"defaultOpen")}),{closeOnSelect:C(e,"closeOnSelect"),loopFocus:C(e,"loopFocus"),typeahead:C(e,"typeahead"),composite:C(e,"composite"),dir:w(e,"dir",["ltr","rtl"]),onSelect:a=>{var v,I,T;let o=C(e,"redirect"),l=[...e.querySelectorAll('[data-scope="menu"][data-part="item"]')].find(O=>O.getAttribute("data-value")===a.value),c=l==null?void 0:l.getAttribute("data-redirect"),u=l==null?void 0:l.hasAttribute("data-new-tab"),h=n();o&&a.value&&((v=h==null?void 0:h.isDead)!=null?v:!0)&&c!=="false"&&(u?window.open(a.value,"_blank","noopener,noreferrer"):window.location.href=a.value);let d=w(e,"onSelect");d&&h&&!h.isDead&&h.isConnected()&&t(d,{id:e.id,value:(I=a.value)!=null?I:null});let p=w(e,"onSelectClient");p&&e.dispatchEvent(new CustomEvent(p,{bubbles:!0,detail:{id:e.id,value:(T=a.value)!=null?T:null}}))},onOpenChange:a=>{var u,h;let o=n(),l=w(e,"onOpenChange");l&&o&&!o.isDead&&o.isConnected()&&t(l,{id:e.id,open:(u=a.open)!=null?u:!1});let c=w(e,"onOpenChangeClient");c&&e.dispatchEvent(new CustomEvent(c,{bubbles:!0,detail:{id:e.id,open:(h=a.open)!=null?h:!1}}))}}));i.init(),this.menu=i,this.nestedMenus=new Map;let r=e.querySelectorAll('[data-scope="menu"][data-nested="menu"]'),s=[];r.forEach((a,o)=>{var c;let l=a.id;if(l){let u=`${l}-${o}`,h=new Bg(a,{id:u,dir:w(a,"dir",["ltr","rtl"]),closeOnSelect:C(a,"closeOnSelect"),loopFocus:C(a,"loopFocus"),typeahead:C(a,"typeahead"),composite:C(a,"composite"),onSelect:m=>{var S,P,V;let d=C(e,"redirect"),p=[...e.querySelectorAll('[data-scope="menu"][data-part="item"]')].find(A=>A.getAttribute("data-value")===m.value),v=p==null?void 0:p.getAttribute("data-redirect"),I=p==null?void 0:p.hasAttribute("data-new-tab"),T=n();d&&m.value&&((S=T==null?void 0:T.isDead)!=null?S:!0)&&v!=="false"&&(I?window.open(m.value,"_blank","noopener,noreferrer"):window.location.href=m.value);let b=w(e,"onSelect");b&&T&&!T.isDead&&T.isConnected()&&t(b,{id:e.id,value:(P=m.value)!=null?P:null});let f=w(e,"onSelectClient");f&&e.dispatchEvent(new CustomEvent(f,{bubbles:!0,detail:{id:e.id,value:(V=m.value)!=null?V:null}}))}});h.init(),(c=this.nestedMenus)==null||c.set(l,h),s.push(h)}}),setTimeout(()=>{s.forEach(a=>{this.menu&&(this.menu.setChild(a),a.setParent(this.menu))}),this.menu&&this.menu.children.length>0&&this.menu.renderSubmenuTriggers()},0),this.onSetOpen=a=>{let{open:o}=a.detail;i.api.open!==o&&i.api.setOpen(o)},e.addEventListener("phx:menu:set-open",this.onSetOpen),this.handlers=[],this.handlers.push(this.handleEvent("menu_set_open",a=>{let o=a.menu_id;(!o||e.id===o||e.id===`menu:${o}`)&&i.api.setOpen(a.open)})),this.handlers.push(this.handleEvent("menu_open",()=>{this.pushEvent("menu_open_response",{open:i.api.open})}))},updated(){var e;this.el.hasAttribute("data-nested")||(e=this.menu)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlled")?{open:C(this.el,"open")}:{defaultOpen:C(this.el,"defaultOpen")}),{closeOnSelect:C(this.el,"closeOnSelect"),loopFocus:C(this.el,"loopFocus"),typeahead:C(this.el,"typeahead"),composite:C(this.el,"composite"),dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(!this.el.hasAttribute("data-nested")){if(this.onSetOpen&&this.el.removeEventListener("phx:menu:set-open",this.onSetOpen),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);if(this.nestedMenus)for(let[,t]of this.nestedMenus)t.destroy();(e=this.menu)==null||e.destroy()}}}});var rp={};he(rp,{NumberInput:()=>zT});function yT(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${n}`),t.style==="unit"&&!ya){var i;let{unit:a,unitDisplay:o="short"}=t;if(!a)throw new Error('unit option must be provided with style: "unit"');if(!(!((i=Jg[a])===null||i===void 0)&&i[o]))throw new Error(`Unsupported unit ${a} with unitDisplay = ${o}`);t=y(g({},t),{style:"decimal"})}let r=e+(t?Object.entries(t).sort((a,o)=>a[0]0||Object.is(n,0):t==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):i=n>0),i){let r=e.format(-n),s=e.format(n),a=r.replace(s,"").replace(/\u200e|\u061C/,"");return[...a].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),r.replace(s,"!!!").replace(a,"+").replace("!!!",s)}else return e.format(n)}}function kl(e,t,n){let i=Kg(e,t);if(!e.includes("-nu-")&&!i.isValidPartialNumber(n)){for(let r of IT)if(r!==i.options.numberingSystem){let s=Kg(e+(e.includes("-u-")?"-nu-":"-u-nu-")+r,t);if(s.isValidPartialNumber(n))return s}}return i}function Kg(e,t){let n=e+(t?Object.entries(t).sort((r,s)=>r[0]l.formatToParts(k));var m;let d=(m=(r=c.find(k=>k.type==="minusSign"))===null||r===void 0?void 0:r.value)!==null&&m!==void 0?m:"-",p=(s=u.find(k=>k.type==="plusSign"))===null||s===void 0?void 0:s.value;!p&&((i==null?void 0:i.signDisplay)==="exceptZero"||(i==null?void 0:i.signDisplay)==="always")&&(p="+");let I=(a=new Intl.NumberFormat(e,y(g({},n),{minimumFractionDigits:2,maximumFractionDigits:2})).formatToParts(.001).find(k=>k.type==="decimal"))===null||a===void 0?void 0:a.value,T=(o=c.find(k=>k.type==="group"))===null||o===void 0?void 0:o.value,O=c.filter(k=>!zg.has(k.type)).map(k=>Yg(k.value)),b=h.flatMap(k=>k.filter(N=>!zg.has(N.type)).map(N=>Yg(N.value))),f=[...new Set([...O,...b])].sort((k,N)=>N.length-k.length),S=f.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${f.join("|")}|[\\p{White_Space}]`,"gu"),P=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),V=new Map(P.map((k,N)=>[k,N])),A=new RegExp(`[${P.join("")}]`,"g");return{minusSign:d,plusSign:p,decimal:I,group:T,literals:S,numeral:A,index:k=>String(V.get(k))}}function Ui(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function Yg(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Dl(e,t){if(!(!e||!t.isActiveElement(e)))try{let{selectionStart:n,selectionEnd:i,value:r}=e;return n==null||i==null?void 0:{start:n,end:i,value:r}}catch(n){return}}function OT(e,t,n){if(!(!e||!n.isActiveElement(e))){if(!t){let i=e.value.length;e.setSelectionRange(i,i);return}try{let i=e.value,{start:r,end:s,value:a}=t;if(i===a){e.setSelectionRange(r,s);return}let o=jg(a,i,r),l=r===s?o:jg(a,i,s),c=Math.max(0,Math.min(o,i.length)),u=Math.max(c,Math.min(l,i.length));e.setSelectionRange(c,u)}catch(i){let r=e.value.length;e.setSelectionRange(r,r)}}}function jg(e,t,n){let i=e.slice(0,n),r=e.slice(n),s=0,a=Math.min(i.length,t.length);for(let c=0;c0&&s>=i.length)return s;if(o>=r.length)return t.length-o;if(s>0)return s;if(o>0)return t.length-o;if(n===0&&s===0&&o===0)return t.length;if(e.length>0){let c=n/e.length;return Math.round(c*t.length)}return t.length}function FT(e,t){let{state:n,send:i,prop:r,scope:s,computed:a}=e,o=n.hasTag("focus"),l=a("isDisabled"),c=!!r("readOnly"),u=!!r("required"),h=n.matches("scrubbing"),m=a("isValueEmpty"),d=a("isOutOfRange")||!!r("invalid"),p=l||!a("canIncrement")||c,v=l||!a("canDecrement")||c,I=r("translations");return{focused:o,invalid:d,empty:m,value:a("formattedValue"),valueAsNumber:a("valueAsNumber"),setValue(T){i({type:"VALUE.SET",value:T})},clearValue(){i({type:"VALUE.CLEAR"})},increment(){i({type:"VALUE.INCREMENT"})},decrement(){i({type:"VALUE.DECREMENT"})},setToMax(){i({type:"VALUE.SET",value:r("max")})},setToMin(){i({type:"VALUE.SET",value:r("min")})},focus(){var T;(T=ni(s))==null||T.focus()},getRootProps(){return t.element(y(g({id:wT(s)},Vn.root.attrs),{dir:r("dir"),"data-disabled":E(l),"data-focus":E(o),"data-invalid":E(d),"data-scrubbing":E(h)}))},getLabelProps(){return t.label(y(g({},Vn.label.attrs),{dir:r("dir"),"data-disabled":E(l),"data-focus":E(o),"data-invalid":E(d),"data-required":E(u),"data-scrubbing":E(h),id:xT(s),htmlFor:Lr(s),onClick(){H(()=>{tr(ni(s))})}}))},getControlProps(){return t.element(y(g({},Vn.control.attrs),{dir:r("dir"),role:"group","aria-disabled":l,"data-focus":E(o),"data-disabled":E(l),"data-invalid":E(d),"data-scrubbing":E(h),"aria-invalid":X(d)}))},getValueTextProps(){return t.element(y(g({},Vn.valueText.attrs),{dir:r("dir"),"data-disabled":E(l),"data-invalid":E(d),"data-focus":E(o),"data-scrubbing":E(h)}))},getInputProps(){return t.input(y(g({},Vn.input.attrs),{dir:r("dir"),name:r("name"),form:r("form"),id:Lr(s),role:"spinbutton",defaultValue:a("formattedValue"),pattern:r("formatOptions")?void 0:r("pattern"),inputMode:r("inputMode"),"aria-invalid":X(d),"data-invalid":E(d),disabled:l,"data-disabled":E(l),readOnly:c,required:r("required"),autoComplete:"off",autoCorrect:"off",spellCheck:"false",type:"text","aria-roledescription":"numberfield","aria-valuemin":r("min"),"aria-valuemax":r("max"),"aria-valuenow":Number.isNaN(a("valueAsNumber"))?void 0:a("valueAsNumber"),"aria-valuetext":a("valueText"),"data-scrubbing":E(h),onFocus(){i({type:"INPUT.FOCUS"})},onBlur(){i({type:"INPUT.BLUR"})},onInput(T){let O=Dl(T.currentTarget,s);i({type:"INPUT.CHANGE",target:T.currentTarget,hint:"set",selection:O})},onBeforeInput(T){var O;try{let{selectionStart:b,selectionEnd:f,value:S}=T.currentTarget,P=S.slice(0,b)+((O=T.data)!=null?O:"")+S.slice(f);a("parser").isValidPartialNumber(P)||T.preventDefault()}catch(b){}},onKeyDown(T){if(T.defaultPrevented||c||Re(T))return;let O=gi(T)*r("step"),f={ArrowUp(){i({type:"INPUT.ARROW_UP",step:O}),T.preventDefault()},ArrowDown(){i({type:"INPUT.ARROW_DOWN",step:O}),T.preventDefault()},Home(){xe(T)||(i({type:"INPUT.HOME"}),T.preventDefault())},End(){xe(T)||(i({type:"INPUT.END"}),T.preventDefault())},Enter(S){let P=Dl(S.currentTarget,s);i({type:"INPUT.ENTER",selection:P})}}[T.key];f==null||f(T)}}))},getDecrementTriggerProps(){return t.button(y(g({},Vn.decrementTrigger.attrs),{dir:r("dir"),id:tp(s),disabled:v,"data-disabled":E(v),"aria-label":I.decrementLabel,type:"button",tabIndex:-1,"aria-controls":Lr(s),"data-scrubbing":E(h),onPointerDown(T){var O;v||pe(T)&&(i({type:"TRIGGER.PRESS_DOWN",hint:"decrement",pointerType:T.pointerType}),T.pointerType==="mouse"&&T.preventDefault(),T.pointerType==="touch"&&((O=T.currentTarget)==null||O.focus({preventScroll:!0})))},onPointerUp(T){i({type:"TRIGGER.PRESS_UP",hint:"decrement",pointerType:T.pointerType})},onPointerLeave(){v||i({type:"TRIGGER.PRESS_UP",hint:"decrement"})}}))},getIncrementTriggerProps(){return t.button(y(g({},Vn.incrementTrigger.attrs),{dir:r("dir"),id:ep(s),disabled:p,"data-disabled":E(p),"aria-label":I.incrementLabel,type:"button",tabIndex:-1,"aria-controls":Lr(s),"data-scrubbing":E(h),onPointerDown(T){var O;p||!pe(T)||(i({type:"TRIGGER.PRESS_DOWN",hint:"increment",pointerType:T.pointerType}),T.pointerType==="mouse"&&T.preventDefault(),T.pointerType==="touch"&&((O=T.currentTarget)==null||O.focus({preventScroll:!0})))},onPointerUp(T){i({type:"TRIGGER.PRESS_UP",hint:"increment",pointerType:T.pointerType})},onPointerLeave(T){i({type:"TRIGGER.PRESS_UP",hint:"increment",pointerType:T.pointerType})}}))},getScrubberProps(){return t.element(y(g({},Vn.scrubber.attrs),{dir:r("dir"),"data-disabled":E(l),id:VT(s),role:"presentation","data-scrubbing":E(h),onMouseDown(T){if(l||!pe(T))return;let O=je(T),f=ue(T.currentTarget).devicePixelRatio;O.x=O.x-Ci(7.5,f),O.y=O.y-Ci(7.5,f),i({type:"SCRUBBER.PRESS_DOWN",point:O}),T.preventDefault(),H(()=>{tr(ni(s))})},style:{cursor:l?void 0:"ew-resize"}}))}}}var Al,Rl,ya,Jg,vT,ET,IT,Qg,Wg,PT,zg,CT,TT,Vn,wT,Lr,ep,tp,VT,np,xT,ni,AT,kT,ip,NT,RT,DT,LT,MT,$T,HT,Nl,ti,BT,_T,GT,UT,Xg,Zg,qT,WT,vA,KT,zT,sp=re(()=>{"use strict";se();Al=new Map,Rl=!1;try{Rl=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch(e){}ya=!1;try{ya=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch(e){}Jg={degree:{narrow:{default:"\xB0","ja-JP":" \u5EA6","zh-TW":"\u5EA6","sl-SI":" \xB0"}}},vT=class{format(e){let t="";if(!Rl&&this.options.signDisplay!=null?t=bT(this.numberFormatter,this.options.signDisplay,e):t=this.numberFormatter.format(e),this.options.style==="unit"&&!ya){var n;let{unit:i,unitDisplay:r="short",locale:s}=this.resolvedOptions();if(!i)return t;let a=(n=Jg[i])===null||n===void 0?void 0:n[r];t+=a[s]||a.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(e,t);if(t= start date");return`${this.format(e)} \u2013 ${this.format(t)}`}formatRangeToParts(e,t){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(e,t);if(t= start date");let n=this.numberFormatter.formatToParts(e),i=this.numberFormatter.formatToParts(t);return[...n.map(r=>y(g({},r),{source:"startRange"})),{type:"literal",value:" \u2013 ",source:"shared"},...i.map(r=>y(g({},r),{source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!Rl&&this.options.signDisplay!=null&&(e=y(g({},e),{signDisplay:this.options.signDisplay})),!ya&&this.options.style==="unit"&&(e=y(g({},e),{style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay})),e}constructor(e,t={}){this.numberFormatter=yT(e,t),this.options=t}};ET=new RegExp("^.*\\(.*\\).*$"),IT=["latn","arab","hanidec","deva","beng","fullwide"],Qg=class{parse(e){return kl(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,n){return kl(this.locale,this.options,e).isValidPartialNumber(e,t,n)}getNumberingSystem(e){return kl(this.locale,this.options,e).options.numberingSystem}constructor(e,t={}){this.locale=e,this.options=t}},Wg=new Map;PT=class{parse(e){let t=this.sanitize(e);if(this.symbols.group&&(t=Ui(t,this.symbols.group,"")),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(t=t.replace(this.symbols.minusSign,"-")),t=t.replace(this.symbols.numeral,this.symbols.index),this.options.style==="percent"){let s=t.indexOf("-");t=t.replace("-",""),t=t.replace("+","");let a=t.indexOf(".");a===-1&&(a=t.length),t=t.replace(".",""),a-2===0?t=`0.${t}`:a-2===-1?t=`0.0${t}`:a-2===-2?t="0.00":t=`${t.slice(0,a-2)}.${t.slice(a-2)}`,s>-1&&(t=`-${t}`)}let n=t?+t:NaN;if(isNaN(n))return NaN;if(this.options.style==="percent"){var i,r;let s=y(g({},this.options),{style:"decimal",minimumFractionDigits:Math.min(((i=this.options.minimumFractionDigits)!==null&&i!==void 0?i:0)+2,20),maximumFractionDigits:Math.min(((r=this.options.maximumFractionDigits)!==null&&r!==void 0?r:0)+2,20)});return new Qg(this.locale,s).parse(new vT(this.locale,s).format(n))}return this.options.currencySign==="accounting"&&ET.test(e)&&(n=-1*n),n}sanitize(e){return e=e.replace(this.symbols.literals,""),this.symbols.minusSign&&(e=e.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(e=e.replace(",",this.symbols.decimal),e=e.replace("\u060C",this.symbols.decimal)),this.symbols.group&&(e=Ui(e,".",this.symbols.group))),this.symbols.group==="\u2019"&&e.includes("'")&&(e=Ui(e,"'",this.symbols.group)),this.options.locale==="fr-FR"&&this.symbols.group&&(e=Ui(e," ",this.symbols.group),e=Ui(e,/\u00A0/g,this.symbols.group)),e}isValidPartialNumber(e,t=-1/0,n=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&n>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(e=Ui(e,this.symbols.group,"")),e=e.replace(this.symbols.numeral,""),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,"")),e.length===0)}constructor(e,t={}){this.locale=e,t.roundingIncrement!==1&&t.roundingIncrement!=null&&(t.maximumFractionDigits==null&&t.minimumFractionDigits==null?(t.maximumFractionDigits=0,t.minimumFractionDigits=0):t.maximumFractionDigits==null?t.maximumFractionDigits=t.minimumFractionDigits:t.minimumFractionDigits==null&&(t.minimumFractionDigits=t.maximumFractionDigits)),this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=ST(e,this.formatter,this.options,t);var n,i;this.options.style==="percent"&&(((n=this.options.minimumFractionDigits)!==null&&n!==void 0?n:0)>18||((i=this.options.maximumFractionDigits)!==null&&i!==void 0?i:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}},zg=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),CT=[0,4,2,1,11,20,3,7,100,21,.1,1.1];TT=U("numberInput").parts("root","label","input","control","valueText","incrementTrigger","decrementTrigger","scrubber"),Vn=TT.build();wT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`number-input:${e.id}`},Lr=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.input)!=null?n:`number-input:${e.id}:input`},ep=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.incrementTrigger)!=null?n:`number-input:${e.id}:inc`},tp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.decrementTrigger)!=null?n:`number-input:${e.id}:dec`},VT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.scrubber)!=null?n:`number-input:${e.id}:scrubber`},np=e=>`number-input:${e.id}:cursor`,xT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`number-input:${e.id}:label`},ni=e=>e.getById(Lr(e)),AT=e=>e.getById(ep(e)),kT=e=>e.getById(tp(e)),ip=e=>e.getDoc().getElementById(np(e)),NT=(e,t)=>{let n=null;return t==="increment"&&(n=AT(e)),t==="decrement"&&(n=kT(e)),n},RT=(e,t)=>{if(!Xe())return MT(e,t),()=>{var n;(n=ip(e))==null||n.remove()}},DT=e=>{let t=e.getDoc(),n=t.documentElement,i=t.body;return i.style.pointerEvents="none",n.style.userSelect="none",n.style.cursor="ew-resize",()=>{i.style.pointerEvents="",n.style.userSelect="",n.style.cursor="",n.style.length||n.removeAttribute("style"),i.style.length||i.removeAttribute("style")}},LT=(e,t)=>{let{point:n,isRtl:i,event:r}=t,s=e.getWin(),a=Ci(r.movementX,s.devicePixelRatio),o=Ci(r.movementY,s.devicePixelRatio),l=a>0?"increment":a<0?"decrement":null;i&&l==="increment"&&(l="decrement"),i&&l==="decrement"&&(l="increment");let c={x:n.x+a,y:n.y+o},u=s.innerWidth,h=Ci(7.5,s.devicePixelRatio);return c.x=Zc(c.x+h,u)-h,{hint:l,point:c}},MT=(e,t)=>{let n=e.getDoc(),i=n.createElement("div");i.className="scrubber--cursor",i.id=np(e),Object.assign(i.style,{width:"15px",height:"15px",position:"fixed",pointerEvents:"none",left:"0px",top:"0px",zIndex:ss,transform:t?`translate3d(${t.x}px, ${t.y}px, 0px)`:void 0,willChange:"transform"}),i.innerHTML=` - `,n.body.appendChild(i)};$T=(e,t={})=>new Intl.NumberFormat(e,t),HT=(e,t={})=>new Qg(e,t),Nl=(e,t)=>{let{prop:n,computed:i}=t;return n("formatOptions")?e===""?Number.NaN:i("parser").parse(e):parseFloat(e)},ti=(e,t)=>{let{prop:n,computed:i}=t;return Number.isNaN(e)?"":n("formatOptions")?i("formatter").format(e):e.toString()},BT=(e,t)=>{let n=e!==void 0&&!Number.isNaN(e)?e:1;return(t==null?void 0:t.style)==="percent"&&(e===void 0||Number.isNaN(e))&&(n=.01),n},{choose:_T,guards:GT,createMachine:UT}=ut(),{not:Xg,and:Zg}=GT,qT=UT({props({props:e}){let t=BT(e.step,e.formatOptions);return y(g({dir:"ltr",locale:"en-US",focusInputOnChange:!0,clampValueOnBlur:!e.allowOverflow,allowOverflow:!1,inputMode:"decimal",pattern:"-?[0-9]*(.[0-9]+)?",defaultValue:"",step:t,min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,spinOnPress:!0},e),{translations:g({incrementLabel:"increment value",decrementLabel:"decrease value"},e.translations)})},initialState(){return"idle"},context({prop:e,bindable:t,getComputed:n}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(i){var a;let r=n(),s=Nl(i,{computed:r,prop:e});(a=e("onValueChange"))==null||a({value:i,valueAsNumber:s})}})),hint:t(()=>({defaultValue:null})),scrubberCursorPoint:t(()=>({defaultValue:null,hash(i){return i?`x:${i.x}, y:${i.y}`:""}})),fieldsetDisabled:t(()=>({defaultValue:!1}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",valueAsNumber:({context:e,computed:t,prop:n})=>Nl(e.get("value"),{computed:t,prop:n}),formattedValue:({computed:e,prop:t})=>ti(e("valueAsNumber"),{computed:e,prop:t}),isAtMin:({computed:e,prop:t})=>Qc(e("valueAsNumber"),t("min")),isAtMax:({computed:e,prop:t})=>Jc(e("valueAsNumber"),t("max")),isOutOfRange:({computed:e,prop:t})=>!Pi(e("valueAsNumber"),t("min"),t("max")),isValueEmpty:({context:e})=>e.get("value")==="",isDisabled:({prop:e,context:t})=>!!e("disabled")||t.get("fieldsetDisabled"),canIncrement:({prop:e,computed:t})=>e("allowOverflow")||!t("isAtMax"),canDecrement:({prop:e,computed:t})=>e("allowOverflow")||!t("isAtMin"),valueText:({prop:e,context:t})=>{var n,i;return(i=(n=e("translations")).valueText)==null?void 0:i.call(n,t.get("value"))},formatter:Bn(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>$T(e,t)),parser:Bn(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>HT(e,t))},watch({track:e,action:t,context:n,computed:i,prop:r}){e([()=>n.get("value"),()=>r("locale"),()=>JSON.stringify(r("formatOptions"))],()=>{t(["syncInputElement"])}),e([()=>i("isOutOfRange")],()=>{t(["invokeOnInvalid"])}),e([()=>n.hash("scrubberCursorPoint")],()=>{t(["setVirtualCursorPosition"])})},effects:["trackFormControl"],on:{"VALUE.SET":{actions:["setRawValue"]},"VALUE.CLEAR":{actions:["clearValue"]},"VALUE.INCREMENT":{actions:["increment"]},"VALUE.DECREMENT":{actions:["decrement"]}},states:{idle:{on:{"TRIGGER.PRESS_DOWN":[{guard:"isTouchPointer",target:"before:spin",actions:["setHint"]},{target:"before:spin",actions:["focusInput","invokeOnFocus","setHint"]}],"SCRUBBER.PRESS_DOWN":{target:"scrubbing",actions:["focusInput","invokeOnFocus","setHint","setCursorPoint"]},"INPUT.FOCUS":{target:"focused",actions:["focusInput","invokeOnFocus"]}}},focused:{tags:["focus"],effects:["attachWheelListener"],on:{"TRIGGER.PRESS_DOWN":[{guard:"isTouchPointer",target:"before:spin",actions:["setHint"]},{target:"before:spin",actions:["focusInput","setHint"]}],"SCRUBBER.PRESS_DOWN":{target:"scrubbing",actions:["focusInput","setHint","setCursorPoint"]},"INPUT.ARROW_UP":{actions:["increment"]},"INPUT.ARROW_DOWN":{actions:["decrement"]},"INPUT.HOME":{actions:["decrementToMin"]},"INPUT.END":{actions:["incrementToMax"]},"INPUT.CHANGE":{actions:["setValue","setHint"]},"INPUT.BLUR":[{guard:Zg("clampValueOnBlur",Xg("isInRange")),target:"idle",actions:["setClampedValue","clearHint","invokeOnBlur","invokeOnValueCommit"]},{guard:Xg("isInRange"),target:"idle",actions:["setFormattedValue","clearHint","invokeOnBlur","invokeOnInvalid","invokeOnValueCommit"]},{target:"idle",actions:["setFormattedValue","clearHint","invokeOnBlur","invokeOnValueCommit"]}],"INPUT.ENTER":{actions:["setFormattedValue","clearHint","invokeOnBlur","invokeOnValueCommit"]}}},"before:spin":{tags:["focus"],effects:["trackButtonDisabled","waitForChangeDelay"],entry:_T([{guard:"isIncrementHint",actions:["increment"]},{guard:"isDecrementHint",actions:["decrement"]}]),on:{CHANGE_DELAY:{target:"spinning",guard:Zg("isInRange","spinOnPress")},"TRIGGER.PRESS_UP":[{guard:"isTouchPointer",target:"focused",actions:["clearHint"]},{target:"focused",actions:["focusInput","clearHint"]}]}},spinning:{tags:["focus"],effects:["trackButtonDisabled","spinValue"],on:{SPIN:[{guard:"isIncrementHint",actions:["increment"]},{guard:"isDecrementHint",actions:["decrement"]}],"TRIGGER.PRESS_UP":{target:"focused",actions:["focusInput","clearHint"]}}},scrubbing:{tags:["focus"],effects:["activatePointerLock","trackMousemove","setupVirtualCursor","preventTextSelection"],on:{"SCRUBBER.POINTER_UP":{target:"focused",actions:["focusInput","clearCursorPoint"]},"SCRUBBER.POINTER_MOVE":[{guard:"isIncrementHint",actions:["increment","setCursorPoint"]},{guard:"isDecrementHint",actions:["decrement","setCursorPoint"]}]}}},implementations:{guards:{clampValueOnBlur:({prop:e})=>e("clampValueOnBlur"),spinOnPress:({prop:e})=>!!e("spinOnPress"),isInRange:({computed:e})=>!e("isOutOfRange"),isDecrementHint:({context:e,event:t})=>{var n;return((n=t.hint)!=null?n:e.get("hint"))==="decrement"},isIncrementHint:({context:e,event:t})=>{var n;return((n=t.hint)!=null?n:e.get("hint"))==="increment"},isTouchPointer:({event:e})=>e.pointerType==="touch"},effects:{waitForChangeDelay({send:e}){let t=setTimeout(()=>{e({type:"CHANGE_DELAY"})},300);return()=>clearTimeout(t)},spinValue({send:e}){let t=setInterval(()=>{e({type:"SPIN"})},50);return()=>clearInterval(t)},trackFormControl({context:e,scope:t}){let n=ni(t);return wt(n,{onFieldsetDisabledChange(i){e.set("fieldsetDisabled",i)},onFormReset(){e.set("value",e.initial("value"))}})},setupVirtualCursor({context:e,scope:t}){let n=e.get("scrubberCursorPoint");return RT(t,n)},preventTextSelection({scope:e}){return DT(e)},trackButtonDisabled({context:e,scope:t,send:n}){let i=e.get("hint"),r=NT(t,i);return ot(r,{attributes:["disabled"],callback(){n({type:"TRIGGER.PRESS_UP",src:"attr"})}})},attachWheelListener({scope:e,send:t,prop:n}){let i=ni(e);if(!i||!e.isActiveElement(i)||!n("allowMouseWheel"))return;function r(s){s.preventDefault();let a=Math.sign(s.deltaY)*-1;a===1?t({type:"VALUE.INCREMENT"}):a===-1&&t({type:"VALUE.DECREMENT"})}return ee(i,"wheel",r,{passive:!1})},activatePointerLock({scope:e}){if(!Xe())return Mc(e.getDoc())},trackMousemove({scope:e,send:t,context:n,computed:i}){let r=e.getDoc();function s(o){let l=n.get("scrubberCursorPoint"),c=i("isRtl"),u=LT(e,{point:l,isRtl:c,event:o});u.hint&&t({type:"SCRUBBER.POINTER_MOVE",hint:u.hint,point:u.point})}function a(){t({type:"SCRUBBER.POINTER_UP"})}return At(ee(r,"mousemove",s,!1),ee(r,"mouseup",a,!1))}},actions:{focusInput({scope:e,prop:t}){if(!t("focusInputOnChange"))return;let n=ni(e);e.isActiveElement(n)||H(()=>n==null?void 0:n.focus({preventScroll:!0}))},increment({context:e,event:t,prop:n,computed:i}){var s;let r=nu(i("valueAsNumber"),(s=t.step)!=null?s:n("step"));n("allowOverflow")||(r=He(r,n("min"),n("max"))),e.set("value",ti(r,{computed:i,prop:n}))},decrement({context:e,event:t,prop:n,computed:i}){var s;let r=iu(i("valueAsNumber"),(s=t.step)!=null?s:n("step"));n("allowOverflow")||(r=He(r,n("min"),n("max"))),e.set("value",ti(r,{computed:i,prop:n}))},setClampedValue({context:e,prop:t,computed:n}){let i=He(n("valueAsNumber"),t("min"),t("max"));e.set("value",ti(i,{computed:n,prop:t}))},setRawValue({context:e,event:t,prop:n,computed:i}){let r=Nl(t.value,{computed:i,prop:n});n("allowOverflow")||(r=He(r,n("min"),n("max"))),e.set("value",ti(r,{computed:i,prop:n}))},setValue({context:e,event:t}){var i,r;let n=(r=(i=t.target)==null?void 0:i.value)!=null?r:t.value;e.set("value",n)},clearValue({context:e}){e.set("value","")},incrementToMax({context:e,prop:t,computed:n}){let i=ti(t("max"),{computed:n,prop:t});e.set("value",i)},decrementToMin({context:e,prop:t,computed:n}){let i=ti(t("min"),{computed:n,prop:t});e.set("value",i)},setHint({context:e,event:t}){e.set("hint",t.hint)},clearHint({context:e}){e.set("hint",null)},invokeOnFocus({computed:e,prop:t}){var n;(n=t("onFocusChange"))==null||n({focused:!0,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnBlur({computed:e,prop:t}){var n;(n=t("onFocusChange"))==null||n({focused:!1,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnInvalid({computed:e,prop:t,event:n}){var r;if(n.type==="INPUT.CHANGE")return;let i=e("valueAsNumber")>t("max")?"rangeOverflow":"rangeUnderflow";(r=t("onValueInvalid"))==null||r({reason:i,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnValueCommit({computed:e,prop:t}){var n;(n=t("onValueCommit"))==null||n({value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},syncInputElement({context:e,event:t,computed:n,scope:i}){var o;let r=t.type.endsWith("CHANGE")?e.get("value"):n("formattedValue"),s=ni(i),a=(o=t.selection)!=null?o:Dl(s,i);H(()=>{Me(s,r),OT(s,a,i)})},setFormattedValue({context:e,computed:t,action:n}){e.set("value",t("formattedValue")),n(["syncInputElement"])},setCursorPoint({context:e,event:t}){e.set("scrubberCursorPoint",t.point)},clearCursorPoint({context:e}){e.set("scrubberCursorPoint",null)},setVirtualCursorPosition({context:e,scope:t}){let n=ip(t),i=e.get("scrubberCursorPoint");!n||!i||(n.style.transform=`translate3d(${i.x}px, ${i.y}px, 0px)`)}}}}),WT=_()(["allowMouseWheel","allowOverflow","clampValueOnBlur","dir","disabled","focusInputOnChange","form","formatOptions","getRootNode","id","ids","inputMode","invalid","locale","max","min","name","onFocusChange","onValueChange","onValueCommit","onValueInvalid","pattern","required","readOnly","spinOnPress","step","translations","value","defaultValue"]),vA=B(WT),KT=class extends K{initMachine(e){return new W(qT,e)}initApi(){return FT(this.machine.service,q)}render(){var l;let e=(l=this.el.querySelector('[data-scope="number-input"][data-part="root"]'))!=null?l:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="number-input"][data-part="label"]');t&&this.spreadProps(t,this.api.getLabelProps());let n=this.el.querySelector('[data-scope="number-input"][data-part="control"]');n&&this.spreadProps(n,this.api.getControlProps());let i=this.el.querySelector('[data-scope="number-input"][data-part="value-text"]');i&&this.spreadProps(i,this.api.getValueTextProps());let r=this.el.querySelector('[data-scope="number-input"][data-part="input"]');r&&this.spreadProps(r,this.api.getInputProps());let s=this.el.querySelector('[data-scope="number-input"][data-part="decrement-trigger"]');s&&this.spreadProps(s,this.api.getDecrementTriggerProps());let a=this.el.querySelector('[data-scope="number-input"][data-part="increment-trigger"]');a&&this.spreadProps(a,this.api.getIncrementTriggerProps());let o=this.el.querySelector('[data-scope="number-input"][data-part="scrubber"]');o&&(this.spreadProps(o,this.api.getScrubberProps()),o.setAttribute("aria-label","Scrub to adjust value"),o.removeAttribute("role"))}},zT={mounted(){let e=this.el,t=w(e,"value"),n=w(e,"defaultValue"),i=C(e,"controlled"),r=new KT(e,y(g({id:e.id},i&&t!==void 0?{value:t}:{defaultValue:n}),{min:Y(e,"min"),max:Y(e,"max"),step:Y(e,"step"),disabled:C(e,"disabled"),readOnly:C(e,"readOnly"),invalid:C(e,"invalid"),required:C(e,"required"),allowMouseWheel:C(e,"allowMouseWheel"),name:w(e,"name"),form:w(e,"form"),onValueChange:s=>{let a=e.querySelector('[data-scope="number-input"][data-part="input"]');a&&(a.value=s.value,a.dispatchEvent(new Event("input",{bubbles:!0})),a.dispatchEvent(new Event("change",{bubbles:!0})));let o=w(e,"onValueChange");o&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(o,{value:s.value,valueAsNumber:s.valueAsNumber,id:e.id});let l=w(e,"onValueChangeClient");l&&e.dispatchEvent(new CustomEvent(l,{bubbles:!0,detail:{value:s,id:e.id}}))}}));r.init(),this.numberInput=r,this.handlers=[]},updated(){var n;let e=w(this.el,"value"),t=C(this.el,"controlled");(n=this.numberInput)==null||n.updateProps(y(g({id:this.el.id},t&&e!==void 0?{value:e}:{}),{min:Y(this.el,"min"),max:Y(this.el,"max"),step:Y(this.el,"step"),disabled:C(this.el,"disabled"),readOnly:C(this.el,"readOnly"),invalid:C(this.el,"invalid"),required:C(this.el,"required"),name:w(this.el,"name"),form:w(this.el,"form")}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.numberInput)==null||e.destroy()}}});var ap={};he(ap,{PasswordInput:()=>eO});function jT(e,t){let{scope:n,prop:i,context:r}=e,s=r.get("visible"),a=!!i("disabled"),o=!!i("invalid"),l=!!i("readOnly"),c=!!i("required"),u=!(l||a),h=i("translations");return{visible:s,disabled:a,invalid:o,focus(){var m;(m=Ll(n))==null||m.focus()},setVisible(m){e.send({type:"VISIBILITY.SET",value:m})},toggleVisible(){e.send({type:"VISIBILITY.SET",value:!s})},getRootProps(){return t.element(y(g({},qi.root.attrs),{dir:i("dir"),"data-disabled":E(a),"data-invalid":E(o),"data-readonly":E(l)}))},getLabelProps(){return t.label(y(g({},qi.label.attrs),{htmlFor:ba(n),"data-disabled":E(a),"data-invalid":E(o),"data-readonly":E(l),"data-required":E(c)}))},getInputProps(){return t.input(g(y(g({},qi.input.attrs),{id:ba(n),autoCapitalize:"off",name:i("name"),required:i("required"),autoComplete:i("autoComplete"),spellCheck:!1,readOnly:l,disabled:a,type:s?"text":"password","data-state":s?"visible":"hidden","aria-invalid":X(o),"data-disabled":E(a),"data-invalid":E(o),"data-readonly":E(l)}),i("ignorePasswordManagers")?XT:{}))},getVisibilityTriggerProps(){var m;return t.button(y(g({},qi.visibilityTrigger.attrs),{type:"button",tabIndex:-1,"aria-controls":ba(n),"aria-expanded":s,"data-readonly":E(l),disabled:a,"data-disabled":E(a),"data-state":s?"visible":"hidden","aria-label":(m=h==null?void 0:h.visibilityTrigger)==null?void 0:m.call(h,s),onPointerDown(d){pe(d)&&u&&(d.preventDefault(),e.send({type:"TRIGGER.CLICK"}))}}))},getIndicatorProps(){return t.element(y(g({},qi.indicator.attrs),{"aria-hidden":!0,"data-state":s?"visible":"hidden","data-disabled":E(a),"data-invalid":E(o),"data-readonly":E(l)}))},getControlProps(){return t.element(y(g({},qi.control.attrs),{"data-disabled":E(a),"data-invalid":E(o),"data-readonly":E(l)}))}}}var YT,qi,ba,Ll,XT,ZT,JT,SA,QT,eO,op=re(()=>{"use strict";se();YT=U("password-input").parts("root","input","label","control","indicator","visibilityTrigger"),qi=YT.build(),ba=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.input)!=null?n:`p-input-${e.id}-input`},Ll=e=>e.getById(ba(e));XT={"data-1p-ignore":"","data-lpignore":"true","data-bwignore":"true","data-form-type":"other","data-protonpass-ignore":"true"},ZT={props({props:e}){return y(g({id:ur(),defaultVisible:!1,autoComplete:"current-password",ignorePasswordManagers:!1},e),{translations:g({visibilityTrigger(t){return t?"Hide password":"Show password"}},e.translations)})},context({prop:e,bindable:t}){return{visible:t(()=>({value:e("visible"),defaultValue:e("defaultVisible"),onChange(n){var i;(i=e("onVisibilityChange"))==null||i({visible:n})}}))}},initialState(){return"idle"},effects:["trackFormEvents"],states:{idle:{on:{"VISIBILITY.SET":{actions:["setVisibility"]},"TRIGGER.CLICK":{actions:["toggleVisibility","focusInputEl"]}}}},implementations:{actions:{setVisibility({context:e,event:t}){e.set("visible",t.value)},toggleVisibility({context:e}){e.set("visible",t=>!t)},focusInputEl({scope:e}){let t=Ll(e);t==null||t.focus()}},effects:{trackFormEvents({scope:e,send:t}){let n=Ll(e),i=n==null?void 0:n.form;if(!i)return;let r=e.getWin(),s=new r.AbortController;return i.addEventListener("reset",a=>{a.defaultPrevented||t({type:"VISIBILITY.SET",value:!1})},{signal:s.signal}),i.addEventListener("submit",()=>{t({type:"VISIBILITY.SET",value:!1})},{signal:s.signal}),()=>s.abort()}}}},JT=_()(["defaultVisible","dir","id","onVisibilityChange","visible","ids","getRootNode","disabled","invalid","required","readOnly","translations","ignorePasswordManagers","autoComplete","name"]),SA=B(JT),QT=class extends K{initMachine(e){return new W(ZT,e)}initApi(){return jT(this.machine.service,q)}render(){var a;let e=(a=this.el.querySelector('[data-scope="password-input"][data-part="root"]'))!=null?a:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="password-input"][data-part="label"]');t&&this.spreadProps(t,this.api.getLabelProps());let n=this.el.querySelector('[data-scope="password-input"][data-part="control"]');n&&this.spreadProps(n,this.api.getControlProps());let i=this.el.querySelector('[data-scope="password-input"][data-part="input"]');i&&this.spreadProps(i,this.api.getInputProps());let r=this.el.querySelector('[data-scope="password-input"][data-part="visibility-trigger"]');r&&this.spreadProps(r,this.api.getVisibilityTriggerProps());let s=this.el.querySelector('[data-scope="password-input"][data-part="indicator"]');s&&this.spreadProps(s,this.api.getIndicatorProps())}},eO={mounted(){let e=this.el,t=new QT(e,y(g({id:e.id},C(e,"controlledVisible")?{visible:C(e,"visible")}:{defaultVisible:C(e,"defaultVisible")}),{disabled:C(e,"disabled"),invalid:C(e,"invalid"),readOnly:C(e,"readOnly"),required:C(e,"required"),ignorePasswordManagers:C(e,"ignorePasswordManagers"),name:w(e,"name"),dir:Oe(e),autoComplete:w(e,"autoComplete",["current-password","new-password"]),onVisibilityChange:n=>{let i=w(e,"onVisibilityChange");i&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(i,{visible:n.visible,id:e.id});let r=w(e,"onVisibilityChangeClient");r&&e.dispatchEvent(new CustomEvent(r,{bubbles:!0,detail:{value:n,id:e.id}}))}}));t.init(),this.passwordInput=t,this.handlers=[]},updated(){var e;(e=this.passwordInput)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlledVisible")?{visible:C(this.el,"visible")}:{}),{disabled:C(this.el,"disabled"),invalid:C(this.el,"invalid"),readOnly:C(this.el,"readOnly"),required:C(this.el,"required"),name:w(this.el,"name"),form:w(this.el,"form"),dir:Oe(this.el)}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.passwordInput)==null||e.destroy()}}});var dp={};he(dp,{PinInput:()=>fO});function lO(e,t){var n;return e?!!((n=oO[e])!=null&&n.test(t)):!0}function cp(e,t,n){return n?new RegExp(n,"g").test(e):lO(t,e)}function cO(e,t){let{send:n,context:i,computed:r,prop:s,scope:a}=e,o=r("isValueComplete"),l=!!s("disabled"),c=!!s("readOnly"),u=!!s("invalid"),h=!!s("required"),m=s("translations"),d=i.get("focusedIndex");function p(){var v;(v=aO(a))==null||v.focus()}return{focus:p,count:i.get("count"),items:Array.from({length:i.get("count")}).map((v,I)=>I),value:i.get("value"),valueAsString:r("valueAsString"),complete:o,setValue(v){Array.isArray(v)||vs("[pin-input/setValue] value must be an array"),n({type:"VALUE.SET",value:v})},clearValue(){n({type:"VALUE.CLEAR"})},setValueAtIndex(v,I){n({type:"VALUE.SET",value:I,index:v})},getRootProps(){return t.element(y(g({dir:s("dir")},Ea.root.attrs),{id:Fr(a),"data-invalid":E(u),"data-disabled":E(l),"data-complete":E(o),"data-readonly":E(c)}))},getLabelProps(){return t.label(y(g({},Ea.label.attrs),{dir:s("dir"),htmlFor:Fl(a),id:iO(a),"data-invalid":E(u),"data-disabled":E(l),"data-complete":E(o),"data-required":E(h),"data-readonly":E(c),onClick(v){v.preventDefault(),p()}}))},getHiddenInputProps(){return t.input({"aria-hidden":!0,type:"text",tabIndex:-1,id:Fl(a),readOnly:c,disabled:l,required:h,name:s("name"),form:s("form"),style:Vt,maxLength:r("valueLength"),defaultValue:r("valueAsString")})},getControlProps(){return t.element(y(g({},Ea.control.attrs),{dir:s("dir"),id:rO(a)}))},getInputProps(v){var O;let{index:I}=v,T=s("type")==="numeric"?"tel":"text";return t.input(y(g({},Ea.input.attrs),{dir:s("dir"),disabled:l,"data-disabled":E(l),"data-complete":E(o),id:nO(a,I.toString()),"data-index":I,"data-ownedby":Fr(a),"aria-label":(O=m==null?void 0:m.inputLabel)==null?void 0:O.call(m,I,r("valueLength")),inputMode:s("otp")||s("type")==="numeric"?"numeric":"text","aria-invalid":X(u),"data-invalid":E(u),type:s("mask")?"password":T,defaultValue:i.get("value")[I]||"",readOnly:c,autoCapitalize:"none",autoComplete:s("otp")?"one-time-code":"off",placeholder:d===I?"":s("placeholder"),onPaste(b){var P;let f=(P=b.clipboardData)==null?void 0:P.getData("text/plain");if(!f)return;if(!cp(f,s("type"),s("pattern"))){n({type:"VALUE.INVALID",value:f}),b.preventDefault();return}b.preventDefault(),n({type:"INPUT.PASTE",value:f})},onBeforeInput(b){try{let f=Oc(b);cp(f,s("type"),s("pattern"))||(n({type:"VALUE.INVALID",value:f}),b.preventDefault()),f.length>1&&b.currentTarget.setSelectionRange(0,1,"forward")}catch(f){}},onChange(b){let f=Yt(b),{value:S}=b.currentTarget;if(f.inputType==="insertFromPaste"){b.currentTarget.value=S[0]||"";return}if(S.length>2){n({type:"INPUT.PASTE",value:S}),b.currentTarget.value=S[0],b.preventDefault();return}if(f.inputType==="deleteContentBackward"){n({type:"INPUT.BACKSPACE"});return}n({type:"INPUT.CHANGE",value:S,index:I})},onKeyDown(b){if(b.defaultPrevented||Re(b)||xe(b))return;let S={Backspace(){n({type:"INPUT.BACKSPACE"})},Delete(){n({type:"INPUT.DELETE"})},ArrowLeft(){n({type:"INPUT.ARROW_LEFT"})},ArrowRight(){n({type:"INPUT.ARROW_RIGHT"})},Enter(){n({type:"INPUT.ENTER"})}}[ge(b,{dir:s("dir"),orientation:"horizontal"})];S&&(S(b),b.preventDefault())},onFocus(){n({type:"INPUT.FOCUS",index:I})},onBlur(b){let f=b.relatedTarget;le(f)&&f.dataset.ownedby===Fr(a)||n({type:"INPUT.BLUR",index:I})}}))}}}function up(e,t){let n=t;e[0]===t[0]?n=t[1]:e[0]===t[1]&&(n=t[0]);let i=n.split("");return n=i[i.length-1],n!=null?n:""}function Ia(e,t){return Array.from({length:t}).fill("").map((n,i)=>e[i]||n)}var tO,Ea,Fr,nO,Fl,iO,rO,sO,Pa,Mr,aO,lp,Ml,oO,uO,dO,hO,gO,VA,pO,fO,hp=re(()=>{"use strict";se();tO=U("pinInput").parts("root","label","input","control"),Ea=tO.build(),Fr=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`pin-input:${e.id}`},nO=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.input)==null?void 0:i.call(n,t))!=null?r:`pin-input:${e.id}:${t}`},Fl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.hiddenInput)!=null?n:`pin-input:${e.id}:hidden`},iO=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`pin-input:${e.id}:label`},rO=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`pin-input:${e.id}:control`},sO=e=>e.getById(Fr(e)),Pa=e=>{let n=`input[data-ownedby=${CSS.escape(Fr(e))}]`;return Fe(sO(e),n)},Mr=(e,t)=>Pa(e)[t],aO=e=>Pa(e)[0],lp=e=>e.getById(Fl(e)),Ml=(e,t)=>{e.value=t,e.setAttribute("value",t)},oO={numeric:/^[0-9]+$/,alphabetic:/^[A-Za-z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/i};({choose:uO,createMachine:dO}=ut()),hO=dO({props({props:e}){return y(g({placeholder:"\u25CB",otp:!1,type:"numeric",defaultValue:e.count?Ia([],e.count):[]},e),{translations:g({inputLabel:(t,n)=>`pin code ${t+1} of ${n}`},e.translations)})},initialState(){return"idle"},context({prop:e,bindable:t}){return{value:t(()=>({value:e("value"),defaultValue:e("defaultValue"),isEqual:fe,onChange(n){var i;(i=e("onValueChange"))==null||i({value:n,valueAsString:n.join("")})}})),focusedIndex:t(()=>({sync:!0,defaultValue:-1})),count:t(()=>({defaultValue:e("count")}))}},computed:{_value:({context:e})=>Ia(e.get("value"),e.get("count")),valueLength:({computed:e})=>e("_value").length,filledValueLength:({computed:e})=>e("_value").filter(t=>(t==null?void 0:t.trim())!=="").length,isValueComplete:({computed:e})=>e("valueLength")===e("filledValueLength"),valueAsString:({computed:e})=>e("_value").join(""),focusedValue:({computed:e,context:t})=>e("_value")[t.get("focusedIndex")]||""},entry:uO([{guard:"autoFocus",actions:["setInputCount","setFocusIndexToFirst"]},{actions:["setInputCount"]}]),watch({action:e,track:t,context:n,computed:i}){t([()=>n.get("focusedIndex")],()=>{e(["focusInput","selectInputIfNeeded"])}),t([()=>n.get("value").join(",")],()=>{e(["syncInputElements","dispatchInputEvent"])}),t([()=>i("isValueComplete")],()=>{e(["invokeOnComplete","blurFocusedInputIfNeeded"])})},on:{"VALUE.SET":[{guard:"hasIndex",actions:["setValueAtIndex"]},{actions:["setValue"]}],"VALUE.CLEAR":{actions:["clearValue","setFocusIndexToFirst"]}},states:{idle:{on:{"INPUT.FOCUS":{target:"focused",actions:["setFocusedIndex"]}}},focused:{on:{"INPUT.CHANGE":{actions:["setFocusedValue","syncInputValue","setNextFocusedIndex"]},"INPUT.PASTE":{actions:["setPastedValue","setLastValueFocusIndex"]},"INPUT.FOCUS":{actions:["setFocusedIndex"]},"INPUT.BLUR":{target:"idle",actions:["clearFocusedIndex"]},"INPUT.DELETE":{guard:"hasValue",actions:["clearFocusedValue"]},"INPUT.ARROW_LEFT":{actions:["setPrevFocusedIndex"]},"INPUT.ARROW_RIGHT":{actions:["setNextFocusedIndex"]},"INPUT.BACKSPACE":[{guard:"hasValue",actions:["clearFocusedValue"]},{actions:["setPrevFocusedIndex","clearFocusedValue"]}],"INPUT.ENTER":{guard:"isValueComplete",actions:["requestFormSubmit"]},"VALUE.INVALID":{actions:["invokeOnInvalid"]}}}},implementations:{guards:{autoFocus:({prop:e})=>!!e("autoFocus"),hasValue:({context:e})=>e.get("value")[e.get("focusedIndex")]!=="",isValueComplete:({computed:e})=>e("isValueComplete"),hasIndex:({event:e})=>e.index!==void 0},actions:{dispatchInputEvent({computed:e,scope:t}){let n=lp(t);Ac(n,{value:e("valueAsString")})},setInputCount({scope:e,context:t,prop:n}){if(n("count"))return;let i=Pa(e);t.set("count",i.length)},focusInput({context:e,scope:t}){var i;let n=e.get("focusedIndex");n!==-1&&((i=Mr(t,n))==null||i.focus({preventScroll:!0}))},selectInputIfNeeded({context:e,prop:t,scope:n}){let i=e.get("focusedIndex");!t("selectOnFocus")||i===-1||H(()=>{var r;(r=Mr(n,i))==null||r.select()})},invokeOnComplete({computed:e,prop:t}){var n;e("isValueComplete")&&((n=t("onValueComplete"))==null||n({value:e("_value"),valueAsString:e("valueAsString")}))},invokeOnInvalid({context:e,event:t,prop:n}){var i;(i=n("onValueInvalid"))==null||i({value:t.value,index:e.get("focusedIndex")})},clearFocusedIndex({context:e}){e.set("focusedIndex",-1)},setFocusedIndex({context:e,event:t}){e.set("focusedIndex",t.index)},setValue({context:e,event:t}){let n=Ia(t.value,e.get("count"));e.set("value",n)},setFocusedValue({context:e,event:t,computed:n,flush:i}){let r=n("focusedValue"),s=e.get("focusedIndex"),a=up(r,t.value);i(()=>{e.set("value",ms(n("_value"),s,a))})},revertInputValue({context:e,computed:t,scope:n}){let i=Mr(n,e.get("focusedIndex"));Ml(i,t("focusedValue"))},syncInputValue({context:e,event:t,scope:n}){let i=e.get("value"),r=Mr(n,t.index);Ml(r,i[t.index])},syncInputElements({context:e,scope:t}){let n=Pa(t),i=e.get("value");n.forEach((r,s)=>{Ml(r,i[s])})},setPastedValue({context:e,event:t,computed:n,flush:i}){H(()=>{let r=n("valueAsString"),s=e.get("focusedIndex"),a=n("valueLength"),o=n("filledValueLength"),l=Math.min(s,o),c=l>0?r.substring(0,s):"",u=t.value.substring(0,a-l),h=Ia(`${c}${u}`.split(""),a);i(()=>{e.set("value",h)})})},setValueAtIndex({context:e,event:t,computed:n}){let i=up(n("focusedValue"),t.value);e.set("value",ms(n("_value"),t.index,i))},clearValue({context:e}){let t=Array.from({length:e.get("count")}).fill("");queueMicrotask(()=>{e.set("value",t)})},clearFocusedValue({context:e,computed:t}){let n=e.get("focusedIndex");n!==-1&&e.set("value",ms(t("_value"),n,""))},setFocusIndexToFirst({context:e}){e.set("focusedIndex",0)},setNextFocusedIndex({context:e,computed:t}){e.set("focusedIndex",Math.min(e.get("focusedIndex")+1,t("valueLength")-1))},setPrevFocusedIndex({context:e}){e.set("focusedIndex",Math.max(e.get("focusedIndex")-1,0))},setLastValueFocusIndex({context:e,computed:t}){H(()=>{e.set("focusedIndex",Math.min(t("filledValueLength"),t("valueLength")-1))})},blurFocusedInputIfNeeded({context:e,prop:t,scope:n}){t("blurOnComplete")&&H(()=>{var i;(i=Mr(n,e.get("focusedIndex")))==null||i.blur()})},requestFormSubmit({computed:e,prop:t,scope:n}){var r;if(!t("name")||!e("isValueComplete"))return;let i=lp(n);(r=i==null?void 0:i.form)==null||r.requestSubmit()}}}});gO=_()(["autoFocus","blurOnComplete","count","defaultValue","dir","disabled","form","getRootNode","id","ids","invalid","mask","name","onValueChange","onValueComplete","onValueInvalid","otp","pattern","placeholder","readOnly","required","selectOnFocus","translations","type","value"]),VA=B(gO),pO=class extends K{initMachine(e){return new W(hO,e)}initApi(){return cO(this.machine.service,q)}render(){var r;let e=(r=this.el.querySelector('[data-scope="pin-input"][data-part="root"]'))!=null?r:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="pin-input"][data-part="label"]');t&&this.spreadProps(t,this.api.getLabelProps());let n=this.el.querySelector('[data-scope="pin-input"][data-part="hidden-input"]');n&&this.spreadProps(n,this.api.getHiddenInputProps());let i=this.el.querySelector('[data-scope="pin-input"][data-part="control"]');i&&this.spreadProps(i,this.api.getControlProps()),this.api.items.forEach(s=>{let a=this.el.querySelector(`[data-scope="pin-input"][data-part="input"][data-index="${s}"]`);a&&this.spreadProps(a,this.api.getInputProps({index:s}))})}},fO={mounted(){var s;let e=this.el,t=Q(e,"value"),n=Q(e,"defaultValue"),i=C(e,"controlled"),r=new pO(e,y(g({id:e.id,count:(s=Y(e,"count"))!=null?s:4},i&&t?{value:t}:{defaultValue:n!=null?n:[]}),{disabled:C(e,"disabled"),invalid:C(e,"invalid"),required:C(e,"required"),readOnly:C(e,"readOnly"),mask:C(e,"mask"),otp:C(e,"otp"),blurOnComplete:C(e,"blurOnComplete"),selectOnFocus:C(e,"selectOnFocus"),name:w(e,"name"),form:w(e,"form"),dir:w(e,"dir",["ltr","rtl"]),type:w(e,"type",["alphanumeric","numeric","alphabetic"]),placeholder:w(e,"placeholder"),onValueChange:a=>{let o=e.querySelector('[data-scope="pin-input"][data-part="hidden-input"]');o&&(o.value=a.valueAsString,o.dispatchEvent(new Event("input",{bubbles:!0})),o.dispatchEvent(new Event("change",{bubbles:!0})));let l=w(e,"onValueChange");l&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(l,{value:a.value,valueAsString:a.valueAsString,id:e.id});let c=w(e,"onValueChangeClient");c&&e.dispatchEvent(new CustomEvent(c,{bubbles:!0,detail:{value:a,id:e.id}}))},onValueComplete:a=>{let o=w(e,"onValueComplete");o&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(o,{value:a.value,valueAsString:a.valueAsString,id:e.id})}}));r.init(),this.pinInput=r,this.handlers=[]},updated(){var n,i,r,s;let e=Q(this.el,"value"),t=C(this.el,"controlled");(s=this.pinInput)==null||s.updateProps(y(g({id:this.el.id,count:(r=(i=Y(this.el,"count"))!=null?i:(n=this.pinInput)==null?void 0:n.api.count)!=null?r:4},t&&e?{value:e}:{}),{disabled:C(this.el,"disabled"),invalid:C(this.el,"invalid"),required:C(this.el,"required"),readOnly:C(this.el,"readOnly"),name:w(this.el,"name"),form:w(this.el,"form")}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.pinInput)==null||e.destroy()}}});var vp={};he(vp,{RadioGroup:()=>kO});function TO(e,t){let{context:n,send:i,computed:r,prop:s,scope:a}=e,o=r("isDisabled"),l=s("invalid"),c=s("readOnly");function u(d){return{value:d.value,invalid:!!d.invalid||!!l,disabled:!!d.disabled||o,checked:n.get("value")===d.value,focused:n.get("focusedValue")===d.value,focusVisible:n.get("focusVisibleValue")===d.value,hovered:n.get("hoveredValue")===d.value,active:n.get("activeValue")===d.value}}function h(d){let p=u(d);return{"data-focus":E(p.focused),"data-focus-visible":E(p.focusVisible),"data-disabled":E(p.disabled),"data-readonly":E(c),"data-state":p.checked?"checked":"unchecked","data-hover":E(p.hovered),"data-invalid":E(p.invalid),"data-orientation":s("orientation"),"data-ssr":E(n.get("ssr"))}}let m=()=>{var p;let d=(p=PO(a))!=null?p:IO(a);d==null||d.focus()};return{focus:m,value:n.get("value"),setValue(d){i({type:"SET_VALUE",value:d,isTrusted:!1})},clearValue(){i({type:"SET_VALUE",value:null,isTrusted:!1})},getRootProps(){return t.element(y(g({},Wi.root.attrs),{role:"radiogroup",id:Ca(a),"aria-labelledby":gp(a),"aria-required":s("required")||void 0,"aria-disabled":o||void 0,"aria-readonly":c||void 0,"data-orientation":s("orientation"),"data-disabled":E(o),"data-invalid":E(l),"data-required":E(s("required")),"aria-orientation":s("orientation"),dir:s("dir"),style:{position:"relative"}}))},getLabelProps(){return t.element(y(g({},Wi.label.attrs),{dir:s("dir"),"data-orientation":s("orientation"),"data-disabled":E(o),"data-invalid":E(l),"data-required":E(s("required")),id:gp(a),onClick:m}))},getItemState:u,getItemProps(d){let p=u(d);return t.label(y(g(y(g({},Wi.item.attrs),{dir:s("dir"),id:fp(a,d.value),htmlFor:$l(a,d.value)}),h(d)),{onPointerMove(){p.disabled||p.hovered||i({type:"SET_HOVERED",value:d.value,hovered:!0})},onPointerLeave(){p.disabled||i({type:"SET_HOVERED",value:null})},onPointerDown(v){p.disabled||pe(v)&&(p.focused&&v.pointerType==="mouse"&&v.preventDefault(),i({type:"SET_ACTIVE",value:d.value,active:!0}))},onPointerUp(){p.disabled||i({type:"SET_ACTIVE",value:null})},onClick(){var v;!p.disabled&&Xe()&&((v=bO(a,d.value))==null||v.focus())}}))},getItemTextProps(d){return t.element(g(y(g({},Wi.itemText.attrs),{dir:s("dir"),id:yO(a,d.value)}),h(d)))},getItemControlProps(d){let p=u(d);return t.element(g(y(g({},Wi.itemControl.attrs),{dir:s("dir"),id:vO(a,d.value),"data-active":E(p.active),"aria-hidden":!0}),h(d)))},getItemHiddenInputProps(d){let p=u(d);return t.input({"data-ownedby":Ca(a),id:$l(a,d.value),type:"radio",name:s("name")||s("id"),form:s("form"),value:d.value,required:s("required"),"aria-invalid":p.invalid||void 0,onClick(v){if(c){v.preventDefault();return}v.currentTarget.checked&&i({type:"SET_VALUE",value:d.value,isTrusted:!0})},onBlur(){i({type:"SET_FOCUSED",value:null,focused:!1,focusVisible:!1})},onFocus(){let v=En();i({type:"SET_FOCUSED",value:d.value,focused:!0,focusVisible:v})},onKeyDown(v){v.defaultPrevented||v.key===" "&&i({type:"SET_ACTIVE",value:d.value,active:!0})},onKeyUp(v){v.defaultPrevented||v.key===" "&&i({type:"SET_ACTIVE",value:null})},disabled:p.disabled||c,defaultChecked:p.checked,style:Vt})},getIndicatorProps(){let d=n.get("indicatorRect"),p=d==null||d.width===0&&d.height===0&&d.x===0&&d.y===0;return t.element(y(g({id:mp(a)},Wi.indicator.attrs),{dir:s("dir"),hidden:n.get("value")==null||p,"data-disabled":E(o),"data-orientation":s("orientation"),style:{"--transition-property":"left, top, width, height","--left":ye(d==null?void 0:d.x),"--top":ye(d==null?void 0:d.y),"--width":ye(d==null?void 0:d.width),"--height":ye(d==null?void 0:d.height),position:"absolute",willChange:"var(--transition-property)",transitionProperty:"var(--transition-property)",transitionDuration:"var(--transition-duration, 150ms)",transitionTimingFunction:"var(--transition-timing-function)",[s("orientation")==="horizontal"?"left":"top"]:s("orientation")==="horizontal"?"var(--left)":"var(--top)"}}))}}}var mO,Wi,Ca,gp,fp,$l,vO,yO,mp,Sa,bO,EO,IO,PO,pp,CO,SO,OO,wO,VO,RA,xO,DA,AO,kO,yp=re(()=>{"use strict";pr();se();mO=U("radio-group").parts("root","label","item","itemText","itemControl","indicator"),Wi=mO.build(),Ca=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`radio-group:${e.id}`},gp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`radio-group:${e.id}:label`},fp=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`radio-group:${e.id}:radio:${t}`},$l=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemHiddenInput)==null?void 0:i.call(n,t))!=null?r:`radio-group:${e.id}:radio:input:${t}`},vO=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemControl)==null?void 0:i.call(n,t))!=null?r:`radio-group:${e.id}:radio:control:${t}`},yO=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemLabel)==null?void 0:i.call(n,t))!=null?r:`radio-group:${e.id}:radio:label:${t}`},mp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicator)!=null?n:`radio-group:${e.id}:indicator`},Sa=e=>e.getById(Ca(e)),bO=(e,t)=>e.getById($l(e,t)),EO=e=>e.getById(mp(e)),IO=e=>{var t;return(t=Sa(e))==null?void 0:t.querySelector("input:not(:disabled)")},PO=e=>{var t;return(t=Sa(e))==null?void 0:t.querySelector("input:not(:disabled):checked")},pp=e=>{let n=`input[type=radio][data-ownedby='${CSS.escape(Ca(e))}']:not([disabled])`;return Fe(Sa(e),n)},CO=(e,t)=>{if(t)return e.getById(fp(e,t))},SO=e=>{var t,n,i,r;return{x:(t=e==null?void 0:e.offsetLeft)!=null?t:0,y:(n=e==null?void 0:e.offsetTop)!=null?n:0,width:(i=e==null?void 0:e.offsetWidth)!=null?i:0,height:(r=e==null?void 0:e.offsetHeight)!=null?r:0}};({not:OO}=Ee()),wO={props({props:e}){return g({orientation:"vertical"},e)},initialState(){return"idle"},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var i;(i=e("onValueChange"))==null||i({value:n})}})),activeValue:t(()=>({defaultValue:null})),focusedValue:t(()=>({defaultValue:null})),focusVisibleValue:t(()=>({defaultValue:null})),hoveredValue:t(()=>({defaultValue:null})),indicatorRect:t(()=>({defaultValue:null})),fieldsetDisabled:t(()=>({defaultValue:!1})),ssr:t(()=>({defaultValue:!0}))}},refs(){return{indicatorCleanup:null,focusVisibleValue:null}},computed:{isDisabled:({prop:e,context:t})=>!!e("disabled")||t.get("fieldsetDisabled")},entry:["syncIndicatorRect","syncSsr"],exit:["cleanupObserver"],effects:["trackFormControlState","trackFocusVisible"],watch({track:e,action:t,context:n}){e([()=>n.get("value")],()=>{t(["syncIndicatorRect","syncInputElements"])})},on:{SET_VALUE:[{guard:OO("isTrusted"),actions:["setValue","dispatchChangeEvent"]},{actions:["setValue"]}],SET_HOVERED:{actions:["setHovered"]},SET_ACTIVE:{actions:["setActive"]},SET_FOCUSED:{actions:["setFocused"]}},states:{idle:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackFormControlState({context:e,scope:t}){return wt(Sa(t),{onFieldsetDisabledChange(n){e.set("fieldsetDisabled",n)},onFormReset(){e.set("value",e.initial("value"))}})},trackFocusVisible({scope:e}){var t;return Pn({root:(t=e.getRootNode)==null?void 0:t.call(e)})}},actions:{setValue({context:e,event:t}){e.set("value",t.value)},setHovered({context:e,event:t}){e.set("hoveredValue",t.value)},setActive({context:e,event:t}){e.set("activeValue",t.value)},setFocused({context:e,event:t}){e.set("focusedValue",t.value);let n=t.value!=null&&t.focusVisible?t.value:null;e.set("focusVisibleValue",n)},syncInputElements({context:e,scope:t}){pp(t).forEach(i=>{i.checked=i.value===e.get("value")})},cleanupObserver({refs:e}){var t;(t=e.get("indicatorCleanup"))==null||t()},syncSsr({context:e}){e.set("ssr",!1)},syncIndicatorRect({context:e,scope:t,refs:n}){var o;if((o=n.get("indicatorCleanup"))==null||o(),!EO(t))return;let i=e.get("value"),r=CO(t,i);if(i==null||!r){e.set("indicatorRect",null);return}let s=()=>{e.set("indicatorRect",SO(r))};s();let a=gn.observe(r,s);n.set("indicatorCleanup",a)},dispatchChangeEvent({context:e,scope:t}){pp(t).forEach(i=>{let r=i.value===e.get("value");r!==i.checked&&pi(i,{checked:r})})}}}},VO=_()(["dir","disabled","form","getRootNode","id","ids","invalid","name","onValueChange","orientation","readOnly","required","value","defaultValue"]),RA=B(VO),xO=_()(["value","disabled","invalid"]),DA=B(xO),AO=class extends K{initMachine(e){return new W(wO,e)}initApi(){return TO(this.machine.service,q)}render(){var i;let e=(i=this.el.querySelector('[data-scope="radio-group"][data-part="root"]'))!=null?i:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="radio-group"][data-part="label"]');t&&this.spreadProps(t,this.api.getLabelProps());let n=this.el.querySelector('[data-scope="radio-group"][data-part="indicator"]');n&&this.spreadProps(n,this.api.getIndicatorProps()),this.el.querySelectorAll('[data-scope="radio-group"][data-part="item"]').forEach(r=>{let s=r.dataset.value;if(s==null)return;let a=r.dataset.disabled==="true",o=r.dataset.invalid==="true";this.spreadProps(r,this.api.getItemProps({value:s,disabled:a,invalid:o}));let l=r.querySelector('[data-scope="radio-group"][data-part="item-text"]');l&&this.spreadProps(l,this.api.getItemTextProps({value:s,disabled:a,invalid:o}));let c=r.querySelector('[data-scope="radio-group"][data-part="item-control"]');c&&this.spreadProps(c,this.api.getItemControlProps({value:s,disabled:a,invalid:o}));let u=r.querySelector('[data-scope="radio-group"][data-part="item-hidden-input"]');u&&this.spreadProps(u,this.api.getItemHiddenInputProps({value:s,disabled:a,invalid:o}))})}},kO={mounted(){let e=this.el,t=w(e,"value"),n=w(e,"defaultValue"),i=C(e,"controlled"),r=new AO(e,y(g({id:e.id},i&&t!==void 0?{value:t!=null?t:null}:{defaultValue:n!=null?n:null}),{name:w(e,"name"),form:w(e,"form"),disabled:C(e,"disabled"),invalid:C(e,"invalid"),required:C(e,"required"),readOnly:C(e,"readOnly"),dir:w(e,"dir",["ltr","rtl"]),orientation:w(e,"orientation",["horizontal","vertical"]),onValueChange:s=>{let a=w(e,"onValueChange");a&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(a,{value:s.value,id:e.id});let o=w(e,"onValueChangeClient");o&&e.dispatchEvent(new CustomEvent(o,{bubbles:!0,detail:{value:s,id:e.id}}))}}));r.init(),this.radioGroup=r,this.handlers=[]},updated(){var n;let e=w(this.el,"value"),t=C(this.el,"controlled");(n=this.radioGroup)==null||n.updateProps(y(g({id:this.el.id},t&&e!==void 0?{value:e!=null?e:null}:{}),{name:w(this.el,"name"),form:w(this.el,"form"),disabled:C(this.el,"disabled"),invalid:C(this.el,"invalid"),required:C(this.el,"required"),readOnly:C(this.el,"readOnly"),orientation:w(this.el,"orientation",["horizontal","vertical"])}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.radioGroup)==null||e.destroy()}}});var Tp={};he(Tp,{Select:()=>zO});function FO(e,t){let{context:n,prop:i,scope:r,state:s,computed:a,send:o}=e,l=i("disabled")||n.get("fieldsetDisabled"),c=!!i("invalid"),u=!!i("required"),h=!!i("readOnly"),m=i("composite"),d=i("collection"),p=s.hasTag("open"),v=s.matches("focused"),I=n.get("highlightedValue"),T=n.get("highlightedItem"),O=n.get("selectedItems"),b=n.get("currentPlacement"),f=a("isTypingAhead"),S=a("isInteractive"),P=I?Ul(r,I):void 0;function V(x){let k=d.getItemDisabled(x.item),N=d.getItemValue(x.item);return vn(N,()=>`[zag-js] No value found for item ${JSON.stringify(x.item)}`),{value:N,disabled:!!(l||k),highlighted:I===N,selected:n.get("value").includes(N)}}let A=On(y(g({},i("positioning")),{placement:b}));return{open:p,focused:v,empty:n.get("value").length===0,highlightedItem:T,highlightedValue:I,selectedItems:O,hasSelectedItems:a("hasSelectedItems"),value:n.get("value"),valueAsString:a("valueAsString"),collection:d,multiple:!!i("multiple"),disabled:!!l,reposition(x={}){o({type:"POSITIONING.SET",options:x})},focus(){var x;(x=ri(r))==null||x.focus({preventScroll:!0})},setOpen(x){s.hasTag("open")!==x&&o({type:x?"OPEN":"CLOSE"})},selectValue(x){o({type:"ITEM.SELECT",value:x})},setValue(x){o({type:"VALUE.SET",value:x})},selectAll(){o({type:"VALUE.SET",value:d.getValues()})},setHighlightValue(x){o({type:"HIGHLIGHTED_VALUE.SET",value:x})},clearHighlightValue(){o({type:"HIGHLIGHTED_VALUE.CLEAR"})},clearValue(x){o(x?{type:"ITEM.CLEAR",value:x}:{type:"VALUE.CLEAR"})},getItemState:V,getRootProps(){return t.element(y(g({},_e.root.attrs),{dir:i("dir"),id:RO(r),"data-invalid":E(c),"data-readonly":E(h)}))},getLabelProps(){return t.label(y(g({dir:i("dir"),id:Ta(r)},_e.label.attrs),{"data-disabled":E(l),"data-invalid":E(c),"data-readonly":E(h),"data-required":E(u),htmlFor:ql(r),onClick(x){var k;x.defaultPrevented||l||(k=ri(r))==null||k.focus({preventScroll:!0})}}))},getControlProps(){return t.element(y(g({},_e.control.attrs),{dir:i("dir"),id:DO(r),"data-state":p?"open":"closed","data-focus":E(v),"data-disabled":E(l),"data-invalid":E(c)}))},getValueTextProps(){return t.element(y(g({},_e.valueText.attrs),{dir:i("dir"),"data-disabled":E(l),"data-invalid":E(c),"data-focus":E(v)}))},getTriggerProps(){return t.button(y(g({id:Gl(r),disabled:l,dir:i("dir"),type:"button",role:"combobox","aria-controls":_l(r),"aria-expanded":p,"aria-haspopup":"listbox","data-state":p?"open":"closed","aria-invalid":c,"aria-required":u,"aria-labelledby":Ta(r)},_e.trigger.attrs),{"data-disabled":E(l),"data-invalid":E(c),"data-readonly":E(h),"data-placement":b,"data-placeholder-shown":E(!a("hasSelectedItems")),onClick(x){S&&(x.defaultPrevented||o({type:"TRIGGER.CLICK"}))},onFocus(){o({type:"TRIGGER.FOCUS"})},onBlur(){o({type:"TRIGGER.BLUR"})},onKeyDown(x){if(x.defaultPrevented||!S)return;let N={ArrowUp(){o({type:"TRIGGER.ARROW_UP"})},ArrowDown(D){o({type:D.altKey?"OPEN":"TRIGGER.ARROW_DOWN"})},ArrowLeft(){o({type:"TRIGGER.ARROW_LEFT"})},ArrowRight(){o({type:"TRIGGER.ARROW_RIGHT"})},Home(){o({type:"TRIGGER.HOME"})},End(){o({type:"TRIGGER.END"})},Enter(){o({type:"TRIGGER.ENTER"})},Space(D){o(f?{type:"TRIGGER.TYPEAHEAD",key:D.key}:{type:"TRIGGER.ENTER"})}}[ge(x,{dir:i("dir"),orientation:"vertical"})];if(N){N(x),x.preventDefault();return}Ue.isValidEvent(x)&&(o({type:"TRIGGER.TYPEAHEAD",key:x.key}),x.preventDefault())}}))},getIndicatorProps(){return t.element(y(g({},_e.indicator.attrs),{dir:i("dir"),"aria-hidden":!0,"data-state":p?"open":"closed","data-disabled":E(l),"data-invalid":E(c),"data-readonly":E(h)}))},getItemProps(x){let k=V(x);return t.element(y(g({id:Ul(r,k.value),role:"option"},_e.item.attrs),{dir:i("dir"),"data-value":k.value,"aria-selected":k.selected,"data-state":k.selected?"checked":"unchecked","data-highlighted":E(k.highlighted),"data-disabled":E(k.disabled),"aria-disabled":X(k.disabled),onPointerMove(N){k.disabled||N.pointerType!=="mouse"||k.value!==I&&o({type:"ITEM.POINTER_MOVE",value:k.value})},onClick(N){N.defaultPrevented||k.disabled||o({type:"ITEM.CLICK",src:"pointerup",value:k.value})},onPointerLeave(N){var $;k.disabled||x.persistFocus||N.pointerType!=="mouse"||!(($=e.event.previous())!=null&&$.type.includes("POINTER"))||o({type:"ITEM.POINTER_LEAVE"})}}))},getItemTextProps(x){let k=V(x);return t.element(y(g({},_e.itemText.attrs),{"data-state":k.selected?"checked":"unchecked","data-disabled":E(k.disabled),"data-highlighted":E(k.highlighted)}))},getItemIndicatorProps(x){let k=V(x);return t.element(y(g({"aria-hidden":!0},_e.itemIndicator.attrs),{"data-state":k.selected?"checked":"unchecked",hidden:!k.selected}))},getItemGroupLabelProps(x){let{htmlFor:k}=x;return t.element(y(g({},_e.itemGroupLabel.attrs),{id:bp(r,k),dir:i("dir"),role:"presentation"}))},getItemGroupProps(x){let{id:k}=x;return t.element(y(g({},_e.itemGroup.attrs),{"data-disabled":E(l),id:LO(r,k),"aria-labelledby":bp(r,k),role:"group",dir:i("dir")}))},getClearTriggerProps(){return t.button(y(g({},_e.clearTrigger.attrs),{id:Cp(r),type:"button","aria-label":"Clear value","data-invalid":E(c),disabled:l,hidden:!a("hasSelectedItems"),dir:i("dir"),onClick(x){x.defaultPrevented||o({type:"CLEAR.CLICK"})}}))},getHiddenSelectProps(){let x=n.get("value"),k=i("multiple")?x:x==null?void 0:x[0];return t.select({name:i("name"),form:i("form"),disabled:l,multiple:i("multiple"),required:i("required"),"aria-hidden":!0,id:ql(r),defaultValue:k,style:Vt,tabIndex:-1,onFocus(){var N;(N=ri(r))==null||N.focus({preventScroll:!0})},"aria-labelledby":Ta(r)})},getPositionerProps(){return t.element(y(g({},_e.positioner.attrs),{dir:i("dir"),id:Sp(r),style:A.floating}))},getContentProps(){return t.element(y(g({hidden:!p,dir:i("dir"),id:_l(r),role:m?"listbox":"dialog"},_e.content.attrs),{"data-state":p?"open":"closed","data-placement":b,"data-activedescendant":P,"aria-activedescendant":m?P:void 0,"aria-multiselectable":i("multiple")&&m?!0:void 0,"aria-labelledby":Ta(r),tabIndex:0,onKeyDown(x){if(!S||!ce(x.currentTarget,j(x)))return;if(x.key==="Tab"&&!ds(x)){x.preventDefault();return}let k={ArrowUp(){o({type:"CONTENT.ARROW_UP"})},ArrowDown(){o({type:"CONTENT.ARROW_DOWN"})},Home(){o({type:"CONTENT.HOME"})},End(){o({type:"CONTENT.END"})},Enter(){o({type:"ITEM.CLICK",src:"keydown.enter"})},Space($){var te;f?o({type:"CONTENT.TYPEAHEAD",key:$.key}):(te=k.Enter)==null||te.call(k,$)}},N=k[ge(x)];if(N){N(x),x.preventDefault();return}let D=j(x);Ot(D)||Ue.isValidEvent(x)&&(o({type:"CONTENT.TYPEAHEAD",key:x.key}),x.preventDefault())}}))},getListProps(){return t.element(y(g({},_e.list.attrs),{tabIndex:0,role:m?void 0:"listbox","aria-labelledby":Gl(r),"aria-activedescendant":m?void 0:P,"aria-multiselectable":!m&&i("multiple")?!0:void 0}))}}}function Ip(e){var n,i;let t=(i=e.restoreFocus)!=null?i:(n=e.previousEvent)==null?void 0:n.restoreFocus;return t==null||!!t}function Pp(e,t){return Ki(t?{items:e,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled,groupBy:n=>{var i;return(i=n.group)!=null?i:""}}:{items:e,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled})}function WO(e){return e.replace(/_([a-z])/g,(t,n)=>n.toUpperCase())}function KO(e){let t={};for(let[n,i]of Object.entries(e)){let r=WO(n);t[r]=i}return t}var NO,_e,Ki,RO,_l,Gl,Cp,Ta,DO,Ul,ql,Sp,LO,bp,Hl,$r,ri,MO,Ep,Bl,Hr,ii,$O,HO,BO,GA,_O,UA,GO,qA,UO,WA,qO,zO,Op=re(()=>{"use strict";yr();Pr();Wn();tn();se();NO=U("select").parts("label","positioner","trigger","indicator","clearTrigger","item","itemText","itemIndicator","itemGroup","itemGroupLabel","list","content","root","control","valueText"),_e=NO.build(),Ki=e=>new Nt(e);Ki.empty=()=>new Nt({items:[]});RO=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`select:${e.id}`},_l=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`select:${e.id}:content`},Gl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`select:${e.id}:trigger`},Cp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.clearTrigger)!=null?n:`select:${e.id}:clear-trigger`},Ta=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`select:${e.id}:label`},DO=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`select:${e.id}:control`},Ul=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`select:${e.id}:option:${t}`},ql=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.hiddenSelect)!=null?n:`select:${e.id}:select`},Sp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`select:${e.id}:positioner`},LO=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemGroup)==null?void 0:i.call(n,t))!=null?r:`select:${e.id}:optgroup:${t}`},bp=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemGroupLabel)==null?void 0:i.call(n,t))!=null?r:`select:${e.id}:optgroup-label:${t}`},Hl=e=>e.getById(ql(e)),$r=e=>e.getById(_l(e)),ri=e=>e.getById(Gl(e)),MO=e=>e.getById(Cp(e)),Ep=e=>e.getById(Sp(e)),Bl=(e,t)=>t==null?null:e.getById(Ul(e,t));({and:Hr,not:ii,or:$O}=Ee()),HO={props({props:e}){var t;return y(g({loopFocus:!1,closeOnSelect:!e.multiple,composite:!0,defaultValue:[]},e),{collection:(t=e.collection)!=null?t:Ki.empty(),positioning:g({placement:"bottom-start",gutter:8},e.positioning)})},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:fe,onChange(n){var r;let i=e("collection").findMany(n);return(r=e("onValueChange"))==null?void 0:r({value:n,items:i})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),onChange(n){var i;(i=e("onHighlightChange"))==null||i({highlightedValue:n,highlightedItem:e("collection").find(n),highlightedIndex:e("collection").indexOf(n)})}})),currentPlacement:t(()=>({defaultValue:void 0})),fieldsetDisabled:t(()=>({defaultValue:!1})),highlightedItem:t(()=>({defaultValue:null})),selectedItems:t(()=>{var r,s;let n=(s=(r=e("value"))!=null?r:e("defaultValue"))!=null?s:[];return{defaultValue:e("collection").findMany(n)}})}},refs(){return{typeahead:g({},Ue.defaultOptions)}},computed:{hasSelectedItems:({context:e})=>e.get("value").length>0,isTypingAhead:({refs:e})=>e.get("typeahead").keysSoFar!=="",isDisabled:({prop:e,context:t})=>!!e("disabled")||!!t.get("fieldsetDisabled"),isInteractive:({prop:e})=>!(e("disabled")||e("readOnly")),valueAsString:({context:e,prop:t})=>t("collection").stringifyItems(e.get("selectedItems"))},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"idle"},entry:["syncSelectElement"],watch({context:e,prop:t,track:n,action:i}){n([()=>e.get("value").toString()],()=>{i(["syncSelectedItems","syncSelectElement","dispatchChangeEvent"])}),n([()=>t("open")],()=>{i(["toggleVisibility"])}),n([()=>e.get("highlightedValue")],()=>{i(["syncHighlightedItem"])}),n([()=>t("collection").toString()],()=>{i(["syncCollection"])})},on:{"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedItem"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedItem"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setSelectedItems"]},"VALUE.CLEAR":{actions:["clearSelectedItems"]},"CLEAR.CLICK":{actions:["clearSelectedItems","focusTriggerEl"]}},effects:["trackFormControlState"],states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":[{guard:"isTriggerClickEvent",target:"open",actions:["setInitialFocus","highlightFirstSelectedItem"]},{target:"open",actions:["setInitialFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus","highlightFirstSelectedItem"]}],"TRIGGER.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen"]}]}},focused:{tags:["closed"],on:{"CONTROLLED.OPEN":[{guard:"isTriggerClickEvent",target:"open",actions:["setInitialFocus","highlightFirstSelectedItem"]},{guard:"isTriggerArrowUpEvent",target:"open",actions:["setInitialFocus","highlightComputedLastItem"]},{guard:$O("isTriggerArrowDownEvent","isTriggerEnterEvent"),target:"open",actions:["setInitialFocus","highlightComputedFirstItem"]},{target:"open",actions:["setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen"]}],"TRIGGER.BLUR":{target:"idle"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightFirstSelectedItem"]}],"TRIGGER.ENTER":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedFirstItem"]}],"TRIGGER.ARROW_UP":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedLastItem"]}],"TRIGGER.ARROW_DOWN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedFirstItem"]}],"TRIGGER.ARROW_LEFT":[{guard:Hr(ii("multiple"),"hasSelectedItems"),actions:["selectPreviousItem"]},{guard:ii("multiple"),actions:["selectLastItem"]}],"TRIGGER.ARROW_RIGHT":[{guard:Hr(ii("multiple"),"hasSelectedItems"),actions:["selectNextItem"]},{guard:ii("multiple"),actions:["selectFirstItem"]}],"TRIGGER.HOME":{guard:ii("multiple"),actions:["selectFirstItem"]},"TRIGGER.END":{guard:ii("multiple"),actions:["selectLastItem"]},"TRIGGER.TYPEAHEAD":{guard:ii("multiple"),actions:["selectMatchingItem"]}}},open:{tags:["open"],exit:["scrollContentToTop"],effects:["trackDismissableElement","computePlacement","scrollToHighlightedItem"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["focusTriggerEl","clearHighlightedItem"]},{target:"idle",actions:["clearHighlightedItem"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{guard:"restoreFocus",target:"focused",actions:["invokeOnClose","focusTriggerEl","clearHighlightedItem"]},{target:"idle",actions:["invokeOnClose","clearHighlightedItem"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","clearHighlightedItem"]}],"ITEM.CLICK":[{guard:Hr("closeOnSelect","isOpenControlled"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","focusTriggerEl","clearHighlightedItem"]},{actions:["selectHighlightedItem"]}],"CONTENT.HOME":{actions:["highlightFirstItem"]},"CONTENT.END":{actions:["highlightLastItem"]},"CONTENT.ARROW_DOWN":[{guard:Hr("hasHighlightedItem","loop","isLastItemHighlighted"),actions:["highlightFirstItem"]},{guard:"hasHighlightedItem",actions:["highlightNextItem"]},{actions:["highlightFirstItem"]}],"CONTENT.ARROW_UP":[{guard:Hr("hasHighlightedItem","loop","isFirstItemHighlighted"),actions:["highlightLastItem"]},{guard:"hasHighlightedItem",actions:["highlightPreviousItem"]},{actions:["highlightLastItem"]}],"CONTENT.TYPEAHEAD":{actions:["highlightMatchingItem"]},"ITEM.POINTER_MOVE":{actions:["highlightItem"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedItem"]},"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{loop:({prop:e})=>!!e("loopFocus"),multiple:({prop:e})=>!!e("multiple"),hasSelectedItems:({computed:e})=>!!e("hasSelectedItems"),hasHighlightedItem:({context:e})=>e.get("highlightedValue")!=null,isFirstItemHighlighted:({context:e,prop:t})=>e.get("highlightedValue")===t("collection").firstValue,isLastItemHighlighted:({context:e,prop:t})=>e.get("highlightedValue")===t("collection").lastValue,closeOnSelect:({prop:e,event:t})=>{var n;return!!((n=t.closeOnSelect)!=null?n:e("closeOnSelect"))},restoreFocus:({event:e})=>Ip(e),isOpenControlled:({prop:e})=>e("open")!==void 0,isTriggerClickEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.CLICK"},isTriggerEnterEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.ENTER"},isTriggerArrowUpEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.ARROW_UP"},isTriggerArrowDownEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.ARROW_DOWN"}},effects:{trackFormControlState({context:e,scope:t}){return wt(Hl(t),{onFieldsetDisabledChange(n){e.set("fieldsetDisabled",n)},onFormReset(){let n=e.initial("value");e.set("value",n)}})},trackDismissableElement({scope:e,send:t,prop:n}){let i=()=>$r(e),r=!0;return Ft(i,{type:"listbox",defer:!0,exclude:[ri(e),MO(e)],onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onInteractOutside(s){var a;(a=n("onInteractOutside"))==null||a(s),r=!(s.detail.focusable||s.detail.contextmenu)},onDismiss(){t({type:"CLOSE",src:"interact-outside",restoreFocus:r})}})},computePlacement({context:e,prop:t,scope:n}){let i=t("positioning");return e.set("currentPlacement",i.placement),It(()=>ri(n),()=>Ep(n),y(g({defer:!0},i),{onComplete(a){e.set("currentPlacement",a.placement)}}))},scrollToHighlightedItem({context:e,prop:t,scope:n,event:i}){let r=a=>{let o=e.get("highlightedValue");if(o==null||i.current().type.includes("POINTER"))return;let l=$r(n),c=t("scrollToIndexFn");if(c){let h=t("collection").indexOf(o);c==null||c({index:h,immediate:a,getElement:()=>Bl(n,o)});return}let u=Bl(n,o);Xt(u,{rootEl:l,block:"nearest"})};return H(()=>r(!0)),ot(()=>$r(n),{defer:!0,attributes:["data-activedescendant"],callback(){r(!1)}})}},actions:{reposition({context:e,prop:t,scope:n,event:i}){let r=()=>Ep(n);It(ri(n),r,y(g(g({},t("positioning")),i.options),{defer:!0,listeners:!1,onComplete(s){e.set("currentPlacement",s.placement)}}))},toggleVisibility({send:e,prop:t,event:n}){e({type:t("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})},highlightPreviousItem({context:e,prop:t}){let n=e.get("highlightedValue");if(n==null)return;let i=t("collection").getPreviousValue(n,1,t("loopFocus"));i!=null&&e.set("highlightedValue",i)},highlightNextItem({context:e,prop:t}){let n=e.get("highlightedValue");if(n==null)return;let i=t("collection").getNextValue(n,1,t("loopFocus"));i!=null&&e.set("highlightedValue",i)},highlightFirstItem({context:e,prop:t}){let n=t("collection").firstValue;e.set("highlightedValue",n)},highlightLastItem({context:e,prop:t}){let n=t("collection").lastValue;e.set("highlightedValue",n)},setInitialFocus({scope:e}){H(()=>{let t=us({root:$r(e)});t==null||t.focus({preventScroll:!0})})},focusTriggerEl({event:e,scope:t}){Ip(e)&&H(()=>{let n=ri(t);n==null||n.focus({preventScroll:!0})})},selectHighlightedItem({context:e,prop:t,event:n}){var s,a;let i=(s=n.value)!=null?s:e.get("highlightedValue");if(i==null||!t("collection").has(i))return;(a=t("onSelect"))==null||a({value:i}),i=t("deselectable")&&!t("multiple")&&e.get("value").includes(i)?null:i,e.set("value",o=>i==null?[]:t("multiple")?yt(o,i):[i])},highlightComputedFirstItem({context:e,prop:t,computed:n}){let i=t("collection"),r=n("hasSelectedItems")?i.sort(e.get("value"))[0]:i.firstValue;e.set("highlightedValue",r)},highlightComputedLastItem({context:e,prop:t,computed:n}){let i=t("collection"),r=n("hasSelectedItems")?i.sort(e.get("value"))[0]:i.lastValue;e.set("highlightedValue",r)},highlightFirstSelectedItem({context:e,prop:t,computed:n}){if(!n("hasSelectedItems"))return;let i=t("collection").sort(e.get("value"))[0];e.set("highlightedValue",i)},highlightItem({context:e,event:t}){e.set("highlightedValue",t.value)},highlightMatchingItem({context:e,prop:t,event:n,refs:i}){let r=t("collection").search(n.key,{state:i.get("typeahead"),currentValue:e.get("highlightedValue")});r!=null&&e.set("highlightedValue",r)},setHighlightedItem({context:e,event:t}){e.set("highlightedValue",t.value)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},selectItem({context:e,prop:t,event:n}){var s;(s=t("onSelect"))==null||s({value:n.value});let r=t("deselectable")&&!t("multiple")&&e.get("value").includes(n.value)?null:n.value;e.set("value",a=>r==null?[]:t("multiple")?yt(a,r):[r])},clearItem({context:e,event:t}){e.set("value",n=>n.filter(i=>i!==t.value))},setSelectedItems({context:e,event:t}){e.set("value",t.value)},clearSelectedItems({context:e}){e.set("value",[])},selectPreviousItem({context:e,prop:t}){let[n]=e.get("value"),i=t("collection").getPreviousValue(n);i&&e.set("value",[i])},selectNextItem({context:e,prop:t}){let[n]=e.get("value"),i=t("collection").getNextValue(n);i&&e.set("value",[i])},selectFirstItem({context:e,prop:t}){let n=t("collection").firstValue;n&&e.set("value",[n])},selectLastItem({context:e,prop:t}){let n=t("collection").lastValue;n&&e.set("value",[n])},selectMatchingItem({context:e,prop:t,event:n,refs:i}){let r=t("collection").search(n.key,{state:i.get("typeahead"),currentValue:e.get("value")[0]});r!=null&&e.set("value",[r])},scrollContentToTop({prop:e,scope:t}){var n,i;if(e("scrollToIndexFn")){let r=e("collection").firstValue;(n=e("scrollToIndexFn"))==null||n({index:0,immediate:!0,getElement:()=>Bl(t,r)})}else(i=$r(t))==null||i.scrollTo(0,0)},invokeOnOpen({prop:e,context:t}){var n;(n=e("onOpenChange"))==null||n({open:!0,value:t.get("value")})},invokeOnClose({prop:e,context:t}){var n;(n=e("onOpenChange"))==null||n({open:!1,value:t.get("value")})},syncSelectElement({context:e,prop:t,scope:n}){let i=Hl(n);if(i){if(e.get("value").length===0&&!t("multiple")){i.selectedIndex=-1;return}for(let r of i.options)r.selected=e.get("value").includes(r.value)}},syncCollection({context:e,prop:t}){let n=t("collection"),i=n.find(e.get("highlightedValue"));i&&e.set("highlightedItem",i);let r=n.findMany(e.get("value"));e.set("selectedItems",r)},syncSelectedItems({context:e,prop:t}){let n=t("collection"),i=e.get("selectedItems"),s=e.get("value").map(a=>i.find(l=>n.getItemValue(l)===a)||n.find(a));e.set("selectedItems",s)},syncHighlightedItem({context:e,prop:t}){let n=t("collection"),i=e.get("highlightedValue"),r=i?n.find(i):null;e.set("highlightedItem",r)},dispatchChangeEvent({scope:e}){queueMicrotask(()=>{let t=Hl(e);if(!t)return;let n=e.getWin(),i=new n.Event("change",{bubbles:!0,composed:!0});t.dispatchEvent(i)})}}}};BO=_()(["closeOnSelect","collection","composite","defaultHighlightedValue","defaultOpen","defaultValue","deselectable","dir","disabled","form","getRootNode","highlightedValue","id","ids","invalid","loopFocus","multiple","name","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onSelect","onValueChange","open","positioning","readOnly","required","scrollToIndexFn","value"]),GA=B(BO),_O=_()(["item","persistFocus"]),UA=B(_O),GO=_()(["id"]),qA=B(GO),UO=_()(["htmlFor"]),WA=B(UO),qO=class extends K{constructor(t,n){var r;super(t,n);z(this,"_options",[]);z(this,"hasGroups",!1);z(this,"placeholder","");z(this,"init",()=>{this.machine.start(),this.render(),this.machine.subscribe(()=>{this.api=this.initApi(),this.render()})});let i=n.collection;this._options=(r=i==null?void 0:i.items)!=null?r:[],this.placeholder=w(this.el,"placeholder")||""}get options(){return Array.isArray(this._options)?this._options:[]}setOptions(t){this._options=Array.isArray(t)?t:[]}getCollection(){let t=this.options;return this.hasGroups?Ki({items:t,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled,groupBy:n=>{var i;return(i=n.group)!=null?i:""}}):Ki({items:t,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled})}initMachine(t){let n=this.getCollection.bind(this),i=t.collection;return new W(HO,y(g({},t),{get collection(){return i!=null?i:n()}}))}initApi(){return FO(this.machine.service,q)}applyItemProps(){let t=this.el.querySelector('[data-scope="select"][data-part="content"]');t&&(t.querySelectorAll('[data-scope="select"][data-part="item-group"]').forEach(n=>{var s;let i=(s=n.dataset.id)!=null?s:"";this.spreadProps(n,this.api.getItemGroupProps({id:i}));let r=n.querySelector('[data-scope="select"][data-part="item-group-label"]');r&&this.spreadProps(r,this.api.getItemGroupLabelProps({htmlFor:i}))}),t.querySelectorAll('[data-scope="select"][data-part="item"]').forEach(n=>{var o;let i=(o=n.dataset.value)!=null?o:"",r=this.options.find(l=>{var c,u;return String((u=(c=l.id)!=null?c:l.value)!=null?u:"")===String(i)});if(!r)return;this.spreadProps(n,this.api.getItemProps({item:r}));let s=n.querySelector('[data-scope="select"][data-part="item-text"]');s&&this.spreadProps(s,this.api.getItemTextProps({item:r}));let a=n.querySelector('[data-scope="select"][data-part="item-indicator"]');a&&this.spreadProps(a,this.api.getItemIndicatorProps({item:r}))}))}render(){var a;let t=(a=this.el.querySelector('[data-scope="select"][data-part="root"]'))!=null?a:this.el;this.spreadProps(t,this.api.getRootProps());let n=this.el.querySelector('[data-scope="select"][data-part="hidden-select"]'),i=this.el.querySelector('[data-scope="select"][data-part="value-input"]');i&&(!this.api.value||this.api.value.length===0?i.value="":this.api.value.length===1?i.value=String(this.api.value[0]):i.value=this.api.value.map(String).join(",")),n&&this.spreadProps(n,this.api.getHiddenSelectProps()),["label","control","trigger","indicator","clear-trigger","positioner"].forEach(o=>{let l=this.el.querySelector(`[data-scope="select"][data-part="${o}"]`);if(!l)return;let c="get"+o.split("-").map(u=>u[0].toUpperCase()+u.slice(1)).join("")+"Props";this.spreadProps(l,this.api[c]())});let r=this.el.querySelector('[data-scope="select"][data-part="item-text"]');if(r){let o=this.api.valueAsString;if(this.api.value&&this.api.value.length>0&&!o){let l=this.api.value[0],c=this.options.find(u=>{var m,d;let h=(d=(m=u.id)!=null?m:u.value)!=null?d:"";return String(h)===String(l)});c?r.textContent=c.label:r.textContent=this.placeholder||""}else r.textContent=o||this.placeholder||""}let s=this.el.querySelector('[data-scope="select"][data-part="content"]');s&&(this.spreadProps(s,this.api.getContentProps()),this.applyItemProps())}};zO={mounted(){let e=this.el,t=JSON.parse(e.dataset.collection||"[]"),n=t.some(s=>s.group!==void 0),i=Pp(t,n),r=new qO(e,y(g({id:e.id,collection:i},C(e,"controlled")?{value:Q(e,"value")}:{defaultValue:Q(e,"defaultValue")}),{disabled:C(e,"disabled"),closeOnSelect:C(e,"closeOnSelect"),dir:w(e,"dir",["ltr","rtl"]),loopFocus:C(e,"loopFocus"),multiple:C(e,"multiple"),invalid:C(e,"invalid"),name:w(e,"name"),form:w(e,"form"),readOnly:C(e,"readOnly"),required:C(e,"required"),positioning:(()=>{let s=e.dataset.positioning;if(s)try{let a=JSON.parse(s);return KO(a)}catch(a){return}})(),onValueChange:s=>{var T;let a=C(e,"redirect"),o=s.value.length>0?String(s.value[0]):null,l=(T=s.items)!=null&&T.length?s.items[0]:null,c=l&&typeof l=="object"&&l!==null&&"redirect"in l?l.redirect:void 0,u=l&&typeof l=="object"&&l!==null&&"new_tab"in l?l.new_tab:void 0;a&&o&&this.liveSocket.main.isDead&&c!==!1&&(u===!0?window.open(o,"_blank","noopener,noreferrer"):window.location.href=o);let d=e.querySelector('[data-scope="select"][data-part="value-input"]');d&&(d.value=s.value.length===0?"":s.value.length===1?String(s.value[0]):s.value.map(String).join(","),d.dispatchEvent(new Event("input",{bubbles:!0})),d.dispatchEvent(new Event("change",{bubbles:!0})));let p={value:s.value,items:s.items,id:e.id},v=w(e,"onValueChangeClient");v&&e.dispatchEvent(new CustomEvent(v,{bubbles:!0,detail:p}));let I=w(e,"onValueChange");I&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(I,p)}}));r.hasGroups=n,r.setOptions(t),r.init(),this.select=r,this.handlers=[]},updated(){let e=JSON.parse(this.el.dataset.collection||"[]"),t=e.some(n=>n.group!==void 0);this.select&&(this.select.hasGroups=t,this.select.setOptions(e),this.select.updateProps(y(g({collection:Pp(e,t),id:this.el.id},C(this.el,"controlled")?{value:Q(this.el,"value")}:{defaultValue:Q(this.el,"defaultValue")}),{name:w(this.el,"name"),form:w(this.el,"form"),disabled:C(this.el,"disabled"),multiple:C(this.el,"multiple"),dir:w(this.el,"dir",["ltr","rtl"]),invalid:C(this.el,"invalid"),required:C(this.el,"required"),readOnly:C(this.el,"readOnly")})))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.select)==null||e.destroy()}}});var Kp={};he(Kp,{SignaturePad:()=>Ew});function xp(e,t,n,i=r=>r){return e*i(.5-t*(.5-n))}function Bp(e,t,n){let i=Wl(1,t/n);return Wl(1,e+(Wl(1,1-i)-e)*(i*.275))}function jO(e){return[-e[0],-e[1]]}function Bt(e,t){return[e[0]+t[0],e[1]+t[1]]}function Ap(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function Nn(e,t){return[e[0]-t[0],e[1]-t[1]]}function Yl(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function kn(e,t){return[e[0]*t,e[1]*t]}function Kl(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function XO(e,t){return[e[0]/t,e[1]/t]}function _p(e){return[e[1],-e[0]]}function zl(e,t){let n=t[0];return e[0]=t[1],e[1]=-n,e}function kp(e,t){return e[0]*t[0]+e[1]*t[1]}function ZO(e,t){return e[0]===t[0]&&e[1]===t[1]}function JO(e){return Math.hypot(e[0],e[1])}function Np(e,t){let n=e[0]-t[0],i=e[1]-t[1];return n*n+i*i}function Gp(e){return XO(e,JO(e))}function QO(e,t){return Math.hypot(e[1]-t[1],e[0]-t[0])}function jl(e,t,n){let i=Math.sin(n),r=Math.cos(n),s=e[0]-t[0],a=e[1]-t[1],o=s*r-a*i,l=s*i+a*r;return[o+t[0],l+t[1]]}function Rp(e,t,n,i){let r=Math.sin(i),s=Math.cos(i),a=t[0]-n[0],o=t[1]-n[1],l=a*s-o*r,c=a*r+o*s;return e[0]=l+n[0],e[1]=c+n[1],e}function Dp(e,t,n){return Bt(e,kn(Nn(t,e),n))}function ew(e,t,n,i){let r=n[0]-t[0],s=n[1]-t[1];return e[0]=t[0]+r*i,e[1]=t[1]+s*i,e}function Up(e,t,n){return Bt(e,kn(t,n))}function tw(e,t){let n=Up(e,Gp(_p(Nn(e,Bt(e,[1,1])))),-t),i=[],r=1/13;for(let s=r;s<=1;s+=r)i.push(jl(n,e,Br*2*s));return i}function nw(e,t,n){let i=[],r=1/n;for(let s=r;s<=1;s+=r)i.push(jl(t,e,Br*s));return i}function iw(e,t,n){let i=Nn(t,n),r=kn(i,.5),s=kn(i,.51);return[Nn(e,r),Nn(e,s),Bt(e,s),Bt(e,r)]}function rw(e,t,n,i){let r=[],s=Up(e,t,n),a=1/i;for(let o=a;o<1;o+=a)r.push(jl(s,e,Br*3*o));return r}function sw(e,t,n){return[Bt(e,kn(t,n)),Bt(e,kn(t,n*.99)),Nn(e,kn(t,n*.99)),Nn(e,kn(t,n))]}function Lp(e,t,n){return e===!1||e===void 0?0:e===!0?Math.max(t,n):e}function aw(e,t,n){return e.slice(0,10).reduce((i,r)=>{let s=r.pressure;return t&&(s=Bp(i,r.distance,n)),(i+s)/2},e[0].pressure)}function ow(e,t={}){let{size:n=16,smoothing:i=.5,thinning:r=.5,simulatePressure:s=!0,easing:a=J=>J,start:o={},end:l={},last:c=!1}=t,{cap:u=!0,easing:h=J=>J*(2-J)}=o,{cap:m=!0,easing:d=J=>--J*J*J+1}=l;if(e.length===0||n<=0)return[];let p=e[e.length-1].runningLength,v=Lp(o.taper,n,p),I=Lp(l.taper,n,p),T=(n*i)**2,O=[],b=[],f=aw(e,s,n),S=xp(n,r,e[e.length-1].pressure,a),P,V=e[0].vector,A=e[0].point,x=A,k=A,N=x,D=!1;for(let J=0;JT)&&(O.push(k),A=k),Ap(An,Pe,De),N=[An[0],An[1]],(J<=1||Np(x,N)>T)&&(b.push(N),x=N),f=Se,V=ne}let $=[e[0].point[0],e[0].point[1]],te=e.length>1?[e[e.length-1].point[0],e[e.length-1].point[1]]:Bt(e[0].point,[1,1]),Z=[],ie=[];if(e.length===1){if(!(v||I)||c)return tw($,P||S)}else{v||I&&e.length===1||(u?Z.push(...nw($,b[0],13)):Z.push(...iw($,O[0],b[0])));let J=_p(jO(e[e.length-1].vector));I||v&&e.length===1?ie.push(te):m?ie.push(...rw(te,J,S,29)):ie.push(...sw(te,J,S))}return O.concat(ie,b.reverse(),Z)}function Fp(e){return e!=null&&e>=0}function lw(e,t={}){var m;let{streamline:n=.5,size:i=16,last:r=!1}=t;if(e.length===0)return[];let s=.15+(1-n)*.85,a=Array.isArray(e[0])?e:e.map(({x:d,y:p,pressure:v=wp})=>[d,p,v]);if(a.length===2){let d=a[1];a=a.slice(0,-1);for(let p=1;p<5;p++)a.push(Dp(a[0],d,p/4))}a.length===1&&(a=[...a,[...Bt(a[0],Vp),...a[0].slice(2)]]);let o=[{point:[a[0][0],a[0][1]],pressure:Fp(a[0][2])?a[0][2]:.25,vector:[...Vp],distance:0,runningLength:0}],l=!1,c=0,u=o[0],h=a.length-1;for(let d=1;d{"use strict";se();({PI:YO}=Math),Br=YO+1e-4,wp=.5,Vp=[1,1];({min:Wl}=Math);De=[0,0],xn=[0,0],An=[0,0];Mp=[0,0];uw=cw,dw=U("signature-pad").parts("root","control","segment","segmentPath","guide","clearTrigger","label"),si=dw.build(),hw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`signature-${e.id}`},qp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`signature-control-${e.id}`},gw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`signature-label-${e.id}`},$p=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.hiddenInput)!=null?n:`signature-input-${e.id}`},Va=e=>e.getById(qp(e)),pw=e=>vi(Va(e),"[data-part=segment]"),Wp=(e,t)=>Sc(pw(e),t);Oa=(e,t)=>(e+t)/2;vw={props({props:e}){return y(g({defaultPaths:[]},e),{drawing:g({size:2,simulatePressure:!1,thinning:.7,smoothing:.4,streamline:.6},e.drawing),translations:g({control:"signature pad",clearTrigger:"clear signature"},e.translations)})},initialState(){return"idle"},context({prop:e,bindable:t}){return{paths:t(()=>({defaultValue:e("defaultPaths"),value:e("paths"),sync:!0,onChange(n){var i;(i=e("onDraw"))==null||i({paths:n})}})),currentPoints:t(()=>({defaultValue:[]})),currentPath:t(()=>({defaultValue:null}))}},computed:{isInteractive:({prop:e})=>!(e("disabled")||e("readOnly")),isEmpty:({context:e})=>e.get("paths").length===0},on:{CLEAR:{actions:["clearPoints","invokeOnDrawEnd","focusCanvasEl"]}},states:{idle:{on:{POINTER_DOWN:{target:"drawing",actions:["addPoint"]}}},drawing:{effects:["trackPointerMove"],on:{POINTER_MOVE:{actions:["addPoint","invokeOnDraw"]},POINTER_UP:{target:"idle",actions:["endStroke","invokeOnDrawEnd"]}}}},implementations:{effects:{trackPointerMove({scope:e,send:t}){let n=e.getDoc();return hn(n,{onPointerMove({event:i,point:r}){let s=Va(e);if(!s)return;let{offset:a}=to(r,s);t({type:"POINTER_MOVE",point:a,pressure:i.pressure})},onPointerUp(){t({type:"POINTER_UP"})}})}},actions:{addPoint({context:e,event:t,prop:n}){let i=[...e.get("currentPoints"),t.point];e.set("currentPoints",i);let r=uw(i,n("drawing"));e.set("currentPath",mw(r))},endStroke({context:e}){let t=[...e.get("paths"),e.get("currentPath")];e.set("paths",t),e.set("currentPoints",[]),e.set("currentPath",null)},clearPoints({context:e}){e.set("currentPoints",[]),e.set("paths",[]),e.set("currentPath",null)},focusCanvasEl({scope:e}){queueMicrotask(()=>{var t;(t=e.getActiveElement())==null||t.focus({preventScroll:!0})})},invokeOnDraw({context:e,prop:t}){var n;(n=t("onDraw"))==null||n({paths:[...e.get("paths"),e.get("currentPath")]})},invokeOnDrawEnd({context:e,prop:t,scope:n,computed:i}){var r;(r=t("onDrawEnd"))==null||r({paths:[...e.get("paths")],getDataUrl(s,a=.92){return i("isEmpty")?Promise.resolve(""):Wp(n,{type:s,quality:a})}})}}}},yw=_()(["defaultPaths","dir","disabled","drawing","getRootNode","id","ids","name","onDraw","onDrawEnd","paths","readOnly","required","translations"]),jA=B(yw),bw=class extends K{constructor(){super(...arguments);z(this,"imageURL","");z(this,"paths",[]);z(this,"name");z(this,"syncPaths",()=>{let t=this.el.querySelector('[data-scope="signature-pad"][data-part="segment"]');if(!t)return;if(this.api.paths.length+(this.api.currentPath?1:0)===0){t.innerHTML="",this.imageURL="",this.paths=[];let i=this.el.querySelector('[data-scope="signature-pad"][data-part="hidden-input"]');i&&(i.value="");return}if(t.innerHTML="",this.api.paths.forEach(i=>{let r=document.createElementNS("http://www.w3.org/2000/svg","path");r.setAttribute("data-scope","signature-pad"),r.setAttribute("data-part","path"),this.spreadProps(r,this.api.getSegmentPathProps({path:i})),t.appendChild(r)}),this.api.currentPath){let i=document.createElementNS("http://www.w3.org/2000/svg","path");i.setAttribute("data-scope","signature-pad"),i.setAttribute("data-part","current-path"),this.spreadProps(i,this.api.getSegmentPathProps({path:this.api.currentPath})),t.appendChild(i)}})}initMachine(t){return this.name=t.name,new W(vw,t)}setName(t){this.name=t}setPaths(t){this.paths=t}initApi(){return fw(this.machine.service,q)}render(){let t=this.el.querySelector('[data-scope="signature-pad"][data-part="root"]');if(!t)return;this.spreadProps(t,this.api.getRootProps());let n=t.querySelector('[data-scope="signature-pad"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps());let i=t.querySelector('[data-scope="signature-pad"][data-part="control"]');i&&this.spreadProps(i,this.api.getControlProps());let r=t.querySelector('[data-scope="signature-pad"][data-part="segment"]');r&&this.spreadProps(r,this.api.getSegmentProps());let s=t.querySelector('[data-scope="signature-pad"][data-part="guide"]');s&&this.spreadProps(s,this.api.getGuideProps());let a=t.querySelector('[data-scope="signature-pad"][data-part="clear-trigger"]');a&&this.spreadProps(a,this.api.getClearTriggerProps());let o=t.querySelector('[data-scope="signature-pad"][data-part="hidden-input"]');o&&this.spreadProps(o,this.api.getHiddenInputProps({value:this.api.paths.length>0?JSON.stringify(this.api.paths):""})),this.syncPaths()}};Ew={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=C(e,"controlled"),i=wa(e,"paths"),r=wa(e,"defaultPaths"),s=new bw(e,y(g(g({id:e.id,name:w(e,"name")},n&&i.length>0?{paths:i}:void 0),!n&&r.length>0?{defaultPaths:r}:void 0),{drawing:Hp(e),onDrawEnd:a=>{s.setPaths(a.paths);let o=e.querySelector('[data-scope="signature-pad"][data-part="hidden-input"]');o&&(o.value=a.paths.length>0?JSON.stringify(a.paths):"",o.dispatchEvent(new Event("input",{bubbles:!0})),o.dispatchEvent(new Event("change",{bubbles:!0}))),a.getDataUrl("image/png").then(l=>{s.imageURL=l;let c=w(e,"onDrawEnd");c&&this.liveSocket.main.isConnected()&&t(c,{id:e.id,paths:a.paths,url:l});let u=w(e,"onDrawEndClient");u&&e.dispatchEvent(new CustomEvent(u,{bubbles:!0,detail:{id:e.id,paths:a.paths,url:l}}))})}}));s.init(),this.signaturePad=s,this.onClear=a=>{let{id:o}=a.detail;o&&o!==e.id||s.api.clear()},e.addEventListener("phx:signature-pad:clear",this.onClear),this.handlers=[],this.handlers.push(this.handleEvent("signature_pad_clear",a=>{let o=a.signature_pad_id;o&&o!==e.id||s.api.clear()}))},updated(){var r,s;let e=C(this.el,"controlled"),t=wa(this.el,"paths"),n=wa(this.el,"defaultPaths"),i=w(this.el,"name");i&&((r=this.signaturePad)==null||r.setName(i)),(s=this.signaturePad)==null||s.updateProps(y(g(g({id:this.el.id,name:i},e&&t.length>0?{paths:t}:{}),!e&&n.length>0?{defaultPaths:n}:{}),{drawing:Hp(this.el)}))},destroyed(){var e;if(this.onClear&&this.el.removeEventListener("phx:signature-pad:clear",this.onClear),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.signaturePad)==null||e.destroy()}}});var Zp={};he(Zp,{Switch:()=>xw});function Tw(e,t){let{context:n,send:i,prop:r,scope:s}=e,a=!!r("disabled"),o=!!r("readOnly"),l=!!r("required"),c=!!n.get("checked"),u=!a&&n.get("focused"),h=!a&&n.get("focusVisible"),m=!a&&n.get("active"),d={"data-active":E(m),"data-focus":E(u),"data-focus-visible":E(h),"data-readonly":E(o),"data-hover":E(n.get("hovered")),"data-disabled":E(a),"data-state":c?"checked":"unchecked","data-invalid":E(r("invalid")),"data-required":E(l)};return{checked:c,disabled:a,focused:u,setChecked(p){i({type:"CHECKED.SET",checked:p,isTrusted:!1})},toggleChecked(){i({type:"CHECKED.TOGGLE",checked:c,isTrusted:!1})},getRootProps(){return t.label(y(g(g({},xa.root.attrs),d),{dir:r("dir"),id:Xp(s),htmlFor:Xl(s),onPointerMove(){a||i({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){a||i({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(p){var I;if(a)return;j(p)===zi(s)&&p.stopPropagation(),Xe()&&((I=zi(s))==null||I.focus())}}))},getLabelProps(){return t.element(y(g(g({},xa.label.attrs),d),{dir:r("dir"),id:Yp(s)}))},getThumbProps(){return t.element(y(g(g({},xa.thumb.attrs),d),{dir:r("dir"),id:Pw(s),"aria-hidden":!0}))},getControlProps(){return t.element(y(g(g({},xa.control.attrs),d),{dir:r("dir"),id:Cw(s),"aria-hidden":!0}))},getHiddenInputProps(){return t.input({id:Xl(s),type:"checkbox",required:r("required"),defaultChecked:c,disabled:a,"aria-labelledby":Yp(s),"aria-invalid":r("invalid"),name:r("name"),form:r("form"),value:r("value"),style:Vt,onFocus(){let p=En();i({type:"CONTEXT.SET",context:{focused:!0,focusVisible:p}})},onBlur(){i({type:"CONTEXT.SET",context:{focused:!1,focusVisible:!1}})},onClick(p){if(o){p.preventDefault();return}let v=p.currentTarget.checked;i({type:"CHECKED.SET",checked:v,isTrusted:!0})}})}}}var Iw,xa,Xp,Yp,Pw,Cw,Xl,Sw,zi,jp,Ow,ww,ek,Vw,xw,Jp=re(()=>{"use strict";pr();se();Iw=U("switch").parts("root","label","control","thumb"),xa=Iw.build(),Xp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`switch:${e.id}`},Yp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`switch:${e.id}:label`},Pw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.thumb)!=null?n:`switch:${e.id}:thumb`},Cw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`switch:${e.id}:control`},Xl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.hiddenInput)!=null?n:`switch:${e.id}:input`},Sw=e=>e.getById(Xp(e)),zi=e=>e.getById(Xl(e));({not:jp}=Ee()),Ow={props({props:e}){return g({defaultChecked:!1,label:"switch",value:"on"},e)},initialState(){return"ready"},context({prop:e,bindable:t}){return{checked:t(()=>({defaultValue:e("defaultChecked"),value:e("checked"),onChange(n){var i;(i=e("onCheckedChange"))==null||i({checked:n})}})),fieldsetDisabled:t(()=>({defaultValue:!1})),focusVisible:t(()=>({defaultValue:!1})),active:t(()=>({defaultValue:!1})),focused:t(()=>({defaultValue:!1})),hovered:t(()=>({defaultValue:!1}))}},computed:{isDisabled:({context:e,prop:t})=>t("disabled")||e.get("fieldsetDisabled")},watch({track:e,prop:t,context:n,action:i}){e([()=>t("disabled")],()=>{i(["removeFocusIfNeeded"])}),e([()=>n.get("checked")],()=>{i(["syncInputElement"])})},effects:["trackFormControlState","trackPressEvent","trackFocusVisible"],on:{"CHECKED.TOGGLE":[{guard:jp("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:jp("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},states:{ready:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackPressEvent({computed:e,scope:t,context:n}){if(!e("isDisabled"))return ps({pointerNode:Sw(t),keyboardNode:zi(t),isValidKey:i=>i.key===" ",onPress:()=>n.set("active",!1),onPressStart:()=>n.set("active",!0),onPressEnd:()=>n.set("active",!1)})},trackFocusVisible({computed:e,scope:t}){if(!e("isDisabled"))return Pn({root:t.getRootNode()})},trackFormControlState({context:e,send:t,scope:n}){return wt(zi(n),{onFieldsetDisabledChange(i){e.set("fieldsetDisabled",i)},onFormReset(){let i=e.initial("checked");t({type:"CHECKED.SET",checked:!!i,src:"form-reset"})}})}},actions:{setContext({context:e,event:t}){for(let n in t.context)e.set(n,t.context[n])},syncInputElement({context:e,scope:t}){let n=zi(t);n&&sr(n,!!e.get("checked"))},removeFocusIfNeeded({context:e,prop:t}){t("disabled")&&e.set("focused",!1)},setChecked({context:e,event:t}){e.set("checked",t.checked)},toggleChecked({context:e}){e.set("checked",!e.get("checked"))},dispatchChangeEvent({context:e,scope:t}){queueMicrotask(()=>{let n=zi(t);pi(n,{checked:e.get("checked")})})}}}},ww=_()(["checked","defaultChecked","dir","disabled","form","getRootNode","id","ids","invalid","label","name","onCheckedChange","readOnly","required","value"]),ek=B(ww),Vw=class extends K{initMachine(e){return new W(Ow,e)}initApi(){return Tw(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="switch"][data-part="root"]');if(!e)return;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="switch"][data-part="hidden-input"]');t&&this.spreadProps(t,this.api.getHiddenInputProps());let n=this.el.querySelector('[data-scope="switch"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps());let i=this.el.querySelector('[data-scope="switch"][data-part="control"]');i&&this.spreadProps(i,this.api.getControlProps());let r=this.el.querySelector('[data-scope="switch"][data-part="thumb"]');r&&this.spreadProps(r,this.api.getThumbProps())}},xw={mounted(){let e=this.el,t=this.pushEvent.bind(this);this.wasFocused=!1;let n=new Vw(e,y(g({id:e.id},C(e,"controlled")?{checked:C(e,"checked")}:{defaultChecked:C(e,"defaultChecked")}),{disabled:C(e,"disabled"),name:w(e,"name"),form:w(e,"form"),value:w(e,"value"),dir:w(e,"dir",["ltr","rtl"]),invalid:C(e,"invalid"),required:C(e,"required"),readOnly:C(e,"readOnly"),label:w(e,"label"),onCheckedChange:i=>{let r=w(e,"onCheckedChange");r&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&t(r,{checked:i.checked,id:e.id});let s=w(e,"onCheckedChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{value:i,id:e.id}}))}}));n.init(),this.zagSwitch=n,this.onSetChecked=i=>{let{value:r}=i.detail;n.api.setChecked(r)},e.addEventListener("phx:switch:set-checked",this.onSetChecked),this.handlers=[],this.handlers.push(this.handleEvent("switch_set_checked",i=>{let r=i.id;r&&r!==e.id||n.api.setChecked(i.value)})),this.handlers.push(this.handleEvent("switch_toggle_checked",i=>{let r=i.id;r&&r!==e.id||n.api.toggleChecked()})),this.handlers.push(this.handleEvent("switch_checked",()=>{this.pushEvent("switch_checked_response",{value:n.api.checked})})),this.handlers.push(this.handleEvent("switch_focused",()=>{this.pushEvent("switch_focused_response",{value:n.api.focused})})),this.handlers.push(this.handleEvent("switch_disabled",()=>{this.pushEvent("switch_disabled_response",{value:n.api.disabled})}))},beforeUpdate(){var e,t;this.wasFocused=(t=(e=this.zagSwitch)==null?void 0:e.api.focused)!=null?t:!1},updated(){var e;if((e=this.zagSwitch)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlled")?{checked:C(this.el,"checked")}:{defaultChecked:C(this.el,"defaultChecked")}),{disabled:C(this.el,"disabled"),name:w(this.el,"name"),form:w(this.el,"form"),value:w(this.el,"value"),dir:w(this.el,"dir",["ltr","rtl"]),invalid:C(this.el,"invalid"),required:C(this.el,"required"),readOnly:C(this.el,"readOnly"),label:w(this.el,"label")})),C(this.el,"controlled")&&this.wasFocused){let t=this.el.querySelector('[data-part="hidden-input"]');t==null||t.focus()}},destroyed(){var e;if(this.onSetChecked&&this.el.removeEventListener("phx:switch:set-checked",this.onSetChecked),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.zagSwitch)==null||e.destroy()}}});var nf={};he(nf,{Tabs:()=>Kw});function Hw(e,t){let{state:n,send:i,context:r,prop:s,scope:a}=e,o=s("translations"),l=n.matches("focused"),c=s("orientation")==="vertical",u=s("orientation")==="horizontal",h=s("composite");function m(d){return{selected:r.get("value")===d.value,focused:r.get("focusedValue")===d.value,disabled:!!d.disabled}}return{value:r.get("value"),focusedValue:r.get("focusedValue"),setValue(d){i({type:"SET_VALUE",value:d})},clearValue(){i({type:"CLEAR_VALUE"})},setIndicatorRect(d){let p=ai(a,d);i({type:"SET_INDICATOR_RECT",id:p})},syncTabIndex(){i({type:"SYNC_TAB_INDEX"})},selectNext(d){i({type:"TAB_FOCUS",value:d,src:"selectNext"}),i({type:"ARROW_NEXT",src:"selectNext"})},selectPrev(d){i({type:"TAB_FOCUS",value:d,src:"selectPrev"}),i({type:"ARROW_PREV",src:"selectPrev"})},focus(){var p;let d=r.get("value");d&&((p=Aa(a,d))==null||p.focus())},getRootProps(){return t.element(y(g({},_r.root.attrs),{id:kw(a),"data-orientation":s("orientation"),"data-focus":E(l),dir:s("dir")}))},getListProps(){return t.element(y(g({},_r.list.attrs),{id:Gr(a),role:"tablist",dir:s("dir"),"data-focus":E(l),"aria-orientation":s("orientation"),"data-orientation":s("orientation"),"aria-label":o==null?void 0:o.listLabel,onKeyDown(d){if(d.defaultPrevented||Re(d)||!ce(d.currentTarget,j(d)))return;let p={ArrowDown(){u||i({type:"ARROW_NEXT",key:"ArrowDown"})},ArrowUp(){u||i({type:"ARROW_PREV",key:"ArrowUp"})},ArrowLeft(){c||i({type:"ARROW_PREV",key:"ArrowLeft"})},ArrowRight(){c||i({type:"ARROW_NEXT",key:"ArrowRight"})},Home(){i({type:"HOME"})},End(){i({type:"END"})}},v=ge(d,{dir:s("dir"),orientation:s("orientation")}),I=p[v];if(I){d.preventDefault(),I(d);return}}}))},getTriggerState:m,getTriggerProps(d){let{value:p,disabled:v}=d,I=m(d);return t.button(y(g({},_r.trigger.attrs),{role:"tab",type:"button",disabled:v,dir:s("dir"),"data-orientation":s("orientation"),"data-disabled":E(v),"aria-disabled":v,"data-value":p,"aria-selected":I.selected,"data-selected":E(I.selected),"data-focus":E(I.focused),"aria-controls":I.selected?Zl(a,p):void 0,"data-ownedby":Gr(a),"data-ssr":E(r.get("ssr")),id:ai(a,p),tabIndex:I.selected&&h?0:-1,onFocus(){i({type:"TAB_FOCUS",value:p})},onBlur(T){let O=T.relatedTarget;(O==null?void 0:O.getAttribute("role"))!=="tab"&&i({type:"TAB_BLUR"})},onClick(T){T.defaultPrevented||Fn(T)||v||(Xe()&&T.currentTarget.focus(),i({type:"TAB_CLICK",value:p}))}}))},getContentProps(d){let{value:p}=d,v=r.get("value")===p;return t.element(y(g({},_r.content.attrs),{dir:s("dir"),id:Zl(a,p),tabIndex:h?0:-1,"aria-labelledby":ai(a,p),role:"tabpanel","data-ownedby":Gr(a),"data-selected":E(v),"data-orientation":s("orientation"),hidden:!v}))},getIndicatorProps(){let d=r.get("indicatorRect"),p=d==null||d.width===0&&d.height===0&&d.x===0&&d.y===0;return t.element(y(g({id:ef(a)},_r.indicator.attrs),{dir:s("dir"),"data-orientation":s("orientation"),hidden:p,style:{"--transition-property":"left, right, top, bottom, width, height","--left":ye(d==null?void 0:d.x),"--top":ye(d==null?void 0:d.y),"--width":ye(d==null?void 0:d.width),"--height":ye(d==null?void 0:d.height),position:"absolute",willChange:"var(--transition-property)",transitionProperty:"var(--transition-property)",transitionDuration:"var(--transition-duration, 150ms)",transitionTimingFunction:"var(--transition-timing-function)",[u?"left":"top"]:u?"var(--left)":"var(--top)"}}))}}}var Aw,_r,kw,Gr,Zl,ai,ef,Nw,Rw,Aa,Qp,Yi,Dw,Lw,Mw,Fw,tf,$w,Bw,_w,Gw,rk,Uw,sk,qw,ak,Ww,Kw,rf=re(()=>{"use strict";se();Aw=U("tabs").parts("root","list","trigger","content","indicator"),_r=Aw.build(),kw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`tabs:${e.id}`},Gr=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.list)!=null?n:`tabs:${e.id}:list`},Zl=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.content)==null?void 0:i.call(n,t))!=null?r:`tabs:${e.id}:content-${t}`},ai=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.trigger)==null?void 0:i.call(n,t))!=null?r:`tabs:${e.id}:trigger-${t}`},ef=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicator)!=null?n:`tabs:${e.id}:indicator`},Nw=e=>e.getById(Gr(e)),Rw=(e,t)=>e.getById(Zl(e,t)),Aa=(e,t)=>t!=null?e.getById(ai(e,t)):null,Qp=e=>e.getById(ef(e)),Yi=e=>{let n=`[role=tab][data-ownedby='${CSS.escape(Gr(e))}']:not([disabled])`;return Fe(Nw(e),n)},Dw=e=>lt(Yi(e)),Lw=e=>mt(Yi(e)),Mw=(e,t)=>yi(Yi(e),ai(e,t.value),t.loopFocus),Fw=(e,t)=>bi(Yi(e),ai(e,t.value),t.loopFocus),tf=e=>{var t,n,i,r;return{x:(t=e==null?void 0:e.offsetLeft)!=null?t:0,y:(n=e==null?void 0:e.offsetTop)!=null?n:0,width:(i=e==null?void 0:e.offsetWidth)!=null?i:0,height:(r=e==null?void 0:e.offsetHeight)!=null?r:0}},$w=(e,t)=>{let n=so(Yi(e),ai(e,t));return tf(n)};({createMachine:Bw}=ut()),_w=Bw({props({props:e}){return g({dir:"ltr",orientation:"horizontal",activationMode:"automatic",loopFocus:!0,composite:!0,navigate(t){mi(t.node)},defaultValue:null},e)},initialState(){return"idle"},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var i;(i=e("onValueChange"))==null||i({value:n})}})),focusedValue:t(()=>({defaultValue:e("value")||e("defaultValue"),sync:!0,onChange(n){var i;(i=e("onFocusChange"))==null||i({focusedValue:n})}})),ssr:t(()=>({defaultValue:!0})),indicatorRect:t(()=>({defaultValue:null}))}},watch({context:e,prop:t,track:n,action:i}){n([()=>e.get("value")],()=>{i(["syncIndicatorRect","syncTabIndex","navigateIfNeeded"])}),n([()=>t("dir"),()=>t("orientation")],()=>{i(["syncIndicatorRect"])})},on:{SET_VALUE:{actions:["setValue"]},CLEAR_VALUE:{actions:["clearValue"]},SET_INDICATOR_RECT:{actions:["setIndicatorRect"]},SYNC_TAB_INDEX:{actions:["syncTabIndex"]}},entry:["syncIndicatorRect","syncTabIndex","syncSsr"],exit:["cleanupObserver"],states:{idle:{on:{TAB_FOCUS:{target:"focused",actions:["setFocusedValue"]},TAB_CLICK:{target:"focused",actions:["setFocusedValue","setValue"]}}},focused:{on:{TAB_CLICK:{actions:["setFocusedValue","setValue"]},ARROW_PREV:[{guard:"selectOnFocus",actions:["focusPrevTab","selectFocusedTab"]},{actions:["focusPrevTab"]}],ARROW_NEXT:[{guard:"selectOnFocus",actions:["focusNextTab","selectFocusedTab"]},{actions:["focusNextTab"]}],HOME:[{guard:"selectOnFocus",actions:["focusFirstTab","selectFocusedTab"]},{actions:["focusFirstTab"]}],END:[{guard:"selectOnFocus",actions:["focusLastTab","selectFocusedTab"]},{actions:["focusLastTab"]}],TAB_FOCUS:{actions:["setFocusedValue"]},TAB_BLUR:{target:"idle",actions:["clearFocusedValue"]}}}},implementations:{guards:{selectOnFocus:({prop:e})=>e("activationMode")==="automatic"},actions:{selectFocusedTab({context:e,prop:t}){H(()=>{let n=e.get("focusedValue");if(!n)return;let r=t("deselectable")&&e.get("value")===n?null:n;e.set("value",r)})},setFocusedValue({context:e,event:t,flush:n}){t.value!=null&&n(()=>{e.set("focusedValue",t.value)})},clearFocusedValue({context:e}){e.set("focusedValue",null)},setValue({context:e,event:t,prop:n}){let i=n("deselectable")&&e.get("value")===e.get("focusedValue");e.set("value",i?null:t.value)},clearValue({context:e}){e.set("value",null)},focusFirstTab({scope:e}){H(()=>{var t;(t=Dw(e))==null||t.focus()})},focusLastTab({scope:e}){H(()=>{var t;(t=Lw(e))==null||t.focus()})},focusNextTab({context:e,prop:t,scope:n,event:i}){var a;let r=(a=i.value)!=null?a:e.get("focusedValue");if(!r)return;let s=Mw(n,{value:r,loopFocus:t("loopFocus")});H(()=>{t("composite")?s==null||s.focus():(s==null?void 0:s.dataset.value)!=null&&e.set("focusedValue",s.dataset.value)})},focusPrevTab({context:e,prop:t,scope:n,event:i}){var a;let r=(a=i.value)!=null?a:e.get("focusedValue");if(!r)return;let s=Fw(n,{value:r,loopFocus:t("loopFocus")});H(()=>{t("composite")?s==null||s.focus():(s==null?void 0:s.dataset.value)!=null&&e.set("focusedValue",s.dataset.value)})},syncTabIndex({context:e,scope:t}){H(()=>{let n=e.get("value");if(!n)return;let i=Rw(t,n);if(!i)return;ar(i).length>0?i.removeAttribute("tabindex"):i.setAttribute("tabindex","0")})},cleanupObserver({refs:e}){let t=e.get("indicatorCleanup");t&&t()},setIndicatorRect({context:e,event:t,scope:n}){var a;let i=(a=t.id)!=null?a:e.get("value");!Qp(n)||!i||!Aa(n,i)||e.set("indicatorRect",$w(n,i))},syncSsr({context:e}){e.set("ssr",!1)},syncIndicatorRect({context:e,refs:t,scope:n}){let i=t.get("indicatorCleanup");if(i&&i(),!Qp(n))return;let s=()=>{let l=Aa(n,e.get("value"));if(!l)return;let c=tf(l);e.set("indicatorRect",u=>fe(u,c)?u:c)};s();let a=Yi(n),o=At(...a.map(l=>gn.observe(l,s)));t.set("indicatorCleanup",o)},navigateIfNeeded({context:e,prop:t,scope:n}){var s;let i=e.get("value");if(!i)return;let r=Aa(n,i);st(r)&&((s=t("navigate"))==null||s({value:i,node:r,href:r.href}))}}}}),Gw=_()(["activationMode","composite","deselectable","dir","getRootNode","id","ids","loopFocus","navigate","onFocusChange","onValueChange","orientation","translations","value","defaultValue"]),rk=B(Gw),Uw=_()(["disabled","value"]),sk=B(Uw),qw=_()(["value"]),ak=B(qw),Ww=class extends K{initMachine(e){return new W(_w,e)}initApi(){return Hw(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="tabs"][data-part="root"]');if(!e)return;this.spreadProps(e,this.api.getRootProps());let t=e.querySelector('[data-scope="tabs"][data-part="list"]');if(!t)return;this.spreadProps(t,this.api.getListProps());let n=this.el.getAttribute("data-items"),i=n?JSON.parse(n):[],r=t.querySelectorAll('[data-scope="tabs"][data-part="trigger"]');for(let a=0;a{var a,o;let r=w(e,"onValueChange");r&&this.liveSocket.main.isConnected()&&t(r,{id:e.id,value:(a=i.value)!=null?a:null});let s=w(e,"onValueChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{id:e.id,value:(o=i.value)!=null?o:null}}))},onFocusChange:i=>{var a,o;let r=w(e,"onFocusChange");r&&this.liveSocket.main.isConnected()&&t(r,{id:e.id,value:(a=i.focusedValue)!=null?a:null});let s=w(e,"onFocusChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{id:e.id,value:(o=i.focusedValue)!=null?o:null}}))}}));n.init(),this.tabs=n,this.onSetValue=i=>{let{value:r}=i.detail;n.api.setValue(r)},e.addEventListener("phx:tabs:set-value",this.onSetValue),this.handlers=[],this.handlers.push(this.handleEvent("tabs_set_value",i=>{let r=i.tabs_id;r&&r!==e.id||n.api.setValue(i.value)})),this.handlers.push(this.handleEvent("tabs_value",()=>{this.pushEvent("tabs_value_response",{value:n.api.value})})),this.handlers.push(this.handleEvent("tabs_focused_value",()=>{this.pushEvent("tabs_focused_value_response",{value:n.api.focusedValue})}))},updated(){var e;(e=this.tabs)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlled")?{value:w(this.el,"value")}:{defaultValue:w(this.el,"defaultValue")}),{orientation:w(this.el,"orientation",["horizontal","vertical"]),dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(this.onSetValue&&this.el.removeEventListener("phx:tabs:set-value",this.onSetValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.tabs)==null||e.destroy()}}});var of={};he(of,{Timer:()=>rV});function Xw(e,t){let{state:n,send:i,computed:r,scope:s}=e,a=n.matches("running"),o=n.matches("paused"),l=r("time"),c=r("formattedTime"),u=r("progressPercent");return{running:a,paused:o,time:l,formattedTime:c,progressPercent:u,start(){i({type:"START"})},pause(){i({type:"PAUSE"})},resume(){i({type:"RESUME"})},reset(){i({type:"RESET"})},restart(){i({type:"RESTART"})},getRootProps(){return t.element(g({id:Yw(s)},Rn.root.attrs))},getAreaProps(){return t.element(g({role:"timer",id:jw(s),"aria-label":`${l.days} days ${c.hours}:${c.minutes}:${c.seconds}`,"aria-atomic":!0},Rn.area.attrs))},getControlProps(){return t.element(g({},Rn.control.attrs))},getItemProps(h){let m=l[h.type];return t.element(y(g({},Rn.item.attrs),{"data-type":h.type,style:{"--value":m}}))},getItemLabelProps(h){return t.element(y(g({},Rn.itemLabel.attrs),{"data-type":h.type}))},getItemValueProps(h){return t.element(y(g({},Rn.itemValue.attrs),{"data-type":h.type}))},getSeparatorProps(){return t.element(g({"aria-hidden":!0},Rn.separator.attrs))},getActionTriggerProps(h){if(!sf.has(h.action))throw new Error(`[zag-js] Invalid action: ${h.action}. Must be one of: ${Array.from(sf).join(", ")}`);return t.button(y(g({},Rn.actionTrigger.attrs),{hidden:Ce(h.action,{start:()=>a||o,pause:()=>!a,reset:()=>!a&&!o,resume:()=>!o,restart:()=>!1}),type:"button",onClick(m){m.defaultPrevented||i({type:h.action.toUpperCase()})}}))}}}function Jw(e){let t=Math.max(0,e),n=t%1e3,i=Math.floor(t/1e3)%60,r=Math.floor(t/(1e3*60))%60,s=Math.floor(t/(1e3*60*60))%24;return{days:Math.floor(t/(1e3*60*60*24)),hours:s,minutes:r,seconds:i,milliseconds:n}}function af(e,t,n){let i=n-t;return i===0?0:(e-t)/i}function Ur(e,t=2){return e.toString().padStart(t,"0")}function Qw(e,t){return Math.floor(e/t)*t}function eV(e){let{days:t,hours:n,minutes:i,seconds:r}=e;return{days:Ur(t),hours:Ur(n),minutes:Ur(i),seconds:Ur(r),milliseconds:Ur(e.milliseconds,3)}}function tV(e){let{startMs:t,targetMs:n,countdown:i,interval:r}=e;if(r!=null&&(typeof r!="number"||r<=0))throw new Error(`[timer] Invalid interval: ${r}. Must be a positive number.`);if(t!=null&&(typeof t!="number"||t<0))throw new Error(`[timer] Invalid startMs: ${t}. Must be a non-negative number.`);if(n!=null&&(typeof n!="number"||n<0))throw new Error(`[timer] Invalid targetMs: ${n}. Must be a non-negative number.`);if(i&&t!=null&&n!=null&&t<=n)throw new Error(`[timer] Invalid countdown configuration: startMs (${t}) must be greater than targetMs (${n}).`);if(!i&&t!=null&&n!=null&&t>=n)throw new Error(`[timer] Invalid stopwatch configuration: startMs (${t}) must be less than targetMs (${n}).`);if(i&&n==null&&t!=null&&t<=0)throw new Error(`[timer] Invalid countdown configuration: startMs (${t}) must be greater than 0 when no targetMs is provided.`)}var zw,Rn,Yw,jw,sf,Zw,nV,uk,iV,rV,lf=re(()=>{"use strict";se();zw=U("timer").parts("root","area","control","item","itemValue","itemLabel","actionTrigger","separator"),Rn=zw.build(),Yw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`timer:${e.id}:root`},jw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.area)!=null?n:`timer:${e.id}:area`},sf=new Set(["start","pause","resume","reset","restart"]);Zw={props({props:e}){return tV(e),g({interval:1e3,startMs:0},e)},initialState({prop:e}){return e("autoStart")?"running":"idle"},context({prop:e,bindable:t}){return{currentMs:t(()=>({defaultValue:e("startMs")}))}},watch({track:e,send:t,prop:n}){e([()=>n("startMs")],()=>{t({type:"RESTART"})})},on:{RESTART:{target:"running:temp",actions:["resetTime"]}},computed:{time:({context:e})=>Jw(e.get("currentMs")),formattedTime:({computed:e})=>eV(e("time")),progressPercent:Bn(({context:e,prop:t})=>[e.get("currentMs"),t("targetMs"),t("startMs"),t("countdown")],([e,t=0,n,i])=>{let r=i?af(e,t,n):af(e,n,t);return He(r,0,1)})},states:{idle:{on:{START:{target:"running"},RESET:{actions:["resetTime"]}}},"running:temp":{effects:["waitForNextTick"],on:{CONTINUE:{target:"running"}}},running:{effects:["keepTicking"],on:{PAUSE:{target:"paused"},TICK:[{target:"idle",guard:"hasReachedTarget",actions:["invokeOnComplete"]},{actions:["updateTime","invokeOnTick"]}],RESET:{actions:["resetTime"]}}},paused:{on:{RESUME:{target:"running"},RESET:{target:"idle",actions:["resetTime"]}}}},implementations:{effects:{keepTicking({prop:e,send:t}){return su(({deltaMs:n})=>{t({type:"TICK",deltaMs:n})},e("interval"))},waitForNextTick({send:e}){return mn(()=>{e({type:"CONTINUE"})},0)}},actions:{updateTime({context:e,prop:t,event:n}){let i=t("countdown")?-1:1,r=Qw(n.deltaMs,t("interval"));e.set("currentMs",s=>{let a=s+i*r,o=t("targetMs");return o==null&&t("countdown")&&(o=0),t("countdown")&&o!=null?Math.max(a,o):!t("countdown")&&o!=null?Math.min(a,o):a})},resetTime({context:e,prop:t}){var i;let n=t("targetMs");n==null&&t("countdown")&&(n=0),e.set("currentMs",(i=t("startMs"))!=null?i:0)},invokeOnTick({context:e,prop:t,computed:n}){var i;(i=t("onTick"))==null||i({value:e.get("currentMs"),time:n("time"),formattedTime:n("formattedTime")})},invokeOnComplete({prop:e}){var t;(t=e("onComplete"))==null||t()}},guards:{hasReachedTarget:({context:e,prop:t})=>{let n=t("targetMs");if(n==null&&t("countdown")&&(n=0),n==null)return!1;let i=e.get("currentMs");return t("countdown")?i<=n:i>=n}}}};nV=_()(["autoStart","countdown","getRootNode","id","ids","interval","onComplete","onTick","startMs","targetMs"]),uk=B(nV),iV=class extends K{constructor(){super(...arguments);z(this,"init",()=>{this.machine.subscribe(()=>{this.api=this.initApi(),this.render()}),this.machine.start(),this.api=this.initApi(),this.render()})}initMachine(t){return new W(Zw,t)}initApi(){return Xw(this.machine.service,q)}render(){var a;let t=(a=this.el.querySelector('[data-scope="timer"][data-part="root"]'))!=null?a:this.el;this.spreadProps(t,this.api.getRootProps());let n=this.el.querySelector('[data-scope="timer"][data-part="area"]');n&&this.spreadProps(n,this.api.getAreaProps());let i=this.el.querySelector('[data-scope="timer"][data-part="control"]');i&&this.spreadProps(i,this.api.getControlProps()),["days","hours","minutes","seconds"].forEach(o=>{let l=this.el.querySelector(`[data-scope="timer"][data-part="item"][data-type="${o}"]`);l&&this.spreadProps(l,this.api.getItemProps({type:o}))}),this.el.querySelectorAll('[data-scope="timer"][data-part="separator"]').forEach(o=>{this.spreadProps(o,this.api.getSeparatorProps())}),["start","pause","resume","reset"].forEach(o=>{let l=this.el.querySelector(`[data-scope="timer"][data-part="action-trigger"][data-action="${o}"]`);l&&this.spreadProps(l,this.api.getActionTriggerProps({action:o}))})}},rV={mounted(){var n;let e=this.el,t=new iV(e,{id:e.id,countdown:C(e,"countdown"),startMs:Y(e,"startMs"),targetMs:Y(e,"targetMs"),autoStart:C(e,"autoStart"),interval:(n=Y(e,"interval"))!=null?n:1e3,onTick:i=>{let r=w(e,"onTick");r&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(r,{value:i.value,time:i.time,formattedTime:i.formattedTime,id:e.id})},onComplete:()=>{let i=w(e,"onComplete");i&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(i,{id:e.id})}});t.init(),this.timer=t,this.handlers=[]},updated(){var e,t;(t=this.timer)==null||t.updateProps({id:this.el.id,countdown:C(this.el,"countdown"),startMs:Y(this.el,"startMs"),targetMs:Y(this.el,"targetMs"),autoStart:C(this.el,"autoStart"),interval:(e=Y(this.el,"interval"))!=null?e:1e3})},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.timer)==null||e.destroy()}}});var vf={};he(vf,{Toast:()=>VV});function Jl(e,t){var n;return(n=e!=null?e:gf[t])!=null?n:gf.DEFAULT}function cV(e,t){var v;let{prop:n,computed:i,context:r}=e,{offsets:s,gap:a}=n("store").attrs,o=r.get("heights"),l=lV(s),c=n("dir")==="rtl",u=t.replace("-start",c?"-right":"-left").replace("-end",c?"-left":"-right"),h=u.includes("right"),m=u.includes("left"),d={position:"fixed",pointerEvents:i("count")>0?void 0:"none",display:"flex",flexDirection:"column","--gap":`${a}px`,"--first-height":`${((v=o[0])==null?void 0:v.height)||0}px`,"--viewport-offset-left":l.left,"--viewport-offset-right":l.right,"--viewport-offset-top":l.top,"--viewport-offset-bottom":l.bottom,zIndex:ss},p="center";if(h&&(p="flex-end"),m&&(p="flex-start"),d.alignItems=p,u.includes("top")){let I=l.top;d.top=`max(env(safe-area-inset-top, 0px), ${I})`}if(u.includes("bottom")){let I=l.bottom;d.bottom=`max(env(safe-area-inset-bottom, 0px), ${I})`}if(!u.includes("left")){let I=l.right;d.insetInlineEnd=`calc(env(safe-area-inset-right, 0px) + ${I})`}if(!u.includes("right")){let I=l.left;d.insetInlineStart=`calc(env(safe-area-inset-left, 0px) + ${I})`}return d}function uV(e,t){let{prop:n,context:i,computed:r}=e,s=n("parent"),a=s.computed("placement"),{gap:o}=s.prop("store").attrs,[l]=a.split("-"),c=i.get("mounted"),u=i.get("remainingTime"),h=r("height"),m=r("frontmost"),d=!m,p=!n("stacked"),v=n("stacked"),T=n("type")==="loading"?Number.MAX_SAFE_INTEGER:u,O=r("heightIndex")*o+r("heightBefore"),b={position:"absolute",pointerEvents:"auto","--opacity":"0","--remove-delay":`${n("removeDelay")}ms`,"--duration":`${T}ms`,"--initial-height":`${h}px`,"--offset":`${O}px`,"--index":n("index"),"--z-index":r("zIndex"),"--lift-amount":"calc(var(--lift) * var(--gap))","--y":"100%","--x":"0"},f=S=>Object.assign(b,S);return l==="top"?f({top:"0","--sign":"-1","--y":"-100%","--lift":"1"}):l==="bottom"&&f({bottom:"0","--sign":"1","--y":"100%","--lift":"-1"}),c&&(f({"--y":"0","--opacity":"1"}),v&&f({"--y":"calc(var(--lift) * var(--offset))","--height":"var(--initial-height)"})),t||f({"--opacity":"0",pointerEvents:"none"}),d&&p&&(f({"--base-scale":"var(--index) * 0.05 + 1","--y":"calc(var(--lift-amount) * var(--index))","--scale":"calc(-1 * var(--base-scale))","--height":"var(--first-height)"}),t||f({"--y":"calc(var(--sign) * 40%)"})),d&&v&&!t&&f({"--y":"calc(var(--lift) * var(--offset) + var(--lift) * -100%)"}),m&&!t&&f({"--y":"calc(var(--lift) * -100%)"}),b}function dV(e,t){let{computed:n}=e,i={position:"absolute",inset:"0",scale:"1 2",pointerEvents:t?"none":"auto"},r=s=>Object.assign(i,s);return n("frontmost")&&!t&&r({height:"calc(var(--initial-height) + 80%)"}),i}function hV(){return{position:"absolute",left:"0",height:"calc(var(--gap) + 2px)",bottom:"100%",width:"100%"}}function gV(e,t){let{context:n,prop:i,send:r,refs:s,computed:a}=e;return{getCount(){return n.get("toasts").length},getToasts(){return n.get("toasts")},getGroupProps(o={}){let{label:l="Notifications"}=o,{hotkey:c}=i("store").attrs,u=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=a("placement"),[m,d="center"]=h.split("-");return t.element(y(g({},ji.group.attrs),{dir:i("dir"),tabIndex:-1,"aria-label":`${h} ${l} ${u}`,id:aV(h),"data-placement":h,"data-side":m,"data-align":d,"aria-live":"polite",role:"region",style:cV(e,h),onMouseEnter(){s.get("ignoreMouseTimer").isActive()||r({type:"REGION.POINTER_ENTER",placement:h})},onMouseMove(){s.get("ignoreMouseTimer").isActive()||r({type:"REGION.POINTER_ENTER",placement:h})},onMouseLeave(){s.get("ignoreMouseTimer").isActive()||r({type:"REGION.POINTER_LEAVE",placement:h})},onFocus(p){r({type:"REGION.FOCUS",target:p.relatedTarget})},onBlur(p){s.get("isFocusWithin")&&!ce(p.currentTarget,p.relatedTarget)&&queueMicrotask(()=>r({type:"REGION.BLUR"}))}}))},subscribe(o){return i("store").subscribe(()=>o(n.get("toasts")))}}}function yV(e,t){let{state:n,send:i,prop:r,scope:s,context:a,computed:o}=e,l=n.hasTag("visible"),c=n.hasTag("paused"),u=a.get("mounted"),h=o("frontmost"),m=r("parent").computed("placement"),d=r("type"),p=r("stacked"),v=r("title"),I=r("description"),T=r("action"),[O,b="center"]=m.split("-");return{type:d,title:v,description:I,placement:m,visible:l,paused:c,closable:!!r("closable"),pause(){i({type:"PAUSE"})},resume(){i({type:"RESUME"})},dismiss(){i({type:"DISMISS",src:"programmatic"})},getRootProps(){return t.element(y(g({},ji.root.attrs),{dir:r("dir"),id:mf(s),"data-state":l?"open":"closed","data-type":d,"data-placement":m,"data-align":b,"data-side":O,"data-mounted":E(u),"data-paused":E(c),"data-first":E(h),"data-sibling":E(!h),"data-stack":E(p),"data-overlap":E(!p),role:"status","aria-atomic":"true","aria-describedby":I?hf(s):void 0,"aria-labelledby":v?df(s):void 0,tabIndex:0,style:uV(e,l),onKeyDown(f){f.defaultPrevented||f.key=="Escape"&&(i({type:"DISMISS",src:"keyboard"}),f.preventDefault())}}))},getGhostBeforeProps(){return t.element({"data-ghost":"before",style:dV(e,l)})},getGhostAfterProps(){return t.element({"data-ghost":"after",style:hV()})},getTitleProps(){return t.element(y(g({},ji.title.attrs),{id:df(s)}))},getDescriptionProps(){return t.element(y(g({},ji.description.attrs),{id:hf(s)}))},getActionTriggerProps(){return t.button(y(g({},ji.actionTrigger.attrs),{type:"button",onClick(f){var S;f.defaultPrevented||((S=T==null?void 0:T.onClick)==null||S.call(T),i({type:"DISMISS",src:"user"}))}}))},getCloseTriggerProps(){return t.button(y(g({id:oV(s)},ji.closeTrigger.attrs),{type:"button","aria-label":"Dismiss notification",onClick(f){f.defaultPrevented||i({type:"DISMISS",src:"user"})}}))}}}function pf(e,t){let{id:n,height:i}=t;e.context.set("heights",r=>r.find(a=>a.id===n)?r.map(a=>a.id===n?y(g({},a),{height:i}):a):[{id:n,height:i},...r])}function PV(e={}){let t=IV(e,{placement:"bottom",overlap:!1,max:24,gap:16,offsets:"1rem",hotkey:["altKey","KeyT"],removeDelay:200,pauseOnPageIdle:!0}),n=[],i=[],r=new Set,s=[],a=D=>(n.push(D),()=>{let $=n.indexOf(D);n.splice($,1)}),o=D=>(n.forEach($=>$(D)),D),l=D=>{if(i.length>=t.max){s.push(D);return}o(D),i.unshift(D)},c=()=>{for(;s.length>0&&i.length{var Z;let $=(Z=D.id)!=null?Z:`toast:${ur()}`,te=i.find(ie=>ie.id===$);return r.has($)&&r.delete($),te?i=i.map(ie=>ie.id===$?o(y(g(g({},ie),D),{id:$})):ie):l(y(g({id:$,duration:t.duration,removeDelay:t.removeDelay,type:"info"},D),{stacked:!t.overlap,gap:t.gap})),$},h=D=>(r.add(D),D?(n.forEach($=>$({id:D,dismiss:!0})),i=i.filter($=>$.id!==D),c()):(i.forEach($=>{n.forEach(te=>te({id:$.id,dismiss:!0}))}),i=[],s=[]),D);return{attrs:t,subscribe:a,create:u,update:(D,$)=>u(g({id:D},$)),remove:h,dismiss:D=>{D!=null?i=i.map($=>$.id===D?o(y(g({},$),{message:"DISMISS"})):$):i=i.map($=>o(y(g({},$),{message:"DISMISS"})))},error:D=>u(y(g({},D),{type:"error"})),success:D=>u(y(g({},D),{type:"success"})),info:D=>u(y(g({},D),{type:"info"})),warning:D=>u(y(g({},D),{type:"warning"})),loading:D=>u(y(g({},D),{type:"loading"})),getVisibleToasts:()=>i.filter(D=>!r.has(D.id)),getCount:()=>i.length,promise:(D,$,te={})=>{if(!$||!$.loading){zt("[zag-js > toast] toaster.promise() requires at least a 'loading' option to be specified");return}let Z=u(y(g(g({},te),$.loading),{promise:D,type:"loading"})),ie=!0,J,Se=Kt(D).then(ne=>Ve(null,null,function*(){if(J=["resolve",ne],CV(ne)&&!ne.ok){ie=!1;let Ie=Kt($.error,`HTTP Error! status: ${ne.status}`);u(y(g(g({},te),Ie),{id:Z,type:"error"}))}else if($.success!==void 0){ie=!1;let Ie=Kt($.success,ne);u(y(g(g({},te),Ie),{id:Z,type:"success"}))}})).catch(ne=>Ve(null,null,function*(){if(J=["reject",ne],$.error!==void 0){ie=!1;let Ie=Kt($.error,ne);u(y(g(g({},te),Ie),{id:Z,type:"error"}))}})).finally(()=>{var ne;ie&&h(Z),(ne=$.finally)==null||ne.call($)});return{id:Z,unwrap:()=>new Promise((ne,Ie)=>Se.then(()=>J[0]==="reject"?Ie(J[1]):ne(J[1])).catch(Ie))}},pause:D=>{D!=null?i=i.map($=>$.id===D?o(y(g({},$),{message:"PAUSE"})):$):i=i.map($=>o(y(g({},$),{message:"PAUSE"})))},resume:D=>{D!=null?i=i.map($=>$.id===D?o(y(g({},$),{message:"RESUME"})):$):i=i.map($=>o(y(g({},$),{message:"RESUME"})))},isVisible:D=>!r.has(D)&&!!i.find($=>$.id===D),isDismissed:D=>r.has(D),expand:()=>{i=i.map(D=>o(y(g({},D),{stacked:!0})))},collapse:()=>{i=i.map(D=>o(y(g({},D),{stacked:!1})))}}}function wV(e,t){var s,a,o;let n=(s=t==null?void 0:t.id)!=null?s:Mn(e,"toast"),i=(o=t==null?void 0:t.store)!=null?o:PV({placement:(a=t==null?void 0:t.placement)!=null?a:"bottom",overlap:t==null?void 0:t.overlap,max:t==null?void 0:t.max,gap:t==null?void 0:t.gap,offsets:t==null?void 0:t.offsets,pauseOnPageIdle:t==null?void 0:t.pauseOnPageIdle}),r=new OV(e,{id:n,store:i});return r.init(),SV.set(n,r),Ql.set(n,i),e.dataset.toastGroup="true",e.dataset.toastGroupId=n,{group:r,store:i}}function qr(e){if(e)return Ql.get(e);let t=document.querySelector("[data-toast-group]");if(!t)return;let n=t.dataset.toastGroupId||t.id;return n?Ql.get(n):void 0}var sV,ji,aV,cf,mf,uf,df,hf,oV,gf,lV,pV,fV,mV,vV,bV,EV,IV,CV,ff,SV,Ql,TV,OV,VV,yf=re(()=>{"use strict";Wn();tn();se();sV=U("toast").parts("group","root","title","description","actionTrigger","closeTrigger"),ji=sV.build(),aV=e=>`toast-group:${e}`,cf=(e,t)=>e.getById(`toast-group:${t}`),mf=e=>`toast:${e.id}`,uf=e=>e.getById(mf(e)),df=e=>`toast:${e.id}:title`,hf=e=>`toast:${e.id}:description`,oV=e=>`toast${e.id}:close`,gf={info:5e3,error:5e3,success:2e3,loading:1/0,DEFAULT:5e3};lV=e=>typeof e=="string"?{left:e,right:e,bottom:e,top:e}:e;({guards:pV,createMachine:fV}=ut()),{and:mV}=pV,vV=fV({props({props:e}){return y(g({dir:"ltr",id:ur()},e),{store:e.store})},initialState({prop:e}){return e("store").attrs.overlap?"overlap":"stack"},refs(){return{lastFocusedEl:null,isFocusWithin:!1,isPointerWithin:!1,ignoreMouseTimer:eo.create(),dismissableCleanup:void 0}},context({bindable:e}){return{toasts:e(()=>({defaultValue:[],sync:!0,hash:t=>t.map(n=>n.id).join(",")})),heights:e(()=>({defaultValue:[],sync:!0}))}},computed:{count:({context:e})=>e.get("toasts").length,overlap:({prop:e})=>e("store").attrs.overlap,placement:({prop:e})=>e("store").attrs.placement},effects:["subscribeToStore","trackDocumentVisibility","trackHotKeyPress"],watch({track:e,context:t,action:n}){e([()=>t.hash("toasts")],()=>{queueMicrotask(()=>{n(["collapsedIfEmpty","setDismissableBranch"])})})},exit:["clearDismissableBranch","clearLastFocusedEl","clearMouseEventTimer"],on:{"DOC.HOTKEY":{actions:["focusRegionEl"]},"REGION.BLUR":[{guard:mV("isOverlapping","isPointerOut"),target:"overlap",actions:["collapseToasts","resumeToasts","restoreFocusIfPointerOut"]},{guard:"isPointerOut",target:"stack",actions:["resumeToasts","restoreFocusIfPointerOut"]},{actions:["clearFocusWithin"]}],"TOAST.REMOVE":{actions:["removeToast","removeHeight","ignoreMouseEventsTemporarily"]},"TOAST.PAUSE":{actions:["pauseToasts"]}},states:{stack:{on:{"REGION.POINTER_LEAVE":[{guard:"isOverlapping",target:"overlap",actions:["clearPointerWithin","resumeToasts","collapseToasts"]},{actions:["clearPointerWithin","resumeToasts"]}],"REGION.OVERLAP":{target:"overlap",actions:["collapseToasts"]},"REGION.FOCUS":{actions:["setLastFocusedEl","pauseToasts"]},"REGION.POINTER_ENTER":{actions:["setPointerWithin","pauseToasts"]}}},overlap:{on:{"REGION.STACK":{target:"stack",actions:["expandToasts"]},"REGION.POINTER_ENTER":{target:"stack",actions:["setPointerWithin","pauseToasts","expandToasts"]},"REGION.FOCUS":{target:"stack",actions:["setLastFocusedEl","pauseToasts","expandToasts"]}}}},implementations:{guards:{isOverlapping:({computed:e})=>e("overlap"),isPointerOut:({refs:e})=>!e.get("isPointerWithin")},effects:{subscribeToStore({context:e,prop:t}){let n=t("store");return e.set("toasts",n.getVisibleToasts()),n.subscribe(i=>{if(i.dismiss){e.set("toasts",r=>r.filter(s=>s.id!==i.id));return}e.set("toasts",r=>{let s=r.findIndex(a=>a.id===i.id);return s!==-1?[...r.slice(0,s),g(g({},r[s]),i),...r.slice(s+1)]:[i,...r]})})},trackHotKeyPress({prop:e,send:t}){return ee(document,"keydown",i=>{let{hotkey:r}=e("store").attrs;r.every(a=>i[a]||i.code===a)&&t({type:"DOC.HOTKEY"})},{capture:!0})},trackDocumentVisibility({prop:e,send:t,scope:n}){let{pauseOnPageIdle:i}=e("store").attrs;if(!i)return;let r=n.getDoc();return ee(r,"visibilitychange",()=>{let s=r.visibilityState==="hidden";t({type:s?"PAUSE_ALL":"RESUME_ALL"})})}},actions:{setDismissableBranch({refs:e,context:t,computed:n,scope:i}){var c;let r=t.get("toasts"),s=n("placement"),a=r.length>0;if(!a){(c=e.get("dismissableCleanup"))==null||c();return}if(a&&e.get("dismissableCleanup"))return;let l=Wd(()=>cf(i,s),{defer:!0});e.set("dismissableCleanup",l)},clearDismissableBranch({refs:e}){var t;(t=e.get("dismissableCleanup"))==null||t()},focusRegionEl({scope:e,computed:t}){queueMicrotask(()=>{var n;(n=cf(e,t("placement")))==null||n.focus()})},pauseToasts({prop:e}){e("store").pause()},resumeToasts({prop:e}){e("store").resume()},expandToasts({prop:e}){e("store").expand()},collapseToasts({prop:e}){e("store").collapse()},removeToast({prop:e,event:t}){e("store").remove(t.id)},removeHeight({event:e,context:t}){(e==null?void 0:e.id)!=null&&queueMicrotask(()=>{t.set("heights",n=>n.filter(i=>i.id!==e.id))})},collapsedIfEmpty({send:e,computed:t}){!t("overlap")||t("count")>1||e({type:"REGION.OVERLAP"})},setLastFocusedEl({refs:e,event:t}){e.get("isFocusWithin")||!t.target||(e.set("isFocusWithin",!0),e.set("lastFocusedEl",t.target))},restoreFocusIfPointerOut({refs:e}){var t;!e.get("lastFocusedEl")||e.get("isPointerWithin")||((t=e.get("lastFocusedEl"))==null||t.focus({preventScroll:!0}),e.set("lastFocusedEl",null),e.set("isFocusWithin",!1))},setPointerWithin({refs:e}){e.set("isPointerWithin",!0)},clearPointerWithin({refs:e}){var t;e.set("isPointerWithin",!1),e.get("lastFocusedEl")&&!e.get("isFocusWithin")&&((t=e.get("lastFocusedEl"))==null||t.focus({preventScroll:!0}),e.set("lastFocusedEl",null))},clearFocusWithin({refs:e}){e.set("isFocusWithin",!1)},clearLastFocusedEl({refs:e}){var t;e.get("lastFocusedEl")&&((t=e.get("lastFocusedEl"))==null||t.focus({preventScroll:!0}),e.set("lastFocusedEl",null),e.set("isFocusWithin",!1))},ignoreMouseEventsTemporarily({refs:e}){e.get("ignoreMouseTimer").request()},clearMouseEventTimer({refs:e}){e.get("ignoreMouseTimer").cancel()}}}});({not:bV}=Ee()),EV={props({props:e}){return yn(e,["id","type","parent","removeDelay"],"toast"),y(g({closable:!0},e),{duration:Jl(e.duration,e.type)})},initialState({prop:e}){return e("type")==="loading"||e("duration")===1/0?"visible:persist":"visible"},context({prop:e,bindable:t}){return{remainingTime:t(()=>({defaultValue:Jl(e("duration"),e("type"))})),createdAt:t(()=>({defaultValue:Date.now()})),mounted:t(()=>({defaultValue:!1})),initialHeight:t(()=>({defaultValue:0}))}},refs(){return{closeTimerStartTime:Date.now(),lastCloseStartTimerStartTime:0}},computed:{zIndex:({prop:e})=>{let t=e("parent").context.get("toasts"),n=t.findIndex(i=>i.id===e("id"));return t.length-n},height:({prop:e})=>{var i;let n=e("parent").context.get("heights").find(r=>r.id===e("id"));return(i=n==null?void 0:n.height)!=null?i:0},heightIndex:({prop:e})=>e("parent").context.get("heights").findIndex(n=>n.id===e("id")),frontmost:({prop:e})=>e("index")===0,heightBefore:({prop:e})=>{let t=e("parent").context.get("heights"),n=t.findIndex(i=>i.id===e("id"));return t.reduce((i,r,s)=>s>=n?i:i+r.height,0)},shouldPersist:({prop:e})=>e("type")==="loading"||e("duration")===1/0},watch({track:e,prop:t,send:n}){e([()=>t("message")],()=>{let i=t("message");i&&n({type:i,src:"programmatic"})}),e([()=>t("type"),()=>t("duration")],()=>{n({type:"UPDATE"})})},on:{UPDATE:[{guard:"shouldPersist",target:"visible:persist",actions:["resetCloseTimer"]},{target:"visible:updating",actions:["resetCloseTimer"]}],MEASURE:{actions:["measureHeight"]}},entry:["setMounted","measureHeight","invokeOnVisible"],effects:["trackHeight"],states:{"visible:updating":{tags:["visible","updating"],effects:["waitForNextTick"],on:{SHOW:{target:"visible"}}},"visible:persist":{tags:["visible","paused"],on:{RESUME:{guard:bV("isLoadingType"),target:"visible",actions:["setCloseTimer"]},DISMISS:{target:"dismissing"}}},visible:{tags:["visible"],effects:["waitForDuration"],on:{DISMISS:{target:"dismissing"},PAUSE:{target:"visible:persist",actions:["syncRemainingTime"]}}},dismissing:{entry:["invokeOnDismiss"],effects:["waitForRemoveDelay"],on:{REMOVE:{target:"unmounted",actions:["notifyParentToRemove"]}}},unmounted:{entry:["invokeOnUnmount"]}},implementations:{effects:{waitForRemoveDelay({prop:e,send:t}){return mn(()=>{t({type:"REMOVE",src:"timer"})},e("removeDelay"))},waitForDuration({send:e,context:t,computed:n}){if(!n("shouldPersist"))return mn(()=>{e({type:"DISMISS",src:"timer"})},t.get("remainingTime"))},waitForNextTick({send:e}){return mn(()=>{e({type:"SHOW",src:"timer"})},0)},trackHeight({scope:e,prop:t}){let n;return H(()=>{let i=uf(e);if(!i)return;let r=()=>{let o=i.style.height;i.style.height="auto";let l=i.getBoundingClientRect().height;i.style.height=o;let c={id:t("id"),height:l};pf(t("parent"),c)},s=e.getWin(),a=new s.MutationObserver(r);a.observe(i,{childList:!0,subtree:!0,characterData:!0}),n=()=>a.disconnect()}),()=>n==null?void 0:n()}},guards:{isLoadingType:({prop:e})=>e("type")==="loading",shouldPersist:({computed:e})=>e("shouldPersist")},actions:{setMounted({context:e}){H(()=>{e.set("mounted",!0)})},measureHeight({scope:e,prop:t,context:n}){queueMicrotask(()=>{let i=uf(e);if(!i)return;let r=i.style.height;i.style.height="auto";let s=i.getBoundingClientRect().height;i.style.height=r,n.set("initialHeight",s);let a={id:t("id"),height:s};pf(t("parent"),a)})},setCloseTimer({refs:e}){e.set("closeTimerStartTime",Date.now())},resetCloseTimer({context:e,refs:t,prop:n}){t.set("closeTimerStartTime",Date.now()),e.set("remainingTime",Jl(n("duration"),n("type")))},syncRemainingTime({context:e,refs:t}){e.set("remainingTime",n=>{let i=t.get("closeTimerStartTime"),r=Date.now()-i;return t.set("lastCloseStartTimerStartTime",Date.now()),n-r})},notifyParentToRemove({prop:e}){e("parent").send({type:"TOAST.REMOVE",id:e("id")})},invokeOnDismiss({prop:e,event:t}){var n;(n=e("onStatusChange"))==null||n({status:"dismissing",src:t.src})},invokeOnUnmount({prop:e}){var t;(t=e("onStatusChange"))==null||t({status:"unmounted"})},invokeOnVisible({prop:e}){var t;(t=e("onStatusChange"))==null||t({status:"visible"})}}}};IV=(e,t)=>g(g({},t),Si(e));CV=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",ff={connect:gV,machine:vV},SV=new Map,Ql=new Map,TV=class extends K{constructor(t,n){super(t,n);z(this,"parts");z(this,"duration");z(this,"destroy",()=>{this.machine.stop(),this.el.remove()});this.duration=n.duration,this.el.setAttribute("data-scope","toast"),this.el.setAttribute("data-part","root"),this.el.innerHTML=` + `,n.body.appendChild(i)};$T=(e,t={})=>new Intl.NumberFormat(e,t),HT=(e,t={})=>new Qg(e,t),Nl=(e,t)=>{let{prop:n,computed:i}=t;return n("formatOptions")?e===""?Number.NaN:i("parser").parse(e):parseFloat(e)},ti=(e,t)=>{let{prop:n,computed:i}=t;return Number.isNaN(e)?"":n("formatOptions")?i("formatter").format(e):e.toString()},BT=(e,t)=>{let n=e!==void 0&&!Number.isNaN(e)?e:1;return(t==null?void 0:t.style)==="percent"&&(e===void 0||Number.isNaN(e))&&(n=.01),n},{choose:_T,guards:GT,createMachine:UT}=ut(),{not:Xg,and:Zg}=GT,qT=UT({props({props:e}){let t=BT(e.step,e.formatOptions);return y(g({dir:"ltr",locale:"en-US",focusInputOnChange:!0,clampValueOnBlur:!e.allowOverflow,allowOverflow:!1,inputMode:"decimal",pattern:"-?[0-9]*(.[0-9]+)?",defaultValue:"",step:t,min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,spinOnPress:!0},e),{translations:g({incrementLabel:"increment value",decrementLabel:"decrease value"},e.translations)})},initialState(){return"idle"},context({prop:e,bindable:t,getComputed:n}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(i){var a;let r=n(),s=Nl(i,{computed:r,prop:e});(a=e("onValueChange"))==null||a({value:i,valueAsNumber:s})}})),hint:t(()=>({defaultValue:null})),scrubberCursorPoint:t(()=>({defaultValue:null,hash(i){return i?`x:${i.x}, y:${i.y}`:""}})),fieldsetDisabled:t(()=>({defaultValue:!1}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",valueAsNumber:({context:e,computed:t,prop:n})=>Nl(e.get("value"),{computed:t,prop:n}),formattedValue:({computed:e,prop:t})=>ti(e("valueAsNumber"),{computed:e,prop:t}),isAtMin:({computed:e,prop:t})=>Qc(e("valueAsNumber"),t("min")),isAtMax:({computed:e,prop:t})=>Jc(e("valueAsNumber"),t("max")),isOutOfRange:({computed:e,prop:t})=>!Pi(e("valueAsNumber"),t("min"),t("max")),isValueEmpty:({context:e})=>e.get("value")==="",isDisabled:({prop:e,context:t})=>!!e("disabled")||t.get("fieldsetDisabled"),canIncrement:({prop:e,computed:t})=>e("allowOverflow")||!t("isAtMax"),canDecrement:({prop:e,computed:t})=>e("allowOverflow")||!t("isAtMin"),valueText:({prop:e,context:t})=>{var n,i;return(i=(n=e("translations")).valueText)==null?void 0:i.call(n,t.get("value"))},formatter:Bn(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>$T(e,t)),parser:Bn(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>HT(e,t))},watch({track:e,action:t,context:n,computed:i,prop:r}){e([()=>n.get("value"),()=>r("locale"),()=>JSON.stringify(r("formatOptions"))],()=>{t(["syncInputElement"])}),e([()=>i("isOutOfRange")],()=>{t(["invokeOnInvalid"])}),e([()=>n.hash("scrubberCursorPoint")],()=>{t(["setVirtualCursorPosition"])})},effects:["trackFormControl"],on:{"VALUE.SET":{actions:["setRawValue"]},"VALUE.CLEAR":{actions:["clearValue"]},"VALUE.INCREMENT":{actions:["increment"]},"VALUE.DECREMENT":{actions:["decrement"]}},states:{idle:{on:{"TRIGGER.PRESS_DOWN":[{guard:"isTouchPointer",target:"before:spin",actions:["setHint"]},{target:"before:spin",actions:["focusInput","invokeOnFocus","setHint"]}],"SCRUBBER.PRESS_DOWN":{target:"scrubbing",actions:["focusInput","invokeOnFocus","setHint","setCursorPoint"]},"INPUT.FOCUS":{target:"focused",actions:["focusInput","invokeOnFocus"]}}},focused:{tags:["focus"],effects:["attachWheelListener"],on:{"TRIGGER.PRESS_DOWN":[{guard:"isTouchPointer",target:"before:spin",actions:["setHint"]},{target:"before:spin",actions:["focusInput","setHint"]}],"SCRUBBER.PRESS_DOWN":{target:"scrubbing",actions:["focusInput","setHint","setCursorPoint"]},"INPUT.ARROW_UP":{actions:["increment"]},"INPUT.ARROW_DOWN":{actions:["decrement"]},"INPUT.HOME":{actions:["decrementToMin"]},"INPUT.END":{actions:["incrementToMax"]},"INPUT.CHANGE":{actions:["setValue","setHint"]},"INPUT.BLUR":[{guard:Zg("clampValueOnBlur",Xg("isInRange")),target:"idle",actions:["setClampedValue","clearHint","invokeOnBlur","invokeOnValueCommit"]},{guard:Xg("isInRange"),target:"idle",actions:["setFormattedValue","clearHint","invokeOnBlur","invokeOnInvalid","invokeOnValueCommit"]},{target:"idle",actions:["setFormattedValue","clearHint","invokeOnBlur","invokeOnValueCommit"]}],"INPUT.ENTER":{actions:["setFormattedValue","clearHint","invokeOnBlur","invokeOnValueCommit"]}}},"before:spin":{tags:["focus"],effects:["trackButtonDisabled","waitForChangeDelay"],entry:_T([{guard:"isIncrementHint",actions:["increment"]},{guard:"isDecrementHint",actions:["decrement"]}]),on:{CHANGE_DELAY:{target:"spinning",guard:Zg("isInRange","spinOnPress")},"TRIGGER.PRESS_UP":[{guard:"isTouchPointer",target:"focused",actions:["clearHint"]},{target:"focused",actions:["focusInput","clearHint"]}]}},spinning:{tags:["focus"],effects:["trackButtonDisabled","spinValue"],on:{SPIN:[{guard:"isIncrementHint",actions:["increment"]},{guard:"isDecrementHint",actions:["decrement"]}],"TRIGGER.PRESS_UP":{target:"focused",actions:["focusInput","clearHint"]}}},scrubbing:{tags:["focus"],effects:["activatePointerLock","trackMousemove","setupVirtualCursor","preventTextSelection"],on:{"SCRUBBER.POINTER_UP":{target:"focused",actions:["focusInput","clearCursorPoint"]},"SCRUBBER.POINTER_MOVE":[{guard:"isIncrementHint",actions:["increment","setCursorPoint"]},{guard:"isDecrementHint",actions:["decrement","setCursorPoint"]}]}}},implementations:{guards:{clampValueOnBlur:({prop:e})=>e("clampValueOnBlur"),spinOnPress:({prop:e})=>!!e("spinOnPress"),isInRange:({computed:e})=>!e("isOutOfRange"),isDecrementHint:({context:e,event:t})=>{var n;return((n=t.hint)!=null?n:e.get("hint"))==="decrement"},isIncrementHint:({context:e,event:t})=>{var n;return((n=t.hint)!=null?n:e.get("hint"))==="increment"},isTouchPointer:({event:e})=>e.pointerType==="touch"},effects:{waitForChangeDelay({send:e}){let t=setTimeout(()=>{e({type:"CHANGE_DELAY"})},300);return()=>clearTimeout(t)},spinValue({send:e}){let t=setInterval(()=>{e({type:"SPIN"})},50);return()=>clearInterval(t)},trackFormControl({context:e,scope:t}){let n=ni(t);return wt(n,{onFieldsetDisabledChange(i){e.set("fieldsetDisabled",i)},onFormReset(){e.set("value",e.initial("value"))}})},setupVirtualCursor({context:e,scope:t}){let n=e.get("scrubberCursorPoint");return RT(t,n)},preventTextSelection({scope:e}){return DT(e)},trackButtonDisabled({context:e,scope:t,send:n}){let i=e.get("hint"),r=NT(t,i);return ot(r,{attributes:["disabled"],callback(){n({type:"TRIGGER.PRESS_UP",src:"attr"})}})},attachWheelListener({scope:e,send:t,prop:n}){let i=ni(e);if(!i||!e.isActiveElement(i)||!n("allowMouseWheel"))return;function r(s){s.preventDefault();let a=Math.sign(s.deltaY)*-1;a===1?t({type:"VALUE.INCREMENT"}):a===-1&&t({type:"VALUE.DECREMENT"})}return ee(i,"wheel",r,{passive:!1})},activatePointerLock({scope:e}){if(!Xe())return Mc(e.getDoc())},trackMousemove({scope:e,send:t,context:n,computed:i}){let r=e.getDoc();function s(o){let l=n.get("scrubberCursorPoint"),c=i("isRtl"),u=LT(e,{point:l,isRtl:c,event:o});u.hint&&t({type:"SCRUBBER.POINTER_MOVE",hint:u.hint,point:u.point})}function a(){t({type:"SCRUBBER.POINTER_UP"})}return At(ee(r,"mousemove",s,!1),ee(r,"mouseup",a,!1))}},actions:{focusInput({scope:e,prop:t}){if(!t("focusInputOnChange"))return;let n=ni(e);e.isActiveElement(n)||H(()=>n==null?void 0:n.focus({preventScroll:!0}))},increment({context:e,event:t,prop:n,computed:i}){var s;let r=nu(i("valueAsNumber"),(s=t.step)!=null?s:n("step"));n("allowOverflow")||(r=He(r,n("min"),n("max"))),e.set("value",ti(r,{computed:i,prop:n}))},decrement({context:e,event:t,prop:n,computed:i}){var s;let r=iu(i("valueAsNumber"),(s=t.step)!=null?s:n("step"));n("allowOverflow")||(r=He(r,n("min"),n("max"))),e.set("value",ti(r,{computed:i,prop:n}))},setClampedValue({context:e,prop:t,computed:n}){let i=He(n("valueAsNumber"),t("min"),t("max"));e.set("value",ti(i,{computed:n,prop:t}))},setRawValue({context:e,event:t,prop:n,computed:i}){let r=Nl(t.value,{computed:i,prop:n});n("allowOverflow")||(r=He(r,n("min"),n("max"))),e.set("value",ti(r,{computed:i,prop:n}))},setValue({context:e,event:t}){var i,r;let n=(r=(i=t.target)==null?void 0:i.value)!=null?r:t.value;e.set("value",n)},clearValue({context:e}){e.set("value","")},incrementToMax({context:e,prop:t,computed:n}){let i=ti(t("max"),{computed:n,prop:t});e.set("value",i)},decrementToMin({context:e,prop:t,computed:n}){let i=ti(t("min"),{computed:n,prop:t});e.set("value",i)},setHint({context:e,event:t}){e.set("hint",t.hint)},clearHint({context:e}){e.set("hint",null)},invokeOnFocus({computed:e,prop:t}){var n;(n=t("onFocusChange"))==null||n({focused:!0,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnBlur({computed:e,prop:t}){var n;(n=t("onFocusChange"))==null||n({focused:!1,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnInvalid({computed:e,prop:t,event:n}){var r;if(n.type==="INPUT.CHANGE")return;let i=e("valueAsNumber")>t("max")?"rangeOverflow":"rangeUnderflow";(r=t("onValueInvalid"))==null||r({reason:i,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnValueCommit({computed:e,prop:t}){var n;(n=t("onValueCommit"))==null||n({value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},syncInputElement({context:e,event:t,computed:n,scope:i}){var o;let r=t.type.endsWith("CHANGE")?e.get("value"):n("formattedValue"),s=ni(i),a=(o=t.selection)!=null?o:Dl(s,i);H(()=>{Me(s,r),OT(s,a,i)})},setFormattedValue({context:e,computed:t,action:n}){e.set("value",t("formattedValue")),n(["syncInputElement"])},setCursorPoint({context:e,event:t}){e.set("scrubberCursorPoint",t.point)},clearCursorPoint({context:e}){e.set("scrubberCursorPoint",null)},setVirtualCursorPosition({context:e,scope:t}){let n=ip(t),i=e.get("scrubberCursorPoint");!n||!i||(n.style.transform=`translate3d(${i.x}px, ${i.y}px, 0px)`)}}}}),WT=_()(["allowMouseWheel","allowOverflow","clampValueOnBlur","dir","disabled","focusInputOnChange","form","formatOptions","getRootNode","id","ids","inputMode","invalid","locale","max","min","name","onFocusChange","onValueChange","onValueCommit","onValueInvalid","pattern","required","readOnly","spinOnPress","step","translations","value","defaultValue"]),vA=B(WT),KT=class extends K{initMachine(e){return new W(qT,e)}initApi(){return FT(this.machine.service,q)}render(){var l;let e=(l=this.el.querySelector('[data-scope="number-input"][data-part="root"]'))!=null?l:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="number-input"][data-part="label"]');t&&this.spreadProps(t,this.api.getLabelProps());let n=this.el.querySelector('[data-scope="number-input"][data-part="control"]');n&&this.spreadProps(n,this.api.getControlProps());let i=this.el.querySelector('[data-scope="number-input"][data-part="value-text"]');i&&this.spreadProps(i,this.api.getValueTextProps());let r=this.el.querySelector('[data-scope="number-input"][data-part="input"]');r&&this.spreadProps(r,this.api.getInputProps());let s=this.el.querySelector('[data-scope="number-input"][data-part="decrement-trigger"]');s&&this.spreadProps(s,this.api.getDecrementTriggerProps());let a=this.el.querySelector('[data-scope="number-input"][data-part="increment-trigger"]');a&&this.spreadProps(a,this.api.getIncrementTriggerProps());let o=this.el.querySelector('[data-scope="number-input"][data-part="scrubber"]');o&&(this.spreadProps(o,this.api.getScrubberProps()),o.setAttribute("aria-label","Scrub to adjust value"),o.removeAttribute("role"))}},zT={mounted(){let e=this.el,t=w(e,"value"),n=w(e,"defaultValue"),i=C(e,"controlled"),r=new KT(e,y(g({id:e.id},i&&t!==void 0?{value:t}:{defaultValue:n}),{min:z(e,"min"),max:z(e,"max"),step:z(e,"step"),disabled:C(e,"disabled"),readOnly:C(e,"readOnly"),invalid:C(e,"invalid"),required:C(e,"required"),allowMouseWheel:C(e,"allowMouseWheel"),name:w(e,"name"),form:w(e,"form"),onValueChange:s=>{let a=e.querySelector('[data-scope="number-input"][data-part="input"]');a&&(a.value=s.value,a.dispatchEvent(new Event("input",{bubbles:!0})),a.dispatchEvent(new Event("change",{bubbles:!0})));let o=w(e,"onValueChange");o&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(o,{value:s.value,valueAsNumber:s.valueAsNumber,id:e.id});let l=w(e,"onValueChangeClient");l&&e.dispatchEvent(new CustomEvent(l,{bubbles:!0,detail:{value:s,id:e.id}}))}}));r.init(),this.numberInput=r,this.handlers=[]},updated(){var n;let e=w(this.el,"value"),t=C(this.el,"controlled");(n=this.numberInput)==null||n.updateProps(y(g({id:this.el.id},t&&e!==void 0?{value:e}:{}),{min:z(this.el,"min"),max:z(this.el,"max"),step:z(this.el,"step"),disabled:C(this.el,"disabled"),readOnly:C(this.el,"readOnly"),invalid:C(this.el,"invalid"),required:C(this.el,"required"),name:w(this.el,"name"),form:w(this.el,"form")}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.numberInput)==null||e.destroy()}}});var ap={};he(ap,{PasswordInput:()=>eO});function jT(e,t){let{scope:n,prop:i,context:r}=e,s=r.get("visible"),a=!!i("disabled"),o=!!i("invalid"),l=!!i("readOnly"),c=!!i("required"),u=!(l||a),h=i("translations");return{visible:s,disabled:a,invalid:o,focus(){var m;(m=Ll(n))==null||m.focus()},setVisible(m){e.send({type:"VISIBILITY.SET",value:m})},toggleVisible(){e.send({type:"VISIBILITY.SET",value:!s})},getRootProps(){return t.element(y(g({},qi.root.attrs),{dir:i("dir"),"data-disabled":E(a),"data-invalid":E(o),"data-readonly":E(l)}))},getLabelProps(){return t.label(y(g({},qi.label.attrs),{htmlFor:ba(n),"data-disabled":E(a),"data-invalid":E(o),"data-readonly":E(l),"data-required":E(c)}))},getInputProps(){return t.input(g(y(g({},qi.input.attrs),{id:ba(n),autoCapitalize:"off",name:i("name"),required:i("required"),autoComplete:i("autoComplete"),spellCheck:!1,readOnly:l,disabled:a,type:s?"text":"password","data-state":s?"visible":"hidden","aria-invalid":X(o),"data-disabled":E(a),"data-invalid":E(o),"data-readonly":E(l)}),i("ignorePasswordManagers")?XT:{}))},getVisibilityTriggerProps(){var m;return t.button(y(g({},qi.visibilityTrigger.attrs),{type:"button",tabIndex:-1,"aria-controls":ba(n),"aria-expanded":s,"data-readonly":E(l),disabled:a,"data-disabled":E(a),"data-state":s?"visible":"hidden","aria-label":(m=h==null?void 0:h.visibilityTrigger)==null?void 0:m.call(h,s),onPointerDown(d){pe(d)&&u&&(d.preventDefault(),e.send({type:"TRIGGER.CLICK"}))}}))},getIndicatorProps(){return t.element(y(g({},qi.indicator.attrs),{"aria-hidden":!0,"data-state":s?"visible":"hidden","data-disabled":E(a),"data-invalid":E(o),"data-readonly":E(l)}))},getControlProps(){return t.element(y(g({},qi.control.attrs),{"data-disabled":E(a),"data-invalid":E(o),"data-readonly":E(l)}))}}}var YT,qi,ba,Ll,XT,ZT,JT,SA,QT,eO,op=re(()=>{"use strict";se();YT=U("password-input").parts("root","input","label","control","indicator","visibilityTrigger"),qi=YT.build(),ba=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.input)!=null?n:`p-input-${e.id}-input`},Ll=e=>e.getById(ba(e));XT={"data-1p-ignore":"","data-lpignore":"true","data-bwignore":"true","data-form-type":"other","data-protonpass-ignore":"true"},ZT={props({props:e}){return y(g({id:ur(),defaultVisible:!1,autoComplete:"current-password",ignorePasswordManagers:!1},e),{translations:g({visibilityTrigger(t){return t?"Hide password":"Show password"}},e.translations)})},context({prop:e,bindable:t}){return{visible:t(()=>({value:e("visible"),defaultValue:e("defaultVisible"),onChange(n){var i;(i=e("onVisibilityChange"))==null||i({visible:n})}}))}},initialState(){return"idle"},effects:["trackFormEvents"],states:{idle:{on:{"VISIBILITY.SET":{actions:["setVisibility"]},"TRIGGER.CLICK":{actions:["toggleVisibility","focusInputEl"]}}}},implementations:{actions:{setVisibility({context:e,event:t}){e.set("visible",t.value)},toggleVisibility({context:e}){e.set("visible",t=>!t)},focusInputEl({scope:e}){let t=Ll(e);t==null||t.focus()}},effects:{trackFormEvents({scope:e,send:t}){let n=Ll(e),i=n==null?void 0:n.form;if(!i)return;let r=e.getWin(),s=new r.AbortController;return i.addEventListener("reset",a=>{a.defaultPrevented||t({type:"VISIBILITY.SET",value:!1})},{signal:s.signal}),i.addEventListener("submit",()=>{t({type:"VISIBILITY.SET",value:!1})},{signal:s.signal}),()=>s.abort()}}}},JT=_()(["defaultVisible","dir","id","onVisibilityChange","visible","ids","getRootNode","disabled","invalid","required","readOnly","translations","ignorePasswordManagers","autoComplete","name"]),SA=B(JT),QT=class extends K{initMachine(e){return new W(ZT,e)}initApi(){return jT(this.machine.service,q)}render(){var a;let e=(a=this.el.querySelector('[data-scope="password-input"][data-part="root"]'))!=null?a:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="password-input"][data-part="label"]');t&&this.spreadProps(t,this.api.getLabelProps());let n=this.el.querySelector('[data-scope="password-input"][data-part="control"]');n&&this.spreadProps(n,this.api.getControlProps());let i=this.el.querySelector('[data-scope="password-input"][data-part="input"]');i&&this.spreadProps(i,this.api.getInputProps());let r=this.el.querySelector('[data-scope="password-input"][data-part="visibility-trigger"]');r&&this.spreadProps(r,this.api.getVisibilityTriggerProps());let s=this.el.querySelector('[data-scope="password-input"][data-part="indicator"]');s&&this.spreadProps(s,this.api.getIndicatorProps())}},eO={mounted(){let e=this.el,t=new QT(e,y(g({id:e.id},C(e,"controlledVisible")?{visible:C(e,"visible")}:{defaultVisible:C(e,"defaultVisible")}),{disabled:C(e,"disabled"),invalid:C(e,"invalid"),readOnly:C(e,"readOnly"),required:C(e,"required"),ignorePasswordManagers:C(e,"ignorePasswordManagers"),name:w(e,"name"),dir:Oe(e),autoComplete:w(e,"autoComplete",["current-password","new-password"]),onVisibilityChange:n=>{let i=w(e,"onVisibilityChange");i&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(i,{visible:n.visible,id:e.id});let r=w(e,"onVisibilityChangeClient");r&&e.dispatchEvent(new CustomEvent(r,{bubbles:!0,detail:{value:n,id:e.id}}))}}));t.init(),this.passwordInput=t,this.handlers=[]},updated(){var e;(e=this.passwordInput)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlledVisible")?{visible:C(this.el,"visible")}:{}),{disabled:C(this.el,"disabled"),invalid:C(this.el,"invalid"),readOnly:C(this.el,"readOnly"),required:C(this.el,"required"),name:w(this.el,"name"),form:w(this.el,"form"),dir:Oe(this.el)}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.passwordInput)==null||e.destroy()}}});var dp={};he(dp,{PinInput:()=>fO});function lO(e,t){var n;return e?!!((n=oO[e])!=null&&n.test(t)):!0}function cp(e,t,n){return n?new RegExp(n,"g").test(e):lO(t,e)}function cO(e,t){let{send:n,context:i,computed:r,prop:s,scope:a}=e,o=r("isValueComplete"),l=!!s("disabled"),c=!!s("readOnly"),u=!!s("invalid"),h=!!s("required"),m=s("translations"),d=i.get("focusedIndex");function p(){var v;(v=aO(a))==null||v.focus()}return{focus:p,count:i.get("count"),items:Array.from({length:i.get("count")}).map((v,I)=>I),value:i.get("value"),valueAsString:r("valueAsString"),complete:o,setValue(v){Array.isArray(v)||vs("[pin-input/setValue] value must be an array"),n({type:"VALUE.SET",value:v})},clearValue(){n({type:"VALUE.CLEAR"})},setValueAtIndex(v,I){n({type:"VALUE.SET",value:I,index:v})},getRootProps(){return t.element(y(g({dir:s("dir")},Ea.root.attrs),{id:Fr(a),"data-invalid":E(u),"data-disabled":E(l),"data-complete":E(o),"data-readonly":E(c)}))},getLabelProps(){return t.label(y(g({},Ea.label.attrs),{dir:s("dir"),htmlFor:Fl(a),id:iO(a),"data-invalid":E(u),"data-disabled":E(l),"data-complete":E(o),"data-required":E(h),"data-readonly":E(c),onClick(v){v.preventDefault(),p()}}))},getHiddenInputProps(){return t.input({"aria-hidden":!0,type:"text",tabIndex:-1,id:Fl(a),readOnly:c,disabled:l,required:h,name:s("name"),form:s("form"),style:Vt,maxLength:r("valueLength"),defaultValue:r("valueAsString")})},getControlProps(){return t.element(y(g({},Ea.control.attrs),{dir:s("dir"),id:rO(a)}))},getInputProps(v){var O;let{index:I}=v,T=s("type")==="numeric"?"tel":"text";return t.input(y(g({},Ea.input.attrs),{dir:s("dir"),disabled:l,"data-disabled":E(l),"data-complete":E(o),id:nO(a,I.toString()),"data-index":I,"data-ownedby":Fr(a),"aria-label":(O=m==null?void 0:m.inputLabel)==null?void 0:O.call(m,I,r("valueLength")),inputMode:s("otp")||s("type")==="numeric"?"numeric":"text","aria-invalid":X(u),"data-invalid":E(u),type:s("mask")?"password":T,defaultValue:i.get("value")[I]||"",readOnly:c,autoCapitalize:"none",autoComplete:s("otp")?"one-time-code":"off",placeholder:d===I?"":s("placeholder"),onPaste(b){var P;let f=(P=b.clipboardData)==null?void 0:P.getData("text/plain");if(!f)return;if(!cp(f,s("type"),s("pattern"))){n({type:"VALUE.INVALID",value:f}),b.preventDefault();return}b.preventDefault(),n({type:"INPUT.PASTE",value:f})},onBeforeInput(b){try{let f=Oc(b);cp(f,s("type"),s("pattern"))||(n({type:"VALUE.INVALID",value:f}),b.preventDefault()),f.length>1&&b.currentTarget.setSelectionRange(0,1,"forward")}catch(f){}},onChange(b){let f=Yt(b),{value:S}=b.currentTarget;if(f.inputType==="insertFromPaste"){b.currentTarget.value=S[0]||"";return}if(S.length>2){n({type:"INPUT.PASTE",value:S}),b.currentTarget.value=S[0],b.preventDefault();return}if(f.inputType==="deleteContentBackward"){n({type:"INPUT.BACKSPACE"});return}n({type:"INPUT.CHANGE",value:S,index:I})},onKeyDown(b){if(b.defaultPrevented||Re(b)||xe(b))return;let S={Backspace(){n({type:"INPUT.BACKSPACE"})},Delete(){n({type:"INPUT.DELETE"})},ArrowLeft(){n({type:"INPUT.ARROW_LEFT"})},ArrowRight(){n({type:"INPUT.ARROW_RIGHT"})},Enter(){n({type:"INPUT.ENTER"})}}[ge(b,{dir:s("dir"),orientation:"horizontal"})];S&&(S(b),b.preventDefault())},onFocus(){n({type:"INPUT.FOCUS",index:I})},onBlur(b){let f=b.relatedTarget;le(f)&&f.dataset.ownedby===Fr(a)||n({type:"INPUT.BLUR",index:I})}}))}}}function up(e,t){let n=t;e[0]===t[0]?n=t[1]:e[0]===t[1]&&(n=t[0]);let i=n.split("");return n=i[i.length-1],n!=null?n:""}function Ia(e,t){return Array.from({length:t}).fill("").map((n,i)=>e[i]||n)}var tO,Ea,Fr,nO,Fl,iO,rO,sO,Pa,Mr,aO,lp,Ml,oO,uO,dO,hO,gO,VA,pO,fO,hp=re(()=>{"use strict";se();tO=U("pinInput").parts("root","label","input","control"),Ea=tO.build(),Fr=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`pin-input:${e.id}`},nO=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.input)==null?void 0:i.call(n,t))!=null?r:`pin-input:${e.id}:${t}`},Fl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.hiddenInput)!=null?n:`pin-input:${e.id}:hidden`},iO=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`pin-input:${e.id}:label`},rO=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`pin-input:${e.id}:control`},sO=e=>e.getById(Fr(e)),Pa=e=>{let n=`input[data-ownedby=${CSS.escape(Fr(e))}]`;return Fe(sO(e),n)},Mr=(e,t)=>Pa(e)[t],aO=e=>Pa(e)[0],lp=e=>e.getById(Fl(e)),Ml=(e,t)=>{e.value=t,e.setAttribute("value",t)},oO={numeric:/^[0-9]+$/,alphabetic:/^[A-Za-z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/i};({choose:uO,createMachine:dO}=ut()),hO=dO({props({props:e}){return y(g({placeholder:"\u25CB",otp:!1,type:"numeric",defaultValue:e.count?Ia([],e.count):[]},e),{translations:g({inputLabel:(t,n)=>`pin code ${t+1} of ${n}`},e.translations)})},initialState(){return"idle"},context({prop:e,bindable:t}){return{value:t(()=>({value:e("value"),defaultValue:e("defaultValue"),isEqual:fe,onChange(n){var i;(i=e("onValueChange"))==null||i({value:n,valueAsString:n.join("")})}})),focusedIndex:t(()=>({sync:!0,defaultValue:-1})),count:t(()=>({defaultValue:e("count")}))}},computed:{_value:({context:e})=>Ia(e.get("value"),e.get("count")),valueLength:({computed:e})=>e("_value").length,filledValueLength:({computed:e})=>e("_value").filter(t=>(t==null?void 0:t.trim())!=="").length,isValueComplete:({computed:e})=>e("valueLength")===e("filledValueLength"),valueAsString:({computed:e})=>e("_value").join(""),focusedValue:({computed:e,context:t})=>e("_value")[t.get("focusedIndex")]||""},entry:uO([{guard:"autoFocus",actions:["setInputCount","setFocusIndexToFirst"]},{actions:["setInputCount"]}]),watch({action:e,track:t,context:n,computed:i}){t([()=>n.get("focusedIndex")],()=>{e(["focusInput","selectInputIfNeeded"])}),t([()=>n.get("value").join(",")],()=>{e(["syncInputElements","dispatchInputEvent"])}),t([()=>i("isValueComplete")],()=>{e(["invokeOnComplete","blurFocusedInputIfNeeded"])})},on:{"VALUE.SET":[{guard:"hasIndex",actions:["setValueAtIndex"]},{actions:["setValue"]}],"VALUE.CLEAR":{actions:["clearValue","setFocusIndexToFirst"]}},states:{idle:{on:{"INPUT.FOCUS":{target:"focused",actions:["setFocusedIndex"]}}},focused:{on:{"INPUT.CHANGE":{actions:["setFocusedValue","syncInputValue","setNextFocusedIndex"]},"INPUT.PASTE":{actions:["setPastedValue","setLastValueFocusIndex"]},"INPUT.FOCUS":{actions:["setFocusedIndex"]},"INPUT.BLUR":{target:"idle",actions:["clearFocusedIndex"]},"INPUT.DELETE":{guard:"hasValue",actions:["clearFocusedValue"]},"INPUT.ARROW_LEFT":{actions:["setPrevFocusedIndex"]},"INPUT.ARROW_RIGHT":{actions:["setNextFocusedIndex"]},"INPUT.BACKSPACE":[{guard:"hasValue",actions:["clearFocusedValue"]},{actions:["setPrevFocusedIndex","clearFocusedValue"]}],"INPUT.ENTER":{guard:"isValueComplete",actions:["requestFormSubmit"]},"VALUE.INVALID":{actions:["invokeOnInvalid"]}}}},implementations:{guards:{autoFocus:({prop:e})=>!!e("autoFocus"),hasValue:({context:e})=>e.get("value")[e.get("focusedIndex")]!=="",isValueComplete:({computed:e})=>e("isValueComplete"),hasIndex:({event:e})=>e.index!==void 0},actions:{dispatchInputEvent({computed:e,scope:t}){let n=lp(t);Ac(n,{value:e("valueAsString")})},setInputCount({scope:e,context:t,prop:n}){if(n("count"))return;let i=Pa(e);t.set("count",i.length)},focusInput({context:e,scope:t}){var i;let n=e.get("focusedIndex");n!==-1&&((i=Mr(t,n))==null||i.focus({preventScroll:!0}))},selectInputIfNeeded({context:e,prop:t,scope:n}){let i=e.get("focusedIndex");!t("selectOnFocus")||i===-1||H(()=>{var r;(r=Mr(n,i))==null||r.select()})},invokeOnComplete({computed:e,prop:t}){var n;e("isValueComplete")&&((n=t("onValueComplete"))==null||n({value:e("_value"),valueAsString:e("valueAsString")}))},invokeOnInvalid({context:e,event:t,prop:n}){var i;(i=n("onValueInvalid"))==null||i({value:t.value,index:e.get("focusedIndex")})},clearFocusedIndex({context:e}){e.set("focusedIndex",-1)},setFocusedIndex({context:e,event:t}){e.set("focusedIndex",t.index)},setValue({context:e,event:t}){let n=Ia(t.value,e.get("count"));e.set("value",n)},setFocusedValue({context:e,event:t,computed:n,flush:i}){let r=n("focusedValue"),s=e.get("focusedIndex"),a=up(r,t.value);i(()=>{e.set("value",ms(n("_value"),s,a))})},revertInputValue({context:e,computed:t,scope:n}){let i=Mr(n,e.get("focusedIndex"));Ml(i,t("focusedValue"))},syncInputValue({context:e,event:t,scope:n}){let i=e.get("value"),r=Mr(n,t.index);Ml(r,i[t.index])},syncInputElements({context:e,scope:t}){let n=Pa(t),i=e.get("value");n.forEach((r,s)=>{Ml(r,i[s])})},setPastedValue({context:e,event:t,computed:n,flush:i}){H(()=>{let r=n("valueAsString"),s=e.get("focusedIndex"),a=n("valueLength"),o=n("filledValueLength"),l=Math.min(s,o),c=l>0?r.substring(0,s):"",u=t.value.substring(0,a-l),h=Ia(`${c}${u}`.split(""),a);i(()=>{e.set("value",h)})})},setValueAtIndex({context:e,event:t,computed:n}){let i=up(n("focusedValue"),t.value);e.set("value",ms(n("_value"),t.index,i))},clearValue({context:e}){let t=Array.from({length:e.get("count")}).fill("");queueMicrotask(()=>{e.set("value",t)})},clearFocusedValue({context:e,computed:t}){let n=e.get("focusedIndex");n!==-1&&e.set("value",ms(t("_value"),n,""))},setFocusIndexToFirst({context:e}){e.set("focusedIndex",0)},setNextFocusedIndex({context:e,computed:t}){e.set("focusedIndex",Math.min(e.get("focusedIndex")+1,t("valueLength")-1))},setPrevFocusedIndex({context:e}){e.set("focusedIndex",Math.max(e.get("focusedIndex")-1,0))},setLastValueFocusIndex({context:e,computed:t}){H(()=>{e.set("focusedIndex",Math.min(t("filledValueLength"),t("valueLength")-1))})},blurFocusedInputIfNeeded({context:e,prop:t,scope:n}){t("blurOnComplete")&&H(()=>{var i;(i=Mr(n,e.get("focusedIndex")))==null||i.blur()})},requestFormSubmit({computed:e,prop:t,scope:n}){var r;if(!t("name")||!e("isValueComplete"))return;let i=lp(n);(r=i==null?void 0:i.form)==null||r.requestSubmit()}}}});gO=_()(["autoFocus","blurOnComplete","count","defaultValue","dir","disabled","form","getRootNode","id","ids","invalid","mask","name","onValueChange","onValueComplete","onValueInvalid","otp","pattern","placeholder","readOnly","required","selectOnFocus","translations","type","value"]),VA=B(gO),pO=class extends K{initMachine(e){return new W(hO,e)}initApi(){return cO(this.machine.service,q)}render(){var r;let e=(r=this.el.querySelector('[data-scope="pin-input"][data-part="root"]'))!=null?r:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="pin-input"][data-part="label"]');t&&this.spreadProps(t,this.api.getLabelProps());let n=this.el.querySelector('[data-scope="pin-input"][data-part="hidden-input"]');n&&this.spreadProps(n,this.api.getHiddenInputProps());let i=this.el.querySelector('[data-scope="pin-input"][data-part="control"]');i&&this.spreadProps(i,this.api.getControlProps()),this.api.items.forEach(s=>{let a=this.el.querySelector(`[data-scope="pin-input"][data-part="input"][data-index="${s}"]`);a&&this.spreadProps(a,this.api.getInputProps({index:s}))})}},fO={mounted(){var s;let e=this.el,t=Z(e,"value"),n=Z(e,"defaultValue"),i=C(e,"controlled"),r=new pO(e,y(g({id:e.id,count:(s=z(e,"count"))!=null?s:4},i&&t?{value:t}:{defaultValue:n!=null?n:[]}),{disabled:C(e,"disabled"),invalid:C(e,"invalid"),required:C(e,"required"),readOnly:C(e,"readOnly"),mask:C(e,"mask"),otp:C(e,"otp"),blurOnComplete:C(e,"blurOnComplete"),selectOnFocus:C(e,"selectOnFocus"),name:w(e,"name"),form:w(e,"form"),dir:w(e,"dir",["ltr","rtl"]),type:w(e,"type",["alphanumeric","numeric","alphabetic"]),placeholder:w(e,"placeholder"),onValueChange:a=>{let o=e.querySelector('[data-scope="pin-input"][data-part="hidden-input"]');o&&(o.value=a.valueAsString,o.dispatchEvent(new Event("input",{bubbles:!0})),o.dispatchEvent(new Event("change",{bubbles:!0})));let l=w(e,"onValueChange");l&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(l,{value:a.value,valueAsString:a.valueAsString,id:e.id});let c=w(e,"onValueChangeClient");c&&e.dispatchEvent(new CustomEvent(c,{bubbles:!0,detail:{value:a,id:e.id}}))},onValueComplete:a=>{let o=w(e,"onValueComplete");o&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(o,{value:a.value,valueAsString:a.valueAsString,id:e.id})}}));r.init(),this.pinInput=r,this.handlers=[]},updated(){var n,i,r,s;let e=Z(this.el,"value"),t=C(this.el,"controlled");(s=this.pinInput)==null||s.updateProps(y(g({id:this.el.id,count:(r=(i=z(this.el,"count"))!=null?i:(n=this.pinInput)==null?void 0:n.api.count)!=null?r:4},t&&e?{value:e}:{}),{disabled:C(this.el,"disabled"),invalid:C(this.el,"invalid"),required:C(this.el,"required"),readOnly:C(this.el,"readOnly"),name:w(this.el,"name"),form:w(this.el,"form")}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.pinInput)==null||e.destroy()}}});var vp={};he(vp,{RadioGroup:()=>kO});function TO(e,t){let{context:n,send:i,computed:r,prop:s,scope:a}=e,o=r("isDisabled"),l=s("invalid"),c=s("readOnly");function u(d){return{value:d.value,invalid:!!d.invalid||!!l,disabled:!!d.disabled||o,checked:n.get("value")===d.value,focused:n.get("focusedValue")===d.value,focusVisible:n.get("focusVisibleValue")===d.value,hovered:n.get("hoveredValue")===d.value,active:n.get("activeValue")===d.value}}function h(d){let p=u(d);return{"data-focus":E(p.focused),"data-focus-visible":E(p.focusVisible),"data-disabled":E(p.disabled),"data-readonly":E(c),"data-state":p.checked?"checked":"unchecked","data-hover":E(p.hovered),"data-invalid":E(p.invalid),"data-orientation":s("orientation"),"data-ssr":E(n.get("ssr"))}}let m=()=>{var p;let d=(p=PO(a))!=null?p:IO(a);d==null||d.focus()};return{focus:m,value:n.get("value"),setValue(d){i({type:"SET_VALUE",value:d,isTrusted:!1})},clearValue(){i({type:"SET_VALUE",value:null,isTrusted:!1})},getRootProps(){return t.element(y(g({},Wi.root.attrs),{role:"radiogroup",id:Ca(a),"aria-labelledby":gp(a),"aria-required":s("required")||void 0,"aria-disabled":o||void 0,"aria-readonly":c||void 0,"data-orientation":s("orientation"),"data-disabled":E(o),"data-invalid":E(l),"data-required":E(s("required")),"aria-orientation":s("orientation"),dir:s("dir"),style:{position:"relative"}}))},getLabelProps(){return t.element(y(g({},Wi.label.attrs),{dir:s("dir"),"data-orientation":s("orientation"),"data-disabled":E(o),"data-invalid":E(l),"data-required":E(s("required")),id:gp(a),onClick:m}))},getItemState:u,getItemProps(d){let p=u(d);return t.label(y(g(y(g({},Wi.item.attrs),{dir:s("dir"),id:fp(a,d.value),htmlFor:$l(a,d.value)}),h(d)),{onPointerMove(){p.disabled||p.hovered||i({type:"SET_HOVERED",value:d.value,hovered:!0})},onPointerLeave(){p.disabled||i({type:"SET_HOVERED",value:null})},onPointerDown(v){p.disabled||pe(v)&&(p.focused&&v.pointerType==="mouse"&&v.preventDefault(),i({type:"SET_ACTIVE",value:d.value,active:!0}))},onPointerUp(){p.disabled||i({type:"SET_ACTIVE",value:null})},onClick(){var v;!p.disabled&&Xe()&&((v=bO(a,d.value))==null||v.focus())}}))},getItemTextProps(d){return t.element(g(y(g({},Wi.itemText.attrs),{dir:s("dir"),id:yO(a,d.value)}),h(d)))},getItemControlProps(d){let p=u(d);return t.element(g(y(g({},Wi.itemControl.attrs),{dir:s("dir"),id:vO(a,d.value),"data-active":E(p.active),"aria-hidden":!0}),h(d)))},getItemHiddenInputProps(d){let p=u(d);return t.input({"data-ownedby":Ca(a),id:$l(a,d.value),type:"radio",name:s("name")||s("id"),form:s("form"),value:d.value,required:s("required"),"aria-invalid":p.invalid||void 0,onClick(v){if(c){v.preventDefault();return}v.currentTarget.checked&&i({type:"SET_VALUE",value:d.value,isTrusted:!0})},onBlur(){i({type:"SET_FOCUSED",value:null,focused:!1,focusVisible:!1})},onFocus(){let v=En();i({type:"SET_FOCUSED",value:d.value,focused:!0,focusVisible:v})},onKeyDown(v){v.defaultPrevented||v.key===" "&&i({type:"SET_ACTIVE",value:d.value,active:!0})},onKeyUp(v){v.defaultPrevented||v.key===" "&&i({type:"SET_ACTIVE",value:null})},disabled:p.disabled||c,defaultChecked:p.checked,style:Vt})},getIndicatorProps(){let d=n.get("indicatorRect"),p=d==null||d.width===0&&d.height===0&&d.x===0&&d.y===0;return t.element(y(g({id:mp(a)},Wi.indicator.attrs),{dir:s("dir"),hidden:n.get("value")==null||p,"data-disabled":E(o),"data-orientation":s("orientation"),style:{"--transition-property":"left, top, width, height","--left":ye(d==null?void 0:d.x),"--top":ye(d==null?void 0:d.y),"--width":ye(d==null?void 0:d.width),"--height":ye(d==null?void 0:d.height),position:"absolute",willChange:"var(--transition-property)",transitionProperty:"var(--transition-property)",transitionDuration:"var(--transition-duration, 150ms)",transitionTimingFunction:"var(--transition-timing-function)",[s("orientation")==="horizontal"?"left":"top"]:s("orientation")==="horizontal"?"var(--left)":"var(--top)"}}))}}}var mO,Wi,Ca,gp,fp,$l,vO,yO,mp,Sa,bO,EO,IO,PO,pp,CO,SO,OO,wO,VO,RA,xO,DA,AO,kO,yp=re(()=>{"use strict";pr();se();mO=U("radio-group").parts("root","label","item","itemText","itemControl","indicator"),Wi=mO.build(),Ca=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`radio-group:${e.id}`},gp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`radio-group:${e.id}:label`},fp=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`radio-group:${e.id}:radio:${t}`},$l=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemHiddenInput)==null?void 0:i.call(n,t))!=null?r:`radio-group:${e.id}:radio:input:${t}`},vO=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemControl)==null?void 0:i.call(n,t))!=null?r:`radio-group:${e.id}:radio:control:${t}`},yO=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemLabel)==null?void 0:i.call(n,t))!=null?r:`radio-group:${e.id}:radio:label:${t}`},mp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicator)!=null?n:`radio-group:${e.id}:indicator`},Sa=e=>e.getById(Ca(e)),bO=(e,t)=>e.getById($l(e,t)),EO=e=>e.getById(mp(e)),IO=e=>{var t;return(t=Sa(e))==null?void 0:t.querySelector("input:not(:disabled)")},PO=e=>{var t;return(t=Sa(e))==null?void 0:t.querySelector("input:not(:disabled):checked")},pp=e=>{let n=`input[type=radio][data-ownedby='${CSS.escape(Ca(e))}']:not([disabled])`;return Fe(Sa(e),n)},CO=(e,t)=>{if(t)return e.getById(fp(e,t))},SO=e=>{var t,n,i,r;return{x:(t=e==null?void 0:e.offsetLeft)!=null?t:0,y:(n=e==null?void 0:e.offsetTop)!=null?n:0,width:(i=e==null?void 0:e.offsetWidth)!=null?i:0,height:(r=e==null?void 0:e.offsetHeight)!=null?r:0}};({not:OO}=Ee()),wO={props({props:e}){return g({orientation:"vertical"},e)},initialState(){return"idle"},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var i;(i=e("onValueChange"))==null||i({value:n})}})),activeValue:t(()=>({defaultValue:null})),focusedValue:t(()=>({defaultValue:null})),focusVisibleValue:t(()=>({defaultValue:null})),hoveredValue:t(()=>({defaultValue:null})),indicatorRect:t(()=>({defaultValue:null})),fieldsetDisabled:t(()=>({defaultValue:!1})),ssr:t(()=>({defaultValue:!0}))}},refs(){return{indicatorCleanup:null,focusVisibleValue:null}},computed:{isDisabled:({prop:e,context:t})=>!!e("disabled")||t.get("fieldsetDisabled")},entry:["syncIndicatorRect","syncSsr"],exit:["cleanupObserver"],effects:["trackFormControlState","trackFocusVisible"],watch({track:e,action:t,context:n}){e([()=>n.get("value")],()=>{t(["syncIndicatorRect","syncInputElements"])})},on:{SET_VALUE:[{guard:OO("isTrusted"),actions:["setValue","dispatchChangeEvent"]},{actions:["setValue"]}],SET_HOVERED:{actions:["setHovered"]},SET_ACTIVE:{actions:["setActive"]},SET_FOCUSED:{actions:["setFocused"]}},states:{idle:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackFormControlState({context:e,scope:t}){return wt(Sa(t),{onFieldsetDisabledChange(n){e.set("fieldsetDisabled",n)},onFormReset(){e.set("value",e.initial("value"))}})},trackFocusVisible({scope:e}){var t;return Pn({root:(t=e.getRootNode)==null?void 0:t.call(e)})}},actions:{setValue({context:e,event:t}){e.set("value",t.value)},setHovered({context:e,event:t}){e.set("hoveredValue",t.value)},setActive({context:e,event:t}){e.set("activeValue",t.value)},setFocused({context:e,event:t}){e.set("focusedValue",t.value);let n=t.value!=null&&t.focusVisible?t.value:null;e.set("focusVisibleValue",n)},syncInputElements({context:e,scope:t}){pp(t).forEach(i=>{i.checked=i.value===e.get("value")})},cleanupObserver({refs:e}){var t;(t=e.get("indicatorCleanup"))==null||t()},syncSsr({context:e}){e.set("ssr",!1)},syncIndicatorRect({context:e,scope:t,refs:n}){var o;if((o=n.get("indicatorCleanup"))==null||o(),!EO(t))return;let i=e.get("value"),r=CO(t,i);if(i==null||!r){e.set("indicatorRect",null);return}let s=()=>{e.set("indicatorRect",SO(r))};s();let a=gn.observe(r,s);n.set("indicatorCleanup",a)},dispatchChangeEvent({context:e,scope:t}){pp(t).forEach(i=>{let r=i.value===e.get("value");r!==i.checked&&pi(i,{checked:r})})}}}},VO=_()(["dir","disabled","form","getRootNode","id","ids","invalid","name","onValueChange","orientation","readOnly","required","value","defaultValue"]),RA=B(VO),xO=_()(["value","disabled","invalid"]),DA=B(xO),AO=class extends K{initMachine(e){return new W(wO,e)}initApi(){return TO(this.machine.service,q)}render(){var i;let e=(i=this.el.querySelector('[data-scope="radio-group"][data-part="root"]'))!=null?i:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="radio-group"][data-part="label"]');t&&this.spreadProps(t,this.api.getLabelProps());let n=this.el.querySelector('[data-scope="radio-group"][data-part="indicator"]');n&&this.spreadProps(n,this.api.getIndicatorProps()),this.el.querySelectorAll('[data-scope="radio-group"][data-part="item"]').forEach(r=>{let s=r.dataset.value;if(s==null)return;let a=r.dataset.disabled==="true",o=r.dataset.invalid==="true";this.spreadProps(r,this.api.getItemProps({value:s,disabled:a,invalid:o}));let l=r.querySelector('[data-scope="radio-group"][data-part="item-text"]');l&&this.spreadProps(l,this.api.getItemTextProps({value:s,disabled:a,invalid:o}));let c=r.querySelector('[data-scope="radio-group"][data-part="item-control"]');c&&this.spreadProps(c,this.api.getItemControlProps({value:s,disabled:a,invalid:o}));let u=r.querySelector('[data-scope="radio-group"][data-part="item-hidden-input"]');u&&this.spreadProps(u,this.api.getItemHiddenInputProps({value:s,disabled:a,invalid:o}))})}},kO={mounted(){let e=this.el,t=w(e,"value"),n=w(e,"defaultValue"),i=C(e,"controlled"),r=new AO(e,y(g({id:e.id},i&&t!==void 0?{value:t!=null?t:null}:{defaultValue:n!=null?n:null}),{name:w(e,"name"),form:w(e,"form"),disabled:C(e,"disabled"),invalid:C(e,"invalid"),required:C(e,"required"),readOnly:C(e,"readOnly"),dir:w(e,"dir",["ltr","rtl"]),orientation:w(e,"orientation",["horizontal","vertical"]),onValueChange:s=>{let a=w(e,"onValueChange");a&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(a,{value:s.value,id:e.id});let o=w(e,"onValueChangeClient");o&&e.dispatchEvent(new CustomEvent(o,{bubbles:!0,detail:{value:s,id:e.id}}))}}));r.init(),this.radioGroup=r,this.handlers=[]},updated(){var n;let e=w(this.el,"value"),t=C(this.el,"controlled");(n=this.radioGroup)==null||n.updateProps(y(g({id:this.el.id},t&&e!==void 0?{value:e!=null?e:null}:{}),{name:w(this.el,"name"),form:w(this.el,"form"),disabled:C(this.el,"disabled"),invalid:C(this.el,"invalid"),required:C(this.el,"required"),readOnly:C(this.el,"readOnly"),orientation:w(this.el,"orientation",["horizontal","vertical"])}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.radioGroup)==null||e.destroy()}}});var Tp={};he(Tp,{Select:()=>zO});function FO(e,t){let{context:n,prop:i,scope:r,state:s,computed:a,send:o}=e,l=i("disabled")||n.get("fieldsetDisabled"),c=!!i("invalid"),u=!!i("required"),h=!!i("readOnly"),m=i("composite"),d=i("collection"),p=s.hasTag("open"),v=s.matches("focused"),I=n.get("highlightedValue"),T=n.get("highlightedItem"),O=n.get("selectedItems"),b=n.get("currentPlacement"),f=a("isTypingAhead"),S=a("isInteractive"),P=I?Ul(r,I):void 0;function V(x){let k=d.getItemDisabled(x.item),N=d.getItemValue(x.item);return vn(N,()=>`[zag-js] No value found for item ${JSON.stringify(x.item)}`),{value:N,disabled:!!(l||k),highlighted:I===N,selected:n.get("value").includes(N)}}let A=On(y(g({},i("positioning")),{placement:b}));return{open:p,focused:v,empty:n.get("value").length===0,highlightedItem:T,highlightedValue:I,selectedItems:O,hasSelectedItems:a("hasSelectedItems"),value:n.get("value"),valueAsString:a("valueAsString"),collection:d,multiple:!!i("multiple"),disabled:!!l,reposition(x={}){o({type:"POSITIONING.SET",options:x})},focus(){var x;(x=ri(r))==null||x.focus({preventScroll:!0})},setOpen(x){s.hasTag("open")!==x&&o({type:x?"OPEN":"CLOSE"})},selectValue(x){o({type:"ITEM.SELECT",value:x})},setValue(x){o({type:"VALUE.SET",value:x})},selectAll(){o({type:"VALUE.SET",value:d.getValues()})},setHighlightValue(x){o({type:"HIGHLIGHTED_VALUE.SET",value:x})},clearHighlightValue(){o({type:"HIGHLIGHTED_VALUE.CLEAR"})},clearValue(x){o(x?{type:"ITEM.CLEAR",value:x}:{type:"VALUE.CLEAR"})},getItemState:V,getRootProps(){return t.element(y(g({},_e.root.attrs),{dir:i("dir"),id:RO(r),"data-invalid":E(c),"data-readonly":E(h)}))},getLabelProps(){return t.label(y(g({dir:i("dir"),id:Ta(r)},_e.label.attrs),{"data-disabled":E(l),"data-invalid":E(c),"data-readonly":E(h),"data-required":E(u),htmlFor:ql(r),onClick(x){var k;x.defaultPrevented||l||(k=ri(r))==null||k.focus({preventScroll:!0})}}))},getControlProps(){return t.element(y(g({},_e.control.attrs),{dir:i("dir"),id:DO(r),"data-state":p?"open":"closed","data-focus":E(v),"data-disabled":E(l),"data-invalid":E(c)}))},getValueTextProps(){return t.element(y(g({},_e.valueText.attrs),{dir:i("dir"),"data-disabled":E(l),"data-invalid":E(c),"data-focus":E(v)}))},getTriggerProps(){return t.button(y(g({id:Gl(r),disabled:l,dir:i("dir"),type:"button",role:"combobox","aria-controls":_l(r),"aria-expanded":p,"aria-haspopup":"listbox","data-state":p?"open":"closed","aria-invalid":c,"aria-required":u,"aria-labelledby":Ta(r)},_e.trigger.attrs),{"data-disabled":E(l),"data-invalid":E(c),"data-readonly":E(h),"data-placement":b,"data-placeholder-shown":E(!a("hasSelectedItems")),onClick(x){S&&(x.defaultPrevented||o({type:"TRIGGER.CLICK"}))},onFocus(){o({type:"TRIGGER.FOCUS"})},onBlur(){o({type:"TRIGGER.BLUR"})},onKeyDown(x){if(x.defaultPrevented||!S)return;let N={ArrowUp(){o({type:"TRIGGER.ARROW_UP"})},ArrowDown(D){o({type:D.altKey?"OPEN":"TRIGGER.ARROW_DOWN"})},ArrowLeft(){o({type:"TRIGGER.ARROW_LEFT"})},ArrowRight(){o({type:"TRIGGER.ARROW_RIGHT"})},Home(){o({type:"TRIGGER.HOME"})},End(){o({type:"TRIGGER.END"})},Enter(){o({type:"TRIGGER.ENTER"})},Space(D){o(f?{type:"TRIGGER.TYPEAHEAD",key:D.key}:{type:"TRIGGER.ENTER"})}}[ge(x,{dir:i("dir"),orientation:"vertical"})];if(N){N(x),x.preventDefault();return}Ue.isValidEvent(x)&&(o({type:"TRIGGER.TYPEAHEAD",key:x.key}),x.preventDefault())}}))},getIndicatorProps(){return t.element(y(g({},_e.indicator.attrs),{dir:i("dir"),"aria-hidden":!0,"data-state":p?"open":"closed","data-disabled":E(l),"data-invalid":E(c),"data-readonly":E(h)}))},getItemProps(x){let k=V(x);return t.element(y(g({id:Ul(r,k.value),role:"option"},_e.item.attrs),{dir:i("dir"),"data-value":k.value,"aria-selected":k.selected,"data-state":k.selected?"checked":"unchecked","data-highlighted":E(k.highlighted),"data-disabled":E(k.disabled),"aria-disabled":X(k.disabled),onPointerMove(N){k.disabled||N.pointerType!=="mouse"||k.value!==I&&o({type:"ITEM.POINTER_MOVE",value:k.value})},onClick(N){N.defaultPrevented||k.disabled||o({type:"ITEM.CLICK",src:"pointerup",value:k.value})},onPointerLeave(N){var $;k.disabled||x.persistFocus||N.pointerType!=="mouse"||!(($=e.event.previous())!=null&&$.type.includes("POINTER"))||o({type:"ITEM.POINTER_LEAVE"})}}))},getItemTextProps(x){let k=V(x);return t.element(y(g({},_e.itemText.attrs),{"data-state":k.selected?"checked":"unchecked","data-disabled":E(k.disabled),"data-highlighted":E(k.highlighted)}))},getItemIndicatorProps(x){let k=V(x);return t.element(y(g({"aria-hidden":!0},_e.itemIndicator.attrs),{"data-state":k.selected?"checked":"unchecked",hidden:!k.selected}))},getItemGroupLabelProps(x){let{htmlFor:k}=x;return t.element(y(g({},_e.itemGroupLabel.attrs),{id:bp(r,k),dir:i("dir"),role:"presentation"}))},getItemGroupProps(x){let{id:k}=x;return t.element(y(g({},_e.itemGroup.attrs),{"data-disabled":E(l),id:LO(r,k),"aria-labelledby":bp(r,k),role:"group",dir:i("dir")}))},getClearTriggerProps(){return t.button(y(g({},_e.clearTrigger.attrs),{id:Cp(r),type:"button","aria-label":"Clear value","data-invalid":E(c),disabled:l,hidden:!a("hasSelectedItems"),dir:i("dir"),onClick(x){x.defaultPrevented||o({type:"CLEAR.CLICK"})}}))},getHiddenSelectProps(){let x=n.get("value"),k=i("multiple")?x:x==null?void 0:x[0];return t.select({name:i("name"),form:i("form"),disabled:l,multiple:i("multiple"),required:i("required"),"aria-hidden":!0,id:ql(r),defaultValue:k,style:Vt,tabIndex:-1,onFocus(){var N;(N=ri(r))==null||N.focus({preventScroll:!0})},"aria-labelledby":Ta(r)})},getPositionerProps(){return t.element(y(g({},_e.positioner.attrs),{dir:i("dir"),id:Sp(r),style:A.floating}))},getContentProps(){return t.element(y(g({hidden:!p,dir:i("dir"),id:_l(r),role:m?"listbox":"dialog"},_e.content.attrs),{"data-state":p?"open":"closed","data-placement":b,"data-activedescendant":P,"aria-activedescendant":m?P:void 0,"aria-multiselectable":i("multiple")&&m?!0:void 0,"aria-labelledby":Ta(r),tabIndex:0,onKeyDown(x){if(!S||!ce(x.currentTarget,j(x)))return;if(x.key==="Tab"&&!ds(x)){x.preventDefault();return}let k={ArrowUp(){o({type:"CONTENT.ARROW_UP"})},ArrowDown(){o({type:"CONTENT.ARROW_DOWN"})},Home(){o({type:"CONTENT.HOME"})},End(){o({type:"CONTENT.END"})},Enter(){o({type:"ITEM.CLICK",src:"keydown.enter"})},Space($){var te;f?o({type:"CONTENT.TYPEAHEAD",key:$.key}):(te=k.Enter)==null||te.call(k,$)}},N=k[ge(x)];if(N){N(x),x.preventDefault();return}let D=j(x);Ot(D)||Ue.isValidEvent(x)&&(o({type:"CONTENT.TYPEAHEAD",key:x.key}),x.preventDefault())}}))},getListProps(){return t.element(y(g({},_e.list.attrs),{tabIndex:0,role:m?void 0:"listbox","aria-labelledby":Gl(r),"aria-activedescendant":m?void 0:P,"aria-multiselectable":!m&&i("multiple")?!0:void 0}))}}}function Ip(e){var n,i;let t=(i=e.restoreFocus)!=null?i:(n=e.previousEvent)==null?void 0:n.restoreFocus;return t==null||!!t}function Pp(e,t){return Ki(t?{items:e,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled,groupBy:n=>{var i;return(i=n.group)!=null?i:""}}:{items:e,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled})}function WO(e){return e.replace(/_([a-z])/g,(t,n)=>n.toUpperCase())}function KO(e){let t={};for(let[n,i]of Object.entries(e)){let r=WO(n);t[r]=i}return t}var NO,_e,Ki,RO,_l,Gl,Cp,Ta,DO,Ul,ql,Sp,LO,bp,Hl,$r,ri,MO,Ep,Bl,Hr,ii,$O,HO,BO,GA,_O,UA,GO,qA,UO,WA,qO,zO,Op=re(()=>{"use strict";yr();Pr();Wn();tn();se();NO=U("select").parts("label","positioner","trigger","indicator","clearTrigger","item","itemText","itemIndicator","itemGroup","itemGroupLabel","list","content","root","control","valueText"),_e=NO.build(),Ki=e=>new Nt(e);Ki.empty=()=>new Nt({items:[]});RO=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`select:${e.id}`},_l=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`select:${e.id}:content`},Gl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`select:${e.id}:trigger`},Cp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.clearTrigger)!=null?n:`select:${e.id}:clear-trigger`},Ta=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`select:${e.id}:label`},DO=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`select:${e.id}:control`},Ul=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`select:${e.id}:option:${t}`},ql=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.hiddenSelect)!=null?n:`select:${e.id}:select`},Sp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`select:${e.id}:positioner`},LO=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemGroup)==null?void 0:i.call(n,t))!=null?r:`select:${e.id}:optgroup:${t}`},bp=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemGroupLabel)==null?void 0:i.call(n,t))!=null?r:`select:${e.id}:optgroup-label:${t}`},Hl=e=>e.getById(ql(e)),$r=e=>e.getById(_l(e)),ri=e=>e.getById(Gl(e)),MO=e=>e.getById(Cp(e)),Ep=e=>e.getById(Sp(e)),Bl=(e,t)=>t==null?null:e.getById(Ul(e,t));({and:Hr,not:ii,or:$O}=Ee()),HO={props({props:e}){var t;return y(g({loopFocus:!1,closeOnSelect:!e.multiple,composite:!0,defaultValue:[]},e),{collection:(t=e.collection)!=null?t:Ki.empty(),positioning:g({placement:"bottom-start",gutter:8},e.positioning)})},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:fe,onChange(n){var r;let i=e("collection").findMany(n);return(r=e("onValueChange"))==null?void 0:r({value:n,items:i})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),onChange(n){var i;(i=e("onHighlightChange"))==null||i({highlightedValue:n,highlightedItem:e("collection").find(n),highlightedIndex:e("collection").indexOf(n)})}})),currentPlacement:t(()=>({defaultValue:void 0})),fieldsetDisabled:t(()=>({defaultValue:!1})),highlightedItem:t(()=>({defaultValue:null})),selectedItems:t(()=>{var r,s;let n=(s=(r=e("value"))!=null?r:e("defaultValue"))!=null?s:[];return{defaultValue:e("collection").findMany(n)}})}},refs(){return{typeahead:g({},Ue.defaultOptions)}},computed:{hasSelectedItems:({context:e})=>e.get("value").length>0,isTypingAhead:({refs:e})=>e.get("typeahead").keysSoFar!=="",isDisabled:({prop:e,context:t})=>!!e("disabled")||!!t.get("fieldsetDisabled"),isInteractive:({prop:e})=>!(e("disabled")||e("readOnly")),valueAsString:({context:e,prop:t})=>t("collection").stringifyItems(e.get("selectedItems"))},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"idle"},entry:["syncSelectElement"],watch({context:e,prop:t,track:n,action:i}){n([()=>e.get("value").toString()],()=>{i(["syncSelectedItems","syncSelectElement","dispatchChangeEvent"])}),n([()=>t("open")],()=>{i(["toggleVisibility"])}),n([()=>e.get("highlightedValue")],()=>{i(["syncHighlightedItem"])}),n([()=>t("collection").toString()],()=>{i(["syncCollection"])})},on:{"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedItem"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedItem"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setSelectedItems"]},"VALUE.CLEAR":{actions:["clearSelectedItems"]},"CLEAR.CLICK":{actions:["clearSelectedItems","focusTriggerEl"]}},effects:["trackFormControlState"],states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":[{guard:"isTriggerClickEvent",target:"open",actions:["setInitialFocus","highlightFirstSelectedItem"]},{target:"open",actions:["setInitialFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus","highlightFirstSelectedItem"]}],"TRIGGER.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen"]}]}},focused:{tags:["closed"],on:{"CONTROLLED.OPEN":[{guard:"isTriggerClickEvent",target:"open",actions:["setInitialFocus","highlightFirstSelectedItem"]},{guard:"isTriggerArrowUpEvent",target:"open",actions:["setInitialFocus","highlightComputedLastItem"]},{guard:$O("isTriggerArrowDownEvent","isTriggerEnterEvent"),target:"open",actions:["setInitialFocus","highlightComputedFirstItem"]},{target:"open",actions:["setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen"]}],"TRIGGER.BLUR":{target:"idle"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightFirstSelectedItem"]}],"TRIGGER.ENTER":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedFirstItem"]}],"TRIGGER.ARROW_UP":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedLastItem"]}],"TRIGGER.ARROW_DOWN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedFirstItem"]}],"TRIGGER.ARROW_LEFT":[{guard:Hr(ii("multiple"),"hasSelectedItems"),actions:["selectPreviousItem"]},{guard:ii("multiple"),actions:["selectLastItem"]}],"TRIGGER.ARROW_RIGHT":[{guard:Hr(ii("multiple"),"hasSelectedItems"),actions:["selectNextItem"]},{guard:ii("multiple"),actions:["selectFirstItem"]}],"TRIGGER.HOME":{guard:ii("multiple"),actions:["selectFirstItem"]},"TRIGGER.END":{guard:ii("multiple"),actions:["selectLastItem"]},"TRIGGER.TYPEAHEAD":{guard:ii("multiple"),actions:["selectMatchingItem"]}}},open:{tags:["open"],exit:["scrollContentToTop"],effects:["trackDismissableElement","computePlacement","scrollToHighlightedItem"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["focusTriggerEl","clearHighlightedItem"]},{target:"idle",actions:["clearHighlightedItem"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{guard:"restoreFocus",target:"focused",actions:["invokeOnClose","focusTriggerEl","clearHighlightedItem"]},{target:"idle",actions:["invokeOnClose","clearHighlightedItem"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","clearHighlightedItem"]}],"ITEM.CLICK":[{guard:Hr("closeOnSelect","isOpenControlled"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","focusTriggerEl","clearHighlightedItem"]},{actions:["selectHighlightedItem"]}],"CONTENT.HOME":{actions:["highlightFirstItem"]},"CONTENT.END":{actions:["highlightLastItem"]},"CONTENT.ARROW_DOWN":[{guard:Hr("hasHighlightedItem","loop","isLastItemHighlighted"),actions:["highlightFirstItem"]},{guard:"hasHighlightedItem",actions:["highlightNextItem"]},{actions:["highlightFirstItem"]}],"CONTENT.ARROW_UP":[{guard:Hr("hasHighlightedItem","loop","isFirstItemHighlighted"),actions:["highlightLastItem"]},{guard:"hasHighlightedItem",actions:["highlightPreviousItem"]},{actions:["highlightLastItem"]}],"CONTENT.TYPEAHEAD":{actions:["highlightMatchingItem"]},"ITEM.POINTER_MOVE":{actions:["highlightItem"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedItem"]},"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{loop:({prop:e})=>!!e("loopFocus"),multiple:({prop:e})=>!!e("multiple"),hasSelectedItems:({computed:e})=>!!e("hasSelectedItems"),hasHighlightedItem:({context:e})=>e.get("highlightedValue")!=null,isFirstItemHighlighted:({context:e,prop:t})=>e.get("highlightedValue")===t("collection").firstValue,isLastItemHighlighted:({context:e,prop:t})=>e.get("highlightedValue")===t("collection").lastValue,closeOnSelect:({prop:e,event:t})=>{var n;return!!((n=t.closeOnSelect)!=null?n:e("closeOnSelect"))},restoreFocus:({event:e})=>Ip(e),isOpenControlled:({prop:e})=>e("open")!==void 0,isTriggerClickEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.CLICK"},isTriggerEnterEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.ENTER"},isTriggerArrowUpEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.ARROW_UP"},isTriggerArrowDownEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.ARROW_DOWN"}},effects:{trackFormControlState({context:e,scope:t}){return wt(Hl(t),{onFieldsetDisabledChange(n){e.set("fieldsetDisabled",n)},onFormReset(){let n=e.initial("value");e.set("value",n)}})},trackDismissableElement({scope:e,send:t,prop:n}){let i=()=>$r(e),r=!0;return Ft(i,{type:"listbox",defer:!0,exclude:[ri(e),MO(e)],onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onInteractOutside(s){var a;(a=n("onInteractOutside"))==null||a(s),r=!(s.detail.focusable||s.detail.contextmenu)},onDismiss(){t({type:"CLOSE",src:"interact-outside",restoreFocus:r})}})},computePlacement({context:e,prop:t,scope:n}){let i=t("positioning");return e.set("currentPlacement",i.placement),It(()=>ri(n),()=>Ep(n),y(g({defer:!0},i),{onComplete(a){e.set("currentPlacement",a.placement)}}))},scrollToHighlightedItem({context:e,prop:t,scope:n,event:i}){let r=a=>{let o=e.get("highlightedValue");if(o==null||i.current().type.includes("POINTER"))return;let l=$r(n),c=t("scrollToIndexFn");if(c){let h=t("collection").indexOf(o);c==null||c({index:h,immediate:a,getElement:()=>Bl(n,o)});return}let u=Bl(n,o);Xt(u,{rootEl:l,block:"nearest"})};return H(()=>r(!0)),ot(()=>$r(n),{defer:!0,attributes:["data-activedescendant"],callback(){r(!1)}})}},actions:{reposition({context:e,prop:t,scope:n,event:i}){let r=()=>Ep(n);It(ri(n),r,y(g(g({},t("positioning")),i.options),{defer:!0,listeners:!1,onComplete(s){e.set("currentPlacement",s.placement)}}))},toggleVisibility({send:e,prop:t,event:n}){e({type:t("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})},highlightPreviousItem({context:e,prop:t}){let n=e.get("highlightedValue");if(n==null)return;let i=t("collection").getPreviousValue(n,1,t("loopFocus"));i!=null&&e.set("highlightedValue",i)},highlightNextItem({context:e,prop:t}){let n=e.get("highlightedValue");if(n==null)return;let i=t("collection").getNextValue(n,1,t("loopFocus"));i!=null&&e.set("highlightedValue",i)},highlightFirstItem({context:e,prop:t}){let n=t("collection").firstValue;e.set("highlightedValue",n)},highlightLastItem({context:e,prop:t}){let n=t("collection").lastValue;e.set("highlightedValue",n)},setInitialFocus({scope:e}){H(()=>{let t=us({root:$r(e)});t==null||t.focus({preventScroll:!0})})},focusTriggerEl({event:e,scope:t}){Ip(e)&&H(()=>{let n=ri(t);n==null||n.focus({preventScroll:!0})})},selectHighlightedItem({context:e,prop:t,event:n}){var s,a;let i=(s=n.value)!=null?s:e.get("highlightedValue");if(i==null||!t("collection").has(i))return;(a=t("onSelect"))==null||a({value:i}),i=t("deselectable")&&!t("multiple")&&e.get("value").includes(i)?null:i,e.set("value",o=>i==null?[]:t("multiple")?yt(o,i):[i])},highlightComputedFirstItem({context:e,prop:t,computed:n}){let i=t("collection"),r=n("hasSelectedItems")?i.sort(e.get("value"))[0]:i.firstValue;e.set("highlightedValue",r)},highlightComputedLastItem({context:e,prop:t,computed:n}){let i=t("collection"),r=n("hasSelectedItems")?i.sort(e.get("value"))[0]:i.lastValue;e.set("highlightedValue",r)},highlightFirstSelectedItem({context:e,prop:t,computed:n}){if(!n("hasSelectedItems"))return;let i=t("collection").sort(e.get("value"))[0];e.set("highlightedValue",i)},highlightItem({context:e,event:t}){e.set("highlightedValue",t.value)},highlightMatchingItem({context:e,prop:t,event:n,refs:i}){let r=t("collection").search(n.key,{state:i.get("typeahead"),currentValue:e.get("highlightedValue")});r!=null&&e.set("highlightedValue",r)},setHighlightedItem({context:e,event:t}){e.set("highlightedValue",t.value)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},selectItem({context:e,prop:t,event:n}){var s;(s=t("onSelect"))==null||s({value:n.value});let r=t("deselectable")&&!t("multiple")&&e.get("value").includes(n.value)?null:n.value;e.set("value",a=>r==null?[]:t("multiple")?yt(a,r):[r])},clearItem({context:e,event:t}){e.set("value",n=>n.filter(i=>i!==t.value))},setSelectedItems({context:e,event:t}){e.set("value",t.value)},clearSelectedItems({context:e}){e.set("value",[])},selectPreviousItem({context:e,prop:t}){let[n]=e.get("value"),i=t("collection").getPreviousValue(n);i&&e.set("value",[i])},selectNextItem({context:e,prop:t}){let[n]=e.get("value"),i=t("collection").getNextValue(n);i&&e.set("value",[i])},selectFirstItem({context:e,prop:t}){let n=t("collection").firstValue;n&&e.set("value",[n])},selectLastItem({context:e,prop:t}){let n=t("collection").lastValue;n&&e.set("value",[n])},selectMatchingItem({context:e,prop:t,event:n,refs:i}){let r=t("collection").search(n.key,{state:i.get("typeahead"),currentValue:e.get("value")[0]});r!=null&&e.set("value",[r])},scrollContentToTop({prop:e,scope:t}){var n,i;if(e("scrollToIndexFn")){let r=e("collection").firstValue;(n=e("scrollToIndexFn"))==null||n({index:0,immediate:!0,getElement:()=>Bl(t,r)})}else(i=$r(t))==null||i.scrollTo(0,0)},invokeOnOpen({prop:e,context:t}){var n;(n=e("onOpenChange"))==null||n({open:!0,value:t.get("value")})},invokeOnClose({prop:e,context:t}){var n;(n=e("onOpenChange"))==null||n({open:!1,value:t.get("value")})},syncSelectElement({context:e,prop:t,scope:n}){let i=Hl(n);if(i){if(e.get("value").length===0&&!t("multiple")){i.selectedIndex=-1;return}for(let r of i.options)r.selected=e.get("value").includes(r.value)}},syncCollection({context:e,prop:t}){let n=t("collection"),i=n.find(e.get("highlightedValue"));i&&e.set("highlightedItem",i);let r=n.findMany(e.get("value"));e.set("selectedItems",r)},syncSelectedItems({context:e,prop:t}){let n=t("collection"),i=e.get("selectedItems"),s=e.get("value").map(a=>i.find(l=>n.getItemValue(l)===a)||n.find(a));e.set("selectedItems",s)},syncHighlightedItem({context:e,prop:t}){let n=t("collection"),i=e.get("highlightedValue"),r=i?n.find(i):null;e.set("highlightedItem",r)},dispatchChangeEvent({scope:e}){queueMicrotask(()=>{let t=Hl(e);if(!t)return;let n=e.getWin(),i=new n.Event("change",{bubbles:!0,composed:!0});t.dispatchEvent(i)})}}}};BO=_()(["closeOnSelect","collection","composite","defaultHighlightedValue","defaultOpen","defaultValue","deselectable","dir","disabled","form","getRootNode","highlightedValue","id","ids","invalid","loopFocus","multiple","name","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onSelect","onValueChange","open","positioning","readOnly","required","scrollToIndexFn","value"]),GA=B(BO),_O=_()(["item","persistFocus"]),UA=B(_O),GO=_()(["id"]),qA=B(GO),UO=_()(["htmlFor"]),WA=B(UO),qO=class extends K{constructor(t,n){var r;super(t,n);Y(this,"_options",[]);Y(this,"hasGroups",!1);Y(this,"placeholder","");Y(this,"init",()=>{this.machine.start(),this.render(),this.machine.subscribe(()=>{this.api=this.initApi(),this.render()})});let i=n.collection;this._options=(r=i==null?void 0:i.items)!=null?r:[],this.placeholder=w(this.el,"placeholder")||""}get options(){return Array.isArray(this._options)?this._options:[]}setOptions(t){this._options=Array.isArray(t)?t:[]}getCollection(){let t=this.options;return this.hasGroups?Ki({items:t,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled,groupBy:n=>{var i;return(i=n.group)!=null?i:""}}):Ki({items:t,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled})}initMachine(t){let n=this.getCollection.bind(this),i=t.collection;return new W(HO,y(g({},t),{get collection(){return i!=null?i:n()}}))}initApi(){return FO(this.machine.service,q)}applyItemProps(){let t=this.el.querySelector('[data-scope="select"][data-part="content"]');t&&(t.querySelectorAll('[data-scope="select"][data-part="item-group"]').forEach(n=>{var s;let i=(s=n.dataset.id)!=null?s:"";this.spreadProps(n,this.api.getItemGroupProps({id:i}));let r=n.querySelector('[data-scope="select"][data-part="item-group-label"]');r&&this.spreadProps(r,this.api.getItemGroupLabelProps({htmlFor:i}))}),t.querySelectorAll('[data-scope="select"][data-part="item"]').forEach(n=>{var o;let i=(o=n.dataset.value)!=null?o:"",r=this.options.find(l=>{var c,u;return String((u=(c=l.id)!=null?c:l.value)!=null?u:"")===String(i)});if(!r)return;this.spreadProps(n,this.api.getItemProps({item:r}));let s=n.querySelector('[data-scope="select"][data-part="item-text"]');s&&this.spreadProps(s,this.api.getItemTextProps({item:r}));let a=n.querySelector('[data-scope="select"][data-part="item-indicator"]');a&&this.spreadProps(a,this.api.getItemIndicatorProps({item:r}))}))}render(){var a;let t=(a=this.el.querySelector('[data-scope="select"][data-part="root"]'))!=null?a:this.el;this.spreadProps(t,this.api.getRootProps());let n=this.el.querySelector('[data-scope="select"][data-part="hidden-select"]'),i=this.el.querySelector('[data-scope="select"][data-part="value-input"]');i&&(!this.api.value||this.api.value.length===0?i.value="":this.api.value.length===1?i.value=String(this.api.value[0]):i.value=this.api.value.map(String).join(",")),n&&this.spreadProps(n,this.api.getHiddenSelectProps()),["label","control","trigger","indicator","clear-trigger","positioner"].forEach(o=>{let l=this.el.querySelector(`[data-scope="select"][data-part="${o}"]`);if(!l)return;let c="get"+o.split("-").map(u=>u[0].toUpperCase()+u.slice(1)).join("")+"Props";this.spreadProps(l,this.api[c]())});let r=this.el.querySelector('[data-scope="select"][data-part="item-text"]');if(r){let o=this.api.valueAsString;if(this.api.value&&this.api.value.length>0&&!o){let l=this.api.value[0],c=this.options.find(u=>{var m,d;let h=(d=(m=u.id)!=null?m:u.value)!=null?d:"";return String(h)===String(l)});c?r.textContent=c.label:r.textContent=this.placeholder||""}else r.textContent=o||this.placeholder||""}let s=this.el.querySelector('[data-scope="select"][data-part="content"]');s&&(this.spreadProps(s,this.api.getContentProps()),this.applyItemProps())}};zO={mounted(){let e=this.el,t=JSON.parse(e.dataset.collection||"[]"),n=t.some(s=>s.group!==void 0),i=Pp(t,n),r=new qO(e,y(g({id:e.id,collection:i},C(e,"controlled")?{value:Z(e,"value")}:{defaultValue:Z(e,"defaultValue")}),{disabled:C(e,"disabled"),closeOnSelect:C(e,"closeOnSelect"),dir:w(e,"dir",["ltr","rtl"]),loopFocus:C(e,"loopFocus"),multiple:C(e,"multiple"),invalid:C(e,"invalid"),name:w(e,"name"),form:w(e,"form"),readOnly:C(e,"readOnly"),required:C(e,"required"),positioning:(()=>{let s=e.dataset.positioning;if(s)try{let a=JSON.parse(s);return KO(a)}catch(a){return}})(),onValueChange:s=>{var T;let a=C(e,"redirect"),o=s.value.length>0?String(s.value[0]):null,l=(T=s.items)!=null&&T.length?s.items[0]:null,c=l&&typeof l=="object"&&l!==null&&"redirect"in l?l.redirect:void 0,u=l&&typeof l=="object"&&l!==null&&"new_tab"in l?l.new_tab:void 0;a&&o&&this.liveSocket.main.isDead&&c!==!1&&(u===!0?window.open(o,"_blank","noopener,noreferrer"):window.location.href=o);let d=e.querySelector('[data-scope="select"][data-part="value-input"]');d&&(d.value=s.value.length===0?"":s.value.length===1?String(s.value[0]):s.value.map(String).join(","),d.dispatchEvent(new Event("input",{bubbles:!0})),d.dispatchEvent(new Event("change",{bubbles:!0})));let p={value:s.value,items:s.items,id:e.id},v=w(e,"onValueChangeClient");v&&e.dispatchEvent(new CustomEvent(v,{bubbles:!0,detail:p}));let I=w(e,"onValueChange");I&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(I,p)}}));r.hasGroups=n,r.setOptions(t),r.init(),this.select=r,this.handlers=[]},updated(){let e=JSON.parse(this.el.dataset.collection||"[]"),t=e.some(n=>n.group!==void 0);this.select&&(this.select.hasGroups=t,this.select.setOptions(e),this.select.updateProps(y(g({collection:Pp(e,t),id:this.el.id},C(this.el,"controlled")?{value:Z(this.el,"value")}:{defaultValue:Z(this.el,"defaultValue")}),{name:w(this.el,"name"),form:w(this.el,"form"),disabled:C(this.el,"disabled"),multiple:C(this.el,"multiple"),dir:w(this.el,"dir",["ltr","rtl"]),invalid:C(this.el,"invalid"),required:C(this.el,"required"),readOnly:C(this.el,"readOnly")})))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.select)==null||e.destroy()}}});var Kp={};he(Kp,{SignaturePad:()=>Ew});function xp(e,t,n,i=r=>r){return e*i(.5-t*(.5-n))}function Bp(e,t,n){let i=Wl(1,t/n);return Wl(1,e+(Wl(1,1-i)-e)*(i*.275))}function jO(e){return[-e[0],-e[1]]}function Bt(e,t){return[e[0]+t[0],e[1]+t[1]]}function Ap(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function Nn(e,t){return[e[0]-t[0],e[1]-t[1]]}function Yl(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function kn(e,t){return[e[0]*t,e[1]*t]}function Kl(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function XO(e,t){return[e[0]/t,e[1]/t]}function _p(e){return[e[1],-e[0]]}function zl(e,t){let n=t[0];return e[0]=t[1],e[1]=-n,e}function kp(e,t){return e[0]*t[0]+e[1]*t[1]}function ZO(e,t){return e[0]===t[0]&&e[1]===t[1]}function JO(e){return Math.hypot(e[0],e[1])}function Np(e,t){let n=e[0]-t[0],i=e[1]-t[1];return n*n+i*i}function Gp(e){return XO(e,JO(e))}function QO(e,t){return Math.hypot(e[1]-t[1],e[0]-t[0])}function jl(e,t,n){let i=Math.sin(n),r=Math.cos(n),s=e[0]-t[0],a=e[1]-t[1],o=s*r-a*i,l=s*i+a*r;return[o+t[0],l+t[1]]}function Rp(e,t,n,i){let r=Math.sin(i),s=Math.cos(i),a=t[0]-n[0],o=t[1]-n[1],l=a*s-o*r,c=a*r+o*s;return e[0]=l+n[0],e[1]=c+n[1],e}function Dp(e,t,n){return Bt(e,kn(Nn(t,e),n))}function ew(e,t,n,i){let r=n[0]-t[0],s=n[1]-t[1];return e[0]=t[0]+r*i,e[1]=t[1]+s*i,e}function Up(e,t,n){return Bt(e,kn(t,n))}function tw(e,t){let n=Up(e,Gp(_p(Nn(e,Bt(e,[1,1])))),-t),i=[],r=1/13;for(let s=r;s<=1;s+=r)i.push(jl(n,e,Br*2*s));return i}function nw(e,t,n){let i=[],r=1/n;for(let s=r;s<=1;s+=r)i.push(jl(t,e,Br*s));return i}function iw(e,t,n){let i=Nn(t,n),r=kn(i,.5),s=kn(i,.51);return[Nn(e,r),Nn(e,s),Bt(e,s),Bt(e,r)]}function rw(e,t,n,i){let r=[],s=Up(e,t,n),a=1/i;for(let o=a;o<1;o+=a)r.push(jl(s,e,Br*3*o));return r}function sw(e,t,n){return[Bt(e,kn(t,n)),Bt(e,kn(t,n*.99)),Nn(e,kn(t,n*.99)),Nn(e,kn(t,n))]}function Lp(e,t,n){return e===!1||e===void 0?0:e===!0?Math.max(t,n):e}function aw(e,t,n){return e.slice(0,10).reduce((i,r)=>{let s=r.pressure;return t&&(s=Bp(i,r.distance,n)),(i+s)/2},e[0].pressure)}function ow(e,t={}){let{size:n=16,smoothing:i=.5,thinning:r=.5,simulatePressure:s=!0,easing:a=Q=>Q,start:o={},end:l={},last:c=!1}=t,{cap:u=!0,easing:h=Q=>Q*(2-Q)}=o,{cap:m=!0,easing:d=Q=>--Q*Q*Q+1}=l;if(e.length===0||n<=0)return[];let p=e[e.length-1].runningLength,v=Lp(o.taper,n,p),I=Lp(l.taper,n,p),T=(n*i)**2,O=[],b=[],f=aw(e,s,n),S=xp(n,r,e[e.length-1].pressure,a),P,V=e[0].vector,A=e[0].point,x=A,k=A,N=x,D=!1;for(let Q=0;QT)&&(O.push(k),A=k),Ap(An,Pe,De),N=[An[0],An[1]],(Q<=1||Np(x,N)>T)&&(b.push(N),x=N),f=Se,V=ne}let $=[e[0].point[0],e[0].point[1]],te=e.length>1?[e[e.length-1].point[0],e[e.length-1].point[1]]:Bt(e[0].point,[1,1]),J=[],ie=[];if(e.length===1){if(!(v||I)||c)return tw($,P||S)}else{v||I&&e.length===1||(u?J.push(...nw($,b[0],13)):J.push(...iw($,O[0],b[0])));let Q=_p(jO(e[e.length-1].vector));I||v&&e.length===1?ie.push(te):m?ie.push(...rw(te,Q,S,29)):ie.push(...sw(te,Q,S))}return O.concat(ie,b.reverse(),J)}function Fp(e){return e!=null&&e>=0}function lw(e,t={}){var m;let{streamline:n=.5,size:i=16,last:r=!1}=t;if(e.length===0)return[];let s=.15+(1-n)*.85,a=Array.isArray(e[0])?e:e.map(({x:d,y:p,pressure:v=wp})=>[d,p,v]);if(a.length===2){let d=a[1];a=a.slice(0,-1);for(let p=1;p<5;p++)a.push(Dp(a[0],d,p/4))}a.length===1&&(a=[...a,[...Bt(a[0],Vp),...a[0].slice(2)]]);let o=[{point:[a[0][0],a[0][1]],pressure:Fp(a[0][2])?a[0][2]:.25,vector:[...Vp],distance:0,runningLength:0}],l=!1,c=0,u=o[0],h=a.length-1;for(let d=1;d{"use strict";se();({PI:YO}=Math),Br=YO+1e-4,wp=.5,Vp=[1,1];({min:Wl}=Math);De=[0,0],xn=[0,0],An=[0,0];Mp=[0,0];uw=cw,dw=U("signature-pad").parts("root","control","segment","segmentPath","guide","clearTrigger","label"),si=dw.build(),hw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`signature-${e.id}`},qp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`signature-control-${e.id}`},gw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`signature-label-${e.id}`},$p=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.hiddenInput)!=null?n:`signature-input-${e.id}`},Va=e=>e.getById(qp(e)),pw=e=>vi(Va(e),"[data-part=segment]"),Wp=(e,t)=>Sc(pw(e),t);Oa=(e,t)=>(e+t)/2;vw={props({props:e}){return y(g({defaultPaths:[]},e),{drawing:g({size:2,simulatePressure:!1,thinning:.7,smoothing:.4,streamline:.6},e.drawing),translations:g({control:"signature pad",clearTrigger:"clear signature"},e.translations)})},initialState(){return"idle"},context({prop:e,bindable:t}){return{paths:t(()=>({defaultValue:e("defaultPaths"),value:e("paths"),sync:!0,onChange(n){var i;(i=e("onDraw"))==null||i({paths:n})}})),currentPoints:t(()=>({defaultValue:[]})),currentPath:t(()=>({defaultValue:null}))}},computed:{isInteractive:({prop:e})=>!(e("disabled")||e("readOnly")),isEmpty:({context:e})=>e.get("paths").length===0},on:{CLEAR:{actions:["clearPoints","invokeOnDrawEnd","focusCanvasEl"]}},states:{idle:{on:{POINTER_DOWN:{target:"drawing",actions:["addPoint"]}}},drawing:{effects:["trackPointerMove"],on:{POINTER_MOVE:{actions:["addPoint","invokeOnDraw"]},POINTER_UP:{target:"idle",actions:["endStroke","invokeOnDrawEnd"]}}}},implementations:{effects:{trackPointerMove({scope:e,send:t}){let n=e.getDoc();return hn(n,{onPointerMove({event:i,point:r}){let s=Va(e);if(!s)return;let{offset:a}=to(r,s);t({type:"POINTER_MOVE",point:a,pressure:i.pressure})},onPointerUp(){t({type:"POINTER_UP"})}})}},actions:{addPoint({context:e,event:t,prop:n}){let i=[...e.get("currentPoints"),t.point];e.set("currentPoints",i);let r=uw(i,n("drawing"));e.set("currentPath",mw(r))},endStroke({context:e}){let t=[...e.get("paths"),e.get("currentPath")];e.set("paths",t),e.set("currentPoints",[]),e.set("currentPath",null)},clearPoints({context:e}){e.set("currentPoints",[]),e.set("paths",[]),e.set("currentPath",null)},focusCanvasEl({scope:e}){queueMicrotask(()=>{var t;(t=e.getActiveElement())==null||t.focus({preventScroll:!0})})},invokeOnDraw({context:e,prop:t}){var n;(n=t("onDraw"))==null||n({paths:[...e.get("paths"),e.get("currentPath")]})},invokeOnDrawEnd({context:e,prop:t,scope:n,computed:i}){var r;(r=t("onDrawEnd"))==null||r({paths:[...e.get("paths")],getDataUrl(s,a=.92){return i("isEmpty")?Promise.resolve(""):Wp(n,{type:s,quality:a})}})}}}},yw=_()(["defaultPaths","dir","disabled","drawing","getRootNode","id","ids","name","onDraw","onDrawEnd","paths","readOnly","required","translations"]),jA=B(yw),bw=class extends K{constructor(){super(...arguments);Y(this,"imageURL","");Y(this,"paths",[]);Y(this,"name");Y(this,"syncPaths",()=>{let t=this.el.querySelector('[data-scope="signature-pad"][data-part="segment"]');if(!t)return;if(this.api.paths.length+(this.api.currentPath?1:0)===0){t.innerHTML="",this.imageURL="",this.paths=[];let i=this.el.querySelector('[data-scope="signature-pad"][data-part="hidden-input"]');i&&(i.value="");return}if(t.innerHTML="",this.api.paths.forEach(i=>{let r=document.createElementNS("http://www.w3.org/2000/svg","path");r.setAttribute("data-scope","signature-pad"),r.setAttribute("data-part","path"),this.spreadProps(r,this.api.getSegmentPathProps({path:i})),t.appendChild(r)}),this.api.currentPath){let i=document.createElementNS("http://www.w3.org/2000/svg","path");i.setAttribute("data-scope","signature-pad"),i.setAttribute("data-part","current-path"),this.spreadProps(i,this.api.getSegmentPathProps({path:this.api.currentPath})),t.appendChild(i)}})}initMachine(t){return this.name=t.name,new W(vw,t)}setName(t){this.name=t}setPaths(t){this.paths=t}initApi(){return fw(this.machine.service,q)}render(){let t=this.el.querySelector('[data-scope="signature-pad"][data-part="root"]');if(!t)return;this.spreadProps(t,this.api.getRootProps());let n=t.querySelector('[data-scope="signature-pad"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps());let i=t.querySelector('[data-scope="signature-pad"][data-part="control"]');i&&this.spreadProps(i,this.api.getControlProps());let r=t.querySelector('[data-scope="signature-pad"][data-part="segment"]');r&&this.spreadProps(r,this.api.getSegmentProps());let s=t.querySelector('[data-scope="signature-pad"][data-part="guide"]');s&&this.spreadProps(s,this.api.getGuideProps());let a=t.querySelector('[data-scope="signature-pad"][data-part="clear-trigger"]');a&&this.spreadProps(a,this.api.getClearTriggerProps());let o=t.querySelector('[data-scope="signature-pad"][data-part="hidden-input"]');o&&this.spreadProps(o,this.api.getHiddenInputProps({value:this.api.paths.length>0?JSON.stringify(this.api.paths):""})),this.syncPaths()}};Ew={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=C(e,"controlled"),i=wa(e,"paths"),r=wa(e,"defaultPaths"),s=new bw(e,y(g(g({id:e.id,name:w(e,"name")},n&&i.length>0?{paths:i}:void 0),!n&&r.length>0?{defaultPaths:r}:void 0),{drawing:Hp(e),onDrawEnd:a=>{s.setPaths(a.paths);let o=e.querySelector('[data-scope="signature-pad"][data-part="hidden-input"]');o&&(o.value=a.paths.length>0?JSON.stringify(a.paths):"",o.dispatchEvent(new Event("input",{bubbles:!0})),o.dispatchEvent(new Event("change",{bubbles:!0}))),a.getDataUrl("image/png").then(l=>{s.imageURL=l;let c=w(e,"onDrawEnd");c&&this.liveSocket.main.isConnected()&&t(c,{id:e.id,paths:a.paths,url:l});let u=w(e,"onDrawEndClient");u&&e.dispatchEvent(new CustomEvent(u,{bubbles:!0,detail:{id:e.id,paths:a.paths,url:l}}))})}}));s.init(),this.signaturePad=s,this.onClear=a=>{let{id:o}=a.detail;o&&o!==e.id||s.api.clear()},e.addEventListener("phx:signature-pad:clear",this.onClear),this.handlers=[],this.handlers.push(this.handleEvent("signature_pad_clear",a=>{let o=a.signature_pad_id;o&&o!==e.id||s.api.clear()}))},updated(){var r,s;let e=C(this.el,"controlled"),t=wa(this.el,"paths"),n=wa(this.el,"defaultPaths"),i=w(this.el,"name");i&&((r=this.signaturePad)==null||r.setName(i)),(s=this.signaturePad)==null||s.updateProps(y(g(g({id:this.el.id,name:i},e&&t.length>0?{paths:t}:{}),!e&&n.length>0?{defaultPaths:n}:{}),{drawing:Hp(this.el)}))},destroyed(){var e;if(this.onClear&&this.el.removeEventListener("phx:signature-pad:clear",this.onClear),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.signaturePad)==null||e.destroy()}}});var Zp={};he(Zp,{Switch:()=>xw});function Tw(e,t){let{context:n,send:i,prop:r,scope:s}=e,a=!!r("disabled"),o=!!r("readOnly"),l=!!r("required"),c=!!n.get("checked"),u=!a&&n.get("focused"),h=!a&&n.get("focusVisible"),m=!a&&n.get("active"),d={"data-active":E(m),"data-focus":E(u),"data-focus-visible":E(h),"data-readonly":E(o),"data-hover":E(n.get("hovered")),"data-disabled":E(a),"data-state":c?"checked":"unchecked","data-invalid":E(r("invalid")),"data-required":E(l)};return{checked:c,disabled:a,focused:u,setChecked(p){i({type:"CHECKED.SET",checked:p,isTrusted:!1})},toggleChecked(){i({type:"CHECKED.TOGGLE",checked:c,isTrusted:!1})},getRootProps(){return t.label(y(g(g({},xa.root.attrs),d),{dir:r("dir"),id:Xp(s),htmlFor:Xl(s),onPointerMove(){a||i({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){a||i({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(p){var I;if(a)return;j(p)===zi(s)&&p.stopPropagation(),Xe()&&((I=zi(s))==null||I.focus())}}))},getLabelProps(){return t.element(y(g(g({},xa.label.attrs),d),{dir:r("dir"),id:Yp(s)}))},getThumbProps(){return t.element(y(g(g({},xa.thumb.attrs),d),{dir:r("dir"),id:Pw(s),"aria-hidden":!0}))},getControlProps(){return t.element(y(g(g({},xa.control.attrs),d),{dir:r("dir"),id:Cw(s),"aria-hidden":!0}))},getHiddenInputProps(){return t.input({id:Xl(s),type:"checkbox",required:r("required"),defaultChecked:c,disabled:a,"aria-labelledby":Yp(s),"aria-invalid":r("invalid"),name:r("name"),form:r("form"),value:r("value"),style:Vt,onFocus(){let p=En();i({type:"CONTEXT.SET",context:{focused:!0,focusVisible:p}})},onBlur(){i({type:"CONTEXT.SET",context:{focused:!1,focusVisible:!1}})},onClick(p){if(o){p.preventDefault();return}let v=p.currentTarget.checked;i({type:"CHECKED.SET",checked:v,isTrusted:!0})}})}}}var Iw,xa,Xp,Yp,Pw,Cw,Xl,Sw,zi,jp,Ow,ww,ek,Vw,xw,Jp=re(()=>{"use strict";pr();se();Iw=U("switch").parts("root","label","control","thumb"),xa=Iw.build(),Xp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`switch:${e.id}`},Yp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`switch:${e.id}:label`},Pw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.thumb)!=null?n:`switch:${e.id}:thumb`},Cw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`switch:${e.id}:control`},Xl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.hiddenInput)!=null?n:`switch:${e.id}:input`},Sw=e=>e.getById(Xp(e)),zi=e=>e.getById(Xl(e));({not:jp}=Ee()),Ow={props({props:e}){return g({defaultChecked:!1,label:"switch",value:"on"},e)},initialState(){return"ready"},context({prop:e,bindable:t}){return{checked:t(()=>({defaultValue:e("defaultChecked"),value:e("checked"),onChange(n){var i;(i=e("onCheckedChange"))==null||i({checked:n})}})),fieldsetDisabled:t(()=>({defaultValue:!1})),focusVisible:t(()=>({defaultValue:!1})),active:t(()=>({defaultValue:!1})),focused:t(()=>({defaultValue:!1})),hovered:t(()=>({defaultValue:!1}))}},computed:{isDisabled:({context:e,prop:t})=>t("disabled")||e.get("fieldsetDisabled")},watch({track:e,prop:t,context:n,action:i}){e([()=>t("disabled")],()=>{i(["removeFocusIfNeeded"])}),e([()=>n.get("checked")],()=>{i(["syncInputElement"])})},effects:["trackFormControlState","trackPressEvent","trackFocusVisible"],on:{"CHECKED.TOGGLE":[{guard:jp("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:jp("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},states:{ready:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackPressEvent({computed:e,scope:t,context:n}){if(!e("isDisabled"))return ps({pointerNode:Sw(t),keyboardNode:zi(t),isValidKey:i=>i.key===" ",onPress:()=>n.set("active",!1),onPressStart:()=>n.set("active",!0),onPressEnd:()=>n.set("active",!1)})},trackFocusVisible({computed:e,scope:t}){if(!e("isDisabled"))return Pn({root:t.getRootNode()})},trackFormControlState({context:e,send:t,scope:n}){return wt(zi(n),{onFieldsetDisabledChange(i){e.set("fieldsetDisabled",i)},onFormReset(){let i=e.initial("checked");t({type:"CHECKED.SET",checked:!!i,src:"form-reset"})}})}},actions:{setContext({context:e,event:t}){for(let n in t.context)e.set(n,t.context[n])},syncInputElement({context:e,scope:t}){let n=zi(t);n&&sr(n,!!e.get("checked"))},removeFocusIfNeeded({context:e,prop:t}){t("disabled")&&e.set("focused",!1)},setChecked({context:e,event:t}){e.set("checked",t.checked)},toggleChecked({context:e}){e.set("checked",!e.get("checked"))},dispatchChangeEvent({context:e,scope:t}){queueMicrotask(()=>{let n=zi(t);pi(n,{checked:e.get("checked")})})}}}},ww=_()(["checked","defaultChecked","dir","disabled","form","getRootNode","id","ids","invalid","label","name","onCheckedChange","readOnly","required","value"]),ek=B(ww),Vw=class extends K{initMachine(e){return new W(Ow,e)}initApi(){return Tw(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="switch"][data-part="root"]');if(!e)return;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="switch"][data-part="hidden-input"]');t&&this.spreadProps(t,this.api.getHiddenInputProps());let n=this.el.querySelector('[data-scope="switch"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps());let i=this.el.querySelector('[data-scope="switch"][data-part="control"]');i&&this.spreadProps(i,this.api.getControlProps());let r=this.el.querySelector('[data-scope="switch"][data-part="thumb"]');r&&this.spreadProps(r,this.api.getThumbProps())}},xw={mounted(){let e=this.el,t=this.pushEvent.bind(this);this.wasFocused=!1;let n=new Vw(e,y(g({id:e.id},C(e,"controlled")?{checked:C(e,"checked")}:{defaultChecked:C(e,"defaultChecked")}),{disabled:C(e,"disabled"),name:w(e,"name"),form:w(e,"form"),value:w(e,"value"),dir:w(e,"dir",["ltr","rtl"]),invalid:C(e,"invalid"),required:C(e,"required"),readOnly:C(e,"readOnly"),label:w(e,"label"),onCheckedChange:i=>{let r=w(e,"onCheckedChange");r&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&t(r,{checked:i.checked,id:e.id});let s=w(e,"onCheckedChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{value:i,id:e.id}}))}}));n.init(),this.zagSwitch=n,this.onSetChecked=i=>{let{value:r}=i.detail;n.api.setChecked(r)},e.addEventListener("phx:switch:set-checked",this.onSetChecked),this.handlers=[],this.handlers.push(this.handleEvent("switch_set_checked",i=>{let r=i.id;r&&r!==e.id||n.api.setChecked(i.value)})),this.handlers.push(this.handleEvent("switch_toggle_checked",i=>{let r=i.id;r&&r!==e.id||n.api.toggleChecked()})),this.handlers.push(this.handleEvent("switch_checked",()=>{this.pushEvent("switch_checked_response",{value:n.api.checked})})),this.handlers.push(this.handleEvent("switch_focused",()=>{this.pushEvent("switch_focused_response",{value:n.api.focused})})),this.handlers.push(this.handleEvent("switch_disabled",()=>{this.pushEvent("switch_disabled_response",{value:n.api.disabled})}))},beforeUpdate(){var e,t;this.wasFocused=(t=(e=this.zagSwitch)==null?void 0:e.api.focused)!=null?t:!1},updated(){var e;if((e=this.zagSwitch)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlled")?{checked:C(this.el,"checked")}:{defaultChecked:C(this.el,"defaultChecked")}),{disabled:C(this.el,"disabled"),name:w(this.el,"name"),form:w(this.el,"form"),value:w(this.el,"value"),dir:w(this.el,"dir",["ltr","rtl"]),invalid:C(this.el,"invalid"),required:C(this.el,"required"),readOnly:C(this.el,"readOnly"),label:w(this.el,"label")})),C(this.el,"controlled")&&this.wasFocused){let t=this.el.querySelector('[data-part="hidden-input"]');t==null||t.focus()}},destroyed(){var e;if(this.onSetChecked&&this.el.removeEventListener("phx:switch:set-checked",this.onSetChecked),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.zagSwitch)==null||e.destroy()}}});var nf={};he(nf,{Tabs:()=>Kw});function Hw(e,t){let{state:n,send:i,context:r,prop:s,scope:a}=e,o=s("translations"),l=n.matches("focused"),c=s("orientation")==="vertical",u=s("orientation")==="horizontal",h=s("composite");function m(d){return{selected:r.get("value")===d.value,focused:r.get("focusedValue")===d.value,disabled:!!d.disabled}}return{value:r.get("value"),focusedValue:r.get("focusedValue"),setValue(d){i({type:"SET_VALUE",value:d})},clearValue(){i({type:"CLEAR_VALUE"})},setIndicatorRect(d){let p=ai(a,d);i({type:"SET_INDICATOR_RECT",id:p})},syncTabIndex(){i({type:"SYNC_TAB_INDEX"})},selectNext(d){i({type:"TAB_FOCUS",value:d,src:"selectNext"}),i({type:"ARROW_NEXT",src:"selectNext"})},selectPrev(d){i({type:"TAB_FOCUS",value:d,src:"selectPrev"}),i({type:"ARROW_PREV",src:"selectPrev"})},focus(){var p;let d=r.get("value");d&&((p=Aa(a,d))==null||p.focus())},getRootProps(){return t.element(y(g({},_r.root.attrs),{id:kw(a),"data-orientation":s("orientation"),"data-focus":E(l),dir:s("dir")}))},getListProps(){return t.element(y(g({},_r.list.attrs),{id:Gr(a),role:"tablist",dir:s("dir"),"data-focus":E(l),"aria-orientation":s("orientation"),"data-orientation":s("orientation"),"aria-label":o==null?void 0:o.listLabel,onKeyDown(d){if(d.defaultPrevented||Re(d)||!ce(d.currentTarget,j(d)))return;let p={ArrowDown(){u||i({type:"ARROW_NEXT",key:"ArrowDown"})},ArrowUp(){u||i({type:"ARROW_PREV",key:"ArrowUp"})},ArrowLeft(){c||i({type:"ARROW_PREV",key:"ArrowLeft"})},ArrowRight(){c||i({type:"ARROW_NEXT",key:"ArrowRight"})},Home(){i({type:"HOME"})},End(){i({type:"END"})}},v=ge(d,{dir:s("dir"),orientation:s("orientation")}),I=p[v];if(I){d.preventDefault(),I(d);return}}}))},getTriggerState:m,getTriggerProps(d){let{value:p,disabled:v}=d,I=m(d);return t.button(y(g({},_r.trigger.attrs),{role:"tab",type:"button",disabled:v,dir:s("dir"),"data-orientation":s("orientation"),"data-disabled":E(v),"aria-disabled":v,"data-value":p,"aria-selected":I.selected,"data-selected":E(I.selected),"data-focus":E(I.focused),"aria-controls":I.selected?Zl(a,p):void 0,"data-ownedby":Gr(a),"data-ssr":E(r.get("ssr")),id:ai(a,p),tabIndex:I.selected&&h?0:-1,onFocus(){i({type:"TAB_FOCUS",value:p})},onBlur(T){let O=T.relatedTarget;(O==null?void 0:O.getAttribute("role"))!=="tab"&&i({type:"TAB_BLUR"})},onClick(T){T.defaultPrevented||Fn(T)||v||(Xe()&&T.currentTarget.focus(),i({type:"TAB_CLICK",value:p}))}}))},getContentProps(d){let{value:p}=d,v=r.get("value")===p;return t.element(y(g({},_r.content.attrs),{dir:s("dir"),id:Zl(a,p),tabIndex:h?0:-1,"aria-labelledby":ai(a,p),role:"tabpanel","data-ownedby":Gr(a),"data-selected":E(v),"data-orientation":s("orientation"),hidden:!v}))},getIndicatorProps(){let d=r.get("indicatorRect"),p=d==null||d.width===0&&d.height===0&&d.x===0&&d.y===0;return t.element(y(g({id:ef(a)},_r.indicator.attrs),{dir:s("dir"),"data-orientation":s("orientation"),hidden:p,style:{"--transition-property":"left, right, top, bottom, width, height","--left":ye(d==null?void 0:d.x),"--top":ye(d==null?void 0:d.y),"--width":ye(d==null?void 0:d.width),"--height":ye(d==null?void 0:d.height),position:"absolute",willChange:"var(--transition-property)",transitionProperty:"var(--transition-property)",transitionDuration:"var(--transition-duration, 150ms)",transitionTimingFunction:"var(--transition-timing-function)",[u?"left":"top"]:u?"var(--left)":"var(--top)"}}))}}}var Aw,_r,kw,Gr,Zl,ai,ef,Nw,Rw,Aa,Qp,Yi,Dw,Lw,Mw,Fw,tf,$w,Bw,_w,Gw,rk,Uw,sk,qw,ak,Ww,Kw,rf=re(()=>{"use strict";se();Aw=U("tabs").parts("root","list","trigger","content","indicator"),_r=Aw.build(),kw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`tabs:${e.id}`},Gr=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.list)!=null?n:`tabs:${e.id}:list`},Zl=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.content)==null?void 0:i.call(n,t))!=null?r:`tabs:${e.id}:content-${t}`},ai=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.trigger)==null?void 0:i.call(n,t))!=null?r:`tabs:${e.id}:trigger-${t}`},ef=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicator)!=null?n:`tabs:${e.id}:indicator`},Nw=e=>e.getById(Gr(e)),Rw=(e,t)=>e.getById(Zl(e,t)),Aa=(e,t)=>t!=null?e.getById(ai(e,t)):null,Qp=e=>e.getById(ef(e)),Yi=e=>{let n=`[role=tab][data-ownedby='${CSS.escape(Gr(e))}']:not([disabled])`;return Fe(Nw(e),n)},Dw=e=>lt(Yi(e)),Lw=e=>mt(Yi(e)),Mw=(e,t)=>yi(Yi(e),ai(e,t.value),t.loopFocus),Fw=(e,t)=>bi(Yi(e),ai(e,t.value),t.loopFocus),tf=e=>{var t,n,i,r;return{x:(t=e==null?void 0:e.offsetLeft)!=null?t:0,y:(n=e==null?void 0:e.offsetTop)!=null?n:0,width:(i=e==null?void 0:e.offsetWidth)!=null?i:0,height:(r=e==null?void 0:e.offsetHeight)!=null?r:0}},$w=(e,t)=>{let n=so(Yi(e),ai(e,t));return tf(n)};({createMachine:Bw}=ut()),_w=Bw({props({props:e}){return g({dir:"ltr",orientation:"horizontal",activationMode:"automatic",loopFocus:!0,composite:!0,navigate(t){mi(t.node)},defaultValue:null},e)},initialState(){return"idle"},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var i;(i=e("onValueChange"))==null||i({value:n})}})),focusedValue:t(()=>({defaultValue:e("value")||e("defaultValue"),sync:!0,onChange(n){var i;(i=e("onFocusChange"))==null||i({focusedValue:n})}})),ssr:t(()=>({defaultValue:!0})),indicatorRect:t(()=>({defaultValue:null}))}},watch({context:e,prop:t,track:n,action:i}){n([()=>e.get("value")],()=>{i(["syncIndicatorRect","syncTabIndex","navigateIfNeeded"])}),n([()=>t("dir"),()=>t("orientation")],()=>{i(["syncIndicatorRect"])})},on:{SET_VALUE:{actions:["setValue"]},CLEAR_VALUE:{actions:["clearValue"]},SET_INDICATOR_RECT:{actions:["setIndicatorRect"]},SYNC_TAB_INDEX:{actions:["syncTabIndex"]}},entry:["syncIndicatorRect","syncTabIndex","syncSsr"],exit:["cleanupObserver"],states:{idle:{on:{TAB_FOCUS:{target:"focused",actions:["setFocusedValue"]},TAB_CLICK:{target:"focused",actions:["setFocusedValue","setValue"]}}},focused:{on:{TAB_CLICK:{actions:["setFocusedValue","setValue"]},ARROW_PREV:[{guard:"selectOnFocus",actions:["focusPrevTab","selectFocusedTab"]},{actions:["focusPrevTab"]}],ARROW_NEXT:[{guard:"selectOnFocus",actions:["focusNextTab","selectFocusedTab"]},{actions:["focusNextTab"]}],HOME:[{guard:"selectOnFocus",actions:["focusFirstTab","selectFocusedTab"]},{actions:["focusFirstTab"]}],END:[{guard:"selectOnFocus",actions:["focusLastTab","selectFocusedTab"]},{actions:["focusLastTab"]}],TAB_FOCUS:{actions:["setFocusedValue"]},TAB_BLUR:{target:"idle",actions:["clearFocusedValue"]}}}},implementations:{guards:{selectOnFocus:({prop:e})=>e("activationMode")==="automatic"},actions:{selectFocusedTab({context:e,prop:t}){H(()=>{let n=e.get("focusedValue");if(!n)return;let r=t("deselectable")&&e.get("value")===n?null:n;e.set("value",r)})},setFocusedValue({context:e,event:t,flush:n}){t.value!=null&&n(()=>{e.set("focusedValue",t.value)})},clearFocusedValue({context:e}){e.set("focusedValue",null)},setValue({context:e,event:t,prop:n}){let i=n("deselectable")&&e.get("value")===e.get("focusedValue");e.set("value",i?null:t.value)},clearValue({context:e}){e.set("value",null)},focusFirstTab({scope:e}){H(()=>{var t;(t=Dw(e))==null||t.focus()})},focusLastTab({scope:e}){H(()=>{var t;(t=Lw(e))==null||t.focus()})},focusNextTab({context:e,prop:t,scope:n,event:i}){var a;let r=(a=i.value)!=null?a:e.get("focusedValue");if(!r)return;let s=Mw(n,{value:r,loopFocus:t("loopFocus")});H(()=>{t("composite")?s==null||s.focus():(s==null?void 0:s.dataset.value)!=null&&e.set("focusedValue",s.dataset.value)})},focusPrevTab({context:e,prop:t,scope:n,event:i}){var a;let r=(a=i.value)!=null?a:e.get("focusedValue");if(!r)return;let s=Fw(n,{value:r,loopFocus:t("loopFocus")});H(()=>{t("composite")?s==null||s.focus():(s==null?void 0:s.dataset.value)!=null&&e.set("focusedValue",s.dataset.value)})},syncTabIndex({context:e,scope:t}){H(()=>{let n=e.get("value");if(!n)return;let i=Rw(t,n);if(!i)return;ar(i).length>0?i.removeAttribute("tabindex"):i.setAttribute("tabindex","0")})},cleanupObserver({refs:e}){let t=e.get("indicatorCleanup");t&&t()},setIndicatorRect({context:e,event:t,scope:n}){var a;let i=(a=t.id)!=null?a:e.get("value");!Qp(n)||!i||!Aa(n,i)||e.set("indicatorRect",$w(n,i))},syncSsr({context:e}){e.set("ssr",!1)},syncIndicatorRect({context:e,refs:t,scope:n}){let i=t.get("indicatorCleanup");if(i&&i(),!Qp(n))return;let s=()=>{let l=Aa(n,e.get("value"));if(!l)return;let c=tf(l);e.set("indicatorRect",u=>fe(u,c)?u:c)};s();let a=Yi(n),o=At(...a.map(l=>gn.observe(l,s)));t.set("indicatorCleanup",o)},navigateIfNeeded({context:e,prop:t,scope:n}){var s;let i=e.get("value");if(!i)return;let r=Aa(n,i);st(r)&&((s=t("navigate"))==null||s({value:i,node:r,href:r.href}))}}}}),Gw=_()(["activationMode","composite","deselectable","dir","getRootNode","id","ids","loopFocus","navigate","onFocusChange","onValueChange","orientation","translations","value","defaultValue"]),rk=B(Gw),Uw=_()(["disabled","value"]),sk=B(Uw),qw=_()(["value"]),ak=B(qw),Ww=class extends K{initMachine(e){return new W(_w,e)}initApi(){return Hw(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="tabs"][data-part="root"]');if(!e)return;this.spreadProps(e,this.api.getRootProps());let t=e.querySelector('[data-scope="tabs"][data-part="list"]');if(!t)return;this.spreadProps(t,this.api.getListProps());let n=this.el.getAttribute("data-items"),i=n?JSON.parse(n):[],r=t.querySelectorAll('[data-scope="tabs"][data-part="trigger"]');for(let a=0;a{var a,o;let r=w(e,"onValueChange");r&&this.liveSocket.main.isConnected()&&t(r,{id:e.id,value:(a=i.value)!=null?a:null});let s=w(e,"onValueChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{id:e.id,value:(o=i.value)!=null?o:null}}))},onFocusChange:i=>{var a,o;let r=w(e,"onFocusChange");r&&this.liveSocket.main.isConnected()&&t(r,{id:e.id,value:(a=i.focusedValue)!=null?a:null});let s=w(e,"onFocusChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{id:e.id,value:(o=i.focusedValue)!=null?o:null}}))}}));n.init(),this.tabs=n,this.onSetValue=i=>{let{value:r}=i.detail;n.api.setValue(r)},e.addEventListener("phx:tabs:set-value",this.onSetValue),this.handlers=[],this.handlers.push(this.handleEvent("tabs_set_value",i=>{let r=i.tabs_id;r&&r!==e.id||n.api.setValue(i.value)})),this.handlers.push(this.handleEvent("tabs_value",()=>{this.pushEvent("tabs_value_response",{value:n.api.value})})),this.handlers.push(this.handleEvent("tabs_focused_value",()=>{this.pushEvent("tabs_focused_value_response",{value:n.api.focusedValue})}))},updated(){var e;(e=this.tabs)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlled")?{value:w(this.el,"value")}:{defaultValue:w(this.el,"defaultValue")}),{orientation:w(this.el,"orientation",["horizontal","vertical"]),dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(this.onSetValue&&this.el.removeEventListener("phx:tabs:set-value",this.onSetValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.tabs)==null||e.destroy()}}});var of={};he(of,{Timer:()=>rV});function Xw(e,t){let{state:n,send:i,computed:r,scope:s}=e,a=n.matches("running"),o=n.matches("paused"),l=r("time"),c=r("formattedTime"),u=r("progressPercent");return{running:a,paused:o,time:l,formattedTime:c,progressPercent:u,start(){i({type:"START"})},pause(){i({type:"PAUSE"})},resume(){i({type:"RESUME"})},reset(){i({type:"RESET"})},restart(){i({type:"RESTART"})},getRootProps(){return t.element(g({id:Yw(s)},Rn.root.attrs))},getAreaProps(){return t.element(g({role:"timer",id:jw(s),"aria-label":`${l.days} days ${c.hours}:${c.minutes}:${c.seconds}`,"aria-atomic":!0},Rn.area.attrs))},getControlProps(){return t.element(g({},Rn.control.attrs))},getItemProps(h){let m=l[h.type];return t.element(y(g({},Rn.item.attrs),{"data-type":h.type,style:{"--value":m}}))},getItemLabelProps(h){return t.element(y(g({},Rn.itemLabel.attrs),{"data-type":h.type}))},getItemValueProps(h){return t.element(y(g({},Rn.itemValue.attrs),{"data-type":h.type}))},getSeparatorProps(){return t.element(g({"aria-hidden":!0},Rn.separator.attrs))},getActionTriggerProps(h){if(!sf.has(h.action))throw new Error(`[zag-js] Invalid action: ${h.action}. Must be one of: ${Array.from(sf).join(", ")}`);return t.button(y(g({},Rn.actionTrigger.attrs),{hidden:Ce(h.action,{start:()=>a||o,pause:()=>!a,reset:()=>!a&&!o,resume:()=>!o,restart:()=>!1}),type:"button",onClick(m){m.defaultPrevented||i({type:h.action.toUpperCase()})}}))}}}function Jw(e){let t=Math.max(0,e),n=t%1e3,i=Math.floor(t/1e3)%60,r=Math.floor(t/(1e3*60))%60,s=Math.floor(t/(1e3*60*60))%24;return{days:Math.floor(t/(1e3*60*60*24)),hours:s,minutes:r,seconds:i,milliseconds:n}}function af(e,t,n){let i=n-t;return i===0?0:(e-t)/i}function Ur(e,t=2){return e.toString().padStart(t,"0")}function Qw(e,t){return Math.floor(e/t)*t}function eV(e){let{days:t,hours:n,minutes:i,seconds:r}=e;return{days:Ur(t),hours:Ur(n),minutes:Ur(i),seconds:Ur(r),milliseconds:Ur(e.milliseconds,3)}}function tV(e){let{startMs:t,targetMs:n,countdown:i,interval:r}=e;if(r!=null&&(typeof r!="number"||r<=0))throw new Error(`[timer] Invalid interval: ${r}. Must be a positive number.`);if(t!=null&&(typeof t!="number"||t<0))throw new Error(`[timer] Invalid startMs: ${t}. Must be a non-negative number.`);if(n!=null&&(typeof n!="number"||n<0))throw new Error(`[timer] Invalid targetMs: ${n}. Must be a non-negative number.`);if(i&&t!=null&&n!=null&&t<=n)throw new Error(`[timer] Invalid countdown configuration: startMs (${t}) must be greater than targetMs (${n}).`);if(!i&&t!=null&&n!=null&&t>=n)throw new Error(`[timer] Invalid stopwatch configuration: startMs (${t}) must be less than targetMs (${n}).`);if(i&&n==null&&t!=null&&t<=0)throw new Error(`[timer] Invalid countdown configuration: startMs (${t}) must be greater than 0 when no targetMs is provided.`)}var zw,Rn,Yw,jw,sf,Zw,nV,uk,iV,rV,lf=re(()=>{"use strict";se();zw=U("timer").parts("root","area","control","item","itemValue","itemLabel","actionTrigger","separator"),Rn=zw.build(),Yw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`timer:${e.id}:root`},jw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.area)!=null?n:`timer:${e.id}:area`},sf=new Set(["start","pause","resume","reset","restart"]);Zw={props({props:e}){return tV(e),g({interval:1e3,startMs:0},e)},initialState({prop:e}){return e("autoStart")?"running":"idle"},context({prop:e,bindable:t}){return{currentMs:t(()=>({defaultValue:e("startMs")}))}},watch({track:e,send:t,prop:n}){e([()=>n("startMs")],()=>{t({type:"RESTART"})})},on:{RESTART:{target:"running:temp",actions:["resetTime"]}},computed:{time:({context:e})=>Jw(e.get("currentMs")),formattedTime:({computed:e})=>eV(e("time")),progressPercent:Bn(({context:e,prop:t})=>[e.get("currentMs"),t("targetMs"),t("startMs"),t("countdown")],([e,t=0,n,i])=>{let r=i?af(e,t,n):af(e,n,t);return He(r,0,1)})},states:{idle:{on:{START:{target:"running"},RESET:{actions:["resetTime"]}}},"running:temp":{effects:["waitForNextTick"],on:{CONTINUE:{target:"running"}}},running:{effects:["keepTicking"],on:{PAUSE:{target:"paused"},TICK:[{target:"idle",guard:"hasReachedTarget",actions:["invokeOnComplete"]},{actions:["updateTime","invokeOnTick"]}],RESET:{actions:["resetTime"]}}},paused:{on:{RESUME:{target:"running"},RESET:{target:"idle",actions:["resetTime"]}}}},implementations:{effects:{keepTicking({prop:e,send:t}){return su(({deltaMs:n})=>{t({type:"TICK",deltaMs:n})},e("interval"))},waitForNextTick({send:e}){return mn(()=>{e({type:"CONTINUE"})},0)}},actions:{updateTime({context:e,prop:t,event:n}){let i=t("countdown")?-1:1,r=Qw(n.deltaMs,t("interval"));e.set("currentMs",s=>{let a=s+i*r,o=t("targetMs");return o==null&&t("countdown")&&(o=0),t("countdown")&&o!=null?Math.max(a,o):!t("countdown")&&o!=null?Math.min(a,o):a})},resetTime({context:e,prop:t}){var i;let n=t("targetMs");n==null&&t("countdown")&&(n=0),e.set("currentMs",(i=t("startMs"))!=null?i:0)},invokeOnTick({context:e,prop:t,computed:n}){var i;(i=t("onTick"))==null||i({value:e.get("currentMs"),time:n("time"),formattedTime:n("formattedTime")})},invokeOnComplete({prop:e}){var t;(t=e("onComplete"))==null||t()}},guards:{hasReachedTarget:({context:e,prop:t})=>{let n=t("targetMs");if(n==null&&t("countdown")&&(n=0),n==null)return!1;let i=e.get("currentMs");return t("countdown")?i<=n:i>=n}}}};nV=_()(["autoStart","countdown","getRootNode","id","ids","interval","onComplete","onTick","startMs","targetMs"]),uk=B(nV),iV=class extends K{constructor(){super(...arguments);Y(this,"init",()=>{this.machine.subscribe(()=>{this.api=this.initApi(),this.render()}),this.machine.start(),this.api=this.initApi(),this.render()})}initMachine(t){return new W(Zw,t)}initApi(){return Xw(this.machine.service,q)}render(){var a;let t=(a=this.el.querySelector('[data-scope="timer"][data-part="root"]'))!=null?a:this.el;this.spreadProps(t,this.api.getRootProps());let n=this.el.querySelector('[data-scope="timer"][data-part="area"]');n&&this.spreadProps(n,this.api.getAreaProps());let i=this.el.querySelector('[data-scope="timer"][data-part="control"]');i&&this.spreadProps(i,this.api.getControlProps()),["days","hours","minutes","seconds"].forEach(o=>{let l=this.el.querySelector(`[data-scope="timer"][data-part="item"][data-type="${o}"]`);l&&this.spreadProps(l,this.api.getItemProps({type:o}))}),this.el.querySelectorAll('[data-scope="timer"][data-part="separator"]').forEach(o=>{this.spreadProps(o,this.api.getSeparatorProps())}),["start","pause","resume","reset"].forEach(o=>{let l=this.el.querySelector(`[data-scope="timer"][data-part="action-trigger"][data-action="${o}"]`);l&&this.spreadProps(l,this.api.getActionTriggerProps({action:o}))})}},rV={mounted(){var n;let e=this.el,t=new iV(e,{id:e.id,countdown:C(e,"countdown"),startMs:z(e,"startMs"),targetMs:z(e,"targetMs"),autoStart:C(e,"autoStart"),interval:(n=z(e,"interval"))!=null?n:1e3,onTick:i=>{let r=w(e,"onTick");r&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(r,{value:i.value,time:i.time,formattedTime:i.formattedTime,id:e.id})},onComplete:()=>{let i=w(e,"onComplete");i&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(i,{id:e.id})}});t.init(),this.timer=t,this.handlers=[]},updated(){var e,t;(t=this.timer)==null||t.updateProps({id:this.el.id,countdown:C(this.el,"countdown"),startMs:z(this.el,"startMs"),targetMs:z(this.el,"targetMs"),autoStart:C(this.el,"autoStart"),interval:(e=z(this.el,"interval"))!=null?e:1e3})},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.timer)==null||e.destroy()}}});var vf={};he(vf,{Toast:()=>VV});function Jl(e,t){var n;return(n=e!=null?e:gf[t])!=null?n:gf.DEFAULT}function cV(e,t){var v;let{prop:n,computed:i,context:r}=e,{offsets:s,gap:a}=n("store").attrs,o=r.get("heights"),l=lV(s),c=n("dir")==="rtl",u=t.replace("-start",c?"-right":"-left").replace("-end",c?"-left":"-right"),h=u.includes("right"),m=u.includes("left"),d={position:"fixed",pointerEvents:i("count")>0?void 0:"none",display:"flex",flexDirection:"column","--gap":`${a}px`,"--first-height":`${((v=o[0])==null?void 0:v.height)||0}px`,"--viewport-offset-left":l.left,"--viewport-offset-right":l.right,"--viewport-offset-top":l.top,"--viewport-offset-bottom":l.bottom,zIndex:ss},p="center";if(h&&(p="flex-end"),m&&(p="flex-start"),d.alignItems=p,u.includes("top")){let I=l.top;d.top=`max(env(safe-area-inset-top, 0px), ${I})`}if(u.includes("bottom")){let I=l.bottom;d.bottom=`max(env(safe-area-inset-bottom, 0px), ${I})`}if(!u.includes("left")){let I=l.right;d.insetInlineEnd=`calc(env(safe-area-inset-right, 0px) + ${I})`}if(!u.includes("right")){let I=l.left;d.insetInlineStart=`calc(env(safe-area-inset-left, 0px) + ${I})`}return d}function uV(e,t){let{prop:n,context:i,computed:r}=e,s=n("parent"),a=s.computed("placement"),{gap:o}=s.prop("store").attrs,[l]=a.split("-"),c=i.get("mounted"),u=i.get("remainingTime"),h=r("height"),m=r("frontmost"),d=!m,p=!n("stacked"),v=n("stacked"),T=n("type")==="loading"?Number.MAX_SAFE_INTEGER:u,O=r("heightIndex")*o+r("heightBefore"),b={position:"absolute",pointerEvents:"auto","--opacity":"0","--remove-delay":`${n("removeDelay")}ms`,"--duration":`${T}ms`,"--initial-height":`${h}px`,"--offset":`${O}px`,"--index":n("index"),"--z-index":r("zIndex"),"--lift-amount":"calc(var(--lift) * var(--gap))","--y":"100%","--x":"0"},f=S=>Object.assign(b,S);return l==="top"?f({top:"0","--sign":"-1","--y":"-100%","--lift":"1"}):l==="bottom"&&f({bottom:"0","--sign":"1","--y":"100%","--lift":"-1"}),c&&(f({"--y":"0","--opacity":"1"}),v&&f({"--y":"calc(var(--lift) * var(--offset))","--height":"var(--initial-height)"})),t||f({"--opacity":"0",pointerEvents:"none"}),d&&p&&(f({"--base-scale":"var(--index) * 0.05 + 1","--y":"calc(var(--lift-amount) * var(--index))","--scale":"calc(-1 * var(--base-scale))","--height":"var(--first-height)"}),t||f({"--y":"calc(var(--sign) * 40%)"})),d&&v&&!t&&f({"--y":"calc(var(--lift) * var(--offset) + var(--lift) * -100%)"}),m&&!t&&f({"--y":"calc(var(--lift) * -100%)"}),b}function dV(e,t){let{computed:n}=e,i={position:"absolute",inset:"0",scale:"1 2",pointerEvents:t?"none":"auto"},r=s=>Object.assign(i,s);return n("frontmost")&&!t&&r({height:"calc(var(--initial-height) + 80%)"}),i}function hV(){return{position:"absolute",left:"0",height:"calc(var(--gap) + 2px)",bottom:"100%",width:"100%"}}function gV(e,t){let{context:n,prop:i,send:r,refs:s,computed:a}=e;return{getCount(){return n.get("toasts").length},getToasts(){return n.get("toasts")},getGroupProps(o={}){let{label:l="Notifications"}=o,{hotkey:c}=i("store").attrs,u=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=a("placement"),[m,d="center"]=h.split("-");return t.element(y(g({},ji.group.attrs),{dir:i("dir"),tabIndex:-1,"aria-label":`${h} ${l} ${u}`,id:aV(h),"data-placement":h,"data-side":m,"data-align":d,"aria-live":"polite",role:"region",style:cV(e,h),onMouseEnter(){s.get("ignoreMouseTimer").isActive()||r({type:"REGION.POINTER_ENTER",placement:h})},onMouseMove(){s.get("ignoreMouseTimer").isActive()||r({type:"REGION.POINTER_ENTER",placement:h})},onMouseLeave(){s.get("ignoreMouseTimer").isActive()||r({type:"REGION.POINTER_LEAVE",placement:h})},onFocus(p){r({type:"REGION.FOCUS",target:p.relatedTarget})},onBlur(p){s.get("isFocusWithin")&&!ce(p.currentTarget,p.relatedTarget)&&queueMicrotask(()=>r({type:"REGION.BLUR"}))}}))},subscribe(o){return i("store").subscribe(()=>o(n.get("toasts")))}}}function yV(e,t){let{state:n,send:i,prop:r,scope:s,context:a,computed:o}=e,l=n.hasTag("visible"),c=n.hasTag("paused"),u=a.get("mounted"),h=o("frontmost"),m=r("parent").computed("placement"),d=r("type"),p=r("stacked"),v=r("title"),I=r("description"),T=r("action"),[O,b="center"]=m.split("-");return{type:d,title:v,description:I,placement:m,visible:l,paused:c,closable:!!r("closable"),pause(){i({type:"PAUSE"})},resume(){i({type:"RESUME"})},dismiss(){i({type:"DISMISS",src:"programmatic"})},getRootProps(){return t.element(y(g({},ji.root.attrs),{dir:r("dir"),id:mf(s),"data-state":l?"open":"closed","data-type":d,"data-placement":m,"data-align":b,"data-side":O,"data-mounted":E(u),"data-paused":E(c),"data-first":E(h),"data-sibling":E(!h),"data-stack":E(p),"data-overlap":E(!p),role:"status","aria-atomic":"true","aria-describedby":I?hf(s):void 0,"aria-labelledby":v?df(s):void 0,tabIndex:0,style:uV(e,l),onKeyDown(f){f.defaultPrevented||f.key=="Escape"&&(i({type:"DISMISS",src:"keyboard"}),f.preventDefault())}}))},getGhostBeforeProps(){return t.element({"data-ghost":"before",style:dV(e,l)})},getGhostAfterProps(){return t.element({"data-ghost":"after",style:hV()})},getTitleProps(){return t.element(y(g({},ji.title.attrs),{id:df(s)}))},getDescriptionProps(){return t.element(y(g({},ji.description.attrs),{id:hf(s)}))},getActionTriggerProps(){return t.button(y(g({},ji.actionTrigger.attrs),{type:"button",onClick(f){var S;f.defaultPrevented||((S=T==null?void 0:T.onClick)==null||S.call(T),i({type:"DISMISS",src:"user"}))}}))},getCloseTriggerProps(){return t.button(y(g({id:oV(s)},ji.closeTrigger.attrs),{type:"button","aria-label":"Dismiss notification",onClick(f){f.defaultPrevented||i({type:"DISMISS",src:"user"})}}))}}}function pf(e,t){let{id:n,height:i}=t;e.context.set("heights",r=>r.find(a=>a.id===n)?r.map(a=>a.id===n?y(g({},a),{height:i}):a):[{id:n,height:i},...r])}function PV(e={}){let t=IV(e,{placement:"bottom",overlap:!1,max:24,gap:16,offsets:"1rem",hotkey:["altKey","KeyT"],removeDelay:200,pauseOnPageIdle:!0}),n=[],i=[],r=new Set,s=[],a=D=>(n.push(D),()=>{let $=n.indexOf(D);n.splice($,1)}),o=D=>(n.forEach($=>$(D)),D),l=D=>{if(i.length>=t.max){s.push(D);return}o(D),i.unshift(D)},c=()=>{for(;s.length>0&&i.length{var J;let $=(J=D.id)!=null?J:`toast:${ur()}`,te=i.find(ie=>ie.id===$);return r.has($)&&r.delete($),te?i=i.map(ie=>ie.id===$?o(y(g(g({},ie),D),{id:$})):ie):l(y(g({id:$,duration:t.duration,removeDelay:t.removeDelay,type:"info"},D),{stacked:!t.overlap,gap:t.gap})),$},h=D=>(r.add(D),D?(n.forEach($=>$({id:D,dismiss:!0})),i=i.filter($=>$.id!==D),c()):(i.forEach($=>{n.forEach(te=>te({id:$.id,dismiss:!0}))}),i=[],s=[]),D);return{attrs:t,subscribe:a,create:u,update:(D,$)=>u(g({id:D},$)),remove:h,dismiss:D=>{D!=null?i=i.map($=>$.id===D?o(y(g({},$),{message:"DISMISS"})):$):i=i.map($=>o(y(g({},$),{message:"DISMISS"})))},error:D=>u(y(g({},D),{type:"error"})),success:D=>u(y(g({},D),{type:"success"})),info:D=>u(y(g({},D),{type:"info"})),warning:D=>u(y(g({},D),{type:"warning"})),loading:D=>u(y(g({},D),{type:"loading"})),getVisibleToasts:()=>i.filter(D=>!r.has(D.id)),getCount:()=>i.length,promise:(D,$,te={})=>{if(!$||!$.loading){zt("[zag-js > toast] toaster.promise() requires at least a 'loading' option to be specified");return}let J=u(y(g(g({},te),$.loading),{promise:D,type:"loading"})),ie=!0,Q,Se=Kt(D).then(ne=>Ve(null,null,function*(){if(Q=["resolve",ne],CV(ne)&&!ne.ok){ie=!1;let Ie=Kt($.error,`HTTP Error! status: ${ne.status}`);u(y(g(g({},te),Ie),{id:J,type:"error"}))}else if($.success!==void 0){ie=!1;let Ie=Kt($.success,ne);u(y(g(g({},te),Ie),{id:J,type:"success"}))}})).catch(ne=>Ve(null,null,function*(){if(Q=["reject",ne],$.error!==void 0){ie=!1;let Ie=Kt($.error,ne);u(y(g(g({},te),Ie),{id:J,type:"error"}))}})).finally(()=>{var ne;ie&&h(J),(ne=$.finally)==null||ne.call($)});return{id:J,unwrap:()=>new Promise((ne,Ie)=>Se.then(()=>Q[0]==="reject"?Ie(Q[1]):ne(Q[1])).catch(Ie))}},pause:D=>{D!=null?i=i.map($=>$.id===D?o(y(g({},$),{message:"PAUSE"})):$):i=i.map($=>o(y(g({},$),{message:"PAUSE"})))},resume:D=>{D!=null?i=i.map($=>$.id===D?o(y(g({},$),{message:"RESUME"})):$):i=i.map($=>o(y(g({},$),{message:"RESUME"})))},isVisible:D=>!r.has(D)&&!!i.find($=>$.id===D),isDismissed:D=>r.has(D),expand:()=>{i=i.map(D=>o(y(g({},D),{stacked:!0})))},collapse:()=>{i=i.map(D=>o(y(g({},D),{stacked:!1})))}}}function wV(e,t){var s,a,o;let n=(s=t==null?void 0:t.id)!=null?s:Mn(e,"toast"),i=(o=t==null?void 0:t.store)!=null?o:PV({placement:(a=t==null?void 0:t.placement)!=null?a:"bottom",overlap:t==null?void 0:t.overlap,max:t==null?void 0:t.max,gap:t==null?void 0:t.gap,offsets:t==null?void 0:t.offsets,pauseOnPageIdle:t==null?void 0:t.pauseOnPageIdle}),r=new OV(e,{id:n,store:i});return r.init(),SV.set(n,r),Ql.set(n,i),e.dataset.toastGroup="true",e.dataset.toastGroupId=n,{group:r,store:i}}function qr(e){if(e)return Ql.get(e);let t=document.querySelector("[data-toast-group]");if(!t)return;let n=t.dataset.toastGroupId||t.id;return n?Ql.get(n):void 0}var sV,ji,aV,cf,mf,uf,df,hf,oV,gf,lV,pV,fV,mV,vV,bV,EV,IV,CV,ff,SV,Ql,TV,OV,VV,yf=re(()=>{"use strict";Wn();tn();se();sV=U("toast").parts("group","root","title","description","actionTrigger","closeTrigger"),ji=sV.build(),aV=e=>`toast-group:${e}`,cf=(e,t)=>e.getById(`toast-group:${t}`),mf=e=>`toast:${e.id}`,uf=e=>e.getById(mf(e)),df=e=>`toast:${e.id}:title`,hf=e=>`toast:${e.id}:description`,oV=e=>`toast${e.id}:close`,gf={info:5e3,error:5e3,success:2e3,loading:1/0,DEFAULT:5e3};lV=e=>typeof e=="string"?{left:e,right:e,bottom:e,top:e}:e;({guards:pV,createMachine:fV}=ut()),{and:mV}=pV,vV=fV({props({props:e}){return y(g({dir:"ltr",id:ur()},e),{store:e.store})},initialState({prop:e}){return e("store").attrs.overlap?"overlap":"stack"},refs(){return{lastFocusedEl:null,isFocusWithin:!1,isPointerWithin:!1,ignoreMouseTimer:eo.create(),dismissableCleanup:void 0}},context({bindable:e}){return{toasts:e(()=>({defaultValue:[],sync:!0,hash:t=>t.map(n=>n.id).join(",")})),heights:e(()=>({defaultValue:[],sync:!0}))}},computed:{count:({context:e})=>e.get("toasts").length,overlap:({prop:e})=>e("store").attrs.overlap,placement:({prop:e})=>e("store").attrs.placement},effects:["subscribeToStore","trackDocumentVisibility","trackHotKeyPress"],watch({track:e,context:t,action:n}){e([()=>t.hash("toasts")],()=>{queueMicrotask(()=>{n(["collapsedIfEmpty","setDismissableBranch"])})})},exit:["clearDismissableBranch","clearLastFocusedEl","clearMouseEventTimer"],on:{"DOC.HOTKEY":{actions:["focusRegionEl"]},"REGION.BLUR":[{guard:mV("isOverlapping","isPointerOut"),target:"overlap",actions:["collapseToasts","resumeToasts","restoreFocusIfPointerOut"]},{guard:"isPointerOut",target:"stack",actions:["resumeToasts","restoreFocusIfPointerOut"]},{actions:["clearFocusWithin"]}],"TOAST.REMOVE":{actions:["removeToast","removeHeight","ignoreMouseEventsTemporarily"]},"TOAST.PAUSE":{actions:["pauseToasts"]}},states:{stack:{on:{"REGION.POINTER_LEAVE":[{guard:"isOverlapping",target:"overlap",actions:["clearPointerWithin","resumeToasts","collapseToasts"]},{actions:["clearPointerWithin","resumeToasts"]}],"REGION.OVERLAP":{target:"overlap",actions:["collapseToasts"]},"REGION.FOCUS":{actions:["setLastFocusedEl","pauseToasts"]},"REGION.POINTER_ENTER":{actions:["setPointerWithin","pauseToasts"]}}},overlap:{on:{"REGION.STACK":{target:"stack",actions:["expandToasts"]},"REGION.POINTER_ENTER":{target:"stack",actions:["setPointerWithin","pauseToasts","expandToasts"]},"REGION.FOCUS":{target:"stack",actions:["setLastFocusedEl","pauseToasts","expandToasts"]}}}},implementations:{guards:{isOverlapping:({computed:e})=>e("overlap"),isPointerOut:({refs:e})=>!e.get("isPointerWithin")},effects:{subscribeToStore({context:e,prop:t}){let n=t("store");return e.set("toasts",n.getVisibleToasts()),n.subscribe(i=>{if(i.dismiss){e.set("toasts",r=>r.filter(s=>s.id!==i.id));return}e.set("toasts",r=>{let s=r.findIndex(a=>a.id===i.id);return s!==-1?[...r.slice(0,s),g(g({},r[s]),i),...r.slice(s+1)]:[i,...r]})})},trackHotKeyPress({prop:e,send:t}){return ee(document,"keydown",i=>{let{hotkey:r}=e("store").attrs;r.every(a=>i[a]||i.code===a)&&t({type:"DOC.HOTKEY"})},{capture:!0})},trackDocumentVisibility({prop:e,send:t,scope:n}){let{pauseOnPageIdle:i}=e("store").attrs;if(!i)return;let r=n.getDoc();return ee(r,"visibilitychange",()=>{let s=r.visibilityState==="hidden";t({type:s?"PAUSE_ALL":"RESUME_ALL"})})}},actions:{setDismissableBranch({refs:e,context:t,computed:n,scope:i}){var c;let r=t.get("toasts"),s=n("placement"),a=r.length>0;if(!a){(c=e.get("dismissableCleanup"))==null||c();return}if(a&&e.get("dismissableCleanup"))return;let l=Wd(()=>cf(i,s),{defer:!0});e.set("dismissableCleanup",l)},clearDismissableBranch({refs:e}){var t;(t=e.get("dismissableCleanup"))==null||t()},focusRegionEl({scope:e,computed:t}){queueMicrotask(()=>{var n;(n=cf(e,t("placement")))==null||n.focus()})},pauseToasts({prop:e}){e("store").pause()},resumeToasts({prop:e}){e("store").resume()},expandToasts({prop:e}){e("store").expand()},collapseToasts({prop:e}){e("store").collapse()},removeToast({prop:e,event:t}){e("store").remove(t.id)},removeHeight({event:e,context:t}){(e==null?void 0:e.id)!=null&&queueMicrotask(()=>{t.set("heights",n=>n.filter(i=>i.id!==e.id))})},collapsedIfEmpty({send:e,computed:t}){!t("overlap")||t("count")>1||e({type:"REGION.OVERLAP"})},setLastFocusedEl({refs:e,event:t}){e.get("isFocusWithin")||!t.target||(e.set("isFocusWithin",!0),e.set("lastFocusedEl",t.target))},restoreFocusIfPointerOut({refs:e}){var t;!e.get("lastFocusedEl")||e.get("isPointerWithin")||((t=e.get("lastFocusedEl"))==null||t.focus({preventScroll:!0}),e.set("lastFocusedEl",null),e.set("isFocusWithin",!1))},setPointerWithin({refs:e}){e.set("isPointerWithin",!0)},clearPointerWithin({refs:e}){var t;e.set("isPointerWithin",!1),e.get("lastFocusedEl")&&!e.get("isFocusWithin")&&((t=e.get("lastFocusedEl"))==null||t.focus({preventScroll:!0}),e.set("lastFocusedEl",null))},clearFocusWithin({refs:e}){e.set("isFocusWithin",!1)},clearLastFocusedEl({refs:e}){var t;e.get("lastFocusedEl")&&((t=e.get("lastFocusedEl"))==null||t.focus({preventScroll:!0}),e.set("lastFocusedEl",null),e.set("isFocusWithin",!1))},ignoreMouseEventsTemporarily({refs:e}){e.get("ignoreMouseTimer").request()},clearMouseEventTimer({refs:e}){e.get("ignoreMouseTimer").cancel()}}}});({not:bV}=Ee()),EV={props({props:e}){return yn(e,["id","type","parent","removeDelay"],"toast"),y(g({closable:!0},e),{duration:Jl(e.duration,e.type)})},initialState({prop:e}){return e("type")==="loading"||e("duration")===1/0?"visible:persist":"visible"},context({prop:e,bindable:t}){return{remainingTime:t(()=>({defaultValue:Jl(e("duration"),e("type"))})),createdAt:t(()=>({defaultValue:Date.now()})),mounted:t(()=>({defaultValue:!1})),initialHeight:t(()=>({defaultValue:0}))}},refs(){return{closeTimerStartTime:Date.now(),lastCloseStartTimerStartTime:0}},computed:{zIndex:({prop:e})=>{let t=e("parent").context.get("toasts"),n=t.findIndex(i=>i.id===e("id"));return t.length-n},height:({prop:e})=>{var i;let n=e("parent").context.get("heights").find(r=>r.id===e("id"));return(i=n==null?void 0:n.height)!=null?i:0},heightIndex:({prop:e})=>e("parent").context.get("heights").findIndex(n=>n.id===e("id")),frontmost:({prop:e})=>e("index")===0,heightBefore:({prop:e})=>{let t=e("parent").context.get("heights"),n=t.findIndex(i=>i.id===e("id"));return t.reduce((i,r,s)=>s>=n?i:i+r.height,0)},shouldPersist:({prop:e})=>e("type")==="loading"||e("duration")===1/0},watch({track:e,prop:t,send:n}){e([()=>t("message")],()=>{let i=t("message");i&&n({type:i,src:"programmatic"})}),e([()=>t("type"),()=>t("duration")],()=>{n({type:"UPDATE"})})},on:{UPDATE:[{guard:"shouldPersist",target:"visible:persist",actions:["resetCloseTimer"]},{target:"visible:updating",actions:["resetCloseTimer"]}],MEASURE:{actions:["measureHeight"]}},entry:["setMounted","measureHeight","invokeOnVisible"],effects:["trackHeight"],states:{"visible:updating":{tags:["visible","updating"],effects:["waitForNextTick"],on:{SHOW:{target:"visible"}}},"visible:persist":{tags:["visible","paused"],on:{RESUME:{guard:bV("isLoadingType"),target:"visible",actions:["setCloseTimer"]},DISMISS:{target:"dismissing"}}},visible:{tags:["visible"],effects:["waitForDuration"],on:{DISMISS:{target:"dismissing"},PAUSE:{target:"visible:persist",actions:["syncRemainingTime"]}}},dismissing:{entry:["invokeOnDismiss"],effects:["waitForRemoveDelay"],on:{REMOVE:{target:"unmounted",actions:["notifyParentToRemove"]}}},unmounted:{entry:["invokeOnUnmount"]}},implementations:{effects:{waitForRemoveDelay({prop:e,send:t}){return mn(()=>{t({type:"REMOVE",src:"timer"})},e("removeDelay"))},waitForDuration({send:e,context:t,computed:n}){if(!n("shouldPersist"))return mn(()=>{e({type:"DISMISS",src:"timer"})},t.get("remainingTime"))},waitForNextTick({send:e}){return mn(()=>{e({type:"SHOW",src:"timer"})},0)},trackHeight({scope:e,prop:t}){let n;return H(()=>{let i=uf(e);if(!i)return;let r=()=>{let o=i.style.height;i.style.height="auto";let l=i.getBoundingClientRect().height;i.style.height=o;let c={id:t("id"),height:l};pf(t("parent"),c)},s=e.getWin(),a=new s.MutationObserver(r);a.observe(i,{childList:!0,subtree:!0,characterData:!0}),n=()=>a.disconnect()}),()=>n==null?void 0:n()}},guards:{isLoadingType:({prop:e})=>e("type")==="loading",shouldPersist:({computed:e})=>e("shouldPersist")},actions:{setMounted({context:e}){H(()=>{e.set("mounted",!0)})},measureHeight({scope:e,prop:t,context:n}){queueMicrotask(()=>{let i=uf(e);if(!i)return;let r=i.style.height;i.style.height="auto";let s=i.getBoundingClientRect().height;i.style.height=r,n.set("initialHeight",s);let a={id:t("id"),height:s};pf(t("parent"),a)})},setCloseTimer({refs:e}){e.set("closeTimerStartTime",Date.now())},resetCloseTimer({context:e,refs:t,prop:n}){t.set("closeTimerStartTime",Date.now()),e.set("remainingTime",Jl(n("duration"),n("type")))},syncRemainingTime({context:e,refs:t}){e.set("remainingTime",n=>{let i=t.get("closeTimerStartTime"),r=Date.now()-i;return t.set("lastCloseStartTimerStartTime",Date.now()),n-r})},notifyParentToRemove({prop:e}){e("parent").send({type:"TOAST.REMOVE",id:e("id")})},invokeOnDismiss({prop:e,event:t}){var n;(n=e("onStatusChange"))==null||n({status:"dismissing",src:t.src})},invokeOnUnmount({prop:e}){var t;(t=e("onStatusChange"))==null||t({status:"unmounted"})},invokeOnVisible({prop:e}){var t;(t=e("onStatusChange"))==null||t({status:"visible"})}}}};IV=(e,t)=>g(g({},t),Si(e));CV=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",ff={connect:gV,machine:vV},SV=new Map,Ql=new Map,TV=class extends K{constructor(t,n){super(t,n);Y(this,"parts");Y(this,"duration");Y(this,"destroy",()=>{this.machine.stop(),this.el.remove()});this.duration=n.duration,this.el.setAttribute("data-scope","toast"),this.el.setAttribute("data-part","root"),this.el.innerHTML=`
@@ -22,4 +22,4 @@ - `,this.parts={title:this.el.querySelector('[data-scope="toast"][data-part="title"]'),description:this.el.querySelector('[data-scope="toast"][data-part="description"]'),close:this.el.querySelector('[data-scope="toast"][data-part="close-trigger"]'),ghostBefore:this.el.querySelector('[data-scope="toast"][data-part="ghost-before"]'),ghostAfter:this.el.querySelector('[data-scope="toast"][data-part="ghost-after"]'),progressbar:this.el.querySelector('[data-scope="toast"][data-part="progressbar"]'),loadingSpinner:this.el.querySelector('[data-scope="toast"][data-part="loading-spinner"]')}}initMachine(t){return new W(EV,t)}initApi(){return yV(this.machine.service,q)}render(){var a,o;this.spreadProps(this.el,this.api.getRootProps()),this.spreadProps(this.parts.close,this.api.getCloseTriggerProps()),this.spreadProps(this.parts.ghostBefore,this.api.getGhostBeforeProps()),this.spreadProps(this.parts.ghostAfter,this.api.getGhostAfterProps()),this.parts.title.textContent!==this.api.title&&(this.parts.title.textContent=(a=this.api.title)!=null?a:""),this.parts.description.textContent!==this.api.description&&(this.parts.description.textContent=(o=this.api.description)!=null?o:""),this.spreadProps(this.parts.title,this.api.getTitleProps()),this.spreadProps(this.parts.description,this.api.getDescriptionProps());let t=this.duration,n=t==="Infinity"||t===1/0||t===Number.POSITIVE_INFINITY,i=this.el.closest('[phx-hook="Toast"]'),r=i==null?void 0:i.querySelector("[data-loading-icon-template]"),s=r==null?void 0:r.innerHTML;n?(this.parts.progressbar.style.display="none",this.parts.loadingSpinner.style.display="flex",this.el.setAttribute("data-duration-infinity","true"),s&&this.parts.loadingSpinner.innerHTML!==s&&(this.parts.loadingSpinner.innerHTML=s)):(this.parts.progressbar.style.display="block",this.parts.loadingSpinner.style.display="none",this.el.removeAttribute("data-duration-infinity"))}},OV=class extends K{constructor(t,n){var i;super(t,n);z(this,"toastComponents",new Map);z(this,"groupEl");z(this,"store");z(this,"destroy",()=>{for(let t of this.toastComponents.values())t.destroy();this.toastComponents.clear(),this.machine.stop()});this.store=n.store,this.groupEl=(i=t.querySelector('[data-part="group"]'))!=null?i:(()=>{let r=document.createElement("div");return r.setAttribute("data-scope","toast"),r.setAttribute("data-part","group"),t.appendChild(r),r})()}initMachine(t){return new W(ff.machine,t)}initApi(){return ff.connect(this.machine.service,q)}render(){this.spreadProps(this.groupEl,this.api.getGroupProps());let t=this.api.getToasts().filter(i=>typeof i.id=="string"),n=new Set(t.map(i=>i.id));t.forEach((i,r)=>{let s=this.toastComponents.get(i.id);if(s)s.duration=i.duration,s.updateProps(y(g({},i),{parent:this.machine.service,index:r}));else{let a=document.createElement("div");a.setAttribute("data-scope","toast"),a.setAttribute("data-part","root"),this.groupEl.appendChild(a),s=new TV(a,y(g({},i),{parent:this.machine.service,index:r})),s.init(),this.toastComponents.set(i.id,s)}});for(let[i,r]of this.toastComponents)n.has(i)||(r.destroy(),this.toastComponents.delete(i))}};VV={mounted(){var h;let e=this.el;e.id||(e.id=Mn(e,"toast")),this.groupId=e.id;let t=m=>{if(m)try{return m.includes("{")?JSON.parse(m):m}catch(d){return m}},n=m=>m==="Infinity"||m===1/0?1/0:typeof m=="string"?parseInt(m,10)||void 0:m,i=(h=w(e,"placement",["top-start","top","top-end","bottom-start","bottom","bottom-end"]))!=null?h:"bottom-end";wV(e,{id:this.groupId,placement:i,overlap:C(e,"overlap"),max:Y(e,"max"),gap:Y(e,"gap"),offsets:t(w(e,"offset")),pauseOnPageIdle:C(e,"pauseOnPageIdle")});let r=qr(this.groupId),s=e.getAttribute("data-flash-info"),a=e.getAttribute("data-flash-info-title"),o=e.getAttribute("data-flash-error"),l=e.getAttribute("data-flash-error-title"),c=e.getAttribute("data-flash-info-duration"),u=e.getAttribute("data-flash-error-duration");if(r&&s)try{r.create({title:a||"Success",description:s,type:"info",id:Mn(void 0,"toast"),duration:n(c!=null?c:void 0)})}catch(m){console.error("Failed to create flash info toast:",m)}if(r&&o)try{r.create({title:l||"Error",description:o,type:"error",id:Mn(void 0,"toast"),duration:n(u!=null?u:void 0)})}catch(m){console.error("Failed to create flash error toast:",m)}this.handlers=[],this.handlers.push(this.handleEvent("toast-create",m=>{let d=qr(m.groupId||this.groupId);if(d)try{d.create({title:m.title,description:m.description,type:m.type||"info",id:m.id||Mn(void 0,"toast"),duration:n(m.duration)})}catch(p){console.error("Failed to create toast:",p)}})),this.handlers.push(this.handleEvent("toast-update",m=>{let d=qr(m.groupId||this.groupId);if(d)try{d.update(m.id,{title:m.title,description:m.description,type:m.type})}catch(p){console.error("Failed to update toast:",p)}})),this.handlers.push(this.handleEvent("toast-dismiss",m=>{let d=qr(m.groupId||this.groupId);if(d)try{d.dismiss(m.id)}catch(p){console.error("Failed to dismiss toast:",p)}})),e.addEventListener("toast:create",m=>{let{detail:d}=m,p=qr(d.groupId||this.groupId);if(p)try{p.create({title:d.title,description:d.description,type:d.type||"info",id:d.id||Mn(void 0,"toast"),duration:n(d.duration)})}catch(v){console.error("Failed to create toast:",v)}})},destroyed(){if(this.handlers)for(let e of this.handlers)this.removeHandleEvent(e)}}});var Cf={};he(Cf,{ToggleGroup:()=>BV});function DV(e,t){let{context:n,send:i,prop:r,scope:s}=e,a=n.get("value"),o=r("disabled"),l=!r("multiple"),c=r("rovingFocus"),u=r("orientation")==="horizontal";function h(m){let d=AV(s,m.value);return{id:d,disabled:!!(m.disabled||o),pressed:!!a.includes(m.value),focused:n.get("focusedId")===d}}return{value:a,setValue(m){i({type:"VALUE.SET",value:m})},getRootProps(){return t.element(y(g({},bf.root.attrs),{id:ka(s),dir:r("dir"),role:l?"radiogroup":"group",tabIndex:n.get("isTabbingBackward")?-1:0,"data-disabled":E(o),"data-orientation":r("orientation"),"data-focus":E(n.get("focusedId")!=null),style:{outline:"none"},onMouseDown(){o||i({type:"ROOT.MOUSE_DOWN"})},onFocus(m){o||m.currentTarget===j(m)&&(n.get("isClickFocus")||n.get("isTabbingBackward")||i({type:"ROOT.FOCUS"}))},onBlur(m){let d=m.relatedTarget;ce(m.currentTarget,d)||o||i({type:"ROOT.BLUR"})}}))},getItemState:h,getItemProps(m){let d=h(m),p=d.focused?0:-1;return t.button(y(g({},bf.item.attrs),{id:d.id,type:"button","data-ownedby":ka(s),"data-focus":E(d.focused),disabled:d.disabled,tabIndex:c?p:void 0,role:l?"radio":void 0,"aria-checked":l?d.pressed:void 0,"aria-pressed":l?void 0:d.pressed,"data-disabled":E(d.disabled),"data-orientation":r("orientation"),dir:r("dir"),"data-state":d.pressed?"on":"off",onFocus(){d.disabled||i({type:"TOGGLE.FOCUS",id:d.id})},onClick(v){d.disabled||(i({type:"TOGGLE.CLICK",id:d.id,value:m.value}),Xe()&&v.currentTarget.focus({preventScroll:!0}))},onKeyDown(v){if(v.defaultPrevented||!ce(v.currentTarget,j(v))||d.disabled)return;let T={Tab(O){let b=O.shiftKey;i({type:"TOGGLE.SHIFT_TAB",isShiftTab:b})},ArrowLeft(){!c||!u||i({type:"TOGGLE.FOCUS_PREV"})},ArrowRight(){!c||!u||i({type:"TOGGLE.FOCUS_NEXT"})},ArrowUp(){!c||u||i({type:"TOGGLE.FOCUS_PREV"})},ArrowDown(){!c||u||i({type:"TOGGLE.FOCUS_NEXT"})},Home(){c&&i({type:"TOGGLE.FOCUS_FIRST"})},End(){c&&i({type:"TOGGLE.FOCUS_LAST"})}}[ge(v)];T&&(T(v),v.key!=="Tab"&&v.preventDefault())}}))}}}var xV,bf,ka,AV,Pf,Na,Ef,kV,NV,RV,If,LV,MV,FV,Ek,$V,Ik,HV,BV,Sf=re(()=>{"use strict";se();xV=U("toggle-group").parts("root","item"),bf=xV.build(),ka=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`toggle-group:${e.id}`},AV=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`toggle-group:${e.id}:${t}`},Pf=e=>e.getById(ka(e)),Na=e=>{let n=`[data-ownedby='${CSS.escape(ka(e))}']:not([data-disabled])`;return Fe(Pf(e),n)},Ef=e=>lt(Na(e)),kV=e=>mt(Na(e)),NV=(e,t,n)=>yi(Na(e),t,n),RV=(e,t,n)=>bi(Na(e),t,n);({not:If,and:LV}=Ee()),MV={props({props:e}){return g({defaultValue:[],orientation:"horizontal",rovingFocus:!0,loopFocus:!0,deselectable:!0},e)},initialState(){return"idle"},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var i;(i=e("onValueChange"))==null||i({value:n})}})),focusedId:t(()=>({defaultValue:null})),isTabbingBackward:t(()=>({defaultValue:!1})),isClickFocus:t(()=>({defaultValue:!1})),isWithinToolbar:t(()=>({defaultValue:!1}))}},computed:{currentLoopFocus:({context:e,prop:t})=>t("loopFocus")&&!e.get("isWithinToolbar")},entry:["checkIfWithinToolbar"],on:{"VALUE.SET":{actions:["setValue"]},"TOGGLE.CLICK":{actions:["setValue"]},"ROOT.MOUSE_DOWN":{actions:["setClickFocus"]}},states:{idle:{on:{"ROOT.FOCUS":{target:"focused",guard:If(LV("isClickFocus","isTabbingBackward")),actions:["focusFirstToggle","clearClickFocus"]},"TOGGLE.FOCUS":{target:"focused",actions:["setFocusedId"]}}},focused:{on:{"ROOT.BLUR":{target:"idle",actions:["clearIsTabbingBackward","clearFocusedId","clearClickFocus"]},"TOGGLE.FOCUS":{actions:["setFocusedId"]},"TOGGLE.FOCUS_NEXT":{actions:["focusNextToggle"]},"TOGGLE.FOCUS_PREV":{actions:["focusPrevToggle"]},"TOGGLE.FOCUS_FIRST":{actions:["focusFirstToggle"]},"TOGGLE.FOCUS_LAST":{actions:["focusLastToggle"]},"TOGGLE.SHIFT_TAB":[{guard:If("isFirstToggleFocused"),target:"idle",actions:["setIsTabbingBackward"]},{actions:["setIsTabbingBackward"]}]}}},implementations:{guards:{isClickFocus:({context:e})=>e.get("isClickFocus"),isTabbingBackward:({context:e})=>e.get("isTabbingBackward"),isFirstToggleFocused:({context:e,scope:t})=>{var n;return e.get("focusedId")===((n=Ef(t))==null?void 0:n.id)}},actions:{setIsTabbingBackward({context:e}){e.set("isTabbingBackward",!0)},clearIsTabbingBackward({context:e}){e.set("isTabbingBackward",!1)},setClickFocus({context:e}){e.set("isClickFocus",!0)},clearClickFocus({context:e}){e.set("isClickFocus",!1)},checkIfWithinToolbar({context:e,scope:t}){var i;let n=(i=Pf(t))==null?void 0:i.closest("[role=toolbar]");e.set("isWithinToolbar",!!n)},setFocusedId({context:e,event:t}){e.set("focusedId",t.id)},clearFocusedId({context:e}){e.set("focusedId",null)},setValue({context:e,event:t,prop:n}){yn(t,["value"]);let i=e.get("value");pn(t.value)?i=t.value:n("multiple")?i=yt(i,t.value):i=fe(i,[t.value])&&n("deselectable")?[]:[t.value],e.set("value",i)},focusNextToggle({context:e,scope:t,prop:n}){H(()=>{var r;let i=e.get("focusedId");i&&((r=NV(t,i,n("loopFocus")))==null||r.focus({preventScroll:!0}))})},focusPrevToggle({context:e,scope:t,prop:n}){H(()=>{var r;let i=e.get("focusedId");i&&((r=RV(t,i,n("loopFocus")))==null||r.focus({preventScroll:!0}))})},focusFirstToggle({scope:e}){H(()=>{var t;(t=Ef(e))==null||t.focus({preventScroll:!0})})},focusLastToggle({scope:e}){H(()=>{var t;(t=kV(e))==null||t.focus({preventScroll:!0})})}}}},FV=_()(["dir","disabled","getRootNode","id","ids","loopFocus","multiple","onValueChange","orientation","rovingFocus","value","defaultValue","deselectable"]),Ek=B(FV),$V=_()(["value","disabled"]),Ik=B($V),HV=class extends K{initMachine(e){return new W(MV,e)}initApi(){return DV(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="toggle-group"][data-part="root"]');if(!e)return;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelectorAll('[data-scope="toggle-group"][data-part="item"]');for(let n=0;n{let s=w(e,"onValueChange");s&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&t(s,{value:r.value,id:e.id});let a=w(e,"onValueChangeClient");a&&e.dispatchEvent(new CustomEvent(a,{bubbles:!0,detail:{value:r.value,id:e.id}}))}}),i=new HV(e,n);i.init(),this.toggleGroup=i,this.onSetValue=r=>{let{value:s}=r.detail;i.api.setValue(s)},e.addEventListener("phx:toggle-group:set-value",this.onSetValue),this.handlers=[],this.handlers.push(this.handleEvent("toggle-group_set_value",r=>{let s=r.id;s&&s!==e.id||i.api.setValue(r.value)})),this.handlers.push(this.handleEvent("toggle-group:value",()=>{this.pushEvent("toggle-group:value_response",{value:i.api.value})}))},updated(){var e;(e=this.toggleGroup)==null||e.updateProps(y(g({},C(this.el,"controlled")?{value:Q(this.el,"value")}:{defaultValue:Q(this.el,"defaultValue")}),{deselectable:C(this.el,"deselectable"),loopFocus:C(this.el,"loopFocus"),rovingFocus:C(this.el,"rovingFocus"),disabled:C(this.el,"disabled"),multiple:C(this.el,"multiple"),orientation:w(this.el,"orientation",["horizontal","vertical"]),dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(this.onSetValue&&this.el.removeEventListener("phx:toggle-group:set-value",this.onSetValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.toggleGroup)==null||e.destroy()}}});var xf={};he(xf,{TreeView:()=>ZV});function Vf(e,t,n){let i=e.getNodeValue(t);if(!e.isBranchNode(t))return n.includes(i);let r=e.getDescendantValues(i),s=r.every(o=>n.includes(o)),a=r.some(o=>n.includes(o));return s?!0:a?"indeterminate":!1}function UV(e,t,n){let i=e.getDescendantValues(t),r=i.every(s=>n.includes(s));return vt(r?ct(n,...i):Ze(n,...i))}function qV(e,t){let n=new Map;return e.visit({onEnter:i=>{let r=e.getNodeValue(i),s=e.isBranchNode(i),a=Vf(e,i,t);n.set(r,{type:s?"branch":"leaf",checked:a})}}),n}function WV(e,t){let{context:n,scope:i,computed:r,prop:s,send:a}=e,o=s("collection"),l=Array.from(n.get("expandedValue")),c=Array.from(n.get("selectedValue")),u=Array.from(n.get("checkedValue")),h=r("isTypingAhead"),m=n.get("focusedValue"),d=n.get("loadingStatus"),p=n.get("renamingValue"),v=({indexPath:b})=>o.getValuePath(b).slice(0,-1).some(S=>!l.includes(S)),I=o.getFirstNode(void 0,{skip:v}),T=I?o.getNodeValue(I):null;function O(b){let{node:f,indexPath:S}=b,P=o.getNodeValue(f);return{id:nc(i,P),value:P,indexPath:S,valuePath:o.getValuePath(S),disabled:!!f.disabled,focused:m==null?T===P:m===P,selected:c.includes(P),expanded:l.includes(P),loading:d[P]==="loading",depth:S.length,isBranch:o.isBranchNode(f),renaming:p===P,get checked(){return Vf(o,f,u)}}}return{collection:o,expandedValue:l,selectedValue:c,checkedValue:u,toggleChecked(b,f){a({type:"CHECKED.TOGGLE",value:b,isBranch:f})},setChecked(b){a({type:"CHECKED.SET",value:b})},clearChecked(){a({type:"CHECKED.CLEAR"})},getCheckedMap(){return qV(o,u)},expand(b){a({type:b?"BRANCH.EXPAND":"EXPANDED.ALL",value:b})},collapse(b){a({type:b?"BRANCH.COLLAPSE":"EXPANDED.CLEAR",value:b})},deselect(b){a({type:b?"NODE.DESELECT":"SELECTED.CLEAR",value:b})},select(b){a({type:b?"NODE.SELECT":"SELECTED.ALL",value:b,isTrusted:!1})},getVisibleNodes(){return r("visibleNodes")},focus(b){ke(i,b)},selectParent(b){let f=o.getParentNode(b);if(!f)return;let S=Ze(c,o.getNodeValue(f));a({type:"SELECTED.SET",value:S,src:"select.parent"})},expandParent(b){let f=o.getParentNode(b);if(!f)return;let S=Ze(l,o.getNodeValue(f));a({type:"EXPANDED.SET",value:S,src:"expand.parent"})},setExpandedValue(b){let f=vt(b);a({type:"EXPANDED.SET",value:f})},setSelectedValue(b){let f=vt(b);a({type:"SELECTED.SET",value:f})},startRenaming(b){a({type:"NODE.RENAME",value:b})},submitRenaming(b,f){a({type:"RENAME.SUBMIT",value:b,label:f})},cancelRenaming(){a({type:"RENAME.CANCEL"})},getRootProps(){return t.element(y(g({},Ge.root.attrs),{id:GV(i),dir:s("dir")}))},getLabelProps(){return t.element(y(g({},Ge.label.attrs),{id:Tf(i),dir:s("dir")}))},getTreeProps(){return t.element(y(g({},Ge.tree.attrs),{id:ec(i),dir:s("dir"),role:"tree","aria-label":"Tree View","aria-labelledby":Tf(i),"aria-multiselectable":s("selectionMode")==="multiple"||void 0,tabIndex:-1,onKeyDown(b){if(b.defaultPrevented||Re(b))return;let f=j(b);if(Ot(f))return;let S=f==null?void 0:f.closest("[data-part=branch-control], [data-part=item]");if(!S)return;let P=S.dataset.value;if(P==null){console.warn("[zag-js/tree-view] Node id not found for node",S);return}let V=S.matches("[data-part=branch-control]"),A={ArrowDown(N){xe(N)||(N.preventDefault(),a({type:"NODE.ARROW_DOWN",id:P,shiftKey:N.shiftKey}))},ArrowUp(N){xe(N)||(N.preventDefault(),a({type:"NODE.ARROW_UP",id:P,shiftKey:N.shiftKey}))},ArrowLeft(N){xe(N)||S.dataset.disabled||(N.preventDefault(),a({type:V?"BRANCH_NODE.ARROW_LEFT":"NODE.ARROW_LEFT",id:P}))},ArrowRight(N){!V||S.dataset.disabled||(N.preventDefault(),a({type:"BRANCH_NODE.ARROW_RIGHT",id:P}))},Home(N){xe(N)||(N.preventDefault(),a({type:"NODE.HOME",id:P,shiftKey:N.shiftKey}))},End(N){xe(N)||(N.preventDefault(),a({type:"NODE.END",id:P,shiftKey:N.shiftKey}))},Space(N){var D;S.dataset.disabled||(h?a({type:"TREE.TYPEAHEAD",key:N.key}):(D=A.Enter)==null||D.call(A,N))},Enter(N){S.dataset.disabled||st(f)&&xe(N)||(a({type:V?"BRANCH_NODE.CLICK":"NODE.CLICK",id:P,src:"keyboard"}),st(f)||N.preventDefault())},"*"(N){S.dataset.disabled||(N.preventDefault(),a({type:"SIBLINGS.EXPAND",id:P}))},a(N){!N.metaKey||S.dataset.disabled||(N.preventDefault(),a({type:"SELECTED.ALL",moveFocus:!0}))},F2(N){if(S.dataset.disabled)return;let D=s("canRename");if(!D)return;let $=o.getIndexPath(P);if($){let te=o.at($);if(te&&!D(te,$))return}N.preventDefault(),a({type:"NODE.RENAME",value:P})}},x=ge(b,{dir:s("dir")}),k=A[x];if(k){k(b);return}Ue.isValidEvent(b)&&(a({type:"TREE.TYPEAHEAD",key:b.key,id:P}),b.preventDefault())}}))},getNodeState:O,getItemProps(b){let f=O(b);return t.element(y(g({},Ge.item.attrs),{id:f.id,dir:s("dir"),"data-ownedby":ec(i),"data-path":b.indexPath.join("/"),"data-value":f.value,tabIndex:f.focused?0:-1,"data-focus":E(f.focused),role:"treeitem","aria-current":f.selected?"true":void 0,"aria-selected":f.disabled?void 0:f.selected,"data-selected":E(f.selected),"aria-disabled":X(f.disabled),"data-disabled":E(f.disabled),"data-renaming":E(f.renaming),"aria-level":f.depth,"data-depth":f.depth,style:{"--depth":f.depth},onFocus(S){S.stopPropagation(),a({type:"NODE.FOCUS",id:f.value})},onClick(S){if(f.disabled||!pe(S)||st(S.currentTarget)&&xe(S))return;let P=S.metaKey||S.ctrlKey;a({type:"NODE.CLICK",id:f.value,shiftKey:S.shiftKey,ctrlKey:P}),S.stopPropagation(),st(S.currentTarget)||S.preventDefault()}}))},getItemTextProps(b){let f=O(b);return t.element(y(g({},Ge.itemText.attrs),{"data-disabled":E(f.disabled),"data-selected":E(f.selected),"data-focus":E(f.focused)}))},getItemIndicatorProps(b){let f=O(b);return t.element(y(g({},Ge.itemIndicator.attrs),{"aria-hidden":!0,"data-disabled":E(f.disabled),"data-selected":E(f.selected),"data-focus":E(f.focused),hidden:!f.selected}))},getBranchProps(b){let f=O(b);return t.element(y(g({},Ge.branch.attrs),{"data-depth":f.depth,dir:s("dir"),"data-branch":f.value,role:"treeitem","data-ownedby":ec(i),"data-value":f.value,"aria-level":f.depth,"aria-selected":f.disabled?void 0:f.selected,"data-path":b.indexPath.join("/"),"data-selected":E(f.selected),"aria-expanded":f.expanded,"data-state":f.expanded?"open":"closed","aria-disabled":X(f.disabled),"data-disabled":E(f.disabled),"data-loading":E(f.loading),"aria-busy":X(f.loading),style:{"--depth":f.depth}}))},getBranchIndicatorProps(b){let f=O(b);return t.element(y(g({},Ge.branchIndicator.attrs),{"aria-hidden":!0,"data-state":f.expanded?"open":"closed","data-disabled":E(f.disabled),"data-selected":E(f.selected),"data-focus":E(f.focused),"data-loading":E(f.loading)}))},getBranchTriggerProps(b){let f=O(b);return t.element(y(g({},Ge.branchTrigger.attrs),{role:"button",dir:s("dir"),"data-disabled":E(f.disabled),"data-state":f.expanded?"open":"closed","data-value":f.value,"data-loading":E(f.loading),disabled:f.loading,onClick(S){f.disabled||f.loading||(a({type:"BRANCH_TOGGLE.CLICK",id:f.value}),S.stopPropagation())}}))},getBranchControlProps(b){let f=O(b);return t.element(y(g({},Ge.branchControl.attrs),{role:"button",id:f.id,dir:s("dir"),tabIndex:f.focused?0:-1,"data-path":b.indexPath.join("/"),"data-state":f.expanded?"open":"closed","data-disabled":E(f.disabled),"data-selected":E(f.selected),"data-focus":E(f.focused),"data-renaming":E(f.renaming),"data-value":f.value,"data-depth":f.depth,"data-loading":E(f.loading),"aria-busy":X(f.loading),onFocus(S){a({type:"NODE.FOCUS",id:f.value}),S.stopPropagation()},onClick(S){if(f.disabled||f.loading||!pe(S)||st(S.currentTarget)&&xe(S))return;let P=S.metaKey||S.ctrlKey;a({type:"BRANCH_NODE.CLICK",id:f.value,shiftKey:S.shiftKey,ctrlKey:P}),S.stopPropagation()}}))},getBranchTextProps(b){let f=O(b);return t.element(y(g({},Ge.branchText.attrs),{dir:s("dir"),"data-disabled":E(f.disabled),"data-state":f.expanded?"open":"closed","data-loading":E(f.loading)}))},getBranchContentProps(b){let f=O(b);return t.element(y(g({},Ge.branchContent.attrs),{role:"group",dir:s("dir"),"data-state":f.expanded?"open":"closed","data-depth":f.depth,"data-path":b.indexPath.join("/"),"data-value":f.value,hidden:!f.expanded}))},getBranchIndentGuideProps(b){let f=O(b);return t.element(y(g({},Ge.branchIndentGuide.attrs),{"data-depth":f.depth}))},getNodeCheckboxProps(b){let f=O(b),S=f.checked;return t.element(y(g({},Ge.nodeCheckbox.attrs),{tabIndex:-1,role:"checkbox","data-state":S===!0?"checked":S===!1?"unchecked":"indeterminate","aria-checked":S===!0?"true":S===!1?"false":"mixed","data-disabled":E(f.disabled),onClick(P){if(P.defaultPrevented||f.disabled||!pe(P))return;a({type:"CHECKED.TOGGLE",value:f.value,isBranch:f.isBranch}),P.stopPropagation();let V=P.currentTarget.closest("[role=treeitem]");V==null||V.focus({preventScroll:!0})}}))},getNodeRenameInputProps(b){let f=O(b);return t.input(y(g({},Ge.nodeRenameInput.attrs),{id:wf(i,f.value),type:"text","aria-label":"Rename tree item",hidden:!f.renaming,onKeyDown(S){Re(S)||(S.key==="Escape"&&(a({type:"RENAME.CANCEL"}),S.preventDefault()),S.key==="Enter"&&(a({type:"RENAME.SUBMIT",label:S.currentTarget.value}),S.preventDefault()),S.stopPropagation())},onBlur(S){a({type:"RENAME.SUBMIT",label:S.currentTarget.value})}}))}}}function Ra(e,t){let{context:n,prop:i,refs:r}=e;if(!i("loadChildren")){n.set("expandedValue",v=>vt(Ze(v,...t)));return}let s=n.get("loadingStatus"),[a,o]=oo(t,v=>s[v]==="loaded");if(a.length>0&&n.set("expandedValue",v=>vt(Ze(v,...a))),o.length===0)return;let l=i("collection"),[c,u]=oo(o,v=>{let I=l.findNode(v);return l.getNodeChildren(I).length>0});if(c.length>0&&n.set("expandedValue",v=>vt(Ze(v,...c))),u.length===0)return;n.set("loadingStatus",v=>g(g({},v),u.reduce((I,T)=>y(g({},I),{[T]:"loading"}),{})));let h=u.map(v=>{let I=l.getIndexPath(v),T=l.getValuePath(I),O=l.findNode(v);return{id:v,indexPath:I,valuePath:T,node:O}}),m=r.get("pendingAborts"),d=i("loadChildren");vn(d,()=>"[zag-js/tree-view] `loadChildren` is required for async expansion");let p=h.map(({id:v,indexPath:I,valuePath:T,node:O})=>{let b=m.get(v);b&&(b.abort(),m.delete(v));let f=new AbortController;return m.set(v,f),d({valuePath:T,indexPath:I,node:O,signal:f.signal})});Promise.allSettled(p).then(v=>{var f,S;let I=[],T=[],O=n.get("loadingStatus"),b=i("collection");v.forEach((P,V)=>{let{id:A,indexPath:x,node:k,valuePath:N}=h[V];P.status==="fulfilled"?(O[A]="loaded",I.push(A),b=b.replace(x,y(g({},k),{children:P.value}))):(m.delete(A),Reflect.deleteProperty(O,A),T.push({node:k,error:P.reason,indexPath:x,valuePath:N}))}),n.set("loadingStatus",O),I.length&&(n.set("expandedValue",P=>vt(Ze(P,...I))),(f=i("onLoadChildrenComplete"))==null||f({collection:b})),T.length&&((S=i("onLoadChildrenError"))==null||S({nodes:T}))})}function _t(e){let{prop:t,context:n}=e;return function({indexPath:r}){return t("collection").getValuePath(r).slice(0,-1).some(a=>!n.get("expandedValue").includes(a))}}function oi(e,t){let{prop:n,scope:i,computed:r}=e,s=n("scrollToIndexFn");if(!s)return!1;let a=n("collection"),o=r("visibleNodes");for(let l=0;li.getById(nc(i,t))}),!0}return!1}function jV(e){var s;let n=e.querySelectorAll('[data-scope="tree-view"][data-part="branch"], [data-scope="tree-view"][data-part="item"]'),i=[];for(let a of n){let o=a.getAttribute("data-path"),l=a.getAttribute("data-value");if(o==null||l==null)continue;let c=o.split("/").map(m=>parseInt(m,10));if(c.some(Number.isNaN))continue;let u=(s=a.getAttribute("data-name"))!=null?s:l,h=a.getAttribute("data-part")==="branch";i.push({pathArr:c,id:l,name:u,isBranch:h})}i.sort((a,o)=>{let l=Math.min(a.pathArr.length,o.pathArr.length);for(let c=0;c{"use strict";yr();se();_V=U("tree-view").parts("branch","branchContent","branchControl","branchIndentGuide","branchIndicator","branchText","branchTrigger","item","itemIndicator","itemText","label","nodeCheckbox","nodeRenameInput","root","tree"),Ge=_V.build(),tc=e=>new Ao(e);tc.empty=()=>new Ao({rootNode:{children:[]}});GV=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`tree:${e.id}:root`},Tf=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`tree:${e.id}:label`},nc=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.node)==null?void 0:i.call(n,t))!=null?r:`tree:${e.id}:node:${t}`},ec=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.tree)!=null?n:`tree:${e.id}:tree`},ke=(e,t)=>{var n;t!=null&&((n=e.getById(nc(e,t)))==null||n.focus())},wf=(e,t)=>`tree:${e.id}:rename-input:${t}`,Of=(e,t)=>e.getById(wf(e,t));({and:Gt}=Ee()),KV={props({props:e}){return g({selectionMode:"single",collection:tc.empty(),typeahead:!0,expandOnClick:!0,defaultExpandedValue:[],defaultSelectedValue:[]},e)},initialState(){return"idle"},context({prop:e,bindable:t,getContext:n}){return{expandedValue:t(()=>({defaultValue:e("defaultExpandedValue"),value:e("expandedValue"),isEqual:fe,onChange(i){var a;let s=n().get("focusedValue");(a=e("onExpandedChange"))==null||a({expandedValue:i,focusedValue:s,get expandedNodes(){return e("collection").findNodes(i)}})}})),selectedValue:t(()=>({defaultValue:e("defaultSelectedValue"),value:e("selectedValue"),isEqual:fe,onChange(i){var a;let s=n().get("focusedValue");(a=e("onSelectionChange"))==null||a({selectedValue:i,focusedValue:s,get selectedNodes(){return e("collection").findNodes(i)}})}})),focusedValue:t(()=>({defaultValue:e("defaultFocusedValue")||null,value:e("focusedValue"),onChange(i){var r;(r=e("onFocusChange"))==null||r({focusedValue:i,get focusedNode(){return i?e("collection").findNode(i):null}})}})),loadingStatus:t(()=>({defaultValue:{}})),checkedValue:t(()=>({defaultValue:e("defaultCheckedValue")||[],value:e("checkedValue"),isEqual:fe,onChange(i){var r;(r=e("onCheckedChange"))==null||r({checkedValue:i})}})),renamingValue:t(()=>({sync:!0,defaultValue:null}))}},refs(){return{typeaheadState:g({},Ue.defaultOptions),pendingAborts:new Map}},computed:{isMultipleSelection:({prop:e})=>e("selectionMode")==="multiple",isTypingAhead:({refs:e})=>e.get("typeaheadState").keysSoFar.length>0,visibleNodes:({prop:e,context:t})=>{let n=[];return e("collection").visit({skip:_t({prop:e,context:t}),onEnter:(i,r)=>{n.push({node:i,indexPath:r})}}),n}},on:{"EXPANDED.SET":{actions:["setExpanded"]},"EXPANDED.CLEAR":{actions:["clearExpanded"]},"EXPANDED.ALL":{actions:["expandAllBranches"]},"BRANCH.EXPAND":{actions:["expandBranches"]},"BRANCH.COLLAPSE":{actions:["collapseBranches"]},"SELECTED.SET":{actions:["setSelected"]},"SELECTED.ALL":[{guard:Gt("isMultipleSelection","moveFocus"),actions:["selectAllNodes","focusTreeLastNode"]},{guard:"isMultipleSelection",actions:["selectAllNodes"]}],"SELECTED.CLEAR":{actions:["clearSelected"]},"NODE.SELECT":{actions:["selectNode"]},"NODE.DESELECT":{actions:["deselectNode"]},"CHECKED.TOGGLE":{actions:["toggleChecked"]},"CHECKED.SET":{actions:["setChecked"]},"CHECKED.CLEAR":{actions:["clearChecked"]},"NODE.FOCUS":{actions:["setFocusedNode"]},"NODE.ARROW_DOWN":[{guard:Gt("isShiftKey","isMultipleSelection"),actions:["focusTreeNextNode","extendSelectionToNextNode"]},{actions:["focusTreeNextNode"]}],"NODE.ARROW_UP":[{guard:Gt("isShiftKey","isMultipleSelection"),actions:["focusTreePrevNode","extendSelectionToPrevNode"]},{actions:["focusTreePrevNode"]}],"NODE.ARROW_LEFT":{actions:["focusBranchNode"]},"BRANCH_NODE.ARROW_LEFT":[{guard:"isBranchExpanded",actions:["collapseBranch"]},{actions:["focusBranchNode"]}],"BRANCH_NODE.ARROW_RIGHT":[{guard:Gt("isBranchFocused","isBranchExpanded"),actions:["focusBranchFirstNode"]},{actions:["expandBranch"]}],"SIBLINGS.EXPAND":{actions:["expandSiblingBranches"]},"NODE.HOME":[{guard:Gt("isShiftKey","isMultipleSelection"),actions:["extendSelectionToFirstNode","focusTreeFirstNode"]},{actions:["focusTreeFirstNode"]}],"NODE.END":[{guard:Gt("isShiftKey","isMultipleSelection"),actions:["extendSelectionToLastNode","focusTreeLastNode"]},{actions:["focusTreeLastNode"]}],"NODE.CLICK":[{guard:Gt("isCtrlKey","isMultipleSelection"),actions:["toggleNodeSelection"]},{guard:Gt("isShiftKey","isMultipleSelection"),actions:["extendSelectionToNode"]},{actions:["selectNode"]}],"BRANCH_NODE.CLICK":[{guard:Gt("isCtrlKey","isMultipleSelection"),actions:["toggleNodeSelection"]},{guard:Gt("isShiftKey","isMultipleSelection"),actions:["extendSelectionToNode"]},{guard:"expandOnClick",actions:["selectNode","toggleBranchNode"]},{actions:["selectNode"]}],"BRANCH_TOGGLE.CLICK":{actions:["toggleBranchNode"]},"TREE.TYPEAHEAD":{actions:["focusMatchedNode"]}},exit:["clearPendingAborts"],states:{idle:{on:{"NODE.RENAME":{target:"renaming",actions:["setRenamingValue"]}}},renaming:{entry:["syncRenameInput","focusRenameInput"],on:{"RENAME.SUBMIT":{guard:"isRenameLabelValid",target:"idle",actions:["submitRenaming"]},"RENAME.CANCEL":{target:"idle",actions:["cancelRenaming"]}}}},implementations:{guards:{isBranchFocused:({context:e,event:t})=>e.get("focusedValue")===t.id,isBranchExpanded:({context:e,event:t})=>e.get("expandedValue").includes(t.id),isShiftKey:({event:e})=>e.shiftKey,isCtrlKey:({event:e})=>e.ctrlKey,hasSelectedItems:({context:e})=>e.get("selectedValue").length>0,isMultipleSelection:({prop:e})=>e("selectionMode")==="multiple",moveFocus:({event:e})=>!!e.moveFocus,expandOnClick:({prop:e})=>!!e("expandOnClick"),isRenameLabelValid:({event:e})=>e.label.trim()!==""},actions:{selectNode({context:e,event:t}){let n=t.id||t.value;e.set("selectedValue",i=>n==null?i:!t.isTrusted&&pn(n)?i.concat(...n):[pn(n)?mt(n):n].filter(Boolean))},deselectNode({context:e,event:t}){let n=or(t.id||t.value);e.set("selectedValue",i=>ct(i,...n))},setFocusedNode({context:e,event:t}){e.set("focusedValue",t.id)},clearFocusedNode({context:e}){e.set("focusedValue",null)},clearSelectedItem({context:e}){e.set("selectedValue",[])},toggleBranchNode({context:e,event:t,action:n}){let i=e.get("expandedValue").includes(t.id);n(i?["collapseBranch"]:["expandBranch"])},expandBranch(e){let{event:t}=e;Ra(e,[t.id])},expandBranches(e){let{context:t,event:n}=e,i=or(n.value);Ra(e,fs(i,t.get("expandedValue")))},collapseBranch({context:e,event:t}){e.set("expandedValue",n=>ct(n,t.id))},collapseBranches(e){let{context:t,event:n}=e,i=or(n.value);t.set("expandedValue",r=>ct(r,...i))},setExpanded({context:e,event:t}){pn(t.value)&&e.set("expandedValue",t.value)},clearExpanded({context:e}){e.set("expandedValue",[])},setSelected({context:e,event:t}){pn(t.value)&&e.set("selectedValue",t.value)},clearSelected({context:e}){e.set("selectedValue",[])},focusTreeFirstNode(e){let{prop:t,scope:n}=e,i=t("collection"),r=i.getFirstNode(void 0,{skip:_t(e)});if(!r)return;let s=i.getNodeValue(r);oi(e,s)?H(()=>ke(n,s)):ke(n,s)},focusTreeLastNode(e){let{prop:t,scope:n}=e,i=t("collection"),r=i.getLastNode(void 0,{skip:_t(e)}),s=i.getNodeValue(r);oi(e,s)?H(()=>ke(n,s)):ke(n,s)},focusBranchFirstNode(e){let{event:t,prop:n,scope:i}=e,r=n("collection"),s=r.findNode(t.id),a=r.getFirstNode(s,{skip:_t(e)});if(!a)return;let o=r.getNodeValue(a);oi(e,o)?H(()=>ke(i,o)):ke(i,o)},focusTreeNextNode(e){let{event:t,prop:n,scope:i}=e,r=n("collection"),s=r.getNextNode(t.id,{skip:_t(e)});if(!s)return;let a=r.getNodeValue(s);oi(e,a)?H(()=>ke(i,a)):ke(i,a)},focusTreePrevNode(e){let{event:t,prop:n,scope:i}=e,r=n("collection"),s=r.getPreviousNode(t.id,{skip:_t(e)});if(!s)return;let a=r.getNodeValue(s);oi(e,a)?H(()=>ke(i,a)):ke(i,a)},focusBranchNode(e){let{event:t,prop:n,scope:i}=e,r=n("collection"),s=r.getParentNode(t.id),a=s?r.getNodeValue(s):void 0;if(!a)return;oi(e,a)?H(()=>ke(i,a)):ke(i,a)},selectAllNodes({context:e,prop:t}){e.set("selectedValue",t("collection").getValues())},focusMatchedNode(e){let{context:t,prop:n,refs:i,event:r,scope:s,computed:a}=e,l=a("visibleNodes").map(({node:h})=>({textContent:n("collection").stringifyNode(h),id:n("collection").getNodeValue(h)})),c=Ue(l,{state:i.get("typeaheadState"),activeId:t.get("focusedValue"),key:r.key});if(!(c!=null&&c.id))return;oi(e,c.id)?H(()=>ke(s,c.id)):ke(s,c.id)},toggleNodeSelection({context:e,event:t}){let n=yt(e.get("selectedValue"),t.id);e.set("selectedValue",n)},expandAllBranches(e){let{context:t,prop:n}=e,i=n("collection").getBranchValues(),r=fs(i,t.get("expandedValue"));Ra(e,r)},expandSiblingBranches(e){let{context:t,event:n,prop:i}=e,r=i("collection"),s=r.getIndexPath(n.id);if(!s)return;let o=r.getSiblingNodes(s).map(c=>r.getNodeValue(c)),l=fs(o,t.get("expandedValue"));Ra(e,l)},extendSelectionToNode(e){let{context:t,event:n,prop:i,computed:r}=e,s=i("collection"),a=lt(t.get("selectedValue"))||s.getNodeValue(s.getFirstNode()),o=n.id,l=[a,o],c=0;r("visibleNodes").forEach(({node:h})=>{let m=s.getNodeValue(h);c===1&&l.push(m),(m===a||m===o)&&c++}),t.set("selectedValue",vt(l))},extendSelectionToNextNode(e){let{context:t,event:n,prop:i}=e,r=i("collection"),s=r.getNextNode(n.id,{skip:_t(e)});if(!s)return;let a=new Set(t.get("selectedValue")),o=r.getNodeValue(s);o!=null&&(a.has(n.id)&&a.has(o)?a.delete(n.id):a.has(o)||a.add(o),t.set("selectedValue",Array.from(a)))},extendSelectionToPrevNode(e){let{context:t,event:n,prop:i}=e,r=i("collection"),s=r.getPreviousNode(n.id,{skip:_t(e)});if(!s)return;let a=new Set(t.get("selectedValue")),o=r.getNodeValue(s);o!=null&&(a.has(n.id)&&a.has(o)?a.delete(n.id):a.has(o)||a.add(o),t.set("selectedValue",Array.from(a)))},extendSelectionToFirstNode(e){let{context:t,prop:n}=e,i=n("collection"),r=lt(t.get("selectedValue")),s=[];i.visit({skip:_t(e),onEnter:a=>{let o=i.getNodeValue(a);if(s.push(o),o===r)return"stop"}}),t.set("selectedValue",s)},extendSelectionToLastNode(e){let{context:t,prop:n}=e,i=n("collection"),r=lt(t.get("selectedValue")),s=[],a=!1;i.visit({skip:_t(e),onEnter:o=>{let l=i.getNodeValue(o);l===r&&(a=!0),a&&s.push(l)}}),t.set("selectedValue",s)},clearPendingAborts({refs:e}){let t=e.get("pendingAborts");t.forEach(n=>n.abort()),t.clear()},toggleChecked({context:e,event:t,prop:n}){let i=n("collection");e.set("checkedValue",r=>t.isBranch?UV(i,t.value,r):yt(r,t.value))},setChecked({context:e,event:t}){e.set("checkedValue",t.value)},clearChecked({context:e}){e.set("checkedValue",[])},setRenamingValue({context:e,event:t,prop:n}){e.set("renamingValue",t.value);let i=n("onRenameStart");if(i){let r=n("collection"),s=r.getIndexPath(t.value);if(s){let a=r.at(s);a&&i({value:t.value,node:a,indexPath:s})}}},submitRenaming({context:e,event:t,prop:n,scope:i}){var c;let r=e.get("renamingValue");if(!r)return;let a=n("collection").getIndexPath(r);if(!a)return;let o=t.label.trim(),l=n("onBeforeRename");if(l&&!l({value:r,label:o,indexPath:a})){e.set("renamingValue",null),ke(i,r);return}(c=n("onRenameComplete"))==null||c({value:r,label:o,indexPath:a}),e.set("renamingValue",null),ke(i,r)},cancelRenaming({context:e,scope:t}){let n=e.get("renamingValue");e.set("renamingValue",null),n&&ke(t,n)},syncRenameInput({context:e,scope:t,prop:n}){let i=e.get("renamingValue");if(!i)return;let r=n("collection"),s=r.findNode(i);if(!s)return;let a=r.stringifyNode(s),o=Of(t,i);Me(o,a)},focusRenameInput({context:e,scope:t}){let n=e.get("renamingValue");if(!n)return;let i=Of(t,n);i&&(i.focus(),i.select())}}}};zV=_()(["ids","collection","dir","expandedValue","expandOnClick","defaultFocusedValue","focusedValue","getRootNode","id","onExpandedChange","onFocusChange","onSelectionChange","checkedValue","selectedValue","selectionMode","typeahead","defaultExpandedValue","defaultSelectedValue","defaultCheckedValue","onCheckedChange","onLoadChildrenComplete","onLoadChildrenError","loadChildren","canRename","onRenameStart","onBeforeRename","onRenameComplete","scrollToIndexFn"]),Ok=B(zV),YV=_()(["node","indexPath"]),wk=B(YV);XV=class extends K{constructor(t,n){var s;let i=(s=n.treeData)!=null?s:jV(t),r=tc({nodeToValue:a=>a.id,nodeToString:a=>a.name,rootNode:i});super(t,y(g({},n),{collection:r}));z(this,"treeCollection");z(this,"syncTree",()=>{let t=this.el.querySelector('[data-scope="tree-view"][data-part="tree"]');t&&(this.spreadProps(t,this.api.getTreeProps()),this.updateExistingTree(t))});this.treeCollection=r}initMachine(t){return new W(KV,g({},t))}initApi(){return WV(this.machine.service,q)}getNodeAt(t){var i;if(t.length===0)return;let n=this.treeCollection.rootNode;for(let r of t)if(n=(i=n==null?void 0:n.children)==null?void 0:i[r],!n)return;return n}updateExistingTree(t){this.spreadProps(t,this.api.getTreeProps());let n=t.querySelectorAll('[data-scope="tree-view"][data-part="branch"]');for(let r of n){let s=r.getAttribute("data-path");if(s==null)continue;let a=s.split("/").map(p=>parseInt(p,10)),o=this.getNodeAt(a);if(!o)continue;let l={indexPath:a,node:o};this.spreadProps(r,this.api.getBranchProps(l));let c=r.querySelector('[data-scope="tree-view"][data-part="branch-control"]');c&&this.spreadProps(c,this.api.getBranchControlProps(l));let u=r.querySelector('[data-scope="tree-view"][data-part="branch-text"]');u&&this.spreadProps(u,this.api.getBranchTextProps(l));let h=r.querySelector('[data-scope="tree-view"][data-part="branch-indicator"]');h&&this.spreadProps(h,this.api.getBranchIndicatorProps(l));let m=r.querySelector('[data-scope="tree-view"][data-part="branch-content"]');m&&this.spreadProps(m,this.api.getBranchContentProps(l));let d=r.querySelector('[data-scope="tree-view"][data-part="branch-indent-guide"]');d&&this.spreadProps(d,this.api.getBranchIndentGuideProps(l))}let i=t.querySelectorAll('[data-scope="tree-view"][data-part="item"]');for(let r of i){let s=r.getAttribute("data-path");if(s==null)continue;let a=s.split("/").map(c=>parseInt(c,10)),o=this.getNodeAt(a);if(!o)continue;let l={indexPath:a,node:o};this.spreadProps(r,this.api.getItemProps(l))}}render(){var i;let t=(i=this.el.querySelector('[data-scope="tree-view"][data-part="root"]'))!=null?i:this.el;this.spreadProps(t,this.api.getRootProps());let n=this.el.querySelector('[data-scope="tree-view"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps()),this.syncTree()}},ZV={mounted(){var i;let e=this.el,t=this.pushEvent.bind(this),n=new XV(e,y(g({id:e.id},C(e,"controlled")?{expandedValue:Q(e,"expandedValue"),selectedValue:Q(e,"selectedValue")}:{defaultExpandedValue:Q(e,"defaultExpandedValue"),defaultSelectedValue:Q(e,"defaultSelectedValue")}),{selectionMode:(i=w(e,"selectionMode",["single","multiple"]))!=null?i:"single",dir:Oe(e),onSelectionChange:r=>{var d;let s=C(e,"redirect"),a=(d=r.selectedValue)!=null&&d.length?r.selectedValue[0]:void 0,o=[...e.querySelectorAll('[data-scope="tree-view"][data-part="item"], [data-scope="tree-view"][data-part="branch"]')].find(p=>p.getAttribute("data-value")===a),l=(o==null?void 0:o.getAttribute("data-part"))==="item",c=o==null?void 0:o.getAttribute("data-redirect"),u=o==null?void 0:o.hasAttribute("data-new-tab");s&&a&&l&&this.liveSocket.main.isDead&&c!=="false"&&(u?window.open(a,"_blank","noopener,noreferrer"):window.location.href=a);let m=w(e,"onSelectionChange");m&&this.liveSocket.main.isConnected()&&t(m,{id:e.id,value:y(g({},r),{isItem:l!=null?l:!1})})},onExpandedChange:r=>{let s=w(e,"onExpandedChange");s&&this.liveSocket.main.isConnected()&&t(s,{id:e.id,value:r})}}));n.init(),this.treeView=n,this.onSetExpandedValue=r=>{let{value:s}=r.detail;n.api.setExpandedValue(s)},e.addEventListener("phx:tree-view:set-expanded-value",this.onSetExpandedValue),this.onSetSelectedValue=r=>{let{value:s}=r.detail;n.api.setSelectedValue(s)},e.addEventListener("phx:tree-view:set-selected-value",this.onSetSelectedValue),this.handlers=[],this.handlers.push(this.handleEvent("tree_view_set_expanded_value",r=>{let s=r.tree_view_id;s&&e.id!==s&&e.id!==`tree-view:${s}`||n.api.setExpandedValue(r.value)})),this.handlers.push(this.handleEvent("tree_view_set_selected_value",r=>{let s=r.tree_view_id;s&&e.id!==s&&e.id!==`tree-view:${s}`||n.api.setSelectedValue(r.value)})),this.handlers.push(this.handleEvent("tree_view_expanded_value",()=>{t("tree_view_expanded_value_response",{value:n.api.expandedValue})})),this.handlers.push(this.handleEvent("tree_view_selected_value",()=>{t("tree_view_selected_value_response",{value:n.api.selectedValue})}))},updated(){},destroyed(){var e;if(this.onSetExpandedValue&&this.el.removeEventListener("phx:tree-view:set-expanded-value",this.onSetExpandedValue),this.onSetSelectedValue&&this.el.removeEventListener("phx:tree-view:set-selected-value",this.onSetSelectedValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.treeView)==null||e.destroy()}}});var e0={};he(e0,{Hooks:()=>Da,default:()=>QV,hooks:()=>JV});function me(e,t){return{mounted(){return Ve(this,null,function*(){let r=(yield e())[t];if(this._realHook=r,r!=null&&r.mounted)return r.mounted.call(this)})},updated(){var i,r;(r=(i=this._realHook)==null?void 0:i.updated)==null||r.call(this)},destroyed(){var i,r;(r=(i=this._realHook)==null?void 0:i.destroyed)==null||r.call(this)},disconnected(){var i,r;(r=(i=this._realHook)==null?void 0:i.disconnected)==null||r.call(this)},reconnected(){var i,r;(r=(i=this._realHook)==null?void 0:i.reconnected)==null||r.call(this)},beforeUpdate(){var i,r;(r=(i=this._realHook)==null?void 0:i.beforeUpdate)==null||r.call(this)}}}var Da={Accordion:me(()=>Promise.resolve().then(()=>(uu(),cu)),"Accordion"),AngleSlider:me(()=>Promise.resolve().then(()=>(Ru(),Nu)),"AngleSlider"),Avatar:me(()=>Promise.resolve().then(()=>(Fu(),Mu)),"Avatar"),Carousel:me(()=>Promise.resolve().then(()=>(Wu(),qu)),"Carousel"),Checkbox:me(()=>Promise.resolve().then(()=>(ed(),Qu)),"Checkbox"),Clipboard:me(()=>Promise.resolve().then(()=>(nd(),td)),"Clipboard"),Collapsible:me(()=>Promise.resolve().then(()=>(rd(),id)),"Collapsible"),Combobox:me(()=>Promise.resolve().then(()=>(ih(),nh)),"Combobox"),DatePicker:me(()=>Promise.resolve().then(()=>(tg(),eg)),"DatePicker"),Dialog:me(()=>Promise.resolve().then(()=>(dg(),ug)),"Dialog"),Editable:me(()=>Promise.resolve().then(()=>(vg(),mg)),"Editable"),FloatingPanel:me(()=>Promise.resolve().then(()=>(xg(),Vg)),"FloatingPanel"),Listbox:me(()=>Promise.resolve().then(()=>(Lg(),Dg)),"Listbox"),Menu:me(()=>Promise.resolve().then(()=>(qg(),Ug)),"Menu"),NumberInput:me(()=>Promise.resolve().then(()=>(sp(),rp)),"NumberInput"),PasswordInput:me(()=>Promise.resolve().then(()=>(op(),ap)),"PasswordInput"),PinInput:me(()=>Promise.resolve().then(()=>(hp(),dp)),"PinInput"),RadioGroup:me(()=>Promise.resolve().then(()=>(yp(),vp)),"RadioGroup"),Select:me(()=>Promise.resolve().then(()=>(Op(),Tp)),"Select"),SignaturePad:me(()=>Promise.resolve().then(()=>(zp(),Kp)),"SignaturePad"),Switch:me(()=>Promise.resolve().then(()=>(Jp(),Zp)),"Switch"),Tabs:me(()=>Promise.resolve().then(()=>(rf(),nf)),"Tabs"),Timer:me(()=>Promise.resolve().then(()=>(lf(),of)),"Timer"),Toast:me(()=>Promise.resolve().then(()=>(yf(),vf)),"Toast"),ToggleGroup:me(()=>Promise.resolve().then(()=>(Sf(),Cf)),"ToggleGroup"),TreeView:me(()=>Promise.resolve().then(()=>(Af(),xf)),"TreeView")};function JV(e){return Object.fromEntries(e.filter(t=>t in Da).map(t=>[t,Da[t]]))}var QV=Da;return Uf(e0);})(); + `,this.parts={title:this.el.querySelector('[data-scope="toast"][data-part="title"]'),description:this.el.querySelector('[data-scope="toast"][data-part="description"]'),close:this.el.querySelector('[data-scope="toast"][data-part="close-trigger"]'),ghostBefore:this.el.querySelector('[data-scope="toast"][data-part="ghost-before"]'),ghostAfter:this.el.querySelector('[data-scope="toast"][data-part="ghost-after"]'),progressbar:this.el.querySelector('[data-scope="toast"][data-part="progressbar"]'),loadingSpinner:this.el.querySelector('[data-scope="toast"][data-part="loading-spinner"]')}}initMachine(t){return new W(EV,t)}initApi(){return yV(this.machine.service,q)}render(){var a,o;this.spreadProps(this.el,this.api.getRootProps()),this.spreadProps(this.parts.close,this.api.getCloseTriggerProps()),this.spreadProps(this.parts.ghostBefore,this.api.getGhostBeforeProps()),this.spreadProps(this.parts.ghostAfter,this.api.getGhostAfterProps()),this.parts.title.textContent!==this.api.title&&(this.parts.title.textContent=(a=this.api.title)!=null?a:""),this.parts.description.textContent!==this.api.description&&(this.parts.description.textContent=(o=this.api.description)!=null?o:""),this.spreadProps(this.parts.title,this.api.getTitleProps()),this.spreadProps(this.parts.description,this.api.getDescriptionProps());let t=this.duration,n=t==="Infinity"||t===1/0||t===Number.POSITIVE_INFINITY,i=this.el.closest('[phx-hook="Toast"]'),r=i==null?void 0:i.querySelector("[data-loading-icon-template]"),s=r==null?void 0:r.innerHTML;n?(this.parts.progressbar.style.display="none",this.parts.loadingSpinner.style.display="flex",this.el.setAttribute("data-duration-infinity","true"),s&&this.parts.loadingSpinner.innerHTML!==s&&(this.parts.loadingSpinner.innerHTML=s)):(this.parts.progressbar.style.display="block",this.parts.loadingSpinner.style.display="none",this.el.removeAttribute("data-duration-infinity"))}},OV=class extends K{constructor(t,n){var i;super(t,n);Y(this,"toastComponents",new Map);Y(this,"groupEl");Y(this,"store");Y(this,"destroy",()=>{for(let t of this.toastComponents.values())t.destroy();this.toastComponents.clear(),this.machine.stop()});this.store=n.store,this.groupEl=(i=t.querySelector('[data-part="group"]'))!=null?i:(()=>{let r=document.createElement("div");return r.setAttribute("data-scope","toast"),r.setAttribute("data-part","group"),t.appendChild(r),r})()}initMachine(t){return new W(ff.machine,t)}initApi(){return ff.connect(this.machine.service,q)}render(){this.spreadProps(this.groupEl,this.api.getGroupProps());let t=this.api.getToasts().filter(i=>typeof i.id=="string"),n=new Set(t.map(i=>i.id));t.forEach((i,r)=>{let s=this.toastComponents.get(i.id);if(s)s.duration=i.duration,s.updateProps(y(g({},i),{parent:this.machine.service,index:r}));else{let a=document.createElement("div");a.setAttribute("data-scope","toast"),a.setAttribute("data-part","root"),this.groupEl.appendChild(a),s=new TV(a,y(g({},i),{parent:this.machine.service,index:r})),s.init(),this.toastComponents.set(i.id,s)}});for(let[i,r]of this.toastComponents)n.has(i)||(r.destroy(),this.toastComponents.delete(i))}};VV={mounted(){var h;let e=this.el;e.id||(e.id=Mn(e,"toast")),this.groupId=e.id;let t=m=>{if(m)try{return m.includes("{")?JSON.parse(m):m}catch(d){return m}},n=m=>m==="Infinity"||m===1/0?1/0:typeof m=="string"?parseInt(m,10)||void 0:m,i=(h=w(e,"placement",["top-start","top","top-end","bottom-start","bottom","bottom-end"]))!=null?h:"bottom-end";wV(e,{id:this.groupId,placement:i,overlap:C(e,"overlap"),max:z(e,"max"),gap:z(e,"gap"),offsets:t(w(e,"offset")),pauseOnPageIdle:C(e,"pauseOnPageIdle")});let r=qr(this.groupId),s=e.getAttribute("data-flash-info"),a=e.getAttribute("data-flash-info-title"),o=e.getAttribute("data-flash-error"),l=e.getAttribute("data-flash-error-title"),c=e.getAttribute("data-flash-info-duration"),u=e.getAttribute("data-flash-error-duration");if(r&&s)try{r.create({title:a||"Success",description:s,type:"info",id:Mn(void 0,"toast"),duration:n(c!=null?c:void 0)})}catch(m){console.error("Failed to create flash info toast:",m)}if(r&&o)try{r.create({title:l||"Error",description:o,type:"error",id:Mn(void 0,"toast"),duration:n(u!=null?u:void 0)})}catch(m){console.error("Failed to create flash error toast:",m)}this.handlers=[],this.handlers.push(this.handleEvent("toast-create",m=>{let d=qr(m.groupId||this.groupId);if(d)try{d.create({title:m.title,description:m.description,type:m.type||"info",id:m.id||Mn(void 0,"toast"),duration:n(m.duration)})}catch(p){console.error("Failed to create toast:",p)}})),this.handlers.push(this.handleEvent("toast-update",m=>{let d=qr(m.groupId||this.groupId);if(d)try{d.update(m.id,{title:m.title,description:m.description,type:m.type})}catch(p){console.error("Failed to update toast:",p)}})),this.handlers.push(this.handleEvent("toast-dismiss",m=>{let d=qr(m.groupId||this.groupId);if(d)try{d.dismiss(m.id)}catch(p){console.error("Failed to dismiss toast:",p)}})),e.addEventListener("toast:create",m=>{let{detail:d}=m,p=qr(d.groupId||this.groupId);if(p)try{p.create({title:d.title,description:d.description,type:d.type||"info",id:d.id||Mn(void 0,"toast"),duration:n(d.duration)})}catch(v){console.error("Failed to create toast:",v)}})},destroyed(){if(this.handlers)for(let e of this.handlers)this.removeHandleEvent(e)}}});var Cf={};he(Cf,{ToggleGroup:()=>BV});function DV(e,t){let{context:n,send:i,prop:r,scope:s}=e,a=n.get("value"),o=r("disabled"),l=!r("multiple"),c=r("rovingFocus"),u=r("orientation")==="horizontal";function h(m){let d=AV(s,m.value);return{id:d,disabled:!!(m.disabled||o),pressed:!!a.includes(m.value),focused:n.get("focusedId")===d}}return{value:a,setValue(m){i({type:"VALUE.SET",value:m})},getRootProps(){return t.element(y(g({},bf.root.attrs),{id:ka(s),dir:r("dir"),role:l?"radiogroup":"group",tabIndex:n.get("isTabbingBackward")?-1:0,"data-disabled":E(o),"data-orientation":r("orientation"),"data-focus":E(n.get("focusedId")!=null),style:{outline:"none"},onMouseDown(){o||i({type:"ROOT.MOUSE_DOWN"})},onFocus(m){o||m.currentTarget===j(m)&&(n.get("isClickFocus")||n.get("isTabbingBackward")||i({type:"ROOT.FOCUS"}))},onBlur(m){let d=m.relatedTarget;ce(m.currentTarget,d)||o||i({type:"ROOT.BLUR"})}}))},getItemState:h,getItemProps(m){let d=h(m),p=d.focused?0:-1;return t.button(y(g({},bf.item.attrs),{id:d.id,type:"button","data-ownedby":ka(s),"data-focus":E(d.focused),disabled:d.disabled,tabIndex:c?p:void 0,role:l?"radio":void 0,"aria-checked":l?d.pressed:void 0,"aria-pressed":l?void 0:d.pressed,"data-disabled":E(d.disabled),"data-orientation":r("orientation"),dir:r("dir"),"data-state":d.pressed?"on":"off",onFocus(){d.disabled||i({type:"TOGGLE.FOCUS",id:d.id})},onClick(v){d.disabled||(i({type:"TOGGLE.CLICK",id:d.id,value:m.value}),Xe()&&v.currentTarget.focus({preventScroll:!0}))},onKeyDown(v){if(v.defaultPrevented||!ce(v.currentTarget,j(v))||d.disabled)return;let T={Tab(O){let b=O.shiftKey;i({type:"TOGGLE.SHIFT_TAB",isShiftTab:b})},ArrowLeft(){!c||!u||i({type:"TOGGLE.FOCUS_PREV"})},ArrowRight(){!c||!u||i({type:"TOGGLE.FOCUS_NEXT"})},ArrowUp(){!c||u||i({type:"TOGGLE.FOCUS_PREV"})},ArrowDown(){!c||u||i({type:"TOGGLE.FOCUS_NEXT"})},Home(){c&&i({type:"TOGGLE.FOCUS_FIRST"})},End(){c&&i({type:"TOGGLE.FOCUS_LAST"})}}[ge(v)];T&&(T(v),v.key!=="Tab"&&v.preventDefault())}}))}}}var xV,bf,ka,AV,Pf,Na,Ef,kV,NV,RV,If,LV,MV,FV,Ek,$V,Ik,HV,BV,Sf=re(()=>{"use strict";se();xV=U("toggle-group").parts("root","item"),bf=xV.build(),ka=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`toggle-group:${e.id}`},AV=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`toggle-group:${e.id}:${t}`},Pf=e=>e.getById(ka(e)),Na=e=>{let n=`[data-ownedby='${CSS.escape(ka(e))}']:not([data-disabled])`;return Fe(Pf(e),n)},Ef=e=>lt(Na(e)),kV=e=>mt(Na(e)),NV=(e,t,n)=>yi(Na(e),t,n),RV=(e,t,n)=>bi(Na(e),t,n);({not:If,and:LV}=Ee()),MV={props({props:e}){return g({defaultValue:[],orientation:"horizontal",rovingFocus:!0,loopFocus:!0,deselectable:!0},e)},initialState(){return"idle"},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var i;(i=e("onValueChange"))==null||i({value:n})}})),focusedId:t(()=>({defaultValue:null})),isTabbingBackward:t(()=>({defaultValue:!1})),isClickFocus:t(()=>({defaultValue:!1})),isWithinToolbar:t(()=>({defaultValue:!1}))}},computed:{currentLoopFocus:({context:e,prop:t})=>t("loopFocus")&&!e.get("isWithinToolbar")},entry:["checkIfWithinToolbar"],on:{"VALUE.SET":{actions:["setValue"]},"TOGGLE.CLICK":{actions:["setValue"]},"ROOT.MOUSE_DOWN":{actions:["setClickFocus"]}},states:{idle:{on:{"ROOT.FOCUS":{target:"focused",guard:If(LV("isClickFocus","isTabbingBackward")),actions:["focusFirstToggle","clearClickFocus"]},"TOGGLE.FOCUS":{target:"focused",actions:["setFocusedId"]}}},focused:{on:{"ROOT.BLUR":{target:"idle",actions:["clearIsTabbingBackward","clearFocusedId","clearClickFocus"]},"TOGGLE.FOCUS":{actions:["setFocusedId"]},"TOGGLE.FOCUS_NEXT":{actions:["focusNextToggle"]},"TOGGLE.FOCUS_PREV":{actions:["focusPrevToggle"]},"TOGGLE.FOCUS_FIRST":{actions:["focusFirstToggle"]},"TOGGLE.FOCUS_LAST":{actions:["focusLastToggle"]},"TOGGLE.SHIFT_TAB":[{guard:If("isFirstToggleFocused"),target:"idle",actions:["setIsTabbingBackward"]},{actions:["setIsTabbingBackward"]}]}}},implementations:{guards:{isClickFocus:({context:e})=>e.get("isClickFocus"),isTabbingBackward:({context:e})=>e.get("isTabbingBackward"),isFirstToggleFocused:({context:e,scope:t})=>{var n;return e.get("focusedId")===((n=Ef(t))==null?void 0:n.id)}},actions:{setIsTabbingBackward({context:e}){e.set("isTabbingBackward",!0)},clearIsTabbingBackward({context:e}){e.set("isTabbingBackward",!1)},setClickFocus({context:e}){e.set("isClickFocus",!0)},clearClickFocus({context:e}){e.set("isClickFocus",!1)},checkIfWithinToolbar({context:e,scope:t}){var i;let n=(i=Pf(t))==null?void 0:i.closest("[role=toolbar]");e.set("isWithinToolbar",!!n)},setFocusedId({context:e,event:t}){e.set("focusedId",t.id)},clearFocusedId({context:e}){e.set("focusedId",null)},setValue({context:e,event:t,prop:n}){yn(t,["value"]);let i=e.get("value");pn(t.value)?i=t.value:n("multiple")?i=yt(i,t.value):i=fe(i,[t.value])&&n("deselectable")?[]:[t.value],e.set("value",i)},focusNextToggle({context:e,scope:t,prop:n}){H(()=>{var r;let i=e.get("focusedId");i&&((r=NV(t,i,n("loopFocus")))==null||r.focus({preventScroll:!0}))})},focusPrevToggle({context:e,scope:t,prop:n}){H(()=>{var r;let i=e.get("focusedId");i&&((r=RV(t,i,n("loopFocus")))==null||r.focus({preventScroll:!0}))})},focusFirstToggle({scope:e}){H(()=>{var t;(t=Ef(e))==null||t.focus({preventScroll:!0})})},focusLastToggle({scope:e}){H(()=>{var t;(t=kV(e))==null||t.focus({preventScroll:!0})})}}}},FV=_()(["dir","disabled","getRootNode","id","ids","loopFocus","multiple","onValueChange","orientation","rovingFocus","value","defaultValue","deselectable"]),Ek=B(FV),$V=_()(["value","disabled"]),Ik=B($V),HV=class extends K{initMachine(e){return new W(MV,e)}initApi(){return DV(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="toggle-group"][data-part="root"]');if(!e)return;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelectorAll('[data-scope="toggle-group"][data-part="item"]');for(let n=0;n{let s=w(e,"onValueChange");s&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&t(s,{value:r.value,id:e.id});let a=w(e,"onValueChangeClient");a&&e.dispatchEvent(new CustomEvent(a,{bubbles:!0,detail:{value:r.value,id:e.id}}))}}),i=new HV(e,n);i.init(),this.toggleGroup=i,this.onSetValue=r=>{let{value:s}=r.detail;i.api.setValue(s)},e.addEventListener("phx:toggle-group:set-value",this.onSetValue),this.handlers=[],this.handlers.push(this.handleEvent("toggle-group_set_value",r=>{let s=r.id;s&&s!==e.id||i.api.setValue(r.value)})),this.handlers.push(this.handleEvent("toggle-group:value",()=>{this.pushEvent("toggle-group:value_response",{value:i.api.value})}))},updated(){var e;(e=this.toggleGroup)==null||e.updateProps(y(g({},C(this.el,"controlled")?{value:Z(this.el,"value")}:{defaultValue:Z(this.el,"defaultValue")}),{deselectable:C(this.el,"deselectable"),loopFocus:C(this.el,"loopFocus"),rovingFocus:C(this.el,"rovingFocus"),disabled:C(this.el,"disabled"),multiple:C(this.el,"multiple"),orientation:w(this.el,"orientation",["horizontal","vertical"]),dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(this.onSetValue&&this.el.removeEventListener("phx:toggle-group:set-value",this.onSetValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.toggleGroup)==null||e.destroy()}}});var xf={};he(xf,{TreeView:()=>ZV});function Vf(e,t,n){let i=e.getNodeValue(t);if(!e.isBranchNode(t))return n.includes(i);let r=e.getDescendantValues(i),s=r.every(o=>n.includes(o)),a=r.some(o=>n.includes(o));return s?!0:a?"indeterminate":!1}function UV(e,t,n){let i=e.getDescendantValues(t),r=i.every(s=>n.includes(s));return vt(r?ct(n,...i):Ze(n,...i))}function qV(e,t){let n=new Map;return e.visit({onEnter:i=>{let r=e.getNodeValue(i),s=e.isBranchNode(i),a=Vf(e,i,t);n.set(r,{type:s?"branch":"leaf",checked:a})}}),n}function WV(e,t){let{context:n,scope:i,computed:r,prop:s,send:a}=e,o=s("collection"),l=Array.from(n.get("expandedValue")),c=Array.from(n.get("selectedValue")),u=Array.from(n.get("checkedValue")),h=r("isTypingAhead"),m=n.get("focusedValue"),d=n.get("loadingStatus"),p=n.get("renamingValue"),v=({indexPath:b})=>o.getValuePath(b).slice(0,-1).some(S=>!l.includes(S)),I=o.getFirstNode(void 0,{skip:v}),T=I?o.getNodeValue(I):null;function O(b){let{node:f,indexPath:S}=b,P=o.getNodeValue(f);return{id:nc(i,P),value:P,indexPath:S,valuePath:o.getValuePath(S),disabled:!!f.disabled,focused:m==null?T===P:m===P,selected:c.includes(P),expanded:l.includes(P),loading:d[P]==="loading",depth:S.length,isBranch:o.isBranchNode(f),renaming:p===P,get checked(){return Vf(o,f,u)}}}return{collection:o,expandedValue:l,selectedValue:c,checkedValue:u,toggleChecked(b,f){a({type:"CHECKED.TOGGLE",value:b,isBranch:f})},setChecked(b){a({type:"CHECKED.SET",value:b})},clearChecked(){a({type:"CHECKED.CLEAR"})},getCheckedMap(){return qV(o,u)},expand(b){a({type:b?"BRANCH.EXPAND":"EXPANDED.ALL",value:b})},collapse(b){a({type:b?"BRANCH.COLLAPSE":"EXPANDED.CLEAR",value:b})},deselect(b){a({type:b?"NODE.DESELECT":"SELECTED.CLEAR",value:b})},select(b){a({type:b?"NODE.SELECT":"SELECTED.ALL",value:b,isTrusted:!1})},getVisibleNodes(){return r("visibleNodes")},focus(b){ke(i,b)},selectParent(b){let f=o.getParentNode(b);if(!f)return;let S=Ze(c,o.getNodeValue(f));a({type:"SELECTED.SET",value:S,src:"select.parent"})},expandParent(b){let f=o.getParentNode(b);if(!f)return;let S=Ze(l,o.getNodeValue(f));a({type:"EXPANDED.SET",value:S,src:"expand.parent"})},setExpandedValue(b){let f=vt(b);a({type:"EXPANDED.SET",value:f})},setSelectedValue(b){let f=vt(b);a({type:"SELECTED.SET",value:f})},startRenaming(b){a({type:"NODE.RENAME",value:b})},submitRenaming(b,f){a({type:"RENAME.SUBMIT",value:b,label:f})},cancelRenaming(){a({type:"RENAME.CANCEL"})},getRootProps(){return t.element(y(g({},Ge.root.attrs),{id:GV(i),dir:s("dir")}))},getLabelProps(){return t.element(y(g({},Ge.label.attrs),{id:Tf(i),dir:s("dir")}))},getTreeProps(){return t.element(y(g({},Ge.tree.attrs),{id:ec(i),dir:s("dir"),role:"tree","aria-label":"Tree View","aria-labelledby":Tf(i),"aria-multiselectable":s("selectionMode")==="multiple"||void 0,tabIndex:-1,onKeyDown(b){if(b.defaultPrevented||Re(b))return;let f=j(b);if(Ot(f))return;let S=f==null?void 0:f.closest("[data-part=branch-control], [data-part=item]");if(!S)return;let P=S.dataset.value;if(P==null){console.warn("[zag-js/tree-view] Node id not found for node",S);return}let V=S.matches("[data-part=branch-control]"),A={ArrowDown(N){xe(N)||(N.preventDefault(),a({type:"NODE.ARROW_DOWN",id:P,shiftKey:N.shiftKey}))},ArrowUp(N){xe(N)||(N.preventDefault(),a({type:"NODE.ARROW_UP",id:P,shiftKey:N.shiftKey}))},ArrowLeft(N){xe(N)||S.dataset.disabled||(N.preventDefault(),a({type:V?"BRANCH_NODE.ARROW_LEFT":"NODE.ARROW_LEFT",id:P}))},ArrowRight(N){!V||S.dataset.disabled||(N.preventDefault(),a({type:"BRANCH_NODE.ARROW_RIGHT",id:P}))},Home(N){xe(N)||(N.preventDefault(),a({type:"NODE.HOME",id:P,shiftKey:N.shiftKey}))},End(N){xe(N)||(N.preventDefault(),a({type:"NODE.END",id:P,shiftKey:N.shiftKey}))},Space(N){var D;S.dataset.disabled||(h?a({type:"TREE.TYPEAHEAD",key:N.key}):(D=A.Enter)==null||D.call(A,N))},Enter(N){S.dataset.disabled||st(f)&&xe(N)||(a({type:V?"BRANCH_NODE.CLICK":"NODE.CLICK",id:P,src:"keyboard"}),st(f)||N.preventDefault())},"*"(N){S.dataset.disabled||(N.preventDefault(),a({type:"SIBLINGS.EXPAND",id:P}))},a(N){!N.metaKey||S.dataset.disabled||(N.preventDefault(),a({type:"SELECTED.ALL",moveFocus:!0}))},F2(N){if(S.dataset.disabled)return;let D=s("canRename");if(!D)return;let $=o.getIndexPath(P);if($){let te=o.at($);if(te&&!D(te,$))return}N.preventDefault(),a({type:"NODE.RENAME",value:P})}},x=ge(b,{dir:s("dir")}),k=A[x];if(k){k(b);return}Ue.isValidEvent(b)&&(a({type:"TREE.TYPEAHEAD",key:b.key,id:P}),b.preventDefault())}}))},getNodeState:O,getItemProps(b){let f=O(b);return t.element(y(g({},Ge.item.attrs),{id:f.id,dir:s("dir"),"data-ownedby":ec(i),"data-path":b.indexPath.join("/"),"data-value":f.value,tabIndex:f.focused?0:-1,"data-focus":E(f.focused),role:"treeitem","aria-current":f.selected?"true":void 0,"aria-selected":f.disabled?void 0:f.selected,"data-selected":E(f.selected),"aria-disabled":X(f.disabled),"data-disabled":E(f.disabled),"data-renaming":E(f.renaming),"aria-level":f.depth,"data-depth":f.depth,style:{"--depth":f.depth},onFocus(S){S.stopPropagation(),a({type:"NODE.FOCUS",id:f.value})},onClick(S){if(f.disabled||!pe(S)||st(S.currentTarget)&&xe(S))return;let P=S.metaKey||S.ctrlKey;a({type:"NODE.CLICK",id:f.value,shiftKey:S.shiftKey,ctrlKey:P}),S.stopPropagation(),st(S.currentTarget)||S.preventDefault()}}))},getItemTextProps(b){let f=O(b);return t.element(y(g({},Ge.itemText.attrs),{"data-disabled":E(f.disabled),"data-selected":E(f.selected),"data-focus":E(f.focused)}))},getItemIndicatorProps(b){let f=O(b);return t.element(y(g({},Ge.itemIndicator.attrs),{"aria-hidden":!0,"data-disabled":E(f.disabled),"data-selected":E(f.selected),"data-focus":E(f.focused),hidden:!f.selected}))},getBranchProps(b){let f=O(b);return t.element(y(g({},Ge.branch.attrs),{"data-depth":f.depth,dir:s("dir"),"data-branch":f.value,role:"treeitem","data-ownedby":ec(i),"data-value":f.value,"aria-level":f.depth,"aria-selected":f.disabled?void 0:f.selected,"data-path":b.indexPath.join("/"),"data-selected":E(f.selected),"aria-expanded":f.expanded,"data-state":f.expanded?"open":"closed","aria-disabled":X(f.disabled),"data-disabled":E(f.disabled),"data-loading":E(f.loading),"aria-busy":X(f.loading),style:{"--depth":f.depth}}))},getBranchIndicatorProps(b){let f=O(b);return t.element(y(g({},Ge.branchIndicator.attrs),{"aria-hidden":!0,"data-state":f.expanded?"open":"closed","data-disabled":E(f.disabled),"data-selected":E(f.selected),"data-focus":E(f.focused),"data-loading":E(f.loading)}))},getBranchTriggerProps(b){let f=O(b);return t.element(y(g({},Ge.branchTrigger.attrs),{role:"button",dir:s("dir"),"data-disabled":E(f.disabled),"data-state":f.expanded?"open":"closed","data-value":f.value,"data-loading":E(f.loading),disabled:f.loading,onClick(S){f.disabled||f.loading||(a({type:"BRANCH_TOGGLE.CLICK",id:f.value}),S.stopPropagation())}}))},getBranchControlProps(b){let f=O(b);return t.element(y(g({},Ge.branchControl.attrs),{role:"button",id:f.id,dir:s("dir"),tabIndex:f.focused?0:-1,"data-path":b.indexPath.join("/"),"data-state":f.expanded?"open":"closed","data-disabled":E(f.disabled),"data-selected":E(f.selected),"data-focus":E(f.focused),"data-renaming":E(f.renaming),"data-value":f.value,"data-depth":f.depth,"data-loading":E(f.loading),"aria-busy":X(f.loading),onFocus(S){a({type:"NODE.FOCUS",id:f.value}),S.stopPropagation()},onClick(S){if(f.disabled||f.loading||!pe(S)||st(S.currentTarget)&&xe(S))return;let P=S.metaKey||S.ctrlKey;a({type:"BRANCH_NODE.CLICK",id:f.value,shiftKey:S.shiftKey,ctrlKey:P}),S.stopPropagation()}}))},getBranchTextProps(b){let f=O(b);return t.element(y(g({},Ge.branchText.attrs),{dir:s("dir"),"data-disabled":E(f.disabled),"data-state":f.expanded?"open":"closed","data-loading":E(f.loading)}))},getBranchContentProps(b){let f=O(b);return t.element(y(g({},Ge.branchContent.attrs),{role:"group",dir:s("dir"),"data-state":f.expanded?"open":"closed","data-depth":f.depth,"data-path":b.indexPath.join("/"),"data-value":f.value,hidden:!f.expanded}))},getBranchIndentGuideProps(b){let f=O(b);return t.element(y(g({},Ge.branchIndentGuide.attrs),{"data-depth":f.depth}))},getNodeCheckboxProps(b){let f=O(b),S=f.checked;return t.element(y(g({},Ge.nodeCheckbox.attrs),{tabIndex:-1,role:"checkbox","data-state":S===!0?"checked":S===!1?"unchecked":"indeterminate","aria-checked":S===!0?"true":S===!1?"false":"mixed","data-disabled":E(f.disabled),onClick(P){if(P.defaultPrevented||f.disabled||!pe(P))return;a({type:"CHECKED.TOGGLE",value:f.value,isBranch:f.isBranch}),P.stopPropagation();let V=P.currentTarget.closest("[role=treeitem]");V==null||V.focus({preventScroll:!0})}}))},getNodeRenameInputProps(b){let f=O(b);return t.input(y(g({},Ge.nodeRenameInput.attrs),{id:wf(i,f.value),type:"text","aria-label":"Rename tree item",hidden:!f.renaming,onKeyDown(S){Re(S)||(S.key==="Escape"&&(a({type:"RENAME.CANCEL"}),S.preventDefault()),S.key==="Enter"&&(a({type:"RENAME.SUBMIT",label:S.currentTarget.value}),S.preventDefault()),S.stopPropagation())},onBlur(S){a({type:"RENAME.SUBMIT",label:S.currentTarget.value})}}))}}}function Ra(e,t){let{context:n,prop:i,refs:r}=e;if(!i("loadChildren")){n.set("expandedValue",v=>vt(Ze(v,...t)));return}let s=n.get("loadingStatus"),[a,o]=oo(t,v=>s[v]==="loaded");if(a.length>0&&n.set("expandedValue",v=>vt(Ze(v,...a))),o.length===0)return;let l=i("collection"),[c,u]=oo(o,v=>{let I=l.findNode(v);return l.getNodeChildren(I).length>0});if(c.length>0&&n.set("expandedValue",v=>vt(Ze(v,...c))),u.length===0)return;n.set("loadingStatus",v=>g(g({},v),u.reduce((I,T)=>y(g({},I),{[T]:"loading"}),{})));let h=u.map(v=>{let I=l.getIndexPath(v),T=l.getValuePath(I),O=l.findNode(v);return{id:v,indexPath:I,valuePath:T,node:O}}),m=r.get("pendingAborts"),d=i("loadChildren");vn(d,()=>"[zag-js/tree-view] `loadChildren` is required for async expansion");let p=h.map(({id:v,indexPath:I,valuePath:T,node:O})=>{let b=m.get(v);b&&(b.abort(),m.delete(v));let f=new AbortController;return m.set(v,f),d({valuePath:T,indexPath:I,node:O,signal:f.signal})});Promise.allSettled(p).then(v=>{var f,S;let I=[],T=[],O=n.get("loadingStatus"),b=i("collection");v.forEach((P,V)=>{let{id:A,indexPath:x,node:k,valuePath:N}=h[V];P.status==="fulfilled"?(O[A]="loaded",I.push(A),b=b.replace(x,y(g({},k),{children:P.value}))):(m.delete(A),Reflect.deleteProperty(O,A),T.push({node:k,error:P.reason,indexPath:x,valuePath:N}))}),n.set("loadingStatus",O),I.length&&(n.set("expandedValue",P=>vt(Ze(P,...I))),(f=i("onLoadChildrenComplete"))==null||f({collection:b})),T.length&&((S=i("onLoadChildrenError"))==null||S({nodes:T}))})}function _t(e){let{prop:t,context:n}=e;return function({indexPath:r}){return t("collection").getValuePath(r).slice(0,-1).some(a=>!n.get("expandedValue").includes(a))}}function oi(e,t){let{prop:n,scope:i,computed:r}=e,s=n("scrollToIndexFn");if(!s)return!1;let a=n("collection"),o=r("visibleNodes");for(let l=0;li.getById(nc(i,t))}),!0}return!1}function jV(e){var s;let n=e.querySelectorAll('[data-scope="tree-view"][data-part="branch"], [data-scope="tree-view"][data-part="item"]'),i=[];for(let a of n){let o=a.getAttribute("data-path"),l=a.getAttribute("data-value");if(o==null||l==null)continue;let c=o.split("/").map(m=>parseInt(m,10));if(c.some(Number.isNaN))continue;let u=(s=a.getAttribute("data-name"))!=null?s:l,h=a.getAttribute("data-part")==="branch";i.push({pathArr:c,id:l,name:u,isBranch:h})}i.sort((a,o)=>{let l=Math.min(a.pathArr.length,o.pathArr.length);for(let c=0;c{"use strict";yr();se();_V=U("tree-view").parts("branch","branchContent","branchControl","branchIndentGuide","branchIndicator","branchText","branchTrigger","item","itemIndicator","itemText","label","nodeCheckbox","nodeRenameInput","root","tree"),Ge=_V.build(),tc=e=>new Ao(e);tc.empty=()=>new Ao({rootNode:{children:[]}});GV=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`tree:${e.id}:root`},Tf=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`tree:${e.id}:label`},nc=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.node)==null?void 0:i.call(n,t))!=null?r:`tree:${e.id}:node:${t}`},ec=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.tree)!=null?n:`tree:${e.id}:tree`},ke=(e,t)=>{var n;t!=null&&((n=e.getById(nc(e,t)))==null||n.focus())},wf=(e,t)=>`tree:${e.id}:rename-input:${t}`,Of=(e,t)=>e.getById(wf(e,t));({and:Gt}=Ee()),KV={props({props:e}){return g({selectionMode:"single",collection:tc.empty(),typeahead:!0,expandOnClick:!0,defaultExpandedValue:[],defaultSelectedValue:[]},e)},initialState(){return"idle"},context({prop:e,bindable:t,getContext:n}){return{expandedValue:t(()=>({defaultValue:e("defaultExpandedValue"),value:e("expandedValue"),isEqual:fe,onChange(i){var a;let s=n().get("focusedValue");(a=e("onExpandedChange"))==null||a({expandedValue:i,focusedValue:s,get expandedNodes(){return e("collection").findNodes(i)}})}})),selectedValue:t(()=>({defaultValue:e("defaultSelectedValue"),value:e("selectedValue"),isEqual:fe,onChange(i){var a;let s=n().get("focusedValue");(a=e("onSelectionChange"))==null||a({selectedValue:i,focusedValue:s,get selectedNodes(){return e("collection").findNodes(i)}})}})),focusedValue:t(()=>({defaultValue:e("defaultFocusedValue")||null,value:e("focusedValue"),onChange(i){var r;(r=e("onFocusChange"))==null||r({focusedValue:i,get focusedNode(){return i?e("collection").findNode(i):null}})}})),loadingStatus:t(()=>({defaultValue:{}})),checkedValue:t(()=>({defaultValue:e("defaultCheckedValue")||[],value:e("checkedValue"),isEqual:fe,onChange(i){var r;(r=e("onCheckedChange"))==null||r({checkedValue:i})}})),renamingValue:t(()=>({sync:!0,defaultValue:null}))}},refs(){return{typeaheadState:g({},Ue.defaultOptions),pendingAborts:new Map}},computed:{isMultipleSelection:({prop:e})=>e("selectionMode")==="multiple",isTypingAhead:({refs:e})=>e.get("typeaheadState").keysSoFar.length>0,visibleNodes:({prop:e,context:t})=>{let n=[];return e("collection").visit({skip:_t({prop:e,context:t}),onEnter:(i,r)=>{n.push({node:i,indexPath:r})}}),n}},on:{"EXPANDED.SET":{actions:["setExpanded"]},"EXPANDED.CLEAR":{actions:["clearExpanded"]},"EXPANDED.ALL":{actions:["expandAllBranches"]},"BRANCH.EXPAND":{actions:["expandBranches"]},"BRANCH.COLLAPSE":{actions:["collapseBranches"]},"SELECTED.SET":{actions:["setSelected"]},"SELECTED.ALL":[{guard:Gt("isMultipleSelection","moveFocus"),actions:["selectAllNodes","focusTreeLastNode"]},{guard:"isMultipleSelection",actions:["selectAllNodes"]}],"SELECTED.CLEAR":{actions:["clearSelected"]},"NODE.SELECT":{actions:["selectNode"]},"NODE.DESELECT":{actions:["deselectNode"]},"CHECKED.TOGGLE":{actions:["toggleChecked"]},"CHECKED.SET":{actions:["setChecked"]},"CHECKED.CLEAR":{actions:["clearChecked"]},"NODE.FOCUS":{actions:["setFocusedNode"]},"NODE.ARROW_DOWN":[{guard:Gt("isShiftKey","isMultipleSelection"),actions:["focusTreeNextNode","extendSelectionToNextNode"]},{actions:["focusTreeNextNode"]}],"NODE.ARROW_UP":[{guard:Gt("isShiftKey","isMultipleSelection"),actions:["focusTreePrevNode","extendSelectionToPrevNode"]},{actions:["focusTreePrevNode"]}],"NODE.ARROW_LEFT":{actions:["focusBranchNode"]},"BRANCH_NODE.ARROW_LEFT":[{guard:"isBranchExpanded",actions:["collapseBranch"]},{actions:["focusBranchNode"]}],"BRANCH_NODE.ARROW_RIGHT":[{guard:Gt("isBranchFocused","isBranchExpanded"),actions:["focusBranchFirstNode"]},{actions:["expandBranch"]}],"SIBLINGS.EXPAND":{actions:["expandSiblingBranches"]},"NODE.HOME":[{guard:Gt("isShiftKey","isMultipleSelection"),actions:["extendSelectionToFirstNode","focusTreeFirstNode"]},{actions:["focusTreeFirstNode"]}],"NODE.END":[{guard:Gt("isShiftKey","isMultipleSelection"),actions:["extendSelectionToLastNode","focusTreeLastNode"]},{actions:["focusTreeLastNode"]}],"NODE.CLICK":[{guard:Gt("isCtrlKey","isMultipleSelection"),actions:["toggleNodeSelection"]},{guard:Gt("isShiftKey","isMultipleSelection"),actions:["extendSelectionToNode"]},{actions:["selectNode"]}],"BRANCH_NODE.CLICK":[{guard:Gt("isCtrlKey","isMultipleSelection"),actions:["toggleNodeSelection"]},{guard:Gt("isShiftKey","isMultipleSelection"),actions:["extendSelectionToNode"]},{guard:"expandOnClick",actions:["selectNode","toggleBranchNode"]},{actions:["selectNode"]}],"BRANCH_TOGGLE.CLICK":{actions:["toggleBranchNode"]},"TREE.TYPEAHEAD":{actions:["focusMatchedNode"]}},exit:["clearPendingAborts"],states:{idle:{on:{"NODE.RENAME":{target:"renaming",actions:["setRenamingValue"]}}},renaming:{entry:["syncRenameInput","focusRenameInput"],on:{"RENAME.SUBMIT":{guard:"isRenameLabelValid",target:"idle",actions:["submitRenaming"]},"RENAME.CANCEL":{target:"idle",actions:["cancelRenaming"]}}}},implementations:{guards:{isBranchFocused:({context:e,event:t})=>e.get("focusedValue")===t.id,isBranchExpanded:({context:e,event:t})=>e.get("expandedValue").includes(t.id),isShiftKey:({event:e})=>e.shiftKey,isCtrlKey:({event:e})=>e.ctrlKey,hasSelectedItems:({context:e})=>e.get("selectedValue").length>0,isMultipleSelection:({prop:e})=>e("selectionMode")==="multiple",moveFocus:({event:e})=>!!e.moveFocus,expandOnClick:({prop:e})=>!!e("expandOnClick"),isRenameLabelValid:({event:e})=>e.label.trim()!==""},actions:{selectNode({context:e,event:t}){let n=t.id||t.value;e.set("selectedValue",i=>n==null?i:!t.isTrusted&&pn(n)?i.concat(...n):[pn(n)?mt(n):n].filter(Boolean))},deselectNode({context:e,event:t}){let n=or(t.id||t.value);e.set("selectedValue",i=>ct(i,...n))},setFocusedNode({context:e,event:t}){e.set("focusedValue",t.id)},clearFocusedNode({context:e}){e.set("focusedValue",null)},clearSelectedItem({context:e}){e.set("selectedValue",[])},toggleBranchNode({context:e,event:t,action:n}){let i=e.get("expandedValue").includes(t.id);n(i?["collapseBranch"]:["expandBranch"])},expandBranch(e){let{event:t}=e;Ra(e,[t.id])},expandBranches(e){let{context:t,event:n}=e,i=or(n.value);Ra(e,fs(i,t.get("expandedValue")))},collapseBranch({context:e,event:t}){e.set("expandedValue",n=>ct(n,t.id))},collapseBranches(e){let{context:t,event:n}=e,i=or(n.value);t.set("expandedValue",r=>ct(r,...i))},setExpanded({context:e,event:t}){pn(t.value)&&e.set("expandedValue",t.value)},clearExpanded({context:e}){e.set("expandedValue",[])},setSelected({context:e,event:t}){pn(t.value)&&e.set("selectedValue",t.value)},clearSelected({context:e}){e.set("selectedValue",[])},focusTreeFirstNode(e){let{prop:t,scope:n}=e,i=t("collection"),r=i.getFirstNode(void 0,{skip:_t(e)});if(!r)return;let s=i.getNodeValue(r);oi(e,s)?H(()=>ke(n,s)):ke(n,s)},focusTreeLastNode(e){let{prop:t,scope:n}=e,i=t("collection"),r=i.getLastNode(void 0,{skip:_t(e)}),s=i.getNodeValue(r);oi(e,s)?H(()=>ke(n,s)):ke(n,s)},focusBranchFirstNode(e){let{event:t,prop:n,scope:i}=e,r=n("collection"),s=r.findNode(t.id),a=r.getFirstNode(s,{skip:_t(e)});if(!a)return;let o=r.getNodeValue(a);oi(e,o)?H(()=>ke(i,o)):ke(i,o)},focusTreeNextNode(e){let{event:t,prop:n,scope:i}=e,r=n("collection"),s=r.getNextNode(t.id,{skip:_t(e)});if(!s)return;let a=r.getNodeValue(s);oi(e,a)?H(()=>ke(i,a)):ke(i,a)},focusTreePrevNode(e){let{event:t,prop:n,scope:i}=e,r=n("collection"),s=r.getPreviousNode(t.id,{skip:_t(e)});if(!s)return;let a=r.getNodeValue(s);oi(e,a)?H(()=>ke(i,a)):ke(i,a)},focusBranchNode(e){let{event:t,prop:n,scope:i}=e,r=n("collection"),s=r.getParentNode(t.id),a=s?r.getNodeValue(s):void 0;if(!a)return;oi(e,a)?H(()=>ke(i,a)):ke(i,a)},selectAllNodes({context:e,prop:t}){e.set("selectedValue",t("collection").getValues())},focusMatchedNode(e){let{context:t,prop:n,refs:i,event:r,scope:s,computed:a}=e,l=a("visibleNodes").map(({node:h})=>({textContent:n("collection").stringifyNode(h),id:n("collection").getNodeValue(h)})),c=Ue(l,{state:i.get("typeaheadState"),activeId:t.get("focusedValue"),key:r.key});if(!(c!=null&&c.id))return;oi(e,c.id)?H(()=>ke(s,c.id)):ke(s,c.id)},toggleNodeSelection({context:e,event:t}){let n=yt(e.get("selectedValue"),t.id);e.set("selectedValue",n)},expandAllBranches(e){let{context:t,prop:n}=e,i=n("collection").getBranchValues(),r=fs(i,t.get("expandedValue"));Ra(e,r)},expandSiblingBranches(e){let{context:t,event:n,prop:i}=e,r=i("collection"),s=r.getIndexPath(n.id);if(!s)return;let o=r.getSiblingNodes(s).map(c=>r.getNodeValue(c)),l=fs(o,t.get("expandedValue"));Ra(e,l)},extendSelectionToNode(e){let{context:t,event:n,prop:i,computed:r}=e,s=i("collection"),a=lt(t.get("selectedValue"))||s.getNodeValue(s.getFirstNode()),o=n.id,l=[a,o],c=0;r("visibleNodes").forEach(({node:h})=>{let m=s.getNodeValue(h);c===1&&l.push(m),(m===a||m===o)&&c++}),t.set("selectedValue",vt(l))},extendSelectionToNextNode(e){let{context:t,event:n,prop:i}=e,r=i("collection"),s=r.getNextNode(n.id,{skip:_t(e)});if(!s)return;let a=new Set(t.get("selectedValue")),o=r.getNodeValue(s);o!=null&&(a.has(n.id)&&a.has(o)?a.delete(n.id):a.has(o)||a.add(o),t.set("selectedValue",Array.from(a)))},extendSelectionToPrevNode(e){let{context:t,event:n,prop:i}=e,r=i("collection"),s=r.getPreviousNode(n.id,{skip:_t(e)});if(!s)return;let a=new Set(t.get("selectedValue")),o=r.getNodeValue(s);o!=null&&(a.has(n.id)&&a.has(o)?a.delete(n.id):a.has(o)||a.add(o),t.set("selectedValue",Array.from(a)))},extendSelectionToFirstNode(e){let{context:t,prop:n}=e,i=n("collection"),r=lt(t.get("selectedValue")),s=[];i.visit({skip:_t(e),onEnter:a=>{let o=i.getNodeValue(a);if(s.push(o),o===r)return"stop"}}),t.set("selectedValue",s)},extendSelectionToLastNode(e){let{context:t,prop:n}=e,i=n("collection"),r=lt(t.get("selectedValue")),s=[],a=!1;i.visit({skip:_t(e),onEnter:o=>{let l=i.getNodeValue(o);l===r&&(a=!0),a&&s.push(l)}}),t.set("selectedValue",s)},clearPendingAborts({refs:e}){let t=e.get("pendingAborts");t.forEach(n=>n.abort()),t.clear()},toggleChecked({context:e,event:t,prop:n}){let i=n("collection");e.set("checkedValue",r=>t.isBranch?UV(i,t.value,r):yt(r,t.value))},setChecked({context:e,event:t}){e.set("checkedValue",t.value)},clearChecked({context:e}){e.set("checkedValue",[])},setRenamingValue({context:e,event:t,prop:n}){e.set("renamingValue",t.value);let i=n("onRenameStart");if(i){let r=n("collection"),s=r.getIndexPath(t.value);if(s){let a=r.at(s);a&&i({value:t.value,node:a,indexPath:s})}}},submitRenaming({context:e,event:t,prop:n,scope:i}){var c;let r=e.get("renamingValue");if(!r)return;let a=n("collection").getIndexPath(r);if(!a)return;let o=t.label.trim(),l=n("onBeforeRename");if(l&&!l({value:r,label:o,indexPath:a})){e.set("renamingValue",null),ke(i,r);return}(c=n("onRenameComplete"))==null||c({value:r,label:o,indexPath:a}),e.set("renamingValue",null),ke(i,r)},cancelRenaming({context:e,scope:t}){let n=e.get("renamingValue");e.set("renamingValue",null),n&&ke(t,n)},syncRenameInput({context:e,scope:t,prop:n}){let i=e.get("renamingValue");if(!i)return;let r=n("collection"),s=r.findNode(i);if(!s)return;let a=r.stringifyNode(s),o=Of(t,i);Me(o,a)},focusRenameInput({context:e,scope:t}){let n=e.get("renamingValue");if(!n)return;let i=Of(t,n);i&&(i.focus(),i.select())}}}};zV=_()(["ids","collection","dir","expandedValue","expandOnClick","defaultFocusedValue","focusedValue","getRootNode","id","onExpandedChange","onFocusChange","onSelectionChange","checkedValue","selectedValue","selectionMode","typeahead","defaultExpandedValue","defaultSelectedValue","defaultCheckedValue","onCheckedChange","onLoadChildrenComplete","onLoadChildrenError","loadChildren","canRename","onRenameStart","onBeforeRename","onRenameComplete","scrollToIndexFn"]),Ok=B(zV),YV=_()(["node","indexPath"]),wk=B(YV);XV=class extends K{constructor(t,n){var s;let i=(s=n.treeData)!=null?s:jV(t),r=tc({nodeToValue:a=>a.id,nodeToString:a=>a.name,rootNode:i});super(t,y(g({},n),{collection:r}));Y(this,"treeCollection");Y(this,"syncTree",()=>{let t=this.el.querySelector('[data-scope="tree-view"][data-part="tree"]');t&&(this.spreadProps(t,this.api.getTreeProps()),this.updateExistingTree(t))});this.treeCollection=r}initMachine(t){return new W(KV,g({},t))}initApi(){return WV(this.machine.service,q)}getNodeAt(t){var i;if(t.length===0)return;let n=this.treeCollection.rootNode;for(let r of t)if(n=(i=n==null?void 0:n.children)==null?void 0:i[r],!n)return;return n}updateExistingTree(t){this.spreadProps(t,this.api.getTreeProps());let n=t.querySelectorAll('[data-scope="tree-view"][data-part="branch"]');for(let r of n){let s=r.getAttribute("data-path");if(s==null)continue;let a=s.split("/").map(p=>parseInt(p,10)),o=this.getNodeAt(a);if(!o)continue;let l={indexPath:a,node:o};this.spreadProps(r,this.api.getBranchProps(l));let c=r.querySelector('[data-scope="tree-view"][data-part="branch-control"]');c&&this.spreadProps(c,this.api.getBranchControlProps(l));let u=r.querySelector('[data-scope="tree-view"][data-part="branch-text"]');u&&this.spreadProps(u,this.api.getBranchTextProps(l));let h=r.querySelector('[data-scope="tree-view"][data-part="branch-indicator"]');h&&this.spreadProps(h,this.api.getBranchIndicatorProps(l));let m=r.querySelector('[data-scope="tree-view"][data-part="branch-content"]');m&&this.spreadProps(m,this.api.getBranchContentProps(l));let d=r.querySelector('[data-scope="tree-view"][data-part="branch-indent-guide"]');d&&this.spreadProps(d,this.api.getBranchIndentGuideProps(l))}let i=t.querySelectorAll('[data-scope="tree-view"][data-part="item"]');for(let r of i){let s=r.getAttribute("data-path");if(s==null)continue;let a=s.split("/").map(c=>parseInt(c,10)),o=this.getNodeAt(a);if(!o)continue;let l={indexPath:a,node:o};this.spreadProps(r,this.api.getItemProps(l))}}render(){var i;let t=(i=this.el.querySelector('[data-scope="tree-view"][data-part="root"]'))!=null?i:this.el;this.spreadProps(t,this.api.getRootProps());let n=this.el.querySelector('[data-scope="tree-view"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps()),this.syncTree()}},ZV={mounted(){var i;let e=this.el,t=this.pushEvent.bind(this),n=new XV(e,y(g({id:e.id},C(e,"controlled")?{expandedValue:Z(e,"expandedValue"),selectedValue:Z(e,"selectedValue")}:{defaultExpandedValue:Z(e,"defaultExpandedValue"),defaultSelectedValue:Z(e,"defaultSelectedValue")}),{selectionMode:(i=w(e,"selectionMode",["single","multiple"]))!=null?i:"single",dir:Oe(e),onSelectionChange:r=>{var d;let s=C(e,"redirect"),a=(d=r.selectedValue)!=null&&d.length?r.selectedValue[0]:void 0,o=[...e.querySelectorAll('[data-scope="tree-view"][data-part="item"], [data-scope="tree-view"][data-part="branch"]')].find(p=>p.getAttribute("data-value")===a),l=(o==null?void 0:o.getAttribute("data-part"))==="item",c=o==null?void 0:o.getAttribute("data-redirect"),u=o==null?void 0:o.hasAttribute("data-new-tab");s&&a&&l&&this.liveSocket.main.isDead&&c!=="false"&&(u?window.open(a,"_blank","noopener,noreferrer"):window.location.href=a);let m=w(e,"onSelectionChange");m&&this.liveSocket.main.isConnected()&&t(m,{id:e.id,value:y(g({},r),{isItem:l!=null?l:!1})})},onExpandedChange:r=>{let s=w(e,"onExpandedChange");s&&this.liveSocket.main.isConnected()&&t(s,{id:e.id,value:r})}}));n.init(),this.treeView=n,this.onSetExpandedValue=r=>{let{value:s}=r.detail;n.api.setExpandedValue(s)},e.addEventListener("phx:tree-view:set-expanded-value",this.onSetExpandedValue),this.onSetSelectedValue=r=>{let{value:s}=r.detail;n.api.setSelectedValue(s)},e.addEventListener("phx:tree-view:set-selected-value",this.onSetSelectedValue),this.handlers=[],this.handlers.push(this.handleEvent("tree_view_set_expanded_value",r=>{let s=r.tree_view_id;s&&e.id!==s&&e.id!==`tree-view:${s}`||n.api.setExpandedValue(r.value)})),this.handlers.push(this.handleEvent("tree_view_set_selected_value",r=>{let s=r.tree_view_id;s&&e.id!==s&&e.id!==`tree-view:${s}`||n.api.setSelectedValue(r.value)})),this.handlers.push(this.handleEvent("tree_view_expanded_value",()=>{t("tree_view_expanded_value_response",{value:n.api.expandedValue})})),this.handlers.push(this.handleEvent("tree_view_selected_value",()=>{t("tree_view_selected_value_response",{value:n.api.selectedValue})}))},updated(){var e;C(this.el,"controlled")&&((e=this.treeView)==null||e.updateProps({expandedValue:Z(this.el,"expandedValue"),selectedValue:Z(this.el,"selectedValue")}))},destroyed(){var e;if(this.onSetExpandedValue&&this.el.removeEventListener("phx:tree-view:set-expanded-value",this.onSetExpandedValue),this.onSetSelectedValue&&this.el.removeEventListener("phx:tree-view:set-selected-value",this.onSetSelectedValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.treeView)==null||e.destroy()}}});var e0={};he(e0,{Hooks:()=>Da,default:()=>QV,hooks:()=>JV});function me(e,t){return{mounted(){return Ve(this,null,function*(){let r=(yield e())[t];if(this._realHook=r,r!=null&&r.mounted)return r.mounted.call(this)})},updated(){var i,r;(r=(i=this._realHook)==null?void 0:i.updated)==null||r.call(this)},destroyed(){var i,r;(r=(i=this._realHook)==null?void 0:i.destroyed)==null||r.call(this)},disconnected(){var i,r;(r=(i=this._realHook)==null?void 0:i.disconnected)==null||r.call(this)},reconnected(){var i,r;(r=(i=this._realHook)==null?void 0:i.reconnected)==null||r.call(this)},beforeUpdate(){var i,r;(r=(i=this._realHook)==null?void 0:i.beforeUpdate)==null||r.call(this)}}}var Da={Accordion:me(()=>Promise.resolve().then(()=>(uu(),cu)),"Accordion"),AngleSlider:me(()=>Promise.resolve().then(()=>(Ru(),Nu)),"AngleSlider"),Avatar:me(()=>Promise.resolve().then(()=>(Fu(),Mu)),"Avatar"),Carousel:me(()=>Promise.resolve().then(()=>(Wu(),qu)),"Carousel"),Checkbox:me(()=>Promise.resolve().then(()=>(ed(),Qu)),"Checkbox"),Clipboard:me(()=>Promise.resolve().then(()=>(nd(),td)),"Clipboard"),Collapsible:me(()=>Promise.resolve().then(()=>(rd(),id)),"Collapsible"),Combobox:me(()=>Promise.resolve().then(()=>(ih(),nh)),"Combobox"),DatePicker:me(()=>Promise.resolve().then(()=>(tg(),eg)),"DatePicker"),Dialog:me(()=>Promise.resolve().then(()=>(dg(),ug)),"Dialog"),Editable:me(()=>Promise.resolve().then(()=>(vg(),mg)),"Editable"),FloatingPanel:me(()=>Promise.resolve().then(()=>(xg(),Vg)),"FloatingPanel"),Listbox:me(()=>Promise.resolve().then(()=>(Lg(),Dg)),"Listbox"),Menu:me(()=>Promise.resolve().then(()=>(qg(),Ug)),"Menu"),NumberInput:me(()=>Promise.resolve().then(()=>(sp(),rp)),"NumberInput"),PasswordInput:me(()=>Promise.resolve().then(()=>(op(),ap)),"PasswordInput"),PinInput:me(()=>Promise.resolve().then(()=>(hp(),dp)),"PinInput"),RadioGroup:me(()=>Promise.resolve().then(()=>(yp(),vp)),"RadioGroup"),Select:me(()=>Promise.resolve().then(()=>(Op(),Tp)),"Select"),SignaturePad:me(()=>Promise.resolve().then(()=>(zp(),Kp)),"SignaturePad"),Switch:me(()=>Promise.resolve().then(()=>(Jp(),Zp)),"Switch"),Tabs:me(()=>Promise.resolve().then(()=>(rf(),nf)),"Tabs"),Timer:me(()=>Promise.resolve().then(()=>(lf(),of)),"Timer"),Toast:me(()=>Promise.resolve().then(()=>(yf(),vf)),"Toast"),ToggleGroup:me(()=>Promise.resolve().then(()=>(Sf(),Cf)),"ToggleGroup"),TreeView:me(()=>Promise.resolve().then(()=>(Af(),xf)),"TreeView")};function JV(e){return Object.fromEntries(e.filter(t=>t in Da).map(t=>[t,Da[t]]))}var QV=Da;return Uf(e0);})(); From 505b08c84ccfacbccc84ae94514160111d95ad27 Mon Sep 17 00:00:00 2001 From: karimsemmoud Date: Thu, 19 Feb 2026 11:53:00 +0700 Subject: [PATCH 2/9] Add Captures --- README.md | 124 ++++--- assets/hooks/angle-slider.ts | 24 +- e2e/assets/corex/components/accordion.css | 22 +- e2e/lib/e2e_web/captures/accordion.ex | 212 ++++++++++-- e2e/lib/e2e_web/captures/angle_slider.ex | 50 +++ e2e/lib/e2e_web/captures/listbox.ex | 57 ++++ e2e/lib/e2e_web/captures/select.ex | 56 ++++ .../components/layouts/captures.html.heex | 199 +++++++++++ .../page_html/accordion_page.html.heex | 27 +- e2e/lib/e2e_web/endpoint.ex | 6 + .../e2e_web/live/accordion_controlled_live.ex | 10 +- e2e/lib/e2e_web/live/accordion_live.ex | 15 +- e2e/lib/e2e_web/live/accordion_play_live.ex | 14 +- .../live/angle_slider_controlled_live.ex | 1 - .../e2e_web/live/angle_slider_play_live.ex | 3 - e2e/lib/e2e_web/live_capture.ex | 5 +- e2e/lib/e2e_web/plugs/locale.ex | 12 +- e2e/lib/e2e_web/router.ex | 7 +- guides/installation.md | 122 ++++--- lib/components/accordion.ex | 315 ++++++++++++------ lib/components/angle_slider.ex | 10 +- lib/components/angle_slider/anatomy.ex | 50 ++- lib/components/angle_slider/connect.ex | 28 +- lib/corex.ex | 2 - priv/static/angle-slider.mjs | 2 + priv/static/corex.js | 2 + priv/static/corex.min.js | 8 +- 27 files changed, 1046 insertions(+), 337 deletions(-) create mode 100644 e2e/lib/e2e_web/captures/angle_slider.ex create mode 100644 e2e/lib/e2e_web/captures/listbox.ex create mode 100644 e2e/lib/e2e_web/captures/select.ex create mode 100644 e2e/lib/e2e_web/components/layouts/captures.html.heex diff --git a/README.md b/README.md index 9e27708..44f3f2c 100644 --- a/README.md +++ b/README.md @@ -207,7 +207,7 @@ Add the following Accordion example to your application. -### List + ### Basic You can use `Corex.Content.new/1` to create a list of content items. @@ -226,13 +226,11 @@ Add the following Accordion example to your application. /> ``` -### List Custom + ### With indicator - Similar to List but render a custom item slot that will be used for all items. + Use the optional `:indicator` slot to add an icon after each trigger. - Use `{item.data.trigger}` and `{item.data.content}` to render the trigger and content for each item. - - This example assumes the import of `.icon` from Core Components. + This example assumes the import of `.icon` from `Core Components` ```heex <.accordion @@ -241,43 +239,72 @@ Add the following Accordion example to your application. [ id: "lorem", trigger: "Lorem ipsum dolor sit amet", - content: "Consectetur adipiscing elit. Sed sodales ullamcorper tristique.", - meta: %{indicator: "hero-chevron-right"} + content: "Consectetur adipiscing elit. Sed sodales ullamcorper tristique." ], [ trigger: "Duis dictum gravida odio ac pharetra?", - content: "Nullam eget vestibulum ligula, at interdum tellus.", - meta: %{indicator: "hero-chevron-right"} + content: "Nullam eget vestibulum ligula, at interdum tellus." ], [ id: "donec", trigger: "Donec condimentum ex mi", - content: "Congue molestie ipsum gravida a. Sed ac eros luctus.", - disabled: true, - meta: %{indicator: "hero-chevron-right"} + content: "Congue molestie ipsum gravida a. Sed ac eros luctus." ] ])} > - <:item :let={item}> - <.accordion_trigger item={item}> - {item.data.trigger} - <:indicator> - <.icon name={item.data.meta.indicator} /> - - - - <.accordion_content item={item}> - {item.data.content} - - + <:indicator> + <.icon name="hero-chevron-right" /> + + + ``` + + ### Custom + + Use `:trigger` and `:content` together to fully customize how each item is rendered. Add the `:indicator` slot to show an icon after each trigger. Use `:let={item}` on slots to access the item and its `data` (including `meta` for per-item customization). + + ```heex + <.accordion + class="accordion" + items={ + Corex.Content.new([ + [ + id: "lorem", + trigger: "Lorem ipsum dolor sit amet", + content: "Consectetur adipiscing elit. Sed sodales ullamcorper tristique.", + meta: %{indicator: "hero-arrow-long-right", icon: "hero-chat-bubble-left-right"} + ], + [ + trigger: "Duis dictum gravida ?", + content: "Nullam eget vestibulum ligula, at interdum tellus.", + meta: %{indicator: "hero-chevron-right", icon: "hero-device-phone-mobile"} + ], + [ + id: "donec", + trigger: "Donec condimentum ex mi", + content: "Congue molestie ipsum gravida a. Sed ac eros luctus.", + disabled: true, + meta: %{indicator: "hero-chevron-double-right", icon: "hero-phone"} + ] + ]) + } + > + <:trigger :let={item}> + <.icon name={item.data.meta.icon} />{item.data.trigger} + + <:content :let={item}>{item.data.content} + <:indicator :let={item}> + <.icon name={item.data.meta.indicator} /> + ``` -### Controlled + ### Controlled Render an accordion controlled by the server. - Use the `on_value_change` event to update the value on the server and pass the value as a list of strings. The event receives a map with the key `value` and the id of the accordion. + You must use the `on_value_change` event to update the value on the server and pass the value as a list of strings. + + The event will receive the value as a map with the key `value` and the id of the accordion. ```elixir defmodule MyAppWeb.AccordionLive do @@ -308,9 +335,11 @@ Add the following Accordion example to your application. end ``` -### Async + ### Async + + When the initial props are not available on mount, you can use the `Phoenix.LiveView.assign_async` function to assign the props asynchronously - When the initial props are not available on mount, use `Phoenix.LiveView.assign_async/3` to assign the props asynchronously. You can use `Corex.Accordion.accordion_skeleton/1` to render a loading or error state. + You can use the optional `Corex.Accordion.accordion_skeleton/1` to render a loading or error state ```elixir defmodule MyAppWeb.AccordionAsyncLive do @@ -322,25 +351,24 @@ Add the following Accordion example to your application. |> assign_async(:accordion, fn -> Process.sleep(1000) - items = - Corex.Content.new([ - [ - id: "lorem", - trigger: "Lorem ipsum dolor sit amet", - content: "Consectetur adipiscing elit. Sed sodales ullamcorper tristique.", - disabled: true - ], - [ - id: "duis", - trigger: "Duis dictum gravida odio ac pharetra?", - content: "Nullam eget vestibulum ligula, at interdum tellus." - ], - [ - id: "donec", - trigger: "Donec condimentum ex mi", - content: "Congue molestie ipsum gravida a. Sed ac eros luctus." - ] - ]) + items = Corex.Content.new([ + [ + id: "lorem", + trigger: "Lorem ipsum dolor sit amet", + content: "Consectetur adipiscing elit. Sed sodales ullamcorper tristique.", + disabled: true + ], + [ + id: "duis", + trigger: "Duis dictum gravida odio ac pharetra?", + content: "Nullam eget vestibulum ligula, at interdum tellus." + ], + [ + id: "donec", + trigger: "Donec condimentum ex mi", + content: "Congue molestie ipsum gravida a. Sed ac eros luctus." + ] + ]) {:ok, %{ diff --git a/assets/hooks/angle-slider.ts b/assets/hooks/angle-slider.ts index ad0327b..d311484 100644 --- a/assets/hooks/angle-slider.ts +++ b/assets/hooks/angle-slider.ts @@ -26,6 +26,9 @@ const AngleSliderHook: Hook = { invalid: getBoolean(el, "invalid"), name: getString(el, "name"), dir: getString<"ltr" | "rtl">(el, "dir", ["ltr", "rtl"]), + "aria-label": getString(el, "aria-label"), + "aria-labelledby": getString(el, "aria-labelledby"), + onValueChange: (details: ValueChangeDetails) => { // if (skipNextOnValueChange) { // skipNextOnValueChange = false; @@ -51,18 +54,18 @@ const AngleSliderHook: Hook = { // if (controlled) { // skipNextOnValueChange = true; // zag.api.setValue(details.value); - // } - // const hiddenInput = el.querySelector( + // } + // const hiddenInput = el.querySelector( // '[data-scope="angle-slider"][data-part="hidden-input"]' // ); - // const hiddenInput = el.querySelector( - // '[data-scope="angle-slider"][data-part="hidden-input"]' - // ); - // if (hiddenInput) { - // hiddenInput.value = String(details.value); - // hiddenInput.dispatchEvent(new Event("input", { bubbles: true })); - // hiddenInput.dispatchEvent(new Event("change", { bubbles: true })); - // } + // const hiddenInput = el.querySelector( + // '[data-scope="angle-slider"][data-part="hidden-input"]' + // ); + // if (hiddenInput) { + // hiddenInput.value = String(details.value); + // hiddenInput.dispatchEvent(new Event("input", { bubbles: true })); + // hiddenInput.dispatchEvent(new Event("change", { bubbles: true })); + // } const eventName = getString(el, "onValueChange"); if (eventName && !this.liveSocket.main.isDead && this.liveSocket.main.isConnected()) { this.pushEvent(eventName, { @@ -161,7 +164,6 @@ const AngleSliderHook: Hook = { name: getString(this.el, "name"), dir: getString<"ltr" | "rtl">(this.el, "dir", ["ltr", "rtl"]), } as Partial); - }, destroyed(this: object & HookInterface & AngleSliderHookState) { diff --git a/e2e/assets/corex/components/accordion.css b/e2e/assets/corex/components/accordion.css index 3ae7645..3f8e3b9 100644 --- a/e2e/assets/corex/components/accordion.css +++ b/e2e/assets/corex/components/accordion.css @@ -35,17 +35,25 @@ .accordion [data-scope="accordion"][data-part="item-text"] { width: 100%; + display: flex; + align-items: center; + gap: var(--spacing-ui-gap); } - .accordion [data-scope="accordion"][data-part="item"][data-state="closed"] [data-scope="accordion"][data-part="item-indicator"][data-open], - .accordion [data-scope="accordion"][data-part="item"][data-state="open"] [data-scope="accordion"][data-part="item-indicator"][data-closed] { - display: none; - transform: none; + .accordion [data-scope="accordion"][data-part="item"][data-state="closed"] [data-scope="accordion"][data-part="item-indicator"] .state-open, + .accordion [data-scope="accordion"][data-part="item"][data-state="open"] [data-scope="accordion"][data-part="item-indicator"] .state-closed { + @apply ui-icon; + + display: none!important; + } - .accordion [data-scope="accordion"][data-part="item"][data-state="open"] [data-scope="accordion"][data-part="item-indicator"][data-open], - .accordion [data-scope="accordion"][data-part="item"][data-state="closed"] [data-scope="accordion"][data-part="item-indicator"][data-closed] { - transform: none; + .accordion [data-scope="accordion"][data-part="item"][data-state="open"] [data-scope="accordion"][data-part="item-indicator"] .state-open, + .accordion [data-scope="accordion"][data-part="item"][data-state="closed"] [data-scope="accordion"][data-part="item-indicator"] .state-closed { + @apply ui-icon; + + display: inline-block; + transform: rotate(-90deg)!important; } .accordion [data-scope="accordion"][data-part="item-content"] { diff --git a/e2e/lib/e2e_web/captures/accordion.ex b/e2e/lib/e2e_web/captures/accordion.ex index 35cd052..7ccf43a 100644 --- a/e2e/lib/e2e_web/captures/accordion.ex +++ b/e2e/lib/e2e_web/captures/accordion.ex @@ -3,41 +3,185 @@ defmodule E2eWeb.Captures.Accordion do use E2eWeb.LiveCapture alias Corex.Accordion - alias Corex.Accordion.Anatomy.Item - - capture attributes: %{ - id: "accordion-capture", - value: ["item-0"], - class: "accordion", - item: [ - %{ - inner_block: """ - <.accordion_trigger item={item(@id, "item-0", @value)}> - Lorem ipsum dolor sit amet - - - <.accordion_content item={item(@id, "item-0", @value)}> - Consectetur adipiscing elit. - - """ - }, - %{ - inner_block: """ - <.accordion_trigger item={item(@id, "item-1", @value)}> - Duis dictum gravida odio ac pharetra? - - - <.accordion_content item={item(@id, "item-1", @value)}> - Nullam eget vestibulum ligula, at interdum tellus. - - """ - } - ] - } + alias Corex.Content + alias E2eWeb.CoreComponents + + capture variants: [ + basic: %{ + class: "accordion", + items: + Content.new([ + [ + trigger: "Lorem ipsum dolor sit amet", + content: "Consectetur adipiscing elit. Sed sodales ullamcorper tristique." + ], + [ + trigger: "Duis dictum gravida odio ac pharetra?", + content: "Nullam eget vestibulum ligula, at interdum tellus." + ], + [ + trigger: "Donec condimentum ex mi", + content: "Congue molestie ipsum gravida a. Sed ac eros luctus." + ] + ]) + }, + with_indicator: %{ + class: "accordion", + items: + Content.new([ + [ + trigger: "Lorem ipsum dolor sit amet", + content: "Consectetur adipiscing elit. Sed sodales ullamcorper tristique." + ], + [ + trigger: "Duis dictum gravida ?", + content: "Nullam eget vestibulum ligula, at interdum tellus." + ], + [ + trigger: "Donec condimentum ex mi", + content: "Congue molestie ipsum gravida a. Sed ac eros luctus." + ] + ]), + indicator: [%{inner_block: &__MODULE__.indicator/2}] + }, + with_switching_indicator: %{ + class: "accordion", + items: + Content.new([ + [ + trigger: "Lorem ipsum dolor sit amet", + content: "Consectetur adipiscing elit. Sed sodales ullamcorper tristique." + ], + [ + trigger: "Duis dictum gravida ?", + content: "Nullam eget vestibulum ligula, at interdum tellus." + ], + [ + trigger: "Donec condimentum ex mi", + content: "Congue molestie ipsum gravida a. Sed ac eros luctus." + ] + ]), + indicator: [%{inner_block: &__MODULE__.switching_indicator/2}] + }, + with_value: %{ + class: "accordion", + value: ["lorem", "donec"], + items: + Content.new([ + [ + id: "lorem", + trigger: "Lorem ipsum dolor sit amet", + content: "Consectetur adipiscing elit. Sed sodales ullamcorper tristique." + ], + [ + id: "duis", + trigger: "Duis dictum gravida odio ac pharetra?", + content: "Nullam eget vestibulum ligula, at interdum tellus." + ], + [ + id: "donec", + trigger: "Donec condimentum ex mi", + content: "Congue molestie ipsum gravida a. Sed ac eros luctus." + ] + ]) + }, + with_disabled: %{ + class: "accordion", + value: ["lorem"], + items: + Content.new([ + [ + id: "lorem", + trigger: "Lorem ipsum dolor sit amet", + content: "Consectetur adipiscing elit. Sed sodales ullamcorper tristique.", + disabled: true + ], + [ + id: "duis", + trigger: "Duis dictum gravida odio ac pharetra?", + content: "Nullam eget vestibulum ligula, at interdum tellus." + ], + [ + id: "donec", + trigger: "Donec condimentum ex mi", + content: "Congue molestie ipsum gravida a. Sed ac eros luctus." + ] + ]) + }, + with_custom_slots: %{ + class: "accordion", + value: ["lorem"], + items: + Content.new([ + [ + id: "lorem", + trigger: "Lorem ipsum dolor sit amet", + content: "Consectetur adipiscing elit. Sed sodales ullamcorper tristique.", + meta: %{ + indicator: "hero-arrow-long-right", + icon: "hero-chat-bubble-left-right" + } + ], + [ + trigger: "Duis dictum gravida ?", + content: "Nullam eget vestibulum ligula, at interdum tellus.", + meta: %{indicator: "hero-chevron-right", icon: "hero-device-phone-mobile"} + ], + [ + id: "donec", + trigger: "Donec condimentum ex mi", + content: "Congue molestie ipsum gravida a. Sed ac eros luctus.", + disabled: true, + meta: %{indicator: "hero-chevron-double-right", icon: "hero-phone"} + ] + ]), + trigger: [%{inner_block: &__MODULE__.custom_trigger/2}], + content: [%{inner_block: &__MODULE__.custom_content/2}], + indicator: [%{inner_block: &__MODULE__.custom_indicator/2}] + } + ] defdelegate accordion(assigns), to: Accordion - defdelegate accordion_trigger(assigns), to: Accordion - defdelegate accordion_content(assigns), to: Accordion + defdelegate icon(assigns), to: CoreComponents + + def custom_trigger(_changed, item) do + assigns = %{item: item} + + ~H""" + <.icon name={@item.data.meta.icon} />{@item.data.trigger} + """ + end + + def custom_content(_changed, item) do + assigns = %{item: item} + + ~H""" + {@item.data.content} + """ + end + + def custom_indicator(_changed, item) do + assigns = %{item: item} + + ~H""" + <.icon name={@item.data.meta.indicator} /> + """ + end + + def indicator(_changed, item) do + assigns = %{item: item} + + ~H""" + <.icon name="hero-chevron-right" /> + """ + end + + def switching_indicator(_changed, item) do + assigns = %{item: item} - def item(id, value, values), do: %Item{id: id, value: value, values: values} + ~H""" + <.icon name="hero-plus" class="state-closed" /> + <.icon name="hero-minus" class="state-open" /> + """ + end end diff --git a/e2e/lib/e2e_web/captures/angle_slider.ex b/e2e/lib/e2e_web/captures/angle_slider.ex new file mode 100644 index 0000000..9fd5393 --- /dev/null +++ b/e2e/lib/e2e_web/captures/angle_slider.ex @@ -0,0 +1,50 @@ +defmodule E2eWeb.Captures.AngleSlider do + use Phoenix.Component + use E2eWeb.LiveCapture + + alias Corex.AngleSlider + + capture variants: [ + basic: %{ + class: "angle-slider", + label: [%{inner_block: "Angle"}] + }, + with_markers: %{ + class: "angle-slider", + marker_values: [0, 90, 180, 270], + label: [%{inner_block: "Angle"}] + }, + with_value: %{ + class: "angle-slider", + value: 90, + label: [%{inner_block: "Angle"}] + }, + disabled: %{ + class: "angle-slider", + value: 45, + disabled: true, + label: [%{inner_block: "Angle"}] + }, + read_only: %{ + class: "angle-slider", + value: 180, + read_only: true, + label: [%{inner_block: "Angle"}] + }, + invalid: %{ + class: "angle-slider", + value: 270, + invalid: true, + label: [%{inner_block: "Angle"}] + }, + with_step: %{ + class: "angle-slider", + value: 45, + step: 15, + marker_values: [0, 45, 90, 135, 180, 225, 270, 315], + label: [%{inner_block: "Angle"}] + } + ] + + defdelegate angle_slider(assigns), to: AngleSlider +end diff --git a/e2e/lib/e2e_web/captures/listbox.ex b/e2e/lib/e2e_web/captures/listbox.ex new file mode 100644 index 0000000..a32b2bf --- /dev/null +++ b/e2e/lib/e2e_web/captures/listbox.ex @@ -0,0 +1,57 @@ +defmodule E2eWeb.Captures.Listbox do + use Phoenix.Component + use E2eWeb.LiveCapture + + alias Corex.Listbox + alias E2eWeb.CoreComponents + + @collection [ + %{label: "France", id: "fra", disabled: true}, + %{label: "Belgium", id: "bel"}, + %{label: "Germany", id: "deu"}, + %{label: "Netherlands", id: "nld"}, + %{label: "Switzerland", id: "che"}, + %{label: "Austria", id: "aut"} + ] + + @grouped_collection [ + %{label: "France", id: "fra", group: "Europe"}, + %{label: "Belgium", id: "bel", group: "Europe"}, + %{label: "Germany", id: "deu", group: "Europe"}, + %{label: "Netherlands", id: "nld", group: "Europe"}, + %{label: "Switzerland", id: "che", group: "Europe"}, + %{label: "Austria", id: "aut", group: "Europe"}, + %{label: "Japan", id: "jpn", group: "Asia"}, + %{label: "China", id: "chn", group: "Asia"}, + %{label: "South Korea", id: "kor", group: "Asia"}, + %{label: "USA", id: "usa", group: "North America"}, + %{label: "Canada", id: "can", group: "North America"}, + %{label: "Mexico", id: "mex", group: "North America"} + ] + + capture variants: [ + basic: %{ + class: "listbox", + collection: @collection, + label: [%{inner_block: "Choose a country"}], + item_indicator: [%{inner_block: "<.icon name=\"hero-check\" />"}] + }, + grouped: %{ + class: "listbox", + collection: @grouped_collection, + label: [%{inner_block: "Choose a country"}], + item_indicator: [%{inner_block: "<.icon name=\"hero-check\" />"}] + }, + multiple: %{ + class: "listbox", + collection: @collection, + value: ["bel", "deu"], + selection_mode: "multiple", + label: [%{inner_block: "Choose countries"}], + item_indicator: [%{inner_block: "<.icon name=\"hero-check\" />"}] + } + ] + + defdelegate listbox(assigns), to: Listbox + defdelegate icon(assigns), to: CoreComponents +end diff --git a/e2e/lib/e2e_web/captures/select.ex b/e2e/lib/e2e_web/captures/select.ex new file mode 100644 index 0000000..a5b01f7 --- /dev/null +++ b/e2e/lib/e2e_web/captures/select.ex @@ -0,0 +1,56 @@ +defmodule E2eWeb.Captures.Select do + use Phoenix.Component + use E2eWeb.LiveCapture + + alias Corex.Select + alias E2eWeb.CoreComponents + + @collection [ + %{label: "France", id: "fra", disabled: true}, + %{label: "Belgium", id: "bel"}, + %{label: "Germany", id: "deu"}, + %{label: "Netherlands", id: "nld"}, + %{label: "Switzerland", id: "che"}, + %{label: "Austria", id: "aut"} + ] + + @grouped_collection [ + %{label: "France", id: "fra", group: "Europe"}, + %{label: "Belgium", id: "bel", group: "Europe"}, + %{label: "Germany", id: "deu", group: "Europe"}, + %{label: "Netherlands", id: "nld", group: "Europe"}, + %{label: "Switzerland", id: "che", group: "Europe"}, + %{label: "Austria", id: "aut", group: "Europe"}, + %{label: "Japan", id: "jpn", group: "Asia"}, + %{label: "China", id: "chn", group: "Asia"}, + %{label: "South Korea", id: "kor", group: "Asia"}, + %{label: "USA", id: "usa", group: "North America"}, + %{label: "Canada", id: "can", group: "North America"}, + %{label: "Mexico", id: "mex", group: "North America"} + ] + + capture variants: [ + basic: %{ + class: "select", + placeholder_text: "Select a country", + collection: @collection, + trigger: [%{inner_block: "<.icon name=\"hero-chevron-down\" />"}] + }, + grouped: %{ + class: "select", + placeholder_text: "Select a country", + collection: @grouped_collection, + trigger: [%{inner_block: "<.icon name=\"hero-chevron-down\" />"}] + }, + with_value: %{ + class: "select", + placeholder_text: "Select a country", + collection: @collection, + value: ["bel"], + trigger: [%{inner_block: "<.icon name=\"hero-chevron-down\" />"}] + } + ] + + defdelegate select(assigns), to: Select + defdelegate icon(assigns), to: CoreComponents +end diff --git a/e2e/lib/e2e_web/components/layouts/captures.html.heex b/e2e/lib/e2e_web/components/layouts/captures.html.heex new file mode 100644 index 0000000..9cd2be5 --- /dev/null +++ b/e2e/lib/e2e_web/components/layouts/captures.html.heex @@ -0,0 +1,199 @@ + + + + + + + <.live_title default="Corex" suffix=" · Elixir Phoenix Framework UI Library"> + {assigns[:page_title]} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ <.mode_toggle mode={@mode} /> + +
+
+
+
+
+
+ {@inner_content} +
+
+
+ + diff --git a/e2e/lib/e2e_web/controllers/page_html/accordion_page.html.heex b/e2e/lib/e2e_web/controllers/page_html/accordion_page.html.heex index e0b783b..99ea30b 100644 --- a/e2e/lib/e2e_web/controllers/page_html/accordion_page.html.heex +++ b/e2e/lib/e2e_web/controllers/page_html/accordion_page.html.heex @@ -21,43 +21,30 @@ + <.accordion - id="my-accordion" class="accordion" items={ Corex.Content.new([ [ id: "lorem", trigger: "Lorem ipsum dolor sit amet", - content: "Consectetur adipiscing elit. Sed sodales ullamcorper tristique.", - meta: %{indicator: "hero-chevron-right"} + content: "Consectetur adipiscing elit. Sed sodales ullamcorper tristique." ], [ trigger: "Duis dictum gravida odio ac pharetra?", - content: "Nullam eget vestibulum ligula, at interdum tellus.", - meta: %{indicator: "hero-chevron-right"} + content: "Nullam eget vestibulum ligula, at interdum tellus." ], [ id: "donec", trigger: "Donec condimentum ex mi", - content: "Congue molestie ipsum gravida a. Sed ac eros luctus.", - disabled: true, - meta: %{indicator: "hero-chevron-right"} + content: "Congue molestie ipsum gravida a. Sed ac eros luctus." ] ]) } > - <:item :let={item}> - <.accordion_trigger item={item}> - {item.data.trigger} - <:indicator> - <.icon name={item.data.meta.indicator} /> - - - - <.accordion_content item={item}> - {item.data.content} - - + <:indicator> + <.icon name="hero-chevron-right" /> + diff --git a/e2e/lib/e2e_web/endpoint.ex b/e2e/lib/e2e_web/endpoint.ex index 045bfb1..9669ad8 100644 --- a/e2e/lib/e2e_web/endpoint.ex +++ b/e2e/lib/e2e_web/endpoint.ex @@ -22,6 +22,12 @@ defmodule E2eWeb.Endpoint do only: E2eWeb.static_paths(), raise_on_missing_only: code_reloading? + plug Plug.Static, + at: "/captures", + from: :live_capture, + only: ~w(css js), + gzip: not code_reloading? + # Code reloading can be explicitly enabled under the # :code_reloader configuration of your endpoint. if code_reloading? do diff --git a/e2e/lib/e2e_web/live/accordion_controlled_live.ex b/e2e/lib/e2e_web/live/accordion_controlled_live.ex index c07dff1..7c28366 100644 --- a/e2e/lib/e2e_web/live/accordion_controlled_live.ex +++ b/e2e/lib/e2e_web/live/accordion_controlled_live.ex @@ -95,14 +95,8 @@ defmodule E2eWeb.AccordionControlledLive do on_value_change="on_value_change" on_focus_change="on_focus_change" > - <:item :let={item}> - <.accordion_trigger item={item}> - {item.data.trigger} - - <.accordion_content item={item}> - {item.data.content} - - + <:trigger :let={item}>{item.data.trigger} + <:content :let={item}>{item.data.content} """ diff --git a/e2e/lib/e2e_web/live/accordion_live.ex b/e2e/lib/e2e_web/live/accordion_live.ex index 900f4cb..0a41b9e 100644 --- a/e2e/lib/e2e_web/live/accordion_live.ex +++ b/e2e/lib/e2e_web/live/accordion_live.ex @@ -111,18 +111,9 @@ defmodule E2eWeb.AccordionLive do ]) } > - <:item :let={item}> - <.accordion_trigger item={item}> - {item.data.trigger} - <:indicator> - <.icon name={item.data.meta.indicator} /> - - - - <.accordion_content item={item}> - {item.data.content} - - + <:indicator :let={item}> + <.icon name={item.data.meta.indicator} /> + """ diff --git a/e2e/lib/e2e_web/live/accordion_play_live.ex b/e2e/lib/e2e_web/live/accordion_play_live.ex index 12b9870..534c526 100644 --- a/e2e/lib/e2e_web/live/accordion_play_live.ex +++ b/e2e/lib/e2e_web/live/accordion_play_live.ex @@ -157,17 +157,9 @@ defmodule E2eWeb.AccordionPlayLive do orientation={@controls.orientation} dir={@controls.dir} > - <:item :let={item}> - <.accordion_trigger item={item}> - {item.data.trigger} - <:indicator> - <.icon name="hero-chevron-right" /> - - - <.accordion_content item={item}> - {item.data.content} - - + <:indicator :let={_item}> + <.icon name="hero-chevron-right" /> + """ diff --git a/e2e/lib/e2e_web/live/angle_slider_controlled_live.ex b/e2e/lib/e2e_web/live/angle_slider_controlled_live.ex index eec83dd..8773037 100644 --- a/e2e/lib/e2e_web/live/angle_slider_controlled_live.ex +++ b/e2e/lib/e2e_web/live/angle_slider_controlled_live.ex @@ -81,7 +81,6 @@ defmodule E2eWeb.AngleSliderControlledLive do class="angle-slider" marker_values={[0, 90, 180, 270]} value={@angle} - on_value_change="angle_changed" > <:label>Angle diff --git a/e2e/lib/e2e_web/live/angle_slider_play_live.ex b/e2e/lib/e2e_web/live/angle_slider_play_live.ex index 316bc51..9c6691d 100644 --- a/e2e/lib/e2e_web/live/angle_slider_play_live.ex +++ b/e2e/lib/e2e_web/live/angle_slider_play_live.ex @@ -100,7 +100,6 @@ defmodule E2eWeb.AngleSliderPlayLive do <.switch class="switch" id="disabled" - checked={@controls.disabled} on_checked_change="control_changed" > @@ -128,7 +127,6 @@ defmodule E2eWeb.AngleSliderPlayLive do <.switch class="switch" id="show_markers" - checked={@controls.show_markers} on_checked_change="control_changed" > @@ -165,7 +163,6 @@ defmodule E2eWeb.AngleSliderPlayLive do disabled={@controls.disabled} read_only={@controls.read_only} invalid={@controls.invalid} - on_value_change="angle_changed" > <:label>Angle diff --git a/e2e/lib/e2e_web/live_capture.ex b/e2e/lib/e2e_web/live_capture.ex index 0f20f24..7e4a3a1 100644 --- a/e2e/lib/e2e_web/live_capture.ex +++ b/e2e/lib/e2e_web/live_capture.ex @@ -1,5 +1,8 @@ defmodule E2eWeb.LiveCapture do use LiveCapture.Component - root_layout {E2eWeb.Layouts, :root} + breakpoints s: "320px", m: "480px", l: "768px", xl: "1024px" + + root_layout {E2eWeb.Layouts, :captures} + plugs [E2eWeb.Plugs.Mode, E2eWeb.Plugs.Locale] end diff --git a/e2e/lib/e2e_web/plugs/locale.ex b/e2e/lib/e2e_web/plugs/locale.ex index daca547..c5192f1 100644 --- a/e2e/lib/e2e_web/plugs/locale.ex +++ b/e2e/lib/e2e_web/plugs/locale.ex @@ -39,10 +39,18 @@ defmodule E2eWeb.Plugs.Locale do end def call(conn, _opts) do - locale = determine_locale(conn) - redirect_with_locale(conn, locale, conn.request_path) + if skip_locale_redirect?(conn.request_path) do + locale = determine_locale(conn) + set_locale(conn, locale) + else + locale = determine_locale(conn) + redirect_with_locale(conn, locale, conn.request_path) + end end + defp skip_locale_redirect?("/captures" <> _), do: true + defp skip_locale_redirect?(_), do: false + defp determine_locale(conn) do conn.cookies[@cookie_key] || get_locale_from_referer(conn) || diff --git a/e2e/lib/e2e_web/router.ex b/e2e/lib/e2e_web/router.ex index a4a7058..7fe73a2 100644 --- a/e2e/lib/e2e_web/router.ex +++ b/e2e/lib/e2e_web/router.ex @@ -23,6 +23,11 @@ defmodule E2eWeb.Router do get "/", PageController, :home end + scope "/" do + pipe_through :browser + live_capture "/captures", [E2eWeb.LiveCapture] + end + scope "/:locale", E2eWeb do pipe_through :browser @@ -110,8 +115,6 @@ defmodule E2eWeb.Router do end resources "/users", UserController - - live_capture "/captures", E2eWeb.LiveCapture end # Other scopes may use custom stacks. diff --git a/guides/installation.md b/guides/installation.md index a2b0c84..ccbf056 100644 --- a/guides/installation.md +++ b/guides/installation.md @@ -195,11 +195,11 @@ For more details see [Corex Design](Mix.Tasks.Corex.Design.html) mix task use ## Add your first component -Add the following Accordion example to your application. +Add the following Accordion examples to your application. -### List +### Basic You can use `Corex.Content.new/1` to create a list of content items. @@ -218,13 +218,11 @@ Add the following Accordion example to your application. /> ``` -### List Custom +### With indicator - Similar to List but render a custom item slot that will be used for all items. + Use the optional `:indicator` slot to add an icon after each trigger. - Use `{item.data.trigger}` and `{item.data.content}` to render the trigger and content for each item. - - This example assumes the import of `.icon` from Core Components. + This example assumes the import of `.icon` from `Core Components` ```heex <.accordion @@ -233,35 +231,62 @@ Add the following Accordion example to your application. [ id: "lorem", trigger: "Lorem ipsum dolor sit amet", - content: "Consectetur adipiscing elit. Sed sodales ullamcorper tristique.", - meta: %{indicator: "hero-chevron-right"} + content: "Consectetur adipiscing elit. Sed sodales ullamcorper tristique." ], [ trigger: "Duis dictum gravida odio ac pharetra?", - content: "Nullam eget vestibulum ligula, at interdum tellus.", - meta: %{indicator: "hero-chevron-right"} + content: "Nullam eget vestibulum ligula, at interdum tellus." ], [ id: "donec", trigger: "Donec condimentum ex mi", - content: "Congue molestie ipsum gravida a. Sed ac eros luctus.", - disabled: true, - meta: %{indicator: "hero-chevron-right"} + content: "Congue molestie ipsum gravida a. Sed ac eros luctus." ] ])} > - <:item :let={item}> - <.accordion_trigger item={item}> - {item.data.trigger} - <:indicator> - <.icon name={item.data.meta.indicator} /> - - - - <.accordion_content item={item}> - {item.data.content} - - + <:indicator> + <.icon name="hero-chevron-right" /> + + + ``` + +### Custom + + Use `:trigger` and `:content` together to fully customize how each item is rendered. Add the `:indicator` slot to show an icon after each trigger. Use `:let={item}` on slots to access the item and its `data` (including `meta` for per-item customization). + + ```heex + <.accordion + class="accordion" + items={ + Corex.Content.new([ + [ + id: "lorem", + trigger: "Lorem ipsum dolor sit amet", + content: "Consectetur adipiscing elit. Sed sodales ullamcorper tristique.", + meta: %{indicator: "hero-arrow-long-right", icon: "hero-chat-bubble-left-right"} + ], + [ + trigger: "Duis dictum gravida ?", + content: "Nullam eget vestibulum ligula, at interdum tellus.", + meta: %{indicator: "hero-chevron-right", icon: "hero-device-phone-mobile"} + ], + [ + id: "donec", + trigger: "Donec condimentum ex mi", + content: "Congue molestie ipsum gravida a. Sed ac eros luctus.", + disabled: true, + meta: %{indicator: "hero-chevron-double-right", icon: "hero-phone"} + ] + ]) + } + > + <:trigger :let={item}> + <.icon name={item.data.meta.icon} />{item.data.trigger} + + <:content :let={item}>{item.data.content} + <:indicator :let={item}> + <.icon name={item.data.meta.indicator} /> + ``` @@ -269,7 +294,9 @@ Add the following Accordion example to your application. Render an accordion controlled by the server. - Use the `on_value_change` event to update the value on the server and pass the value as a list of strings. The event receives a map with the key `value` and the id of the accordion. + You must use the `on_value_change` event to update the value on the server and pass the value as a list of strings. + + The event will receive the value as a map with the key `value` and the id of the accordion. ```elixir defmodule MyAppWeb.AccordionLive do @@ -302,7 +329,9 @@ Add the following Accordion example to your application. ### Async - When the initial props are not available on mount, use `Phoenix.LiveView.assign_async/3` to assign the props asynchronously. You can use `Corex.Accordion.accordion_skeleton/1` to render a loading or error state. + When the initial props are not available on mount, you can use the `Phoenix.LiveView.assign_async` function to assign the props asynchronously + + You can use the optional `Corex.Accordion.accordion_skeleton/1` to render a loading or error state ```elixir defmodule MyAppWeb.AccordionAsyncLive do @@ -314,25 +343,24 @@ Add the following Accordion example to your application. |> assign_async(:accordion, fn -> Process.sleep(1000) - items = - Corex.Content.new([ - [ - id: "lorem", - trigger: "Lorem ipsum dolor sit amet", - content: "Consectetur adipiscing elit. Sed sodales ullamcorper tristique.", - disabled: true - ], - [ - id: "duis", - trigger: "Duis dictum gravida odio ac pharetra?", - content: "Nullam eget vestibulum ligula, at interdum tellus." - ], - [ - id: "donec", - trigger: "Donec condimentum ex mi", - content: "Congue molestie ipsum gravida a. Sed ac eros luctus." - ] - ]) + items = Corex.Content.new([ + [ + id: "lorem", + trigger: "Lorem ipsum dolor sit amet", + content: "Consectetur adipiscing elit. Sed sodales ullamcorper tristique.", + disabled: true + ], + [ + id: "duis", + trigger: "Duis dictum gravida odio ac pharetra?", + content: "Nullam eget vestibulum ligula, at interdum tellus." + ], + [ + id: "donec", + trigger: "Donec condimentum ex mi", + content: "Congue molestie ipsum gravida a. Sed ac eros luctus." + ] + ]) {:ok, %{ diff --git a/lib/components/accordion.ex b/lib/components/accordion.ex index 8a91cab..15f0d9e 100644 --- a/lib/components/accordion.ex +++ b/lib/components/accordion.ex @@ -6,7 +6,7 @@ defmodule Corex.Accordion do - ### List + ### Basic You can use `Corex.Content.new/1` to create a list of content items. @@ -25,11 +25,9 @@ defmodule Corex.Accordion do /> ``` - ### List Custom + ### With indicator - Similar to List but render a custom item slot that will be used for all items. - - Use `{item.data.trigger}` and `{item.data.content}` to render the trigger and content for each item. + Use the optional `:indicator` slot to add an icon after each trigger. This example assumes the import of `.icon` from `Core Components` @@ -40,35 +38,94 @@ defmodule Corex.Accordion do [ id: "lorem", trigger: "Lorem ipsum dolor sit amet", - content: "Consectetur adipiscing elit. Sed sodales ullamcorper tristique.", - meta: %{indicator: "hero-chevron-right"} + content: "Consectetur adipiscing elit. Sed sodales ullamcorper tristique." ], [ trigger: "Duis dictum gravida odio ac pharetra?", - content: "Nullam eget vestibulum ligula, at interdum tellus.", - meta: %{indicator: "hero-chevron-right"} + content: "Nullam eget vestibulum ligula, at interdum tellus." ], [ id: "donec", trigger: "Donec condimentum ex mi", - content: "Congue molestie ipsum gravida a. Sed ac eros luctus.", - disabled: true, - meta: %{indicator: "hero-chevron-right"} + content: "Congue molestie ipsum gravida a. Sed ac eros luctus." ] ])} > - <:item :let={item}> - <.accordion_trigger item={item}> - {item.data.trigger} - <:indicator> - <.icon name={item.data.meta.indicator} /> - - - - <.accordion_content item={item}> - {item.data.content} - - + <:indicator> + <.icon name="hero-chevron-right" /> + + + ``` + + You can use switching indicator using css classes `state-open` and `state-closed` on the indicator icon. + This classes simply target the data-state attribute of the item indicator. + + ```heex + <.accordion + class="accordion" + items={ + Corex.Content.new([ + [ + id: "lorem", + trigger: "Lorem ipsum dolor sit amet", + content: "Consectetur adipiscing elit. Sed sodales ullamcorper tristique." + ], + [ + trigger: "Duis dictum gravida odio ac pharetra?", + content: "Nullam eget vestibulum ligula, at interdum tellus." + ], + [ + id: "donec", + trigger: "Donec condimentum ex mi", + content: "Congue molestie ipsum gravida a. Sed ac eros luctus." + ] + ]) + } + > + <:indicator> + <.icon name="hero-plus" class="state-closed"/> + <.icon name="hero-minus" class="state-open"/> + + + ``` + + ### Custom + + Use `:trigger` and `:content` together to fully customize how each item is rendered. Add the `:indicator` slot to show an icon after each trigger. Use `:let={item}` on slots to access the item and its `data` (including `meta` for per-item customization). + + ```heex + <.accordion + class="accordion" + items={ + Corex.Content.new([ + [ + id: "lorem", + trigger: "Lorem ipsum dolor sit amet", + content: "Consectetur adipiscing elit. Sed sodales ullamcorper tristique.", + meta: %{indicator: "hero-arrow-long-right", icon: "hero-chat-bubble-left-right"} + ], + [ + trigger: "Duis dictum gravida ?", + content: "Nullam eget vestibulum ligula, at interdum tellus.", + meta: %{indicator: "hero-chevron-right", icon: "hero-device-phone-mobile"} + ], + [ + id: "donec", + trigger: "Donec condimentum ex mi", + content: "Congue molestie ipsum gravida a. Sed ac eros luctus.", + disabled: true, + meta: %{indicator: "hero-chevron-double-right", icon: "hero-phone"} + ] + ]) + } + > + <:trigger :let={item}> + <.icon name={item.data.meta.icon} />{item.data.trigger} + + <:content :let={item}>{item.data.content} + <:indicator :let={item}> + <.icon name={item.data.meta.indicator} /> + ``` @@ -240,7 +297,7 @@ defmodule Corex.Accordion do @doc """ Renders an accordion component. - Pass `items` as a list of `%Corex.Content.Item{}` structs. Optionally provide an `:item` slot to customize how each item is rendered (trigger and content). + Pass `items` as a list of `%Corex.Content.Item{}` structs. Use the optional `:indicator` slot to add content after each trigger. Use `:trigger` and `:content` together to fully customize item rendering. Each item MUST be a `%Corex.Content.Item{}` struct with: - `:id` (optional, auto-generated) - unique identifier for the item @@ -313,10 +370,22 @@ defmodule Corex.Accordion do attr(:rest, :global) - slot(:item, + slot(:indicator, + required: false, + doc: + "Optional slot for content after each trigger. Use :let={item} for per-item customization." + ) + + slot(:trigger, required: false, doc: - "Optional slot to customize how each item is rendered. Receives the item (list entry) as argument." + "Optional slot for custom trigger rendering. When provided with content, replaces default item rendering. Use :let={item} to access the item." + ) + + slot(:content, + required: false, + doc: + "Optional slot for custom content rendering. When provided with trigger, replaces default item rendering. Use :let={item} to access the item." ) def accordion(assigns) do @@ -341,7 +410,7 @@ defmodule Corex.Accordion do on_focus_change_client: @on_focus_change_client })}>
-
- <.accordion_trigger item={%Item{ - id: @id, - value: item_entry.id || "item-#{index}", - disabled: item_entry.disabled, - values: @value, - orientation: @orientation, - dir: @dir, - data: %{ - trigger: item_entry.trigger, - content: item_entry.content, - meta: item_entry.meta - } - }}> - {item_entry.trigger} - - <.accordion_content item={%Item{ +

+ +

+
+ dir: @dir + })}> {item_entry.content} - +
-
- <%= for item_slot <- @item || [] do %> - <%= render_slot(item_slot, %Item{ +

+ +

+
+ <%= for slot <- @content do %> + <%= render_slot(slot, %Item{ + id: @id, + value: item_entry.id || "item-#{index}", + disabled: item_entry.disabled, + values: @value, + orientation: @orientation, + dir: @dir, + data: %{ + trigger: item_entry.trigger, + content: item_entry.content, + meta: item_entry.meta + } + }) %> + <% end %> +
@@ -459,45 +607,6 @@ defmodule Corex.Accordion do |> Jason.encode!() end - @doc type: :component - @doc """ - Renders the accordion trigger button. Includes optional `:indicator` slot. - """ - attr(:item, :map, required: true) - slot(:inner_block, required: true) - slot(:indicator, required: false) - - def accordion_trigger(assigns) do - ~H""" -

- -

- """ - end - - @doc type: :component - @doc """ - Renders the accordion content area. - """ - - attr(:item, :map, required: true) - slot(:inner_block, required: true) - - def accordion_content(assigns) do - ~H""" -
- {render_slot(@inner_block)} -
- """ - end - @doc type: :component @doc """ Renders a loading skeleton for the accordion component. diff --git a/lib/components/angle_slider.ex b/lib/components/angle_slider.ex index 1661461..1ae9acd 100644 --- a/lib/components/angle_slider.ex +++ b/lib/components/angle_slider.ex @@ -177,14 +177,14 @@ defmodule Corex.AngleSlider do on_value_change_end_client: @on_value_change_end_client })} > -
-
+
+
{render_slot(@label)}
-
-
+
+
-
+
diff --git a/lib/components/angle_slider/anatomy.ex b/lib/components/angle_slider/anatomy.ex index 382aca2..2037ddc 100644 --- a/lib/components/angle_slider/anatomy.ex +++ b/lib/components/angle_slider/anatomy.ex @@ -40,16 +40,29 @@ defmodule Corex.AngleSlider.Anatomy do defmodule Root do @moduledoc false - defstruct [:id, :dir, :value] + defstruct [:id, :dir, :value, disabled: false, read_only: false, invalid: false] - @type t :: %__MODULE__{id: String.t(), dir: String.t(), value: number()} + @type t :: %__MODULE__{ + id: String.t(), + dir: String.t(), + value: number(), + disabled: boolean(), + read_only: boolean(), + invalid: boolean() + } end defmodule Label do @moduledoc false - defstruct [:id, :dir] + defstruct [:id, :dir, disabled: false, read_only: false, invalid: false] - @type t :: %__MODULE__{id: String.t(), dir: String.t()} + @type t :: %__MODULE__{ + id: String.t(), + dir: String.t(), + disabled: boolean(), + read_only: boolean(), + invalid: boolean() + } end defmodule HiddenInput do @@ -66,16 +79,28 @@ defmodule Corex.AngleSlider.Anatomy do defmodule Control do @moduledoc false - defstruct [:id, :dir] + defstruct [:id, :dir, disabled: false, read_only: false, invalid: false] - @type t :: %__MODULE__{id: String.t(), dir: String.t()} + @type t :: %__MODULE__{ + id: String.t(), + dir: String.t(), + disabled: boolean(), + read_only: boolean(), + invalid: boolean() + } end defmodule Thumb do @moduledoc false - defstruct [:id, :dir] + defstruct [:id, :dir, disabled: false, read_only: false, invalid: false] - @type t :: %__MODULE__{id: String.t(), dir: String.t()} + @type t :: %__MODULE__{ + id: String.t(), + dir: String.t(), + disabled: boolean(), + read_only: boolean(), + invalid: boolean() + } end defmodule ValueText do @@ -108,8 +133,13 @@ defmodule Corex.AngleSlider.Anatomy do defmodule Marker do @moduledoc false - defstruct [:id, :value, :slider_value] + defstruct [:id, :value, :slider_value, disabled: false] - @type t :: %__MODULE__{id: String.t(), value: number(), slider_value: number()} + @type t :: %__MODULE__{ + id: String.t(), + value: number(), + slider_value: number(), + disabled: boolean() + } end end diff --git a/lib/components/angle_slider/connect.ex b/lib/components/angle_slider/connect.ex index 7c57414..9d70126 100644 --- a/lib/components/angle_slider/connect.ex +++ b/lib/components/angle_slider/connect.ex @@ -46,8 +46,12 @@ defmodule Corex.AngleSlider.Connect do %{ "data-scope" => "angle-slider", "data-part" => "root", + "id" => "angle-slider:#{assigns.id}", "dir" => assigns.dir, - "style" => "--value:#{value};--angle:#{angle};" + "style" => "--value:#{value};--angle:#{angle};", + "data-disabled" => data_attr(assigns.disabled), + "data-invalid" => data_attr(assigns.invalid), + "data-readonly" => data_attr(assigns.read_only) } end @@ -56,8 +60,12 @@ defmodule Corex.AngleSlider.Connect do %{ "data-scope" => "angle-slider", "data-part" => "label", + "id" => "angle-slider:#{assigns.id}:label", + "for" => "angle-slider:#{assigns.id}:input", "dir" => assigns.dir, - "id" => "angle-slider:#{assigns.id}:label" + "data-disabled" => data_attr(assigns.disabled), + "data-invalid" => data_attr(assigns.invalid), + "data-readonly" => data_attr(assigns.read_only) } end @@ -79,8 +87,12 @@ defmodule Corex.AngleSlider.Connect do %{ "data-scope" => "angle-slider", "data-part" => "control", + "role" => "presentation", + "id" => "angle-slider:#{assigns.id}:control", "dir" => assigns.dir, - "id" => "angle-slider:#{assigns.id}:control" + "data-disabled" => data_attr(assigns.disabled), + "data-invalid" => data_attr(assigns.invalid), + "data-readonly" => data_attr(assigns.read_only) } end @@ -89,9 +101,12 @@ defmodule Corex.AngleSlider.Connect do %{ "data-scope" => "angle-slider", "data-part" => "thumb", - "dir" => assigns.dir, "id" => "angle-slider:#{assigns.id}:thumb", - "style" => "rotate:var(--angle);" + "dir" => assigns.dir, + "style" => "rotate:var(--angle);", + "data-disabled" => data_attr(assigns.disabled), + "data-invalid" => data_attr(assigns.invalid), + "data-readonly" => data_attr(assigns.read_only) } end @@ -146,7 +161,8 @@ defmodule Corex.AngleSlider.Connect do "data-value" => to_string(assigns.value), "data-state" => state, "id" => "angle-slider:#{assigns.id}:marker:#{assigns.value}", - "style" => "--marker-value:#{assigns.value};rotate:calc(var(--marker-value) * 1deg);" + "style" => "--marker-value:#{assigns.value};rotate:calc(var(--marker-value) * 1deg);", + "data-disabled" => data_attr(assigns.disabled) } end end diff --git a/lib/corex.ex b/lib/corex.ex index 3e8e323..8cf9edb 100644 --- a/lib/corex.ex +++ b/lib/corex.ex @@ -6,8 +6,6 @@ defmodule Corex do {Corex.Accordion, [ accordion: 1, - accordion_trigger: 1, - accordion_content: 1, accordion_skeleton: 1 ]}, combobox: {Corex.Combobox, [combobox: 1]}, diff --git a/priv/static/angle-slider.mjs b/priv/static/angle-slider.mjs index 8c9c1d5..24298f6 100644 --- a/priv/static/angle-slider.mjs +++ b/priv/static/angle-slider.mjs @@ -475,6 +475,8 @@ var AngleSliderHook = { invalid: getBoolean(el, "invalid"), name: getString(el, "name"), dir: getString(el, "dir", ["ltr", "rtl"]), + "aria-label": getString(el, "aria-label"), + "aria-labelledby": getString(el, "aria-labelledby"), onValueChange: (details) => { const eventName = getString(el, "onValueChange"); if (eventName && !this.liveSocket.main.isDead && this.liveSocket.main.isConnected()) { diff --git a/priv/static/corex.js b/priv/static/corex.js index 8d7b10a..b2d4634 100644 --- a/priv/static/corex.js +++ b/priv/static/corex.js @@ -4057,6 +4057,8 @@ var Corex = (() => { invalid: getBoolean(el, "invalid"), name: getString(el, "name"), dir: getString(el, "dir", ["ltr", "rtl"]), + "aria-label": getString(el, "aria-label"), + "aria-labelledby": getString(el, "aria-labelledby"), onValueChange: (details) => { const eventName = getString(el, "onValueChange"); if (eventName && !this.liveSocket.main.isDead && this.liveSocket.main.isConnected()) { diff --git a/priv/static/corex.min.js b/priv/static/corex.min.js index fd9c660..98057d6 100644 --- a/priv/static/corex.min.js +++ b/priv/static/corex.min.js @@ -1,11 +1,11 @@ -"use strict";var Corex=(()=>{var Kr=Object.defineProperty,Ff=Object.defineProperties,$f=Object.getOwnPropertyDescriptor,Hf=Object.getOwnPropertyDescriptors,Bf=Object.getOwnPropertyNames,Wr=Object.getOwnPropertySymbols;var Ha=Object.prototype.hasOwnProperty,rc=Object.prototype.propertyIsEnumerable;var Fa=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),_f=e=>{throw TypeError(e)};var $a=(e,t,n)=>t in e?Kr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g=(e,t)=>{for(var n in t||(t={}))Ha.call(t,n)&&$a(e,n,t[n]);if(Wr)for(var n of Wr(t))rc.call(t,n)&&$a(e,n,t[n]);return e},y=(e,t)=>Ff(e,Hf(t));var ft=(e,t)=>{var n={};for(var i in e)Ha.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&Wr)for(var i of Wr(e))t.indexOf(i)<0&&rc.call(e,i)&&(n[i]=e[i]);return n};var re=(e,t)=>()=>(e&&(t=e(e=0)),t);var he=(e,t)=>{for(var n in t)Kr(e,n,{get:t[n],enumerable:!0})},Gf=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Bf(t))!Ha.call(e,r)&&r!==n&&Kr(e,r,{get:()=>t[r],enumerable:!(i=$f(t,r))||i.enumerable});return e};var Uf=e=>Gf(Kr({},"__esModule",{value:!0}),e);var Y=(e,t,n)=>$a(e,typeof t!="symbol"?t+"":t,n);var Ve=(e,t,n)=>new Promise((i,r)=>{var s=l=>{try{o(n.next(l))}catch(c){r(c)}},a=l=>{try{o(n.throw(l))}catch(c){r(c)}},o=l=>l.done?i(l.value):Promise.resolve(l.value).then(s,a);o((n=n.apply(e,t)).next())}),qf=function(e,t){this[0]=e,this[1]=t};var sc=e=>{var t=e[Fa("asyncIterator")],n=!1,i,r={};return t==null?(t=e[Fa("iterator")](),i=s=>r[s]=a=>t[s](a)):(t=t.call(e),i=s=>r[s]=a=>{if(n){if(n=!1,s==="throw")throw a;return a}return n=!0,{done:!1,value:new qf(new Promise(o=>{var l=t[s](a);l instanceof Object||_f("Object expected"),o(l)}),1)}}),r[Fa("iterator")]=()=>r,i("next"),"throw"in t?i("throw"):r.throw=s=>{throw s},"return"in t&&i("return"),r};function Oe(e){let t=e.dataset.dir;if(t!==void 0&&Wf.includes(t))return t;let n=document.documentElement.getAttribute("dir");return n==="ltr"||n==="rtl"?n:"ltr"}function tr(e){if(e)try{if(e.ownerDocument.activeElement!==e)return;let t=e.value.length;e.setSelectionRange(t,t)}catch(t){}}function em(e){return["html","body","#document"].includes(bc(e))}function es(e){if(!e)return!1;let t=e.getRootNode();return ui(t)===e}function Ot(e){if(e==null||!le(e))return!1;try{return nm(e)&&e.selectionStart!=null||rm.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function ce(e,t){var i;if(!e||!t||!le(e)||!le(t))return!1;let n=(i=t.getRootNode)==null?void 0:i.call(t);if(e===t||e.contains(t))return!0;if(n&&Ln(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Le(e){var t;return nr(e)?e:Qf(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function sm(e){return Le(e).documentElement}function ue(e){var t,n,i;return Ln(e)?ue(e.host):nr(e)?(t=e.defaultView)!=null?t:window:le(e)&&(i=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?i:window}function ui(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){let n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function am(e){if(bc(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Ln(e)&&e.host||sm(e);return Ln(t)?t.host:t}function Ya(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),nr(t)||Ln(t))return t}catch(i){}return(n=e.ownerDocument)!=null?n:document}function at(e){return Ga.has(e)||Ga.set(e,ue(e).getComputedStyle(e)),Ga.get(e)}function as(e,t){let n=new Set,i=Ya(e),r=s=>{let a=s.querySelectorAll("[aria-controls]");for(let o of a){if(o.getAttribute("aria-expanded")!=="true")continue;let l=Ec(o);for(let c of l){if(!c||n.has(c))continue;n.add(c);let u=i.getElementById(c);if(u){let h=u.getAttribute("role"),m=u.getAttribute("aria-modal")==="true";if(h&&om(h)&&!m&&(u===t||u.contains(t)||r(u)))return!0}}}return!1};return r(e)}function Xa(e,t){let n=Ya(e),i=new Set,r=s=>{let a=s.querySelectorAll("[aria-controls]");for(let o of a){if(o.getAttribute("aria-expanded")!=="true")continue;let l=Ec(o);for(let c of l){if(!c||i.has(c))continue;i.add(c);let u=n.getElementById(c);if(u){let h=u.getAttribute("role"),m=u.getAttribute("aria-modal")==="true";h&&ja.has(h)&&!m&&(t(u),r(u))}}}};r(e)}function Ic(e){let t=new Set;return Xa(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function lm(e){let t=e.getAttribute("role");return!!(t&&ja.has(t))}function cm(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function Pc(e){var t;return cm(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function Cc(e){if(!e.id)return!1;let t=Ya(e),n=CSS.escape(e.id),i=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(i)&&lm(e))}function Sc(e,t){let{type:n,quality:i=.92,background:r}=t;if(!e)throw new Error("[zag-js > getDataUrl]: Could not find the svg element");let s=ue(e),a=s.document,o=e.getBoundingClientRect(),l=e.cloneNode(!0);l.hasAttribute("viewBox")||l.setAttribute("viewBox",`0 0 ${o.width} ${o.height}`);let u=`\r -`+new s.XMLSerializer().serializeToString(l),h="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(u);if(n==="image/svg+xml")return Promise.resolve(h).then(I=>(l.remove(),I));let m=s.devicePixelRatio||1,d=a.createElement("canvas"),p=new s.Image;p.src=h,d.width=o.width*m,d.height=o.height*m;let v=d.getContext("2d");return(n==="image/jpeg"||r)&&(v.fillStyle=r||"white",v.fillRect(0,0,d.width,d.height)),new Promise(I=>{p.onload=()=>{v==null||v.drawImage(p,0,0,d.width,d.height),I(d.toDataURL(n,i)),l.remove()}})}function um(){var t;let e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}function dm(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Oc(e){let{selectionStart:t,selectionEnd:n,value:i}=e.currentTarget,r=e.data;return i.slice(0,t)+(r!=null?r:"")+i.slice(n)}function vm(e){var t,n,i,r;return(r=(t=e.composedPath)==null?void 0:t.call(e))!=null?r:(i=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:i.call(n)}function j(e){var n;let t=vm(e);return(n=t==null?void 0:t[0])!=null?n:e.target}function Fn(e){let t=e.currentTarget;if(!t||!t.matches("a[href], button[type='submit'], input[type='submit']"))return!1;let i=e.button===1,r=ls(e);return i||r}function rr(e){let t=e.currentTarget;if(!t)return!1;let n=t.localName;return e.altKey?n==="a"||n==="button"&&t.type==="submit"||n==="input"&&t.type==="submit":!1}function Re(e){return Yt(e).isComposing||e.keyCode===229}function ls(e){return di()?e.metaKey:e.ctrlKey}function wc(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}function Vc(e){return e.pointerType===""&&e.isTrusted?!0:mm()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function ge(e,t={}){var a;let{dir:n="ltr",orientation:i="horizontal"}=t,r=e.key;return r=(a=bm[r])!=null?a:r,n==="rtl"&&i==="horizontal"&&r in oc&&(r=oc[r]),r}function Yt(e){var t;return(t=e.nativeEvent)!=null?t:e}function gi(e){return e.ctrlKey||e.metaKey?.1:Em.has(e.key)||e.shiftKey&&Im.has(e.key)?10:1}function je(e,t="client"){let n=ym(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}function xc(e,t){var s;let{type:n="HTMLInputElement",property:i="value"}=t,r=ue(e)[n].prototype;return(s=Object.getOwnPropertyDescriptor(r,i))!=null?s:{}}function Pm(e){if(e.localName==="input")return"HTMLInputElement";if(e.localName==="textarea")return"HTMLTextAreaElement";if(e.localName==="select")return"HTMLSelectElement"}function Me(e,t,n="value"){var r;if(!e)return;let i=Pm(e);i&&((r=xc(e,{type:i,property:n}).set)==null||r.call(e,t)),e.setAttribute(n,t)}function sr(e,t){var i;if(!e)return;(i=xc(e,{type:"HTMLInputElement",property:"checked"}).set)==null||i.call(e,t),t?e.setAttribute("checked",""):e.removeAttribute("checked")}function Ac(e,t){let{value:n,bubbles:i=!0}=t;if(!e)return;let r=ue(e);e instanceof r.HTMLInputElement&&(Me(e,`${n}`),e.dispatchEvent(new r.Event("input",{bubbles:i})))}function pi(e,t){let{checked:n,bubbles:i=!0}=t;if(!e)return;let r=ue(e);e instanceof r.HTMLInputElement&&(sr(e,n),e.dispatchEvent(new r.Event("click",{bubbles:i})))}function Cm(e){return Sm(e)?e.form:e.closest("form")}function Sm(e){return e.matches("textarea, input, select, button")}function Tm(e,t){if(!e)return;let n=Cm(e),i=r=>{r.defaultPrevented||t()};return n==null||n.addEventListener("reset",i,{passive:!0}),()=>n==null?void 0:n.removeEventListener("reset",i)}function Om(e,t){let n=e==null?void 0:e.closest("fieldset");if(!n)return;t(n.disabled);let i=ue(n),r=new i.MutationObserver(()=>t(n.disabled));return r.observe(n,{attributes:!0,attributeFilter:["disabled"]}),()=>r.disconnect()}function wt(e,t){if(!e)return;let{onFieldsetDisabledChange:n,onFormReset:i}=t,r=[Tm(e,i),Om(e,n)];return()=>r.forEach(s=>s==null?void 0:s())}function Nc(e){let t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}function Am(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;let n=t(e);return(n===!0?e.shadowRoot:n)||null}function Rc(e,t,n){let i=[...e],r=[...e],s=new Set,a=new Map;e.forEach((l,c)=>a.set(l,c));let o=0;for(;o{a.set(d,m+p)});for(let d=m+u.length;d{a.set(d,m+p)})}r.push(...u)}}return i}function Ye(e){return!le(e)||e.closest("[inert]")?!1:e.matches(cs)&&im(e)}function jt(e,t={}){if(!e)return[];let{includeContainer:n,getShadowRoot:i}=t,r=Array.from(e.querySelectorAll(cs));n&&dn(e)&&r.unshift(e);let s=[];for(let a of r)if(dn(a)){if(kc(a)&&a.contentDocument){let o=a.contentDocument.body;s.push(...jt(o,{getShadowRoot:i}));continue}s.push(a)}if(i){let a=Rc(s,i,dn);return!a.length&&n?r:a}return!s.length&&n?r:s}function dn(e){return le(e)&&e.tabIndex>0?!0:Ye(e)&&!xm(e)}function km(e,t={}){let n=jt(e,t),i=n[0]||null,r=n[n.length-1]||null;return[i,r]}function fi(e){return e.tabIndex<0&&(wm.test(e.localName)||Ot(e))&&!Vm(e)?0:e.tabIndex}function us(e){let{root:t,getInitialEl:n,filter:i,enabled:r=!0}=e;if(!r)return;let s=null;if(s||(s=typeof n=="function"?n():n),s||(s=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!s){let a=jt(t);s=i?a.filter(i)[0]:a[0]}return s||t||void 0}function ds(e){let t=e.currentTarget;if(!t)return!1;let[n,i]=km(t);return!(es(n)&&e.shiftKey||es(i)&&!e.shiftKey||!n&&!i)}function H(e){let t=eo.create();return t.request(e),t.cleanup}function $n(e){let t=new Set;function n(i){let r=globalThis.requestAnimationFrame(i);t.add(()=>globalThis.cancelAnimationFrame(r))}return n(()=>n(e)),function(){t.forEach(r=>r())}}function Nm(e,t,n){let i=H(()=>{e.removeEventListener(t,r,!0),n()}),r=()=>{i(),n()};return e.addEventListener(t,r,{once:!0,capture:!0}),i}function Rm(e,t){if(!e)return;let{attributes:n,callback:i}=t,r=e.ownerDocument.defaultView||window,s=new r.MutationObserver(a=>{for(let o of a)o.type==="attributes"&&o.attributeName&&n.includes(o.attributeName)&&i(o)});return s.observe(e,{attributes:!0,attributeFilter:n}),()=>s.disconnect()}function ot(e,t){let{defer:n}=t,i=n?H:s=>s(),r=[];return r.push(i(()=>{let s=typeof e=="function"?e():e;r.push(Rm(s,t))})),()=>{r.forEach(s=>s==null?void 0:s())}}function Dm(e,t){let{callback:n}=t;if(!e)return;let i=e.ownerDocument.defaultView||window,r=new i.MutationObserver(n);return r.observe(e,{childList:!0,subtree:!0}),()=>r.disconnect()}function hs(e,t){let{defer:n}=t,i=n?H:s=>s(),r=[];return r.push(i(()=>{let s=typeof e=="function"?e():e;r.push(Dm(s,t))})),()=>{r.forEach(s=>s==null?void 0:s())}}function mi(e){let t=()=>{let n=ue(e);e.dispatchEvent(new n.MouseEvent("click"))};fm()?Nm(e,"keyup",t):queueMicrotask(t)}function gs(e){let t=am(e);return em(t)?Le(t).body:le(t)&&Lc(t)?t:gs(t)}function Lc(e){let t=ue(e),{overflow:n,overflowX:i,overflowY:r,display:s}=t.getComputedStyle(e);return Lm.test(n+r+i)&&!Mm.has(s)}function Fm(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function Xt(e,t){let r=t||{},{rootEl:n}=r,i=ft(r,["rootEl"]);!e||!n||!Lc(n)||!Fm(n)||e.scrollIntoView(i)}function to(e,t){let{left:n,top:i,width:r,height:s}=t.getBoundingClientRect(),a={x:e.x-n,y:e.y-i},o={x:ac(a.x/r),y:ac(a.y/s)};function l(c={}){let{dir:u="ltr",orientation:h="horizontal",inverted:m}=c,d=typeof m=="object"?m.x:m,p=typeof m=="object"?m.y:m;return h==="horizontal"?u==="rtl"||d?1-o.x:o.x:p?1-o.y:o.y}return{offset:a,percent:o,getPercentValue:l}}function Mc(e,t){let n=e.body,i="pointerLockElement"in e||"mozPointerLockElement"in e,r=()=>!!e.pointerLockElement;function s(){t==null||t(r())}function a(l){r()&&(t==null||t(!1)),console.error("PointerLock error occurred:",l),e.exitPointerLock()}if(!i)return;try{n.requestPointerLock()}catch(l){}let o=[ee(e,"pointerlockchange",s,!1),ee(e,"pointerlockerror",a,!1)];return()=>{o.forEach(l=>l()),e.exitPointerLock()}}function $m(e={}){let{target:t,doc:n}=e,i=n!=null?n:document,r=i.documentElement;return ir()?(ci==="default"&&(qa=r.style.webkitUserSelect,r.style.webkitUserSelect="none"),ci="disabled"):t&&(Xr.set(t,t.style.userSelect),t.style.userSelect="none"),()=>no({target:t,doc:i})}function no(e={}){let{target:t,doc:n}=e,r=(n!=null?n:document).documentElement;if(ir()){if(ci!=="disabled")return;ci="restoring",setTimeout(()=>{$n(()=>{ci==="restoring"&&(r.style.webkitUserSelect==="none"&&(r.style.webkitUserSelect=qa||""),qa="",ci="default")})},300)}else if(t&&Xr.has(t)){let s=Xr.get(t);t.style.userSelect==="none"&&(t.style.userSelect=s!=null?s:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Xr.delete(t)}}function io(e={}){let a=e,{defer:t,target:n}=a,i=ft(a,["defer","target"]),r=t?H:o=>o(),s=[];return s.push(r(()=>{let o=typeof n=="function"?n():n;s.push($m(y(g({},i),{target:o})))})),()=>{s.forEach(o=>o==null?void 0:o())}}function hn(e,t){let{onPointerMove:n,onPointerUp:i}=t,r=o=>{let l=je(o),c=Math.sqrt(l.x**2+l.y**2),u=o.pointerType==="touch"?10:5;if(!(c{let l=je(o);i({point:l,event:o})},a=[ee(e,"pointermove",r,!1),ee(e,"pointerup",s,!1),ee(e,"pointercancel",s,!1),ee(e,"contextmenu",s,!1),io({doc:e})];return()=>{a.forEach(o=>o())}}function ps(e){let{pointerNode:t,keyboardNode:n=t,onPress:i,onPressStart:r,onPressEnd:s,isValidKey:a=O=>O.key==="Enter"}=e;if(!t)return qt;let o=ue(t),l=qt,c=qt,u=qt,h=O=>({point:je(O),event:O});function m(O){r==null||r(h(O))}function d(O){s==null||s(h(O))}let v=ee(t,"pointerdown",O=>{c();let f=ee(o,"pointerup",P=>{let V=j(P);ce(t,V)?i==null||i(h(P)):s==null||s(h(P))},{passive:!i,once:!0}),S=ee(o,"pointercancel",d,{passive:!s,once:!0});c=_a(f,S),es(n)&&O.pointerType==="mouse"&&O.preventDefault(),m(O)},{passive:!r}),I=ee(n,"focus",T);l=_a(v,I);function T(){let O=P=>{if(!a(P))return;let V=x=>{if(!a(x))return;let k=new o.PointerEvent("pointerup"),N=h(k);i==null||i(N),s==null||s(N)};c(),c=ee(n,"keyup",V);let A=new o.PointerEvent("pointerdown");m(A)},b=()=>{let P=new o.PointerEvent("pointercancel");d(P)},f=ee(n,"keydown",O),S=ee(n,"blur",b);u=_a(f,S)}return()=>{l(),c(),u()}}function Fe(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function vi(e,t){var n;return(n=e==null?void 0:e.querySelector(t))!=null?n:null}function so(e,t,n=ro){return e.find(i=>n(i)===t)}function ao(e,t,n=ro){let i=so(e,t,n);return i?e.indexOf(i):-1}function yi(e,t,n=!0){let i=ao(e,t);return i=n?(i+1)%e.length:Math.min(i+1,e.length-1),e[i]}function bi(e,t,n=!0){let i=ao(e,t);return i===-1?n?e[e.length-1]:null:(i=n?(i-1+e.length)%e.length:Math.max(0,i-1),e[i])}function Hm(e){let t=new WeakMap,n,i=new WeakMap,r=o=>n||(n=new o.ResizeObserver(l=>{for(let c of l){i.set(c.target,c);let u=t.get(c.target);if(u)for(let h of u)h(c)}}),n);return{observe:(o,l)=>{let c=t.get(o)||new Set;c.add(l),t.set(o,c);let u=ue(o);return r(u).observe(o,e),()=>{let h=t.get(o);h&&(h.delete(l),h.size===0&&(t.delete(o),r(u).unobserve(o)))}},unobserve:o=>{t.delete(o),n==null||n.unobserve(o)}}}function Um(e,t,n,i=ro){let r=n?ao(e,n,i):-1,s=n?jf(e,r):e;return t.length===1&&(s=s.filter(o=>i(o)!==n)),s.find(o=>Gm(_m(o),t))}function Fc(e,t,n){let i=e.getAttribute(t),r=i!=null;return i===n?qt:(e.setAttribute(t,n),()=>{r?e.setAttribute(t,i):e.removeAttribute(t)})}function Hn(e,t){if(!e)return qt;let n=Object.keys(t).reduce((i,r)=>(i[r]=e.style.getPropertyValue(r),i),{});return qm(n,t)?qt:(Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")})}function $c(e,t,n){if(!e)return qt;let i=e.style.getPropertyValue(t);return i===n?qt:(e.style.setProperty(t,n),()=>{e.style.setProperty(t,i),e.style.length===0&&e.removeAttribute("style")})}function qm(e,t){return Object.keys(e).every(n=>e[n]===t[n])}function Wm(e,t){let{state:n,activeId:i,key:r,timeout:s=350,itemToId:a}=t,o=n.keysSoFar+r,c=o.length>1&&Array.from(o).every(p=>p===o[0])?o[0]:o,u=e.slice(),h=Um(u,c,i,a);function m(){clearTimeout(n.timer),n.timer=-1}function d(p){n.keysSoFar=p,m(),p!==""&&(n.timer=+setTimeout(()=>{d(""),m()},s))}return d(o),h}function Km(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}function zm(e,t,n){let{signal:i}=t;return[new Promise((a,o)=>{let l=setTimeout(()=>{o(new Error(`Timeout of ${n}ms exceeded`))},n);i.addEventListener("abort",()=>{clearTimeout(l),o(new Error("Promise aborted"))}),e.then(c=>{i.aborted||(clearTimeout(l),a(c))}).catch(c=>{i.aborted||(clearTimeout(l),o(c))})}),()=>t.abort()]}function Hc(e,t){let{timeout:n,rootNode:i}=t,r=ue(i),s=Le(i),a=new r.AbortController;return zm(new Promise(o=>{let l=e();if(l){o(l);return}let c=new r.MutationObserver(()=>{let u=e();u&&u.isConnected&&(c.disconnect(),o(u))});c.observe(s.body,{childList:!0,subtree:!0})}),a,n)}function or(e){return e==null?[]:Array.isArray(e)?e:[e]}function Ei(e,t,n={}){let{step:i=1,loop:r=!0}=n,s=t+i,a=e.length,o=a-1;return t===-1?i>0?0:o:s<0?r?o:0:s>=a?r?0:t>a?a:t:s}function _c(e,t,n={}){return e[Ei(e,t,n)]}function lr(e,t,n={}){let{step:i=1,loop:r=!0}=n;return Ei(e,t,{step:-i,loop:r})}function Gc(e,t,n={}){return e[lr(e,t,n)]}function cr(e,t){return e.reduce((n,i,r)=>{var s;return r%t===0?n.push([i]):(s=mt(n))==null||s.push(i),n},[])}function oo(e,t){return e.reduce(([n,i],r)=>(t(r)?n.push(r):i.push(r),[n,i]),[[],[]])}function Ce(e,t,...n){var r;if(e in t){let s=t[e];return Wt(s)?s(...n):s}let i=new Error(`No matching key: ${JSON.stringify(e)} in ${JSON.stringify(Object.keys(t))}`);throw(r=Error.captureStackTrace)==null||r.call(Error,i,Ce),i}function Yc(e,t=0){let n=0,i=null;return(...r)=>{let s=Date.now(),a=s-n;a>=t?(i&&(clearTimeout(i),i=null),e(...r),n=s):i||(i=setTimeout(()=>{e(...r),n=Date.now(),i=null},t-a))}}function Si(e){if(!Qi(e)||e===void 0)return e;let t=Reflect.ownKeys(e).filter(i=>typeof i=="string"),n={};for(let i of t){let r=e[i];r!==void 0&&(n[i]=Si(r))}return n}function fn(e,t){let n={};for(let i of t){let r=e[i];r!==void 0&&(n[i]=r)}return n}function uv(e,t){let n={},i={},r=new Set(t),s=Reflect.ownKeys(e);for(let a of s)r.has(a)?i[a]=e[a]:n[a]=e[a];return[i,n]}function su(e,t){let n=new ru(({now:i,deltaMs:r})=>{if(r>=t){let s=t>0?i-r%t:i;n.setStartMs(s),e({startMs:s,deltaMs:r})}});return n.start(),()=>n.stop()}function mn(e,t){let n=new ru(({deltaMs:i})=>{if(i>=t)return e(),!1});return n.start(),()=>n.stop()}function zt(...e){let t=e.length===1?e[0]:e[1];(e.length===2?e[0]:!0)&&console.warn(t)}function vs(...e){let t=e.length===1?e[0]:e[1];if(e.length===2?e[0]:!0)throw new Error(t)}function vn(e,t){if(e==null)throw new Error(t())}function yn(e,t,n){let i=[];for(let r of t)e[r]==null&&i.push(r);if(i.length>0)throw new Error(`[zag-js${n?` > ${n}`:""}] missing required props: ${i.join(", ")}`)}function au(...e){let t={};for(let n of e){if(!n)continue;for(let r in t){if(r.startsWith("on")&&typeof t[r]=="function"&&typeof n[r]=="function"){t[r]=At(n[r],t[r]);continue}if(r==="className"||r==="class"){t[r]=dv(t[r],n[r]);continue}if(r==="style"){t[r]=gv(t[r],n[r]);continue}t[r]=n[r]!==void 0?n[r]:t[r]}for(let r in n)t[r]===void 0&&(t[r]=n[r]);let i=Object.getOwnPropertySymbols(n);for(let r of i)t[r]=n[r]}return t}function Bn(e,t,n){let i=[],r;return s=>{var l;let a=e(s);return(a.length!==i.length||a.some((c,u)=>!fe(i[u],c)))&&(i=a,r=t(a,s),(l=n==null?void 0:n.onChange)==null||l.call(n,r)),r}}function Ee(){return{and:(...e)=>function(n){return e.every(i=>n.guard(i))},or:(...e)=>function(n){return e.some(i=>n.guard(i))},not:e=>function(n){return!n.guard(e)}}}function ut(){return{guards:Ee(),createMachine:e=>e,choose:e=>function({choose:n}){var i;return(i=n(e))==null?void 0:i.actions}}}function pv(e){let t=()=>{var a,o;return(o=(a=e.getRootNode)==null?void 0:a.call(e))!=null?o:document},n=()=>Le(t()),i=()=>{var a;return(a=n().defaultView)!=null?a:window},r=()=>ui(t()),s=a=>t().getElementById(a);return y(g({},e),{getRootNode:t,getDoc:n,getWin:i,getActiveElement:r,isActiveElement:es,getById:s})}function fv(e){return new Proxy({},{get(t,n){return n==="style"?i=>e({style:i}).style:e}})}function bv(){if(typeof globalThis!="undefined")return globalThis;if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global}function ou(e,t){let n=bv();return n?(n[e]||(n[e]=t()),n[e]):t()}function ys(e={}){return Tv(e)}function ns(e,t,n){let i=Dn.get(e);ts()&&!i&&console.warn("Please use proxy object");let r,s=[],a=i[3],o=!1,c=a(u=>{if(s.push(u),n){t(s.splice(0));return}r||(r=Promise.resolve().then(()=>{r=void 0,o&&t(s.splice(0))}))});return o=!0,()=>{o=!1,c()}}function Ov(e){let t=Dn.get(e);ts()&&!t&&console.warn("Please use proxy object");let[n,i,r]=t;return r(n,i())}function Rv(e,t,n){let i=n||"default",r=Yr.get(e);r||(r=new Map,Yr.set(e,r));let s=r.get(i)||{},a=Object.keys(t),o=(v,I)=>{e.addEventListener(v.toLowerCase(),I)},l=(v,I)=>{e.removeEventListener(v.toLowerCase(),I)},c=v=>v.startsWith("on"),u=v=>!v.startsWith("on"),h=v=>o(v.substring(2),t[v]),m=v=>l(v.substring(2),t[v]),d=v=>{let I=t[v],T=s[v];if(I!==T){if(v==="class"){e.className=I!=null?I:"";return}if(yc.has(v)){e[v]=I!=null?I:"";return}if(typeof I=="boolean"&&!v.includes("aria-")){e.toggleAttribute(jr(e,v),I);return}if(v==="children"){e.innerHTML=I;return}if(I!=null){e.setAttribute(jr(e,v),I);return}e.removeAttribute(jr(e,v))}};for(let v in s)t[v]==null&&(v==="class"?e.className="":yc.has(v)?e[v]="":e.removeAttribute(jr(e,v)));return Object.keys(s).filter(c).forEach(v=>{l(v.substring(2),s[v])}),a.filter(c).forEach(h),a.filter(u).forEach(d),r.set(i,t),function(){a.filter(c).forEach(m);let I=Yr.get(e);I&&(I.delete(i),I.size===0&&Yr.delete(e))}}function is(e){var s,a;let t=(s=e().value)!=null?s:e().defaultValue;e().debug&&console.log(`[bindable > ${e().debug}] initial`,t);let n=(a=e().isEqual)!=null?a:Object.is,i=ys({value:t}),r=()=>e().value!==void 0;return{initial:t,ref:i,get(){return r()?e().value:i.value},set(o){var u,h;let l=i.value,c=Wt(o)?o(l):o;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:c,prev:l}),r()||(i.value=c),n(c,l)||(h=(u=e()).onChange)==null||h.call(u,c,l)},invoke(o,l){var c,u;(u=(c=e()).onChange)==null||u.call(c,o,l)},hash(o){var l,c,u;return(u=(c=(l=e()).hash)==null?void 0:c.call(l,o))!=null?u:String(o)}}}function Dv(e){let t={current:e};return{get(n){return t.current[n]},set(n,i){t.current[n]=i}}}function lu(e,t){if(!Qi(e)||!Qi(t))return t===void 0?e:t;let n=g({},e);for(let i of Object.keys(t)){let r=t[i],s=e[i];r!==void 0&&(Qi(s)&&Qi(r)?n[i]=lu(s,r):n[i]=r)}return n}var Wf,w,Z,z,C,Mn,U,li,Kf,zf,Yf,Ba,ac,jf,_a,qt,rs,ss,E,X,Xf,Zf,Jf,le,nr,Qf,bc,tm,Ln,nm,st,im,rm,Ga,ja,om,Ec,os,Za,Tc,hm,Ja,gm,pm,ir,Qa,di,Xe,fm,mm,pe,hi,xe,ym,bm,oc,Em,Im,ee,kc,wm,Vm,xm,cs,ar,eo,Lm,Mm,ci,qa,Xr,ro,gn,Bm,_m,Gm,Ue,Vt,Ym,Bc,jm,un,Xm,lc,Zm,lt,mt,Jm,Ze,ct,vt,fs,yt,cc,Qm,fe,pn,Uc,qc,xt,Zr,Wt,Wc,$e,ev,Kc,tv,Qi,nv,iv,rv,Kt,lo,sv,zc,At,ur,jc,uc,Xc,av,ov,lv,cv,Wa,Ii,Zc,Jc,Qc,Pi,He,dc,Ci,eu,ms,hc,tu,nu,iu,ye,B,zr,Jr,ru,dv,hv,gc,gv,er,Ua,_,n0,mv,pc,Ka,vv,yv,fc,Qr,Ev,Iv,Pv,Cv,za,mc,ts,Dn,Sv,Tv,wv,Vv,oe,vc,xv,Av,q,Yr,yc,kv,Nv,jr,W,K,se=re(()=>{"use strict";Wf=["ltr","rtl"];w=(e,t,n)=>{let i=e.dataset[t];if(i!==void 0&&(!n||n.includes(i)))return i},Z=(e,t)=>{let n=e.dataset[t];if(typeof n=="string")return n.split(",").map(i=>i.trim()).filter(i=>i.length>0)},z=(e,t,n)=>{let i=e.dataset[t];if(i===void 0)return;let r=Number(i);if(!Number.isNaN(r))return n&&!n.includes(r)?0:r},C=(e,t)=>{let n=t.replace(/([A-Z])/g,"-$1").toLowerCase();return e.hasAttribute(`data-${n}`)},Mn=(e,t="element")=>e!=null&&e.id?e.id:`${t}-${Math.random().toString(36).substring(2,9)}`,U=(e,t=[])=>({parts:(...n)=>{if(Kf(t))return U(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>U(e,[...t,...n]),omit:(...n)=>U(e,t.filter(i=>!n.includes(i))),rename:n=>U(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,i)=>Object.assign(n,{[i]:{selector:[`&[data-scope="${li(e)}"][data-part="${li(i)}"]`,`& [data-scope="${li(e)}"][data-part="${li(i)}"]`].join(", "),attrs:{"data-scope":li(e),"data-part":li(i)}}}),{})}),li=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),Kf=e=>e.length===0,zf=Object.defineProperty,Yf=(e,t,n)=>t in e?zf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ba=(e,t,n)=>Yf(e,typeof t!="symbol"?t+"":t,n);ac=e=>Math.max(0,Math.min(1,e)),jf=(e,t)=>e.map((n,i)=>e[(Math.max(t,0)+i)%e.length]),_a=(...e)=>t=>e.reduce((n,i)=>i(n),t),qt=()=>{},rs=e=>typeof e=="object"&&e!==null,ss=2147483647,E=e=>e?"":void 0,X=e=>e?"true":void 0,Xf=1,Zf=9,Jf=11,le=e=>rs(e)&&e.nodeType===Xf&&typeof e.nodeName=="string",nr=e=>rs(e)&&e.nodeType===Zf,Qf=e=>rs(e)&&e===e.window,bc=e=>le(e)?e.localName||"":"#document";tm=e=>rs(e)&&e.nodeType!==void 0,Ln=e=>tm(e)&&e.nodeType===Jf&&"host"in e,nm=e=>le(e)&&e.localName==="input",st=e=>!!(e!=null&&e.matches("a[href]")),im=e=>le(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;rm=/(textarea|select)/;Ga=new WeakMap;ja=new Set(["menu","listbox","dialog","grid","tree","region"]),om=e=>ja.has(e),Ec=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};os=()=>typeof document!="undefined";Za=e=>os()&&e.test(um()),Tc=e=>os()&&e.test(dm()),hm=e=>os()&&e.test(navigator.vendor),Ja=()=>os()&&!!navigator.maxTouchPoints,gm=()=>Za(/^iPhone/i),pm=()=>Za(/^iPad/i)||di()&&navigator.maxTouchPoints>1,ir=()=>gm()||pm(),Qa=()=>di()||ir(),di=()=>Za(/^Mac/i),Xe=()=>Qa()&&hm(/apple/i),fm=()=>Tc(/Firefox/i),mm=()=>Tc(/Android/i);pe=e=>e.button===0,hi=e=>e.button===2||di()&&e.ctrlKey&&e.button===0,xe=e=>e.ctrlKey||e.altKey||e.metaKey,ym=e=>"touches"in e&&e.touches.length>0,bm={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},oc={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};Em=new Set(["PageUp","PageDown"]),Im=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]);ee=(e,t,n,i)=>{let r=typeof e=="function"?e():e;return r==null||r.addEventListener(t,n,i),()=>{r==null||r.removeEventListener(t,n,i)}};kc=e=>le(e)&&e.tagName==="IFRAME",wm=/^(audio|video|details)$/;Vm=e=>!Number.isNaN(Nc(e)),xm=e=>Nc(e)<0;cs="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",ar=(e,t={})=>{if(!e)return[];let{includeContainer:n=!1,getShadowRoot:i}=t,r=Array.from(e.querySelectorAll(cs));(n==!0||n=="if-empty"&&r.length===0)&&le(e)&&Ye(e)&&r.unshift(e);let a=[];for(let o of r)if(Ye(o)){if(kc(o)&&o.contentDocument){let l=o.contentDocument.body;a.push(...ar(l,{getShadowRoot:i}));continue}a.push(o)}return i?Rc(a,i,Ye):a};eo=class Dc{constructor(){Ba(this,"id",null),Ba(this,"fn_cleanup"),Ba(this,"cleanup",()=>{this.cancel()})}static create(){return new Dc}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};Lm=/auto|scroll|overlay|hidden|clip/,Mm=new Set(["inline","contents"]);ci="default",qa="",Xr=new WeakMap;ro=e=>e.id;gn=Hm({box:"border-box"}),Bm=e=>e.split("").map(t=>{let n=t.charCodeAt(0);return n>0&&n<128?t:n>=128&&n<=255?`/x${n.toString(16)}`.replace("/","\\"):""}).join("").trim(),_m=e=>{var t,n,i;return Bm((i=(n=(t=e.dataset)==null?void 0:t.valuetext)!=null?n:e.textContent)!=null?i:"")},Gm=(e,t)=>e.trim().toLowerCase().startsWith(t.toLowerCase());Ue=Object.assign(Wm,{defaultOptions:{keysSoFar:"",timer:-1},isValidEvent:Km});Vt={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"};Ym=Object.defineProperty,Bc=e=>{throw TypeError(e)},jm=(e,t,n)=>t in e?Ym(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,un=(e,t,n)=>jm(e,typeof t!="symbol"?t+"":t,n),Xm=(e,t,n)=>t.has(e)||Bc("Cannot "+n),lc=(e,t,n)=>(Xm(e,t,"read from private field"),t.get(e)),Zm=(e,t,n)=>t.has(e)?Bc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n);lt=e=>e[0],mt=e=>e[e.length-1],Jm=(e,t)=>e.indexOf(t)!==-1,Ze=(e,...t)=>e.concat(t),ct=(e,...t)=>e.filter(n=>!t.includes(n)),vt=e=>Array.from(new Set(e)),fs=(e,t)=>{let n=new Set(t);return e.filter(i=>!n.has(i))},yt=(e,t)=>Jm(e,t)?ct(e,t):Ze(e,t);cc=e=>(e==null?void 0:e.constructor.name)==="Array",Qm=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof(e==null?void 0:e.isEqual)=="function"&&typeof(t==null?void 0:t.isEqual)=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if(cc(e)&&cc(t))return Qm(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;let n=Object.keys(t!=null?t:Object.create(null)),i=n.length;for(let r=0;rArray.isArray(e),Uc=e=>e===!0||e===!1,qc=e=>e!=null&&typeof e=="object",xt=e=>qc(e)&&!pn(e),Zr=e=>typeof e=="string",Wt=e=>typeof e=="function",Wc=e=>e==null,$e=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),ev=e=>Object.prototype.toString.call(e),Kc=Function.prototype.toString,tv=Kc.call(Object),Qi=e=>{if(!qc(e)||ev(e)!="[object Object]"||rv(e))return!1;let t=Object.getPrototypeOf(e);if(t===null)return!0;let n=$e(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Kc.call(n)==tv},nv=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,iv=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,rv=e=>nv(e)||iv(e),Kt=(e,...t)=>{let n=typeof e=="function"?e(...t):e;return n!=null?n:void 0},lo=e=>e,sv=e=>e(),zc=()=>{},At=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})},ur=(()=>{let e=0;return()=>(e++,e.toString(36))})();({floor:jc,abs:uc,round:Xc,min:av,max:ov,pow:lv,sign:cv}=Math),Wa=e=>Number.isNaN(e),Ii=e=>Wa(e)?0:e,Zc=(e,t)=>(e%t+t)%t,Jc=(e,t)=>Ii(e)>=t,Qc=(e,t)=>Ii(e)<=t,Pi=(e,t,n)=>{let i=Ii(e),r=t==null||i>=t,s=n==null||i<=n;return r&&s},He=(e,t,n)=>av(ov(Ii(e),t),n),dc=(e,t)=>{let n=e,i=t.toString(),r=i.indexOf("."),s=r>=0?i.length-r:0;if(s>0){let a=lv(10,s);n=Xc(n*a)/a}return n},Ci=(e,t)=>typeof t=="number"?jc(e*t+.5)/t:Xc(e),eu=(e,t,n,i)=>{let r=t!=null?Number(t):0,s=Number(n),a=(e-r)%i,o=uc(a)*2>=i?e+cv(a)*(i-uc(a)):e-a;if(o=dc(o,i),!Wa(r)&&os){let l=jc((s-r)/i),c=r+l*i;o=l<=0||ce[t]===n?e:[...e.slice(0,t),n,...e.slice(t+1)],hc=e=>{if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n},tu=(e,t,n)=>{let i=t==="+"?e+n:e-n;if(e%1!==0||n%1!==0){let r=10**Math.max(hc(e),hc(n));e=Math.round(e*r),n=Math.round(n*r),i=t==="+"?e+n:e-n,i/=r}return i},nu=(e,t)=>tu(Ii(e),"+",t),iu=(e,t)=>tu(Ii(e),"-",t),ye=e=>typeof e=="number"?`${e}px`:e;B=e=>function(n){return uv(n,e)},zr=()=>performance.now(),ru=class{constructor(e){this.onTick=e,un(this,"frameId",null),un(this,"pausedAtMs",null),un(this,"context"),un(this,"cancelFrame",()=>{this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null)}),un(this,"setStartMs",t=>{this.context.startMs=t}),un(this,"start",()=>{if(this.frameId!==null)return;let t=zr();this.pausedAtMs!==null?(this.context.startMs+=t-this.pausedAtMs,this.pausedAtMs=null):this.context.startMs=t,this.frameId=requestAnimationFrame(lc(this,Jr))}),un(this,"pause",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=zr())}),un(this,"stop",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=null)}),Zm(this,Jr,t=>{if(this.context.now=t,this.context.deltaMs=t-this.context.startMs,this.onTick(this.context)===!1){this.stop();return}this.frameId=requestAnimationFrame(lc(this,Jr))}),this.context={now:0,startMs:zr(),deltaMs:0}}get elapsedMs(){return this.pausedAtMs!==null?this.pausedAtMs-this.context.startMs:zr()-this.context.startMs}};Jr=new WeakMap;dv=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),hv=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,gc=e=>{let t={},n;for(;n=hv.exec(e);)t[n[1]]=n[2];return t},gv=(e,t)=>{if(Zr(e)){if(Zr(t))return`${e};${t}`;e=gc(e)}else Zr(t)&&(t=gc(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};er=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(er||{}),Ua="__init__";_=()=>e=>Array.from(new Set(e)),n0=Symbol(),mv=Symbol(),pc=Object.getPrototypeOf,Ka=new WeakMap,vv=e=>e&&(Ka.has(e)?Ka.get(e):pc(e)===Object.prototype||pc(e)===Array.prototype),yv=e=>vv(e)&&e[mv]||null,fc=(e,t=!0)=>{Ka.set(e,t)};Qr=ou("__zag__refSet",()=>new WeakSet),Ev=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,Iv=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,Pv=e=>typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeName=="string",Cv=e=>Ev(e)||Iv(e)||Pv(e),za=e=>e!==null&&typeof e=="object",mc=e=>za(e)&&!Qr.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!Cv(e)&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)&&!(e instanceof Promise)&&!(e instanceof File)&&!(e instanceof Blob)&&!(e instanceof AbortController),ts=()=>!0,Dn=ou("__zag__proxyStateMap",()=>new WeakMap),Sv=(e=Object.is,t=(o,l)=>new Proxy(o,l),n=new WeakMap,i=(o,l)=>{let c=n.get(o);if((c==null?void 0:c[0])===l)return c[1];let u=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o));return fc(u,!0),n.set(o,[l,u]),Reflect.ownKeys(o).forEach(h=>{let m=Reflect.get(o,h);Qr.has(m)?(fc(m,!1),u[h]=m):Dn.has(m)?u[h]=Ov(m):u[h]=m}),Object.freeze(u)},r=new WeakMap,s=[1,1],a=o=>{if(!za(o))throw new Error("object required");let l=r.get(o);if(l)return l;let c=s[0],u=new Set,h=(V,A=++s[0])=>{c!==A&&(c=A,u.forEach(x=>x(V,A)))},m=s[1],d=(V=++s[1])=>(m!==V&&!u.size&&(m=V,v.forEach(([A])=>{let x=A[1](V);x>c&&(c=x)})),c),p=V=>(A,x)=>{let k=[...A];k[1]=[V,...k[1]],h(k,x)},v=new Map,I=(V,A)=>{if(ts()&&v.has(V))throw new Error("prop listener already exists");if(u.size){let x=A[3](p(V));v.set(V,[A,x])}else v.set(V,[A])},T=V=>{var x;let A=v.get(V);A&&(v.delete(V),(x=A[1])==null||x.call(A))},O=V=>(u.add(V),u.size===1&&v.forEach(([x,k],N)=>{if(ts()&&k)throw new Error("remove already exists");let D=x[3](p(N));v.set(N,[x,D])}),()=>{u.delete(V),u.size===0&&v.forEach(([x,k],N)=>{k&&(k(),v.set(N,[x]))})}),b=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o)),S=t(b,{deleteProperty(V,A){let x=Reflect.get(V,A);T(A);let k=Reflect.deleteProperty(V,A);return k&&h(["delete",[A],x]),k},set(V,A,x,k){var te;let N=Reflect.has(V,A),D=Reflect.get(V,A,k);if(N&&(e(D,x)||r.has(x)&&e(D,r.get(x))))return!0;T(A),za(x)&&(x=yv(x)||x);let $=x;if(!((te=Object.getOwnPropertyDescriptor(V,A))!=null&&te.set)){!Dn.has(x)&&mc(x)&&($=ys(x));let J=!Qr.has($)&&Dn.get($);J&&I(A,J)}return Reflect.set(V,A,$,k),h(["set",[A],x,D]),!0}});r.set(o,S);let P=[b,d,i,O];return Dn.set(S,P),Reflect.ownKeys(o).forEach(V=>{let A=Object.getOwnPropertyDescriptor(o,V);A.get||A.set?Object.defineProperty(b,V,A):S[V]=o[V]}),S})=>[a,Dn,Qr,e,t,mc,n,i,r,s],[Tv]=Sv();wv=Object.defineProperty,Vv=(e,t,n)=>t in e?wv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oe=(e,t,n)=>Vv(e,typeof t!="symbol"?t+"":t,n),vc={onFocus:"onFocusin",onBlur:"onFocusout",onChange:"onInput",onDoubleClick:"onDblclick",htmlFor:"for",className:"class",defaultValue:"value",defaultChecked:"checked"},xv=new Set(["viewBox","preserveAspectRatio"]),Av=e=>{let t="";for(let n in e){let i=e[n];i!=null&&(n.startsWith("--")||(n=n.replace(/[A-Z]/g,r=>`-${r.toLowerCase()}`)),t+=`${n}:${i};`)}return t},q=fv(e=>Object.entries(e).reduce((t,[n,i])=>{if(i===void 0)return t;if(n in vc&&(n=vc[n]),n==="style"&&typeof i=="object")return t.style=Av(i),t;let r=xv.has(n)?n:n.toLowerCase();return t[r]=i,t},{})),Yr=new WeakMap,yc=new Set(["value","checked","selected"]),kv=new Set(["viewBox","preserveAspectRatio","clipPath","clipRule","fillRule","strokeWidth","strokeLinecap","strokeLinejoin","strokeDasharray","strokeDashoffset","strokeMiterlimit"]),Nv=e=>e.tagName==="svg"||e.namespaceURI==="http://www.w3.org/2000/svg",jr=(e,t)=>Nv(e)&&kv.has(t)?t:t.toLowerCase();is.cleanup=e=>{};is.ref=e=>{let t=e;return{get:()=>t,set:n=>{t=n}}};W=class{constructor(e,t={}){var h,m,d;this.machine=e,oe(this,"scope"),oe(this,"context"),oe(this,"prop"),oe(this,"state"),oe(this,"refs"),oe(this,"computed"),oe(this,"event",{type:""}),oe(this,"previousEvent",{type:""}),oe(this,"effects",new Map),oe(this,"transition",null),oe(this,"cleanups",[]),oe(this,"subscriptions",[]),oe(this,"userPropsRef"),oe(this,"getEvent",()=>y(g({},this.event),{current:()=>this.event,previous:()=>this.previousEvent})),oe(this,"getStateConfig",p=>this.machine.states[p]),oe(this,"getState",()=>y(g({},this.state),{matches:(...p)=>p.includes(this.state.get()),hasTag:p=>{var v,I;return!!((I=(v=this.getStateConfig(this.state.get()))==null?void 0:v.tags)!=null&&I.includes(p))}})),oe(this,"debug",(...p)=>{this.machine.debug&&console.log(...p)}),oe(this,"notify",()=>{this.publish()}),oe(this,"send",p=>{this.status===er.Started&&queueMicrotask(()=>{var S,P,V,A,x;if(!p)return;this.previousEvent=this.event,this.event=p,this.debug("send",p);let v=this.state.get(),I=p.type,T=(A=(P=(S=this.getStateConfig(v))==null?void 0:S.on)==null?void 0:P[I])!=null?A:(V=this.machine.on)==null?void 0:V[I],O=this.choose(T);if(!O)return;this.transition=O;let b=(x=O.target)!=null?x:v;this.debug("transition",O);let f=b!==v;f?this.state.set(b):O.reenter&&!f?this.state.invoke(v,v):this.action(O.actions)})}),oe(this,"action",p=>{let v=Wt(p)?p(this.getParams()):p;if(!v)return;let I=v.map(T=>{var b,f;let O=(f=(b=this.machine.implementations)==null?void 0:b.actions)==null?void 0:f[T];return O||zt(`[zag-js] No implementation found for action "${JSON.stringify(T)}"`),O});for(let T of I)T==null||T(this.getParams())}),oe(this,"guard",p=>{var v,I;return Wt(p)?p(this.getParams()):(I=(v=this.machine.implementations)==null?void 0:v.guards)==null?void 0:I[p](this.getParams())}),oe(this,"effect",p=>{let v=Wt(p)?p(this.getParams()):p;if(!v)return;let I=v.map(O=>{var f,S;let b=(S=(f=this.machine.implementations)==null?void 0:f.effects)==null?void 0:S[O];return b||zt(`[zag-js] No implementation found for effect "${JSON.stringify(O)}"`),b}),T=[];for(let O of I){let b=O==null?void 0:O(this.getParams());b&&T.push(b)}return()=>T.forEach(O=>O==null?void 0:O())}),oe(this,"choose",p=>or(p).find(v=>{let I=!v.guard;return Zr(v.guard)?I=!!this.guard(v.guard):Wt(v.guard)&&(I=v.guard(this.getParams())),I})),oe(this,"subscribe",p=>(this.subscriptions.push(p),()=>{let v=this.subscriptions.indexOf(p);v>-1&&this.subscriptions.splice(v,1)})),oe(this,"status",er.NotStarted),oe(this,"publish",()=>{this.callTrackers(),this.subscriptions.forEach(p=>p(this.service))}),oe(this,"trackers",[]),oe(this,"setupTrackers",()=>{var p,v;(v=(p=this.machine).watch)==null||v.call(p,this.getParams())}),oe(this,"callTrackers",()=>{this.trackers.forEach(({deps:p,fn:v})=>{let I=p.map(T=>T());fe(v.prev,I)||(v(),v.prev=I)})}),oe(this,"getParams",()=>({state:this.getState(),context:this.context,event:this.getEvent(),prop:this.prop,send:this.send,action:this.action,guard:this.guard,track:(p,v)=>{v.prev=p.map(I=>I()),this.trackers.push({deps:p,fn:v})},refs:this.refs,computed:this.computed,flush:sv,scope:this.scope,choose:this.choose})),this.userPropsRef={current:t};let{id:n,ids:i,getRootNode:r}=Kt(t);this.scope=pv({id:n,ids:i,getRootNode:r});let s=p=>{var T,O;let v=Kt(this.userPropsRef.current);return((O=(T=e.props)==null?void 0:T.call(e,{props:Si(v),scope:this.scope}))!=null?O:v)[p]};this.prop=s;let a=(h=e.context)==null?void 0:h.call(e,{prop:s,bindable:is,scope:this.scope,flush(p){queueMicrotask(p)},getContext(){return o},getComputed(){return l},getRefs(){return c},getEvent:this.getEvent.bind(this)});a&&Object.values(a).forEach(p=>{let v=ns(p.ref,()=>this.notify());this.cleanups.push(v)});let o={get(p){return a==null?void 0:a[p].get()},set(p,v){a==null||a[p].set(v)},initial(p){return a==null?void 0:a[p].initial},hash(p){let v=a==null?void 0:a[p].get();return a==null?void 0:a[p].hash(v)}};this.context=o;let l=p=>{var v,I;return(I=(v=e.computed)==null?void 0:v[p]({context:o,event:this.getEvent(),prop:s,refs:this.refs,scope:this.scope,computed:l}))!=null?I:{}};this.computed=l;let c=Dv((d=(m=e.refs)==null?void 0:m.call(e,{prop:s,context:o}))!=null?d:{});this.refs=c;let u=is(()=>({defaultValue:e.initialState({prop:s}),onChange:(p,v)=>{var T,O,b,f;if(v){let S=this.effects.get(v);S==null||S(),this.effects.delete(v)}v&&this.action((T=this.getStateConfig(v))==null?void 0:T.exit),this.action((O=this.transition)==null?void 0:O.actions);let I=this.effect((b=this.getStateConfig(p))==null?void 0:b.effects);if(I&&this.effects.set(p,I),v===Ua){this.action(e.entry);let S=this.effect(e.effects);S&&this.effects.set(Ua,S)}this.action((f=this.getStateConfig(p))==null?void 0:f.entry)}}));this.state=u,this.cleanups.push(ns(this.state.ref,()=>this.notify()))}updateProps(e){let t=this.userPropsRef.current;this.userPropsRef.current=()=>{let n=Kt(t),i=Kt(e);return lu(n,i)},this.notify()}start(){this.status=er.Started,this.debug("initializing..."),this.state.invoke(this.state.initial,Ua),this.setupTrackers()}stop(){this.effects.forEach(e=>e==null?void 0:e()),this.effects.clear(),this.transition=null,this.action(this.machine.exit),this.cleanups.forEach(e=>e()),this.cleanups=[],this.subscriptions=[],this.status=er.Stopped,this.debug("unmounting...")}get service(){return{state:this.getState(),send:this.send,context:this.context,prop:this.prop,scope:this.scope,refs:this.refs,computed:this.computed,event:this.getEvent(),getStatus:()=>this.status}}},K=class{constructor(e,t){Y(this,"el");Y(this,"doc");Y(this,"machine");Y(this,"api");Y(this,"init",()=>{this.render(),this.machine.subscribe(()=>{this.api=this.initApi(),this.render()}),this.machine.start()});Y(this,"destroy",()=>{this.machine.stop()});Y(this,"spreadProps",(e,t)=>{Rv(e,t,this.machine.scope.id)});Y(this,"updateProps",e=>{this.machine.updateProps(e)});if(!e)throw new Error("Root element not found");this.el=e,this.doc=document,this.machine=this.initMachine(t),this.api=this.initApi()}}});var cu={};he(cu,{Accordion:()=>jv});function Gv(e,t){let{send:n,context:i,prop:r,scope:s,computed:a}=e,o=i.get("focusedValue"),l=i.get("value"),c=r("multiple");function u(m){let d=m;!c&&d.length>1&&(d=[d[0]]),n({type:"VALUE.SET",value:d})}function h(m){var d;return{expanded:l.includes(m.value),focused:o===m.value,disabled:!!((d=m.disabled)!=null?d:r("disabled"))}}return{focusedValue:o,value:l,setValue:u,getItemState:h,getRootProps(){return t.element(y(g({},dr.root.attrs),{dir:r("dir"),id:bs(s),"data-orientation":r("orientation")}))},getItemProps(m){let d=h(m);return t.element(y(g({},dr.item.attrs),{dir:r("dir"),id:Mv(s,m.value),"data-state":d.expanded?"open":"closed","data-focus":E(d.focused),"data-disabled":E(d.disabled),"data-orientation":r("orientation")}))},getItemContentProps(m){let d=h(m);return t.element(y(g({},dr.itemContent.attrs),{dir:r("dir"),role:"region",id:co(s,m.value),"aria-labelledby":Es(s,m.value),hidden:!d.expanded,"data-state":d.expanded?"open":"closed","data-disabled":E(d.disabled),"data-focus":E(d.focused),"data-orientation":r("orientation")}))},getItemIndicatorProps(m){let d=h(m);return t.element(y(g({},dr.itemIndicator.attrs),{dir:r("dir"),"aria-hidden":!0,"data-state":d.expanded?"open":"closed","data-disabled":E(d.disabled),"data-focus":E(d.focused),"data-orientation":r("orientation")}))},getItemTriggerProps(m){let{value:d}=m,p=h(m);return t.button(y(g({},dr.itemTrigger.attrs),{type:"button",dir:r("dir"),id:Es(s,d),"aria-controls":co(s,d),"data-controls":co(s,d),"aria-expanded":p.expanded,disabled:p.disabled,"data-orientation":r("orientation"),"aria-disabled":p.disabled,"data-state":p.expanded?"open":"closed","data-ownedby":bs(s),onFocus(){p.disabled||n({type:"TRIGGER.FOCUS",value:d})},onBlur(){p.disabled||n({type:"TRIGGER.BLUR"})},onClick(v){p.disabled||(Xe()&&v.currentTarget.focus(),n({type:"TRIGGER.CLICK",value:d}))},onKeyDown(v){if(v.defaultPrevented||p.disabled)return;let I={ArrowDown(){a("isHorizontal")||n({type:"GOTO.NEXT",value:d})},ArrowUp(){a("isHorizontal")||n({type:"GOTO.PREV",value:d})},ArrowRight(){a("isHorizontal")&&n({type:"GOTO.NEXT",value:d})},ArrowLeft(){a("isHorizontal")&&n({type:"GOTO.PREV",value:d})},Home(){n({type:"GOTO.FIRST",value:d})},End(){n({type:"GOTO.LAST",value:d})}},T=ge(v,{dir:r("dir"),orientation:r("orientation")}),O=I[T];O&&(O(v),v.preventDefault())}}))}}}var Lv,dr,bs,Mv,co,Es,Fv,Is,$v,Hv,Bv,_v,Uv,qv,Wv,Kv,c0,zv,u0,Yv,jv,uu=re(()=>{"use strict";se();Lv=U("accordion").parts("root","item","itemTrigger","itemContent","itemIndicator"),dr=Lv.build(),bs=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`accordion:${e.id}`},Mv=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`accordion:${e.id}:item:${t}`},co=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemContent)==null?void 0:i.call(n,t))!=null?r:`accordion:${e.id}:content:${t}`},Es=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemTrigger)==null?void 0:i.call(n,t))!=null?r:`accordion:${e.id}:trigger:${t}`},Fv=e=>e.getById(bs(e)),Is=e=>{let n=`[data-controls][data-ownedby='${CSS.escape(bs(e))}']:not([disabled])`;return Fe(Fv(e),n)},$v=e=>lt(Is(e)),Hv=e=>mt(Is(e)),Bv=(e,t)=>yi(Is(e),Es(e,t)),_v=(e,t)=>bi(Is(e),Es(e,t));({and:Uv,not:qv}=Ee()),Wv={props({props:e}){return g({collapsible:!1,multiple:!1,orientation:"vertical",defaultValue:[]},e)},initialState(){return"idle"},context({prop:e,bindable:t}){return{focusedValue:t(()=>({defaultValue:null,sync:!0,onChange(n){var i;(i=e("onFocusChange"))==null||i({value:n})}})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var i;(i=e("onValueChange"))==null||i({value:n})}}))}},computed:{isHorizontal:({prop:e})=>e("orientation")==="horizontal"},on:{"VALUE.SET":{actions:["setValue"]}},states:{idle:{on:{"TRIGGER.FOCUS":{target:"focused",actions:["setFocusedValue"]}}},focused:{on:{"GOTO.NEXT":{actions:["focusNextTrigger"]},"GOTO.PREV":{actions:["focusPrevTrigger"]},"TRIGGER.CLICK":[{guard:Uv("isExpanded","canToggle"),actions:["collapse"]},{guard:qv("isExpanded"),actions:["expand"]}],"GOTO.FIRST":{actions:["focusFirstTrigger"]},"GOTO.LAST":{actions:["focusLastTrigger"]},"TRIGGER.BLUR":{target:"idle",actions:["clearFocusedValue"]}}}},implementations:{guards:{canToggle:({prop:e})=>!!e("collapsible")||!!e("multiple"),isExpanded:({context:e,event:t})=>e.get("value").includes(t.value)},actions:{collapse({context:e,prop:t,event:n}){let i=t("multiple")?ct(e.get("value"),n.value):[];e.set("value",i)},expand({context:e,prop:t,event:n}){let i=t("multiple")?Ze(e.get("value"),n.value):[n.value];e.set("value",i)},focusFirstTrigger({scope:e}){var t;(t=$v(e))==null||t.focus()},focusLastTrigger({scope:e}){var t;(t=Hv(e))==null||t.focus()},focusNextTrigger({context:e,scope:t}){let n=e.get("focusedValue");if(!n)return;let i=Bv(t,n);i==null||i.focus()},focusPrevTrigger({context:e,scope:t}){let n=e.get("focusedValue");if(!n)return;let i=_v(t,n);i==null||i.focus()},setFocusedValue({context:e,event:t}){e.set("focusedValue",t.value)},clearFocusedValue({context:e}){e.set("focusedValue",null)},setValue({context:e,event:t}){e.set("value",t.value)},coarseValue({context:e,prop:t}){!t("multiple")&&e.get("value").length>1&&(zt("The value of accordion should be a single value when multiple is false."),e.set("value",[e.get("value")[0]]))}}}},Kv=_()(["collapsible","dir","disabled","getRootNode","id","ids","multiple","onFocusChange","onValueChange","orientation","value","defaultValue"]),c0=B(Kv),zv=_()(["value","disabled"]),u0=B(zv),Yv=class extends K{initMachine(e){return new W(Wv,e)}initApi(){return Gv(this.machine.service,q)}render(){var i;let e=(i=this.el.querySelector('[data-scope="accordion"][data-part="root"]'))!=null?i:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.getItemsList(),n=e.querySelectorAll('[data-scope="accordion"][data-part="item"]');for(let r=0;r{var a,o;let r=w(e,"onValueChange");r&&this.liveSocket.main.isConnected()&&t(r,{id:e.id,value:(a=i.value)!=null?a:null});let s=w(e,"onValueChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{id:e.id,value:(o=i.value)!=null?o:null}}))},onFocusChange:i=>{var a,o;let r=w(e,"onFocusChange");r&&this.liveSocket.main.isConnected()&&t(r,{id:e.id,value:(a=i.value)!=null?a:null});let s=w(e,"onFocusChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{id:e.id,value:(o=i.value)!=null?o:null}}))}}));n.init(),this.accordion=n,this.onSetValue=i=>{let{value:r}=i.detail;n.api.setValue(r)},e.addEventListener("phx:accordion:set-value",this.onSetValue),this.handlers=[],this.handlers.push(this.handleEvent("accordion_set_value",i=>{let r=i.accordion_id;r&&!(e.id===r||e.id===`accordion:${r}`)||n.api.setValue(i.value)})),this.handlers.push(this.handleEvent("accordion_value",()=>{this.pushEvent("accordion_value_response",{value:n.api.value})})),this.handlers.push(this.handleEvent("accordion_focused_value",()=>{this.pushEvent("accordion_focused_value_response",{value:n.api.focusedValue})}))},updated(){var t,n,i,r;let e=C(this.el,"controlled");(r=this.accordion)==null||r.updateProps(y(g({id:this.el.id},e?{value:Z(this.el,"value")}:{defaultValue:(i=(n=(t=this.accordion)==null?void 0:t.api)==null?void 0:n.value)!=null?i:Z(this.el,"defaultValue")}),{collapsible:C(this.el,"collapsible"),multiple:C(this.el,"multiple"),orientation:w(this.el,"orientation",["horizontal","vertical"]),dir:Oe(this.el)}))},destroyed(){var e;if(this.onSetValue&&this.el.removeEventListener("phx:accordion:set-value",this.onSetValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.accordion)==null||e.destroy()}}});function yu(e,t,n=e.center){let i=t.x-n.x,r=t.y-n.y;return 360-(Math.atan2(i,r)*(180/Math.PI)+180)}function bn(e){let{x:t,y:n,width:i,height:r}=e,s=t+i/2,a=n+r/2;return{x:t,y:n,width:i,height:r,minX:t,minY:n,maxX:t+i,maxY:n+r,midX:s,midY:a,center:_n(s,a)}}function ey(e){let t=_n(e.minX,e.minY),n=_n(e.maxX,e.minY),i=_n(e.maxX,e.maxY),r=_n(e.minX,e.maxY);return{top:t,right:n,bottom:i,left:r}}function ty(e){if(!uo.has(e)){let t=e.ownerDocument.defaultView||window;uo.set(e,t.getComputedStyle(e))}return uo.get(e)}function po(e,t={}){return bn(ny(e,t))}function ny(e,t={}){let{excludeScrollbar:n=!1,excludeBorders:i=!1}=t,{x:r,y:s,width:a,height:o}=e.getBoundingClientRect(),l={x:r,y:s,width:a,height:o},c=ty(e),{borderLeftWidth:u,borderTopWidth:h,borderRightWidth:m,borderBottomWidth:d}=c,p=gu(u,m),v=gu(h,d);if(i&&(l.width-=p,l.height-=v,l.x+=ho(u),l.y+=ho(h)),n){let I=e.offsetWidth-e.clientWidth-p,T=e.offsetHeight-e.clientHeight-v;l.width-=I,l.height-=T}return l}function Cu(e,t={}){return bn(iy(e,t))}function iy(e,t){let{excludeScrollbar:n=!1}=t,{innerWidth:i,innerHeight:r,document:s,visualViewport:a}=e,o=(a==null?void 0:a.width)||i,l=(a==null?void 0:a.height)||r,c={x:0,y:0,width:o,height:l};if(n){let u=i-s.documentElement.clientWidth,h=r-s.documentElement.clientHeight;c.width-=u,c.height-=h}return c}function Su(e,t){let n=bn(e),{top:i,right:r,left:s,bottom:a}=ey(n),[o]=t.split("-");return{top:[s,i,r,a],right:[i,r,a,s],bottom:[i,s,a,r],left:[r,i,s,a]}[o]}function fo(e,t){let{x:n,y:i}=t,r=!1;for(let s=0,a=e.length-1;si!=u>i&&n<(c-o)*(i-l)/(u-l)+o&&(r=!r)}return r}function mu(e,t){let{minX:n,minY:i,maxX:r,maxY:s,midX:a,midY:o}=e,l=t.includes("w")?n:t.includes("e")?r:a,c=t.includes("n")?i:t.includes("s")?s:o;return{x:l,y:c}}function sy(e){return ry[e]}function Tu(e,t,n,i){let{scalingOriginMode:r,lockAspectRatio:s}=i,a=mu(e,n),o=sy(n),l=mu(e,o);r==="center"&&(t={x:t.x*2,y:t.y*2});let c={x:a.x+t.x,y:a.y+t.y},u={x:pu[n].x*2-1,y:pu[n].y*2-1},h={width:c.x-l.x,height:c.y-l.y},m=u.x*h.width/e.width,d=u.y*h.height/e.height,p=Ti(m)>Ti(d)?m:d,v=s?{x:p,y:p}:{x:a.x===l.x?1:m,y:a.y===l.y?1:d};switch(a.y===l.y?v.y=Ti(v.y):Ps(v.y)!==Ps(d)&&(v.y*=-1),a.x===l.x?v.x=Ti(v.x):Ps(v.x)!==Ps(m)&&(v.x*=-1),r){case"extent":return vu(e,du.scale(v.x,v.y,l),!1);case"center":return vu(e,du.scale(v.x,v.y,{x:e.midX,y:e.midY}),!1)}}function ay(e,t,n=!0){return n?{x:fu(t.x,e.x),y:fu(t.y,e.y),width:Ti(t.x-e.x),height:Ti(t.y-e.y)}:{x:e.x,y:e.y,width:t.x-e.x,height:t.y-e.y}}function vu(e,t,n=!0){let i=t.applyTo({x:e.minX,y:e.minY}),r=t.applyTo({x:e.maxX,y:e.maxY});return ay(i,r,n)}var Xv,Zv,Zt,du,hu,hr,Jv,Qv,gr,_n,go,bu,Eu,Iu,Pu,uo,ho,gu,g0,p0,pu,ry,Ps,Ti,fu,Cs=re(()=>{"use strict";Xv=Object.defineProperty,Zv=(e,t,n)=>t in e?Xv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zt=(e,t,n)=>Zv(e,typeof t!="symbol"?t+"":t,n),du=class Ae{constructor([t,n,i,r,s,a]=[0,0,0,0,0,0]){Zt(this,"m00"),Zt(this,"m01"),Zt(this,"m02"),Zt(this,"m10"),Zt(this,"m11"),Zt(this,"m12"),Zt(this,"rotate",(...o)=>this.prepend(Ae.rotate(...o))),Zt(this,"scale",(...o)=>this.prepend(Ae.scale(...o))),Zt(this,"translate",(...o)=>this.prepend(Ae.translate(...o))),this.m00=t,this.m01=n,this.m02=i,this.m10=r,this.m11=s,this.m12=a}applyTo(t){let{x:n,y:i}=t,{m00:r,m01:s,m02:a,m10:o,m11:l,m12:c}=this;return{x:r*n+s*i+a,y:o*n+l*i+c}}prepend(t){return new Ae([this.m00*t.m00+this.m01*t.m10,this.m00*t.m01+this.m01*t.m11,this.m00*t.m02+this.m01*t.m12+this.m02,this.m10*t.m00+this.m11*t.m10,this.m10*t.m01+this.m11*t.m11,this.m10*t.m02+this.m11*t.m12+this.m12])}append(t){return new Ae([t.m00*this.m00+t.m01*this.m10,t.m00*this.m01+t.m01*this.m11,t.m00*this.m02+t.m01*this.m12+t.m02,t.m10*this.m00+t.m11*this.m10,t.m10*this.m01+t.m11*this.m11,t.m10*this.m02+t.m11*this.m12+t.m12])}get determinant(){return this.m00*this.m11-this.m01*this.m10}get isInvertible(){let t=this.determinant;return isFinite(t)&&isFinite(this.m02)&&isFinite(this.m12)&&t!==0}invert(){let t=this.determinant;return new Ae([this.m11/t,-this.m01/t,(this.m01*this.m12-this.m11*this.m02)/t,-this.m10/t,this.m00/t,(this.m10*this.m02-this.m00*this.m12)/t])}get array(){return[this.m00,this.m01,this.m02,this.m10,this.m11,this.m12,0,0,1]}get float32Array(){return new Float32Array(this.array)}static get identity(){return new Ae([1,0,0,0,1,0])}static rotate(t,n){let i=new Ae([Math.cos(t),-Math.sin(t),0,Math.sin(t),Math.cos(t),0]);return n&&(n.x!==0||n.y!==0)?Ae.multiply(Ae.translate(n.x,n.y),i,Ae.translate(-n.x,-n.y)):i}static scale(t,n=t,i={x:0,y:0}){let r=new Ae([t,0,0,0,n,0]);return i.x!==0||i.y!==0?Ae.multiply(Ae.translate(i.x,i.y),r,Ae.translate(-i.x,-i.y)):r}static translate(t,n){return new Ae([1,0,t,0,1,n])}static multiply(...[t,...n]){return t?n.reduce((i,r)=>i.prepend(r),t):Ae.identity}get a(){return this.m00}get b(){return this.m10}get c(){return this.m01}get d(){return this.m11}get tx(){return this.m02}get ty(){return this.m12}get scaleComponents(){return{x:this.a,y:this.d}}get translationComponents(){return{x:this.tx,y:this.ty}}get skewComponents(){return{x:this.c,y:this.b}}toString(){return`matrix(${this.a}, ${this.b}, ${this.c}, ${this.d}, ${this.tx}, ${this.ty})`}};hu=(e,t,n)=>Math.min(Math.max(e,t),n),hr=(e,t,n)=>{let i=hu(e.x,n.x,n.x+n.width-t.width),r=hu(e.y,n.y,n.y+n.height-t.height);return{x:i,y:r}},Jv={width:0,height:0},Qv={width:1/0,height:1/0},gr=(e,t=Jv,n=Qv)=>({width:Math.min(Math.max(e.width,t.width),n.width),height:Math.min(Math.max(e.height,t.height),n.height)}),_n=(e,t)=>({x:e,y:t}),go=(e,t)=>t?_n(e.x-t.x,e.y-t.y):e,bu=(e,t)=>_n(e.x+t.x,e.y+t.y);Eu=(e,t)=>{let n=Math.max(t.x,Math.min(e.x,t.x+t.width-e.width)),i=Math.max(t.y,Math.min(e.y,t.y+t.height-e.height));return{x:n,y:i,width:Math.min(e.width,t.width),height:Math.min(e.height,t.height)}},Iu=(e,t)=>e.width===(t==null?void 0:t.width)&&e.height===(t==null?void 0:t.height),Pu=(e,t)=>e.x===(t==null?void 0:t.x)&&e.y===(t==null?void 0:t.y),uo=new WeakMap;ho=e=>parseFloat(e.replace("px","")),gu=(...e)=>e.reduce((t,n)=>t+(n?ho(n):0),0),{min:g0,max:p0}=Math;pu={n:{x:.5,y:0},ne:{x:1,y:0},e:{x:1,y:.5},se:{x:1,y:1},s:{x:.5,y:1},sw:{x:0,y:1},w:{x:0,y:.5},nw:{x:0,y:0}},ry={n:"s",ne:"sw",e:"w",se:"nw",s:"n",sw:"ne",w:"e",nw:"se"},{sign:Ps,abs:Ti,min:fu}=Math});var Nu={};he(Nu,{AngleSlider:()=>vy});function Au(e,t,n){let i=bn(e.getBoundingClientRect()),r=yu(i,t);return n!=null?r-n:r}function ku(e){return Math.min(Math.max(e,Ss),Ts)}function hy(e,t){let n=ku(e),i=Math.ceil(n/t),r=Math.round(n/t);return i>=n/t?i*t===Ts?Ss:i*t:r*t}function wu(e,t){return eu(e,Ss,Ts,t)}function gy(e,t){let{state:n,send:i,context:r,prop:s,computed:a,scope:o}=e,l=n.matches("dragging"),c=r.get("value"),u=a("valueAsDegree"),h=s("disabled"),m=s("invalid"),d=s("readOnly"),p=a("interactive"),v=s("aria-label"),I=s("aria-labelledby");return{value:c,valueAsDegree:u,dragging:l,setValue(T){i({type:"VALUE.SET",value:T})},getRootProps(){return t.element(y(g({},Gn.root.attrs),{id:ly(o),"data-disabled":E(h),"data-invalid":E(m),"data-readonly":E(d),style:{"--value":c,"--angle":u}}))},getLabelProps(){return t.label(y(g({},Gn.label.attrs),{id:Ou(o),htmlFor:mo(o),"data-disabled":E(h),"data-invalid":E(m),"data-readonly":E(d),onClick(T){var O;p&&(T.preventDefault(),(O=vo(o))==null||O.focus())}}))},getHiddenInputProps(){return t.element({type:"hidden",value:c,name:s("name"),id:mo(o)})},getControlProps(){return t.element(y(g({},Gn.control.attrs),{role:"presentation",id:xu(o),"data-disabled":E(h),"data-invalid":E(m),"data-readonly":E(d),onPointerDown(T){if(!p||!pe(T))return;let O=je(T),b=T.currentTarget,f=vo(o),S=Yt(T).composedPath(),P=f&&S.includes(f),V=null;P&&(V=Au(b,O)-c),i({type:"CONTROL.POINTER_DOWN",point:O,angularOffset:V}),T.stopPropagation()},style:{touchAction:"none",userSelect:"none",WebkitUserSelect:"none"}}))},getThumbProps(){return t.element(y(g({},Gn.thumb.attrs),{id:Vu(o),role:"slider","aria-label":v,"aria-labelledby":I!=null?I:Ou(o),"aria-valuemax":360,"aria-valuemin":0,"aria-valuenow":c,tabIndex:d||p?0:void 0,"data-disabled":E(h),"data-invalid":E(m),"data-readonly":E(d),onFocus(){i({type:"THUMB.FOCUS"})},onBlur(){i({type:"THUMB.BLUR"})},onKeyDown(T){if(!p)return;let O=gi(T)*s("step");switch(T.key){case"ArrowLeft":case"ArrowUp":T.preventDefault(),i({type:"THUMB.ARROW_DEC",step:O});break;case"ArrowRight":case"ArrowDown":T.preventDefault(),i({type:"THUMB.ARROW_INC",step:O});break;case"Home":T.preventDefault(),i({type:"THUMB.HOME"});break;case"End":T.preventDefault(),i({type:"THUMB.END"});break}},style:{rotate:"var(--angle)"}}))},getValueTextProps(){return t.element(y(g({},Gn.valueText.attrs),{id:cy(o)}))},getMarkerGroupProps(){return t.element(g({},Gn.markerGroup.attrs))},getMarkerProps(T){let O;return T.valuec?O="over-value":O="at-value",t.element(y(g({},Gn.marker.attrs),{"data-value":T.value,"data-state":O,"data-disabled":E(h),style:{"--marker-value":T.value,rotate:"calc(var(--marker-value) * 1deg)"}}))}}}var oy,Gn,ly,Vu,mo,xu,cy,Ou,uy,dy,vo,Ss,Ts,py,fy,y0,my,vy,Ru=re(()=>{"use strict";Cs();se();oy=U("angle-slider").parts("root","label","thumb","valueText","control","track","markerGroup","marker"),Gn=oy.build(),ly=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`angle-slider:${e.id}`},Vu=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.thumb)!=null?n:`angle-slider:${e.id}:thumb`},mo=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.hiddenInput)!=null?n:`angle-slider:${e.id}:input`},xu=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`angle-slider:${e.id}:control`},cy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.valueText)!=null?n:`angle-slider:${e.id}:value-text`},Ou=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`angle-slider:${e.id}:label`},uy=e=>e.getById(mo(e)),dy=e=>e.getById(xu(e)),vo=e=>e.getById(Vu(e)),Ss=0,Ts=359;py={props({props:e}){return g({step:1,defaultValue:0},e)},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var i;(i=e("onValueChange"))==null||i({value:n,valueAsDegree:`${n}deg`})}}))}},refs(){return{thumbDragOffset:null}},computed:{interactive:({prop:e})=>!(e("disabled")||e("readOnly")),valueAsDegree:({context:e})=>`${e.get("value")}deg`},watch({track:e,context:t,action:n}){e([()=>t.get("value")],()=>{n(["syncInputElement"])})},initialState(){return"idle"},on:{"VALUE.SET":{actions:["setValue"]}},states:{idle:{on:{"CONTROL.POINTER_DOWN":{target:"dragging",actions:["setThumbDragOffset","setPointerValue","focusThumb"]},"THUMB.FOCUS":{target:"focused"}}},focused:{on:{"CONTROL.POINTER_DOWN":{target:"dragging",actions:["setThumbDragOffset","setPointerValue","focusThumb"]},"THUMB.ARROW_DEC":{actions:["decrementValue","invokeOnChangeEnd"]},"THUMB.ARROW_INC":{actions:["incrementValue","invokeOnChangeEnd"]},"THUMB.HOME":{actions:["setValueToMin","invokeOnChangeEnd"]},"THUMB.END":{actions:["setValueToMax","invokeOnChangeEnd"]},"THUMB.BLUR":{target:"idle"}}},dragging:{entry:["focusThumb"],effects:["trackPointerMove"],on:{"DOC.POINTER_UP":{target:"focused",actions:["invokeOnChangeEnd","clearThumbDragOffset"]},"DOC.POINTER_MOVE":{actions:["setPointerValue"]}}}},implementations:{effects:{trackPointerMove({scope:e,send:t}){return hn(e.getDoc(),{onPointerMove(n){t({type:"DOC.POINTER_MOVE",point:n.point})},onPointerUp(){t({type:"DOC.POINTER_UP"})}})}},actions:{syncInputElement({scope:e,context:t}){let n=uy(e);Me(n,t.get("value").toString())},invokeOnChangeEnd({context:e,prop:t,computed:n}){var i;(i=t("onValueChangeEnd"))==null||i({value:e.get("value"),valueAsDegree:n("valueAsDegree")})},setPointerValue({scope:e,event:t,context:n,prop:i,refs:r}){let s=dy(e);if(!s)return;let a=r.get("thumbDragOffset"),o=Au(s,t.point,a);n.set("value",hy(o,i("step")))},setValueToMin({context:e}){e.set("value",Ss)},setValueToMax({context:e}){e.set("value",Ts)},setValue({context:e,event:t}){e.set("value",ku(t.value))},decrementValue({context:e,event:t,prop:n}){var r;let i=wu(e.get("value")-t.step,(r=t.step)!=null?r:n("step"));e.set("value",i)},incrementValue({context:e,event:t,prop:n}){var r;let i=wu(e.get("value")+t.step,(r=t.step)!=null?r:n("step"));e.set("value",i)},focusThumb({scope:e}){H(()=>{var t;(t=vo(e))==null||t.focus({preventScroll:!0})})},setThumbDragOffset({refs:e,event:t}){var n;e.set("thumbDragOffset",(n=t.angularOffset)!=null?n:null)},clearThumbDragOffset({refs:e}){e.set("thumbDragOffset",null)}}}},fy=_()(["aria-label","aria-labelledby","dir","disabled","getRootNode","id","ids","invalid","name","onValueChange","onValueChangeEnd","readOnly","step","value","defaultValue"]),y0=B(fy),my=class extends K{initMachine(e){return new W(py,e)}initApi(){return gy(this.machine.service,q)}render(){var o;let e=(o=this.el.querySelector('[data-scope="angle-slider"][data-part="root"]'))!=null?o:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="angle-slider"][data-part="label"]');t&&this.spreadProps(t,this.api.getLabelProps());let n=this.el.querySelector('[data-scope="angle-slider"][data-part="hidden-input"]');n&&this.spreadProps(n,this.api.getHiddenInputProps());let i=this.el.querySelector('[data-scope="angle-slider"][data-part="control"]');i&&this.spreadProps(i,this.api.getControlProps());let r=this.el.querySelector('[data-scope="angle-slider"][data-part="thumb"]');r&&this.spreadProps(r,this.api.getThumbProps());let s=this.el.querySelector('[data-scope="angle-slider"][data-part="value-text"]');if(s){this.spreadProps(s,this.api.getValueTextProps());let l=s.querySelector('[data-scope="angle-slider"][data-part="value"]');l&&l.textContent!==String(this.api.value)&&(l.textContent=String(this.api.value))}let a=this.el.querySelector('[data-scope="angle-slider"][data-part="marker-group"]');a&&this.spreadProps(a,this.api.getMarkerGroupProps()),this.el.querySelectorAll('[data-scope="angle-slider"][data-part="marker"]').forEach(l=>{let c=l.dataset.value;if(c==null)return;let u=Number(c);Number.isNaN(u)||this.spreadProps(l,this.api.getMarkerProps({value:u}))})}},vy={mounted(){var s;let e=this.el,t=z(e,"value"),n=z(e,"defaultValue"),i=C(e,"controlled"),r=new my(e,y(g({id:e.id},i&&t!==void 0?{value:t}:{defaultValue:n!=null?n:0}),{step:(s=z(e,"step"))!=null?s:1,disabled:C(e,"disabled"),readOnly:C(e,"readOnly"),invalid:C(e,"invalid"),name:w(e,"name"),dir:w(e,"dir",["ltr","rtl"]),onValueChange:a=>{let o=w(e,"onValueChange");o&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(o,{value:a.value,valueAsDegree:a.valueAsDegree,id:e.id});let l=w(e,"onValueChangeClient");l&&e.dispatchEvent(new CustomEvent(l,{bubbles:!0,detail:{value:a,id:e.id}}))},onValueChangeEnd:a=>{let o=w(e,"onValueChangeEnd");o&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(o,{value:a.value,valueAsDegree:a.valueAsDegree,id:e.id});let l=w(e,"onValueChangeEndClient");l&&e.dispatchEvent(new CustomEvent(l,{bubbles:!0,detail:{value:a,id:e.id}}))}}));r.init(),this.angleSlider=r,this.handlers=[],this.onSetValue=a=>{let{value:o}=a.detail;r.api.setValue(o)},e.addEventListener("phx:angle-slider:set-value",this.onSetValue),this.handlers.push(this.handleEvent("angle_slider_set_value",a=>{let o=a.angle_slider_id;o&&!(e.id===o||e.id===`angle-slider:${o}`)||r.api.setValue(a.value)})),this.handlers.push(this.handleEvent("angle_slider_value",()=>{this.pushEvent("angle_slider_value_response",{value:r.api.value,valueAsDegree:r.api.valueAsDegree,dragging:r.api.dragging})}))},updated(){var i,r;let e=z(this.el,"value"),t=z(this.el,"defaultValue"),n=C(this.el,"controlled");(r=this.angleSlider)==null||r.updateProps(y(g({id:this.el.id},n&&e!==void 0?{value:e}:{defaultValue:t!=null?t:0}),{step:(i=z(this.el,"step"))!=null?i:1,disabled:C(this.el,"disabled"),readOnly:C(this.el,"readOnly"),invalid:C(this.el,"invalid"),name:w(this.el,"name"),dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(this.onSetValue&&this.el.removeEventListener("phx:angle-slider:set-value",this.onSetValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.angleSlider)==null||e.destroy()}}});var Mu={};he(Mu,{Avatar:()=>Oy});function Iy(e,t){let{state:n,send:i,prop:r,scope:s}=e,a=n.matches("loaded");return{loaded:a,setSrc(o){let l=bo(s);l==null||l.setAttribute("src",o)},setLoaded(){i({type:"img.loaded",src:"api"})},setError(){i({type:"img.error",src:"api"})},getRootProps(){return t.element(y(g({},yo.root.attrs),{dir:r("dir"),id:Du(s)}))},getImageProps(){return t.img(y(g({},yo.image.attrs),{hidden:!a,dir:r("dir"),id:Lu(s),"data-state":a?"visible":"hidden",onLoad(){i({type:"img.loaded",src:"element"})},onError(){i({type:"img.error",src:"element"})}}))},getFallbackProps(){return t.element(y(g({},yo.fallback.attrs),{dir:r("dir"),id:by(s),hidden:a,"data-state":a?"hidden":"visible"}))}}}function Cy(e){return e.complete&&e.naturalWidth!==0&&e.naturalHeight!==0}var yy,yo,Du,Lu,by,Ey,bo,Py,Sy,P0,Ty,Oy,Fu=re(()=>{"use strict";se();yy=U("avatar").parts("root","image","fallback"),yo=yy.build(),Du=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`avatar:${e.id}`},Lu=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.image)!=null?n:`avatar:${e.id}:image`},by=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.fallback)!=null?n:`avatar:${e.id}:fallback`},Ey=e=>e.getById(Du(e)),bo=e=>e.getById(Lu(e));Py={initialState(){return"loading"},effects:["trackImageRemoval","trackSrcChange"],on:{"src.change":{target:"loading"},"img.unmount":{target:"error"}},states:{loading:{entry:["checkImageStatus"],on:{"img.loaded":{target:"loaded",actions:["invokeOnLoad"]},"img.error":{target:"error",actions:["invokeOnError"]}}},error:{on:{"img.loaded":{target:"loaded",actions:["invokeOnLoad"]}}},loaded:{on:{"img.error":{target:"error",actions:["invokeOnError"]}}}},implementations:{actions:{invokeOnLoad({prop:e}){var t;(t=e("onStatusChange"))==null||t({status:"loaded"})},invokeOnError({prop:e}){var t;(t=e("onStatusChange"))==null||t({status:"error"})},checkImageStatus({send:e,scope:t}){let n=bo(t);if(!(n!=null&&n.complete))return;let i=Cy(n)?"img.loaded":"img.error";e({type:i,src:"ssr"})}},effects:{trackImageRemoval({send:e,scope:t}){let n=Ey(t);return hs(n,{callback(i){Array.from(i[0].removedNodes).find(a=>a.nodeType===Node.ELEMENT_NODE&&a.matches("[data-scope=avatar][data-part=image]"))&&e({type:"img.unmount"})}})},trackSrcChange({send:e,scope:t}){let n=bo(t);return ot(n,{attributes:["src","srcset"],callback(){e({type:"src.change"})}})}}}};Sy=_()(["dir","id","ids","onStatusChange","getRootNode"]),P0=B(Sy),Ty=class extends K{initMachine(e){return new W(Py,e)}initApi(){return Iy(this.machine.service,q)}render(){var r;let e=(r=this.el.querySelector('[data-scope="avatar"][data-part="root"]'))!=null?r:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="avatar"][data-part="image"]');t&&this.spreadProps(t,this.api.getImageProps());let n=this.el.querySelector('[data-scope="avatar"][data-part="fallback"]');n&&this.spreadProps(n,this.api.getFallbackProps());let i=this.el.querySelector('[data-scope="avatar"][data-part="skeleton"]');if(i){let s=this.machine.service.state,a=s.matches("loaded"),o=s.matches("error");i.hidden=a||o,i.setAttribute("data-state",a||o?"hidden":"visible")}}},Oy={mounted(){let e=this.el,t=w(e,"src"),n=new Ty(e,g({id:e.id,onStatusChange:i=>{let r=w(e,"onStatusChange");r&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(r,{status:i.status,id:e.id});let s=w(e,"onStatusChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{value:i,id:e.id}}))}},t!==void 0?{}:{}));n.init(),this.avatar=n,t!==void 0&&n.api.setSrc(t),this.handlers=[]},updated(){let e=w(this.el,"src");e!==void 0&&this.avatar&&this.avatar.api.setSrc(e)},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.avatar)==null||e.destroy()}}});var qu={};he(qu,{Carousel:()=>qy});function Bu(e){let t=at(e),n=e.getBoundingClientRect(),i=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),r=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),s=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function o(m,d){let p=parseFloat(m);return/%/.test(m)&&(p/=100,p*=d),Number.isNaN(p)?0:p}let l=o(i,n.width),c=o(r,n.height),u=o(s,n.width),h=o(a,n.height);return{x:{before:l,after:u},y:{before:c,after:h}}}function wy(e,t,n="both"){return n==="x"&&e.right>=t.left&&e.left<=t.right||n==="y"&&e.bottom>=t.top&&e.top<=t.bottom||n==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function _u(e){let t=[];for(let n of e.children)t=t.concat(n,_u(n));return t}function Gu(e,t=!1){let n=e.getBoundingClientRect(),r=Po(e)==="rtl",s={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},a=t?_u(e):e.children;for(let o of["x","y"]){let l=o==="x"?"y":"x",c=o==="x"?"left":"top",u=o==="x"?"right":"bottom",h=o==="x"?"width":"height",m=o==="x"?"scrollLeft":"scrollTop",d=r&&o==="x";for(let p of a){let v=p.getBoundingClientRect();if(!wy(n,v,l))continue;let I=at(p),[T,O]=I.getPropertyValue("scroll-snap-align").split(" ");typeof O=="undefined"&&(O=T);let b=o==="x"?O:T,f,S,P;if(d){let V=Math.abs(e[m]),A=n[u]-v[u]+V;f=A,S=A+v[h],P=A+v[h]/2}else f=v[c]-n[c]+e[m],S=f+v[h],P=f+v[h]/2;switch(b){case"none":break;case"start":s[o].start.push({node:p,position:f});break;case"center":s[o].center.push({node:p,position:P});break;case"end":s[o].end.push({node:p,position:S});break}}}return s}function Vy(e){let t=Po(e),n=e.getBoundingClientRect(),i=Bu(e),r=Gu(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight},a=t==="rtl",o=a&&e.scrollLeft<=0,l;return a?(l=Eo([...r.x.start.map(c=>c.position-i.x.after),...r.x.center.map(c=>c.position-n.width/2),...r.x.end.map(c=>c.position-n.width+i.x.before)].map(Io(0,s.x))),o&&(l=l.map(c=>-c))):l=Eo([...r.x.start.map(c=>c.position-i.x.before),...r.x.center.map(c=>c.position-n.width/2),...r.x.end.map(c=>c.position-n.width+i.x.after)].map(Io(0,s.x))),{x:l,y:Eo([...r.y.start.map(c=>c.position-i.y.before),...r.y.center.map(c=>c.position-n.height/2),...r.y.end.map(c=>c.position-n.height+i.y.after)].map(Io(0,s.y)))}}function xy(e,t,n){let i=Po(e),r=Bu(e),s=Gu(e),a=[...s[t].start,...s[t].center,...s[t].end],o=i==="rtl",l=o&&t==="x"&&e.scrollLeft<=0;for(let c of a)if(n(c.node)){let u;return t==="x"&&o?(u=c.position-r.x.after,l&&(u=-u)):u=c.position-(t==="x"?r.x.before:r.y.before),u}}function Fy(e,t){let{state:n,context:i,computed:r,send:s,scope:a,prop:o}=e,l=n.matches("autoplay"),c=n.matches("dragging"),u=r("canScrollNext"),h=r("canScrollPrev"),m=r("isHorizontal"),d=o("autoSize"),p=Array.from(i.get("pageSnapPoints")),v=i.get("page"),I=o("slidesPerPage"),T=o("padding"),O=o("translations");return{isPlaying:l,isDragging:c,page:v,pageSnapPoints:p,canScrollNext:u,canScrollPrev:h,getProgress(){return v/p.length},getProgressText(){var f,S;let b={page:v+1,totalPages:p.length};return(S=(f=O.progressText)==null?void 0:f.call(O,b))!=null?S:""},scrollToIndex(b,f){s({type:"INDEX.SET",index:b,instant:f})},scrollTo(b,f){s({type:"PAGE.SET",index:b,instant:f})},scrollNext(b){s({type:"PAGE.NEXT",instant:b})},scrollPrev(b){s({type:"PAGE.PREV",instant:b})},play(){s({type:"AUTOPLAY.START"})},pause(){s({type:"AUTOPLAY.PAUSE"})},isInView(b){return Array.from(i.get("slidesInView")).includes(b)},refresh(){s({type:"SNAP.REFRESH"})},getRootProps(){return t.element(y(g({},kt.root.attrs),{id:ky(a),role:"region","aria-roledescription":"carousel","data-orientation":o("orientation"),dir:o("dir"),style:{"--slides-per-page":I,"--slide-spacing":o("spacing"),"--slide-item-size":d?"auto":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(y(g({},kt.itemGroup.attrs),{id:Os(a),"data-orientation":o("orientation"),"data-dragging":E(c),dir:o("dir"),"aria-live":l?"off":"polite",onFocus(b){ce(b.currentTarget,j(b))&&s({type:"VIEWPORT.FOCUS"})},onBlur(b){ce(b.currentTarget,b.relatedTarget)||s({type:"VIEWPORT.BLUR"})},onMouseDown(b){if(b.defaultPrevented||!o("allowMouseDrag")||!pe(b))return;let f=j(b);Ye(f)&&f!==b.currentTarget||(b.preventDefault(),s({type:"DRAGGING.START"}))},onWheel:Yc(b=>{let f=o("orientation")==="horizontal"?"deltaX":"deltaY";b[f]<0&&!r("canScrollPrev")||b[f]>0&&!r("canScrollNext")||s({type:"USER.SCROLL"})},150),onTouchStart(){s({type:"USER.SCROLL"})},style:{display:d?"flex":"grid",gap:"var(--slide-spacing)",scrollSnapType:[m?"x":"y",o("snapType")].join(" "),gridAutoFlow:m?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[m?"gridAutoColumns":"gridAutoRows"]:d?void 0:"var(--slide-item-size)",[m?"scrollPaddingInline":"scrollPaddingBlock"]:T,[m?"paddingInline":"paddingBlock"]:T,[m?"overflowX":"overflowY"]:"auto"}}))},getItemProps(b){let f=i.get("slidesInView").includes(b.index);return t.element(y(g({},kt.item.attrs),{id:Ny(a,b.index),dir:o("dir"),role:"group","data-index":b.index,"data-inview":E(f),"aria-roledescription":"slide","data-orientation":o("orientation"),"aria-label":O.item(b.index,o("slideCount")),"aria-hidden":X(!f),style:{flex:"0 0 auto",[m?"maxWidth":"maxHeight"]:"100%",scrollSnapAlign:(()=>{var x;let S=(x=b.snapAlign)!=null?x:"start",P=o("slidesPerMove"),V=P==="auto"?Math.floor(o("slidesPerPage")):P;return(b.index+V)%V===0?S:void 0})()}}))},getControlProps(){return t.element(y(g({},kt.control.attrs),{"data-orientation":o("orientation")}))},getPrevTriggerProps(){return t.button(y(g({},kt.prevTrigger.attrs),{id:Dy(a),type:"button",disabled:!h,dir:o("dir"),"aria-label":O.prevTrigger,"data-orientation":o("orientation"),"aria-controls":Os(a),onClick(b){b.defaultPrevented||s({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(y(g({},kt.nextTrigger.attrs),{dir:o("dir"),id:Ry(a),type:"button","aria-label":O.nextTrigger,"data-orientation":o("orientation"),"aria-controls":Os(a),disabled:!u,onClick(b){b.defaultPrevented||s({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(y(g({},kt.indicatorGroup.attrs),{dir:o("dir"),id:Ly(a),"data-orientation":o("orientation"),onKeyDown(b){if(b.defaultPrevented)return;let f="indicator",S={ArrowDown(A){m||(s({type:"PAGE.NEXT",src:f}),A.preventDefault())},ArrowUp(A){m||(s({type:"PAGE.PREV",src:f}),A.preventDefault())},ArrowRight(A){m&&(s({type:"PAGE.NEXT",src:f}),A.preventDefault())},ArrowLeft(A){m&&(s({type:"PAGE.PREV",src:f}),A.preventDefault())},Home(A){s({type:"PAGE.SET",index:0,src:f}),A.preventDefault()},End(A){s({type:"PAGE.SET",index:p.length-1,src:f}),A.preventDefault()}},P=ge(b,{dir:o("dir"),orientation:o("orientation")}),V=S[P];V==null||V(b)}}))},getIndicatorProps(b){return t.button(y(g({},kt.indicator.attrs),{dir:o("dir"),id:Uu(a,b.index),type:"button","data-orientation":o("orientation"),"data-index":b.index,"data-readonly":E(b.readOnly),"data-current":E(b.index===v),"aria-label":O.indicator(b.index),onClick(f){f.defaultPrevented||b.readOnly||s({type:"PAGE.SET",index:b.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(y(g({},kt.autoplayTrigger.attrs),{type:"button","data-orientation":o("orientation"),"data-pressed":E(l),"aria-label":l?O.autoplayStop:O.autoplayStart,onClick(b){b.defaultPrevented||s({type:l?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))},getProgressTextProps(){return t.element(g({},kt.progressText.attrs))}}}function Hy(e,t,n){if(e==null||n<=0)return[];let i=[],r=t==="auto"?Math.floor(n):t;if(r<=0)return[];for(let s=0;se);s+=r)i.push(s);return i}var Po,Eo,Io,Ay,kt,ky,Ny,Os,Ry,Dy,Ly,Uu,qe,$u,My,Hu,$y,By,O0,_y,w0,Gy,V0,Uy,qy,Wu=re(()=>{"use strict";se();Po=e=>at(e).direction;Eo=e=>[...new Set(e)],Io=(e,t)=>n=>Math.max(e,Math.min(t,n)),Ay=U("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger","progressText"),kt=Ay.build(),ky=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},Ny=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`carousel:${e.id}:item:${t}`},Os=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},Ry=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},Dy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},Ly=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},Uu=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.indicator)==null?void 0:i.call(n,t))!=null?r:`carousel:${e.id}:indicator:${t}`},qe=e=>e.getById(Os(e)),$u=e=>Fe(qe(e),"[data-part=item]"),My=(e,t)=>e.getById(Uu(e,t)),Hu=e=>{let t=qe(e);if(!t)return;let n=jt(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};$y={props({props:e}){return yn(e,["slideCount"],"carousel"),y(g({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6,autoSize:!1},e),{translations:g({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation",progressText:({page:t,totalPages:n})=>`${t} / ${n}`},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(i){var a;let s=n().get("pageSnapPoints");(a=e("onPageChange"))==null||a({page:i,pageSnapPoint:s[i]})}})),pageSnapPoints:t(()=>({defaultValue:e("autoSize")?Array.from({length:e("slideCount")},(i,r)=>r):Hy(e("slideCount"),e("slidesPerMove"),e("slidesPerPage"))})),slidesInView:t(()=>({defaultValue:[]}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isHorizontal:({prop:e})=>e("orientation")==="horizontal",canScrollNext:({prop:e,context:t})=>e("loop")||t.get("page")e("loop")||t.get("page")>0,autoplayInterval:({prop:e})=>{let t=e("autoplay");return xt(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:i,send:r}){e([()=>i("slidesPerPage"),()=>i("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>i("orientation"),()=>i("autoSize"),()=>i("dir")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>i("slideCount")],()=>{r({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!i("autoplay")],()=>{r({type:i("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(qe(e))},effects:{autoUpdateSlide({computed:e,send:t}){let n=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(n)},trackSlideMutation({scope:e,send:t}){let n=qe(e);if(!n)return;let i=e.getWin(),r=new i.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),Hu(e)});return Hu(e),r.observe(n,{childList:!0,subtree:!0}),()=>r.disconnect()},trackSlideResize({scope:e,send:t}){if(!qe(e))return;let i=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};H(()=>{i(),H(()=>{t({type:"PAGE.SCROLL",instant:!0})})});let r=$u(e);r.forEach(i);let s=r.map(a=>gn.observe(a,i));return At(...s)},trackSlideIntersections({scope:e,prop:t,context:n}){let i=qe(e),r=e.getWin(),s=new r.IntersectionObserver(a=>{let o=a.reduce((l,c)=>{var m;let u=c.target,h=Number((m=u.dataset.index)!=null?m:"-1");return h==null||Number.isNaN(h)||h===-1?l:c.isIntersecting?Ze(l,h):ct(l,h)},n.get("slidesInView"));n.set("slidesInView",vt(o))},{root:i,threshold:t("inViewThreshold")});return $u(e).forEach(a=>s.observe(a)),()=>s.disconnect()},trackScroll({send:e,refs:t,scope:n}){let i=qe(n);return i?ee(i,"scroll",()=>{clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0),t.set("timeoutRef",setTimeout(()=>{e({type:"SCROLL.END"})},150))},{passive:!0}):void 0},trackDocumentVisibility({scope:e,send:t}){let n=e.getDoc();return ee(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){let n=e.getDoc();return hn(n,{onPointerMove({event:i}){t({type:"DRAGGING",left:-i.movementX,top:-i.movementY})},onPointerUp(){t({type:"DRAGGING.END"})}})},trackKeyboardScroll({scope:e,send:t,context:n}){let i=e.getWin();return ee(i,"keydown",s=>{switch(s.key){case"ArrowRight":s.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":s.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":s.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":s.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:i,flush:r}){var c;let s=t.instant?"instant":"smooth",a=He((c=t.index)!=null?c:e.get("page"),0,e.get("pageSnapPoints").length-1),o=qe(n);if(!o)return;let l=i("isHorizontal")?"left":"top";r(()=>{o.scrollTo({[l]:e.get("pageSnapPoints")[a],behavior:s})})},setClosestPage({context:e,scope:t,computed:n}){let i=qe(t);if(!i)return;let r=n("isHorizontal")?i.scrollLeft:i.scrollTop,s=e.get("pageSnapPoints").findIndex(a=>Math.abs(a-r)<1);s!==-1&&e.set("page",s)},setNextPage({context:e,prop:t,state:n}){let i=n.matches("autoplay")||t("loop"),r=Ei(e.get("pageSnapPoints"),e.get("page"),{loop:i});e.set("page",r)},setPrevPage({context:e,prop:t,state:n}){let i=n.matches("autoplay")||t("loop"),r=lr(e.get("pageSnapPoints"),e.get("page"),{loop:i});e.set("page",r)},setMatchingPage({context:e,event:t,computed:n,scope:i}){let r=qe(i);if(!r)return;let s=xy(r,n("isHorizontal")?"x":"y",o=>o.dataset.index===t.index.toString());if(s==null)return;let a=e.get("pageSnapPoints").findIndex(o=>Math.abs(o-s)<1);e.set("page",a)},setPage({context:e,event:t}){var i;let n=(i=t.index)!=null?i:e.get("page");e.set("page",n)},clampPage({context:e}){let t=He(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){let i=qe(n);if(!i)return;let r=Vy(i);e.set("pageSnapPoints",t("isHorizontal")?r.x:r.y)},disableScrollSnap({scope:e}){let t=qe(e);if(!t)return;let n=getComputedStyle(t);t.dataset.scrollSnapType=n.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){let n=qe(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){let i=qe(e);if(!i)return;let r=n("isHorizontal"),s=r?i.scrollLeft:i.scrollTop,a=t.get("pageSnapPoints"),o=a.reduce((l,c)=>Math.abs(c-s){i.scrollTo({left:r?o:i.scrollLeft,top:r?i.scrollTop:o,behavior:"smooth"}),t.set("page",a.indexOf(o));let l=i.dataset.scrollSnapType;l&&(i.style.setProperty("scroll-snap-type",l),delete i.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;let i=My(n,e.get("page"));i&&H(()=>i.focus({preventScroll:!0}))},invokeDragStart({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.start",isDragging:!0,page:e.get("page")})},invokeDragging({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging",isDragging:!0,page:e.get("page")})},invokeDraggingEnd({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.end",isDragging:!1,page:e.get("page")})},invokeAutoplay({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay",isPlaying:!0,page:e.get("page")})},invokeAutoplayStart({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.start",isPlaying:!0,page:e.get("page")})},invokeAutoplayEnd({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.stop",isPlaying:!1,page:e.get("page")})}}}};By=_()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","autoSize","onDragStatusChange","onAutoplayStatusChange"]),O0=B(By),_y=_()(["index","readOnly"]),w0=B(_y),Gy=_()(["index","snapAlign"]),V0=B(Gy),Uy=class extends K{initMachine(e){return new W($y,e)}initApi(){return Fy(this.machine.service,q)}render(){var u;let e=(u=this.el.querySelector('[data-scope="carousel"][data-part="root"]'))!=null?u:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="carousel"][data-part="control"]');t&&this.spreadProps(t,this.api.getControlProps());let n=this.el.querySelector('[data-scope="carousel"][data-part="item-group"]');n&&this.spreadProps(n,this.api.getItemGroupProps());let i=Number(this.el.dataset.slideCount)||0;for(let h=0;h{let h=w(e,"onPageChange");h&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(h,{page:u.page,pageSnapPoint:u.pageSnapPoint,id:e.id});let m=w(e,"onPageChangeClient");m&&e.dispatchEvent(new CustomEvent(m,{bubbles:!0,detail:{value:u,id:e.id}}))}}));s.init(),this.carousel=s,this.handlers=[]},updated(){var i,r;let e=z(this.el,"slideCount");if(e==null||e<1)return;let t=z(this.el,"page"),n=C(this.el,"controlled");(r=this.carousel)==null||r.updateProps(y(g({id:this.el.id,slideCount:e},n&&t!==void 0?{page:t}:{}),{dir:Oe(this.el),orientation:w(this.el,"orientation",["horizontal","vertical"]),slidesPerPage:(i=z(this.el,"slidesPerPage"))!=null?i:1,loop:C(this.el,"loop"),allowMouseDrag:C(this.el,"allowMouseDrag")}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.carousel)==null||e.destroy()}}});function Wy(e){return!(e.metaKey||!di()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function zy(e,t,n){let i=n?j(n):null,r=ue(i);return e=e||i instanceof r.HTMLInputElement&&!Ky.has(i==null?void 0:i.type)||i instanceof r.HTMLTextAreaElement||i instanceof r.HTMLElement&&i.isContentEditable,!(e&&t==="keyboard"&&n instanceof r.KeyboardEvent&&!Reflect.has(Yy,n.key))}function xs(e,t){for(let n of Co)n(e,t)}function Vs(e){Un=!0,Wy(e)&&(In="keyboard",xs("keyboard",e))}function dt(e){In="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Un=!0,xs("pointer",e))}function Ku(e){Vc(e)&&(Un=!0,In="virtual")}function zu(e){let t=j(e);t===ue(t)||t===Le(t)||(!Un&&!So&&(In="virtual",xs("virtual",e)),Un=!1,So=!1)}function Yu(){Un=!1,So=!0}function jy(e){if(typeof window=="undefined"||ws.get(ue(e)))return;let t=ue(e),n=Le(e),i=t.HTMLElement.prototype.focus;function r(){In="virtual",xs("virtual",null),Un=!0,i.apply(this,arguments)}try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:r})}catch(s){}n.addEventListener("keydown",Vs,!0),n.addEventListener("keyup",Vs,!0),n.addEventListener("click",Ku,!0),t.addEventListener("focus",zu,!0),t.addEventListener("blur",Yu,!1),typeof t.PointerEvent!="undefined"?(n.addEventListener("pointerdown",dt,!0),n.addEventListener("pointermove",dt,!0),n.addEventListener("pointerup",dt,!0)):(n.addEventListener("mousedown",dt,!0),n.addEventListener("mousemove",dt,!0),n.addEventListener("mouseup",dt,!0)),t.addEventListener("beforeunload",()=>{Xy(e)},{once:!0}),ws.set(t,{focus:i})}function ju(){return In}function En(){return In==="keyboard"}function Pn(e={}){let{isTextInput:t,autoFocus:n,onChange:i,root:r}=e;jy(r),i==null||i({isFocusVisible:n||En(),modality:In});let s=(a,o)=>{zy(!!t,a,o)&&(i==null||i({isFocusVisible:En(),modality:a}))};return Co.add(s),()=>{Co.delete(s)}}var Ky,In,Co,ws,Un,So,Yy,Xy,pr=re(()=>{"use strict";se();Ky=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);In=null,Co=new Set,ws=new Map,Un=!1,So=!1,Yy={Tab:!0,Escape:!0};Xy=(e,t)=>{let n=ue(e),i=Le(e),r=ws.get(n);if(r){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:r.focus})}catch(s){}i.removeEventListener("keydown",Vs,!0),i.removeEventListener("keyup",Vs,!0),i.removeEventListener("click",Ku,!0),n.removeEventListener("focus",zu,!0),n.removeEventListener("blur",Yu,!1),typeof n.PointerEvent!="undefined"?(i.removeEventListener("pointerdown",dt,!0),i.removeEventListener("pointermove",dt,!0),i.removeEventListener("pointerup",dt,!0)):(i.removeEventListener("mousedown",dt,!0),i.removeEventListener("mousemove",dt,!0),i.removeEventListener("mouseup",dt,!0)),ws.delete(n)}}});var Qu={};he(Qu,{Checkbox:()=>sb});function eb(e,t){let{send:n,context:i,prop:r,computed:s,scope:a}=e,o=!!r("disabled"),l=!!r("readOnly"),c=!!r("required"),u=!!r("invalid"),h=!o&&i.get("focused"),m=!o&&i.get("focusVisible"),d=s("checked"),p=s("indeterminate"),v=i.get("checked"),I={"data-active":E(i.get("active")),"data-focus":E(h),"data-focus-visible":E(m),"data-readonly":E(l),"data-hover":E(i.get("hovered")),"data-disabled":E(o),"data-state":p?"indeterminate":d?"checked":"unchecked","data-invalid":E(u),"data-required":E(c)};return{checked:d,disabled:o,indeterminate:p,focused:h,checkedState:v,setChecked(T){n({type:"CHECKED.SET",checked:T,isTrusted:!1})},toggleChecked(){n({type:"CHECKED.TOGGLE",checked:d,isTrusted:!1})},getRootProps(){return t.label(y(g(g({},As.root.attrs),I),{dir:r("dir"),id:Ju(a),htmlFor:To(a),onPointerMove(){o||n({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){o||n({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(T){j(T)===fr(a)&&T.stopPropagation()}}))},getLabelProps(){return t.element(y(g(g({},As.label.attrs),I),{dir:r("dir"),id:Xu(a)}))},getControlProps(){return t.element(y(g(g({},As.control.attrs),I),{dir:r("dir"),id:Jy(a),"aria-hidden":!0}))},getIndicatorProps(){return t.element(y(g(g({},As.indicator.attrs),I),{dir:r("dir"),hidden:!p&&!d}))},getHiddenInputProps(){return t.input({id:To(a),type:"checkbox",required:r("required"),defaultChecked:d,disabled:o,"aria-labelledby":Xu(a),"aria-invalid":u,name:r("name"),form:r("form"),value:r("value"),style:Vt,onFocus(){let T=En();n({type:"CONTEXT.SET",context:{focused:!0,focusVisible:T}})},onBlur(){n({type:"CONTEXT.SET",context:{focused:!1,focusVisible:!1}})},onClick(T){if(l){T.preventDefault();return}let O=T.currentTarget.checked;n({type:"CHECKED.SET",checked:O,isTrusted:!0})}})}}}function ks(e){return e==="indeterminate"}function nb(e){return ks(e)?!1:!!e}var Zy,As,Ju,Xu,Jy,To,Qy,fr,Zu,tb,ib,L0,rb,sb,ed=re(()=>{"use strict";pr();se();Zy=U("checkbox").parts("root","label","control","indicator"),As=Zy.build(),Ju=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`checkbox:${e.id}`},Xu=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`checkbox:${e.id}:label`},Jy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`checkbox:${e.id}:control`},To=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.hiddenInput)!=null?n:`checkbox:${e.id}:input`},Qy=e=>e.getById(Ju(e)),fr=e=>e.getById(To(e));({not:Zu}=Ee()),tb={props({props:e}){var t;return y(g({value:"on"},e),{defaultChecked:(t=e.defaultChecked)!=null?t:!1})},initialState(){return"ready"},context({prop:e,bindable:t}){return{checked:t(()=>({defaultValue:e("defaultChecked"),value:e("checked"),onChange(n){var i;(i=e("onCheckedChange"))==null||i({checked:n})}})),fieldsetDisabled:t(()=>({defaultValue:!1})),focusVisible:t(()=>({defaultValue:!1})),active:t(()=>({defaultValue:!1})),focused:t(()=>({defaultValue:!1})),hovered:t(()=>({defaultValue:!1}))}},watch({track:e,context:t,prop:n,action:i}){e([()=>n("disabled")],()=>{i(["removeFocusIfNeeded"])}),e([()=>t.get("checked")],()=>{i(["syncInputElement"])})},effects:["trackFormControlState","trackPressEvent","trackFocusVisible"],on:{"CHECKED.TOGGLE":[{guard:Zu("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:Zu("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},computed:{indeterminate:({context:e})=>ks(e.get("checked")),checked:({context:e})=>nb(e.get("checked")),disabled:({context:e,prop:t})=>!!t("disabled")||e.get("fieldsetDisabled")},states:{ready:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackPressEvent({context:e,computed:t,scope:n}){if(!t("disabled"))return ps({pointerNode:Qy(n),keyboardNode:fr(n),isValidKey:i=>i.key===" ",onPress:()=>e.set("active",!1),onPressStart:()=>e.set("active",!0),onPressEnd:()=>e.set("active",!1)})},trackFocusVisible({computed:e,scope:t}){var n;if(!e("disabled"))return Pn({root:(n=t.getRootNode)==null?void 0:n.call(t)})},trackFormControlState({context:e,scope:t}){return wt(fr(t),{onFieldsetDisabledChange(n){e.set("fieldsetDisabled",n)},onFormReset(){e.set("checked",e.initial("checked"))}})}},actions:{setContext({context:e,event:t}){for(let n in t.context)e.set(n,t.context[n])},syncInputElement({context:e,computed:t,scope:n}){let i=fr(n);i&&(sr(i,t("checked")),i.indeterminate=ks(e.get("checked")))},removeFocusIfNeeded({context:e,prop:t}){t("disabled")&&e.get("focused")&&(e.set("focused",!1),e.set("focusVisible",!1))},setChecked({context:e,event:t}){e.set("checked",t.checked)},toggleChecked({context:e,computed:t}){let n=ks(t("checked"))?!0:!t("checked");e.set("checked",n)},dispatchChangeEvent({computed:e,scope:t}){queueMicrotask(()=>{let n=fr(t);pi(n,{checked:e("checked")})})}}}};ib=_()(["defaultChecked","checked","dir","disabled","form","getRootNode","id","ids","invalid","name","onCheckedChange","readOnly","required","value"]),L0=B(ib),rb=class extends K{initMachine(e){return new W(tb,e)}initApi(){return eb(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="checkbox"][data-part="root"]');if(!e)return;this.spreadProps(e,this.api.getRootProps());let t=e.querySelector(':scope > [data-scope="checkbox"][data-part="hidden-input"]');t&&this.spreadProps(t,this.api.getHiddenInputProps());let n=e.querySelector(':scope > [data-scope="checkbox"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps());let i=e.querySelector(':scope > [data-scope="checkbox"][data-part="control"]');if(i){this.spreadProps(i,this.api.getControlProps());let r=i.querySelector(':scope > [data-scope="checkbox"][data-part="indicator"]');r&&this.spreadProps(r,this.api.getIndicatorProps())}}},sb={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=new rb(e,y(g({id:e.id},C(e,"controlled")?{checked:C(e,"checked")}:{defaultChecked:C(e,"defaultChecked")}),{disabled:C(e,"disabled"),name:w(e,"name"),form:w(e,"form"),value:w(e,"value"),dir:Oe(e),invalid:C(e,"invalid"),required:C(e,"required"),readOnly:C(e,"readOnly"),onCheckedChange:i=>{let r=w(e,"onCheckedChange");r&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&t(r,{checked:i.checked,id:e.id});let s=w(e,"onCheckedChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{value:i,id:e.id}}))}}));n.init(),this.checkbox=n,this.onSetChecked=i=>{let{checked:r}=i.detail;n.api.setChecked(r)},e.addEventListener("phx:checkbox:set-checked",this.onSetChecked),this.onToggleChecked=()=>{n.api.toggleChecked()},e.addEventListener("phx:checkbox:toggle-checked",this.onToggleChecked),this.handlers=[],this.handlers.push(this.handleEvent("checkbox_set_checked",i=>{let r=i.id;r&&r!==e.id||n.api.setChecked(i.checked)})),this.handlers.push(this.handleEvent("checkbox_toggle_checked",i=>{let r=i.id;r&&r!==e.id||n.api.toggleChecked()})),this.handlers.push(this.handleEvent("checkbox_checked",()=>{this.pushEvent("checkbox_checked_response",{value:n.api.checked})})),this.handlers.push(this.handleEvent("checkbox_focused",()=>{this.pushEvent("checkbox_focused_response",{value:n.api.focused})})),this.handlers.push(this.handleEvent("checkbox_disabled",()=>{this.pushEvent("checkbox_disabled_response",{value:n.api.disabled})}))},updated(){var e;(e=this.checkbox)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlled")?{checked:C(this.el,"checked")}:{defaultChecked:C(this.el,"defaultChecked")}),{disabled:C(this.el,"disabled"),name:w(this.el,"name"),form:w(this.el,"form"),value:w(this.el,"value"),dir:Oe(this.el),invalid:C(this.el,"invalid"),required:C(this.el,"required"),readOnly:C(this.el,"readOnly"),label:w(this.el,"label")}))},destroyed(){var e;if(this.onSetChecked&&this.el.removeEventListener("phx:checkbox:set-checked",this.onSetChecked),this.onToggleChecked&&this.el.removeEventListener("phx:checkbox:toggle-checked",this.onToggleChecked),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.checkbox)==null||e.destroy()}}});var td={};he(td,{Clipboard:()=>bb});function db(e,t){let n=e.createElement("pre");return Object.assign(n.style,{width:"1px",height:"1px",position:"fixed",top:"5px"}),n.textContent=t,n}function hb(e){let n=ue(e).getSelection();if(n==null)return Promise.reject(new Error);n.removeAllRanges();let i=e.ownerDocument,r=i.createRange();return r.selectNodeContents(e),n.addRange(r),i.execCommand("copy"),n.removeAllRanges(),Promise.resolve()}function gb(e,t){var r;let n=e.defaultView||window;if(((r=n.navigator.clipboard)==null?void 0:r.writeText)!==void 0)return n.navigator.clipboard.writeText(t);if(!e.body)return Promise.reject(new Error);let i=db(e,t);return e.body.appendChild(i),hb(i),e.body.removeChild(i),Promise.resolve()}function pb(e,t){let{state:n,send:i,context:r,scope:s}=e,a=n.matches("copied");return{copied:a,value:r.get("value"),setValue(o){i({type:"VALUE.SET",value:o})},copy(){i({type:"COPY"})},getRootProps(){return t.element(y(g({},Oi.root.attrs),{"data-copied":E(a),id:ob(s)}))},getLabelProps(){return t.label(y(g({},Oi.label.attrs),{htmlFor:Oo(s),"data-copied":E(a),id:lb(s)}))},getControlProps(){return t.element(y(g({},Oi.control.attrs),{"data-copied":E(a)}))},getInputProps(){return t.input(y(g({},Oi.input.attrs),{defaultValue:r.get("value"),"data-copied":E(a),readOnly:!0,"data-readonly":"true",id:Oo(s),onFocus(o){o.currentTarget.select()},onCopy(){i({type:"INPUT.COPY"})}}))},getTriggerProps(){return t.button(y(g({},Oi.trigger.attrs),{type:"button","aria-label":a?"Copied to clipboard":"Copy to clipboard","data-copied":E(a),onClick(){i({type:"COPY"})}}))},getIndicatorProps(o){return t.element(y(g({},Oi.indicator.attrs),{hidden:o.copied!==a}))}}}var ab,Oi,ob,Oo,lb,cb,ub,fb,mb,H0,vb,B0,yb,bb,nd=re(()=>{"use strict";se();ab=U("clipboard").parts("root","control","trigger","indicator","input","label"),Oi=ab.build(),ob=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`clip:${e.id}`},Oo=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.input)!=null?n:`clip:${e.id}:input`},lb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`clip:${e.id}:label`},cb=e=>e.getById(Oo(e)),ub=(e,t)=>gb(e.getDoc(),t);fb={props({props:e}){return g({timeout:3e3,defaultValue:""},e)},initialState(){return"idle"},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var i;(i=e("onValueChange"))==null||i({value:n})}}))}},watch({track:e,context:t,action:n}){e([()=>t.get("value")],()=>{n(["syncInputElement"])})},on:{"VALUE.SET":{actions:["setValue"]},COPY:{target:"copied",actions:["copyToClipboard","invokeOnCopy"]}},states:{idle:{on:{"INPUT.COPY":{target:"copied",actions:["invokeOnCopy"]}}},copied:{effects:["waitForTimeout"],on:{"COPY.DONE":{target:"idle"},COPY:{target:"copied",actions:["copyToClipboard","invokeOnCopy"]},"INPUT.COPY":{actions:["invokeOnCopy"]}}}},implementations:{effects:{waitForTimeout({prop:e,send:t}){return mn(()=>{t({type:"COPY.DONE"})},e("timeout"))}},actions:{setValue({context:e,event:t}){e.set("value",t.value)},copyToClipboard({context:e,scope:t}){ub(t,e.get("value"))},invokeOnCopy({prop:e}){var t;(t=e("onStatusChange"))==null||t({copied:!0})},syncInputElement({context:e,scope:t}){let n=cb(t);n&&Me(n,e.get("value"))}}}},mb=_()(["getRootNode","id","ids","value","defaultValue","timeout","onStatusChange","onValueChange"]),H0=B(mb),vb=_()(["copied"]),B0=B(vb),yb=class extends K{initMachine(e){return new W(fb,e)}initApi(){return pb(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="clipboard"][data-part="root"]');if(e){this.spreadProps(e,this.api.getRootProps());let t=e.querySelector('[data-scope="clipboard"][data-part="label"]');t&&this.spreadProps(t,this.api.getLabelProps());let n=e.querySelector('[data-scope="clipboard"][data-part="control"]');if(n){this.spreadProps(n,this.api.getControlProps());let i=n.querySelector('[data-scope="clipboard"][data-part="input"]');if(i){let s=g({},this.api.getInputProps()),a=this.el.dataset.inputAriaLabel;a&&(s["aria-label"]=a),this.spreadProps(i,s)}let r=n.querySelector('[data-scope="clipboard"][data-part="trigger"]');if(r){let s=g({},this.api.getTriggerProps()),a=this.el.dataset.triggerAriaLabel;a&&(s["aria-label"]=a),this.spreadProps(r,s)}}}}},bb={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=this.liveSocket,i=new yb(e,y(g({id:e.id,timeout:z(e,"timeout")},C(e,"controlled")?{value:w(e,"value")}:{defaultValue:w(e,"defaultValue")}),{onValueChange:r=>{var a;let s=w(e,"onValueChange");s&&n.main.isConnected()&&t(s,{id:e.id,value:(a=r.value)!=null?a:null})},onStatusChange:r=>{let s=w(e,"onStatusChange");s&&n.main.isConnected()&&t(s,{id:e.id,copied:r.copied});let a=w(e,"onStatusChangeClient");a&&e.dispatchEvent(new CustomEvent(a,{bubbles:!0}))}}));i.init(),this.clipboard=i,this.onCopy=()=>{i.api.copy()},e.addEventListener("phx:clipboard:copy",this.onCopy),this.onSetValue=r=>{let{value:s}=r.detail;i.api.setValue(s)},e.addEventListener("phx:clipboard:set-value",this.onSetValue),this.handlers=[],this.handlers.push(this.handleEvent("clipboard_copy",r=>{let s=r.clipboard_id;s&&s!==e.id||i.api.copy()})),this.handlers.push(this.handleEvent("clipboard_set_value",r=>{let s=r.clipboard_id;s&&s!==e.id||i.api.setValue(r.value)})),this.handlers.push(this.handleEvent("clipboard_copied",()=>{this.pushEvent("clipboard_copied_response",{value:i.api.copied})}))},updated(){var e;(e=this.clipboard)==null||e.updateProps(y(g({id:this.el.id,timeout:z(this.el,"timeout")},C(this.el,"controlled")?{value:w(this.el,"value")}:{defaultValue:w(this.el,"value")}),{dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(this.onCopy&&this.el.removeEventListener("phx:clipboard:copy",this.onCopy),this.onSetValue&&this.el.removeEventListener("phx:clipboard:set-value",this.onSetValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.clipboard)==null||e.destroy()}}});var id={};he(id,{Collapsible:()=>wb});function Cb(e,t){let{state:n,send:i,context:r,scope:s,prop:a}=e,o=n.matches("open")||n.matches("closing"),l=n.matches("open"),c=n.matches("closed"),{width:u,height:h}=r.get("size"),m=!!a("disabled"),d=a("collapsedHeight"),p=a("collapsedWidth"),v=d!=null,I=p!=null,T=v||I,O=!r.get("initial")&&l;return{disabled:m,visible:o,open:l,measureSize(){i({type:"size.measure"})},setOpen(b){n.matches("open")!==b&&i({type:b?"open":"close"})},getRootProps(){return t.element(y(g({},Ns.root.attrs),{"data-state":l?"open":"closed",dir:a("dir"),id:Ib(s)}))},getContentProps(){return t.element(y(g({},Ns.content.attrs),{id:wo(s),"data-collapsible":"","data-state":O?void 0:l?"open":"closed","data-disabled":E(m),"data-has-collapsed-size":E(T),hidden:!o&&!T,dir:a("dir"),style:g(g({"--height":ye(h),"--width":ye(u),"--collapsed-height":ye(d),"--collapsed-width":ye(p)},c&&v&&{overflow:"hidden",minHeight:ye(d),maxHeight:ye(d)}),c&&I&&{overflow:"hidden",minWidth:ye(p),maxWidth:ye(p)})}))},getTriggerProps(){return t.element(y(g({},Ns.trigger.attrs),{id:Pb(s),dir:a("dir"),type:"button","data-state":l?"open":"closed","data-disabled":E(m),"aria-controls":wo(s),"aria-expanded":o||!1,onClick(b){b.defaultPrevented||m||i({type:l?"close":"open"})}}))},getIndicatorProps(){return t.element(y(g({},Ns.indicator.attrs),{dir:a("dir"),"data-state":l?"open":"closed","data-disabled":E(m)}))}}}var Eb,Ns,Ib,wo,Pb,mr,Sb,Tb,q0,Ob,wb,rd=re(()=>{"use strict";se();Eb=U("collapsible").parts("root","trigger","content","indicator"),Ns=Eb.build(),Ib=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`collapsible:${e.id}`},wo=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`collapsible:${e.id}:content`},Pb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`collapsible:${e.id}:trigger`},mr=e=>e.getById(wo(e));Sb={initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{size:e(()=>({defaultValue:{height:0,width:0},sync:!0})),initial:e(()=>({defaultValue:!1}))}},refs(){return{cleanup:void 0,stylesRef:void 0}},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["setInitial","computeSize","toggleVisibility"])})},exit:["cleanupNode"],states:{closed:{effects:["trackTabbableElements"],on:{"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitial","computeSize","invokeOnOpen"]}]}},closing:{effects:["trackExitAnimation"],on:{"controlled.close":{target:"closed"},"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitial","invokeOnOpen"]}],close:[{guard:"isOpenControlled",actions:["invokeOnExitComplete"]},{target:"closed",actions:["setInitial","computeSize","invokeOnExitComplete"]}],"animation.end":{target:"closed",actions:["invokeOnExitComplete","clearInitial"]}}},open:{effects:["trackEnterAnimation"],on:{"controlled.close":{target:"closing"},close:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closing",actions:["setInitial","computeSize","invokeOnClose"]}],"size.measure":{actions:["measureSize"]},"animation.end":{actions:["clearInitial"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackEnterAnimation:({send:e,scope:t})=>{let n,i=H(()=>{let r=mr(t);if(!r)return;let s=at(r).animationName;if(!s||s==="none"){e({type:"animation.end"});return}let o=l=>{j(l)===r&&e({type:"animation.end"})};r.addEventListener("animationend",o),n=()=>{r.removeEventListener("animationend",o)}});return()=>{i(),n==null||n()}},trackExitAnimation:({send:e,scope:t})=>{let n,i=H(()=>{let r=mr(t);if(!r)return;let s=at(r).animationName;if(!s||s==="none"){e({type:"animation.end"});return}let o=c=>{j(c)===r&&e({type:"animation.end"})};r.addEventListener("animationend",o);let l=Hn(r,{animationFillMode:"forwards"});n=()=>{r.removeEventListener("animationend",o),$n(()=>l())}});return()=>{i(),n==null||n()}},trackTabbableElements:({scope:e,prop:t})=>{if(!t("collapsedHeight")&&!t("collapsedWidth"))return;let n=mr(e);if(!n)return;let i=()=>{let o=jt(n).map(l=>Fc(l,"inert",""));return()=>{o.forEach(l=>l())}},r=i(),s=hs(n,{callback(){r(),r=i()}});return()=>{r(),s()}}},actions:{setInitial:({context:e,flush:t})=>{t(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},cleanupNode:({refs:e})=>{e.set("stylesRef",null)},measureSize:({context:e,scope:t})=>{let n=mr(t);if(!n)return;let{height:i,width:r}=n.getBoundingClientRect();e.set("size",{height:i,width:r})},computeSize:({refs:e,scope:t,context:n})=>{var r;(r=e.get("cleanup"))==null||r();let i=H(()=>{let s=mr(t);if(!s)return;let a=s.hidden;s.style.animationName="none",s.style.animationDuration="0s",s.hidden=!1;let o=s.getBoundingClientRect();n.set("size",{height:o.height,width:o.width}),n.get("initial")&&(s.style.animationName="",s.style.animationDuration=""),s.hidden=a});e.set("cleanup",i)},invokeOnOpen:({prop:e})=>{var t;(t=e("onOpenChange"))==null||t({open:!0})},invokeOnClose:({prop:e})=>{var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},toggleVisibility:({prop:e,send:t})=>{t({type:e("open")?"controlled.open":"controlled.close"})}}}},Tb=_()(["dir","disabled","getRootNode","id","ids","collapsedHeight","collapsedWidth","onExitComplete","onOpenChange","defaultOpen","open"]),q0=B(Tb),Ob=class extends K{initMachine(e){return new W(Sb,e)}initApi(){return Cb(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="collapsible"][data-part="root"]');if(e){this.spreadProps(e,this.api.getRootProps());let t=e.querySelector('[data-scope="collapsible"][data-part="trigger"]');t&&this.spreadProps(t,this.api.getTriggerProps());let n=e.querySelector('[data-scope="collapsible"][data-part="content"]');n&&this.spreadProps(n,this.api.getContentProps())}}},wb={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=new Ob(e,y(g({id:e.id},C(e,"controlled")?{open:C(e,"open")}:{defaultOpen:C(e,"defaultOpen")}),{disabled:C(e,"disabled"),dir:w(e,"dir",["ltr","rtl"]),onOpenChange:i=>{let r=w(e,"onOpenChange");r&&this.liveSocket.main.isConnected()&&t(r,{id:e.id,open:i.open});let s=w(e,"onOpenChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{id:e.id,open:i.open}}))}}));n.init(),this.collapsible=n,this.onSetOpen=i=>{let{open:r}=i.detail;n.api.setOpen(r)},e.addEventListener("phx:collapsible:set-open",this.onSetOpen),this.handlers=[],this.handlers.push(this.handleEvent("collapsible_set_open",i=>{let r=i.collapsible_id;r&&r!==e.id||n.api.setOpen(i.open)})),this.handlers.push(this.handleEvent("collapsible_open",()=>{this.pushEvent("collapsible_open_response",{value:n.api.open})}))},updated(){var e;(e=this.collapsible)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlled")?{open:C(this.el,"open")}:{defaultOpen:C(this.el,"defaultOpen")}),{disabled:C(this.el,"disabled"),dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(this.onSetOpen&&this.el.removeEventListener("phx:collapsible:set-open",this.onSetOpen),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.collapsible)==null||e.destroy()}}});function vr(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function Rs(e,t,n){t=[...t].sort((r,s)=>r-s);let i=t.map(r=>e[r]);for(let r=t.length-1;r>=0;r--)e=[...e.slice(0,t[r]),...e.slice(t[r]+1)];return n=Math.max(0,n-t.filter(r=>rt[n])return 1}return e.length-t.length}function Nb(e){return e.sort(ud)}function Rb(e,t){let n;return Je(e,y(g({},t),{onEnter:(i,r)=>{if(t.predicate(i,r))return n=i,"stop"}})),n}function Db(e,t){let n=[];return Je(e,{onEnter:(i,r)=>{t.predicate(i,r)&&n.push(i)},getChildren:t.getChildren}),n}function sd(e,t){let n;return Je(e,{onEnter:(i,r)=>{if(t.predicate(i,r))return n=[...r],"stop"},getChildren:t.getChildren}),n}function Lb(e,t){let n=t.initialResult;return Je(e,y(g({},t),{onEnter:(i,r)=>{n=t.nextResult(n,i,r)}})),n}function Mb(e,t){return Lb(e,y(g({},t),{initialResult:[],nextResult:(n,i,r)=>(n.push(...t.transform(i,r)),n)}))}function Fb(e,t){let{predicate:n,create:i,getChildren:r}=t,s=(a,o)=>{let l=r(a,o),c=[];l.forEach((d,p)=>{let v=[...o,p],I=s(d,v);I&&c.push(I)});let u=o.length===0,h=n(a,o),m=c.length>0;return u||h||m?i(a,c,o):null};return s(e,[])||i(e,[],[])}function $b(e,t){let n=[],i=0,r=new Map,s=new Map;return Je(e,{getChildren:t.getChildren,onEnter:(a,o)=>{r.has(a)||r.set(a,i++);let l=t.getChildren(a,o);l.forEach(d=>{s.has(d)||s.set(d,a),r.has(d)||r.set(d,i++)});let c=l.length>0?l.map(d=>r.get(d)):void 0,u=s.get(a),h=u?r.get(u):void 0,m=r.get(a);n.push(y(g({},a),{_children:c,_parent:h,_index:m}))}}),n}function Hb(e,t){return{type:"insert",index:e,nodes:t}}function Bb(e){return{type:"remove",indexes:e}}function xo(){return{type:"replace"}}function dd(e){return[e.slice(0,-1),e[e.length-1]]}function hd(e,t,n=new Map){var a;let[i,r]=dd(e);for(let o=i.length-1;o>=0;o--){let l=i.slice(0,o).join();switch((a=n.get(l))==null?void 0:a.type){case"remove":continue}n.set(l,xo())}let s=n.get(i.join());switch(s==null?void 0:s.type){case"remove":n.set(i.join(),{type:"removeThenInsert",removeIndexes:s.indexes,insertIndex:r,insertNodes:t});break;default:n.set(i.join(),Hb(r,t))}return n}function gd(e){var i;let t=new Map,n=new Map;for(let r of e){let s=r.slice(0,-1).join(),a=(i=n.get(s))!=null?i:[];a.push(r[r.length-1]),n.set(s,a.sort((o,l)=>o-l))}for(let r of e)for(let s=r.length-2;s>=0;s--){let a=r.slice(0,s).join();t.has(a)||t.set(a,xo())}for(let[r,s]of n)t.set(r,Bb(s));return t}function _b(e,t){let n=new Map,[i,r]=dd(e);for(let s=i.length-1;s>=0;s--){let a=i.slice(0,s).join();n.set(a,xo())}return n.set(i.join(),{type:"removeThenInsert",removeIndexes:[r],insertIndex:r,insertNodes:[t]}),n}function Ms(e,t,n){return Gb(e,y(g({},n),{getChildren:(i,r)=>{let s=r.join(),a=t.get(s);switch(a==null?void 0:a.type){case"replace":case"remove":case"removeThenInsert":case"insert":return n.getChildren(i,r);default:return[]}},transform:(i,r,s)=>{let a=s.join(),o=t.get(a);switch(o==null?void 0:o.type){case"remove":return n.create(i,r.filter((u,h)=>!o.indexes.includes(h)),s);case"removeThenInsert":let l=r.filter((u,h)=>!o.removeIndexes.includes(h)),c=o.removeIndexes.reduce((u,h)=>h{var u,h;let s=[0,...r],a=s.join(),o=t.transform(i,(u=n[a])!=null?u:[],r),l=s.slice(0,-1).join(),c=(h=n[l])!=null?h:[];c.push(o),n[l]=c}})),n[""][0]}function Ub(e,t){let{nodes:n,at:i}=t;if(i.length===0)throw new Error("Can't insert nodes at the root");let r=hd(i,n);return Ms(e,r,t)}function qb(e,t){if(t.at.length===0)return t.node;let n=_b(t.at,t.node);return Ms(e,n,t)}function Wb(e,t){if(t.indexPaths.length===0)return e;for(let i of t.indexPaths)if(i.length===0)throw new Error("Can't remove the root node");let n=gd(t.indexPaths);return Ms(e,n,t)}function Kb(e,t){if(t.indexPaths.length===0)return e;for(let s of t.indexPaths)if(s.length===0)throw new Error("Can't move the root node");if(t.to.length===0)throw new Error("Can't move nodes to the root");let n=kb(t.indexPaths),i=n.map(s=>cd(e,s,t)),r=hd(t.to,i,gd(n));return Ms(e,r,t)}function Je(e,t){let{onEnter:n,onLeave:i,getChildren:r}=t,s=[],a=[{node:e}],o=t.reuseIndexPath?()=>s:()=>s.slice();for(;a.length>0;){let l=a[a.length-1];if(l.state===void 0){let u=n==null?void 0:n(l.node,o());if(u==="stop")return;l.state=u==="skip"?-1:0}let c=l.children||r(l.node,o());if(l.children||(l.children=c),l.state!==-1){if(l.state{"use strict";se();Vb=Object.defineProperty,xb=(e,t,n)=>t in e?Vb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,L=(e,t,n)=>xb(e,typeof t!="symbol"?t+"":t,n),Ds={itemToValue(e){return typeof e=="string"?e:xt(e)&&$e(e,"value")?e.value:""},itemToString(e){return typeof e=="string"?e:xt(e)&&$e(e,"label")?e.label:Ds.itemToValue(e)},isItemDisabled(e){return xt(e)&&$e(e,"disabled")?!!e.disabled:!1}},Nt=class od{constructor(t){this.options=t,L(this,"items"),L(this,"indexMap",null),L(this,"copy",n=>new od(y(g({},this.options),{items:n!=null?n:[...this.items]}))),L(this,"isEqual",n=>fe(this.items,n.items)),L(this,"setItems",n=>this.copy(n)),L(this,"getValues",(n=this.items)=>{let i=[];for(let r of n){let s=this.getItemValue(r);s!=null&&i.push(s)}return i}),L(this,"find",n=>{if(n==null)return null;let i=this.indexOf(n);return i!==-1?this.at(i):null}),L(this,"findMany",n=>{let i=[];for(let r of n){let s=this.find(r);s!=null&&i.push(s)}return i}),L(this,"at",n=>{var s;if(!this.options.groupBy&&!this.options.groupSort)return(s=this.items[n])!=null?s:null;let i=0,r=this.group();for(let[,a]of r)for(let o of a){if(i===n)return o;i++}return null}),L(this,"sortFn",(n,i)=>{let r=this.indexOf(n),s=this.indexOf(i);return(r!=null?r:0)-(s!=null?s:0)}),L(this,"sort",n=>[...n].sort(this.sortFn.bind(this))),L(this,"getItemValue",n=>{var i,r,s;return n==null?null:(s=(r=(i=this.options).itemToValue)==null?void 0:r.call(i,n))!=null?s:Ds.itemToValue(n)}),L(this,"getItemDisabled",n=>{var i,r,s;return n==null?!1:(s=(r=(i=this.options).isItemDisabled)==null?void 0:r.call(i,n))!=null?s:Ds.isItemDisabled(n)}),L(this,"stringifyItem",n=>{var i,r,s;return n==null?null:(s=(r=(i=this.options).itemToString)==null?void 0:r.call(i,n))!=null?s:Ds.itemToString(n)}),L(this,"stringify",n=>n==null?null:this.stringifyItem(this.find(n))),L(this,"stringifyItems",(n,i=", ")=>{let r=[];for(let s of n){let a=this.stringifyItem(s);a!=null&&r.push(a)}return r.join(i)}),L(this,"stringifyMany",(n,i)=>this.stringifyItems(this.findMany(n),i)),L(this,"has",n=>this.indexOf(n)!==-1),L(this,"hasItem",n=>n==null?!1:this.has(this.getItemValue(n))),L(this,"group",()=>{let{groupBy:n,groupSort:i}=this.options;if(!n)return[["",[...this.items]]];let r=new Map;this.items.forEach((a,o)=>{let l=n(a,o);r.has(l)||r.set(l,[]),r.get(l).push(a)});let s=Array.from(r.entries());return i&&s.sort(([a],[o])=>{if(typeof i=="function")return i(a,o);if(Array.isArray(i)){let l=i.indexOf(a),c=i.indexOf(o);return l===-1?1:c===-1?-1:l-c}return i==="asc"?a.localeCompare(o):i==="desc"?o.localeCompare(a):0}),s}),L(this,"getNextValue",(n,i=1,r=!1)=>{let s=this.indexOf(n);if(s===-1)return null;for(s=r?Math.min(s+i,this.size-1):s+i;s<=this.size&&this.getItemDisabled(this.at(s));)s++;return this.getItemValue(this.at(s))}),L(this,"getPreviousValue",(n,i=1,r=!1)=>{let s=this.indexOf(n);if(s===-1)return null;for(s=r?Math.max(s-i,0):s-i;s>=0&&this.getItemDisabled(this.at(s));)s--;return this.getItemValue(this.at(s))}),L(this,"indexOf",n=>{var i;if(n==null)return-1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex(r=>this.getItemValue(r)===n);if(!this.indexMap){this.indexMap=new Map;let r=0,s=this.group();for(let[,a]of s)for(let o of a){let l=this.getItemValue(o);l!=null&&this.indexMap.set(l,r),r++}}return(i=this.indexMap.get(n))!=null?i:-1}),L(this,"getByText",(n,i)=>{let r=i!=null?this.indexOf(i):-1,s=n.length===1;for(let a=0;a{let{state:r,currentValue:s,timeout:a=350}=i,o=r.keysSoFar+n,c=o.length>1&&Array.from(o).every(p=>p===o[0])?o[0]:o,u=this.getByText(c,s),h=this.getItemValue(u);function m(){clearTimeout(r.timer),r.timer=-1}function d(p){r.keysSoFar=p,m(),p!==""&&(r.timer=+setTimeout(()=>{d(""),m()},a))}return d(o),h}),L(this,"update",(n,i)=>{let r=this.indexOf(n);return r===-1?this:this.copy([...this.items.slice(0,r),i,...this.items.slice(r+1)])}),L(this,"upsert",(n,i,r="append")=>{let s=this.indexOf(n);return s===-1?(r==="append"?this.append:this.prepend)(i):this.copy([...this.items.slice(0,s),i,...this.items.slice(s+1)])}),L(this,"insert",(n,...i)=>this.copy(vr(this.items,n,...i))),L(this,"insertBefore",(n,...i)=>{let r=this.indexOf(n);if(r===-1)if(this.items.length===0)r=0;else return this;return this.copy(vr(this.items,r,...i))}),L(this,"insertAfter",(n,...i)=>{let r=this.indexOf(n);if(r===-1)if(this.items.length===0)r=0;else return this;return this.copy(vr(this.items,r+1,...i))}),L(this,"prepend",(...n)=>this.copy(vr(this.items,0,...n))),L(this,"append",(...n)=>this.copy(vr(this.items,this.items.length,...n))),L(this,"filter",n=>{let i=this.items.filter((r,s)=>n(this.stringifyItem(r),s,r));return this.copy(i)}),L(this,"remove",(...n)=>{let i=n.map(r=>typeof r=="string"?r:this.getItemValue(r));return this.copy(this.items.filter(r=>{let s=this.getItemValue(r);return s==null?!1:!i.includes(s)}))}),L(this,"move",(n,i)=>{let r=this.indexOf(n);return r===-1?this:this.copy(Rs(this.items,[r],i))}),L(this,"moveBefore",(n,...i)=>{let r=this.items.findIndex(a=>this.getItemValue(a)===n);if(r===-1)return this;let s=i.map(a=>this.items.findIndex(o=>this.getItemValue(o)===a)).sort((a,o)=>a-o);return this.copy(Rs(this.items,s,r))}),L(this,"moveAfter",(n,...i)=>{let r=this.items.findIndex(a=>this.getItemValue(a)===n);if(r===-1)return this;let s=i.map(a=>this.items.findIndex(o=>this.getItemValue(o)===a)).sort((a,o)=>a-o);return this.copy(Rs(this.items,s,r+1))}),L(this,"reorder",(n,i)=>this.copy(Rs(this.items,[n],i))),L(this,"compareValue",(n,i)=>{let r=this.indexOf(n),s=this.indexOf(i);return rs?1:0}),L(this,"range",(n,i)=>{let r=[],s=n;for(;s!=null;){if(this.find(s)&&r.push(s),s===i)return r;s=this.getNextValue(s)}return[]}),L(this,"getValueRange",(n,i)=>n&&i?this.compareValue(n,i)<=0?this.range(n,i):this.range(i,n):[]),L(this,"toString",()=>{let n="";for(let i of this.items){let r=this.getItemValue(i),s=this.stringifyItem(i),a=this.getItemDisabled(i),o=[r,s,a].filter(Boolean).join(":");n+=o+","}return n}),L(this,"toJSON",()=>({size:this.size,first:this.firstValue,last:this.lastValue})),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let t=0;for(;this.getItemDisabled(this.at(t));)t++;return this.getItemValue(this.at(t))}get lastValue(){let t=this.size-1;for(;this.getItemDisabled(this.at(t));)t--;return this.getItemValue(this.at(t))}*[Symbol.iterator](){yield*sc(this.items)}},Ab=(e,t)=>!!(e!=null&&e.toLowerCase().startsWith(t.toLowerCase()));Vo=class extends Nt{constructor(e){let{columnCount:t}=e;super(e),L(this,"columnCount"),L(this,"rows",null),L(this,"getRows",()=>(this.rows||(this.rows=cr([...this.items],this.columnCount)),this.rows)),L(this,"getRowCount",()=>Math.ceil(this.items.length/this.columnCount)),L(this,"getCellIndex",(n,i)=>n*this.columnCount+i),L(this,"getCell",(n,i)=>this.at(this.getCellIndex(n,i))),L(this,"getValueCell",n=>{let i=this.indexOf(n);if(i===-1)return null;let r=Math.floor(i/this.columnCount),s=i%this.columnCount;return{row:r,column:s}}),L(this,"getLastEnabledColumnIndex",n=>{for(let i=this.columnCount-1;i>=0;i--){let r=this.getCell(n,i);if(r&&!this.getItemDisabled(r))return i}return null}),L(this,"getFirstEnabledColumnIndex",n=>{for(let i=0;i{let r=this.getValueCell(n);if(r===null)return null;let s=this.getRows(),a=s.length,o=r.row,l=r.column;for(let c=1;c<=a;c++){o=lr(s,o,{loop:i});let u=s[o];if(!u)continue;if(!u[l]){let d=this.getLastEnabledColumnIndex(o);d!=null&&(l=d)}let m=this.getCell(o,l);if(!this.getItemDisabled(m))return this.getItemValue(m)}return this.firstValue}),L(this,"getNextRowValue",(n,i=!1)=>{let r=this.getValueCell(n);if(r===null)return null;let s=this.getRows(),a=s.length,o=r.row,l=r.column;for(let c=1;c<=a;c++){o=Ei(s,o,{loop:i});let u=s[o];if(!u)continue;if(!u[l]){let d=this.getLastEnabledColumnIndex(o);d!=null&&(l=d)}let m=this.getCell(o,l);if(!this.getItemDisabled(m))return this.getItemValue(m)}return this.lastValue}),this.columnCount=t}};ld=class Ls extends Set{constructor(t=[]){super(t),L(this,"selectionMode","single"),L(this,"deselectable",!0),L(this,"copy",()=>{let n=new Ls([...this]);return this.sync(n)}),L(this,"sync",n=>(n.selectionMode=this.selectionMode,n.deselectable=this.deselectable,n)),L(this,"isEmpty",()=>this.size===0),L(this,"isSelected",n=>this.selectionMode==="none"||n==null?!1:this.has(n)),L(this,"canSelect",(n,i)=>this.selectionMode!=="none"||!n.getItemDisabled(n.find(i))),L(this,"firstSelectedValue",n=>{let i=null;for(let r of this)(!i||n.compareValue(r,i)<0)&&(i=r);return i}),L(this,"lastSelectedValue",n=>{let i=null;for(let r of this)(!i||n.compareValue(r,i)>0)&&(i=r);return i}),L(this,"extendSelection",(n,i,r)=>{if(this.selectionMode==="none")return this;if(this.selectionMode==="single")return this.replaceSelection(n,r);let s=this.copy(),a=Array.from(this).pop();for(let o of n.getValueRange(i,a!=null?a:r))s.delete(o);for(let o of n.getValueRange(r,i))this.canSelect(n,o)&&s.add(o);return s}),L(this,"toggleSelection",(n,i)=>{if(this.selectionMode==="none")return this;if(this.selectionMode==="single"&&!this.isSelected(i))return this.replaceSelection(n,i);let r=this.copy();return r.has(i)?r.delete(i):r.canSelect(n,i)&&r.add(i),r}),L(this,"replaceSelection",(n,i)=>{if(this.selectionMode==="none")return this;if(i==null)return this;if(!this.canSelect(n,i))return this;let r=new Ls([i]);return this.sync(r)}),L(this,"setSelection",n=>{if(this.selectionMode==="none")return this;let i=new Ls;for(let r of n)if(r!=null&&(i.add(r),this.selectionMode==="single"))break;return this.sync(i)}),L(this,"clearSelection",()=>{let n=this.copy();return n.deselectable&&n.size>0&&n.clear(),n}),L(this,"select",(n,i,r)=>this.selectionMode==="none"?this:this.selectionMode==="single"?this.isSelected(i)&&this.deselectable?this.toggleSelection(n,i):this.replaceSelection(n,i):this.selectionMode==="multiple"||r?this.toggleSelection(n,i):this.replaceSelection(n,i)),L(this,"deselect",n=>{let i=this.copy();return i.delete(n),i}),L(this,"isEqual",n=>fe(Array.from(this),Array.from(n)))}};Ao=class pd{constructor(t){this.options=t,L(this,"rootNode"),L(this,"isEqual",n=>fe(this.rootNode,n.rootNode)),L(this,"getNodeChildren",n=>{var i,r,s,a;return(a=(s=(r=(i=this.options).nodeToChildren)==null?void 0:r.call(i,n))!=null?s:wi.nodeToChildren(n))!=null?a:[]}),L(this,"resolveIndexPath",n=>typeof n=="string"?this.getIndexPath(n):n),L(this,"resolveNode",n=>{let i=this.resolveIndexPath(n);return i?this.at(i):void 0}),L(this,"getNodeChildrenCount",n=>{var i,r,s;return(s=(r=(i=this.options).nodeToChildrenCount)==null?void 0:r.call(i,n))!=null?s:wi.nodeToChildrenCount(n)}),L(this,"getNodeValue",n=>{var i,r,s;return(s=(r=(i=this.options).nodeToValue)==null?void 0:r.call(i,n))!=null?s:wi.nodeToValue(n)}),L(this,"getNodeDisabled",n=>{var i,r,s;return(s=(r=(i=this.options).isNodeDisabled)==null?void 0:r.call(i,n))!=null?s:wi.isNodeDisabled(n)}),L(this,"stringify",n=>{let i=this.findNode(n);return i?this.stringifyNode(i):null}),L(this,"stringifyNode",n=>{var i,r,s;return(s=(r=(i=this.options).nodeToString)==null?void 0:r.call(i,n))!=null?s:wi.nodeToString(n)}),L(this,"getFirstNode",(n=this.rootNode,i={})=>{let r;return Je(n,{getChildren:this.getNodeChildren,onEnter:(s,a)=>{var o;if(!this.isSameNode(s,n)){if((o=i.skip)!=null&&o.call(i,{value:this.getNodeValue(s),node:s,indexPath:a}))return"skip";if(!r&&a.length>0&&!this.getNodeDisabled(s))return r=s,"stop"}}}),r}),L(this,"getLastNode",(n=this.rootNode,i={})=>{let r;return Je(n,{getChildren:this.getNodeChildren,onEnter:(s,a)=>{var o;if(!this.isSameNode(s,n)){if((o=i.skip)!=null&&o.call(i,{value:this.getNodeValue(s),node:s,indexPath:a}))return"skip";a.length>0&&!this.getNodeDisabled(s)&&(r=s)}}}),r}),L(this,"at",n=>cd(this.rootNode,n,{getChildren:this.getNodeChildren})),L(this,"findNode",(n,i=this.rootNode)=>Rb(i,{getChildren:this.getNodeChildren,predicate:r=>this.getNodeValue(r)===n})),L(this,"findNodes",(n,i=this.rootNode)=>{let r=new Set(n.filter(s=>s!=null));return Db(i,{getChildren:this.getNodeChildren,predicate:s=>r.has(this.getNodeValue(s))})}),L(this,"sort",n=>n.reduce((i,r)=>{let s=this.getIndexPath(r);return s&&i.push({value:r,indexPath:s}),i},[]).sort((i,r)=>ud(i.indexPath,r.indexPath)).map(({value:i})=>i)),L(this,"getIndexPath",n=>sd(this.rootNode,{getChildren:this.getNodeChildren,predicate:i=>this.getNodeValue(i)===n})),L(this,"getValue",n=>{let i=this.at(n);return i?this.getNodeValue(i):void 0}),L(this,"getValuePath",n=>{if(!n)return[];let i=[],r=[...n];for(;r.length>0;){let s=this.at(r);s&&i.unshift(this.getNodeValue(s)),r.pop()}return i}),L(this,"getDepth",n=>{var r;let i=sd(this.rootNode,{getChildren:this.getNodeChildren,predicate:s=>this.getNodeValue(s)===n});return(r=i==null?void 0:i.length)!=null?r:0}),L(this,"isSameNode",(n,i)=>this.getNodeValue(n)===this.getNodeValue(i)),L(this,"isRootNode",n=>this.isSameNode(n,this.rootNode)),L(this,"contains",(n,i)=>!n||!i?!1:i.slice(0,n.length).every((r,s)=>n[s]===i[s])),L(this,"getNextNode",(n,i={})=>{let r=!1,s;return Je(this.rootNode,{getChildren:this.getNodeChildren,onEnter:(a,o)=>{var c;if(this.isRootNode(a))return;let l=this.getNodeValue(a);if((c=i.skip)!=null&&c.call(i,{value:l,node:a,indexPath:o}))return l===n&&(r=!0),"skip";if(r&&!this.getNodeDisabled(a))return s=a,"stop";l===n&&(r=!0)}}),s}),L(this,"getPreviousNode",(n,i={})=>{let r,s=!1;return Je(this.rootNode,{getChildren:this.getNodeChildren,onEnter:(a,o)=>{var c;if(this.isRootNode(a))return;let l=this.getNodeValue(a);if((c=i.skip)!=null&&c.call(i,{value:l,node:a,indexPath:o}))return"skip";if(l===n)return s=!0,"stop";this.getNodeDisabled(a)||(r=a)}}),s?r:void 0}),L(this,"getParentNodes",n=>{var s;let i=(s=this.resolveIndexPath(n))==null?void 0:s.slice();if(!i)return[];let r=[];for(;i.length>0;){i.pop();let a=this.at(i);a&&!this.isRootNode(a)&&r.unshift(a)}return r}),L(this,"getDescendantNodes",(n,i)=>{let r=this.resolveNode(n);if(!r)return[];let s=[];return Je(r,{getChildren:this.getNodeChildren,onEnter:(a,o)=>{o.length!==0&&(!(i!=null&&i.withBranch)&&this.isBranchNode(a)||s.push(a))}}),s}),L(this,"getDescendantValues",(n,i)=>this.getDescendantNodes(n,i).map(s=>this.getNodeValue(s))),L(this,"getParentIndexPath",n=>n.slice(0,-1)),L(this,"getParentNode",n=>{let i=this.resolveIndexPath(n);return i?this.at(this.getParentIndexPath(i)):void 0}),L(this,"visit",n=>{let s=n,{skip:i}=s,r=ft(s,["skip"]);Je(this.rootNode,y(g({},r),{getChildren:this.getNodeChildren,onEnter:(a,o)=>{var l;if(!this.isRootNode(a))return i!=null&&i({value:this.getNodeValue(a),node:a,indexPath:o})?"skip":(l=r.onEnter)==null?void 0:l.call(r,a,o)}}))}),L(this,"getPreviousSibling",n=>{let i=this.getParentNode(n);if(!i)return;let r=this.getNodeChildren(i),s=n[n.length-1];for(;--s>=0;){let a=r[s];if(!this.getNodeDisabled(a))return a}}),L(this,"getNextSibling",n=>{let i=this.getParentNode(n);if(!i)return;let r=this.getNodeChildren(i),s=n[n.length-1];for(;++s{let i=this.getParentNode(n);return i?this.getNodeChildren(i):[]}),L(this,"getValues",(n=this.rootNode)=>Mb(n,{getChildren:this.getNodeChildren,transform:r=>[this.getNodeValue(r)]}).slice(1)),L(this,"isValidDepth",(n,i)=>i==null?!0:typeof i=="function"?i(n.length):n.length===i),L(this,"isBranchNode",n=>this.getNodeChildren(n).length>0||this.getNodeChildrenCount(n)!=null),L(this,"getBranchValues",(n=this.rootNode,i={})=>{let r=[];return Je(n,{getChildren:this.getNodeChildren,onEnter:(s,a)=>{var l;if(a.length===0)return;let o=this.getNodeValue(s);if((l=i.skip)!=null&&l.call(i,{value:o,node:s,indexPath:a}))return"skip";this.isBranchNode(s)&&this.isValidDepth(a,i.depth)&&r.push(this.getNodeValue(s))}}),r}),L(this,"flatten",(n=this.rootNode)=>$b(n,{getChildren:this.getNodeChildren})),L(this,"_create",(n,i)=>this.getNodeChildren(n).length>0||i.length>0?y(g({},n),{children:i}):g({},n)),L(this,"_insert",(n,i,r)=>this.copy(Ub(n,{at:i,nodes:r,getChildren:this.getNodeChildren,create:this._create}))),L(this,"copy",n=>new pd(y(g({},this.options),{rootNode:n}))),L(this,"_replace",(n,i,r)=>this.copy(qb(n,{at:i,node:r,getChildren:this.getNodeChildren,create:this._create}))),L(this,"_move",(n,i,r)=>this.copy(Kb(n,{indexPaths:i,to:r,getChildren:this.getNodeChildren,create:this._create}))),L(this,"_remove",(n,i)=>this.copy(Wb(n,{indexPaths:i,getChildren:this.getNodeChildren,create:this._create}))),L(this,"replace",(n,i)=>this._replace(this.rootNode,n,i)),L(this,"remove",n=>this._remove(this.rootNode,n)),L(this,"insertBefore",(n,i)=>this.getParentNode(n)?this._insert(this.rootNode,n,i):void 0),L(this,"insertAfter",(n,i)=>{if(!this.getParentNode(n))return;let s=[...n.slice(0,-1),n[n.length-1]+1];return this._insert(this.rootNode,s,i)}),L(this,"move",(n,i)=>this._move(this.rootNode,n,i)),L(this,"filter",n=>{let i=Fb(this.rootNode,{predicate:n,getChildren:this.getNodeChildren,create:this._create});return this.copy(i)}),L(this,"toJSON",()=>this.getValues(this.rootNode)),this.rootNode=t.rootNode}},wi={nodeToValue(e){return typeof e=="string"?e:xt(e)&&$e(e,"value")?e.value:""},nodeToString(e){return typeof e=="string"?e:xt(e)&&$e(e,"label")?e.label:wi.nodeToValue(e)},isNodeDisabled(e){return xt(e)&&$e(e,"disabled")?!!e.disabled:!1},nodeToChildren(e){return e.children},nodeToChildrenCount(e){if(xt(e)&&$e(e,"childrenCount"))return e.childrenCount}}});function No(e,t,n){return Qe(e,Sn(t,n))}function Qt(e,t){return typeof e=="function"?e(t):e}function en(e){return e.split("-")[0]}function Ai(e){return e.split("-")[1]}function Lo(e){return e==="x"?"y":"x"}function Mo(e){return e==="y"?"height":"width"}function Rt(e){return Xb.has(en(e))?"y":"x"}function Fo(e){return Lo(Rt(e))}function Zb(e,t,n){n===void 0&&(n=!1);let i=Ai(e),r=Fo(e),s=Mo(r),a=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Hs(a)),[a,Hs(a)]}function Jb(e){let t=Hs(e);return[Ro(e),t,Ro(t)]}function Ro(e){return e.replace(/start|end/g,t=>jb[t])}function tE(e,t,n){switch(e){case"top":case"bottom":return n?t?md:fd:t?fd:md;case"left":case"right":return t?Qb:eE;default:return[]}}function nE(e,t,n,i){let r=Ai(e),s=tE(en(e),n==="start",i);return r&&(s=s.map(a=>a+"-"+r),t&&(s=s.concat(s.map(Ro)))),s}function Hs(e){return e.replace(/left|right|bottom|top/g,t=>Yb[t])}function iE(e){return g({top:0,right:0,bottom:0,left:0},e)}function Od(e){return typeof e!="number"?iE(e):{top:e,right:e,bottom:e,left:e}}function Bs(e){let{x:t,y:n,width:i,height:r}=e;return{width:i,height:r,top:n,left:t,right:t+i,bottom:n+r,x:t,y:n}}function vd(e,t,n){let{reference:i,floating:r}=e,s=Rt(t),a=Fo(t),o=Mo(a),l=en(t),c=s==="y",u=i.x+i.width/2-r.width/2,h=i.y+i.height/2-r.height/2,m=i[o]/2-r[o]/2,d;switch(l){case"top":d={x:u,y:i.y-r.height};break;case"bottom":d={x:u,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:h};break;case"left":d={x:i.x-r.width,y:h};break;default:d={x:i.x,y:i.y}}switch(Ai(t)){case"start":d[a]-=m*(n&&c?-1:1);break;case"end":d[a]+=m*(n&&c?-1:1);break}return d}function rE(e,t){return Ve(this,null,function*(){var n;t===void 0&&(t={});let{x:i,y:r,platform:s,rects:a,elements:o,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:m=!1,padding:d=0}=Qt(t,e),p=Od(d),I=o[m?h==="floating"?"reference":"floating":h],T=Bs(yield s.getClippingRect({element:(n=yield s.isElement==null?void 0:s.isElement(I))==null||n?I:I.contextElement||(yield s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:c,rootBoundary:u,strategy:l})),O=h==="floating"?{x:i,y:r,width:a.floating.width,height:a.floating.height}:a.reference,b=yield s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating),f=(yield s.isElement==null?void 0:s.isElement(b))?(yield s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},S=Bs(s.convertOffsetParentRelativeRectToViewportRelativeRect?yield s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:O,offsetParent:b,strategy:l}):O);return{top:(T.top-S.top+p.top)/f.y,bottom:(S.bottom-T.bottom+p.bottom)/f.y,left:(T.left-S.left+p.left)/f.x,right:(S.right-T.right+p.right)/f.x}})}function yd(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bd(e){return zb.some(t=>e[t]>=0)}function cE(e,t){return Ve(this,null,function*(){let{placement:n,platform:i,elements:r}=e,s=yield i.isRTL==null?void 0:i.isRTL(r.floating),a=en(n),o=Ai(n),l=Rt(n)==="y",c=wd.has(a)?-1:1,u=s&&l?-1:1,h=Qt(t,e),{mainAxis:m,crossAxis:d,alignmentAxis:p}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return o&&typeof p=="number"&&(d=o==="end"?p*-1:p),l?{x:d*u,y:m*c}:{x:m*c,y:d*u}})}function _s(){return typeof window!="undefined"}function ki(e){return Vd(e)?(e.nodeName||"").toLowerCase():"#document"}function et(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mt(e){var t;return(t=(Vd(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Vd(e){return _s()?e instanceof Node||e instanceof et(e).Node:!1}function bt(e){return _s()?e instanceof Element||e instanceof et(e).Element:!1}function Lt(e){return _s()?e instanceof HTMLElement||e instanceof et(e).HTMLElement:!1}function Ed(e){return!_s()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof et(e).ShadowRoot}function Ir(e){let{overflow:t,overflowX:n,overflowY:i,display:r}=Et(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!pE.has(r)}function mE(e){return fE.has(ki(e))}function Gs(e){return vE.some(t=>{try{return e.matches(t)}catch(n){return!1}})}function $o(e){let t=Ho(),n=bt(e)?Et(e):e;return yE.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||bE.some(i=>(n.willChange||"").includes(i))||EE.some(i=>(n.contain||"").includes(i))}function IE(e){let t=Tn(e);for(;Lt(t)&&!xi(t);){if($o(t))return t;if(Gs(t))return null;t=Tn(t)}return null}function Ho(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function xi(e){return PE.has(ki(e))}function Et(e){return et(e).getComputedStyle(e)}function Us(e){return bt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Tn(e){if(ki(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Ed(e)&&e.host||Mt(e);return Ed(t)?t.host:t}function xd(e){let t=Tn(e);return xi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Lt(t)&&Ir(t)?t:xd(t)}function Er(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);let r=xd(e),s=r===((i=e.ownerDocument)==null?void 0:i.body),a=et(r);if(s){let o=Do(a);return t.concat(a,a.visualViewport||[],Ir(r)?r:[],o&&n?Er(o):[])}return t.concat(r,Er(r,[],n))}function Do(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ad(e){let t=Et(e),n=parseFloat(t.width)||0,i=parseFloat(t.height)||0,r=Lt(e),s=r?e.offsetWidth:n,a=r?e.offsetHeight:i,o=$s(n)!==s||$s(i)!==a;return o&&(n=s,i=a),{width:n,height:i,$:o}}function Bo(e){return bt(e)?e:e.contextElement}function Vi(e){let t=Bo(e);if(!Lt(t))return Dt(1);let n=t.getBoundingClientRect(),{width:i,height:r,$:s}=Ad(t),a=(s?$s(n.width):n.width)/i,o=(s?$s(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}function kd(e){let t=et(e);return!Ho()||!t.visualViewport?CE:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function SE(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==et(e)?!1:t}function qn(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);let r=e.getBoundingClientRect(),s=Bo(e),a=Dt(1);t&&(i?bt(i)&&(a=Vi(i)):a=Vi(e));let o=SE(s,n,i)?kd(s):Dt(0),l=(r.left+o.x)/a.x,c=(r.top+o.y)/a.y,u=r.width/a.x,h=r.height/a.y;if(s){let m=et(s),d=i&&bt(i)?et(i):i,p=m,v=Do(p);for(;v&&i&&d!==p;){let I=Vi(v),T=v.getBoundingClientRect(),O=Et(v),b=T.left+(v.clientLeft+parseFloat(O.paddingLeft))*I.x,f=T.top+(v.clientTop+parseFloat(O.paddingTop))*I.y;l*=I.x,c*=I.y,u*=I.x,h*=I.y,l+=b,c+=f,p=et(v),v=Do(p)}}return Bs({width:u,height:h,x:l,y:c})}function qs(e,t){let n=Us(e).scrollLeft;return t?t.left+n:qn(Mt(e)).left+n}function Nd(e,t){let n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-qs(e,n),r=n.top+t.scrollTop;return{x:i,y:r}}function TE(e){let{elements:t,rect:n,offsetParent:i,strategy:r}=e,s=r==="fixed",a=Mt(i),o=t?Gs(t.floating):!1;if(i===a||o&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Dt(1),u=Dt(0),h=Lt(i);if((h||!h&&!s)&&((ki(i)!=="body"||Ir(a))&&(l=Us(i)),Lt(i))){let d=qn(i);c=Vi(i),u.x=d.x+i.clientLeft,u.y=d.y+i.clientTop}let m=a&&!h&&!s?Nd(a,l):Dt(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+m.x,y:n.y*c.y-l.scrollTop*c.y+u.y+m.y}}function OE(e){return Array.from(e.getClientRects())}function wE(e){let t=Mt(e),n=Us(e),i=e.ownerDocument.body,r=Qe(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),s=Qe(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight),a=-n.scrollLeft+qs(e),o=-n.scrollTop;return Et(i).direction==="rtl"&&(a+=Qe(t.clientWidth,i.clientWidth)-r),{width:r,height:s,x:a,y:o}}function VE(e,t){let n=et(e),i=Mt(e),r=n.visualViewport,s=i.clientWidth,a=i.clientHeight,o=0,l=0;if(r){s=r.width,a=r.height;let u=Ho();(!u||u&&t==="fixed")&&(o=r.offsetLeft,l=r.offsetTop)}let c=qs(i);if(c<=0){let u=i.ownerDocument,h=u.body,m=getComputedStyle(h),d=u.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,p=Math.abs(i.clientWidth-h.clientWidth-d);p<=Id&&(s-=p)}else c<=Id&&(s+=c);return{width:s,height:a,x:o,y:l}}function AE(e,t){let n=qn(e,!0,t==="fixed"),i=n.top+e.clientTop,r=n.left+e.clientLeft,s=Lt(e)?Vi(e):Dt(1),a=e.clientWidth*s.x,o=e.clientHeight*s.y,l=r*s.x,c=i*s.y;return{width:a,height:o,x:l,y:c}}function Pd(e,t,n){let i;if(t==="viewport")i=VE(e,n);else if(t==="document")i=wE(Mt(e));else if(bt(t))i=AE(t,n);else{let r=kd(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Bs(i)}function Rd(e,t){let n=Tn(e);return n===t||!bt(n)||xi(n)?!1:Et(n).position==="fixed"||Rd(n,t)}function kE(e,t){let n=t.get(e);if(n)return n;let i=Er(e,[],!1).filter(o=>bt(o)&&ki(o)!=="body"),r=null,s=Et(e).position==="fixed",a=s?Tn(e):e;for(;bt(a)&&!xi(a);){let o=Et(a),l=$o(a);!l&&o.position==="fixed"&&(r=null),(s?!l&&!r:!l&&o.position==="static"&&!!r&&xE.has(r.position)||Ir(a)&&!l&&Rd(e,a))?i=i.filter(u=>u!==a):r=o,a=Tn(a)}return t.set(e,i),i}function NE(e){let{element:t,boundary:n,rootBoundary:i,strategy:r}=e,a=[...n==="clippingAncestors"?Gs(t)?[]:kE(t,this._c):[].concat(n),i],o=a[0],l=a.reduce((c,u)=>{let h=Pd(t,u,r);return c.top=Qe(h.top,c.top),c.right=Sn(h.right,c.right),c.bottom=Sn(h.bottom,c.bottom),c.left=Qe(h.left,c.left),c},Pd(t,o,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function RE(e){let{width:t,height:n}=Ad(e);return{width:t,height:n}}function DE(e,t,n){let i=Lt(t),r=Mt(t),s=n==="fixed",a=qn(e,!0,s,t),o={scrollLeft:0,scrollTop:0},l=Dt(0);function c(){l.x=qs(r)}if(i||!i&&!s)if((ki(t)!=="body"||Ir(r))&&(o=Us(t)),i){let d=qn(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else r&&c();s&&!i&&r&&c();let u=r&&!i&&!s?Nd(r,o):Dt(0),h=a.left+o.scrollLeft-l.x-u.x,m=a.top+o.scrollTop-l.y-u.y;return{x:h,y:m,width:a.width,height:a.height}}function ko(e){return Et(e).position==="static"}function Cd(e,t){if(!Lt(e)||Et(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Mt(e)===n&&(n=n.ownerDocument.body),n}function Dd(e,t){let n=et(e);if(Gs(e))return n;if(!Lt(e)){let r=Tn(e);for(;r&&!xi(r);){if(bt(r)&&!ko(r))return r;r=Tn(r)}return n}let i=Cd(e,t);for(;i&&mE(i)&&ko(i);)i=Cd(i,t);return i&&xi(i)&&ko(i)&&!$o(i)?n:i||IE(e)||n}function ME(e){return Et(e).direction==="rtl"}function Ld(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $E(e,t){let n=null,i,r=Mt(e);function s(){var o;clearTimeout(i),(o=n)==null||o.disconnect(),n=null}function a(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),s();let c=e.getBoundingClientRect(),{left:u,top:h,width:m,height:d}=c;if(o||t(),!m||!d)return;let p=Fs(h),v=Fs(r.clientWidth-(u+m)),I=Fs(r.clientHeight-(h+d)),T=Fs(u),b={rootMargin:-p+"px "+-v+"px "+-I+"px "+-T+"px",threshold:Qe(0,Sn(1,l))||1},f=!0;function S(P){let V=P[0].intersectionRatio;if(V!==l){if(!f)return a();V?a(!1,V):i=setTimeout(()=>{a(!1,1e-7)},1e3)}V===1&&!Ld(c,e.getBoundingClientRect())&&a(),f=!1}try{n=new IntersectionObserver(S,y(g({},b),{root:r.ownerDocument}))}catch(P){n=new IntersectionObserver(S,b)}n.observe(e)}return a(!0),s}function HE(e,t,n,i){i===void 0&&(i={});let{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=Bo(e),u=r||s?[...c?Er(c):[],...Er(t)]:[];u.forEach(T=>{r&&T.addEventListener("scroll",n,{passive:!0}),s&&T.addEventListener("resize",n)});let h=c&&o?$E(c,n):null,m=-1,d=null;a&&(d=new ResizeObserver(T=>{let[O]=T;O&&O.target===c&&d&&(d.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=d)==null||b.observe(t)})),n()}),c&&!l&&d.observe(c),d.observe(t));let p,v=l?qn(e):null;l&&I();function I(){let T=qn(e);v&&!Ld(v,T)&&n(),v=T,p=requestAnimationFrame(I)}return n(),()=>{var T;u.forEach(O=>{r&&O.removeEventListener("scroll",n),s&&O.removeEventListener("resize",n)}),h==null||h(),(T=d)==null||T.disconnect(),d=null,l&&cancelAnimationFrame(p)}}function Sd(e=0,t=0,n=0,i=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,i);let r={x:e,y:t,width:n,height:i,top:t,right:e+n,bottom:t+i,left:e};return y(g({},r),{toJSON:()=>r})}function YE(e){if(!e)return Sd();let{x:t,y:n,width:i,height:r}=e;return Sd(t,n,i,r)}function jE(e,t){return{contextElement:le(e)?e:e==null?void 0:e.contextElement,getBoundingClientRect:()=>{let n=e,i=t==null?void 0:t(n);return i||!n?YE(i):n.getBoundingClientRect()}}}function ZE(e,t){return{name:"transformOrigin",fn(n){var x,k,N,D,$;let{elements:i,middlewareData:r,placement:s,rects:a,y:o}=n,l=s.split("-")[0],c=XE(l),u=((x=r.arrow)==null?void 0:x.x)||0,h=((k=r.arrow)==null?void 0:k.y)||0,m=(t==null?void 0:t.clientWidth)||0,d=(t==null?void 0:t.clientHeight)||0,p=u+m/2,v=h+d/2,I=Math.abs(((N=r.shift)==null?void 0:N.y)||0),T=a.reference.height/2,O=d/2,b=($=(D=e.offset)==null?void 0:D.mainAxis)!=null?$:e.gutter,f=typeof b=="number"?b+O:b!=null?b:O,S=I>f,P={top:`${p}px calc(100% + ${f}px)`,bottom:`${p}px ${-f}px`,left:`calc(100% + ${f}px) ${v}px`,right:`${-f}px ${v}px`}[l],V=`${p}px ${a.reference.y+T-o}px`,A=!!e.overlap&&c==="y"&&S;return i.floating.style.setProperty(Jt.transformOrigin.variable,A?V:P),{data:{transformOrigin:A?V:P}}}}}function eI(e){let[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}function Md(e){return e.split("-")[0]}function Td(e,t){let n=e.devicePixelRatio||1;return Math.round(t*n)/n}function _o(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function nI(e,t,n){let i=e||t.createElement("div");return WE({element:i,padding:n.arrowPadding})}function iI(e,t){var n;if(!Wc((n=t.offset)!=null?n:t.gutter))return BE(({placement:i})=>{var u,h,m,d;let r=((e==null?void 0:e.clientHeight)||0)/2,s=(h=(u=t.offset)==null?void 0:u.mainAxis)!=null?h:t.gutter,a=typeof s=="number"?s+r:s!=null?s:r,{hasAlign:o}=eI(i),l=o?void 0:t.shift,c=(d=(m=t.offset)==null?void 0:m.crossAxis)!=null?d:l;return Si({crossAxis:c,mainAxis:a,alignmentAxis:t.shift})})}function rI(e){if(!e.flip)return;let t=_o(e.boundary);return GE(y(g({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function sI(e){if(!e.slide&&!e.overlap)return;let t=_o(e.boundary);return _E(y(g({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:KE()}))}function aI(e){return UE({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:i,availableWidth:r}){let s=t.floating,a=Math.round(n.reference.width),o=Math.round(n.reference.height);r=Math.floor(r),i=Math.floor(i),s.style.setProperty("--reference-width",`${a}px`),s.style.setProperty("--reference-height",`${o}px`),s.style.setProperty("--available-width",`${r}px`),s.style.setProperty("--available-height",`${i}px`)}})}function oI(e){var t;if(e.hideWhenDetached)return qE({strategy:"referenceHidden",boundary:(t=_o(e.boundary))!=null?t:"clippingAncestors"})}function lI(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function cI(e,t,n={}){var I,T;let i=(T=(I=n.getAnchorElement)==null?void 0:I.call(n))!=null?T:e,r=jE(i,n.getAnchorRect);if(!t||!r)return;let s=Object.assign({},tI,n),a=t.querySelector("[data-part=arrow]"),o=[iI(a,s),rI(s),sI(s),nI(a,t.ownerDocument,s),QE(a),ZE({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),aI(s),oI(s),JE],{placement:l,strategy:c,onComplete:u,onPositioned:h}=s,m=()=>Ve(null,null,function*(){var V;if(!r||!t)return;let O=yield zE(r,t,{placement:l,middleware:o,strategy:c});u==null||u(O),h==null||h({placed:!0});let b=ue(t),f=Td(b,O.x),S=Td(b,O.y);t.style.setProperty("--x",`${f}px`),t.style.setProperty("--y",`${S}px`),s.hideWhenDetached&&(((V=O.middlewareData.hide)==null?void 0:V.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));let P=t.firstElementChild;if(P){let A=at(P);t.style.setProperty("--z-index",A.zIndex)}}),d=()=>Ve(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),h==null||h({placed:!0})):yield m()}),p=lI(s.listeners),v=s.listeners?HE(r,t,d,p):zc;return d(),()=>{v==null||v(),h==null||h({placed:!1})}}function It(e,t,n={}){let o=n,{defer:i}=o,r=ft(o,["defer"]),s=i?H:l=>l(),a=[];return a.push(s(()=>{let l=typeof e=="function"?e():e,c=typeof t=="function"?t():t;a.push(cI(l,c,r))})),()=>{a.forEach(l=>l==null?void 0:l())}}function On(e={}){let{placement:t,sameWidth:n,fitViewport:i,strategy:r="absolute"}=e;return{arrow:{position:"absolute",width:Jt.arrowSize.reference,height:Jt.arrowSize.reference,[Jt.arrowSizeHalf.variable]:`calc(${Jt.arrowSize.reference} / 2)`,[Jt.arrowOffset.variable]:`calc(${Jt.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?uI[t.split("-")[0]]:void 0,background:Jt.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:r,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:i?"var(--available-width)":void 0,maxHeight:i?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var zb,Sn,Qe,$s,Fs,Dt,Yb,jb,Xb,fd,md,Qb,eE,sE,aE,oE,lE,wd,uE,dE,hE,gE,pE,fE,vE,yE,bE,EE,PE,CE,Id,xE,LE,FE,BE,_E,GE,UE,qE,WE,KE,zE,br,Jt,XE,JE,QE,tI,uI,Pr=re(()=>{"use strict";se();zb=["top","right","bottom","left"],Sn=Math.min,Qe=Math.max,$s=Math.round,Fs=Math.floor,Dt=e=>({x:e,y:e}),Yb={left:"right",right:"left",bottom:"top",top:"bottom"},jb={start:"end",end:"start"};Xb=new Set(["top","bottom"]);fd=["left","right"],md=["right","left"],Qb=["top","bottom"],eE=["bottom","top"];sE=(e,t,n)=>Ve(null,null,function*(){let{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:a}=n,o=s.filter(Boolean),l=yield a.isRTL==null?void 0:a.isRTL(t),c=yield a.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:h}=vd(c,i,l),m=i,d={},p=0;for(let I=0;I({name:"arrow",options:e,fn(n){return Ve(this,null,function*(){let{x:i,y:r,placement:s,rects:a,platform:o,elements:l,middlewareData:c}=n,{element:u,padding:h=0}=Qt(e,n)||{};if(u==null)return{};let m=Od(h),d={x:i,y:r},p=Fo(s),v=Mo(p),I=yield o.getDimensions(u),T=p==="y",O=T?"top":"left",b=T?"bottom":"right",f=T?"clientHeight":"clientWidth",S=a.reference[v]+a.reference[p]-d[p]-a.floating[v],P=d[p]-a.reference[p],V=yield o.getOffsetParent==null?void 0:o.getOffsetParent(u),A=V?V[f]:0;(!A||!(yield o.isElement==null?void 0:o.isElement(V)))&&(A=l.floating[f]||a.floating[v]);let x=S/2-P/2,k=A/2-I[v]/2-1,N=Sn(m[O],k),D=Sn(m[b],k),$=N,te=A-I[v]-D,J=A/2-I[v]/2+x,ie=No($,J,te),Q=!c.arrow&&Ai(s)!=null&&J!==ie&&a.reference[v]/2-(J<$?N:D)-I[v]/2<0,Se=Q?J<$?J-$:J-te:0;return{[p]:d[p]+Se,data:g({[p]:ie,centerOffset:J-ie-Se},Q&&{alignmentOffset:Se}),reset:Q}})}}),oE=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Ve(this,null,function*(){var i,r;let{placement:s,middlewareData:a,rects:o,initialPlacement:l,platform:c,elements:u}=n,J=Qt(e,n),{mainAxis:h=!0,crossAxis:m=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:I=!0}=J,T=ft(J,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((i=a.arrow)!=null&&i.alignmentOffset)return{};let O=en(s),b=Rt(l),f=en(l)===l,S=yield c.isRTL==null?void 0:c.isRTL(u.floating),P=d||(f||!I?[Hs(l)]:Jb(l)),V=v!=="none";!d&&V&&P.push(...nE(l,I,v,S));let A=[l,...P],x=yield c.detectOverflow(n,T),k=[],N=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&k.push(x[O]),m){let ie=Zb(s,o,S);k.push(x[ie[0]],x[ie[1]])}if(N=[...N,{placement:s,overflows:k}],!k.every(ie=>ie<=0)){var D,$;let ie=(((D=a.flip)==null?void 0:D.index)||0)+1,Q=A[ie];if(Q&&(!(m==="alignment"?b!==Rt(Q):!1)||N.every(ne=>Rt(ne.placement)===b?ne.overflows[0]>0:!0)))return{data:{index:ie,overflows:N},reset:{placement:Q}};let Se=($=N.filter(Pe=>Pe.overflows[0]<=0).sort((Pe,ne)=>Pe.overflows[1]-ne.overflows[1])[0])==null?void 0:$.placement;if(!Se)switch(p){case"bestFit":{var te;let Pe=(te=N.filter(ne=>{if(V){let Ie=Rt(ne.placement);return Ie===b||Ie==="y"}return!0}).map(ne=>[ne.placement,ne.overflows.filter(Ie=>Ie>0).reduce((Ie,rt)=>Ie+rt,0)]).sort((ne,Ie)=>ne[1]-Ie[1])[0])==null?void 0:te[0];Pe&&(Se=Pe);break}case"initialPlacement":Se=l;break}if(s!==Se)return{reset:{placement:Se}}}return{}})}}};lE=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Ve(this,null,function*(){let{rects:i,platform:r}=n,o=Qt(e,n),{strategy:s="referenceHidden"}=o,a=ft(o,["strategy"]);switch(s){case"referenceHidden":{let l=yield r.detectOverflow(n,y(g({},a),{elementContext:"reference"})),c=yd(l,i.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:bd(c)}}}case"escaped":{let l=yield r.detectOverflow(n,y(g({},a),{altBoundary:!0})),c=yd(l,i.floating);return{data:{escapedOffsets:c,escaped:bd(c)}}}default:return{}}})}}},wd=new Set(["left","top"]);uE=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Ve(this,null,function*(){var i,r;let{x:s,y:a,placement:o,middlewareData:l}=n,c=yield cE(n,e);return o===((i=l.offset)==null?void 0:i.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:a+c.y,data:y(g({},c),{placement:o})}})}}},dE=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Ve(this,null,function*(){let{x:i,y:r,placement:s,platform:a}=n,O=Qt(e,n),{mainAxis:o=!0,crossAxis:l=!1,limiter:c={fn:b=>{let{x:f,y:S}=b;return{x:f,y:S}}}}=O,u=ft(O,["mainAxis","crossAxis","limiter"]),h={x:i,y:r},m=yield a.detectOverflow(n,u),d=Rt(en(s)),p=Lo(d),v=h[p],I=h[d];if(o){let b=p==="y"?"top":"left",f=p==="y"?"bottom":"right",S=v+m[b],P=v-m[f];v=No(S,v,P)}if(l){let b=d==="y"?"top":"left",f=d==="y"?"bottom":"right",S=I+m[b],P=I-m[f];I=No(S,I,P)}let T=c.fn(y(g({},n),{[p]:v,[d]:I}));return y(g({},T),{data:{x:T.x-i,y:T.y-r,enabled:{[p]:o,[d]:l}}})})}}},hE=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:i,placement:r,rects:s,middlewareData:a}=t,{offset:o=0,mainAxis:l=!0,crossAxis:c=!0}=Qt(e,t),u={x:n,y:i},h=Rt(r),m=Lo(h),d=u[m],p=u[h],v=Qt(o,t),I=typeof v=="number"?{mainAxis:v,crossAxis:0}:g({mainAxis:0,crossAxis:0},v);if(l){let b=m==="y"?"height":"width",f=s.reference[m]-s.floating[b]+I.mainAxis,S=s.reference[m]+s.reference[b]-I.mainAxis;dS&&(d=S)}if(c){var T,O;let b=m==="y"?"width":"height",f=wd.has(en(r)),S=s.reference[h]-s.floating[b]+(f&&((T=a.offset)==null?void 0:T[h])||0)+(f?0:I.crossAxis),P=s.reference[h]+s.reference[b]+(f?0:((O=a.offset)==null?void 0:O[h])||0)-(f?I.crossAxis:0);pP&&(p=P)}return{[m]:d,[h]:p}}}},gE=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Ve(this,null,function*(){var i,r;let{placement:s,rects:a,platform:o,elements:l}=n,N=Qt(e,n),{apply:c=()=>{}}=N,u=ft(N,["apply"]),h=yield o.detectOverflow(n,u),m=en(s),d=Ai(s),p=Rt(s)==="y",{width:v,height:I}=a.floating,T,O;m==="top"||m==="bottom"?(T=m,O=d===((yield o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(O=m,T=d==="end"?"top":"bottom");let b=I-h.top-h.bottom,f=v-h.left-h.right,S=Sn(I-h[T],b),P=Sn(v-h[O],f),V=!n.middlewareData.shift,A=S,x=P;if((i=n.middlewareData.shift)!=null&&i.enabled.x&&(x=f),(r=n.middlewareData.shift)!=null&&r.enabled.y&&(A=b),V&&!d){let D=Qe(h.left,0),$=Qe(h.right,0),te=Qe(h.top,0),J=Qe(h.bottom,0);p?x=v-2*(D!==0||$!==0?D+$:Qe(h.left,h.right)):A=I-2*(te!==0||J!==0?te+J:Qe(h.top,h.bottom))}yield c(y(g({},n),{availableWidth:x,availableHeight:A}));let k=yield o.getDimensions(l.floating);return v!==k.width||I!==k.height?{reset:{rects:!0}}:{}})}}};pE=new Set(["inline","contents"]);fE=new Set(["table","td","th"]);vE=[":popover-open",":modal"];yE=["transform","translate","scale","rotate","perspective"],bE=["transform","translate","scale","rotate","perspective","filter"],EE=["paint","layout","strict","content"];PE=new Set(["html","body","#document"]);CE=Dt(0);Id=25;xE=new Set(["absolute","fixed"]);LE=function(e){return Ve(this,null,function*(){let t=this.getOffsetParent||Dd,n=this.getDimensions,i=yield n(e.floating);return{reference:DE(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}})};FE={convertOffsetParentRelativeRectToViewportRelativeRect:TE,getDocumentElement:Mt,getClippingRect:NE,getOffsetParent:Dd,getElementRects:LE,getClientRects:OE,getDimensions:RE,getScale:Vi,isElement:bt,isRTL:ME};BE=uE,_E=dE,GE=oE,UE=gE,qE=lE,WE=aE,KE=hE,zE=(e,t,n)=>{let i=new Map,r=g({platform:FE},n),s=y(g({},r.platform),{_c:i});return sE(e,t,y(g({},r),{platform:s}))};br=e=>({variable:e,reference:`var(${e})`}),Jt={arrowSize:br("--arrow-size"),arrowSizeHalf:br("--arrow-size-half"),arrowBg:br("--arrow-background"),transformOrigin:br("--transform-origin"),arrowOffset:br("--arrow-offset")},XE=e=>e==="top"||e==="bottom"?"y":"x";JE={name:"rects",fn({rects:e}){return{data:e}}},QE=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};let{x:i,y:r}=n.arrow,s=t.split("-")[0];return Object.assign(e.style,{left:i!=null?`${i}px`:"",top:r!=null?`${r}px`:"",[s]:`calc(100% + ${Jt.arrowOffset.reference})`}),{}}}};tI={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};uI={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"}});function dI(e){let t={each(n){var i;for(let r=0;r<((i=e.frames)==null?void 0:i.length);r+=1){let s=e.frames[r];s&&n(s)}},addEventListener(n,i,r){return t.each(s=>{try{s.document.addEventListener(n,i,r)}catch(a){}}),()=>{try{t.removeEventListener(n,i,r)}catch(s){}}},removeEventListener(n,i,r){t.each(s=>{try{s.document.removeEventListener(n,i,r)}catch(a){}})}};return t}function hI(e){let t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,i,r)=>{try{t==null||t.addEventListener(n,i,r)}catch(s){}return()=>{try{t==null||t.removeEventListener(n,i,r)}catch(s){}}},removeEventListener:(n,i,r)=>{try{t==null||t.removeEventListener(n,i,r)}catch(s){}}}}function gI(e){for(let t of e)if(le(t)&&Ye(t))return!0;return!1}function pI(e,t){if(!_d(t)||!e)return!1;let n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function fI(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function Hd(e,t){if(!t||!_d(e))return!1;let n=t.scrollHeight>t.clientHeight,i=n&&e.clientX>t.offsetLeft+t.clientWidth,r=t.scrollWidth>t.clientWidth,s=r&&e.clientY>t.offsetTop+t.clientHeight,a={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(r?16:0)},o={x:e.clientX,y:e.clientY};return fI(a,o)?i||s:!1}function mI(e,t){let{exclude:n,onFocusOutside:i,onPointerDownOutside:r,onInteractOutside:s,defer:a,followControlledElements:o=!0}=t;if(!e)return;let l=Le(e),c=ue(e),u=dI(c),h=hI(c);function m(b,f){if(!le(f)||!f.isConnected||ce(e,f)||pI(e,b)||o&&as(e,f))return!1;let S=l.querySelector(`[aria-controls="${e.id}"]`);if(S){let V=gs(S);if(Hd(b,V))return!1}let P=gs(e);return Hd(b,P)?!1:!(n!=null&&n(f))}let d=new Set,p=Ln(e==null?void 0:e.getRootNode());function v(b){function f(S){var x,k;let P=a&&!Ja()?H:N=>N(),V=S!=null?S:b,A=(k=(x=V==null?void 0:V.composedPath)==null?void 0:x.call(V))!=null?k:[V==null?void 0:V.target];P(()=>{let N=p?A[0]:j(b);if(!(!e||!m(b,N))){if(r||s){let D=At(r,s);e.addEventListener(Fd,D,{once:!0})}Bd(e,Fd,{bubbles:!1,cancelable:!0,detail:{originalEvent:V,contextmenu:hi(V),focusable:gI(A),target:N}})}})}b.pointerType==="touch"?(d.forEach(S=>S()),d.add(ee(l,"click",f,{once:!0})),d.add(h.addEventListener("click",f,{once:!0})),d.add(u.addEventListener("click",f,{once:!0}))):f()}let I=new Set,T=setTimeout(()=>{I.add(ee(l,"pointerdown",v,!0)),I.add(h.addEventListener("pointerdown",v,!0)),I.add(u.addEventListener("pointerdown",v,!0))},0);function O(b){(a?H:S=>S())(()=>{var V,A;let S=(A=(V=b==null?void 0:b.composedPath)==null?void 0:V.call(b))!=null?A:[b==null?void 0:b.target],P=p?S[0]:j(b);if(!(!e||!m(b,P))){if(i||s){let x=At(i,s);e.addEventListener($d,x,{once:!0})}Bd(e,$d,{bubbles:!1,cancelable:!0,detail:{originalEvent:b,contextmenu:!1,focusable:Ye(P),target:P}})}})}return Ja()||(I.add(ee(l,"focusin",O,!0)),I.add(h.addEventListener("focusin",O,!0)),I.add(u.addEventListener("focusin",O,!0))),()=>{clearTimeout(T),d.forEach(b=>b()),I.forEach(b=>b())}}function Ws(e,t){let{defer:n}=t,i=n?H:s=>s(),r=[];return r.push(i(()=>{let s=typeof e=="function"?e():e;r.push(mI(s,t))})),()=>{r.forEach(s=>s==null?void 0:s())}}function Bd(e,t,n){let i=e.ownerDocument.defaultView||window,r=new i.CustomEvent(t,n);return e.dispatchEvent(r)}var Fd,$d,_d,tn=re(()=>{"use strict";se();Fd="pointerdown.outside",$d="focus.outside";_d=e=>"clientY"in e});function vI(e,t){let n=i=>{i.key==="Escape"&&(i.isComposing||t==null||t(i))};return ee(Le(e),"keydown",n,{capture:!0})}function yI(e,t,n){let i=e.ownerDocument.defaultView||window,r=new i.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(r)}function bI(e,t,n){e.addEventListener(t,n,{once:!0})}function qd(){We.layers.forEach(({node:e})=>{e.style.pointerEvents=We.isBelowPointerBlockingLayer(e)?"none":"auto"})}function EI(e){e.style.pointerEvents=""}function II(e,t){let n=Le(e),i=[];return We.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(Ud=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(r=>{let[s,a]=Hc(()=>{let o=r();return le(o)?o:null},{timeout:1e3});s.then(o=>i.push(Hn(o,{pointerEvents:"auto"}))),i.push(a)}),()=>{We.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=Ud,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),i.forEach(r=>r()))}}function PI(e,t){let{warnOnMissingNode:n=!0}=t;if(n&&!e){zt("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;let{onDismiss:i,onRequestDismiss:r,pointerBlocking:s,exclude:a,debug:o,type:l="dialog"}=t,c={dismiss:i,node:e,type:l,pointerBlocking:s,requestDismiss:r};We.add(c),qd();function u(v){var T,O;let I=j(v.detail.originalEvent);We.isBelowPointerBlockingLayer(e)||We.isInBranch(I)||((T=t.onPointerDownOutside)==null||T.call(t,v),(O=t.onInteractOutside)==null||O.call(t,v),!v.defaultPrevented&&(o&&console.log("onPointerDownOutside:",v.detail.originalEvent),i==null||i()))}function h(v){var T,O;let I=j(v.detail.originalEvent);We.isInBranch(I)||((T=t.onFocusOutside)==null||T.call(t,v),(O=t.onInteractOutside)==null||O.call(t,v),!v.defaultPrevented&&(o&&console.log("onFocusOutside:",v.detail.originalEvent),i==null||i()))}function m(v){var I;We.isTopMost(e)&&((I=t.onEscapeKeyDown)==null||I.call(t,v),!v.defaultPrevented&&i&&(v.preventDefault(),i()))}function d(v){var b;if(!e)return!1;let I=typeof a=="function"?a():a,T=Array.isArray(I)?I:[I],O=(b=t.persistentElements)==null?void 0:b.map(f=>f()).filter(le);return O&&T.push(...O),T.some(f=>ce(f,v))||We.isInNestedLayer(e,v)}let p=[s?II(e,t.persistentElements):void 0,vI(e,m),Ws(e,{exclude:d,onFocusOutside:h,onPointerDownOutside:u,defer:t.defer})];return()=>{We.remove(e),qd(),EI(e),p.forEach(v=>v==null?void 0:v())}}function Ft(e,t){let{defer:n}=t,i=n?H:s=>s(),r=[];return r.push(i(()=>{let s=Wt(e)?e():e;r.push(PI(s,t))})),()=>{r.forEach(s=>s==null?void 0:s())}}function Wd(e,t={}){let{defer:n}=t,i=n?H:s=>s(),r=[];return r.push(i(()=>{let s=Wt(e)?e():e;if(!s){zt("[@zag-js/dismissable] branch node is `null` or `undefined`");return}We.addBranch(s),r.push(()=>{We.removeBranch(s)})})),()=>{r.forEach(s=>s==null?void 0:s())}}var Gd,We,Ud,Wn=re(()=>{"use strict";tn();se();Gd="layer:request-dismiss",We={layers:[],branches:[],recentlyRemoved:new Set,count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){var i;let t=this.indexOf(e),n=this.topMostPointerBlockingLayer()?this.indexOf((i=this.topMostPointerBlockingLayer())==null?void 0:i.node):-1;return tt.type===e)},getNestedLayersByType(e,t){let n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(i=>i.type===t)},getParentLayerOfType(e,t){let n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(i=>i.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return!!(this.getNestedLayers(e).some(i=>ce(i.node,t))||this.recentlyRemoved.size>0)},isInBranch(e){return Array.from(this.branches).some(t=>ce(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){let t=this.indexOf(e);t<0||(this.recentlyRemoved.add(e),$n(()=>this.recentlyRemoved.delete(e)),tWe.dismiss(i.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){let t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{e.node.style.setProperty("--layer-index",`${t}`),e.node.removeAttribute("data-nested"),e.node.removeAttribute("data-has-nested"),this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute("data-nested",e.type);let i=this.countNestedLayersOfType(e.node,e.type);i>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${i}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){let n=this.indexOf(e);if(n===-1)return;let i=this.layers[n];bI(e,Gd,r=>{var s;(s=i.requestDismiss)==null||s.call(i,r),r.defaultPrevented||i==null||i.dismiss()}),yI(e,Gd,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}}});var nh={};he(nh,{Combobox:()=>BI});function VI(e,t){let{context:n,prop:i,state:r,send:s,scope:a,computed:o,event:l}=e,c=i("translations"),u=i("collection"),h=!!i("disabled"),m=o("isInteractive"),d=!!i("invalid"),p=!!i("required"),v=!!i("readOnly"),I=r.hasTag("open"),T=r.hasTag("focused"),O=i("composite"),b=n.get("highlightedValue"),f=On(y(g({},i("positioning")),{placement:n.get("currentPlacement")}));function S(P){let V=u.getItemDisabled(P.item),A=u.getItemValue(P.item);return vn(A,()=>`[zag-js] No value found for item ${JSON.stringify(P.item)}`),{value:A,disabled:!!(V||V),highlighted:b===A,selected:n.get("value").includes(A)}}return{focused:T,open:I,inputValue:n.get("inputValue"),highlightedValue:b,highlightedItem:n.get("highlightedItem"),value:n.get("value"),valueAsString:o("valueAsString"),hasSelectedItems:o("hasSelectedItems"),selectedItems:n.get("selectedItems"),collection:i("collection"),multiple:!!i("multiple"),disabled:!!h,syncSelectedItems(){s({type:"SELECTED_ITEMS.SYNC"})},reposition(P={}){s({type:"POSITIONING.SET",options:P})},setHighlightValue(P){s({type:"HIGHLIGHTED_VALUE.SET",value:P})},clearHighlightValue(){s({type:"HIGHLIGHTED_VALUE.CLEAR"})},selectValue(P){s({type:"ITEM.SELECT",value:P})},setValue(P){s({type:"VALUE.SET",value:P})},setInputValue(P,V="script"){s({type:"INPUT_VALUE.SET",value:P,src:V})},clearValue(P){P!=null?s({type:"ITEM.CLEAR",value:P}):s({type:"VALUE.CLEAR"})},focus(){var P;(P=zn(a))==null||P.focus()},setOpen(P,V="script"){r.hasTag("open")!==P&&s({type:P?"OPEN":"CLOSE",src:V})},getRootProps(){return t.element(y(g({},Ke.root.attrs),{dir:i("dir"),id:SI(a),"data-invalid":E(d),"data-readonly":E(v)}))},getLabelProps(){return t.label(y(g({},Ke.label.attrs),{dir:i("dir"),htmlFor:Ks(a),id:Go(a),"data-readonly":E(v),"data-disabled":E(h),"data-invalid":E(d),"data-required":E(p),"data-focus":E(T),onClick(P){var V;O||(P.preventDefault(),(V=Cr(a))==null||V.focus({preventScroll:!0}))}}))},getControlProps(){return t.element(y(g({},Ke.control.attrs),{dir:i("dir"),id:Jd(a),"data-state":I?"open":"closed","data-focus":E(T),"data-disabled":E(h),"data-invalid":E(d)}))},getPositionerProps(){return t.element(y(g({},Ke.positioner.attrs),{dir:i("dir"),id:Qd(a),style:f.floating}))},getInputProps(){return t.input(y(g({},Ke.input.attrs),{dir:i("dir"),"aria-invalid":X(d),"data-invalid":E(d),"data-autofocus":E(i("autoFocus")),name:i("name"),form:i("form"),disabled:h,required:i("required"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"none",spellCheck:"false",readOnly:v,placeholder:i("placeholder"),id:Ks(a),type:"text",role:"combobox",defaultValue:n.get("inputValue"),"aria-autocomplete":o("autoComplete")?"both":"list","aria-controls":zs(a),"aria-expanded":I,"data-state":I?"open":"closed","aria-activedescendant":b?zd(a,b):void 0,onClick(P){P.defaultPrevented||i("openOnClick")&&m&&s({type:"INPUT.CLICK",src:"input-click"})},onFocus(){h||s({type:"INPUT.FOCUS"})},onBlur(){h||s({type:"INPUT.BLUR"})},onChange(P){s({type:"INPUT.CHANGE",value:P.currentTarget.value,src:"input-change"})},onKeyDown(P){if(P.defaultPrevented||!m||P.ctrlKey||P.shiftKey||Re(P))return;let V=i("openOnKeyPress"),A=P.ctrlKey||P.metaKey||P.shiftKey,x=!0,k={ArrowDown($){!V&&!I||(s({type:$.altKey?"OPEN":"INPUT.ARROW_DOWN",keypress:x,src:"arrow-key"}),$.preventDefault())},ArrowUp(){!V&&!I||(s({type:P.altKey?"CLOSE":"INPUT.ARROW_UP",keypress:x,src:"arrow-key"}),P.preventDefault())},Home($){A||(s({type:"INPUT.HOME",keypress:x}),I&&$.preventDefault())},End($){A||(s({type:"INPUT.END",keypress:x}),I&&$.preventDefault())},Enter($){var Se;s({type:"INPUT.ENTER",keypress:x,src:"item-select"});let te=o("isCustomValue")&&i("allowCustomValue"),J=b!=null,ie=i("alwaysSubmitOnEnter");if(I&&!te&&!ie&&J&&$.preventDefault(),b==null)return;let Q=Ni(a,b);st(Q)&&((Se=i("navigate"))==null||Se({value:b,node:Q,href:Q.href}))},Escape(){s({type:"INPUT.ESCAPE",keypress:x,src:"escape-key"}),P.preventDefault()}},N=ge(P,{dir:i("dir")}),D=k[N];D==null||D(P)}}))},getTriggerProps(P={}){return t.button(y(g({},Ke.trigger.attrs),{dir:i("dir"),id:eh(a),"aria-haspopup":O?"listbox":"dialog",type:"button",tabIndex:P.focusable?void 0:-1,"aria-label":c.triggerLabel,"aria-expanded":I,"data-state":I?"open":"closed","aria-controls":I?zs(a):void 0,disabled:h,"data-invalid":E(d),"data-focusable":E(P.focusable),"data-readonly":E(v),"data-disabled":E(h),onFocus(){P.focusable&&s({type:"INPUT.FOCUS",src:"trigger"})},onClick(V){V.defaultPrevented||m&&pe(V)&&s({type:"TRIGGER.CLICK",src:"trigger-click"})},onPointerDown(V){m&&V.pointerType!=="touch"&&pe(V)&&(V.preventDefault(),queueMicrotask(()=>{var A;(A=zn(a))==null||A.focus({preventScroll:!0})}))},onKeyDown(V){if(V.defaultPrevented||O)return;let A={ArrowDown(){s({type:"INPUT.ARROW_DOWN",src:"arrow-key"})},ArrowUp(){s({type:"INPUT.ARROW_UP",src:"arrow-key"})}},x=ge(V,{dir:i("dir")}),k=A[x];k&&(k(V),V.preventDefault())}}))},getContentProps(){return t.element(y(g({},Ke.content.attrs),{dir:i("dir"),id:zs(a),role:O?"listbox":"dialog",tabIndex:-1,hidden:!I,"data-state":I?"open":"closed","data-placement":n.get("currentPlacement"),"aria-labelledby":Go(a),"aria-multiselectable":i("multiple")&&O?!0:void 0,"data-empty":E(u.size===0),onPointerDown(P){pe(P)&&P.preventDefault()}}))},getListProps(){return t.element(y(g({},Ke.list.attrs),{role:O?void 0:"listbox","data-empty":E(u.size===0),"aria-labelledby":Go(a),"aria-multiselectable":i("multiple")&&!O?!0:void 0}))},getClearTriggerProps(){return t.button(y(g({},Ke.clearTrigger.attrs),{dir:i("dir"),id:th(a),type:"button",tabIndex:-1,disabled:h,"data-invalid":E(d),"aria-label":c.clearTriggerLabel,"aria-controls":Ks(a),hidden:!n.get("value").length,onPointerDown(P){pe(P)&&P.preventDefault()},onClick(P){P.defaultPrevented||m&&s({type:"VALUE.CLEAR",src:"clear-trigger"})}}))},getItemState:S,getItemProps(P){let V=S(P),A=V.value;return t.element(y(g({},Ke.item.attrs),{dir:i("dir"),id:zd(a,A),role:"option",tabIndex:-1,"data-highlighted":E(V.highlighted),"data-state":V.selected?"checked":"unchecked","aria-selected":X(V.highlighted),"aria-disabled":X(V.disabled),"data-disabled":E(V.disabled),"data-value":V.value,onPointerMove(){V.disabled||V.highlighted||s({type:"ITEM.POINTER_MOVE",value:A})},onPointerLeave(){if(P.persistFocus||V.disabled)return;let x=l.previous();x!=null&&x.type.includes("POINTER")&&s({type:"ITEM.POINTER_LEAVE",value:A})},onClick(x){rr(x)||Fn(x)||hi(x)||V.disabled||s({type:"ITEM.CLICK",src:"item-select",value:A})}}))},getItemTextProps(P){let V=S(P);return t.element(y(g({},Ke.itemText.attrs),{dir:i("dir"),"data-state":V.selected?"checked":"unchecked","data-disabled":E(V.disabled),"data-highlighted":E(V.highlighted)}))},getItemIndicatorProps(P){let V=S(P);return t.element(y(g({"aria-hidden":!0},Ke.itemIndicator.attrs),{dir:i("dir"),"data-state":V.selected?"checked":"unchecked",hidden:!V.selected}))},getItemGroupProps(P){let{id:V}=P;return t.element(y(g({},Ke.itemGroup.attrs),{dir:i("dir"),id:TI(a,V),"aria-labelledby":Kd(a,V),"data-empty":E(u.size===0),role:"group"}))},getItemGroupLabelProps(P){let{htmlFor:V}=P;return t.element(y(g({},Ke.itemGroupLabel.attrs),{dir:i("dir"),id:Kd(a,V),role:"presentation"}))}}}function Zd(e){return(e.previousEvent||e).src}function $I(e){return e.replace(/_([a-z])/g,(t,n)=>n.toUpperCase())}function HI(e){let t={};for(let[n,i]of Object.entries(e)){let r=$I(n);t[r]=i}return t}var CI,Ke,Ys,SI,Go,Jd,Ks,zs,Qd,eh,th,TI,Kd,zd,Kn,zn,Yd,jd,Cr,OI,Ni,Xd,wI,xI,AI,kI,we,tt,NI,RI,ux,DI,dx,LI,hx,MI,gx,FI,BI,ih=re(()=>{"use strict";yr();Pr();Wn();tn();se();CI=U("combobox").parts("root","clearTrigger","content","control","input","item","itemGroup","itemGroupLabel","itemIndicator","itemText","label","list","positioner","trigger"),Ke=CI.build(),Ys=e=>new Nt(e);Ys.empty=()=>new Nt({items:[]});SI=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`combobox:${e.id}`},Go=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`combobox:${e.id}:label`},Jd=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`combobox:${e.id}:control`},Ks=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.input)!=null?n:`combobox:${e.id}:input`},zs=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`combobox:${e.id}:content`},Qd=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`combobox:${e.id}:popper`},eh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`combobox:${e.id}:toggle-btn`},th=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.clearTrigger)!=null?n:`combobox:${e.id}:clear-btn`},TI=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemGroup)==null?void 0:i.call(n,t))!=null?r:`combobox:${e.id}:optgroup:${t}`},Kd=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemGroupLabel)==null?void 0:i.call(n,t))!=null?r:`combobox:${e.id}:optgroup-label:${t}`},zd=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`combobox:${e.id}:option:${t}`},Kn=e=>e.getById(zs(e)),zn=e=>e.getById(Ks(e)),Yd=e=>e.getById(Qd(e)),jd=e=>e.getById(Jd(e)),Cr=e=>e.getById(eh(e)),OI=e=>e.getById(th(e)),Ni=(e,t)=>{if(t==null)return null;let n=`[role=option][data-value="${CSS.escape(t)}"]`;return vi(Kn(e),n)},Xd=e=>{let t=zn(e);e.isActiveElement(t)||t==null||t.focus({preventScroll:!0})},wI=e=>{let t=Cr(e);e.isActiveElement(t)||t==null||t.focus({preventScroll:!0})};({guards:xI,createMachine:AI,choose:kI}=ut()),{and:we,not:tt}=xI,NI=AI({props({props:e}){return y(g({loopFocus:!0,openOnClick:!1,defaultValue:[],defaultInputValue:"",closeOnSelect:!e.multiple,allowCustomValue:!1,alwaysSubmitOnEnter:!1,inputBehavior:"none",selectionBehavior:e.multiple?"clear":"replace",openOnKeyPress:!0,openOnChange:!0,composite:!0,navigate({node:t}){mi(t)},collection:Ys.empty()},e),{positioning:g({placement:"bottom",sameWidth:!0},e.positioning),translations:g({triggerLabel:"Toggle suggestions",clearTriggerLabel:"Clear value"},e.translations)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"suggesting":"idle"},context({prop:e,bindable:t,getContext:n,getEvent:i}){return{currentPlacement:t(()=>({defaultValue:void 0})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:fe,hash(r){return r.join(",")},onChange(r){var c;let s=n(),a=s.get("selectedItems"),o=e("collection"),l=r.map(u=>a.find(m=>o.getItemValue(m)===u)||o.find(u));s.set("selectedItems",l),(c=e("onValueChange"))==null||c({value:r,items:l})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),onChange(r){var a;let s=e("collection").find(r);(a=e("onHighlightChange"))==null||a({highlightedValue:r,highlightedItem:s})}})),inputValue:t(()=>{let r=e("inputValue")||e("defaultInputValue"),s=e("value")||e("defaultValue");if(!r.trim()&&!e("multiple")){let a=e("collection").stringifyMany(s);r=Ce(e("selectionBehavior"),{preserve:r||a,replace:a,clear:""})}return{defaultValue:r,value:e("inputValue"),onChange(a){var c;let o=i(),l=(o.previousEvent||o).src;(c=e("onInputValueChange"))==null||c({inputValue:a,reason:l})}}}),highlightedItem:t(()=>{let r=e("highlightedValue");return{defaultValue:e("collection").find(r)}}),selectedItems:t(()=>{let r=e("value")||e("defaultValue")||[];return{defaultValue:e("collection").findMany(r)}})}},computed:{isInputValueEmpty:({context:e})=>e.get("inputValue").length===0,isInteractive:({prop:e})=>!(e("readOnly")||e("disabled")),autoComplete:({prop:e})=>e("inputBehavior")==="autocomplete",autoHighlight:({prop:e})=>e("inputBehavior")==="autohighlight",hasSelectedItems:({context:e})=>e.get("value").length>0,valueAsString:({context:e,prop:t})=>t("collection").stringifyItems(e.get("selectedItems")),isCustomValue:({context:e,computed:t})=>e.get("inputValue")!==t("valueAsString")},watch({context:e,prop:t,track:n,action:i,send:r}){n([()=>e.hash("value")],()=>{i(["syncSelectedItems"])}),n([()=>e.get("inputValue")],()=>{i(["syncInputValue"])}),n([()=>e.get("highlightedValue")],()=>{i(["syncHighlightedItem","autofillInputValue"])}),n([()=>t("open")],()=>{i(["toggleVisibility"])}),n([()=>t("collection").toString()],()=>{r({type:"CHILDREN_CHANGE"})})},on:{"SELECTED_ITEMS.SYNC":{actions:["syncSelectedItems"]},"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedValue"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedValue"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setValue"]},"INPUT_VALUE.SET":{actions:["setInputValue"]},"POSITIONING.SET":{actions:["reposition"]}},entry:kI([{guard:"autoFocus",actions:["setInitialFocus"]}]),states:{idle:{tags:["idle","closed"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":{target:"interacting"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{target:"focused",actions:["clearInputValue","clearSelectedItems","setInitialFocus"]}}},focused:{tags:["focused","closed"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":[{guard:"isChangeEvent",target:"suggesting"},{target:"interacting"}],"INPUT.CHANGE":[{guard:we("isOpenControlled","openOnChange"),actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{guard:"openOnChange",target:"suggesting",actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{actions:["setInputValue"]}],"LAYER.INTERACT_OUTSIDE":{target:"idle"},"INPUT.ESCAPE":{guard:we("isCustomValue",tt("allowCustomValue")),actions:["revertInputValue"]},"INPUT.BLUR":{target:"idle"},"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_DOWN":[{guard:we("isOpenControlled","autoComplete"),actions:["invokeOnOpen"]},{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{guard:"isOpenControlled",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_UP":[{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{target:"interacting",actions:["highlightLastOrSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightLastOrSelectedItem","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{actions:["clearInputValue","clearSelectedItems"]}}},interacting:{tags:["open","focused"],entry:["setInitialFocus"],effects:["scrollToHighlightedItem","trackDismissableLayer","trackPlacement"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["setFinalFocus"]},{target:"idle"}],CHILDREN_CHANGE:[{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]},{actions:["scrollToHighlightedItem"]}],"INPUT.HOME":{actions:["highlightFirstItem"]},"INPUT.END":{actions:["highlightLastItem"]},"INPUT.ARROW_DOWN":[{guard:we("autoComplete","isLastItemHighlighted"),actions:["clearHighlightedValue","scrollContentToTop"]},{actions:["highlightNextItem"]}],"INPUT.ARROW_UP":[{guard:we("autoComplete","isFirstItemHighlighted"),actions:["clearHighlightedValue"]},{actions:["highlightPrevItem"]}],"INPUT.ENTER":[{guard:we("isOpenControlled","isCustomValue",tt("hasHighlightedItem"),tt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:we("isCustomValue",tt("hasHighlightedItem"),tt("allowCustomValue")),target:"focused",actions:["revertInputValue","invokeOnClose"]},{guard:we("isOpenControlled","closeOnSelect"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","setFinalFocus"]},{actions:["selectHighlightedItem"]}],"INPUT.CHANGE":[{guard:"autoComplete",target:"suggesting",actions:["setInputValue"]},{target:"suggesting",actions:["clearHighlightedValue","setInputValue"]}],"ITEM.POINTER_MOVE":{actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]},"ITEM.CLICK":[{guard:we("isOpenControlled","closeOnSelect"),actions:["selectItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectItem","invokeOnClose","setFinalFocus"]},{actions:["selectItem"]}],"LAYER.ESCAPE":[{guard:we("isOpenControlled","autoComplete"),actions:["syncInputValue","invokeOnClose"]},{guard:"autoComplete",target:"focused",actions:["syncInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"LAYER.INTERACT_OUTSIDE":[{guard:we("isOpenControlled","isCustomValue",tt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:we("isCustomValue",tt("allowCustomValue")),target:"idle",actions:["revertInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"VALUE.CLEAR":[{guard:"isOpenControlled",actions:["clearInputValue","clearSelectedItems","invokeOnClose"]},{target:"focused",actions:["clearInputValue","clearSelectedItems","invokeOnClose","setFinalFocus"]}]}},suggesting:{tags:["open","focused"],effects:["trackDismissableLayer","scrollToHighlightedItem","trackPlacement"],entry:["setInitialFocus"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["setFinalFocus"]},{target:"idle"}],CHILDREN_CHANGE:[{guard:we("isHighlightedItemRemoved","hasCollectionItems","autoHighlight"),actions:["clearHighlightedValue","highlightFirstItem"]},{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]},{guard:"autoHighlight",actions:["highlightFirstItem"]}],"INPUT.ARROW_DOWN":{target:"interacting",actions:["highlightNextItem"]},"INPUT.ARROW_UP":{target:"interacting",actions:["highlightPrevItem"]},"INPUT.HOME":{target:"interacting",actions:["highlightFirstItem"]},"INPUT.END":{target:"interacting",actions:["highlightLastItem"]},"INPUT.ENTER":[{guard:we("isOpenControlled","isCustomValue",tt("hasHighlightedItem"),tt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:we("isCustomValue",tt("hasHighlightedItem"),tt("allowCustomValue")),target:"focused",actions:["revertInputValue","invokeOnClose"]},{guard:we("isOpenControlled","closeOnSelect"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","setFinalFocus"]},{actions:["selectHighlightedItem"]}],"INPUT.CHANGE":{actions:["setInputValue"]},"LAYER.ESCAPE":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"ITEM.POINTER_MOVE":{target:"interacting",actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]},"LAYER.INTERACT_OUTSIDE":[{guard:we("isOpenControlled","isCustomValue",tt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:we("isCustomValue",tt("allowCustomValue")),target:"idle",actions:["revertInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"ITEM.CLICK":[{guard:we("isOpenControlled","closeOnSelect"),actions:["selectItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectItem","invokeOnClose","setFinalFocus"]},{actions:["selectItem"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"VALUE.CLEAR":[{guard:"isOpenControlled",actions:["clearInputValue","clearSelectedItems","invokeOnClose"]},{target:"focused",actions:["clearInputValue","clearSelectedItems","invokeOnClose","setFinalFocus"]}]}}},implementations:{guards:{isInputValueEmpty:({computed:e})=>e("isInputValueEmpty"),autoComplete:({computed:e,prop:t})=>e("autoComplete")&&!t("multiple"),autoHighlight:({computed:e})=>e("autoHighlight"),isFirstItemHighlighted:({prop:e,context:t})=>e("collection").firstValue===t.get("highlightedValue"),isLastItemHighlighted:({prop:e,context:t})=>e("collection").lastValue===t.get("highlightedValue"),isCustomValue:({computed:e})=>e("isCustomValue"),allowCustomValue:({prop:e})=>!!e("allowCustomValue"),hasHighlightedItem:({context:e})=>e.get("highlightedValue")!=null,closeOnSelect:({prop:e})=>!!e("closeOnSelect"),isOpenControlled:({prop:e})=>e("open")!=null,openOnChange:({prop:e,context:t})=>{let n=e("openOnChange");return Uc(n)?n:!!(n!=null&&n({inputValue:t.get("inputValue")}))},restoreFocus:({event:e})=>{var n,i;let t=(i=e.restoreFocus)!=null?i:(n=e.previousEvent)==null?void 0:n.restoreFocus;return t==null?!0:!!t},isChangeEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="INPUT.CHANGE"},autoFocus:({prop:e})=>!!e("autoFocus"),isHighlightedItemRemoved:({prop:e,context:t})=>!e("collection").has(t.get("highlightedValue")),hasCollectionItems:({prop:e})=>e("collection").size>0},effects:{trackDismissableLayer({send:e,prop:t,scope:n}){return t("disableLayer")?void 0:Ft(()=>Kn(n),{type:"listbox",defer:!0,exclude:()=>[zn(n),Cr(n),OI(n)],onFocusOutside:t("onFocusOutside"),onPointerDownOutside:t("onPointerDownOutside"),onInteractOutside:t("onInteractOutside"),onEscapeKeyDown(r){r.preventDefault(),r.stopPropagation(),e({type:"LAYER.ESCAPE",src:"escape-key"})},onDismiss(){e({type:"LAYER.INTERACT_OUTSIDE",src:"interact-outside",restoreFocus:!1})}})},trackPlacement({context:e,prop:t,scope:n}){let i=()=>jd(n)||Cr(n),r=()=>Yd(n);return e.set("currentPlacement",t("positioning").placement),It(i,r,y(g({},t("positioning")),{defer:!0,onComplete(s){e.set("currentPlacement",s.placement)}}))},scrollToHighlightedItem({context:e,prop:t,scope:n,event:i}){let r=zn(n),s=[],a=c=>{let u=i.current().type.includes("POINTER"),h=e.get("highlightedValue");if(u||!h)return;let m=Kn(n),d=t("scrollToIndexFn");if(d){let I=t("collection").indexOf(h);d({index:I,immediate:c,getElement:()=>Ni(n,h)});return}let p=Ni(n,h),v=H(()=>{Xt(p,{rootEl:m,block:"nearest"})});s.push(v)},o=H(()=>a(!0));s.push(o);let l=ot(r,{attributes:["aria-activedescendant"],callback:()=>a(!1)});return s.push(l),()=>{s.forEach(c=>c())}}},actions:{reposition({context:e,prop:t,scope:n,event:i}){It(()=>jd(n),()=>Yd(n),y(g(g({},t("positioning")),i.options),{defer:!0,listeners:!1,onComplete(a){e.set("currentPlacement",a.placement)}}))},setHighlightedValue({context:e,event:t}){t.value!=null&&e.set("highlightedValue",t.value)},clearHighlightedValue({context:e}){e.set("highlightedValue",null)},selectHighlightedItem(e){var o;let{context:t,prop:n}=e,i=n("collection"),r=t.get("highlightedValue");if(!r||!i.has(r))return;let s=n("multiple")?yt(t.get("value"),r):[r];(o=n("onSelect"))==null||o({value:s,itemValue:r}),t.set("value",s);let a=Ce(n("selectionBehavior"),{preserve:t.get("inputValue"),replace:i.stringifyMany(s),clear:""});t.set("inputValue",a)},scrollToHighlightedItem({context:e,prop:t,scope:n}){$n(()=>{let i=e.get("highlightedValue");if(i==null)return;let r=Ni(n,i),s=Kn(n),a=t("scrollToIndexFn");if(a){let o=t("collection").indexOf(i);a({index:o,immediate:!0,getElement:()=>Ni(n,i)});return}Xt(r,{rootEl:s,block:"nearest"})})},selectItem(e){let{context:t,event:n,flush:i,prop:r}=e;n.value!=null&&i(()=>{var o;let s=r("multiple")?yt(t.get("value"),n.value):[n.value];(o=r("onSelect"))==null||o({value:s,itemValue:n.value}),t.set("value",s);let a=Ce(r("selectionBehavior"),{preserve:t.get("inputValue"),replace:r("collection").stringifyMany(s),clear:""});t.set("inputValue",a)})},clearItem(e){let{context:t,event:n,flush:i,prop:r}=e;n.value!=null&&i(()=>{let s=ct(t.get("value"),n.value);t.set("value",s);let a=Ce(r("selectionBehavior"),{preserve:t.get("inputValue"),replace:r("collection").stringifyMany(s),clear:""});t.set("inputValue",a)})},setInitialFocus({scope:e}){H(()=>{Xd(e)})},setFinalFocus({scope:e}){H(()=>{let t=Cr(e);(t==null?void 0:t.dataset.focusable)==null?Xd(e):wI(e)})},syncInputValue({context:e,scope:t,event:n}){let i=zn(t);i&&(i.value=e.get("inputValue"),queueMicrotask(()=>{n.current().type!=="INPUT.CHANGE"&&tr(i)}))},setInputValue({context:e,event:t}){e.set("inputValue",t.value)},clearInputValue({context:e}){e.set("inputValue","")},revertInputValue({context:e,prop:t,computed:n}){let i=t("selectionBehavior"),r=Ce(i,{replace:n("hasSelectedItems")?n("valueAsString"):"",preserve:e.get("inputValue"),clear:""});e.set("inputValue",r)},setValue(e){let{context:t,flush:n,event:i,prop:r}=e;n(()=>{t.set("value",i.value);let s=Ce(r("selectionBehavior"),{preserve:t.get("inputValue"),replace:r("collection").stringifyMany(i.value),clear:""});t.set("inputValue",s)})},clearSelectedItems(e){let{context:t,flush:n,prop:i}=e;n(()=>{t.set("value",[]);let r=Ce(i("selectionBehavior"),{preserve:t.get("inputValue"),replace:i("collection").stringifyMany([]),clear:""});t.set("inputValue",r)})},scrollContentToTop({prop:e,scope:t}){let n=e("scrollToIndexFn");if(n){let i=e("collection").firstValue;n({index:0,immediate:!0,getElement:()=>Ni(t,i)})}else{let i=Kn(t);if(!i)return;i.scrollTop=0}},invokeOnOpen({prop:e,event:t,context:n}){var r;let i=Zd(t);(r=e("onOpenChange"))==null||r({open:!0,reason:i,value:n.get("value")})},invokeOnClose({prop:e,event:t,context:n}){var r;let i=Zd(t);(r=e("onOpenChange"))==null||r({open:!1,reason:i,value:n.get("value")})},highlightFirstItem({context:e,prop:t,scope:n}){(Kn(n)?queueMicrotask:H)(()=>{let r=t("collection").firstValue;r&&e.set("highlightedValue",r)})},highlightFirstItemIfNeeded({computed:e,action:t}){e("autoHighlight")&&t(["highlightFirstItem"])},highlightLastItem({context:e,prop:t,scope:n}){(Kn(n)?queueMicrotask:H)(()=>{let r=t("collection").lastValue;r&&e.set("highlightedValue",r)})},highlightNextItem({context:e,prop:t}){let n=null,i=e.get("highlightedValue"),r=t("collection");i?(n=r.getNextValue(i),!n&&t("loopFocus")&&(n=r.firstValue)):n=r.firstValue,n&&e.set("highlightedValue",n)},highlightPrevItem({context:e,prop:t}){let n=null,i=e.get("highlightedValue"),r=t("collection");i?(n=r.getPreviousValue(i),!n&&t("loopFocus")&&(n=r.lastValue)):n=r.lastValue,n&&e.set("highlightedValue",n)},highlightFirstSelectedItem({context:e,prop:t}){H(()=>{let[n]=t("collection").sort(e.get("value"));n&&e.set("highlightedValue",n)})},highlightFirstOrSelectedItem({context:e,prop:t,computed:n}){H(()=>{let i=null;n("hasSelectedItems")?i=t("collection").sort(e.get("value"))[0]:i=t("collection").firstValue,i&&e.set("highlightedValue",i)})},highlightLastOrSelectedItem({context:e,prop:t,computed:n}){H(()=>{let i=t("collection"),r=null;n("hasSelectedItems")?r=i.sort(e.get("value"))[0]:r=i.lastValue,r&&e.set("highlightedValue",r)})},autofillInputValue({context:e,computed:t,prop:n,event:i,scope:r}){let s=zn(r),a=n("collection");if(!t("autoComplete")||!s||!i.keypress)return;let o=a.stringify(e.get("highlightedValue"));H(()=>{s.value=o||e.get("inputValue")})},syncSelectedItems(e){queueMicrotask(()=>{let{context:t,prop:n}=e,i=n("collection"),r=t.get("value"),s=r.map(o=>t.get("selectedItems").find(c=>i.getItemValue(c)===o)||i.find(o));t.set("selectedItems",s);let a=Ce(n("selectionBehavior"),{preserve:t.get("inputValue"),replace:i.stringifyMany(r),clear:""});t.set("inputValue",a)})},syncHighlightedItem({context:e,prop:t}){let n=t("collection").find(e.get("highlightedValue"));e.set("highlightedItem",n)},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}});RI=_()(["allowCustomValue","autoFocus","closeOnSelect","collection","composite","defaultHighlightedValue","defaultInputValue","defaultOpen","defaultValue","dir","disabled","disableLayer","form","getRootNode","highlightedValue","id","ids","inputBehavior","inputValue","invalid","loopFocus","multiple","name","navigate","onFocusOutside","onHighlightChange","onInputValueChange","onInteractOutside","onOpenChange","onOpenChange","onPointerDownOutside","onSelect","onValueChange","open","openOnChange","openOnClick","openOnKeyPress","placeholder","positioning","readOnly","required","scrollToIndexFn","selectionBehavior","translations","value","alwaysSubmitOnEnter"]),ux=B(RI),DI=_()(["htmlFor"]),dx=B(DI),LI=_()(["id"]),hx=B(LI),MI=_()(["item","persistFocus"]),gx=B(MI),FI=class extends K{constructor(){super(...arguments);Y(this,"options",[]);Y(this,"allOptions",[]);Y(this,"hasGroups",!1)}setAllOptions(t){this.allOptions=t,this.options=t}getCollection(){let t=this.options||this.allOptions||[];return this.hasGroups?Ys({items:t,itemToValue:n=>{var i;return(i=n.id)!=null?i:""},itemToString:n=>n.label,isItemDisabled:n=>{var i;return(i=n.disabled)!=null?i:!1},groupBy:n=>{var i;return(i=n.group)!=null?i:""}}):Ys({items:t,itemToValue:n=>{var i;return(i=n.id)!=null?i:""},itemToString:n=>n.label,isItemDisabled:n=>{var i;return(i=n.disabled)!=null?i:!1}})}initMachine(t){let n=this.getCollection.bind(this);return new W(NI,y(g({},t),{get collection(){return n()},onOpenChange:i=>{i.open&&(this.options=this.allOptions),t.onOpenChange&&t.onOpenChange(i)},onInputValueChange:i=>{let r=this.allOptions.filter(s=>s.label.toLowerCase().includes(i.inputValue.toLowerCase()));this.options=r.length>0?r:this.allOptions,t.onInputValueChange&&t.onInputValueChange(i)}}))}initApi(){return VI(this.machine.service,q)}renderItems(){var i,r,s,a;let t=this.el.querySelector('[data-scope="combobox"][data-part="content"]');if(!t)return;let n=this.el.querySelector('[data-templates="combobox"]');if(n)if(t.querySelectorAll('[data-scope="combobox"][data-part="item"]:not([data-template])').forEach(o=>o.remove()),t.querySelectorAll('[data-scope="combobox"][data-part="item-group"]:not([data-template])').forEach(o=>o.remove()),this.hasGroups){let o=(s=(r=(i=this.api.collection).group)==null?void 0:r.call(i))!=null?s:[];this.renderGroupedItems(t,n,o)}else{let o=(a=this.options)!=null&&a.length?this.options:this.allOptions;this.renderFlatItems(t,n,o)}}renderGroupedItems(t,n,i){for(let[r,s]of i){if(r==null)continue;let a=n.querySelector(`[data-scope="combobox"][data-part="item-group"][data-id="${r}"][data-template]`);if(!a)continue;let o=a.cloneNode(!0);o.removeAttribute("data-template"),this.spreadProps(o,this.api.getItemGroupProps({id:r}));let l=o.querySelector('[data-scope="combobox"][data-part="item-group-label"]');l&&this.spreadProps(l,this.api.getItemGroupLabelProps({htmlFor:r}));let c=o.querySelector('[data-scope="combobox"][data-part="item-group-content"]');if(c){c.innerHTML="";for(let u of s){let h=this.cloneItem(n,u);h&&c.appendChild(h)}t.appendChild(o)}}}renderFlatItems(t,n,i){for(let r of i){let s=this.cloneItem(n,r);s&&t.appendChild(s)}}cloneItem(t,n){var l,c,u,h;let i=(h=(u=(c=(l=this.api.collection).getItemValue)==null?void 0:c.call(l,n))!=null?u:n.id)!=null?h:"",r=t.querySelector(`[data-scope="combobox"][data-part="item"][data-value="${i}"][data-template]`);if(!r)return null;let s=r.cloneNode(!0);s.removeAttribute("data-template"),this.spreadProps(s,this.api.getItemProps({item:n}));let a=s.querySelector('[data-scope="combobox"][data-part="item-text"]');a&&(this.spreadProps(a,this.api.getItemTextProps({item:n})),a.children.length===0&&(a.textContent=n.label||""));let o=s.querySelector('[data-scope="combobox"][data-part="item-indicator"]');return o&&this.spreadProps(o,this.api.getItemIndicatorProps({item:n})),s}render(){let t=this.el.querySelector('[data-scope="combobox"][data-part="root"]');if(!t)return;this.spreadProps(t,this.api.getRootProps()),["label","control","input","trigger","clear-trigger","positioner"].forEach(i=>{let r=this.el.querySelector(`[data-scope="combobox"][data-part="${i}"]`);if(!r)return;let s="get"+i.split("-").map(a=>a[0].toUpperCase()+a.slice(1)).join("")+"Props";this.spreadProps(r,this.api[s]())});let n=this.el.querySelector('[data-scope="combobox"][data-part="content"]');n&&(this.spreadProps(n,this.api.getContentProps()),this.renderItems())}};BI={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=JSON.parse(e.dataset.collection||"[]"),i=n.some(l=>!!l.group),r=y(g({id:e.id},C(e,"controlled")?{value:Z(e,"value")}:{defaultValue:Z(e,"defaultValue")}),{disabled:C(e,"disabled"),placeholder:w(e,"placeholder"),alwaysSubmitOnEnter:C(e,"alwaysSubmitOnEnter"),autoFocus:C(e,"autoFocus"),closeOnSelect:C(e,"closeOnSelect"),dir:w(e,"dir",["ltr","rtl"]),inputBehavior:w(e,"inputBehavior",["autohighlight","autocomplete","none"]),loopFocus:C(e,"loopFocus"),multiple:C(e,"multiple"),invalid:C(e,"invalid"),allowCustomValue:!1,selectionBehavior:"replace",name:"",form:w(e,"form"),readOnly:C(e,"readOnly"),required:C(e,"required"),positioning:(()=>{let l=e.dataset.positioning;if(l)try{let c=JSON.parse(l);return HI(c)}catch(c){return}})(),onOpenChange:l=>{let c=w(e,"onOpenChange");c&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&t(c,{open:l.open,reason:l.reason,value:l.value,id:e.id});let u=w(e,"onOpenChangeClient");u&&e.dispatchEvent(new CustomEvent(u,{bubbles:C(e,"bubble"),detail:{open:l.open,reason:l.reason,value:l.value,id:e.id}}))},onInputValueChange:l=>{let c=w(e,"onInputValueChange");c&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&t(c,{value:l.inputValue,reason:l.reason,id:e.id});let u=w(e,"onInputValueChangeClient");u&&e.dispatchEvent(new CustomEvent(u,{bubbles:C(e,"bubble"),detail:{value:l.inputValue,reason:l.reason,id:e.id}}))},onValueChange:l=>{let c=e.querySelector('[data-scope="combobox"][data-part="value-input"]');if(c){let m=O=>{var f;let b=n.find(S=>{var P;return String((P=S.id)!=null?P:"")===O||S.label===O});return b?String((f=b.id)!=null?f:""):O},d=l.value.length===0?"":l.value.length===1?m(String(l.value[0])):l.value.map(O=>m(String(O))).join(",");c.value=d;let p=c.getAttribute("form"),v=null;p?v=document.getElementById(p):v=c.closest("form");let I=new Event("change",{bubbles:!0,cancelable:!0});c.dispatchEvent(I);let T=new Event("input",{bubbles:!0,cancelable:!0});c.dispatchEvent(T),v&&v.hasAttribute("phx-change")&&requestAnimationFrame(()=>{let O=v.querySelector("input, select, textarea");if(O){let b=new Event("change",{bubbles:!0,cancelable:!0});O.dispatchEvent(b)}else{let b=new Event("change",{bubbles:!0,cancelable:!0});v.dispatchEvent(b)}})}let u=w(e,"onValueChange");u&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&t(u,{value:l.value,items:l.items,id:e.id});let h=w(e,"onValueChangeClient");h&&e.dispatchEvent(new CustomEvent(h,{bubbles:C(e,"bubble"),detail:{value:l.value,items:l.items,id:e.id}}))}}),s=new FI(e,r);s.hasGroups=i,s.setAllOptions(n),s.init();let a=e.querySelector('[data-scope="combobox"][data-part="input"]');a&&(a.removeAttribute("name"),a.removeAttribute("form"));let o=C(e,"controlled")?Z(e,"value"):Z(e,"defaultValue");if(o&&o.length>0){let l=n.filter(c=>{var u;return o.includes((u=c.id)!=null?u:"")});if(l.length>0){let c=l.map(u=>{var h;return(h=u.label)!=null?h:""}).join(", ");if(s.api&&typeof s.api.setInputValue=="function")s.api.setInputValue(c);else{let u=e.querySelector('[data-scope="combobox"][data-part="input"]');u&&(u.value=c)}}}this.combobox=s,this.handlers=[]},updated(){let e=JSON.parse(this.el.dataset.collection||"[]"),t=e.some(n=>!!n.group);if(this.combobox){this.combobox.hasGroups=t,this.combobox.setAllOptions(e),this.combobox.updateProps(y(g({},C(this.el,"controlled")?{value:Z(this.el,"value")}:{defaultValue:Z(this.el,"defaultValue")}),{name:w(this.el,"name"),form:w(this.el,"form"),disabled:C(this.el,"disabled"),multiple:C(this.el,"multiple"),dir:w(this.el,"dir",["ltr","rtl"]),invalid:C(this.el,"invalid"),required:C(this.el,"required"),readOnly:C(this.el,"readOnly")}));let n=this.el.querySelector('[data-scope="combobox"][data-part="input"]');n&&(n.removeAttribute("name"),n.removeAttribute("form"),n.name="")}},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.combobox)==null||e.destroy()}}});var eg={};he(eg,{DatePicker:()=>kC});function Uo(e,t){return e-t*Math.floor(e/t)}function js(e,t,n,i){t=al(e,t);let r=t-1,s=-2;return n<=2?s=0:na(t)&&(s=-1),bh-1+365*r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400)+Math.floor((367*n-362)/12+s+i)}function na(e){return e%4===0&&(e%100!==0||e%400===0)}function al(e,t){return e==="BC"?1-t:t}function _I(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}function Zn(e,t){return t=it(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function qI(e,t){return t=it(t,e.calendar),e=rn(e),t=rn(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function WI(e,t){return t=it(t,e.calendar),e=Or(e),t=Or(t),e.era===t.era&&e.year===t.year}function KI(e,t){return aa(e.calendar,t.calendar)&&Zn(e,t)}function zI(e,t){return aa(e.calendar,t.calendar)&&qI(e,t)}function YI(e,t){return aa(e.calendar,t.calendar)&&WI(e,t)}function aa(e,t){var n,i,r,s;return(s=(r=(n=e.isEqual)===null||n===void 0?void 0:n.call(e,t))!==null&&r!==void 0?r:(i=t.isEqual)===null||i===void 0?void 0:i.call(t,e))!==null&&s!==void 0?s:e.identifier===t.identifier}function jI(e,t){return Zn(e,oa(t))}function Eh(e,t,n){let i=e.calendar.toJulianDay(e),r=n?XI[n]:QI(t),s=Math.ceil(i+1-r)%7;return s<0&&(s+=7),s}function Ih(e){return sn(Date.now(),e)}function oa(e){return Yn(Ih(e))}function Ph(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function ZI(e,t){return rh(e)-rh(t)}function rh(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}function ol(){return qo==null&&(qo=new Intl.DateTimeFormat().resolvedOptions().timeZone),qo}function rn(e){return e.subtract({days:e.day-1})}function Zo(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function Or(e){return rn(e.subtract({months:e.month-1}))}function JI(e){return Zo(e.add({months:e.calendar.getMonthsInYear(e)-e.month}))}function wr(e,t,n){let i=Eh(e,t,n);return e.subtract({days:i})}function sh(e,t,n){return wr(e,t,n).add({days:6})}function Ch(e){if(Intl.Locale){let n=ah.get(e);return n||(n=new Intl.Locale(e).maximize().region,n&&ah.set(e,n)),n}let t=e.split("-")[1];return t==="u"?void 0:t}function QI(e){let t=Wo.get(e);if(!t){if(Intl.Locale){let i=new Intl.Locale(e);if("getWeekInfo"in i&&(t=i.getWeekInfo(),t))return Wo.set(e,t),t.firstDay}let n=Ch(e);if(e.includes("-fw-")){let i=e.split("-fw-")[1].split("-")[0];i==="mon"?t={firstDay:1}:i==="tue"?t={firstDay:2}:i==="wed"?t={firstDay:3}:i==="thu"?t={firstDay:4}:i==="fri"?t={firstDay:5}:i==="sat"?t={firstDay:6}:t={firstDay:0}}else e.includes("-ca-iso8601")?t={firstDay:1}:t={firstDay:n&&UI[n]||0};Wo.set(e,t)}return t.firstDay}function eP(e,t,n){let i=e.calendar.getDaysInMonth(e);return Math.ceil((Eh(rn(e),t,n)+i)/7)}function Sh(e,t){return e&&t?e.compare(t)<=0?e:t:e||t}function Th(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function nP(e,t){let n=e.calendar.toJulianDay(e),i=Math.ceil(n+1)%7;i<0&&(i+=7);let r=Ch(t),[s,a]=tP[r]||[6,0];return i===s||i===a}function Fi(e){e=it(e,new Mi);let t=al(e.era,e.year);return Oh(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Oh(e,t,n,i,r,s,a){let o=new Date;return o.setUTCHours(i,r,s,a),o.setUTCFullYear(e,t-1,n),o.getTime()}function Jo(e,t){if(t==="UTC")return 0;if(e>0&&t===ol())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:i,day:r,hour:s,minute:a,second:o}=wh(e,t);return Oh(n,i,r,s,a,o,0)-Math.floor(e/1e3)*1e3}function wh(e,t){let n=oh.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),oh.set(t,n));let i=n.formatToParts(new Date(e)),r={};for(let s of i)s.type!=="literal"&&(r[s.type]=s.value);return{year:r.era==="BC"||r.era==="B"?-r.year+1:+r.year,month:+r.month,day:+r.day,hour:r.hour==="24"?0:+r.hour,minute:+r.minute,second:+r.second}}function iP(e,t,n,i){return(n===i?[n]:[n,i]).filter(s=>rP(e,t,s))}function rP(e,t,n){let i=wh(n,t);return e.year===i.year&&e.month===i.month&&e.day===i.day&&e.hour===i.hour&&e.minute===i.minute&&e.second===i.second}function nn(e,t,n="compatible"){let i=jn(e);if(t==="UTC")return Fi(i);if(t===ol()&&n==="compatible"){i=it(i,new Mi);let l=new Date,c=al(i.era,i.year);return l.setFullYear(c,i.month-1,i.day),l.setHours(i.hour,i.minute,i.second,i.millisecond),l.getTime()}let r=Fi(i),s=Jo(r-lh,t),a=Jo(r+lh,t),o=iP(i,t,r-s,r-a);if(o.length===1)return o[0];if(o.length>1)switch(n){case"compatible":case"earlier":return o[0];case"later":return o[o.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(r-s,r-a);case"compatible":case"later":return Math.max(r-s,r-a);case"reject":throw new RangeError("No such absolute time found")}}function Vh(e,t,n="compatible"){return new Date(nn(e,t,n))}function sn(e,t){let n=Jo(e,t),i=new Date(e+n),r=i.getUTCFullYear(),s=i.getUTCMonth()+1,a=i.getUTCDate(),o=i.getUTCHours(),l=i.getUTCMinutes(),c=i.getUTCSeconds(),u=i.getUTCMilliseconds();return new Mh(r<1?"BC":"AD",r<1?-r+1:r,s,a,t,n,o,l,c,u)}function Yn(e){return new $i(e.calendar,e.era,e.year,e.month,e.day)}function jn(e,t){let n=0,i=0,r=0,s=0;if("timeZone"in e)({hour:n,minute:i,second:r,millisecond:s}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:i,second:r,millisecond:s}=t),new TP(e.calendar,e.era,e.year,e.month,e.day,n,i,r,s)}function it(e,t){if(aa(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),i=e.copy();return i.calendar=t,i.era=n.era,i.year=n.year,i.month=n.month,i.day=n.day,Xn(i),i}function sP(e,t,n){if(e instanceof Mh)return e.timeZone===t?e:oP(e,t);let i=nn(e,t,n);return sn(i,t)}function aP(e){let t=Fi(e)-e.offset;return new Date(t)}function oP(e,t){let n=Fi(e)-e.offset;return it(sn(n,t),e.calendar)}function la(e,t){let n=e.copy(),i="hour"in n?dP(n,t):0;Qo(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,el(n),xh(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=i,lP(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let r=n.calendar.getYearsInEra(n);if(n.year>r){var s,a;let l=(s=(a=n.calendar).isInverseEra)===null||s===void 0?void 0:s.call(a,n);n.year=r,n.month=l?1:n.calendar.getMonthsInYear(n),n.day=l?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let o=n.calendar.getMonthsInYear(n);return n.month>o&&(n.month=o,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function Qo(e,t){var n,i;!((n=(i=e.calendar).isInverseEra)===null||n===void 0)&&n.call(i,e)&&(t=-t),e.year+=t}function el(e){for(;e.month<1;)Qo(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,Qo(e,1)}function lP(e){for(;e.day<1;)e.month--,el(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,el(e)}function xh(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function Xn(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),xh(e)}function Ah(e){let t={};for(let n in e)typeof e[n]=="number"&&(t[n]=-e[n]);return t}function kh(e,t){return la(e,Ah(t))}function ll(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),Xn(n),n}function sa(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),uP(n),n}function cP(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=Xs(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=Xs(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=Xs(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=Xs(e.hour,24),t}function uP(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function Xs(e,t){let n=e%t;return n<0&&(n+=t),n}function dP(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,cP(e)}function cl(e,t,n,i){let r=e.copy();switch(t){case"era":{let o=e.calendar.getEras(),l=o.indexOf(e.era);if(l<0)throw new Error("Invalid era: "+e.era);l=an(l,n,0,o.length-1,i==null?void 0:i.round),r.era=o[l],Xn(r);break}case"year":var s,a;!((s=(a=r.calendar).isInverseEra)===null||s===void 0)&&s.call(a,r)&&(n=-n),r.year=an(e.year,n,-1/0,9999,i==null?void 0:i.round),r.year===-1/0&&(r.year=1),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e);break;case"month":r.month=an(e.month,n,1,e.calendar.getMonthsInYear(e),i==null?void 0:i.round);break;case"day":r.day=an(e.day,n,1,e.calendar.getDaysInMonth(e),i==null?void 0:i.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(r),Xn(r),r}function Nh(e,t,n,i){let r=e.copy();switch(t){case"hour":{let s=e.hour,a=0,o=23;if((i==null?void 0:i.hourCycle)===12){let l=s>=12;a=l?12:0,o=l?23:11}r.hour=an(s,n,a,o,i==null?void 0:i.round);break}case"minute":r.minute=an(e.minute,n,0,59,i==null?void 0:i.round);break;case"second":r.second=an(e.second,n,0,59,i==null?void 0:i.round);break;case"millisecond":r.millisecond=an(e.millisecond,n,0,999,i==null?void 0:i.round);break;default:throw new Error("Unsupported field "+t)}return r}function an(e,t,n,i,r=!1){if(r){e+=Math.sign(t),e0?e=Math.ceil(e/s)*s:e=Math.floor(e/s)*s,e>i&&(e=n)}else e+=t,ei&&(e=n+(e-i-1));return e}function Rh(e,t){let n;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let r=la(jn(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=nn(r,e.timeZone)}else n=Fi(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let i=sn(n,e.timeZone);return it(i,e.calendar)}function hP(e,t){return Rh(e,Ah(t))}function gP(e,t,n,i){switch(t){case"hour":{let r=0,s=23;if((i==null?void 0:i.hourCycle)===12){let p=e.hour>=12;r=p?12:0,s=p?23:11}let a=jn(e),o=it(sa(a,{hour:r}),new Mi),l=[nn(o,e.timeZone,"earlier"),nn(o,e.timeZone,"later")].filter(p=>sn(p,e.timeZone).day===o.day)[0],c=it(sa(a,{hour:s}),new Mi),u=[nn(c,e.timeZone,"earlier"),nn(c,e.timeZone,"later")].filter(p=>sn(p,e.timeZone).day===c.day).pop(),h=Fi(e)-e.offset,m=Math.floor(h/Sr),d=h%Sr;return h=an(m,n,Math.floor(l/Sr),Math.floor(u/Sr),i==null?void 0:i.round)*Sr+d,it(sn(h,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return Nh(e,t,n,i);case"era":case"year":case"month":case"day":{let r=cl(jn(e),t,n,i),s=nn(r,e.timeZone);return it(sn(s,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function pP(e,t,n){let i=jn(e),r=sa(ll(i,t),t);if(r.compare(i)===0)return e;let s=nn(r,e.timeZone,n);return it(sn(s,e.timeZone),e.calendar)}function yP(e){let t=e.match(fP);if(!t)throw mP.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let n=new $i(Ko(t[1],0,9999),Ko(t[2],1,12),1);return n.day=Ko(t[3],1,n.calendar.getDaysInMonth(n)),n}function Ko(e,t,n){let i=Number(e);if(in)throw new RangeError(`Value out of range: ${t} <= ${i} <= ${n}`);return i}function bP(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function Dh(e){let t=it(e,new Mi),n;return t.era==="BC"?n=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):n=String(t.year).padStart(4,"0"),`${n}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function Lh(e){return`${Dh(e)}T${bP(e)}`}function EP(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let n=Math.floor(e/36e5),i=Math.floor(e%36e5/6e4),r=Math.floor(e%36e5%6e4/1e3),s=`${t}${String(n).padStart(2,"0")}:${String(i).padStart(2,"0")}`;return r!==0&&(s+=`:${String(r).padStart(2,"0")}`),s}function IP(e){return`${Lh(e)}${EP(e.offset)}[${e.timeZone}]`}function PP(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ul(e,t,n){PP(e,t),t.set(e,n)}function dl(e){let t=typeof e[0]=="object"?e.shift():new Mi,n;if(typeof e[0]=="string")n=e.shift();else{let a=t.getEras();n=a[a.length-1]}let i=e.shift(),r=e.shift(),s=e.shift();return[t,n,i,r,s]}function Fh(e,t={}){if(typeof t.hour12=="boolean"&&VP()){t=g({},t);let r=wP[String(t.hour12)][e.split("-")[0]],s=t.hour12?"h12":"h23";t.hourCycle=r!=null?r:s,delete t.hour12}let n=e+(t?Object.entries(t).sort((r,s)=>r[0]s.type==="hour").value,10),r=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(s=>s.type==="hour").value,10);if(i===0&&r===23)return"h23";if(i===24&&r===23)return"h24";if(i===0&&r===11)return"h11";if(i===12&&r===11)return"h12";throw new Error("Unexpected hour cycle result")}function kP(e,t,n,i,r){let s={};for(let o in t){let l=o,c=t[l];c!=null&&(s[l]=Math.floor(c/2),s[l]>0&&c%2===0&&s[l]--)}let a=Jn(e,t,n).subtract(s);return Vr(e,a,t,n,i,r)}function Jn(e,t,n,i,r){let s=e;return t.years?s=Or(e):t.months?s=rn(e):t.weeks&&(s=wr(e,n)),Vr(e,s,t,n,i,r)}function hl(e,t,n,i,r){let s=g({},t);s.days?s.days--:s.weeks?s.weeks--:s.months?s.months--:s.years&&s.years--;let a=Jn(e,t,n).subtract(s);return Vr(e,a,t,n,i,r)}function Vr(e,t,n,i,r,s){return r&&e.compare(r)>=0&&(t=Th(t,Jn(Yn(r),n,i))),s&&e.compare(s)<=0&&(t=Sh(t,hl(Yn(s),n,i))),t}function Pt(e,t,n){let i=Yn(e);return t&&(i=Th(i,Yn(t))),n&&(i=Sh(i,Yn(n))),i}function ch(e,t,n,i,r,s){switch(t){case"start":return Jn(e,n,i,r,s);case"end":return hl(e,n,i,r,s);case"center":default:return kP(e,n,i,r,s)}}function nt(e,t){return e==null||t==null?e===t:Zn(e,t)}function uh(e,t,n,i,r){return e?t!=null&&t(e,n)?!0:$t(e,i,r):!1}function $t(e,t,n){return t!=null&&e.compare(t)<0||n!=null&&e.compare(n)>0}function NP(e,t,n){let i=e.subtract({days:1});return Zn(i,e)||$t(i,t,n)}function RP(e,t,n){let i=e.add({days:1});return Zn(i,e)||$t(i,t,n)}function gl(e){let t=g({},e);for(let n in t)t[n]=1;return t}function $h(e,t){let n=g({},t);return n.days?n.days--:n.days=-1,e.add(n)}function Hh(e){return(e==null?void 0:e.calendar.identifier)==="gregory"&&e.era==="BC"?"short":void 0}function Bh(e,t){let n=jn(oa(t));return new Ct(e,{weekday:"long",month:"long",year:"numeric",day:"numeric",era:Hh(n),timeZone:t})}function dh(e,t){let n=oa(t);return new Ct(e,{month:"long",year:"numeric",era:Hh(n),calendar:n==null?void 0:n.calendar.identifier,timeZone:t})}function DP(e,t,n,i,r){let s=n.formatRangeToParts(e.toDate(r),t.toDate(r)),a=-1;for(let c=0;ca&&(l+=s[c].value);return i(o,l)}function Zs(e,t,n,i){if(!e)return"";let r=e,s=t!=null?t:e,a=Bh(n,i);return Zn(r,s)?a.format(r.toDate(i)):DP(r,s,a,(o,l)=>`${o} \u2013 ${l}`,i)}function _h(e){return e!=null?LP[e]:void 0}function Gh(e,t,n){let i=_h(n);return wr(e,t,i)}function Uh(e,t,n,i){let r=t.add({weeks:e}),s=[],a=Gh(r,n,i);for(;s.length<7;){s.push(a);let o=a.add({days:1});if(Zn(a,o))break;a=o}return s}function MP(e,t,n,i){let r=_h(i),s=n!=null?n:eP(e,t,r);return[...new Array(s).keys()].map(o=>Uh(o,e,t,i))}function FP(e,t){let n=new Ct(e,{weekday:"long",timeZone:t}),i=new Ct(e,{weekday:"short",timeZone:t}),r=new Ct(e,{weekday:"narrow",timeZone:t});return s=>{let a=s instanceof Date?s:s.toDate(t);return{value:s,short:i.format(a),long:n.format(a),narrow:r.format(a)}}}function $P(e,t,n,i){let r=Gh(e,i,t),s=[...new Array(7).keys()],a=FP(i,n);return s.map(o=>a(r.add({days:o})))}function HP(e,t="long"){let n=new Date(2021,0,1),i=[];for(let r=0;r<12;r++)i.push(n.toLocaleString(e,{month:t})),n.setMonth(n.getMonth()+1);return i}function BP(e){let t=[];for(let n=e.from;n<=e.to;n+=1)t.push(n);return t}function GP(e){if(e){if(e.length===3)return e.padEnd(4,"0");if(e.length===2){let t=new Date().getFullYear(),n=Math.floor(t/100)*100,i=parseInt(e.slice(-2),10),r=n+i;return r>t+_P?(r-100).toString():r.toString()}return e}}function Li(e,t){let n=t!=null&&t.strict?10:12,i=e-e%10,r=[];for(let s=0;s0?{startDate:Jn(o,e,t,n,i),endDate:l,focusedDate:Pt(o,n,i)}:{startDate:a,endDate:l,focusedDate:Pt(o,n,i)}}}function qh(e,t,n,i,r,s){let a=xr(n,i,r,s),o=t.add(n);return a({focusedDate:e.add(n),startDate:Jn(Vr(e,o,n,i,r,s),n,i)})}function Wh(e,t,n,i,r,s){let a=xr(n,i,r,s),o=t.subtract(n);return a({focusedDate:e.subtract(n),startDate:Jn(Vr(e,o,n,i,r,s),n,i)})}function UP(e,t,n,i,r,s,a){let o=xr(i,r,s,a);if(!n&&!i.days)return o({focusedDate:e.add(gl(i)),startDate:t});if(i.days)return qh(e,t,i,r,s,a);if(i.weeks)return o({focusedDate:e.add({months:1}),startDate:t});if(i.months||i.years)return o({focusedDate:e.add({years:1}),startDate:t})}function qP(e,t,n,i,r,s,a){let o=xr(i,r,s,a);if(!n&&!i.days)return o({focusedDate:e.subtract(gl(i)),startDate:t});if(i.days)return Wh(e,t,i,r,s,a);if(i.weeks)return o({focusedDate:e.subtract({months:1}),startDate:t});if(i.months||i.years)return o({focusedDate:e.subtract({years:1}),startDate:t})}function zP(e,t,n){var c;let i=YP(t,n),{year:r,month:s,day:a}=(c=jP(i,e))!=null?c:{};if(r!=null||s!=null||a!=null){let u=new Date;r||(r=u.getFullYear().toString()),s||(s=(u.getMonth()+1).toString()),a||(a=u.getDate().toString())}if(hh(r)||(r=GP(r)),hh(r)&&WP(s)&&KP(a))return new $i(+r,+s,+a);let l=Date.parse(e);if(!isNaN(l)){let u=new Date(l);return new $i(u.getFullYear(),u.getMonth()+1,u.getDate())}}function YP(e,t){return new Ct(e,{day:"numeric",month:"numeric",year:"numeric",timeZone:t}).formatToParts(new Date(2e3,11,25)).map(({type:r,value:s})=>r==="literal"?`${s}?`:`((?!=<${r}>)\\d+)?`).join("")}function jP(e,t){var i;let n=t.match(e);return(i=e.toString().match(/<(.+?)>/g))==null?void 0:i.map(r=>{var a;let s=r.match(/<(.+)>/);return!s||s.length<=0?null:(a=r.match(/<(.+)>/))==null?void 0:a[1]}).reduce((r,s,a)=>(s&&(n&&n.length>a?r[s]=n[a+1]:r[s]=null),r),{})}function gh(e,t,n){let i=Yn(Ih(n));switch(e){case"thisWeek":return[wr(i,t),sh(i,t)];case"thisMonth":return[rn(i),i];case"thisQuarter":return[rn(i).add({months:-((i.month-1)%3)}),i];case"thisYear":return[Or(i),i];case"last3Days":return[i.add({days:-2}),i];case"last7Days":return[i.add({days:-6}),i];case"last14Days":return[i.add({days:-13}),i];case"last30Days":return[i.add({days:-29}),i];case"last90Days":return[i.add({days:-89}),i];case"lastMonth":return[rn(i.add({months:-1})),Zo(i.add({months:-1}))];case"lastQuarter":return[rn(i.add({months:-((i.month-1)%3)-3})),Zo(i.add({months:-((i.month-1)%3)-1}))];case"lastWeek":return[wr(i,t).add({weeks:-1}),sh(i,t).add({weeks:-1})];case"lastYear":return[Or(i.add({years:-1})),JI(i.add({years:-1}))];default:throw new Error(`Invalid date range preset: ${e}`)}}function XP(e={}){var c;let{level:t="polite",document:n=document,root:i,delay:r=0}=e,s=(c=n.defaultView)!=null?c:window,a=i!=null?i:n.body;function o(u,h){let m=n.getElementById(Js);m==null||m.remove(),h=h!=null?h:r;let d=n.createElement("span");d.id=Js,d.dataset.liveAnnouncer="true";let p=t!=="assertive"?"status":"alert";d.setAttribute("aria-live",t),d.setAttribute("role",p),Object.assign(d.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}),a.appendChild(d),s.setTimeout(()=>{d.textContent=u},h)}function l(){let u=n.getElementById(Js);u==null||u.remove()}return{announce:o,destroy:l,toJSON(){return Js}}}function sl(e){let[t,n]=e,i;return!t||!n?i=e:i=t.compare(n)<=0?e:[n,t],i}function Ri(e,t){let[n,i]=t;return!n||!i?!1:n.compare(e)<=0&&i.compare(e)>=0}function Qs(e){return e.slice().filter(t=>t!=null).sort((t,n)=>t.compare(n))}function lC(e){return Ce(e,{year:"calendar decade",month:"calendar year",day:"calendar month"})}function uC(e){return new Ct(e).formatToParts(new Date).map(t=>{var n;return(n=cC[t.type])!=null?n:t.value}).join("")}function hC(e){let i=new Intl.DateTimeFormat(e).formatToParts(new Date).find(r=>r.type==="literal");return i?i.value:"/"}function on(e,t){return e?e==="day"?0:e==="month"?1:2:t||0}function pl(e){return e===0?"day":e===1?"month":"year"}function fl(e,t,n){return pl(He(on(e,0),on(t,0),on(n,2)))}function pC(e,t){return on(e,0)>on(t,0)}function fC(e,t){return on(e,0)e(t))}function IC(e,t){let{state:n,context:i,prop:r,send:s,computed:a,scope:o}=e,l=i.get("startValue"),c=a("endValue"),u=i.get("value"),h=i.get("focusedValue"),m=i.get("hoveredValue"),d=m?sl([u[0],m]):[],p=!!r("disabled"),v=!!r("readOnly"),I=!!r("invalid"),T=a("isInteractive"),O=u.length===0,b=r("min"),f=r("max"),S=r("locale"),P=r("timeZone"),V=r("startOfWeek"),A=n.matches("focused"),x=n.matches("open"),k=r("selectionMode")==="range",N=r("isDateUnavailable"),D=i.get("currentPlacement"),$=On(y(g({},r("positioning")),{placement:D})),te=hC(S),J=g(g({},gC),r("translations"));function ie(M=l){let R=r("fixedWeeks")?6:void 0;return MP(M,S,R,V)}function Q(M={}){let{format:R}=M;return HP(S,R).map((F,G)=>{let ae=G+1,ze=h.set({month:ae}),Ne=$t(ze,b,f);return{label:F,value:ae,disabled:Ne}})}function Se(){var R,F;return BP({from:(R=b==null?void 0:b.year)!=null?R:1900,to:(F=f==null?void 0:f.year)!=null?F:2100}).map(G=>({label:G.toString(),value:G,disabled:!Pi(G,b==null?void 0:b.year,f==null?void 0:f.year)}))}function Pe(M){return uh(M,N,S,b,f)}function ne(M){let R=l!=null?l:Di(P);s({type:"FOCUS.SET",value:R.set({month:M})})}function Ie(M){let R=l!=null?l:Di(P);s({type:"FOCUS.SET",value:R.set({year:M})})}function rt(M){let{value:R,disabled:F}=M,G=h.set({year:R}),ze=!Li(l.year,{strict:!0}).includes(R),Ne=Pi(R,b==null?void 0:b.year,f==null?void 0:f.year),Tt={focused:h.year===M.value,selectable:ze||Ne,outsideRange:ze,selected:!!u.find(Zi=>Zi&&Zi.year===R),valueText:R.toString(),inRange:k&&(Ri(G,u)||Ri(G,d)),value:G,get disabled(){return F||!Tt.selectable}};return Tt}function Ut(M){let{value:R,disabled:F}=M,G=h.set({month:R}),ae=dh(S,P),ze={focused:h.month===M.value,selectable:!$t(G,b,f),selected:!!u.find(Ne=>Ne&&Ne.month===R&&Ne.year===h.year),valueText:ae.format(G.toDate(P)),inRange:k&&(Ri(G,u)||Ri(G,d)),value:G,get disabled(){return F||!ze.selectable}};return ze}function Xi(M){let{value:R,disabled:F,visibleRange:G=a("visibleRange")}=M,ae=Bh(S,P),ze=gl(a("visibleDuration")),Ne=r("outsideDaySelectable"),Tt=G.start.add(ze).subtract({days:1}),Zi=$t(R,G.start,Tt),kf=k&&Ri(R,u),Nf=k&&nt(R,u[0]),Rf=k&&nt(R,u[1]),Ma=k&&d.length>0,ic=Ma&&Ri(R,d),Df=Ma&&nt(R,d[0]),Lf=Ma&&nt(R,d[1]),Ji={invalid:$t(R,b,f),disabled:F||!Ne&&Zi||$t(R,b,f),selected:u.some(Mf=>nt(R,Mf)),unavailable:uh(R,N,S,b,f)&&!F,outsideRange:Zi,today:jI(R,P),weekend:nP(R,S),formattedDate:ae.format(R.toDate(P)),get focused(){return nt(R,h)&&(!Ji.outsideRange||Ne)},get ariaLabel(){return J.dayCell(Ji)},get selectable(){return!Ji.disabled&&!Ji.unavailable},inRange:kf||ic,firstInRange:Nf,lastInRange:Rf,inHoveredRange:ic,firstInHoveredRange:Df,lastInHoveredRange:Lf};return Ji}function La(M){let{view:R="day",id:F}=M;return[R,F].filter(Boolean).join(" ")}return{focused:A,open:x,disabled:p,invalid:I,readOnly:v,inline:!!r("inline"),numOfMonths:r("numOfMonths"),selectionMode:r("selectionMode"),view:i.get("view"),getRangePresetValue(M){return gh(M,S,P)},getDaysInWeek(M,R=l){return Uh(M,R,S,V)},getOffset(M){let R=l.add(M),F=c.add(M),G=dh(S,P);return{visibleRange:{start:R,end:F},weeks:ie(R),visibleRangeText:{start:G.format(R.toDate(P)),end:G.format(F.toDate(P))}}},getMonthWeeks:ie,isUnavailable:Pe,weeks:ie(),weekDays:$P(Di(P),V,P,S),visibleRangeText:a("visibleRangeText"),value:u,valueAsDate:u.filter(M=>M!=null).map(M=>M.toDate(P)),valueAsString:a("valueAsString"),focusedValue:h,focusedValueAsDate:h==null?void 0:h.toDate(P),focusedValueAsString:r("format")(h,{locale:S,timeZone:P}),visibleRange:a("visibleRange"),selectToday(){let M=Pt(Di(P),b,f);s({type:"VALUE.SET",value:M})},setValue(M){let R=M.map(F=>Pt(F,b,f));s({type:"VALUE.SET",value:R})},clearValue(){s({type:"VALUE.CLEAR"})},setFocusedValue(M){s({type:"FOCUS.SET",value:M})},setOpen(M){r("inline")||n.matches("open")===M||s({type:M?"OPEN":"CLOSE"})},focusMonth:ne,focusYear:Ie,getYears:Se,getMonths:Q,getYearsGrid(M={}){let{columns:R=1}=M,F=Li(l.year,{strict:!0}).map(G=>({label:G.toString(),value:G,disabled:!Pi(G,b==null?void 0:b.year,f==null?void 0:f.year)}));return cr(F,R)},getDecade(){let M=Li(l.year,{strict:!0});return{start:M.at(0),end:M.at(-1)}},getMonthsGrid(M={}){let{columns:R=1,format:F}=M;return cr(Q({format:F}),R)},format(M,R={month:"long",year:"numeric"}){return new Ct(S,R).format(M.toDate(P))},setView(M){s({type:"VIEW.SET",view:M})},goToNext(){s({type:"GOTO.NEXT",view:i.get("view")})},goToPrev(){s({type:"GOTO.PREV",view:i.get("view")})},getRootProps(){return t.element(y(g({},de.root.attrs),{dir:r("dir"),id:QP(o),"data-state":x?"open":"closed","data-disabled":E(p),"data-readonly":E(v),"data-empty":E(O)}))},getLabelProps(M={}){let{index:R=0}=M;return t.label(y(g({},de.label.attrs),{id:JP(o,R),dir:r("dir"),htmlFor:ph(o,R),"data-state":x?"open":"closed","data-index":R,"data-disabled":E(p),"data-readonly":E(v)}))},getControlProps(){return t.element(y(g({},de.control.attrs),{dir:r("dir"),id:zh(o),"data-disabled":E(p),"data-placeholder-shown":E(O)}))},getRangeTextProps(){return t.element(y(g({},de.rangeText.attrs),{dir:r("dir")}))},getContentProps(){return t.element(y(g({},de.content.attrs),{hidden:!x,dir:r("dir"),"data-state":x?"open":"closed","data-placement":D,"data-inline":E(r("inline")),id:rl(o),tabIndex:-1,role:"application","aria-roledescription":"datepicker","aria-label":J.content}))},getTableProps(M={}){let{view:R="day",columns:F=R==="day"?7:4}=M,G=La(M);return t.element(y(g({},de.table.attrs),{role:"grid","data-columns":F,"aria-roledescription":lC(R),id:eC(o,G),"aria-readonly":X(v),"aria-disabled":X(p),"aria-multiselectable":X(r("selectionMode")!=="single"),"data-view":R,dir:r("dir"),tabIndex:-1,onKeyDown(ae){if(ae.defaultPrevented)return;let Ne={Enter(){R==="day"&&Pe(h)||R==="month"&&!Ut({value:h.month}).selectable||R==="year"&&!rt({value:h.year}).selectable||s({type:"TABLE.ENTER",view:R,columns:F,focus:!0})},ArrowLeft(){s({type:"TABLE.ARROW_LEFT",view:R,columns:F,focus:!0})},ArrowRight(){s({type:"TABLE.ARROW_RIGHT",view:R,columns:F,focus:!0})},ArrowUp(){s({type:"TABLE.ARROW_UP",view:R,columns:F,focus:!0})},ArrowDown(){s({type:"TABLE.ARROW_DOWN",view:R,columns:F,focus:!0})},PageUp(Tt){s({type:"TABLE.PAGE_UP",larger:Tt.shiftKey,view:R,columns:F,focus:!0})},PageDown(Tt){s({type:"TABLE.PAGE_DOWN",larger:Tt.shiftKey,view:R,columns:F,focus:!0})},Home(){s({type:"TABLE.HOME",view:R,columns:F,focus:!0})},End(){s({type:"TABLE.END",view:R,columns:F,focus:!0})}}[ge(ae,{dir:r("dir")})];Ne&&(Ne(ae),ae.preventDefault(),ae.stopPropagation())},onPointerLeave(){s({type:"TABLE.POINTER_LEAVE"})},onPointerDown(){s({type:"TABLE.POINTER_DOWN",view:R})},onPointerUp(){s({type:"TABLE.POINTER_UP",view:R})}}))},getTableHeadProps(M={}){let{view:R="day"}=M;return t.element(y(g({},de.tableHead.attrs),{"aria-hidden":!0,dir:r("dir"),"data-view":R,"data-disabled":E(p)}))},getTableHeaderProps(M={}){let{view:R="day"}=M;return t.element(y(g({},de.tableHeader.attrs),{dir:r("dir"),"data-view":R,"data-disabled":E(p)}))},getTableBodyProps(M={}){let{view:R="day"}=M;return t.element(y(g({},de.tableBody.attrs),{"data-view":R,"data-disabled":E(p)}))},getTableRowProps(M={}){let{view:R="day"}=M;return t.element(y(g({},de.tableRow.attrs),{"aria-disabled":X(p),"data-disabled":E(p),"data-view":R}))},getDayTableCellState:Xi,getDayTableCellProps(M){let{value:R}=M,F=Xi(M);return t.element(y(g({},de.tableCell.attrs),{role:"gridcell","aria-disabled":X(!F.selectable),"aria-selected":F.selected||F.inRange,"aria-invalid":X(F.invalid),"aria-current":F.today?"date":void 0,"data-value":R.toString()}))},getDayTableCellTriggerProps(M){let{value:R}=M,F=Xi(M);return t.element(y(g({},de.tableCellTrigger.attrs),{id:Xo(o,R.toString()),role:"button",dir:r("dir"),tabIndex:F.focused?0:-1,"aria-label":F.ariaLabel,"aria-disabled":X(!F.selectable),"aria-invalid":X(F.invalid),"data-disabled":E(!F.selectable),"data-selected":E(F.selected),"data-value":R.toString(),"data-view":"day","data-today":E(F.today),"data-focus":E(F.focused),"data-unavailable":E(F.unavailable),"data-range-start":E(F.firstInRange),"data-range-end":E(F.lastInRange),"data-in-range":E(F.inRange),"data-outside-range":E(F.outsideRange),"data-weekend":E(F.weekend),"data-in-hover-range":E(F.inHoveredRange),"data-hover-range-start":E(F.firstInHoveredRange),"data-hover-range-end":E(F.lastInHoveredRange),onClick(G){G.defaultPrevented||F.selectable&&s({type:"CELL.CLICK",cell:"day",value:R})},onPointerMove:k?G=>{if(G.pointerType==="touch"||!F.selectable)return;let ae=!o.isActiveElement(G.currentTarget);m&&KI(R,m)||s({type:"CELL.POINTER_MOVE",cell:"day",value:R,focus:ae})}:void 0}))},getMonthTableCellState:Ut,getMonthTableCellProps(M){let{value:R,columns:F}=M,G=Ut(M);return t.element(y(g({},de.tableCell.attrs),{dir:r("dir"),colSpan:F,role:"gridcell","aria-selected":X(G.selected||G.inRange),"data-selected":E(G.selected),"aria-disabled":X(!G.selectable),"data-value":R}))},getMonthTableCellTriggerProps(M){let{value:R}=M,F=Ut(M);return t.element(y(g({},de.tableCellTrigger.attrs),{dir:r("dir"),role:"button",id:Xo(o,R.toString()),"data-selected":E(F.selected),"aria-disabled":X(!F.selectable),"data-disabled":E(!F.selectable),"data-focus":E(F.focused),"data-in-range":E(F.inRange),"data-outside-range":E(F.outsideRange),"aria-label":F.valueText,"data-view":"month","data-value":R,tabIndex:F.focused?0:-1,onClick(G){G.defaultPrevented||F.selectable&&s({type:"CELL.CLICK",cell:"month",value:R})},onPointerMove:k?G=>{if(G.pointerType==="touch"||!F.selectable)return;let ae=!o.isActiveElement(G.currentTarget);m&&F.value&&zI(F.value,m)||s({type:"CELL.POINTER_MOVE",cell:"month",value:F.value,focus:ae})}:void 0}))},getYearTableCellState:rt,getYearTableCellProps(M){let{value:R,columns:F}=M,G=rt(M);return t.element(y(g({},de.tableCell.attrs),{dir:r("dir"),colSpan:F,role:"gridcell","aria-selected":X(G.selected),"data-selected":E(G.selected),"aria-disabled":X(!G.selectable),"data-value":R}))},getYearTableCellTriggerProps(M){let{value:R}=M,F=rt(M);return t.element(y(g({},de.tableCellTrigger.attrs),{dir:r("dir"),role:"button",id:Xo(o,R.toString()),"data-selected":E(F.selected),"data-focus":E(F.focused),"data-in-range":E(F.inRange),"aria-disabled":X(!F.selectable),"data-disabled":E(!F.selectable),"aria-label":F.valueText,"data-outside-range":E(F.outsideRange),"data-value":R,"data-view":"year",tabIndex:F.focused?0:-1,onClick(G){G.defaultPrevented||F.selectable&&s({type:"CELL.CLICK",cell:"year",value:R})},onPointerMove:k?G=>{if(G.pointerType==="touch"||!F.selectable)return;let ae=!o.isActiveElement(G.currentTarget);m&&F.value&&YI(F.value,m)||s({type:"CELL.POINTER_MOVE",cell:"year",value:F.value,focus:ae})}:void 0}))},getNextTriggerProps(M={}){let{view:R="day"}=M,F=p||!a("isNextVisibleRangeValid");return t.button(y(g({},de.nextTrigger.attrs),{dir:r("dir"),id:nC(o,R),type:"button","aria-label":J.nextTrigger(R),disabled:F,"data-disabled":E(F),onClick(G){G.defaultPrevented||s({type:"GOTO.NEXT",view:R})}}))},getPrevTriggerProps(M={}){let{view:R="day"}=M,F=p||!a("isPrevVisibleRangeValid");return t.button(y(g({},de.prevTrigger.attrs),{dir:r("dir"),id:tC(o,R),type:"button","aria-label":J.prevTrigger(R),disabled:F,"data-disabled":E(F),onClick(G){G.defaultPrevented||s({type:"GOTO.PREV",view:R})}}))},getClearTriggerProps(){return t.button(y(g({},de.clearTrigger.attrs),{id:Kh(o),dir:r("dir"),type:"button","aria-label":J.clearTrigger,hidden:!u.length,onClick(M){M.defaultPrevented||s({type:"VALUE.CLEAR"})}}))},getTriggerProps(){return t.button(y(g({},de.trigger.attrs),{id:Yh(o),dir:r("dir"),type:"button","data-placement":D,"aria-label":J.trigger(x),"aria-controls":rl(o),"data-state":x?"open":"closed","data-placeholder-shown":E(O),"aria-haspopup":"grid",disabled:p,onClick(M){M.defaultPrevented||T&&s({type:"TRIGGER.CLICK"})}}))},getViewProps(M={}){let{view:R="day"}=M;return t.element(y(g({},de.view.attrs),{"data-view":R,hidden:i.get("view")!==R}))},getViewTriggerProps(M={}){let{view:R="day"}=M;return t.button(y(g({},de.viewTrigger.attrs),{"data-view":R,dir:r("dir"),id:iC(o,R),type:"button",disabled:p,"aria-label":J.viewTrigger(R),onClick(F){F.defaultPrevented||T&&s({type:"VIEW.TOGGLE",src:"viewTrigger"})}}))},getViewControlProps(M={}){let{view:R="day"}=M;return t.element(y(g({},de.viewControl.attrs),{"data-view":R,dir:r("dir")}))},getInputProps(M={}){let{index:R=0,fixOnBlur:F=!0}=M;return t.input(y(g({},de.input.attrs),{id:ph(o,R),autoComplete:"off",autoCorrect:"off",spellCheck:"false",dir:r("dir"),name:r("name"),"data-index":R,"data-state":x?"open":"closed","data-placeholder-shown":E(O),readOnly:v,disabled:p,required:r("required"),"aria-invalid":X(I),"data-invalid":E(I),placeholder:r("placeholder")||uC(S),defaultValue:a("valueAsString")[R],onBeforeInput(G){let{data:ae}=Yt(G);Qh(ae,te)||G.preventDefault()},onFocus(){s({type:"INPUT.FOCUS",index:R})},onBlur(G){let ae=G.currentTarget.value.trim();s({type:"INPUT.BLUR",value:ae,index:R,fixOnBlur:F})},onKeyDown(G){if(G.defaultPrevented||!T)return;let ze={Enter(Ne){Re(Ne)||Pe(h)||Ne.currentTarget.value.trim()!==""&&s({type:"INPUT.ENTER",value:Ne.currentTarget.value,index:R})}}[G.key];ze&&(ze(G),G.preventDefault())},onInput(G){let ae=G.currentTarget.value;s({type:"INPUT.CHANGE",value:dC(ae,te),index:R})}}))},getMonthSelectProps(){return t.select(y(g({},de.monthSelect.attrs),{id:Xh(o),"aria-label":J.monthSelect,disabled:p,dir:r("dir"),defaultValue:l.month,onChange(M){ne(Number(M.currentTarget.value))}}))},getYearSelectProps(){return t.select(y(g({},de.yearSelect.attrs),{id:Zh(o),disabled:p,"aria-label":J.yearSelect,dir:r("dir"),defaultValue:l.year,onChange(M){Ie(Number(M.currentTarget.value))}}))},getPositionerProps(){return t.element(y(g({id:jh(o)},de.positioner.attrs),{dir:r("dir"),style:$.floating}))},getPresetTriggerProps(M){let R=Array.isArray(M.value)?M.value:gh(M.value,S,P),F=R.filter(G=>G!=null).map(G=>G.toDate(P).toDateString());return t.button(y(g({},de.presetTrigger.attrs),{"aria-label":J.presetTrigger(F),type:"button",onClick(G){G.defaultPrevented||s({type:"PRESET.CLICK",value:R})}}))}}}function PC(e,t){if((e==null?void 0:e.length)!==(t==null?void 0:t.length))return!1;let n=Math.max(e.length,t.length);for(let i=0;in==null?"":t("format")(n,{locale:t("locale"),timeZone:t("timeZone")}))}function ve(e,t){let{context:n,prop:i,computed:r}=e;if(!t)return;let s=ra(e,t);if(nt(n.get("focusedValue"),s))return;let o=xr(r("visibleDuration"),i("locale"),i("min"),i("max"))({focusedDate:s,startDate:n.get("startValue")});n.set("startValue",o.startDate),n.set("focusedValue",o.focusedDate)}function ta(e,t){let{context:n}=e;n.set("startValue",t.startDate);let i=n.get("focusedValue");nt(i,t.focusedDate)||n.set("focusedValue",t.focusedDate)}function gt(e){return Array.isArray(e)?e.map(t=>gt(t)):e instanceof Date?new $i(e.getFullYear(),e.getMonth()+1,e.getDate()):yP(e)}function yh(e){let t=n=>String(n).padStart(2,"0");return`${e.year}-${t(e.month)}-${t(e.day)}`}var bh,GI,Mi,UI,XI,qo,ah,Wo,tP,oh,lh,Sr,fP,mP,vP,Ex,CP,$i,SP,TP,OP,Mh,zo,Ct,wP,Yo,jo,LP,_P,hh,WP,KP,Js,ZP,de,JP,QP,eC,rl,Xo,tC,nC,iC,Kh,zh,ph,Yh,jh,Xh,Zh,fh,mh,ia,Tr,rC,sC,aC,oC,Jh,cC,Qh,vh,dC,gC,yC,EC,ht,CC,ra,SC,Ix,TC,Px,OC,Cx,wC,Sx,VC,Tx,xC,Ox,AC,kC,tg=re(()=>{"use strict";Pr();Wn();tn();se();bh=1721426;GI={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]},Mi=class{fromJulianDay(e){let t=e,n=t-bh,i=Math.floor(n/146097),r=Uo(n,146097),s=Math.floor(r/36524),a=Uo(r,36524),o=Math.floor(a/1461),l=Uo(a,1461),c=Math.floor(l/365),u=i*400+s*100+o*4+c+(s!==4&&c!==4?1:0),[h,m]=_I(u),d=t-js(h,m,1,1),p=2;t= start date");return`${this.formatter.format(e)} \u2013 ${this.formatter.format(t)}`}formatRangeToParts(e,t){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(e,t);if(t= start date");let n=this.formatter.formatToParts(e),i=this.formatter.formatToParts(t);return[...n.map(r=>y(g({},r),{source:"startRange"})),{type:"literal",value:" \u2013 ",source:"shared"},...i.map(r=>y(g({},r),{source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return xP()&&(this.resolvedHourCycle||(this.resolvedHourCycle=AP(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),e.calendar==="ethiopic-amete-alem"&&(e.calendar="ethioaa"),e}constructor(e,t={}){this.formatter=Fh(e,t),this.options=t}},wP={true:{ja:"h11"},false:{}};Yo=null;jo=null;LP=["sun","mon","tue","wed","thu","fri","sat"];_P=10;hh=e=>e!=null&&e.length===4,WP=e=>e!=null&&parseFloat(e)<=12,KP=e=>e!=null&&parseFloat(e)<=31;Js="__live-region__";ZP=U("date-picker").parts("clearTrigger","content","control","input","label","monthSelect","nextTrigger","positioner","presetTrigger","prevTrigger","rangeText","root","table","tableBody","tableCell","tableCellTrigger","tableHead","tableHeader","tableRow","trigger","view","viewControl","viewTrigger","yearSelect"),de=ZP.build(),JP=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.label)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:label:${t}`},QP=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`datepicker:${e.id}`},eC=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.table)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:table:${t}`},rl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`datepicker:${e.id}:content`},Xo=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.cellTrigger)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:cell-trigger:${t}`},tC=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.prevTrigger)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:prev:${t}`},nC=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.nextTrigger)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:next:${t}`},iC=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.viewTrigger)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:view:${t}`},Kh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.clearTrigger)!=null?n:`datepicker:${e.id}:clear`},zh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`datepicker:${e.id}:control`},ph=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.input)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:input:${t}`},Yh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`datepicker:${e.id}:trigger`},jh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`datepicker:${e.id}:positioner`},Xh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.monthSelect)!=null?n:`datepicker:${e.id}:month-select`},Zh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.yearSelect)!=null?n:`datepicker:${e.id}:year-select`},fh=(e,t)=>vi(ia(e),`[data-part=table-cell-trigger][data-view=${t}][data-focus]:not([data-outside-range])`),mh=e=>e.getById(Yh(e)),ia=e=>e.getById(rl(e)),Tr=e=>Fe(Jh(e),"[data-part=input]"),rC=e=>e.getById(Zh(e)),sC=e=>e.getById(Xh(e)),aC=e=>e.getById(Kh(e)),oC=e=>e.getById(jh(e)),Jh=e=>e.getById(zh(e));cC={day:"dd",month:"mm",year:"yyyy"};Qh=(e,t)=>e?/\d/.test(e)||e===t||e.length!==1:!0,vh=e=>!Number.isNaN(e.day)&&!Number.isNaN(e.month)&&!Number.isNaN(e.year),dC=(e,t)=>e.split("").filter(n=>Qh(n,t)).join("");gC={dayCell(e){return e.unavailable?`Not available. ${e.formattedDate}`:e.selected?`Selected date. ${e.formattedDate}`:`Choose ${e.formattedDate}`},trigger(e){return e?"Close calendar":"Open calendar"},viewTrigger(e){return Ce(e,{year:"Switch to month view",month:"Switch to day view",day:"Switch to year view"})},presetTrigger(e){let[t="",n=""]=e;return`select ${t} to ${n}`},prevTrigger(e){return Ce(e,{year:"Switch to previous decade",month:"Switch to previous year",day:"Switch to previous month"})},nextTrigger(e){return Ce(e,{year:"Switch to next decade",month:"Switch to next year",day:"Switch to next month"})},placeholder(){return{day:"dd",month:"mm",year:"yyyy"}},content:"calendar",monthSelect:"Select month",yearSelect:"Select year",clearTrigger:"Clear selected dates"};yC=["day","month","year"];EC=Bn(e=>[e.view,e.startValue.toString(),e.endValue.toString(),e.locale],([e],t)=>{let{startValue:n,endValue:i,locale:r,timeZone:s,selectionMode:a}=t;if(e==="year"){let h=Li(n.year,{strict:!0}),m=h.at(0).toString(),d=h.at(-1).toString();return{start:m,end:d,formatted:`${m} - ${d}`}}if(e==="month"){let h=new Ct(r,{year:"numeric",timeZone:s}),m=h.format(n.toDate(s)),d=h.format(i.toDate(s)),p=a==="range"?`${m} - ${d}`:m;return{start:m,end:d,formatted:p}}let o=new Ct(r,{month:"long",year:"numeric",timeZone:s}),l=o.format(n.toDate(s)),c=o.format(i.toDate(s)),u=a==="range"?`${l} - ${c}`:l;return{start:l,end:c,formatted:u}});({and:ht}=Ee());CC={props({props:e}){let t=e.locale||"en-US",n=e.timeZone||"UTC",i=e.selectionMode||"single",r=e.numOfMonths||1,s=e.defaultValue?Qs(e.defaultValue).map(h=>Pt(h,e.min,e.max)):void 0,a=e.value?Qs(e.value).map(h=>Pt(h,e.min,e.max)):void 0,o=e.focusedValue||e.defaultFocusedValue||(a==null?void 0:a[0])||(s==null?void 0:s[0])||Di(n);o=Pt(o,e.min,e.max);let l="day",c="year",u=fl(e.view||l,l,c);return y(g({locale:t,numOfMonths:r,timeZone:n,selectionMode:i,defaultView:u,minView:l,maxView:c,outsideDaySelectable:!1,closeOnSelect:!0,format(h,{locale:m,timeZone:d}){return new Ct(m,{timeZone:d,day:"2-digit",month:"2-digit",year:"numeric"}).format(h.toDate(d))},parse(h,{locale:m,timeZone:d}){return zP(h,m,d)}},e),{focusedValue:typeof e.focusedValue=="undefined"?void 0:o,defaultFocusedValue:o,value:a,defaultValue:s!=null?s:[],positioning:g({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")||e("inline")?"open":"idle"},refs(){return{announcer:void 0}},context({prop:e,bindable:t,getContext:n}){return{focusedValue:t(()=>({defaultValue:e("defaultFocusedValue"),value:e("focusedValue"),isEqual:nt,hash:i=>i.toString(),sync:!0,onChange(i){var l;let r=n(),s=r.get("view"),a=r.get("value"),o=ea(a,e);(l=e("onFocusChange"))==null||l({value:a,valueAsString:o,view:s,focusedValue:i})}})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:PC,hash:i=>i.map(r=>{var s;return(s=r==null?void 0:r.toString())!=null?s:""}).join(","),onChange(i){var a;let r=n(),s=ea(i,e);(a=e("onValueChange"))==null||a({value:i,valueAsString:s,view:r.get("view")})}})),inputValue:t(()=>({defaultValue:""})),activeIndex:t(()=>({defaultValue:0,sync:!0})),hoveredValue:t(()=>({defaultValue:null,isEqual:nt})),view:t(()=>({defaultValue:e("defaultView"),value:e("view"),onChange(i){var r;(r=e("onViewChange"))==null||r({view:i})}})),startValue:t(()=>{let i=e("focusedValue")||e("defaultFocusedValue");return{defaultValue:ch(i,"start",{months:e("numOfMonths")},e("locale")),isEqual:nt,hash:r=>r.toString()}}),currentPlacement:t(()=>({defaultValue:void 0})),restoreFocus:t(()=>({defaultValue:!1}))}},computed:{isInteractive:({prop:e})=>!e("disabled")&&!e("readOnly"),visibleDuration:({prop:e})=>({months:e("numOfMonths")}),endValue:({context:e,computed:t})=>$h(e.get("startValue"),t("visibleDuration")),visibleRange:({context:e,computed:t})=>({start:e.get("startValue"),end:t("endValue")}),visibleRangeText:({context:e,prop:t,computed:n})=>EC({view:e.get("view"),startValue:e.get("startValue"),endValue:n("endValue"),locale:t("locale"),timeZone:t("timeZone"),selectionMode:t("selectionMode")}),isPrevVisibleRangeValid:({context:e,prop:t})=>!NP(e.get("startValue"),t("min"),t("max")),isNextVisibleRangeValid:({prop:e,computed:t})=>!RP(t("endValue"),e("min"),e("max")),valueAsString:({context:e,prop:t})=>ea(e.get("value"),t)},effects:["setupLiveRegion"],watch({track:e,prop:t,context:n,action:i,computed:r}){e([()=>t("locale")],()=>{i(["setStartValue","syncInputElement"])}),e([()=>n.hash("focusedValue")],()=>{i(["setStartValue","focusActiveCellIfNeeded","setHoveredValueIfKeyboard"])}),e([()=>n.hash("startValue")],()=>{i(["syncMonthSelectElement","syncYearSelectElement","invokeOnVisibleRangeChange"])}),e([()=>n.get("inputValue")],()=>{i(["syncInputValue"])}),e([()=>n.hash("value")],()=>{i(["syncInputElement"])}),e([()=>r("valueAsString").toString()],()=>{i(["announceValueText"])}),e([()=>n.get("view")],()=>{i(["focusActiveCell"])}),e([()=>t("open")],()=>{i(["toggleVisibility"])})},on:{"VALUE.SET":{actions:["setDateValue","setFocusedDate"]},"VIEW.SET":{actions:["setView"]},"FOCUS.SET":{actions:["setFocusedDate"]},"VALUE.CLEAR":{actions:["clearDateValue","clearFocusedDate","focusFirstInputElement"]},"INPUT.CHANGE":[{guard:"isInputValueEmpty",actions:["setInputValue","clearDateValue","clearFocusedDate"]},{actions:["setInputValue","focusParsedDate"]}],"INPUT.ENTER":{actions:["focusParsedDate","selectFocusedDate"]},"INPUT.FOCUS":{actions:["setActiveIndex"]},"INPUT.BLUR":[{guard:"shouldFixOnBlur",actions:["setActiveIndexToStart","selectParsedDate"]},{actions:["setActiveIndexToStart"]}],"PRESET.CLICK":[{guard:"isOpenControlled",actions:["setDateValue","setFocusedDate","invokeOnClose"]},{target:"focused",actions:["setDateValue","setFocusedDate","focusInputElement"]}],"GOTO.NEXT":[{guard:"isYearView",actions:["focusNextDecade","announceVisibleRange"]},{guard:"isMonthView",actions:["focusNextYear","announceVisibleRange"]},{actions:["focusNextPage"]}],"GOTO.PREV":[{guard:"isYearView",actions:["focusPreviousDecade","announceVisibleRange"]},{guard:"isMonthView",actions:["focusPreviousYear","announceVisibleRange"]},{actions:["focusPreviousPage"]}]},states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open",actions:["focusFirstSelectedDate","focusActiveCell"]},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}]}},focused:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open",actions:["focusFirstSelectedDate","focusActiveCell"]},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}]}},open:{tags:["open"],effects:["trackDismissableElement","trackPositioning"],exit:["clearHoveredDate","resetView"],on:{"CONTROLLED.CLOSE":[{guard:ht("shouldRestoreFocus","isInteractOutsideEvent"),target:"focused",actions:["focusTriggerElement"]},{guard:"shouldRestoreFocus",target:"focused",actions:["focusInputElement"]},{target:"idle"}],"CELL.CLICK":[{guard:"isAboveMinView",actions:["setFocusedValueForView","setPreviousView"]},{guard:ht("isRangePicker","hasSelectedRange"),actions:["setActiveIndexToStart","resetSelection","setActiveIndexToEnd"]},{guard:ht("isRangePicker","isSelectingEndDate","closeOnSelect","isOpenControlled"),actions:["setFocusedDate","setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose","setRestoreFocus"]},{guard:ht("isRangePicker","isSelectingEndDate","closeOnSelect"),target:"focused",actions:["setFocusedDate","setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose","focusInputElement"]},{guard:ht("isRangePicker","isSelectingEndDate"),actions:["setFocusedDate","setSelectedDate","setActiveIndexToStart","clearHoveredDate"]},{guard:"isRangePicker",actions:["setFocusedDate","setSelectedDate","setActiveIndexToEnd"]},{guard:"isMultiPicker",actions:["setFocusedDate","toggleSelectedDate"]},{guard:ht("closeOnSelect","isOpenControlled"),actions:["setFocusedDate","setSelectedDate","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["setFocusedDate","setSelectedDate","invokeOnClose","focusInputElement"]},{actions:["setFocusedDate","setSelectedDate"]}],"CELL.POINTER_MOVE":{guard:ht("isRangePicker","isSelectingEndDate"),actions:["setHoveredDate","setFocusedDate"]},"TABLE.POINTER_LEAVE":{guard:"isRangePicker",actions:["clearHoveredDate"]},"TABLE.POINTER_DOWN":{actions:["disableTextSelection"]},"TABLE.POINTER_UP":{actions:["enableTextSelection"]},"TABLE.ESCAPE":[{guard:"isOpenControlled",actions:["focusFirstSelectedDate","invokeOnClose"]},{target:"focused",actions:["focusFirstSelectedDate","invokeOnClose","focusTriggerElement"]}],"TABLE.ENTER":[{guard:"isAboveMinView",actions:["setPreviousView"]},{guard:ht("isRangePicker","hasSelectedRange"),actions:["setActiveIndexToStart","clearDateValue","setSelectedDate","setActiveIndexToEnd"]},{guard:ht("isRangePicker","isSelectingEndDate","closeOnSelect","isOpenControlled"),actions:["setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose"]},{guard:ht("isRangePicker","isSelectingEndDate","closeOnSelect"),target:"focused",actions:["setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose","focusInputElement"]},{guard:ht("isRangePicker","isSelectingEndDate"),actions:["setSelectedDate","setActiveIndexToStart","clearHoveredDate"]},{guard:"isRangePicker",actions:["setSelectedDate","setActiveIndexToEnd","focusNextDay"]},{guard:"isMultiPicker",actions:["toggleSelectedDate"]},{guard:ht("closeOnSelect","isOpenControlled"),actions:["selectFocusedDate","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectFocusedDate","invokeOnClose","focusInputElement"]},{actions:["selectFocusedDate"]}],"TABLE.ARROW_RIGHT":[{guard:"isMonthView",actions:["focusNextMonth"]},{guard:"isYearView",actions:["focusNextYear"]},{actions:["focusNextDay","setHoveredDate"]}],"TABLE.ARROW_LEFT":[{guard:"isMonthView",actions:["focusPreviousMonth"]},{guard:"isYearView",actions:["focusPreviousYear"]},{actions:["focusPreviousDay"]}],"TABLE.ARROW_UP":[{guard:"isMonthView",actions:["focusPreviousMonthColumn"]},{guard:"isYearView",actions:["focusPreviousYearColumn"]},{actions:["focusPreviousWeek"]}],"TABLE.ARROW_DOWN":[{guard:"isMonthView",actions:["focusNextMonthColumn"]},{guard:"isYearView",actions:["focusNextYearColumn"]},{actions:["focusNextWeek"]}],"TABLE.PAGE_UP":{actions:["focusPreviousSection"]},"TABLE.PAGE_DOWN":{actions:["focusNextSection"]},"TABLE.HOME":[{guard:"isMonthView",actions:["focusFirstMonth"]},{guard:"isYearView",actions:["focusFirstYear"]},{actions:["focusSectionStart"]}],"TABLE.END":[{guard:"isMonthView",actions:["focusLastMonth"]},{guard:"isYearView",actions:["focusLastYear"]},{actions:["focusSectionEnd"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"VIEW.TOGGLE":{actions:["setNextView"]},INTERACT_OUTSIDE:[{guard:"isOpenControlled",actions:["setActiveIndexToStart","invokeOnClose"]},{guard:"shouldRestoreFocus",target:"focused",actions:["setActiveIndexToStart","invokeOnClose","focusTriggerElement"]},{target:"idle",actions:["setActiveIndexToStart","invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["setActiveIndexToStart","invokeOnClose"]},{target:"idle",actions:["setActiveIndexToStart","invokeOnClose"]}]}}},implementations:{guards:{isAboveMinView:({context:e,prop:t})=>pC(e.get("view"),t("minView")),isDayView:({context:e,event:t})=>(t.view||e.get("view"))==="day",isMonthView:({context:e,event:t})=>(t.view||e.get("view"))==="month",isYearView:({context:e,event:t})=>(t.view||e.get("view"))==="year",isRangePicker:({prop:e})=>e("selectionMode")==="range",hasSelectedRange:({context:e})=>e.get("value").length===2,isMultiPicker:({prop:e})=>e("selectionMode")==="multiple",shouldRestoreFocus:({context:e})=>!!e.get("restoreFocus"),isSelectingEndDate:({context:e})=>e.get("activeIndex")===1,closeOnSelect:({prop:e})=>!!e("closeOnSelect"),isOpenControlled:({prop:e})=>e("open")!=null||!!e("inline"),isInteractOutsideEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="INTERACT_OUTSIDE"},isInputValueEmpty:({event:e})=>e.value.trim()==="",shouldFixOnBlur:({event:e})=>!!e.fixOnBlur},effects:{trackPositioning({context:e,prop:t,scope:n}){if(t("inline"))return;e.get("currentPlacement")||e.set("currentPlacement",t("positioning").placement);let i=Jh(n);return It(i,()=>oC(n),y(g({},t("positioning")),{defer:!0,onComplete(s){e.set("currentPlacement",s.placement)}}))},setupLiveRegion({scope:e,refs:t}){let n=e.getDoc();return t.set("announcer",XP({level:"assertive",document:n})),()=>{var i,r;return(r=(i=t.get("announcer"))==null?void 0:i.destroy)==null?void 0:r.call(i)}},trackDismissableElement({scope:e,send:t,context:n,prop:i}){return i("inline")?void 0:Ft(()=>ia(e),{type:"popover",defer:!0,exclude:[...Tr(e),mh(e),aC(e)],onInteractOutside(s){n.set("restoreFocus",!s.detail.focusable)},onDismiss(){t({type:"INTERACT_OUTSIDE"})},onEscapeKeyDown(s){s.preventDefault(),t({type:"TABLE.ESCAPE",src:"dismissable"})}})}},actions:{setNextView({context:e,prop:t}){let n=mC(e.get("view"),t("minView"),t("maxView"));e.set("view",n)},setPreviousView({context:e,prop:t}){let n=vC(e.get("view"),t("minView"),t("maxView"));e.set("view",n)},setView({context:e,event:t}){e.set("view",t.view)},setRestoreFocus({context:e}){e.set("restoreFocus",!0)},announceValueText({context:e,prop:t,refs:n}){var o;let i=e.get("value"),r=t("locale"),s=t("timeZone"),a;if(t("selectionMode")==="range"){let[l,c]=i;l&&c?a=Zs(l,c,r,s):l?a=Zs(l,null,r,s):c?a=Zs(c,null,r,s):a=""}else a=i.map(l=>Zs(l,null,r,s)).filter(Boolean).join(",");(o=n.get("announcer"))==null||o.announce(a,3e3)},announceVisibleRange({computed:e,refs:t}){var i;let{formatted:n}=e("visibleRangeText");(i=t.get("announcer"))==null||i.announce(n)},disableTextSelection({scope:e}){io({target:ia(e),doc:e.getDoc()})},enableTextSelection({scope:e}){no({doc:e.getDoc(),target:ia(e)})},focusFirstSelectedDate(e){let{context:t}=e;t.get("value").length&&ve(e,t.get("value")[0])},syncInputElement({scope:e,computed:t}){H(()=>{Tr(e).forEach((i,r)=>{Me(i,t("valueAsString")[r]||"")})})},setFocusedDate(e){let{event:t}=e,n=Array.isArray(t.value)?t.value[0]:t.value;ve(e,n)},setFocusedValueForView(e){let{context:t,event:n}=e;ve(e,t.get("focusedValue").set({[t.get("view")]:n.value}))},focusNextMonth(e){let{context:t}=e;ve(e,t.get("focusedValue").add({months:1}))},focusPreviousMonth(e){let{context:t}=e;ve(e,t.get("focusedValue").subtract({months:1}))},setDateValue({context:e,event:t,prop:n}){if(!Array.isArray(t.value))return;let i=t.value.map(r=>Pt(r,n("min"),n("max")));e.set("value",i)},clearDateValue({context:e}){e.set("value",[])},setSelectedDate(e){var r;let{context:t,event:n}=e,i=Array.from(t.get("value"));i[t.get("activeIndex")]=ra(e,(r=n.value)!=null?r:t.get("focusedValue")),t.set("value",sl(i))},resetSelection(e){var r;let{context:t,event:n}=e,i=ra(e,(r=n.value)!=null?r:t.get("focusedValue"));t.set("value",[i])},toggleSelectedDate(e){var s;let{context:t,event:n}=e,i=ra(e,(s=n.value)!=null?s:t.get("focusedValue")),r=t.get("value").findIndex(a=>nt(a,i));if(r===-1){let a=[...t.get("value"),i];t.set("value",Qs(a))}else{let a=Array.from(t.get("value"));a.splice(r,1),t.set("value",Qs(a))}},setHoveredDate({context:e,event:t}){e.set("hoveredValue",t.value)},clearHoveredDate({context:e}){e.set("hoveredValue",null)},selectFocusedDate({context:e,computed:t}){let n=Array.from(e.get("value")),i=e.get("activeIndex");n[i]=e.get("focusedValue").copy(),e.set("value",sl(n));let r=t("valueAsString");e.set("inputValue",r[i])},focusPreviousDay(e){let{context:t}=e,n=t.get("focusedValue").subtract({days:1});ve(e,n)},focusNextDay(e){let{context:t}=e,n=t.get("focusedValue").add({days:1});ve(e,n)},focusPreviousWeek(e){let{context:t}=e,n=t.get("focusedValue").subtract({weeks:1});ve(e,n)},focusNextWeek(e){let{context:t}=e,n=t.get("focusedValue").add({weeks:1});ve(e,n)},focusNextPage(e){let{context:t,computed:n,prop:i}=e,r=qh(t.get("focusedValue"),t.get("startValue"),n("visibleDuration"),i("locale"),i("min"),i("max"));ta(e,r)},focusPreviousPage(e){let{context:t,computed:n,prop:i}=e,r=Wh(t.get("focusedValue"),t.get("startValue"),n("visibleDuration"),i("locale"),i("min"),i("max"));ta(e,r)},focusSectionStart(e){let{context:t}=e;ve(e,t.get("startValue").copy())},focusSectionEnd(e){let{computed:t}=e;ve(e,t("endValue").copy())},focusNextSection(e){let{context:t,event:n,computed:i,prop:r}=e,s=UP(t.get("focusedValue"),t.get("startValue"),n.larger,i("visibleDuration"),r("locale"),r("min"),r("max"));s&&ta(e,s)},focusPreviousSection(e){let{context:t,event:n,computed:i,prop:r}=e,s=qP(t.get("focusedValue"),t.get("startValue"),n.larger,i("visibleDuration"),r("locale"),r("min"),r("max"));s&&ta(e,s)},focusNextYear(e){let{context:t}=e,n=t.get("focusedValue").add({years:1});ve(e,n)},focusPreviousYear(e){let{context:t}=e,n=t.get("focusedValue").subtract({years:1});ve(e,n)},focusNextDecade(e){let{context:t}=e,n=t.get("focusedValue").add({years:10});ve(e,n)},focusPreviousDecade(e){let{context:t}=e,n=t.get("focusedValue").subtract({years:10});ve(e,n)},clearFocusedDate(e){let{prop:t}=e;ve(e,Di(t("timeZone")))},focusPreviousMonthColumn(e){let{context:t,event:n}=e,i=t.get("focusedValue").subtract({months:n.columns});ve(e,i)},focusNextMonthColumn(e){let{context:t,event:n}=e,i=t.get("focusedValue").add({months:n.columns});ve(e,i)},focusPreviousYearColumn(e){let{context:t,event:n}=e,i=t.get("focusedValue").subtract({years:n.columns});ve(e,i)},focusNextYearColumn(e){let{context:t,event:n}=e,i=t.get("focusedValue").add({years:n.columns});ve(e,i)},focusFirstMonth(e){let{context:t}=e,n=t.get("focusedValue").set({month:1});ve(e,n)},focusLastMonth(e){let{context:t}=e,n=t.get("focusedValue").set({month:12});ve(e,n)},focusFirstYear(e){let{context:t}=e,n=Li(t.get("focusedValue").year),i=t.get("focusedValue").set({year:n[0]});ve(e,i)},focusLastYear(e){let{context:t}=e,n=Li(t.get("focusedValue").year),i=t.get("focusedValue").set({year:n[n.length-1]});ve(e,i)},setActiveIndex({context:e,event:t}){e.set("activeIndex",t.index)},setActiveIndexToEnd({context:e}){e.set("activeIndex",1)},setActiveIndexToStart({context:e}){e.set("activeIndex",0)},focusActiveCell({scope:e,context:t}){H(()=>{var i;let n=t.get("view");(i=fh(e,n))==null||i.focus({preventScroll:!0})})},focusActiveCellIfNeeded({scope:e,context:t,event:n}){n.focus&&H(()=>{var r;let i=t.get("view");(r=fh(e,i))==null||r.focus({preventScroll:!0})})},setHoveredValueIfKeyboard({context:e,event:t,prop:n}){!t.type.startsWith("TABLE.ARROW")||n("selectionMode")!=="range"||e.get("activeIndex")===0||e.set("hoveredValue",e.get("focusedValue").copy())},focusTriggerElement({scope:e}){H(()=>{var t;(t=mh(e))==null||t.focus({preventScroll:!0})})},focusFirstInputElement({scope:e}){H(()=>{let[t]=Tr(e);t==null||t.focus({preventScroll:!0})})},focusInputElement({scope:e}){H(()=>{let t=Tr(e),n=t.findLastIndex(s=>s.value!==""),i=Math.max(n,0),r=t[i];r==null||r.focus({preventScroll:!0}),r==null||r.setSelectionRange(r.value.length,r.value.length)})},syncMonthSelectElement({scope:e,context:t}){let n=sC(e);Me(n,t.get("startValue").month.toString())},syncYearSelectElement({scope:e,context:t}){let n=rC(e);Me(n,t.get("startValue").year.toString())},setInputValue({context:e,event:t}){e.get("activeIndex")===t.index&&e.set("inputValue",t.value)},syncInputValue({scope:e,context:t,event:n}){queueMicrotask(()=>{var s;let i=Tr(e),r=(s=n.index)!=null?s:t.get("activeIndex");Me(i[r],t.get("inputValue"))})},focusParsedDate(e){let{event:t,prop:n}=e;if(t.index==null)return;let r=n("parse")(t.value,{locale:n("locale"),timeZone:n("timeZone")});!r||!vh(r)||ve(e,r)},selectParsedDate({context:e,event:t,prop:n}){if(t.index==null)return;let r=n("parse")(t.value,{locale:n("locale"),timeZone:n("timeZone")});if((!r||!vh(r))&&t.value&&(r=e.get("focusedValue").copy()),!r)return;r=Pt(r,n("min"),n("max"));let s=Array.from(e.get("value"));s[t.index]=r,e.set("value",s);let a=ea(s,n);e.set("inputValue",a[t.index])},resetView({context:e}){e.set("view",e.initial("view"))},setStartValue({context:e,computed:t,prop:n}){let i=e.get("focusedValue");if(!$t(i,e.get("startValue"),t("endValue")))return;let s=ch(i,"start",{months:n("numOfMonths")},n("locale"));e.set("startValue",s)},invokeOnOpen({prop:e,context:t}){var n;e("inline")||(n=e("onOpenChange"))==null||n({open:!0,value:t.get("value")})},invokeOnClose({prop:e,context:t}){var n;e("inline")||(n=e("onOpenChange"))==null||n({open:!1,value:t.get("value")})},invokeOnVisibleRangeChange({prop:e,context:t,computed:n}){var i;(i=e("onVisibleRangeChange"))==null||i({view:t.get("view"),visibleRange:n("visibleRange")})},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}},ra=(e,t)=>{let{context:n,prop:i}=e,r=n.get("view"),s=typeof t=="number"?n.get("focusedValue").set({[r]:t}):t;return bC(a=>{fC(a,i("minView"))&&(s=s.set({[a]:a==="day"?1:0}))}),s};SC=_()(["closeOnSelect","dir","disabled","fixedWeeks","focusedValue","format","parse","placeholder","getRootNode","id","ids","inline","invalid","isDateUnavailable","locale","max","min","name","numOfMonths","onFocusChange","onOpenChange","onValueChange","onViewChange","onVisibleRangeChange","open","defaultOpen","positioning","readOnly","required","selectionMode","startOfWeek","timeZone","translations","value","defaultView","defaultValue","view","defaultFocusedValue","outsideDaySelectable","minView","maxView"]),Ix=B(SC),TC=_()(["index","fixOnBlur"]),Px=B(TC),OC=_()(["value"]),Cx=B(OC),wC=_()(["columns","id","view"]),Sx=B(wC),VC=_()(["disabled","value","columns"]),Tx=B(VC),xC=_()(["view"]),Ox=B(xC),AC=class extends K{constructor(){super(...arguments);Y(this,"getDayView",()=>this.el.querySelector('[data-part="day-view"]'));Y(this,"getMonthView",()=>this.el.querySelector('[data-part="month-view"]'));Y(this,"getYearView",()=>this.el.querySelector('[data-part="year-view"]'));Y(this,"renderDayTableHeader",()=>{let t=this.getDayView(),n=t==null?void 0:t.querySelector("thead");if(!n||!this.api.weekDays)return;let i=this.doc.createElement("tr");this.spreadProps(i,this.api.getTableRowProps({view:"day"})),this.api.weekDays.forEach(r=>{let s=this.doc.createElement("th");s.scope="col",s.setAttribute("aria-label",r.long),s.textContent=r.narrow,i.appendChild(s)}),n.innerHTML="",n.appendChild(i)});Y(this,"renderDayTableBody",()=>{let t=this.getDayView(),n=t==null?void 0:t.querySelector("tbody");n&&(this.spreadProps(n,this.api.getTableBodyProps({view:"day"})),this.api.weeks&&(n.innerHTML="",this.api.weeks.forEach(i=>{let r=this.doc.createElement("tr");this.spreadProps(r,this.api.getTableRowProps({view:"day"})),i.forEach(s=>{let a=this.doc.createElement("td");this.spreadProps(a,this.api.getDayTableCellProps({value:s}));let o=this.doc.createElement("div");this.spreadProps(o,this.api.getDayTableCellTriggerProps({value:s})),o.textContent=String(s.day),a.appendChild(o),r.appendChild(a)}),n.appendChild(r)})))});Y(this,"renderMonthTableBody",()=>{let t=this.getMonthView(),n=t==null?void 0:t.querySelector("tbody");if(!n)return;this.spreadProps(n,this.api.getTableBodyProps({view:"month"}));let i=this.api.getMonthsGrid({columns:4,format:"short"});n.innerHTML="",i.forEach(r=>{let s=this.doc.createElement("tr");this.spreadProps(s,this.api.getTableRowProps()),r.forEach(a=>{let o=this.doc.createElement("td");this.spreadProps(o,this.api.getMonthTableCellProps(y(g({},a),{columns:4})));let l=this.doc.createElement("div");this.spreadProps(l,this.api.getMonthTableCellTriggerProps(y(g({},a),{columns:4}))),l.textContent=a.label,o.appendChild(l),s.appendChild(o)}),n.appendChild(s)})});Y(this,"renderYearTableBody",()=>{let t=this.getYearView(),n=t==null?void 0:t.querySelector("tbody");if(!n)return;this.spreadProps(n,this.api.getTableBodyProps());let i=this.api.getYearsGrid({columns:4});n.innerHTML="",i.forEach(r=>{let s=this.doc.createElement("tr");this.spreadProps(s,this.api.getTableRowProps({view:"year"})),r.forEach(a=>{let o=this.doc.createElement("td");this.spreadProps(o,this.api.getYearTableCellProps(y(g({},a),{columns:4})));let l=this.doc.createElement("div");this.spreadProps(l,this.api.getYearTableCellTriggerProps(y(g({},a),{columns:4}))),l.textContent=a.label,o.appendChild(l),s.appendChild(o)}),n.appendChild(s)})})}initMachine(t){return new W(CC,t)}initApi(){return IC(this.machine.service,q)}render(){let t=this.el.querySelector('[data-scope="date-picker"][data-part="root"]');t&&this.spreadProps(t,this.api.getRootProps());let n=this.el.querySelector('[data-scope="date-picker"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps());let i=this.el.querySelector('[data-scope="date-picker"][data-part="control"]');i&&this.spreadProps(i,this.api.getControlProps());let r=this.el.querySelector('[data-scope="date-picker"][data-part="input"]');r&&this.spreadProps(r,this.api.getInputProps());let s=this.el.querySelector('[data-scope="date-picker"][data-part="trigger"]');s&&this.spreadProps(s,this.api.getTriggerProps());let a=this.el.querySelector('[data-scope="date-picker"][data-part="positioner"]');a&&this.spreadProps(a,this.api.getPositionerProps());let o=this.el.querySelector('[data-scope="date-picker"][data-part="content"]');if(o&&this.spreadProps(o,this.api.getContentProps()),this.api.open){let l=this.getDayView(),c=this.getMonthView(),u=this.getYearView();if(l&&(l.hidden=this.api.view!=="day"),c&&(c.hidden=this.api.view!=="month"),u&&(u.hidden=this.api.view!=="year"),this.api.view==="day"&&l){let h=l.querySelector('[data-part="view-control"]');h&&this.spreadProps(h,this.api.getViewControlProps({view:"year"}));let m=l.querySelector('[data-part="prev-trigger"]');m&&this.spreadProps(m,this.api.getPrevTriggerProps());let d=l.querySelector('[data-part="view-trigger"]');d&&(this.spreadProps(d,this.api.getViewTriggerProps()),d.textContent=this.api.visibleRangeText.start);let p=l.querySelector('[data-part="next-trigger"]');p&&this.spreadProps(p,this.api.getNextTriggerProps());let v=l.querySelector("table");v&&this.spreadProps(v,this.api.getTableProps({view:"day"}));let I=l.querySelector("thead");I&&this.spreadProps(I,this.api.getTableHeaderProps({view:"day"})),this.renderDayTableHeader(),this.renderDayTableBody()}else if(this.api.view==="month"&&c){let h=c.querySelector('[data-part="view-control"]');h&&this.spreadProps(h,this.api.getViewControlProps({view:"month"}));let m=c.querySelector('[data-part="prev-trigger"]');m&&this.spreadProps(m,this.api.getPrevTriggerProps({view:"month"}));let d=c.querySelector('[data-part="view-trigger"]');d&&(this.spreadProps(d,this.api.getViewTriggerProps({view:"month"})),d.textContent=String(this.api.visibleRange.start.year));let p=c.querySelector('[data-part="next-trigger"]');p&&this.spreadProps(p,this.api.getNextTriggerProps({view:"month"}));let v=c.querySelector("table");v&&this.spreadProps(v,this.api.getTableProps({view:"month",columns:4})),this.renderMonthTableBody()}else if(this.api.view==="year"&&u){let h=u.querySelector('[data-part="view-control"]');h&&this.spreadProps(h,this.api.getViewControlProps({view:"year"}));let m=u.querySelector('[data-part="prev-trigger"]');m&&this.spreadProps(m,this.api.getPrevTriggerProps({view:"year"}));let d=u.querySelector('[data-part="decade"]');if(d){let I=this.api.getDecade();d.textContent=`${I.start} - ${I.end}`}let p=u.querySelector('[data-part="next-trigger"]');p&&this.spreadProps(p,this.api.getNextTriggerProps({view:"year"}));let v=u.querySelector("table");v&&this.spreadProps(v,this.api.getTableProps({view:"year",columns:4})),this.renderYearTableBody()}}}};kC={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=this.liveSocket,i=w(e,"min"),r=w(e,"max"),s=w(e,"positioning"),a=u=>u?u.map(h=>gt(h)):void 0,o=u=>u?gt(u):void 0,l=new AC(e,y(g({id:e.id},C(e,"controlled")?{value:a(Z(e,"value"))}:{defaultValue:a(Z(e,"defaultValue"))}),{defaultFocusedValue:o(w(e,"focusedValue")),defaultView:w(e,"defaultView",["day","month","year"]),dir:w(e,"dir",["ltr","rtl"]),locale:w(e,"locale"),timeZone:w(e,"timeZone"),disabled:C(e,"disabled"),readOnly:C(e,"readOnly"),required:C(e,"required"),invalid:C(e,"invalid"),outsideDaySelectable:C(e,"outsideDaySelectable"),closeOnSelect:C(e,"closeOnSelect"),min:i?gt(i):void 0,max:r?gt(r):void 0,numOfMonths:z(e,"numOfMonths"),startOfWeek:z(e,"startOfWeek"),fixedWeeks:C(e,"fixedWeeks"),selectionMode:w(e,"selectionMode",["single","multiple","range"]),placeholder:w(e,"placeholder"),minView:w(e,"minView",["day","month","year"]),maxView:w(e,"maxView",["day","month","year"]),inline:C(e,"inline"),positioning:s?JSON.parse(s):void 0,onValueChange:u=>{var p;let h=(p=u.value)!=null&&p.length?u.value.map(v=>yh(v)).join(","):"",m=e.querySelector(`#${e.id}-value`);m&&m.value!==h&&(m.value=h,m.dispatchEvent(new Event("input",{bubbles:!0})),m.dispatchEvent(new Event("change",{bubbles:!0})));let d=w(e,"onValueChange");d&&n.main.isConnected()&&t(d,{id:e.id,value:h||null})},onFocusChange:u=>{var m;let h=w(e,"onFocusChange");h&&n.main.isConnected()&&t(h,{id:e.id,focused:(m=u.focused)!=null?m:!1})},onViewChange:u=>{let h=w(e,"onViewChange");h&&n.main.isConnected()&&t(h,{id:e.id,view:u.view})},onVisibleRangeChange:u=>{let h=w(e,"onVisibleRangeChange");h&&n.main.isConnected()&&t(h,{id:e.id,start:u.start,end:u.end})},onOpenChange:u=>{let h=w(e,"onOpenChange");h&&n.main.isConnected()&&t(h,{id:e.id,open:u.open})}}));l.init(),this.datePicker=l;let c=e.querySelector('[data-scope="date-picker"][data-part="input-wrapper"]');c&&c.removeAttribute("data-loading"),this.handlers=[],this.handlers.push(this.handleEvent("date_picker_set_value",u=>{let h=u.date_picker_id;h&&h!==e.id||l.api.setValue([gt(u.value)])})),this.onSetValue=u=>{var m;let h=(m=u.detail)==null?void 0:m.value;typeof h=="string"&&l.api.setValue([gt(h)])},e.addEventListener("phx:date-picker:set-value",this.onSetValue)},updated(){var l,c;let e=this.el,t=e.querySelector('[data-scope="date-picker"][data-part="input-wrapper"]');t&&t.removeAttribute("data-loading");let n=u=>u?u.map(h=>gt(h)):void 0,i=w(e,"min"),r=w(e,"max"),s=w(e,"positioning"),a=C(e,"controlled"),o=w(e,"focusedValue");if((l=this.datePicker)==null||l.updateProps(y(g({},C(e,"controlled")?{value:n(Z(e,"value"))}:{defaultValue:n(Z(e,"defaultValue"))}),{defaultFocusedValue:o?gt(o):void 0,defaultView:w(e,"defaultView",["day","month","year"]),dir:w(this.el,"dir",["ltr","rtl"]),locale:w(this.el,"locale"),timeZone:w(this.el,"timeZone"),disabled:C(this.el,"disabled"),readOnly:C(this.el,"readOnly"),required:C(this.el,"required"),invalid:C(this.el,"invalid"),outsideDaySelectable:C(this.el,"outsideDaySelectable"),closeOnSelect:C(this.el,"closeOnSelect"),min:i?gt(i):void 0,max:r?gt(r):void 0,numOfMonths:z(this.el,"numOfMonths"),startOfWeek:z(this.el,"startOfWeek"),fixedWeeks:C(this.el,"fixedWeeks"),selectionMode:w(this.el,"selectionMode",["single","multiple","range"]),placeholder:w(this.el,"placeholder"),minView:w(this.el,"minView",["day","month","year"]),maxView:w(this.el,"maxView",["day","month","year"]),inline:C(this.el,"inline"),positioning:s?JSON.parse(s):void 0})),a&&this.datePicker){let u=Z(e,"value"),h=(c=u==null?void 0:u.join(","))!=null?c:"",m=this.datePicker.api.value,d=m!=null&&m.length?m.map(p=>yh(p)).join(","):"";if(h!==d){let p=u!=null&&u.length?u.map(v=>gt(v)):[];this.datePicker.api.setValue(p)}}},destroyed(){var e;if(this.onSetValue&&this.el.removeEventListener("phx:date-picker:set-value",this.onSetValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.datePicker)==null||e.destroy()}}});var ug={};he(ug,{Dialog:()=>lS});function HC(e,t={}){let{defer:n=!0}=t,i=n?$C:s=>s(),r=[];return r.push(i(()=>{let a=(typeof e=="function"?e():e).filter(Boolean);a.length!==0&&r.push(FC(a))})),()=>{r.forEach(s=>s==null?void 0:s())}}function YC(e,t={}){let n,i=H(()=>{let s=(Array.isArray(e)?e:[e]).map(o=>typeof o=="function"?o():o).filter(o=>o!=null);if(s.length===0)return;let a=s[0];n=new UC(s,y(g({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:a},t),{document:Le(a)}));try{n.activate()}catch(o){}});return function(){n==null||n.deactivate(),i()}}function jC(e){let t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function rg(e){let t=at(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function XC(e){var d;let t=e!=null?e:document,n=(d=t.defaultView)!=null?d:window,{documentElement:i,body:r}=t;if(r.hasAttribute(yl))return;let a=rg(i)||rg(r),o=n.innerWidth-i.clientWidth;r.setAttribute(yl,"");let l=()=>$c(i,"--scrollbar-width",`${o}px`),c=jC(i),u=()=>{let p={overflow:"hidden"};return!a&&o>0&&(p[c]=`${o}px`),Hn(r,p)},h=()=>{var S,P;let{scrollX:p,scrollY:v,visualViewport:I}=n,T=(S=I==null?void 0:I.offsetLeft)!=null?S:0,O=(P=I==null?void 0:I.offsetTop)!=null?P:0,b={position:"fixed",overflow:"hidden",top:`${-(v-Math.floor(O))}px`,left:`${-(p-Math.floor(T))}px`,right:"0"};!a&&o>0&&(b[c]=`${o}px`);let f=Hn(r,b);return()=>{f==null||f(),n.scrollTo({left:p,top:v,behavior:"instant"})}},m=[l(),ir()?h():u()];return()=>{m.forEach(p=>p==null?void 0:p()),r.removeAttribute(yl)}}function rS(e,t){let{state:n,send:i,context:r,prop:s,scope:a}=e,o=s("aria-label"),l=n.matches("open");return{open:l,setOpen(c){n.matches("open")!==c&&i({type:c?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(y(g({},Qn.trigger.attrs),{dir:s("dir"),id:lg(a),"aria-haspopup":"dialog",type:"button","aria-expanded":l,"data-state":l?"open":"closed","aria-controls":bl(a),onClick(c){c.defaultPrevented||i({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(y(g({},Qn.backdrop.attrs),{dir:s("dir"),hidden:!l,id:og(a),"data-state":l?"open":"closed"}))},getPositionerProps(){return t.element(y(g({},Qn.positioner.attrs),{dir:s("dir"),id:ag(a),style:{pointerEvents:l?void 0:"none"}}))},getContentProps(){let c=r.get("rendered");return t.element(y(g({},Qn.content.attrs),{dir:s("dir"),role:s("role"),hidden:!l,id:bl(a),tabIndex:-1,"data-state":l?"open":"closed","aria-modal":!0,"aria-label":o||void 0,"aria-labelledby":o||!c.title?void 0:El(a),"aria-describedby":c.description?Il(a):void 0}))},getTitleProps(){return t.element(y(g({},Qn.title.attrs),{dir:s("dir"),id:El(a)}))},getDescriptionProps(){return t.element(y(g({},Qn.description.attrs),{dir:s("dir"),id:Il(a)}))},getCloseTriggerProps(){return t.button(y(g({},Qn.closeTrigger.attrs),{dir:s("dir"),id:cg(a),type:"button",onClick(c){c.defaultPrevented||(c.stopPropagation(),i({type:"CLOSE"}))}}))}}}var Hi,ca,ua,ml,sg,NC,RC,DC,LC,MC,FC,$C,BC,_C,be,ng,GC,UC,Pl,vl,qC,WC,Ar,KC,ig,zC,yl,ZC,Qn,ag,og,bl,lg,El,Il,cg,da,JC,QC,eS,tS,nS,iS,sS,aS,Dx,oS,lS,dg=re(()=>{"use strict";Wn();tn();se();Hi=new WeakMap,ca=new WeakMap,ua={},ml=0,sg=e=>e&&(e.host||sg(e.parentNode)),NC=(e,t)=>t.map(n=>{if(e.contains(n))return n;let i=sg(n);return i&&e.contains(i)?i:(console.error("[zag-js > ariaHidden] target",n,"in not contained inside",e,". Doing nothing"),null)}).filter(n=>!!n),RC=new Set(["script","output","status","next-route-announcer"]),DC=e=>RC.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),LC=(e,t)=>{let{parentNode:n,markerName:i,controlAttribute:r,followControlledElements:s=!0}=t,a=NC(n,Array.isArray(e)?e:[e]);ua[i]||(ua[i]=new WeakMap);let o=ua[i],l=[],c=new Set,u=new Set(a),h=d=>{!d||c.has(d)||(c.add(d),h(d.parentNode))};a.forEach(d=>{h(d),s&&le(d)&&Xa(d,p=>{h(p)})});let m=d=>{!d||u.has(d)||Array.prototype.forEach.call(d.children,p=>{if(c.has(p))m(p);else try{if(DC(p))return;let I=p.getAttribute(r)==="true",T=(Hi.get(p)||0)+1,O=(o.get(p)||0)+1;Hi.set(p,T),o.set(p,O),l.push(p),T===1&&I&&ca.set(p,!0),O===1&&p.setAttribute(i,""),I||p.setAttribute(r,"true")}catch(v){console.error("[zag-js > ariaHidden] cannot operate on ",p,v)}})};return m(n),c.clear(),ml++,()=>{l.forEach(d=>{let p=Hi.get(d)-1,v=o.get(d)-1;Hi.set(d,p),o.set(d,v),p||(ca.has(d)||d.removeAttribute(r),ca.delete(d)),v||d.removeAttribute(i)}),ml--,ml||(Hi=new WeakMap,Hi=new WeakMap,ca=new WeakMap,ua={})}},MC=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,FC=(e,t=MC(e),n="data-aria-hidden",i=!0)=>{if(t)return LC(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:i})},$C=e=>{let t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};BC=Object.defineProperty,_C=(e,t,n)=>t in e?BC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,be=(e,t,n)=>_C(e,typeof t!="symbol"?t+"":t,n),ng={activateTrap(e,t){if(e.length>0){let i=e[e.length-1];i!==t&&i.pause()}let n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},GC=[],UC=class{constructor(e,t){be(this,"trapStack"),be(this,"config"),be(this,"doc"),be(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),be(this,"portalContainers",new Set),be(this,"listenerCleanups",[]),be(this,"handleFocus",i=>{let r=j(i),s=this.findContainerIndex(r,i)>=0;if(s||nr(r))s&&(this.state.mostRecentlyFocusedNode=r);else{i.stopImmediatePropagation();let a,o=!0;if(this.state.mostRecentlyFocusedNode)if(fi(this.state.mostRecentlyFocusedNode)>0){let l=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:c}=this.state.containerGroups[l];if(c.length>0){let u=c.findIndex(h=>h===this.state.mostRecentlyFocusedNode);u>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?u+1=0&&(a=c[u-1],o=!1))}}else this.state.containerGroups.some(l=>l.tabbableNodes.some(c=>fi(c)>0))||(o=!1);else o=!1;o&&(a=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),a?this.tryFocus(a):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),be(this,"handlePointerDown",i=>{let r=j(i);if(!(this.findContainerIndex(r,i)>=0)){if(Ar(this.config.clickOutsideDeactivates,i)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Ar(this.config.allowOutsideClick,i)||i.preventDefault()}}),be(this,"handleClick",i=>{let r=j(i);this.findContainerIndex(r,i)>=0||Ar(this.config.clickOutsideDeactivates,i)||Ar(this.config.allowOutsideClick,i)||(i.preventDefault(),i.stopImmediatePropagation())}),be(this,"handleTabKey",i=>{if(this.config.isKeyForward(i)||this.config.isKeyBackward(i)){this.state.recentNavEvent=i;let r=this.config.isKeyBackward(i),s=this.findNextNavNode({event:i,isBackward:r});if(!s)return;vl(i)&&i.preventDefault(),this.tryFocus(s)}}),be(this,"handleEscapeKey",i=>{KC(i)&&Ar(this.config.escapeDeactivates,i)!==!1&&(i.preventDefault(),this.deactivate())}),be(this,"_mutationObserver"),be(this,"setupMutationObserver",()=>{let i=this.doc.defaultView||window;this._mutationObserver=new i.MutationObserver(r=>{r.some(o=>Array.from(o.removedNodes).some(c=>c===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),r.some(o=>o.type==="attributes"&&(o.attributeName==="aria-controls"||o.attributeName==="aria-expanded")?!0:o.type==="childList"&&o.addedNodes.length>0?Array.from(o.addedNodes).some(l=>{if(l.nodeType!==Node.ELEMENT_NODE)return!1;let c=l;return Pc(c)?!0:c.id&&!this.state.containers.some(u=>u.contains(c))?Cc(c):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),be(this,"updateObservedNodes",()=>{var i;(i=this._mutationObserver)==null||i.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(r=>{var s;(s=this._mutationObserver)==null||s.observe(r,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(r=>{this.observePortalContainer(r)}))}),be(this,"getInitialFocusNode",()=>{let i=this.getNodeForOption("initialFocus",{hasFallback:!0});if(i===!1)return!1;if(i===void 0||i&&!Ye(i)){let r=ui(this.doc);if(r&&this.findContainerIndex(r)>=0)i=r;else{let s=this.state.tabbableGroups[0];i=s&&s.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else i===null&&(i=this.getNodeForOption("fallbackFocus"));if(!i)throw new Error("Your focus-trap needs to have at least one focusable element");return i.isConnected||(i=this.getNodeForOption("fallbackFocus")),i}),be(this,"tryFocus",i=>{if(i!==!1&&i!==ui(this.doc)){if(!i||!i.focus){this.tryFocus(this.getInitialFocusNode());return}i.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=i,zC(i)&&i.select()}}),be(this,"deactivate",i=>{if(!this.state.active)return this;let r=g({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},i);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),ng.deactivateTrap(this.trapStack,this),this.portalContainers.clear();let s=this.getOption(r,"onDeactivate"),a=this.getOption(r,"onPostDeactivate"),o=this.getOption(r,"checkCanReturnFocus"),l=this.getOption(r,"returnFocus","returnFocusOnDeactivate");s==null||s();let c=()=>{ig(()=>{if(l){let u=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(u)}a==null||a()})};if(l&&o){let u=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return o(u).then(c,c),this}return c(),this}),be(this,"pause",i=>{if(this.state.paused||!this.state.active)return this;let r=this.getOption(i,"onPause"),s=this.getOption(i,"onPostPause");return this.state.paused=!0,r==null||r(),this.removeListeners(),this.updateObservedNodes(),s==null||s(),this}),be(this,"unpause",i=>{if(!this.state.paused||!this.state.active)return this;let r=this.getOption(i,"onUnpause"),s=this.getOption(i,"onPostUnpause");return this.state.paused=!1,r==null||r(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),s==null||s(),this}),be(this,"updateContainerElements",i=>(this.state.containers=Array.isArray(i)?i.filter(Boolean):[i].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),be(this,"getReturnFocusNode",i=>{let r=this.getNodeForOption("setReturnFocus",{params:[i]});return r||(r===!1?!1:i)}),be(this,"getOption",(i,r,s)=>i&&i[r]!==void 0?i[r]:this.config[s||r]),be(this,"getNodeForOption",(i,{hasFallback:r=!1,params:s=[]}={})=>{let a=this.config[i];if(typeof a=="function"&&(a=a(...s)),a===!0&&(a=void 0),!a){if(a===void 0||a===!1)return a;throw new Error(`\`${i}\` was specified but was not a node, or did not return a node`)}let o=a;if(typeof a=="string"){try{o=this.doc.querySelector(a)}catch(l){throw new Error(`\`${i}\` appears to be an invalid selector; error="${l.message}"`)}if(!o&&!r)throw new Error(`\`${i}\` as selector refers to no known node`)}return o}),be(this,"findNextNavNode",i=>{let{event:r,isBackward:s=!1}=i,a=i.target||j(r);this.updateTabbableNodes();let o=null;if(this.state.tabbableGroups.length>0){let l=this.findContainerIndex(a,r),c=l>=0?this.state.containerGroups[l]:void 0;if(l<0)s?o=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:o=this.state.tabbableGroups[0].firstTabbableNode;else if(s){let u=this.state.tabbableGroups.findIndex(({firstTabbableNode:h})=>a===h);if(u<0&&((c==null?void 0:c.container)===a||Ye(a)&&!dn(a)&&!(c!=null&&c.nextTabbableNode(a,!1)))&&(u=l),u>=0){let h=u===0?this.state.tabbableGroups.length-1:u-1,m=this.state.tabbableGroups[h];o=fi(a)>=0?m.lastTabbableNode:m.lastDomTabbableNode}else vl(r)||(o=c==null?void 0:c.nextTabbableNode(a,!1))}else{let u=this.state.tabbableGroups.findIndex(({lastTabbableNode:h})=>a===h);if(u<0&&((c==null?void 0:c.container)===a||Ye(a)&&!dn(a)&&!(c!=null&&c.nextTabbableNode(a)))&&(u=l),u>=0){let h=u===this.state.tabbableGroups.length-1?0:u+1,m=this.state.tabbableGroups[h];o=fi(a)>=0?m.firstTabbableNode:m.firstDomTabbableNode}else vl(r)||(o=c==null?void 0:c.nextTabbableNode(a))}}else o=this.getNodeForOption("fallbackFocus");return o}),this.trapStack=t.trapStack||GC;let n=g({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward:qC,isKeyBackward:WC},t);this.doc=n.document||Le(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){let t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){var t;(t=this._mutationObserver)==null||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{Ic(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){let n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:i,tabbableNodes:r})=>i.contains(e)||(n==null?void 0:n.includes(i))||r.find(s=>s===e)||this.isControlledElement(i,e))}isControlledElement(e,t){return this.config.followControlledElements?as(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{let t=jt(e,{getShadowRoot:this.config.getShadowRoot}),n=ar(e,{getShadowRoot:this.config.getShadowRoot}),i=t[0],r=t[t.length-1],s=i,a=r,o=!1;for(let c=0;c0){o=!0;break}function l(c,u=!0){let h=t.indexOf(c);if(h>=0)return t[h+(u?1:-1)];let m=n.indexOf(c);if(!(m<0)){if(u){for(let d=m+1;d=0;d--)if(dn(n[d]))return n[d]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:o,firstTabbableNode:i,lastTabbableNode:r,firstDomTabbableNode:s,lastDomTabbableNode:a,nextTabbableNode:l}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return ng.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?ig(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(ee(this.doc,"focusin",this.handleFocus,!0),ee(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),ee(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),ee(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),ee(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),ee(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;let t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),i=this.getOption(e,"checkCanFocusTrap");i||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=ui(this.doc),t==null||t();let r=()=>{i&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return i?(i(this.state.containers.concat()).then(r,r),this):(r(),this)}},Pl=e=>e.type==="keydown",vl=e=>Pl(e)&&(e==null?void 0:e.key)==="Tab",qC=e=>Pl(e)&&e.key==="Tab"&&!(e!=null&&e.shiftKey),WC=e=>Pl(e)&&e.key==="Tab"&&(e==null?void 0:e.shiftKey),Ar=(e,...t)=>typeof e=="function"?e(...t):e,KC=e=>!e.isComposing&&e.key==="Escape",ig=e=>setTimeout(e,0),zC=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";yl="data-scroll-lock";ZC=U("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),Qn=ZC.build(),ag=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},og=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},bl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},lg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},El=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},Il=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},cg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},da=e=>e.getById(bl(e)),JC=e=>e.getById(ag(e)),QC=e=>e.getById(og(e)),eS=e=>e.getById(lg(e)),tS=e=>e.getById(El(e)),nS=e=>e.getById(Il(e)),iS=e=>e.getById(cg(e));sS={props({props:e,scope:t}){let n=e.role==="alertdialog",i=n?()=>iS(t):void 0,r=typeof e.modal=="boolean"?e.modal:!0;return g({role:"dialog",modal:r,trapFocus:r,preventScroll:r,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:i},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return Ft(()=>da(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[eS(e)],onInteractOutside(r){var s;(s=n("onInteractOutside"))==null||s(r),n("closeOnInteractOutside")||r.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(r){var s;(s=n("onEscapeKeyDown"))==null||s(r),n("closeOnEscape")||r.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return XC(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?YC(()=>da(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:i=>{var r,s;return(s=(r=t("finalFocusEl"))==null?void 0:r())!=null?s:i},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?HC(()=>[da(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){H(()=>{e.set("rendered",{title:!!tS(t),description:!!nS(t)})})},syncZIndex({scope:e}){H(()=>{let t=da(e);if(!t)return;let n=at(t);[JC(e),QC(e)].forEach(r=>{r==null||r.style.setProperty("--z-index",n.zIndex),r==null||r.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}},aS=_()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]),Dx=B(aS),oS=class extends K{initMachine(e){return new W(sS,e)}initApi(){return rS(this.machine.service,q)}render(){let e=this.el,t=e.querySelector('[data-scope="dialog"][data-part="trigger"]');t&&this.spreadProps(t,this.api.getTriggerProps());let n=e.querySelector('[data-scope="dialog"][data-part="backdrop"]');n&&this.spreadProps(n,this.api.getBackdropProps());let i=e.querySelector('[data-scope="dialog"][data-part="positioner"]');i&&this.spreadProps(i,this.api.getPositionerProps());let r=e.querySelector('[data-scope="dialog"][data-part="content"]');r&&this.spreadProps(r,this.api.getContentProps());let s=e.querySelector('[data-scope="dialog"][data-part="title"]');s&&this.spreadProps(s,this.api.getTitleProps());let a=e.querySelector('[data-scope="dialog"][data-part="description"]');a&&this.spreadProps(a,this.api.getDescriptionProps());let o=e.querySelector('[data-scope="dialog"][data-part="close-trigger"]');o&&this.spreadProps(o,this.api.getCloseTriggerProps())}},lS={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=new oS(e,y(g({id:e.id},C(e,"controlled")?{open:C(e,"open")}:{defaultOpen:C(e,"defaultOpen")}),{modal:C(e,"modal"),closeOnInteractOutside:C(e,"closeOnInteractOutside"),closeOnEscape:C(e,"closeOnEscapeKeyDown"),preventScroll:C(e,"preventScroll"),restoreFocus:C(e,"restoreFocus"),dir:w(e,"dir",["ltr","rtl"]),onOpenChange:i=>{let r=w(e,"onOpenChange");r&&this.liveSocket.main.isConnected()&&t(r,{id:e.id,open:i.open});let s=w(e,"onOpenChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{id:e.id,open:i.open}}))}}));n.init(),this.dialog=n,this.onSetOpen=i=>{let{open:r}=i.detail;n.api.setOpen(r)},e.addEventListener("phx:dialog:set-open",this.onSetOpen),this.handlers=[],this.handlers.push(this.handleEvent("dialog_set_open",i=>{let r=i.dialog_id;r&&r!==e.id||n.api.setOpen(i.open)})),this.handlers.push(this.handleEvent("dialog_open",()=>{this.pushEvent("dialog_open_response",{value:n.api.open})}))},updated(){var e;(e=this.dialog)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlled")?{open:C(this.el,"open")}:{defaultOpen:C(this.el,"defaultOpen")}),{modal:C(this.el,"modal"),closeOnInteractOutside:C(this.el,"closeOnInteractOutside"),closeOnEscape:C(this.el,"closeOnEscapeKeyDown"),preventScroll:C(this.el,"preventScroll"),restoreFocus:C(this.el,"restoreFocus"),dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(this.onSetOpen&&this.el.removeEventListener("phx:dialog:set-open",this.onSetOpen),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.dialog)==null||e.destroy()}}});var mg={};he(mg,{Editable:()=>PS});function yS(e,t){var S;let{state:n,context:i,send:r,prop:s,scope:a,computed:o}=e,l=!!s("disabled"),c=o("isInteractive"),u=!!s("readOnly"),h=!!s("required"),m=!!s("invalid"),d=!!s("autoResize"),p=s("translations"),v=n.matches("edit"),I=s("placeholder"),T=typeof I=="string"?{edit:I,preview:I}:I,O=i.get("value"),b=O.trim()==="",f=b?(S=T==null?void 0:T.preview)!=null?S:"":O;return{editing:v,empty:b,value:O,valueText:f,setValue(P){r({type:"VALUE.SET",value:P,src:"setValue"})},clearValue(){r({type:"VALUE.SET",value:"",src:"clearValue"})},edit(){c&&r({type:"EDIT"})},cancel(){c&&r({type:"CANCEL"})},submit(){c&&r({type:"SUBMIT"})},getRootProps(){return t.element(y(g({},ln.root.attrs),{id:uS(a),dir:s("dir")}))},getAreaProps(){return t.element(y(g({},ln.area.attrs),{id:dS(a),dir:s("dir"),style:d?{display:"inline-grid"}:void 0,"data-focus":E(v),"data-disabled":E(l),"data-placeholder-shown":E(b)}))},getLabelProps(){return t.label(y(g({},ln.label.attrs),{id:hS(a),dir:s("dir"),htmlFor:Cl(a),"data-focus":E(v),"data-invalid":E(m),"data-required":E(h),onClick(){if(v)return;let P=pS(a);P==null||P.focus({preventScroll:!0})}}))},getInputProps(){return t.input(y(g({},ln.input.attrs),{dir:s("dir"),"aria-label":p==null?void 0:p.input,name:s("name"),form:s("form"),id:Cl(a),hidden:d?void 0:!v,placeholder:T==null?void 0:T.edit,maxLength:s("maxLength"),required:s("required"),disabled:l,"data-disabled":E(l),readOnly:u,"data-readonly":E(u),"aria-invalid":X(m),"data-invalid":E(m),"data-autoresize":E(d),defaultValue:O,size:d?1:void 0,onChange(P){r({type:"VALUE.SET",src:"input.change",value:P.currentTarget.value})},onKeyDown(P){if(P.defaultPrevented||Re(P))return;let A={Escape(){r({type:"CANCEL"}),P.preventDefault()},Enter(x){if(!o("submitOnEnter"))return;let{localName:k}=x.currentTarget;if(k==="textarea"){if(!(Qa()?x.metaKey:x.ctrlKey))return;r({type:"SUBMIT",src:"keydown.enter"});return}k==="input"&&!x.shiftKey&&!x.metaKey&&(r({type:"SUBMIT",src:"keydown.enter"}),x.preventDefault())}}[P.key];A&&A(P)},style:d?{gridArea:"1 / 1 / auto / auto",visibility:v?void 0:"hidden"}:void 0}))},getPreviewProps(){return t.element(y(g({id:hg(a)},ln.preview.attrs),{dir:s("dir"),"data-placeholder-shown":E(b),"aria-readonly":X(u),"data-readonly":E(l),"data-disabled":E(l),"aria-disabled":X(l),"aria-invalid":X(m),"data-invalid":E(m),"aria-label":p==null?void 0:p.edit,"data-autoresize":E(d),children:f,hidden:d?void 0:v,tabIndex:c?0:void 0,onClick(){c&&s("activationMode")==="click"&&r({type:"EDIT",src:"click"})},onFocus(){c&&s("activationMode")==="focus"&&r({type:"EDIT",src:"focus"})},onDoubleClick(P){P.defaultPrevented||c&&s("activationMode")==="dblclick"&&r({type:"EDIT",src:"dblclick"})},style:d?{whiteSpace:"pre",gridArea:"1 / 1 / auto / auto",visibility:v?"hidden":void 0,overflow:"hidden",textOverflow:"ellipsis"}:void 0}))},getEditTriggerProps(){return t.button(y(g({},ln.editTrigger.attrs),{id:fg(a),dir:s("dir"),"aria-label":p==null?void 0:p.edit,hidden:v,type:"button",disabled:l,onClick(P){P.defaultPrevented||c&&r({type:"EDIT",src:"edit.click"})}}))},getControlProps(){return t.element(y(g({id:gS(a)},ln.control.attrs),{dir:s("dir")}))},getSubmitTriggerProps(){return t.button(y(g({},ln.submitTrigger.attrs),{dir:s("dir"),id:gg(a),"aria-label":p==null?void 0:p.submit,hidden:!v,disabled:l,type:"button",onClick(P){P.defaultPrevented||c&&r({type:"SUBMIT",src:"submit.click"})}}))},getCancelTriggerProps(){return t.button(y(g({},ln.cancelTrigger.attrs),{dir:s("dir"),"aria-label":p==null?void 0:p.cancel,id:pg(a),hidden:!v,type:"button",disabled:l,onClick(P){P.defaultPrevented||c&&r({type:"CANCEL",src:"cancel.click"})}}))}}}var cS,ln,uS,dS,hS,hg,Cl,gS,gg,pg,fg,ha,pS,fS,mS,vS,bS,ES,Bx,IS,PS,vg=re(()=>{"use strict";tn();se();cS=U("editable").parts("root","area","label","preview","input","editTrigger","submitTrigger","cancelTrigger","control"),ln=cS.build(),uS=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`editable:${e.id}`},dS=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.area)!=null?n:`editable:${e.id}:area`},hS=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`editable:${e.id}:label`},hg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.preview)!=null?n:`editable:${e.id}:preview`},Cl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.input)!=null?n:`editable:${e.id}:input`},gS=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`editable:${e.id}:control`},gg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.submitTrigger)!=null?n:`editable:${e.id}:submit`},pg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.cancelTrigger)!=null?n:`editable:${e.id}:cancel`},fg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.editTrigger)!=null?n:`editable:${e.id}:edit`},ha=e=>e.getById(Cl(e)),pS=e=>e.getById(hg(e)),fS=e=>e.getById(gg(e)),mS=e=>e.getById(pg(e)),vS=e=>e.getById(fg(e));bS={props({props:e}){return y(g({activationMode:"focus",submitMode:"both",defaultValue:"",selectOnFocus:!0},e),{translations:g({input:"editable input",edit:"edit",submit:"submit",cancel:"cancel"},e.translations)})},initialState({prop:e}){return e("edit")||e("defaultEdit")?"edit":"preview"},entry:["focusInputIfNeeded"],context:({bindable:e,prop:t})=>({value:e(()=>({defaultValue:t("defaultValue"),value:t("value"),onChange(n){var i;return(i=t("onValueChange"))==null?void 0:i({value:n})}})),previousValue:e(()=>({defaultValue:""}))}),watch({track:e,action:t,context:n,prop:i}){e([()=>n.get("value")],()=>{t(["syncInputValue"])}),e([()=>i("edit")],()=>{t(["toggleEditing"])})},computed:{submitOnEnter({prop:e}){let t=e("submitMode");return t==="both"||t==="enter"},submitOnBlur({prop:e}){let t=e("submitMode");return t==="both"||t==="blur"},isInteractive({prop:e}){return!(e("disabled")||e("readOnly"))}},on:{"VALUE.SET":{actions:["setValue"]}},states:{preview:{entry:["blurInput"],on:{"CONTROLLED.EDIT":{target:"edit",actions:["setPreviousValue","focusInput"]},EDIT:[{guard:"isEditControlled",actions:["invokeOnEdit"]},{target:"edit",actions:["setPreviousValue","focusInput","invokeOnEdit"]}]}},edit:{effects:["trackInteractOutside"],entry:["syncInputValue"],on:{"CONTROLLED.PREVIEW":[{guard:"isSubmitEvent",target:"preview",actions:["setPreviousValue","restoreFocus","invokeOnSubmit"]},{target:"preview",actions:["revertValue","restoreFocus","invokeOnCancel"]}],CANCEL:[{guard:"isEditControlled",actions:["invokeOnPreview"]},{target:"preview",actions:["revertValue","restoreFocus","invokeOnCancel","invokeOnPreview"]}],SUBMIT:[{guard:"isEditControlled",actions:["invokeOnPreview"]},{target:"preview",actions:["setPreviousValue","restoreFocus","invokeOnSubmit","invokeOnPreview"]}]}}},implementations:{guards:{isEditControlled:({prop:e})=>e("edit")!=null,isSubmitEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="SUBMIT"}},effects:{trackInteractOutside({send:e,scope:t,prop:n,computed:i}){return Ws(ha(t),{exclude(r){return[mS(t),fS(t)].some(a=>ce(a,r))},onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onInteractOutside(r){var a;if((a=n("onInteractOutside"))==null||a(r),r.defaultPrevented)return;let{focusable:s}=r.detail;e({type:i("submitOnBlur")?"SUBMIT":"CANCEL",src:"interact-outside",focusable:s})}})}},actions:{restoreFocus({event:e,scope:t,prop:n}){e.focusable||H(()=>{var r,s;let i=(s=(r=n("finalFocusEl"))==null?void 0:r())!=null?s:vS(t);i==null||i.focus({preventScroll:!0})})},clearValue({context:e}){e.set("value","")},focusInputIfNeeded({action:e,prop:t}){(t("edit")||t("defaultEdit"))&&e(["focusInput"])},focusInput({scope:e,prop:t}){H(()=>{let n=ha(e);n&&(t("selectOnFocus")?n.select():n.focus({preventScroll:!0}))})},invokeOnCancel({prop:e,context:t}){var i;let n=t.get("previousValue");(i=e("onValueRevert"))==null||i({value:n})},invokeOnSubmit({prop:e,context:t}){var i;let n=t.get("value");(i=e("onValueCommit"))==null||i({value:n})},invokeOnEdit({prop:e}){var t;(t=e("onEditChange"))==null||t({edit:!0})},invokeOnPreview({prop:e}){var t;(t=e("onEditChange"))==null||t({edit:!1})},toggleEditing({prop:e,send:t,event:n}){t({type:e("edit")?"CONTROLLED.EDIT":"CONTROLLED.PREVIEW",previousEvent:n})},syncInputValue({context:e,scope:t}){let n=ha(t);n&&Me(n,e.get("value"))},setValue({context:e,prop:t,event:n}){let i=t("maxLength"),r=i!=null?n.value.slice(0,i):n.value;e.set("value",r)},setPreviousValue({context:e}){e.set("previousValue",e.get("value"))},revertValue({context:e}){let t=e.get("previousValue");t&&e.set("value",t)},blurInput({scope:e}){var t;(t=ha(e))==null||t.blur()}}}},ES=_()(["activationMode","autoResize","dir","disabled","finalFocusEl","form","getRootNode","id","ids","invalid","maxLength","name","onEditChange","onFocusOutside","onInteractOutside","onPointerDownOutside","onValueChange","onValueCommit","onValueRevert","placeholder","readOnly","required","selectOnFocus","edit","defaultEdit","submitMode","translations","defaultValue","value"]),Bx=B(ES),IS=class extends K{initMachine(e){return new W(bS,e)}initApi(){return yS(this.machine.service,q)}render(){var l;let e=(l=this.el.querySelector('[data-scope="editable"][data-part="root"]'))!=null?l:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="editable"][data-part="area"]');t&&this.spreadProps(t,this.api.getAreaProps());let n=this.el.querySelector('[data-scope="editable"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps());let i=this.el.querySelector('[data-scope="editable"][data-part="input"]');i&&this.spreadProps(i,this.api.getInputProps());let r=this.el.querySelector('[data-scope="editable"][data-part="preview"]');r&&this.spreadProps(r,this.api.getPreviewProps());let s=this.el.querySelector('[data-scope="editable"][data-part="edit-trigger"]');s&&this.spreadProps(s,this.api.getEditTriggerProps());let a=this.el.querySelector('[data-scope="editable"][data-part="submit-trigger"]');a&&this.spreadProps(a,this.api.getSubmitTriggerProps());let o=this.el.querySelector('[data-scope="editable"][data-part="cancel-trigger"]');o&&this.spreadProps(o,this.api.getCancelTriggerProps())}},PS={mounted(){let e=this.el,t=w(e,"value"),n=w(e,"defaultValue"),i=C(e,"controlled"),r=w(e,"placeholder"),s=w(e,"activationMode"),a=C(e,"selectOnFocus"),o=new IS(e,y(g(g(g(g(y(g({id:e.id},i&&t!==void 0?{value:t}:{defaultValue:n!=null?n:""}),{disabled:C(e,"disabled"),readOnly:C(e,"readOnly"),required:C(e,"required"),invalid:C(e,"invalid"),name:w(e,"name"),form:w(e,"form"),dir:Oe(e)}),r!==void 0?{placeholder:r}:{}),s!==void 0?{activationMode:s}:{}),a!==void 0?{selectOnFocus:a}:{}),C(e,"controlledEdit")?{edit:C(e,"edit")}:{defaultEdit:C(e,"defaultEdit")}),{onValueChange:l=>{let c=e.querySelector('[data-scope="editable"][data-part="input"]');c&&(c.value=l.value,c.dispatchEvent(new Event("input",{bubbles:!0})),c.dispatchEvent(new Event("change",{bubbles:!0})));let u=w(e,"onValueChange");u&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(u,{value:l.value,id:e.id});let h=w(e,"onValueChangeClient");h&&e.dispatchEvent(new CustomEvent(h,{bubbles:!0,detail:{value:l,id:e.id}}))}}));o.init(),this.editable=o,this.handlers=[]},updated(){var n;let e=w(this.el,"value"),t=C(this.el,"controlled");(n=this.editable)==null||n.updateProps(y(g({id:this.el.id},t&&e!==void 0?{value:e}:{}),{disabled:C(this.el,"disabled"),readOnly:C(this.el,"readOnly"),required:C(this.el,"required"),invalid:C(this.el,"invalid"),name:w(this.el,"name"),form:w(this.el,"form")}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.editable)==null||e.destroy()}}});var Vg={};he(Vg,{FloatingPanel:()=>RS});function TS(e){switch(e){case"n":return{cursor:"n-resize",width:"100%",top:0,left:"50%",translate:"-50%"};case"e":return{cursor:"e-resize",height:"100%",right:0,top:"50%",translate:"0 -50%"};case"s":return{cursor:"s-resize",width:"100%",bottom:0,left:"50%",translate:"-50%"};case"w":return{cursor:"w-resize",height:"100%",left:0,top:"50%",translate:"0 -50%"};case"se":return{cursor:"se-resize",bottom:0,right:0};case"sw":return{cursor:"sw-resize",bottom:0,left:0};case"ne":return{cursor:"ne-resize",top:0,right:0};case"nw":return{cursor:"nw-resize",top:0,left:0};default:throw new Error(`Invalid axis: ${e}`)}}function OS(e,t){let{state:n,send:i,scope:r,prop:s,computed:a,context:o}=e,l=n.hasTag("open"),c=n.matches("open.dragging"),u=n.matches("open.resizing"),h=o.get("isTopmost"),m=o.get("size"),d=o.get("position"),p=a("isMaximized"),v=a("isMinimized"),I=a("isStaged"),T=a("canResize"),O=a("canDrag");return{open:l,resizable:s("resizable"),draggable:s("draggable"),setOpen(b){n.hasTag("open")!==b&&i({type:b?"OPEN":"CLOSE"})},dragging:c,resizing:u,position:d,size:m,setPosition(b){i({type:"SET_POSITION",position:b})},setSize(b){i({type:"SET_SIZE",size:b})},minimize(){i({type:"MINIMIZE"})},maximize(){i({type:"MAXIMIZE"})},restore(){i({type:"RESTORE"})},getTriggerProps(){return t.button(y(g({},St.trigger.attrs),{dir:s("dir"),type:"button",disabled:s("disabled"),id:Tg(r),"data-state":l?"open":"closed","data-dragging":E(c),"aria-controls":Sl(r),onClick(b){if(b.defaultPrevented||s("disabled"))return;let f=n.hasTag("open");i({type:f?"CLOSE":"OPEN",src:"trigger"})}}))},getPositionerProps(){return t.element(y(g({},St.positioner.attrs),{dir:s("dir"),id:Og(r),style:{"--width":ye(m==null?void 0:m.width),"--height":ye(m==null?void 0:m.height),"--x":ye(d==null?void 0:d.x),"--y":ye(d==null?void 0:d.y),position:s("strategy"),top:"var(--y)",left:"var(--x)"}}))},getContentProps(){return t.element(y(g({},St.content.attrs),{dir:s("dir"),role:"dialog",tabIndex:0,hidden:!l,id:Sl(r),"aria-labelledby":yg(r),"data-state":l?"open":"closed","data-dragging":E(c),"data-topmost":E(h),"data-behind":E(!h),"data-minimized":E(v),"data-maximized":E(p),"data-staged":E(I),style:{width:"var(--width)",height:"var(--height)",overflow:v?"hidden":void 0},onFocus(){i({type:"CONTENT_FOCUS"})},onKeyDown(b){if(b.defaultPrevented||b.currentTarget!==j(b))return;let f=gi(b)*s("gridSize"),P={Escape(){h&&i({type:"ESCAPE"})},ArrowLeft(){i({type:"MOVE",direction:"left",step:f})},ArrowRight(){i({type:"MOVE",direction:"right",step:f})},ArrowUp(){i({type:"MOVE",direction:"up",step:f})},ArrowDown(){i({type:"MOVE",direction:"down",step:f})}}[ge(b,{dir:s("dir")})];P&&(b.preventDefault(),P(b))}}))},getCloseTriggerProps(){return t.button(y(g({},St.closeTrigger.attrs),{dir:s("dir"),disabled:s("disabled"),"aria-label":"Close Window",type:"button",onClick(b){b.defaultPrevented||i({type:"CLOSE"})}}))},getStageTriggerProps(b){if(!Pg.has(b.stage))throw new Error(`[zag-js] Invalid stage: ${b.stage}. Must be one of: ${Array.from(Pg).join(", ")}`);let f=s("translations"),S=Ce(b.stage,{minimized:()=>({"aria-label":f.minimize,hidden:I}),maximized:()=>({"aria-label":f.maximize,hidden:I}),default:()=>({"aria-label":f.restore,hidden:!I})});return t.button(y(g(y(g({},St.stageTrigger.attrs),{dir:s("dir"),disabled:s("disabled"),"data-stage":b.stage}),S),{type:"button",onClick(P){if(P.defaultPrevented||!s("resizable"))return;let V=Ce(b.stage,{minimized:()=>"MINIMIZE",maximized:()=>"MAXIMIZE",default:()=>"RESTORE"});i({type:V.toUpperCase()})}}))},getResizeTriggerProps(b){return t.element(y(g({},St.resizeTrigger.attrs),{dir:s("dir"),"data-disabled":E(!T),"data-axis":b.axis,onPointerDown(f){T&&pe(f)&&(f.currentTarget.setPointerCapture(f.pointerId),f.stopPropagation(),i({type:"RESIZE_START",axis:b.axis,position:{x:f.clientX,y:f.clientY}}))},onPointerUp(f){if(!T)return;let S=f.currentTarget;S.hasPointerCapture(f.pointerId)&&S.releasePointerCapture(f.pointerId)},style:g({position:"absolute",touchAction:"none"},TS(b.axis))}))},getDragTriggerProps(){return t.element(y(g({},St.dragTrigger.attrs),{dir:s("dir"),"data-disabled":E(!O),onPointerDown(b){if(!O||!pe(b))return;let f=j(b);f!=null&&f.closest("button")||f!=null&&f.closest("[data-no-drag]")||(b.currentTarget.setPointerCapture(b.pointerId),b.stopPropagation(),i({type:"DRAG_START",pointerId:b.pointerId,position:{x:b.clientX,y:b.clientY}}))},onPointerUp(b){if(!O)return;let f=b.currentTarget;f.hasPointerCapture(b.pointerId)&&f.releasePointerCapture(b.pointerId)},onDoubleClick(b){b.defaultPrevented||s("resizable")&&i({type:I?"RESTORE":"MAXIMIZE"})},style:{WebkitUserSelect:"none",userSelect:"none",touchAction:"none",cursor:"move"}}))},getControlProps(){return t.element(y(g({},St.control.attrs),{dir:s("dir"),"data-disabled":E(s("disabled")),"data-stage":o.get("stage"),"data-minimized":E(v),"data-maximized":E(p),"data-staged":E(I)}))},getTitleProps(){return t.element(y(g({},St.title.attrs),{dir:s("dir"),id:yg(r)}))},getHeaderProps(){return t.element(y(g({},St.header.attrs),{dir:s("dir"),id:wg(r),"data-dragging":E(c),"data-topmost":E(h),"data-behind":E(!h),"data-minimized":E(v),"data-maximized":E(p),"data-staged":E(I)}))},getBodyProps(){return t.element(y(g({},St.body.attrs),{dir:s("dir"),"data-dragging":E(c),"data-minimized":E(v),"data-maximized":E(p),"data-staged":E(I),hidden:v}))}}}function ga(e){if(e)try{let t=JSON.parse(e);if(typeof t.width=="number"&&typeof t.height=="number")return{width:t.width,height:t.height}}catch(t){}}function Sg(e){if(e)try{let t=JSON.parse(e);if(typeof t.x=="number"&&typeof t.y=="number")return{x:t.x,y:t.y}}catch(t){}}var CS,St,Tg,Og,Sl,yg,wg,bg,Eg,Ig,SS,wn,Pg,kr,Cg,wS,VS,xS,AS,Wx,kS,Kx,NS,RS,xg=re(()=>{"use strict";Cs();se();CS=U("floating-panel").parts("trigger","positioner","content","header","body","title","resizeTrigger","dragTrigger","stageTrigger","closeTrigger","control"),St=CS.build(),Tg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`float:${e.id}:trigger`},Og=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`float:${e.id}:positioner`},Sl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`float:${e.id}:content`},yg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`float:${e.id}:title`},wg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.header)!=null?n:`float:${e.id}:header`},bg=e=>e.getById(Tg(e)),Eg=e=>e.getById(Og(e)),Ig=e=>e.getById(Sl(e)),SS=e=>e.getById(wg(e)),wn=(e,t,n)=>{let i;return le(t)?i=po(t):i=Cu(e.getWin()),n&&(i=bn({x:-i.width,y:i.minY,width:i.width*3,height:i.height*2})),fn(i,["x","y","width","height"])};Pg=new Set(["minimized","maximized","default"]);kr=ys({stack:[],count(){return this.stack.length},add(e){this.stack.includes(e)||this.stack.push(e)},remove(e){let t=this.stack.indexOf(e);t<0||this.stack.splice(t,1)},bringToFront(e){this.remove(e),this.add(e)},isTopmost(e){return this.stack[this.stack.length-1]===e},indexOf(e){return this.stack.indexOf(e)}}),{not:Cg,and:wS}=Ee(),VS={minimize:"Minimize window",maximize:"Maximize window",restore:"Restore window"},xS={props({props:e}){return yn(e,["id"],"floating-panel"),y(g({strategy:"fixed",gridSize:1,defaultSize:{width:320,height:240},defaultPosition:{x:300,y:100},allowOverflow:!0,resizable:!0,draggable:!0},e),{hasSpecifiedPosition:!!e.defaultPosition||!!e.position,translations:g(g({},VS),e.translations)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({prop:e,bindable:t}){return{size:t(()=>({defaultValue:e("defaultSize"),value:e("size"),isEqual:Iu,sync:!0,hash(n){return`W:${n.width} H:${n.height}`},onChange(n){var i;(i=e("onSizeChange"))==null||i({size:n})}})),position:t(()=>({defaultValue:e("defaultPosition"),value:e("position"),isEqual:Pu,sync:!0,hash(n){return`X:${n.x} Y:${n.y}`},onChange(n){var i;(i=e("onPositionChange"))==null||i({position:n})}})),stage:t(()=>({defaultValue:"default",onChange(n){var i;(i=e("onStageChange"))==null||i({stage:n})}})),lastEventPosition:t(()=>({defaultValue:null})),prevPosition:t(()=>({defaultValue:null})),prevSize:t(()=>({defaultValue:null})),isTopmost:t(()=>({defaultValue:void 0}))}},computed:{isMaximized:({context:e})=>e.get("stage")==="maximized",isMinimized:({context:e})=>e.get("stage")==="minimized",isStaged:({context:e})=>e.get("stage")!=="default",canResize:({context:e,prop:t})=>t("resizable")&&!t("disabled")&&e.get("stage")==="default",canDrag:({prop:e,computed:t})=>e("draggable")&&!e("disabled")&&!t("isMaximized")},watch({track:e,context:t,action:n,prop:i}){e([()=>t.hash("position")],()=>{n(["setPositionStyle"])}),e([()=>t.hash("size")],()=>{n(["setSizeStyle"])}),e([()=>i("open")],()=>{n(["toggleVisibility"])})},effects:["trackPanelStack"],on:{CONTENT_FOCUS:{actions:["bringToFrontOfPanelStack"]},SET_POSITION:{actions:["setPosition"]},SET_SIZE:{actions:["setSize"]}},states:{closed:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open",actions:["setAnchorPosition","setPositionStyle","setSizeStyle","focusContentEl"]},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setAnchorPosition","setPositionStyle","setSizeStyle","focusContentEl"]}]}},open:{tags:["open"],entry:["bringToFrontOfPanelStack"],effects:["trackBoundaryRect"],on:{DRAG_START:{guard:Cg("isMaximized"),target:"open.dragging",actions:["setPrevPosition"]},RESIZE_START:{guard:Cg("isMinimized"),target:"open.resizing",actions:["setPrevSize"]},"CONTROLLED.CLOSE":{target:"closed",actions:["resetRect","focusTriggerEl"]},CLOSE:[{guard:"isOpenControlled",target:"closed",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","resetRect","focusTriggerEl"]}],ESCAPE:[{guard:wS("isOpenControlled","closeOnEsc"),actions:["invokeOnClose"]},{guard:"closeOnEsc",target:"closed",actions:["invokeOnClose","resetRect","focusTriggerEl"]}],MINIMIZE:{actions:["setMinimized"]},MAXIMIZE:{actions:["setMaximized"]},RESTORE:{actions:["setRestored"]},MOVE:{actions:["setPositionFromKeyboard"]}}},"open.dragging":{tags:["open"],effects:["trackPointerMove"],exit:["clearPrevPosition"],on:{DRAG:{actions:["setPosition"]},DRAG_END:{target:"open",actions:["invokeOnDragEnd"]},"CONTROLLED.CLOSE":{target:"closed",actions:["resetRect"]},CLOSE:[{guard:"isOpenControlled",target:"closed",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","resetRect"]}],ESCAPE:{target:"open"}}},"open.resizing":{tags:["open"],effects:["trackPointerMove"],exit:["clearPrevSize"],on:{DRAG:{actions:["setSize"]},DRAG_END:{target:"open",actions:["invokeOnResizeEnd"]},"CONTROLLED.CLOSE":{target:"closed",actions:["resetRect"]},CLOSE:[{guard:"isOpenControlled",target:"closed",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","resetRect"]}],ESCAPE:{target:"open"}}}},implementations:{guards:{closeOnEsc:({prop:e})=>!!e("closeOnEscape"),isMaximized:({context:e})=>e.get("stage")==="maximized",isMinimized:({context:e})=>e.get("stage")==="minimized",isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPointerMove({scope:e,send:t,event:n,prop:i}){var o;let r=e.getDoc(),s=(o=i("getBoundaryEl"))==null?void 0:o(),a=wn(e,s,!1);return hn(r,{onPointerMove({point:l,event:c}){let{altKey:u,shiftKey:h}=c,m=He(l.x,a.x,a.x+a.width),d=He(l.y,a.y,a.y+a.height);t({type:"DRAG",position:{x:m,y:d},axis:n.axis,altKey:u,shiftKey:h})},onPointerUp(){t({type:"DRAG_END"})}})},trackBoundaryRect({context:e,scope:t,prop:n,computed:i}){var l;let r=t.getWin(),s=!0,a=()=>{var h;if(s){s=!1;return}let c=(h=n("getBoundaryEl"))==null?void 0:h(),u=wn(t,c,!1);if(!i("isMaximized")){let m=g(g({},e.get("position")),e.get("size"));u=Eu(m,u)}e.set("size",fn(u,["width","height"])),e.set("position",fn(u,["x","y"]))},o=(l=n("getBoundaryEl"))==null?void 0:l();return le(o)?gn.observe(o,a):ee(r,"resize",a)},trackPanelStack({context:e,scope:t}){let n=ns(kr,()=>{e.set("isTopmost",kr.isTopmost(t.id));let i=Ig(t);if(!i)return;let r=kr.indexOf(t.id);r!==-1&&i.style.setProperty("--z-index",`${r+1}`)});return()=>{kr.remove(t.id),n()}}},actions:{setAnchorPosition({context:e,prop:t,scope:n}){if(t("hasSpecifiedPosition"))return;let i=e.get("prevPosition")||e.get("prevSize");t("persistRect")&&i||H(()=>{var o,l;let r=bg(n),s=wn(n,(o=t("getBoundaryEl"))==null?void 0:o(),!1),a=(l=t("getAnchorPosition"))==null?void 0:l({triggerRect:r?DOMRect.fromRect(po(r)):null,boundaryRect:DOMRect.fromRect(s)});if(!a){let c=e.get("size");a={x:s.x+(s.width-c.width)/2,y:s.y+(s.height-c.height)/2}}a&&e.set("position",a)})},setPrevPosition({context:e,event:t}){e.set("prevPosition",g({},e.get("position"))),e.set("lastEventPosition",t.position)},clearPrevPosition({context:e,prop:t}){t("persistRect")||e.set("prevPosition",null),e.set("lastEventPosition",null)},setPosition({context:e,event:t,prop:n,scope:i}){var c;let r=go(t.position,e.get("lastEventPosition"));r.x=Math.round(r.x/n("gridSize"))*n("gridSize"),r.y=Math.round(r.y/n("gridSize"))*n("gridSize");let s=e.get("prevPosition");if(!s)return;let a=bu(s,r),o=(c=n("getBoundaryEl"))==null?void 0:c(),l=wn(i,o,n("allowOverflow"));a=hr(a,e.get("size"),l),e.set("position",a)},setPositionStyle({scope:e,context:t}){let n=Eg(e),i=t.get("position");n==null||n.style.setProperty("--x",`${i.x}px`),n==null||n.style.setProperty("--y",`${i.y}px`)},resetRect({context:e,prop:t}){e.set("stage","default"),t("persistRect")||(e.set("position",e.initial("position")),e.set("size",e.initial("size")))},setPrevSize({context:e,event:t}){e.set("prevSize",g({},e.get("size"))),e.set("prevPosition",g({},e.get("position"))),e.set("lastEventPosition",t.position)},clearPrevSize({context:e}){e.set("prevSize",null),e.set("prevPosition",null),e.set("lastEventPosition",null)},setSize({context:e,event:t,scope:n,prop:i}){var p;let r=e.get("prevSize"),s=e.get("prevPosition"),a=e.get("lastEventPosition");if(!r||!s||!a)return;let o=bn(g(g({},s),r)),l=go(t.position,a),c=Tu(o,l,t.axis,{scalingOriginMode:t.altKey?"center":"extent",lockAspectRatio:!!i("lockAspectRatio")||t.shiftKey}),u=fn(c,["width","height"]),h=fn(c,["x","y"]),m=(p=i("getBoundaryEl"))==null?void 0:p(),d=wn(n,m,!1);if(u=gr(u,i("minSize"),i("maxSize")),u=gr(u,i("minSize"),d),e.set("size",u),h){let v=hr(h,u,d);e.set("position",v)}},setSizeStyle({scope:e,context:t}){queueMicrotask(()=>{let n=Eg(e),i=t.get("size");n==null||n.style.setProperty("--width",`${i.width}px`),n==null||n.style.setProperty("--height",`${i.height}px`)})},setMaximized({context:e,prop:t,scope:n}){var s;e.set("stage","maximized"),e.set("prevSize",e.get("size")),e.set("prevPosition",e.get("position"));let i=(s=t("getBoundaryEl"))==null?void 0:s(),r=wn(n,i,!1);e.set("position",fn(r,["x","y"])),e.set("size",fn(r,["height","width"]))},setMinimized({context:e,scope:t}){e.set("stage","minimized"),e.set("prevSize",e.get("size")),e.set("prevPosition",e.get("position"));let n=SS(t);if(!n)return;let i=y(g({},e.get("size")),{height:n==null?void 0:n.offsetHeight});e.set("size",i)},setRestored({context:e,prop:t,scope:n}){var s;let i=wn(n,(s=t("getBoundaryEl"))==null?void 0:s(),!1);e.set("stage","default");let r=e.get("prevSize");if(r){let a=r;a=gr(a,t("minSize"),t("maxSize")),a=gr(a,t("minSize"),i),e.set("size",a),e.set("prevSize",null)}if(e.get("prevPosition")){let a=e.get("prevPosition");a=hr(a,e.get("size"),i),e.set("position",a),e.set("prevPosition",null)}},setPositionFromKeyboard({context:e,event:t,prop:n,scope:i}){var c;vs(t.step==null,"step is required");let r=e.get("position"),s=t.step,a=Ce(t.direction,{left:{x:r.x-s,y:r.y},right:{x:r.x+s,y:r.y},up:{x:r.x,y:r.y-s},down:{x:r.x,y:r.y+s}}),o=(c=n("getBoundaryEl"))==null?void 0:c(),l=wn(i,o,!1);a=hr(a,e.get("size"),l),e.set("position",a)},bringToFrontOfPanelStack({prop:e}){kr.bringToFront(e("id"))},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnDragEnd({context:e,prop:t}){var n;(n=t("onPositionChangeEnd"))==null||n({position:e.get("position")})},invokeOnResizeEnd({context:e,prop:t}){var n;(n=t("onSizeChangeEnd"))==null||n({size:e.get("size")})},focusTriggerEl({scope:e}){H(()=>{var t;(t=bg(e))==null||t.focus()})},focusContentEl({scope:e}){H(()=>{var t;(t=Ig(e))==null||t.focus()})},toggleVisibility({send:e,prop:t,event:n}){e({type:t("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}},AS=_()(["allowOverflow","closeOnEscape","defaultOpen","defaultPosition","defaultSize","dir","disabled","draggable","getAnchorPosition","getBoundaryEl","getRootNode","gridSize","id","ids","lockAspectRatio","maxSize","minSize","onOpenChange","onPositionChange","onPositionChangeEnd","onSizeChange","onSizeChangeEnd","onStageChange","open","persistRect","position","resizable","size","strategy","translations"]),Wx=B(AS),kS=_()(["axis"]),Kx=B(kS),NS=class extends K{initMachine(e){return new W(xS,e)}initApi(){return OS(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="floating-panel"][data-part="trigger"]');e&&this.spreadProps(e,this.api.getTriggerProps());let t=this.el.querySelector('[data-scope="floating-panel"][data-part="positioner"]');t&&this.spreadProps(t,this.api.getPositionerProps());let n=this.el.querySelector('[data-scope="floating-panel"][data-part="content"]');n&&this.spreadProps(n,this.api.getContentProps());let i=this.el.querySelector('[data-scope="floating-panel"][data-part="title"]');i&&this.spreadProps(i,this.api.getTitleProps());let r=this.el.querySelector('[data-scope="floating-panel"][data-part="header"]');r&&this.spreadProps(r,this.api.getHeaderProps());let s=this.el.querySelector('[data-scope="floating-panel"][data-part="body"]');s&&this.spreadProps(s,this.api.getBodyProps());let a=this.el.querySelector('[data-scope="floating-panel"][data-part="drag-trigger"]');a&&this.spreadProps(a,this.api.getDragTriggerProps()),["s","w","e","n","sw","nw","se","ne"].forEach(h=>{let m=this.el.querySelector(`[data-scope="floating-panel"][data-part="resize-trigger"][data-axis="${h}"]`);m&&this.spreadProps(m,this.api.getResizeTriggerProps({axis:h}))});let l=this.el.querySelector('[data-scope="floating-panel"][data-part="close-trigger"]');l&&this.spreadProps(l,this.api.getCloseTriggerProps());let c=this.el.querySelector('[data-scope="floating-panel"][data-part="control"]');c&&this.spreadProps(c,this.api.getControlProps()),["minimized","maximized","default"].forEach(h=>{let m=this.el.querySelector(`[data-scope="floating-panel"][data-part="stage-trigger"][data-stage="${h}"]`);m&&this.spreadProps(m,this.api.getStageTriggerProps({stage:h}))})}};RS={mounted(){let e=this.el,t=C(e,"open"),n=C(e,"defaultOpen"),i=C(e,"controlled"),r=ga(e.dataset.size),s=ga(e.dataset.defaultSize),a=Sg(e.dataset.position),o=Sg(e.dataset.defaultPosition),l=new NS(e,y(g({id:e.id},i?{open:t}:{defaultOpen:n}),{draggable:C(e,"draggable")!==!1,resizable:C(e,"resizable")!==!1,allowOverflow:C(e,"allowOverflow")!==!1,closeOnEscape:C(e,"closeOnEscape")!==!1,disabled:C(e,"disabled"),dir:Oe(e),size:r,defaultSize:s,position:a,defaultPosition:o,minSize:ga(e.dataset.minSize),maxSize:ga(e.dataset.maxSize),persistRect:C(e,"persistRect"),gridSize:Number(e.dataset.gridSize)||1,onOpenChange:c=>{let u=w(e,"onOpenChange");u&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(u,{open:c.open,id:e.id});let h=w(e,"onOpenChangeClient");h&&e.dispatchEvent(new CustomEvent(h,{bubbles:!0,detail:{value:c,id:e.id}}))},onPositionChange:c=>{let u=w(e,"onPositionChange");u&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(u,{position:c.position,id:e.id})},onSizeChange:c=>{let u=w(e,"onSizeChange");u&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(u,{size:c.size,id:e.id})},onStageChange:c=>{let u=w(e,"onStageChange");u&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(u,{stage:c.stage,id:e.id})}}));l.init(),this.floatingPanel=l,this.handlers=[]},updated(){var n;let e=C(this.el,"open"),t=C(this.el,"controlled");(n=this.floatingPanel)==null||n.updateProps(y(g({id:this.el.id},t?{open:e}:{}),{disabled:C(this.el,"disabled"),dir:Oe(this.el)}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.floatingPanel)==null||e.destroy()}}});var Dg={};he(Dg,{Listbox:()=>jS});function $S(e,t){let{context:n,prop:i,scope:r,computed:s,send:a,refs:o}=e,l=i("disabled"),c=i("collection"),u=Cn(c)?"grid":"list",h=n.get("focused"),m=o.get("focusVisible")&&h,d=o.get("inputState"),p=n.get("value"),v=n.get("selectedItems"),I=n.get("highlightedValue"),T=n.get("highlightedItem"),O=s("isTypingAhead"),b=s("isInteractive"),f=I?Ol(r,I):void 0;function S(P){let V=c.getItemDisabled(P.item),A=c.getItemValue(P.item);vn(A,()=>`[zag-js] No value found for item ${JSON.stringify(P.item)}`);let x=I===A;return{value:A,disabled:!!(l||V),focused:x&&h,focusVisible:x&&m,highlighted:x&&(d.focused?h:m),selected:n.get("value").includes(A)}}return{empty:p.length===0,highlightedItem:T,highlightedValue:I,clearHighlightedValue(){a({type:"HIGHLIGHTED_VALUE.SET",value:null})},selectedItems:v,hasSelectedItems:s("hasSelectedItems"),value:p,valueAsString:s("valueAsString"),collection:c,disabled:!!l,selectValue(P){a({type:"ITEM.SELECT",value:P})},setValue(P){a({type:"VALUE.SET",value:P})},selectAll(){if(!s("multiple"))throw new Error("[zag-js] Cannot select all items in a single-select listbox");a({type:"VALUE.SET",value:c.getValues()})},highlightValue(P){a({type:"HIGHLIGHTED_VALUE.SET",value:P})},clearValue(P){a(P?{type:"ITEM.CLEAR",value:P}:{type:"VALUE.CLEAR"})},getItemState:S,getRootProps(){return t.element(y(g({},Ht.root.attrs),{dir:i("dir"),id:MS(r),"data-orientation":i("orientation"),"data-disabled":E(l)}))},getInputProps(P={}){return t.input(y(g({},Ht.input.attrs),{dir:i("dir"),disabled:l,"data-disabled":E(l),autoComplete:"off",autoCorrect:"off","aria-haspopup":"listbox","aria-controls":Tl(r),"aria-autocomplete":"list","aria-activedescendant":f,spellCheck:!1,enterKeyHint:"go",onFocus(){queueMicrotask(()=>{a({type:"INPUT.FOCUS",autoHighlight:!!(P!=null&&P.autoHighlight)})})},onBlur(){a({type:"CONTENT.BLUR",src:"input"})},onInput(V){P!=null&&P.autoHighlight&&(V.currentTarget.value.trim()||queueMicrotask(()=>{a({type:"HIGHLIGHTED_VALUE.SET",value:null})}))},onKeyDown(V){if(V.defaultPrevented||Re(V))return;let A=Yt(V),x=()=>{var D;V.preventDefault();let k=r.getWin(),N=new k.KeyboardEvent(A.type,A);(D=pa(r))==null||D.dispatchEvent(N)};switch(A.key){case"ArrowLeft":case"ArrowRight":{if(!Cn(c)||V.ctrlKey)return;x()}case"Home":case"End":{if(I==null&&V.shiftKey)return;x()}case"ArrowDown":case"ArrowUp":{x();break}case"Enter":I!=null&&(V.preventDefault(),a({type:"ITEM.CLICK",value:I}));break}}}))},getLabelProps(){return t.element(y(g({dir:i("dir"),id:Ag(r)},Ht.label.attrs),{"data-disabled":E(l)}))},getValueTextProps(){return t.element(y(g({},Ht.valueText.attrs),{dir:i("dir"),"data-disabled":E(l)}))},getItemProps(P){let V=S(P);return t.element(y(g({id:Ol(r,V.value),role:"option"},Ht.item.attrs),{dir:i("dir"),"data-value":V.value,"aria-selected":V.selected,"data-selected":E(V.selected),"data-layout":u,"data-state":V.selected?"checked":"unchecked","data-orientation":i("orientation"),"data-highlighted":E(V.highlighted),"data-disabled":E(V.disabled),"aria-disabled":X(V.disabled),onPointerMove(A){P.highlightOnHover&&(V.disabled||A.pointerType!=="mouse"||V.highlighted||a({type:"ITEM.POINTER_MOVE",value:V.value}))},onMouseDown(A){var x;A.preventDefault(),(x=pa(r))==null||x.focus()},onClick(A){A.defaultPrevented||V.disabled||a({type:"ITEM.CLICK",value:V.value,shiftKey:A.shiftKey,anchorValue:I,metaKey:ls(A)})}}))},getItemTextProps(P){let V=S(P);return t.element(y(g({},Ht.itemText.attrs),{"data-state":V.selected?"checked":"unchecked","data-disabled":E(V.disabled),"data-highlighted":E(V.highlighted)}))},getItemIndicatorProps(P){let V=S(P);return t.element(y(g({},Ht.itemIndicator.attrs),{"aria-hidden":!0,"data-state":V.selected?"checked":"unchecked",hidden:!V.selected}))},getItemGroupLabelProps(P){let{htmlFor:V}=P;return t.element(y(g({},Ht.itemGroupLabel.attrs),{id:kg(r,V),dir:i("dir"),role:"presentation"}))},getItemGroupProps(P){let{id:V}=P;return t.element(y(g({},Ht.itemGroup.attrs),{"data-disabled":E(l),"data-orientation":i("orientation"),"data-empty":E(c.size===0),id:FS(r,V),"aria-labelledby":kg(r,V),role:"group",dir:i("dir")}))},getContentProps(){return t.element(y(g({dir:i("dir"),id:Tl(r),role:"listbox"},Ht.content.attrs),{"data-activedescendant":f,"aria-activedescendant":f,"data-orientation":i("orientation"),"aria-multiselectable":s("multiple")?!0:void 0,"aria-labelledby":Ag(r),tabIndex:0,"data-layout":u,"data-empty":E(c.size===0),style:{"--column-count":Cn(c)?c.columnCount:1},onFocus(){a({type:"CONTENT.FOCUS"})},onBlur(){a({type:"CONTENT.BLUR"})},onKeyDown(P){if(!b||!ce(P.currentTarget,j(P)))return;let V=P.shiftKey,A={ArrowUp(N){let D=null;Cn(c)&&I?D=c.getPreviousRowValue(I):I&&(D=c.getPreviousValue(I)),!D&&(i("loopFocus")||!I)&&(D=c.lastValue),D&&(N.preventDefault(),a({type:"NAVIGATE",value:D,shiftKey:V,anchorValue:I}))},ArrowDown(N){let D=null;Cn(c)&&I?D=c.getNextRowValue(I):I&&(D=c.getNextValue(I)),!D&&(i("loopFocus")||!I)&&(D=c.firstValue),D&&(N.preventDefault(),a({type:"NAVIGATE",value:D,shiftKey:V,anchorValue:I}))},ArrowLeft(){if(!Cn(c)&&i("orientation")==="vertical")return;let N=I?c.getPreviousValue(I):null;!N&&i("loopFocus")&&(N=c.lastValue),N&&(P.preventDefault(),a({type:"NAVIGATE",value:N,shiftKey:V,anchorValue:I}))},ArrowRight(){if(!Cn(c)&&i("orientation")==="vertical")return;let N=I?c.getNextValue(I):null;!N&&i("loopFocus")&&(N=c.firstValue),N&&(P.preventDefault(),a({type:"NAVIGATE",value:N,shiftKey:V,anchorValue:I}))},Home(N){N.preventDefault();let D=c.firstValue;a({type:"NAVIGATE",value:D,shiftKey:V,anchorValue:I})},End(N){N.preventDefault();let D=c.lastValue;a({type:"NAVIGATE",value:D,shiftKey:V,anchorValue:I})},Enter(){a({type:"ITEM.CLICK",value:I})},a(N){ls(N)&&s("multiple")&&!i("disallowSelectAll")&&(N.preventDefault(),a({type:"VALUE.SET",value:c.getValues()}))},Space(N){var D;O&&i("typeahead")?a({type:"CONTENT.TYPEAHEAD",key:N.key}):(D=A.Enter)==null||D.call(A,N)},Escape(N){i("deselectable")&&p.length>0&&(N.preventDefault(),N.stopPropagation(),a({type:"VALUE.CLEAR"}))}},x=A[ge(P)];if(x){x(P);return}let k=j(P);Ot(k)||Ue.isValidEvent(P)&&i("typeahead")&&(a({type:"CONTENT.TYPEAHEAD",key:P.key}),P.preventDefault())}}))}}}function Nr(e,t,n){let i=US(t,e);for(let r of i)n==null||n({value:r})}function Rg(e,t){return Bi(t?{items:e,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled,groupBy:n=>{var i;return(i=n.group)!=null?i:""}}:{items:e,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled})}var DS,Ht,Bi,LS,MS,Tl,Ag,Ol,FS,kg,pa,Ng,HS,BS,_S,GS,US,qS,Jx,WS,Qx,KS,eA,zS,tA,YS,jS,Lg=re(()=>{"use strict";pr();yr();se();DS=U("listbox").parts("label","input","item","itemText","itemIndicator","itemGroup","itemGroupLabel","content","root","valueText"),Ht=DS.build(),Bi=e=>new Nt(e);Bi.empty=()=>new Nt({items:[]});LS=e=>new Vo(e);LS.empty=()=>new Vo({items:[],columnCount:0});MS=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`select:${e.id}`},Tl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`select:${e.id}:content`},Ag=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`select:${e.id}:label`},Ol=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`select:${e.id}:option:${t}`},FS=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemGroup)==null?void 0:i.call(n,t))!=null?r:`select:${e.id}:optgroup:${t}`},kg=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemGroupLabel)==null?void 0:i.call(n,t))!=null?r:`select:${e.id}:optgroup-label:${t}`},pa=e=>e.getById(Tl(e)),Ng=(e,t)=>e.getById(Ol(e,t));({guards:HS,createMachine:BS}=ut()),{or:_S}=HS,GS=BS({props({props:e}){return g({loopFocus:!1,composite:!0,defaultValue:[],multiple:!1,typeahead:!0,collection:Bi.empty(),orientation:"vertical",selectionMode:"single"},e)},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:fe,onChange(n){var r;let i=e("collection").findMany(n);return(r=e("onValueChange"))==null?void 0:r({value:n,items:i})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),sync:!0,onChange(n){var i;(i=e("onHighlightChange"))==null||i({highlightedValue:n,highlightedItem:e("collection").find(n),highlightedIndex:e("collection").indexOf(n)})}})),highlightedItem:t(()=>({defaultValue:null})),selectedItems:t(()=>{var r,s;let n=(s=(r=e("value"))!=null?r:e("defaultValue"))!=null?s:[];return{defaultValue:e("collection").findMany(n)}}),focused:t(()=>({sync:!0,defaultValue:!1}))}},refs(){return{typeahead:g({},Ue.defaultOptions),focusVisible:!1,inputState:{autoHighlight:!1,focused:!1}}},computed:{hasSelectedItems:({context:e})=>e.get("value").length>0,isTypingAhead:({refs:e})=>e.get("typeahead").keysSoFar!=="",isInteractive:({prop:e})=>!e("disabled"),selection:({context:e,prop:t})=>{let n=new ld(e.get("value"));return n.selectionMode=t("selectionMode"),n.deselectable=!!t("deselectable"),n},multiple:({prop:e})=>e("selectionMode")==="multiple"||e("selectionMode")==="extended",valueAsString:({context:e,prop:t})=>t("collection").stringifyItems(e.get("selectedItems"))},initialState(){return"idle"},watch({context:e,prop:t,track:n,action:i}){n([()=>e.get("value").toString()],()=>{i(["syncSelectedItems"])}),n([()=>e.get("highlightedValue")],()=>{i(["syncHighlightedItem"])}),n([()=>t("collection").toString()],()=>{i(["syncHighlightedValue"])})},effects:["trackFocusVisible"],on:{"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedItem"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setSelectedItems"]},"VALUE.CLEAR":{actions:["clearSelectedItems"]}},states:{idle:{effects:["scrollToHighlightedItem"],on:{"INPUT.FOCUS":{actions:["setFocused","setInputState"]},"CONTENT.FOCUS":[{guard:_S("hasSelectedValue","hasHighlightedValue"),actions:["setFocused"]},{actions:["setFocused","setDefaultHighlightedValue"]}],"CONTENT.BLUR":{actions:["clearFocused","clearInputState"]},"ITEM.CLICK":{actions:["setHighlightedItem","selectHighlightedItem"]},"CONTENT.TYPEAHEAD":{actions:["setFocused","highlightMatchingItem"]},"ITEM.POINTER_MOVE":{actions:["highlightItem"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedItem"]},NAVIGATE:{actions:["setFocused","setHighlightedItem","selectWithKeyboard"]}}}},implementations:{guards:{hasSelectedValue:({context:e})=>e.get("value").length>0,hasHighlightedValue:({context:e})=>e.get("highlightedValue")!=null},effects:{trackFocusVisible:({scope:e,refs:t})=>{var n;return Pn({root:(n=e.getRootNode)==null?void 0:n.call(e),onChange(i){t.set("focusVisible",i.isFocusVisible)}})},scrollToHighlightedItem({context:e,prop:t,scope:n}){let i=s=>{let a=e.get("highlightedValue");if(a==null||ju()!=="keyboard")return;let l=pa(n),c=t("scrollToIndexFn");if(c){let h=t("collection").indexOf(a);c==null||c({index:h,immediate:s,getElement(){return Ng(n,a)}});return}let u=Ng(n,a);Xt(u,{rootEl:l,block:"nearest"})};return H(()=>i(!0)),ot(()=>pa(n),{defer:!0,attributes:["data-activedescendant"],callback(){i(!1)}})}},actions:{selectHighlightedItem({context:e,prop:t,event:n,computed:i}){var o;let r=(o=n.value)!=null?o:e.get("highlightedValue"),s=t("collection");if(r==null||!s.has(r))return;let a=i("selection");if(n.shiftKey&&i("multiple")&&n.anchorValue){let l=a.extendSelection(s,n.anchorValue,r);Nr(a,l,t("onSelect")),e.set("value",Array.from(l))}else{let l=a.select(s,r,n.metaKey);Nr(a,l,t("onSelect")),e.set("value",Array.from(l))}},selectWithKeyboard({context:e,prop:t,event:n,computed:i}){let r=i("selection"),s=t("collection");if(n.shiftKey&&i("multiple")&&n.anchorValue){let a=r.extendSelection(s,n.anchorValue,n.value);Nr(r,a,t("onSelect")),e.set("value",Array.from(a));return}if(t("selectOnHighlight")){let a=r.replaceSelection(s,n.value);Nr(r,a,t("onSelect")),e.set("value",Array.from(a))}},highlightItem({context:e,event:t}){e.set("highlightedValue",t.value)},highlightMatchingItem({context:e,prop:t,event:n,refs:i}){let r=t("collection").search(n.key,{state:i.get("typeahead"),currentValue:e.get("highlightedValue")});r!=null&&e.set("highlightedValue",r)},setHighlightedItem({context:e,event:t}){e.set("highlightedValue",t.value)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},selectItem({context:e,prop:t,event:n,computed:i}){let r=t("collection"),s=i("selection"),a=s.select(r,n.value);Nr(s,a,t("onSelect")),e.set("value",Array.from(a))},clearItem({context:e,event:t,computed:n}){let r=n("selection").deselect(t.value);e.set("value",Array.from(r))},setSelectedItems({context:e,event:t}){e.set("value",t.value)},clearSelectedItems({context:e}){e.set("value",[])},syncSelectedItems({context:e,prop:t}){let n=t("collection"),i=e.get("selectedItems"),s=e.get("value").map(a=>i.find(l=>n.getItemValue(l)===a)||n.find(a));e.set("selectedItems",s)},syncHighlightedItem({context:e,prop:t}){let n=t("collection"),i=e.get("highlightedValue"),r=i?n.find(i):null;e.set("highlightedItem",r)},syncHighlightedValue({context:e,prop:t,refs:n}){let i=t("collection"),r=e.get("highlightedValue"),{autoHighlight:s}=n.get("inputState");if(s){queueMicrotask(()=>{var a;e.set("highlightedValue",(a=t("collection").firstValue)!=null?a:null)});return}r!=null&&!i.has(r)&&queueMicrotask(()=>{e.set("highlightedValue",null)})},setFocused({context:e}){e.set("focused",!0)},setDefaultHighlightedValue({context:e,prop:t}){let i=t("collection").firstValue;i!=null&&e.set("highlightedValue",i)},clearFocused({context:e}){e.set("focused",!1)},setInputState({refs:e,event:t}){e.set("inputState",{autoHighlight:!!t.autoHighlight,focused:!0})},clearInputState({refs:e}){e.set("inputState",{autoHighlight:!1,focused:!1})}}}}),US=(e,t)=>{let n=new Set(e);for(let i of t)n.delete(i);return n};qS=_()(["collection","defaultHighlightedValue","defaultValue","dir","disabled","deselectable","disallowSelectAll","getRootNode","highlightedValue","id","ids","loopFocus","onHighlightChange","onSelect","onValueChange","orientation","scrollToIndexFn","selectionMode","selectOnHighlight","typeahead","value"]),Jx=B(qS),WS=_()(["item","highlightOnHover"]),Qx=B(WS),KS=_()(["id"]),eA=B(KS),zS=_()(["htmlFor"]),tA=B(zS),YS=class extends K{constructor(t,n){var r;super(t,n);Y(this,"_options",[]);Y(this,"hasGroups",!1);Y(this,"init",()=>{this.machine.start(),this.render(),this.machine.subscribe(()=>{this.api=this.initApi(),this.render()})});let i=n.collection;this._options=(r=i==null?void 0:i.items)!=null?r:[]}get options(){return Array.isArray(this._options)?this._options:[]}setOptions(t){this._options=Array.isArray(t)?t:[]}getCollection(){let t=this.options;return this.hasGroups?Bi({items:t,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled,groupBy:n=>{var i;return(i=n.group)!=null?i:""}}):Bi({items:t,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled})}initMachine(t){let n=this.getCollection.bind(this),i=t.collection;return new W(GS,y(g({},t),{get collection(){return i!=null?i:n()}}))}initApi(){return $S(this.machine.service,q)}applyItemProps(){let t=this.el.querySelector('[data-scope="listbox"][data-part="content"]');t&&(t.querySelectorAll('[data-scope="listbox"][data-part="item-group"]').forEach(n=>{var s;let i=(s=n.dataset.id)!=null?s:"";this.spreadProps(n,this.api.getItemGroupProps({id:i}));let r=n.querySelector('[data-scope="listbox"][data-part="item-group-label"]');r&&this.spreadProps(r,this.api.getItemGroupLabelProps({htmlFor:i}))}),t.querySelectorAll('[data-scope="listbox"][data-part="item"]').forEach(n=>{var o;let i=(o=n.dataset.value)!=null?o:"",r=this.options.find(l=>{var c,u;return String((u=(c=l.id)!=null?c:l.value)!=null?u:"")===String(i)});if(!r)return;this.spreadProps(n,this.api.getItemProps({item:r}));let s=n.querySelector('[data-scope="listbox"][data-part="item-text"]');s&&this.spreadProps(s,this.api.getItemTextProps({item:r}));let a=n.querySelector('[data-scope="listbox"][data-part="item-indicator"]');a&&this.spreadProps(a,this.api.getItemIndicatorProps({item:r}))}))}render(){var a;let t=(a=this.el.querySelector('[data-scope="listbox"][data-part="root"]'))!=null?a:this.el;this.spreadProps(t,this.api.getRootProps());let n=this.el.querySelector('[data-scope="listbox"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps());let i=this.el.querySelector('[data-scope="listbox"][data-part="value-text"]');i&&this.spreadProps(i,this.api.getValueTextProps());let r=this.el.querySelector('[data-scope="listbox"][data-part="input"]');r&&this.spreadProps(r,this.api.getInputProps());let s=this.el.querySelector('[data-scope="listbox"][data-part="content"]');s&&(this.spreadProps(s,this.api.getContentProps()),this.applyItemProps())}};jS={mounted(){var o;let e=this.el,t=JSON.parse((o=e.dataset.collection)!=null?o:"[]"),n=t.some(l=>l.group!==void 0),i=Z(e,"value"),r=Z(e,"defaultValue"),s=C(e,"controlled"),a=new YS(e,y(g({id:e.id,collection:Rg(t,n)},s&&i?{value:i}:{defaultValue:r!=null?r:[]}),{disabled:C(e,"disabled"),dir:w(e,"dir",["ltr","rtl"]),orientation:w(e,"orientation",["horizontal","vertical"]),loopFocus:C(e,"loopFocus"),selectionMode:w(e,"selectionMode",["single","multiple","extended"]),selectOnHighlight:C(e,"selectOnHighlight"),deselectable:C(e,"deselectable"),typeahead:C(e,"typeahead"),onValueChange:l=>{let c=w(e,"onValueChange");c&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(c,{value:l.value,items:l.items,id:e.id});let u=w(e,"onValueChangeClient");u&&e.dispatchEvent(new CustomEvent(u,{bubbles:!0,detail:{value:l,id:e.id}}))}}));a.hasGroups=n,a.setOptions(t),a.init(),this.listbox=a,this.handlers=[]},updated(){var r;let e=JSON.parse((r=this.el.dataset.collection)!=null?r:"[]"),t=e.some(s=>s.group!==void 0),n=Z(this.el,"value"),i=C(this.el,"controlled");this.listbox&&(this.listbox.hasGroups=t,this.listbox.setOptions(e),this.listbox.updateProps(y(g({collection:Rg(e,t),id:this.el.id},i&&n?{value:n}:{}),{disabled:C(this.el,"disabled"),dir:w(this.el,"dir",["ltr","rtl"]),orientation:w(this.el,"orientation",["horizontal","vertical"])})))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.listbox)==null||e.destroy()}}});var Ug={};he(Ug,{Menu:()=>mT});function sT(e,t){if(!e)return;let n=ue(e),i=new n.CustomEvent(Vl,{detail:{value:t}});e.dispatchEvent(i)}function aT(e,t){let{context:n,send:i,state:r,computed:s,prop:a,scope:o}=e,l=r.hasTag("open"),c=n.get("isSubmenu"),u=s("isTypingAhead"),h=a("composite"),m=n.get("currentPlacement"),d=n.get("anchorPoint"),p=n.get("highlightedValue"),v=On(y(g({},a("positioning")),{placement:d?"bottom":m}));function I(f){return{id:Rr(o,f.value),disabled:!!f.disabled,highlighted:p===f.value}}function T(f){var P;let S=(P=f.valueText)!=null?P:f.value;return y(g({},f),{id:f.value,valueText:S})}function O(f){let S=I(T(f));return y(g({},S),{checked:!!f.checked})}function b(f){let{closeOnSelect:S,valueText:P,value:V}=f,A=I(f),x=Rr(o,V);return t.element(y(g({},Be.item.attrs),{id:x,role:"menuitem","aria-disabled":X(A.disabled),"data-disabled":E(A.disabled),"data-ownedby":Gi(o),"data-highlighted":E(A.highlighted),"data-value":V,"data-valuetext":P,onDragStart(k){k.currentTarget.matches("a[href]")&&k.preventDefault()},onPointerMove(k){if(A.disabled||k.pointerType!=="mouse")return;let N=k.currentTarget;if(A.highlighted)return;let D=je(k);i({type:"ITEM_POINTERMOVE",id:x,target:N,closeOnSelect:S,point:D})},onPointerLeave(k){var $;if(A.disabled||k.pointerType!=="mouse"||!(($=e.event.previous())==null?void 0:$.type.includes("POINTER")))return;let D=k.currentTarget;i({type:"ITEM_POINTERLEAVE",id:x,target:D,closeOnSelect:S})},onPointerDown(k){if(A.disabled)return;let N=k.currentTarget;i({type:"ITEM_POINTERDOWN",target:N,id:x,closeOnSelect:S})},onClick(k){if(rr(k)||Fn(k)||A.disabled)return;let N=k.currentTarget;i({type:"ITEM_CLICK",target:N,id:x,closeOnSelect:S})}}))}return{highlightedValue:p,open:l,setOpen(f){r.hasTag("open")!==f&&i({type:f?"OPEN":"CLOSE"})},setHighlightedValue(f){i({type:"HIGHLIGHTED.SET",value:f})},setParent(f){i({type:"PARENT.SET",value:f,id:f.prop("id")})},setChild(f){i({type:"CHILD.SET",value:f,id:f.prop("id")})},reposition(f={}){i({type:"POSITIONING.SET",options:f})},addItemListener(f){let S=o.getById(f.id);if(!S)return;let P=()=>{var V;return(V=f.onSelect)==null?void 0:V.call(f)};return S.addEventListener(Vl,P),()=>S.removeEventListener(Vl,P)},getContextTriggerProps(){return t.element(y(g({},Be.contextTrigger.attrs),{dir:a("dir"),id:_g(o),"data-state":l?"open":"closed",onPointerDown(f){if(f.pointerType==="mouse")return;let S=je(f);i({type:"CONTEXT_MENU_START",point:S})},onPointerCancel(f){f.pointerType!=="mouse"&&i({type:"CONTEXT_MENU_CANCEL"})},onPointerMove(f){f.pointerType!=="mouse"&&i({type:"CONTEXT_MENU_CANCEL"})},onPointerUp(f){f.pointerType!=="mouse"&&i({type:"CONTEXT_MENU_CANCEL"})},onContextMenu(f){let S=je(f);i({type:"CONTEXT_MENU",point:S}),f.preventDefault()},style:{WebkitTouchCallout:"none",WebkitUserSelect:"none",userSelect:"none"}}))},getTriggerItemProps(f){let S=f.getTriggerProps();return au(b({value:S.id}),S)},getTriggerProps(){return t.button(y(g({},c?Be.triggerItem.attrs:Be.trigger.attrs),{"data-placement":n.get("currentPlacement"),type:"button",dir:a("dir"),id:va(o),"data-uid":a("id"),"aria-haspopup":h?"menu":"dialog","aria-controls":Gi(o),"data-controls":Gi(o),"aria-expanded":l||void 0,"data-state":l?"open":"closed",onPointerMove(f){if(f.pointerType!=="mouse"||ma(f.currentTarget)||!c)return;let P=je(f);i({type:"TRIGGER_POINTERMOVE",target:f.currentTarget,point:P})},onPointerLeave(f){if(ma(f.currentTarget)||f.pointerType!=="mouse"||!c)return;let S=je(f);i({type:"TRIGGER_POINTERLEAVE",target:f.currentTarget,point:S})},onPointerDown(f){ma(f.currentTarget)||hi(f)||f.preventDefault()},onClick(f){f.defaultPrevented||ma(f.currentTarget)||i({type:"TRIGGER_CLICK",target:f.currentTarget})},onBlur(){i({type:"TRIGGER_BLUR"})},onFocus(){i({type:"TRIGGER_FOCUS"})},onKeyDown(f){if(f.defaultPrevented)return;let S={ArrowDown(){i({type:"ARROW_DOWN"})},ArrowUp(){i({type:"ARROW_UP"})},Enter(){i({type:"ARROW_DOWN",src:"enter"})},Space(){i({type:"ARROW_DOWN",src:"space"})}},P=ge(f,{orientation:"vertical",dir:a("dir")}),V=S[P];V&&(f.preventDefault(),V(f))}}))},getIndicatorProps(){return t.element(y(g({},Be.indicator.attrs),{dir:a("dir"),"data-state":l?"open":"closed"}))},getPositionerProps(){return t.element(y(g({},Be.positioner.attrs),{dir:a("dir"),id:Gg(o),style:v.floating}))},getArrowProps(){return t.element(y(g({id:ZS(o)},Be.arrow.attrs),{dir:a("dir"),style:v.arrow}))},getArrowTipProps(){return t.element(y(g({},Be.arrowTip.attrs),{dir:a("dir"),style:v.arrowTip}))},getContentProps(){return t.element(y(g({},Be.content.attrs),{id:Gi(o),"aria-label":a("aria-label"),hidden:!l,"data-state":l?"open":"closed",role:h?"menu":"dialog",tabIndex:0,dir:a("dir"),"aria-activedescendant":s("highlightedId")||void 0,"aria-labelledby":va(o),"data-placement":m,onPointerEnter(f){f.pointerType==="mouse"&&i({type:"MENU_POINTERENTER"})},onKeyDown(f){if(f.defaultPrevented||!ce(f.currentTarget,j(f)))return;let S=j(f);if(!((S==null?void 0:S.closest("[role=menu]"))===f.currentTarget||S===f.currentTarget))return;if(f.key==="Tab"&&!ds(f)){f.preventDefault();return}let V={ArrowDown(){i({type:"ARROW_DOWN"})},ArrowUp(){i({type:"ARROW_UP"})},ArrowLeft(){i({type:"ARROW_LEFT"})},ArrowRight(){i({type:"ARROW_RIGHT"})},Enter(){i({type:"ENTER"})},Space(k){var N;u?i({type:"TYPEAHEAD",key:k.key}):(N=V.Enter)==null||N.call(V,k)},Home(){i({type:"HOME"})},End(){i({type:"END"})}},A=ge(f,{dir:a("dir")}),x=V[A];if(x){x(f),f.stopPropagation(),f.preventDefault();return}a("typeahead")&&wc(f)&&(xe(f)||Ot(S)||(i({type:"TYPEAHEAD",key:f.key}),f.preventDefault()))}}))},getSeparatorProps(){return t.element(y(g({},Be.separator.attrs),{role:"separator",dir:a("dir"),"aria-orientation":"horizontal"}))},getItemState:I,getItemProps:b,getOptionItemState:O,getOptionItemProps(f){let{type:S,disabled:P,closeOnSelect:V}=f,A=T(f),x=O(f);return g(g({},b(A)),t.element(y(g({"data-type":S},Be.item.attrs),{dir:a("dir"),"data-value":A.value,role:`menuitem${S}`,"aria-checked":!!x.checked,"data-state":x.checked?"checked":"unchecked",onClick(k){if(P||rr(k)||Fn(k))return;let N=k.currentTarget;i({type:"ITEM_CLICK",target:N,option:A,closeOnSelect:V})}})))},getItemIndicatorProps(f){let S=O(lo(f)),P=S.checked?"checked":"unchecked";return t.element(y(g({},Be.itemIndicator.attrs),{dir:a("dir"),"data-disabled":E(S.disabled),"data-highlighted":E(S.highlighted),"data-state":$e(f,"checked")?P:void 0,hidden:$e(f,"checked")?!S.checked:void 0}))},getItemTextProps(f){let S=O(lo(f)),P=S.checked?"checked":"unchecked";return t.element(y(g({},Be.itemText.attrs),{dir:a("dir"),"data-disabled":E(S.disabled),"data-highlighted":E(S.highlighted),"data-state":$e(f,"checked")?P:void 0}))},getItemGroupLabelProps(f){return t.element(y(g({},Be.itemGroupLabel.attrs),{id:Mg(o,f.htmlFor),dir:a("dir")}))},getItemGroupProps(f){return t.element(y(g({id:JS(o,f.id)},Be.itemGroup.attrs),{dir:a("dir"),"aria-labelledby":Mg(o,f.id),role:"group"}))}}}function Hg(e){let t=e.parent;for(;t&&t.context.get("isSubmenu");)t=t.refs.get("parent");t==null||t.send({type:"CLOSE"})}function cT(e,t){return e?fo(e,t):!1}function uT(e,t,n){let i=Object.keys(e).length>0;if(!t)return null;if(!i)return Rr(n,t);for(let r in e){let s=e[r],a=va(s.scope);if(a===t)return a}return Rr(n,t)}var XS,Be,va,_g,Gi,ZS,Gg,JS,Rr,ei,Mg,cn,Fg,fa,QS,wl,Dr,eT,tT,xl,nT,iT,rT,ma,$g,Vl,pt,_i,oT,lT,dT,cA,hT,uA,gT,dA,pT,hA,fT,gA,Bg,mT,qg=re(()=>{"use strict";Cs();Pr();Wn();tn();se();XS=U("menu").parts("arrow","arrowTip","content","contextTrigger","indicator","item","itemGroup","itemGroupLabel","itemIndicator","itemText","positioner","separator","trigger","triggerItem"),Be=XS.build(),va=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`menu:${e.id}:trigger`},_g=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.contextTrigger)!=null?n:`menu:${e.id}:ctx-trigger`},Gi=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`menu:${e.id}:content`},ZS=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`menu:${e.id}:arrow`},Gg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`menu:${e.id}:popper`},JS=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.group)==null?void 0:i.call(n,t))!=null?r:`menu:${e.id}:group:${t}`},Rr=(e,t)=>`${e.id}/${t}`,ei=e=>{var t;return(t=e==null?void 0:e.dataset.value)!=null?t:null},Mg=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.groupLabel)==null?void 0:i.call(n,t))!=null?r:`menu:${e.id}:group-label:${t}`},cn=e=>e.getById(Gi(e)),Fg=e=>e.getById(Gg(e)),fa=e=>e.getById(va(e)),QS=(e,t)=>t?e.getById(Rr(e,t)):null,wl=e=>e.getById(_g(e)),Dr=e=>{let n=`[role^="menuitem"][data-ownedby=${CSS.escape(Gi(e))}]:not([data-disabled])`;return Fe(cn(e),n)},eT=e=>lt(Dr(e)),tT=e=>mt(Dr(e)),xl=(e,t)=>t?e.id===t||e.dataset.value===t:!1,nT=(e,t)=>{var r;let n=Dr(e),i=n.findIndex(s=>xl(s,t.value));return _c(n,i,{loop:(r=t.loop)!=null?r:t.loopFocus})},iT=(e,t)=>{var r;let n=Dr(e),i=n.findIndex(s=>xl(s,t.value));return Gc(n,i,{loop:(r=t.loop)!=null?r:t.loopFocus})},rT=(e,t)=>{var r;let n=Dr(e),i=n.find(s=>xl(s,t.value));return Ue(n,{state:t.typeaheadState,key:t.key,activeId:(r=i==null?void 0:i.id)!=null?r:null})},ma=e=>le(e)&&(e.dataset.disabled===""||e.hasAttribute("disabled")),$g=e=>{var t;return!!((t=e==null?void 0:e.getAttribute("role"))!=null&&t.startsWith("menuitem"))&&!!(e!=null&&e.hasAttribute("data-controls"))},Vl="menu:select";({not:pt,and:_i,or:oT}=Ee()),lT={props({props:e}){return y(g({closeOnSelect:!0,typeahead:!0,composite:!0,loopFocus:!1,navigate(t){mi(t.node)}},e),{positioning:g({placement:"bottom-start",gutter:8},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"idle"},context({bindable:e,prop:t}){return{suspendPointer:e(()=>({defaultValue:!1})),highlightedValue:e(()=>({defaultValue:t("defaultHighlightedValue")||null,value:t("highlightedValue"),onChange(n){var i;(i=t("onHighlightChange"))==null||i({highlightedValue:n})}})),lastHighlightedValue:e(()=>({defaultValue:null})),currentPlacement:e(()=>({defaultValue:void 0})),intentPolygon:e(()=>({defaultValue:null})),anchorPoint:e(()=>({defaultValue:null,hash(n){return`x: ${n==null?void 0:n.x}, y: ${n==null?void 0:n.y}`}})),isSubmenu:e(()=>({defaultValue:!1}))}},refs(){return{parent:null,children:{},typeaheadState:g({},Ue.defaultOptions),positioningOverride:{}}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isTypingAhead:({refs:e})=>e.get("typeaheadState").keysSoFar!=="",highlightedId:({context:e,scope:t,refs:n})=>uT(n.get("children"),e.get("highlightedValue"),t)},watch({track:e,action:t,context:n,prop:i}){e([()=>n.get("isSubmenu")],()=>{t(["setSubmenuPlacement"])}),e([()=>n.hash("anchorPoint")],()=>{n.get("anchorPoint")&&t(["reposition"])}),e([()=>i("open")],()=>{t(["toggleVisibility"])})},on:{"PARENT.SET":{actions:["setParentMenu"]},"CHILD.SET":{actions:["setChildMenu"]},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],OPEN_AUTOFOCUS:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["highlightFirstItem","invokeOnOpen"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"HIGHLIGHTED.RESTORE":{actions:["restoreHighlightedItem"]},"HIGHLIGHTED.SET":{actions:["setHighlightedItem"]}},states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed"},CONTEXT_MENU_START:{target:"opening:contextmenu",actions:["setAnchorPoint"]},CONTEXT_MENU:[{guard:"isOpenControlled",actions:["setAnchorPoint","invokeOnOpen"]},{target:"open",actions:["setAnchorPoint","invokeOnOpen"]}],TRIGGER_CLICK:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TRIGGER_FOCUS:{guard:pt("isSubmenu"),target:"closed"},TRIGGER_POINTERMOVE:{guard:"isSubmenu",target:"opening"}}},"opening:contextmenu":{tags:["closed"],effects:["waitForLongPress"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed"},CONTEXT_MENU_CANCEL:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"LONG_PRESS.OPEN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}},opening:{tags:["closed"],effects:["waitForOpenDelay"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed"},BLUR:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TRIGGER_POINTERLEAVE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"DELAY.OPEN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}},closing:{tags:["open"],effects:["trackPointerMove","trackInteractOutside","waitForCloseDelay"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem"]},MENU_POINTERENTER:{target:"open",actions:["clearIntentPolygon"]},POINTER_MOVED_AWAY_FROM_SUBMENU:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem"]}],"DELAY.CLOSE":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem","invokeOnClose"]}]}},closed:{tags:["closed"],entry:["clearHighlightedItem","focusTrigger","resumePointer","clearAnchorPoint"],on:{"CONTROLLED.OPEN":[{guard:oT("isOpenAutoFocusEvent","isArrowDownEvent"),target:"open",actions:["highlightFirstItem"]},{guard:"isArrowUpEvent",target:"open",actions:["highlightLastItem"]},{target:"open"}],CONTEXT_MENU_START:{target:"opening:contextmenu",actions:["setAnchorPoint"]},CONTEXT_MENU:[{guard:"isOpenControlled",actions:["setAnchorPoint","invokeOnOpen"]},{target:"open",actions:["setAnchorPoint","invokeOnOpen"]}],TRIGGER_CLICK:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TRIGGER_POINTERMOVE:{guard:"isTriggerItem",target:"opening"},TRIGGER_BLUR:{target:"idle"},ARROW_DOWN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["highlightFirstItem","invokeOnOpen"]}],ARROW_UP:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["highlightLastItem","invokeOnOpen"]}]}},open:{tags:["open"],effects:["trackInteractOutside","trackPositioning","scrollToHighlightedItem"],entry:["focusMenu","resumePointer"],on:{"CONTROLLED.CLOSE":[{target:"closed",guard:"isArrowLeftEvent",actions:["focusParentMenu"]},{target:"closed"}],TRIGGER_CLICK:[{guard:_i(pt("isTriggerItem"),"isOpenControlled"),actions:["invokeOnClose"]},{guard:pt("isTriggerItem"),target:"closed",actions:["invokeOnClose"]}],CONTEXT_MENU:{actions:["setAnchorPoint","focusMenu"]},ARROW_UP:{actions:["highlightPrevItem","focusMenu"]},ARROW_DOWN:{actions:["highlightNextItem","focusMenu"]},ARROW_LEFT:[{guard:_i("isSubmenu","isOpenControlled"),actions:["invokeOnClose"]},{guard:"isSubmenu",target:"closed",actions:["focusParentMenu","invokeOnClose"]}],HOME:{actions:["highlightFirstItem","focusMenu"]},END:{actions:["highlightLastItem","focusMenu"]},ARROW_RIGHT:{guard:"isTriggerItemHighlighted",actions:["openSubmenu"]},ENTER:[{guard:"isTriggerItemHighlighted",actions:["openSubmenu"]},{actions:["clickHighlightedItem"]}],ITEM_POINTERMOVE:[{guard:pt("isPointerSuspended"),actions:["setHighlightedItem","focusMenu","closeSiblingMenus"]},{actions:["setLastHighlightedItem","closeSiblingMenus"]}],ITEM_POINTERLEAVE:{guard:_i(pt("isPointerSuspended"),pt("isTriggerItem")),actions:["clearHighlightedItem"]},ITEM_CLICK:[{guard:_i(pt("isTriggerItemHighlighted"),pt("isHighlightedItemEditable"),"closeOnSelect","isOpenControlled"),actions:["invokeOnSelect","setOptionState","closeRootMenu","invokeOnClose"]},{guard:_i(pt("isTriggerItemHighlighted"),pt("isHighlightedItemEditable"),"closeOnSelect"),target:"closed",actions:["invokeOnSelect","setOptionState","closeRootMenu","invokeOnClose"]},{guard:_i(pt("isTriggerItemHighlighted"),pt("isHighlightedItemEditable")),actions:["invokeOnSelect","setOptionState"]},{actions:["setHighlightedItem"]}],TRIGGER_POINTERMOVE:{guard:"isTriggerItem",actions:["setIntentPolygon"]},TRIGGER_POINTERLEAVE:{target:"closing",actions:["setIntentPolygon"]},ITEM_POINTERDOWN:{actions:["setHighlightedItem"]},TYPEAHEAD:{actions:["highlightMatchedItem"]},FOCUS_MENU:{actions:["focusMenu"]},"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{closeOnSelect:({prop:e,event:t})=>{var n;return!!((n=t==null?void 0:t.closeOnSelect)!=null?n:e("closeOnSelect"))},isTriggerItem:({event:e})=>$g(e.target),isTriggerItemHighlighted:({event:e,scope:t,computed:n})=>{var r;let i=(r=e.target)!=null?r:t.getById(n("highlightedId"));return!!(i!=null&&i.hasAttribute("data-controls"))},isSubmenu:({context:e})=>e.get("isSubmenu"),isPointerSuspended:({context:e})=>e.get("suspendPointer"),isHighlightedItemEditable:({scope:e,computed:t})=>Ot(e.getById(t("highlightedId"))),isOpenControlled:({prop:e})=>e("open")!==void 0,isArrowLeftEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="ARROW_LEFT"},isArrowUpEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="ARROW_UP"},isArrowDownEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="ARROW_DOWN"},isOpenAutoFocusEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="OPEN_AUTOFOCUS"}},effects:{waitForOpenDelay({send:e}){let t=setTimeout(()=>{e({type:"DELAY.OPEN"})},200);return()=>clearTimeout(t)},waitForCloseDelay({send:e}){let t=setTimeout(()=>{e({type:"DELAY.CLOSE"})},100);return()=>clearTimeout(t)},waitForLongPress({send:e}){let t=setTimeout(()=>{e({type:"LONG_PRESS.OPEN"})},700);return()=>clearTimeout(t)},trackPositioning({context:e,prop:t,scope:n,refs:i}){if(wl(n))return;let r=g(g({},t("positioning")),i.get("positioningOverride"));e.set("currentPlacement",r.placement);let s=()=>Fg(n);return It(fa(n),s,y(g({},r),{defer:!0,onComplete(a){e.set("currentPlacement",a.placement)}}))},trackInteractOutside({refs:e,scope:t,prop:n,context:i,send:r}){let s=()=>cn(t),a=!0;return Ft(s,{type:"menu",defer:!0,exclude:[fa(t)],onInteractOutside:n("onInteractOutside"),onRequestDismiss:n("onRequestDismiss"),onFocusOutside(o){var u;(u=n("onFocusOutside"))==null||u(o);let l=j(o.detail.originalEvent);if(ce(wl(t),l)){o.preventDefault();return}},onEscapeKeyDown(o){var l;(l=n("onEscapeKeyDown"))==null||l(o),i.get("isSubmenu")&&o.preventDefault(),Hg({parent:e.get("parent")})},onPointerDownOutside(o){var u;(u=n("onPointerDownOutside"))==null||u(o);let l=j(o.detail.originalEvent);if(ce(wl(t),l)&&o.detail.contextmenu){o.preventDefault();return}a=!o.detail.focusable},onDismiss(){r({type:"CLOSE",src:"interact-outside",restoreFocus:a})}})},trackPointerMove({context:e,scope:t,send:n,refs:i,flush:r}){let s=i.get("parent");r(()=>{s.context.set("suspendPointer",!0)});let a=t.getDoc();return ee(a,"pointermove",o=>{cT(e.get("intentPolygon"),{x:o.clientX,y:o.clientY})||(n({type:"POINTER_MOVED_AWAY_FROM_SUBMENU"}),s.context.set("suspendPointer",!1))})},scrollToHighlightedItem({event:e,scope:t,computed:n}){let i=()=>{if(e.current().type.startsWith("ITEM_POINTER"))return;let s=t.getById(n("highlightedId")),a=cn(t);Xt(s,{rootEl:a,block:"nearest"})};return H(()=>i()),ot(()=>cn(t),{defer:!0,attributes:["aria-activedescendant"],callback:i})}},actions:{setAnchorPoint({context:e,event:t}){e.set("anchorPoint",n=>fe(n,t.point)?n:t.point)},setSubmenuPlacement({context:e,computed:t,refs:n}){if(!e.get("isSubmenu"))return;let i=t("isRtl")?"left-start":"right-start";n.set("positioningOverride",{placement:i,gutter:0})},reposition({context:e,scope:t,prop:n,event:i,refs:r}){var c;let s=()=>Fg(t),a=e.get("anchorPoint"),o=a?()=>g({width:0,height:0},a):void 0,l=g(g({},n("positioning")),r.get("positioningOverride"));It(fa(t),s,y(g(y(g({},l),{defer:!0,getAnchorRect:o}),(c=i.options)!=null?c:{}),{listeners:!1,onComplete(u){e.set("currentPlacement",u.placement)}}))},setOptionState({event:e}){if(!e.option)return;let{checked:t,onCheckedChange:n,type:i}=e.option;i==="radio"?n==null||n(!0):i==="checkbox"&&(n==null||n(!t))},clickHighlightedItem({scope:e,computed:t,prop:n,context:i}){var a;let r=e.getById(t("highlightedId"));if(!r||r.dataset.disabled)return;let s=i.get("highlightedValue");st(r)?(a=n("navigate"))==null||a({value:s,node:r,href:r.href}):queueMicrotask(()=>r.click())},setIntentPolygon({context:e,scope:t,event:n}){let i=cn(t),r=e.get("currentPlacement");if(!i||!r)return;let s=i.getBoundingClientRect(),a=Su(s,r);if(!a)return;let l=Md(r)==="right"?-5:5;e.set("intentPolygon",[y(g({},n.point),{x:n.point.x+l}),...a])},clearIntentPolygon({context:e}){e.set("intentPolygon",null)},clearAnchorPoint({context:e}){e.set("anchorPoint",null)},resumePointer({refs:e,flush:t}){let n=e.get("parent");n&&t(()=>{n.context.set("suspendPointer",!1)})},setHighlightedItem({context:e,event:t}){let n=t.value||ei(t.target);e.set("highlightedValue",n)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},focusMenu({scope:e}){H(()=>{let t=cn(e),n=us({root:t,enabled:!ce(t,e.getActiveElement()),filter(i){var r;return!((r=i.role)!=null&&r.startsWith("menuitem"))}});n==null||n.focus({preventScroll:!0})})},highlightFirstItem({context:e,scope:t}){(cn(t)?queueMicrotask:H)(()=>{let i=eT(t);i&&e.set("highlightedValue",ei(i))})},highlightLastItem({context:e,scope:t}){(cn(t)?queueMicrotask:H)(()=>{let i=tT(t);i&&e.set("highlightedValue",ei(i))})},highlightNextItem({context:e,scope:t,event:n,prop:i}){let r=nT(t,{loop:n.loop,value:e.get("highlightedValue"),loopFocus:i("loopFocus")});e.set("highlightedValue",ei(r))},highlightPrevItem({context:e,scope:t,event:n,prop:i}){let r=iT(t,{loop:n.loop,value:e.get("highlightedValue"),loopFocus:i("loopFocus")});e.set("highlightedValue",ei(r))},invokeOnSelect({context:e,prop:t,scope:n}){var s;let i=e.get("highlightedValue");if(i==null)return;let r=QS(n,i);sT(r,i),(s=t("onSelect"))==null||s({value:i})},focusTrigger({scope:e,context:t,event:n}){t.get("isSubmenu")||t.get("anchorPoint")||n.restoreFocus===!1||queueMicrotask(()=>{var i;return(i=fa(e))==null?void 0:i.focus({preventScroll:!0})})},highlightMatchedItem({scope:e,context:t,event:n,refs:i}){let r=rT(e,{key:n.key,value:t.get("highlightedValue"),typeaheadState:i.get("typeaheadState")});r&&t.set("highlightedValue",ei(r))},setParentMenu({refs:e,event:t,context:n}){e.set("parent",t.value),n.set("isSubmenu",!0)},setChildMenu({refs:e,event:t}){let n=e.get("children");n[t.id]=t.value,e.set("children",n)},closeSiblingMenus({refs:e,event:t,scope:n}){var a;let i=t.target;if(!$g(i))return;let r=i==null?void 0:i.getAttribute("data-uid"),s=e.get("children");for(let o in s){if(o===r)continue;let l=s[o],c=l.context.get("intentPolygon");c&&t.point&&fo(c,t.point)||((a=cn(n))==null||a.focus({preventScroll:!0}),l.send({type:"CLOSE"}))}},closeRootMenu({refs:e}){Hg({parent:e.get("parent")})},openSubmenu({refs:e,scope:t,computed:n}){let i=t.getById(n("highlightedId")),r=i==null?void 0:i.getAttribute("data-uid"),s=e.get("children"),a=r?s[r]:null;a==null||a.send({type:"OPEN_AUTOFOCUS"})},focusParentMenu({refs:e}){var t;(t=e.get("parent"))==null||t.send({type:"FOCUS_MENU"})},setLastHighlightedItem({context:e,event:t}){e.set("lastHighlightedValue",ei(t.target))},restoreHighlightedItem({context:e}){e.get("lastHighlightedValue")&&(e.set("highlightedValue",e.get("lastHighlightedValue")),e.set("lastHighlightedValue",null))},restoreParentHighlightedItem({refs:e}){var t;(t=e.get("parent"))==null||t.send({type:"HIGHLIGHTED.RESTORE"})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},toggleVisibility({prop:e,event:t,send:n}){n({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:t})}}}};dT=_()(["anchorPoint","aria-label","closeOnSelect","composite","defaultHighlightedValue","defaultOpen","dir","getRootNode","highlightedValue","id","ids","loopFocus","navigate","onEscapeKeyDown","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","onSelect","open","positioning","typeahead"]),cA=B(dT),hT=_()(["closeOnSelect","disabled","value","valueText"]),uA=B(hT),gT=_()(["htmlFor"]),dA=B(gT),pT=_()(["id"]),hA=B(pT),fT=_()(["checked","closeOnSelect","disabled","onCheckedChange","type","value","valueText"]),gA=B(fT),Bg=class extends K{constructor(){super(...arguments);Y(this,"children",[])}initMachine(t){return new W(lT,t)}initApi(){return aT(this.machine.service,q)}setChild(t){this.api.setChild(t.machine.service),this.children.includes(t)||this.children.push(t)}setParent(t){this.api.setParent(t.machine.service)}isOwnElement(t){return t.closest('[phx-hook="Menu"]')===this.el}renderSubmenuTriggers(){let t=this.el.querySelector('[data-scope="menu"][data-part="content"]');if(!t)return;let n=t.querySelectorAll('[data-scope="menu"][data-nested-menu]');for(let i of n){if(!this.isOwnElement(i))continue;let r=i.dataset.nestedMenu;if(!r)continue;let s=this.children.find(o=>o.el.id===`menu:${r}`);if(!s)continue;let a=()=>{let o=this.api.getTriggerItemProps(s.api);this.spreadProps(i,o)};a(),this.machine.subscribe(a),s.machine.subscribe(a)}}render(){let t=this.el.querySelector('[data-scope="menu"][data-part="trigger"]');t&&this.spreadProps(t,this.api.getTriggerProps());let n=this.el.querySelector('[data-scope="menu"][data-part="positioner"]'),i=this.el.querySelector('[data-scope="menu"][data-part="content"]');if(n&&i){this.spreadProps(n,this.api.getPositionerProps()),this.spreadProps(i,this.api.getContentProps()),i.style.pointerEvents="auto",n.hidden=!this.api.open;let s=!this.el.querySelector('[data-scope="menu"][data-part="trigger"]');(this.api.open||s)&&(i.querySelectorAll('[data-scope="menu"][data-part="item"]').forEach(u=>{if(!this.isOwnElement(u))return;let h=u.dataset.value;if(h){let m=u.hasAttribute("data-disabled");this.spreadProps(u,this.api.getItemProps({value:h,disabled:m||void 0}))}}),i.querySelectorAll('[data-scope="menu"][data-part="item-group"]').forEach(u=>{if(!this.isOwnElement(u))return;let h=u.id;h&&this.spreadProps(u,this.api.getItemGroupProps({id:h}))}),i.querySelectorAll('[data-scope="menu"][data-part="separator"]').forEach(u=>{this.isOwnElement(u)&&this.spreadProps(u,this.api.getSeparatorProps())}))}let r=this.el.querySelector('[data-scope="menu"][data-part="indicator"]');r&&this.spreadProps(r,this.api.getIndicatorProps())}},mT={mounted(){let e=this.el;if(e.hasAttribute("data-nested"))return;let t=this.pushEvent.bind(this),n=()=>{var a;return(a=this.liveSocket)==null?void 0:a.main},i=new Bg(e,y(g({id:e.id.replace("menu:","")},C(e,"controlled")?{open:C(e,"open")}:{defaultOpen:C(e,"defaultOpen")}),{closeOnSelect:C(e,"closeOnSelect"),loopFocus:C(e,"loopFocus"),typeahead:C(e,"typeahead"),composite:C(e,"composite"),dir:w(e,"dir",["ltr","rtl"]),onSelect:a=>{var v,I,T;let o=C(e,"redirect"),l=[...e.querySelectorAll('[data-scope="menu"][data-part="item"]')].find(O=>O.getAttribute("data-value")===a.value),c=l==null?void 0:l.getAttribute("data-redirect"),u=l==null?void 0:l.hasAttribute("data-new-tab"),h=n();o&&a.value&&((v=h==null?void 0:h.isDead)!=null?v:!0)&&c!=="false"&&(u?window.open(a.value,"_blank","noopener,noreferrer"):window.location.href=a.value);let d=w(e,"onSelect");d&&h&&!h.isDead&&h.isConnected()&&t(d,{id:e.id,value:(I=a.value)!=null?I:null});let p=w(e,"onSelectClient");p&&e.dispatchEvent(new CustomEvent(p,{bubbles:!0,detail:{id:e.id,value:(T=a.value)!=null?T:null}}))},onOpenChange:a=>{var u,h;let o=n(),l=w(e,"onOpenChange");l&&o&&!o.isDead&&o.isConnected()&&t(l,{id:e.id,open:(u=a.open)!=null?u:!1});let c=w(e,"onOpenChangeClient");c&&e.dispatchEvent(new CustomEvent(c,{bubbles:!0,detail:{id:e.id,open:(h=a.open)!=null?h:!1}}))}}));i.init(),this.menu=i,this.nestedMenus=new Map;let r=e.querySelectorAll('[data-scope="menu"][data-nested="menu"]'),s=[];r.forEach((a,o)=>{var c;let l=a.id;if(l){let u=`${l}-${o}`,h=new Bg(a,{id:u,dir:w(a,"dir",["ltr","rtl"]),closeOnSelect:C(a,"closeOnSelect"),loopFocus:C(a,"loopFocus"),typeahead:C(a,"typeahead"),composite:C(a,"composite"),onSelect:m=>{var S,P,V;let d=C(e,"redirect"),p=[...e.querySelectorAll('[data-scope="menu"][data-part="item"]')].find(A=>A.getAttribute("data-value")===m.value),v=p==null?void 0:p.getAttribute("data-redirect"),I=p==null?void 0:p.hasAttribute("data-new-tab"),T=n();d&&m.value&&((S=T==null?void 0:T.isDead)!=null?S:!0)&&v!=="false"&&(I?window.open(m.value,"_blank","noopener,noreferrer"):window.location.href=m.value);let b=w(e,"onSelect");b&&T&&!T.isDead&&T.isConnected()&&t(b,{id:e.id,value:(P=m.value)!=null?P:null});let f=w(e,"onSelectClient");f&&e.dispatchEvent(new CustomEvent(f,{bubbles:!0,detail:{id:e.id,value:(V=m.value)!=null?V:null}}))}});h.init(),(c=this.nestedMenus)==null||c.set(l,h),s.push(h)}}),setTimeout(()=>{s.forEach(a=>{this.menu&&(this.menu.setChild(a),a.setParent(this.menu))}),this.menu&&this.menu.children.length>0&&this.menu.renderSubmenuTriggers()},0),this.onSetOpen=a=>{let{open:o}=a.detail;i.api.open!==o&&i.api.setOpen(o)},e.addEventListener("phx:menu:set-open",this.onSetOpen),this.handlers=[],this.handlers.push(this.handleEvent("menu_set_open",a=>{let o=a.menu_id;(!o||e.id===o||e.id===`menu:${o}`)&&i.api.setOpen(a.open)})),this.handlers.push(this.handleEvent("menu_open",()=>{this.pushEvent("menu_open_response",{open:i.api.open})}))},updated(){var e;this.el.hasAttribute("data-nested")||(e=this.menu)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlled")?{open:C(this.el,"open")}:{defaultOpen:C(this.el,"defaultOpen")}),{closeOnSelect:C(this.el,"closeOnSelect"),loopFocus:C(this.el,"loopFocus"),typeahead:C(this.el,"typeahead"),composite:C(this.el,"composite"),dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(!this.el.hasAttribute("data-nested")){if(this.onSetOpen&&this.el.removeEventListener("phx:menu:set-open",this.onSetOpen),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);if(this.nestedMenus)for(let[,t]of this.nestedMenus)t.destroy();(e=this.menu)==null||e.destroy()}}}});var rp={};he(rp,{NumberInput:()=>zT});function yT(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${n}`),t.style==="unit"&&!ya){var i;let{unit:a,unitDisplay:o="short"}=t;if(!a)throw new Error('unit option must be provided with style: "unit"');if(!(!((i=Jg[a])===null||i===void 0)&&i[o]))throw new Error(`Unsupported unit ${a} with unitDisplay = ${o}`);t=y(g({},t),{style:"decimal"})}let r=e+(t?Object.entries(t).sort((a,o)=>a[0]0||Object.is(n,0):t==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):i=n>0),i){let r=e.format(-n),s=e.format(n),a=r.replace(s,"").replace(/\u200e|\u061C/,"");return[...a].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),r.replace(s,"!!!").replace(a,"+").replace("!!!",s)}else return e.format(n)}}function kl(e,t,n){let i=Kg(e,t);if(!e.includes("-nu-")&&!i.isValidPartialNumber(n)){for(let r of IT)if(r!==i.options.numberingSystem){let s=Kg(e+(e.includes("-u-")?"-nu-":"-u-nu-")+r,t);if(s.isValidPartialNumber(n))return s}}return i}function Kg(e,t){let n=e+(t?Object.entries(t).sort((r,s)=>r[0]l.formatToParts(k));var m;let d=(m=(r=c.find(k=>k.type==="minusSign"))===null||r===void 0?void 0:r.value)!==null&&m!==void 0?m:"-",p=(s=u.find(k=>k.type==="plusSign"))===null||s===void 0?void 0:s.value;!p&&((i==null?void 0:i.signDisplay)==="exceptZero"||(i==null?void 0:i.signDisplay)==="always")&&(p="+");let I=(a=new Intl.NumberFormat(e,y(g({},n),{minimumFractionDigits:2,maximumFractionDigits:2})).formatToParts(.001).find(k=>k.type==="decimal"))===null||a===void 0?void 0:a.value,T=(o=c.find(k=>k.type==="group"))===null||o===void 0?void 0:o.value,O=c.filter(k=>!zg.has(k.type)).map(k=>Yg(k.value)),b=h.flatMap(k=>k.filter(N=>!zg.has(N.type)).map(N=>Yg(N.value))),f=[...new Set([...O,...b])].sort((k,N)=>N.length-k.length),S=f.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${f.join("|")}|[\\p{White_Space}]`,"gu"),P=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),V=new Map(P.map((k,N)=>[k,N])),A=new RegExp(`[${P.join("")}]`,"g");return{minusSign:d,plusSign:p,decimal:I,group:T,literals:S,numeral:A,index:k=>String(V.get(k))}}function Ui(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function Yg(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Dl(e,t){if(!(!e||!t.isActiveElement(e)))try{let{selectionStart:n,selectionEnd:i,value:r}=e;return n==null||i==null?void 0:{start:n,end:i,value:r}}catch(n){return}}function OT(e,t,n){if(!(!e||!n.isActiveElement(e))){if(!t){let i=e.value.length;e.setSelectionRange(i,i);return}try{let i=e.value,{start:r,end:s,value:a}=t;if(i===a){e.setSelectionRange(r,s);return}let o=jg(a,i,r),l=r===s?o:jg(a,i,s),c=Math.max(0,Math.min(o,i.length)),u=Math.max(c,Math.min(l,i.length));e.setSelectionRange(c,u)}catch(i){let r=e.value.length;e.setSelectionRange(r,r)}}}function jg(e,t,n){let i=e.slice(0,n),r=e.slice(n),s=0,a=Math.min(i.length,t.length);for(let c=0;c0&&s>=i.length)return s;if(o>=r.length)return t.length-o;if(s>0)return s;if(o>0)return t.length-o;if(n===0&&s===0&&o===0)return t.length;if(e.length>0){let c=n/e.length;return Math.round(c*t.length)}return t.length}function FT(e,t){let{state:n,send:i,prop:r,scope:s,computed:a}=e,o=n.hasTag("focus"),l=a("isDisabled"),c=!!r("readOnly"),u=!!r("required"),h=n.matches("scrubbing"),m=a("isValueEmpty"),d=a("isOutOfRange")||!!r("invalid"),p=l||!a("canIncrement")||c,v=l||!a("canDecrement")||c,I=r("translations");return{focused:o,invalid:d,empty:m,value:a("formattedValue"),valueAsNumber:a("valueAsNumber"),setValue(T){i({type:"VALUE.SET",value:T})},clearValue(){i({type:"VALUE.CLEAR"})},increment(){i({type:"VALUE.INCREMENT"})},decrement(){i({type:"VALUE.DECREMENT"})},setToMax(){i({type:"VALUE.SET",value:r("max")})},setToMin(){i({type:"VALUE.SET",value:r("min")})},focus(){var T;(T=ni(s))==null||T.focus()},getRootProps(){return t.element(y(g({id:wT(s)},Vn.root.attrs),{dir:r("dir"),"data-disabled":E(l),"data-focus":E(o),"data-invalid":E(d),"data-scrubbing":E(h)}))},getLabelProps(){return t.label(y(g({},Vn.label.attrs),{dir:r("dir"),"data-disabled":E(l),"data-focus":E(o),"data-invalid":E(d),"data-required":E(u),"data-scrubbing":E(h),id:xT(s),htmlFor:Lr(s),onClick(){H(()=>{tr(ni(s))})}}))},getControlProps(){return t.element(y(g({},Vn.control.attrs),{dir:r("dir"),role:"group","aria-disabled":l,"data-focus":E(o),"data-disabled":E(l),"data-invalid":E(d),"data-scrubbing":E(h),"aria-invalid":X(d)}))},getValueTextProps(){return t.element(y(g({},Vn.valueText.attrs),{dir:r("dir"),"data-disabled":E(l),"data-invalid":E(d),"data-focus":E(o),"data-scrubbing":E(h)}))},getInputProps(){return t.input(y(g({},Vn.input.attrs),{dir:r("dir"),name:r("name"),form:r("form"),id:Lr(s),role:"spinbutton",defaultValue:a("formattedValue"),pattern:r("formatOptions")?void 0:r("pattern"),inputMode:r("inputMode"),"aria-invalid":X(d),"data-invalid":E(d),disabled:l,"data-disabled":E(l),readOnly:c,required:r("required"),autoComplete:"off",autoCorrect:"off",spellCheck:"false",type:"text","aria-roledescription":"numberfield","aria-valuemin":r("min"),"aria-valuemax":r("max"),"aria-valuenow":Number.isNaN(a("valueAsNumber"))?void 0:a("valueAsNumber"),"aria-valuetext":a("valueText"),"data-scrubbing":E(h),onFocus(){i({type:"INPUT.FOCUS"})},onBlur(){i({type:"INPUT.BLUR"})},onInput(T){let O=Dl(T.currentTarget,s);i({type:"INPUT.CHANGE",target:T.currentTarget,hint:"set",selection:O})},onBeforeInput(T){var O;try{let{selectionStart:b,selectionEnd:f,value:S}=T.currentTarget,P=S.slice(0,b)+((O=T.data)!=null?O:"")+S.slice(f);a("parser").isValidPartialNumber(P)||T.preventDefault()}catch(b){}},onKeyDown(T){if(T.defaultPrevented||c||Re(T))return;let O=gi(T)*r("step"),f={ArrowUp(){i({type:"INPUT.ARROW_UP",step:O}),T.preventDefault()},ArrowDown(){i({type:"INPUT.ARROW_DOWN",step:O}),T.preventDefault()},Home(){xe(T)||(i({type:"INPUT.HOME"}),T.preventDefault())},End(){xe(T)||(i({type:"INPUT.END"}),T.preventDefault())},Enter(S){let P=Dl(S.currentTarget,s);i({type:"INPUT.ENTER",selection:P})}}[T.key];f==null||f(T)}}))},getDecrementTriggerProps(){return t.button(y(g({},Vn.decrementTrigger.attrs),{dir:r("dir"),id:tp(s),disabled:v,"data-disabled":E(v),"aria-label":I.decrementLabel,type:"button",tabIndex:-1,"aria-controls":Lr(s),"data-scrubbing":E(h),onPointerDown(T){var O;v||pe(T)&&(i({type:"TRIGGER.PRESS_DOWN",hint:"decrement",pointerType:T.pointerType}),T.pointerType==="mouse"&&T.preventDefault(),T.pointerType==="touch"&&((O=T.currentTarget)==null||O.focus({preventScroll:!0})))},onPointerUp(T){i({type:"TRIGGER.PRESS_UP",hint:"decrement",pointerType:T.pointerType})},onPointerLeave(){v||i({type:"TRIGGER.PRESS_UP",hint:"decrement"})}}))},getIncrementTriggerProps(){return t.button(y(g({},Vn.incrementTrigger.attrs),{dir:r("dir"),id:ep(s),disabled:p,"data-disabled":E(p),"aria-label":I.incrementLabel,type:"button",tabIndex:-1,"aria-controls":Lr(s),"data-scrubbing":E(h),onPointerDown(T){var O;p||!pe(T)||(i({type:"TRIGGER.PRESS_DOWN",hint:"increment",pointerType:T.pointerType}),T.pointerType==="mouse"&&T.preventDefault(),T.pointerType==="touch"&&((O=T.currentTarget)==null||O.focus({preventScroll:!0})))},onPointerUp(T){i({type:"TRIGGER.PRESS_UP",hint:"increment",pointerType:T.pointerType})},onPointerLeave(T){i({type:"TRIGGER.PRESS_UP",hint:"increment",pointerType:T.pointerType})}}))},getScrubberProps(){return t.element(y(g({},Vn.scrubber.attrs),{dir:r("dir"),"data-disabled":E(l),id:VT(s),role:"presentation","data-scrubbing":E(h),onMouseDown(T){if(l||!pe(T))return;let O=je(T),f=ue(T.currentTarget).devicePixelRatio;O.x=O.x-Ci(7.5,f),O.y=O.y-Ci(7.5,f),i({type:"SCRUBBER.PRESS_DOWN",point:O}),T.preventDefault(),H(()=>{tr(ni(s))})},style:{cursor:l?void 0:"ew-resize"}}))}}}var Al,Rl,ya,Jg,vT,ET,IT,Qg,Wg,PT,zg,CT,TT,Vn,wT,Lr,ep,tp,VT,np,xT,ni,AT,kT,ip,NT,RT,DT,LT,MT,$T,HT,Nl,ti,BT,_T,GT,UT,Xg,Zg,qT,WT,vA,KT,zT,sp=re(()=>{"use strict";se();Al=new Map,Rl=!1;try{Rl=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch(e){}ya=!1;try{ya=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch(e){}Jg={degree:{narrow:{default:"\xB0","ja-JP":" \u5EA6","zh-TW":"\u5EA6","sl-SI":" \xB0"}}},vT=class{format(e){let t="";if(!Rl&&this.options.signDisplay!=null?t=bT(this.numberFormatter,this.options.signDisplay,e):t=this.numberFormatter.format(e),this.options.style==="unit"&&!ya){var n;let{unit:i,unitDisplay:r="short",locale:s}=this.resolvedOptions();if(!i)return t;let a=(n=Jg[i])===null||n===void 0?void 0:n[r];t+=a[s]||a.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(e,t);if(t= start date");return`${this.format(e)} \u2013 ${this.format(t)}`}formatRangeToParts(e,t){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(e,t);if(t= start date");let n=this.numberFormatter.formatToParts(e),i=this.numberFormatter.formatToParts(t);return[...n.map(r=>y(g({},r),{source:"startRange"})),{type:"literal",value:" \u2013 ",source:"shared"},...i.map(r=>y(g({},r),{source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!Rl&&this.options.signDisplay!=null&&(e=y(g({},e),{signDisplay:this.options.signDisplay})),!ya&&this.options.style==="unit"&&(e=y(g({},e),{style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay})),e}constructor(e,t={}){this.numberFormatter=yT(e,t),this.options=t}};ET=new RegExp("^.*\\(.*\\).*$"),IT=["latn","arab","hanidec","deva","beng","fullwide"],Qg=class{parse(e){return kl(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,n){return kl(this.locale,this.options,e).isValidPartialNumber(e,t,n)}getNumberingSystem(e){return kl(this.locale,this.options,e).options.numberingSystem}constructor(e,t={}){this.locale=e,this.options=t}},Wg=new Map;PT=class{parse(e){let t=this.sanitize(e);if(this.symbols.group&&(t=Ui(t,this.symbols.group,"")),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(t=t.replace(this.symbols.minusSign,"-")),t=t.replace(this.symbols.numeral,this.symbols.index),this.options.style==="percent"){let s=t.indexOf("-");t=t.replace("-",""),t=t.replace("+","");let a=t.indexOf(".");a===-1&&(a=t.length),t=t.replace(".",""),a-2===0?t=`0.${t}`:a-2===-1?t=`0.0${t}`:a-2===-2?t="0.00":t=`${t.slice(0,a-2)}.${t.slice(a-2)}`,s>-1&&(t=`-${t}`)}let n=t?+t:NaN;if(isNaN(n))return NaN;if(this.options.style==="percent"){var i,r;let s=y(g({},this.options),{style:"decimal",minimumFractionDigits:Math.min(((i=this.options.minimumFractionDigits)!==null&&i!==void 0?i:0)+2,20),maximumFractionDigits:Math.min(((r=this.options.maximumFractionDigits)!==null&&r!==void 0?r:0)+2,20)});return new Qg(this.locale,s).parse(new vT(this.locale,s).format(n))}return this.options.currencySign==="accounting"&&ET.test(e)&&(n=-1*n),n}sanitize(e){return e=e.replace(this.symbols.literals,""),this.symbols.minusSign&&(e=e.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(e=e.replace(",",this.symbols.decimal),e=e.replace("\u060C",this.symbols.decimal)),this.symbols.group&&(e=Ui(e,".",this.symbols.group))),this.symbols.group==="\u2019"&&e.includes("'")&&(e=Ui(e,"'",this.symbols.group)),this.options.locale==="fr-FR"&&this.symbols.group&&(e=Ui(e," ",this.symbols.group),e=Ui(e,/\u00A0/g,this.symbols.group)),e}isValidPartialNumber(e,t=-1/0,n=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&n>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(e=Ui(e,this.symbols.group,"")),e=e.replace(this.symbols.numeral,""),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,"")),e.length===0)}constructor(e,t={}){this.locale=e,t.roundingIncrement!==1&&t.roundingIncrement!=null&&(t.maximumFractionDigits==null&&t.minimumFractionDigits==null?(t.maximumFractionDigits=0,t.minimumFractionDigits=0):t.maximumFractionDigits==null?t.maximumFractionDigits=t.minimumFractionDigits:t.minimumFractionDigits==null&&(t.minimumFractionDigits=t.maximumFractionDigits)),this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=ST(e,this.formatter,this.options,t);var n,i;this.options.style==="percent"&&(((n=this.options.minimumFractionDigits)!==null&&n!==void 0?n:0)>18||((i=this.options.maximumFractionDigits)!==null&&i!==void 0?i:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}},zg=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),CT=[0,4,2,1,11,20,3,7,100,21,.1,1.1];TT=U("numberInput").parts("root","label","input","control","valueText","incrementTrigger","decrementTrigger","scrubber"),Vn=TT.build();wT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`number-input:${e.id}`},Lr=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.input)!=null?n:`number-input:${e.id}:input`},ep=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.incrementTrigger)!=null?n:`number-input:${e.id}:inc`},tp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.decrementTrigger)!=null?n:`number-input:${e.id}:dec`},VT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.scrubber)!=null?n:`number-input:${e.id}:scrubber`},np=e=>`number-input:${e.id}:cursor`,xT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`number-input:${e.id}:label`},ni=e=>e.getById(Lr(e)),AT=e=>e.getById(ep(e)),kT=e=>e.getById(tp(e)),ip=e=>e.getDoc().getElementById(np(e)),NT=(e,t)=>{let n=null;return t==="increment"&&(n=AT(e)),t==="decrement"&&(n=kT(e)),n},RT=(e,t)=>{if(!Xe())return MT(e,t),()=>{var n;(n=ip(e))==null||n.remove()}},DT=e=>{let t=e.getDoc(),n=t.documentElement,i=t.body;return i.style.pointerEvents="none",n.style.userSelect="none",n.style.cursor="ew-resize",()=>{i.style.pointerEvents="",n.style.userSelect="",n.style.cursor="",n.style.length||n.removeAttribute("style"),i.style.length||i.removeAttribute("style")}},LT=(e,t)=>{let{point:n,isRtl:i,event:r}=t,s=e.getWin(),a=Ci(r.movementX,s.devicePixelRatio),o=Ci(r.movementY,s.devicePixelRatio),l=a>0?"increment":a<0?"decrement":null;i&&l==="increment"&&(l="decrement"),i&&l==="decrement"&&(l="increment");let c={x:n.x+a,y:n.y+o},u=s.innerWidth,h=Ci(7.5,s.devicePixelRatio);return c.x=Zc(c.x+h,u)-h,{hint:l,point:c}},MT=(e,t)=>{let n=e.getDoc(),i=n.createElement("div");i.className="scrubber--cursor",i.id=np(e),Object.assign(i.style,{width:"15px",height:"15px",position:"fixed",pointerEvents:"none",left:"0px",top:"0px",zIndex:ss,transform:t?`translate3d(${t.x}px, ${t.y}px, 0px)`:void 0,willChange:"transform"}),i.innerHTML=` +"use strict";var Corex=(()=>{var Kr=Object.defineProperty,Ff=Object.defineProperties,$f=Object.getOwnPropertyDescriptor,Hf=Object.getOwnPropertyDescriptors,Bf=Object.getOwnPropertyNames,Wr=Object.getOwnPropertySymbols;var Ha=Object.prototype.hasOwnProperty,rc=Object.prototype.propertyIsEnumerable;var Fa=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),_f=e=>{throw TypeError(e)};var $a=(e,t,n)=>t in e?Kr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g=(e,t)=>{for(var n in t||(t={}))Ha.call(t,n)&&$a(e,n,t[n]);if(Wr)for(var n of Wr(t))rc.call(t,n)&&$a(e,n,t[n]);return e},y=(e,t)=>Ff(e,Hf(t));var ft=(e,t)=>{var n={};for(var i in e)Ha.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&Wr)for(var i of Wr(e))t.indexOf(i)<0&&rc.call(e,i)&&(n[i]=e[i]);return n};var re=(e,t)=>()=>(e&&(t=e(e=0)),t);var he=(e,t)=>{for(var n in t)Kr(e,n,{get:t[n],enumerable:!0})},Gf=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Bf(t))!Ha.call(e,r)&&r!==n&&Kr(e,r,{get:()=>t[r],enumerable:!(i=$f(t,r))||i.enumerable});return e};var Uf=e=>Gf(Kr({},"__esModule",{value:!0}),e);var Y=(e,t,n)=>$a(e,typeof t!="symbol"?t+"":t,n);var Ve=(e,t,n)=>new Promise((i,r)=>{var s=l=>{try{o(n.next(l))}catch(c){r(c)}},a=l=>{try{o(n.throw(l))}catch(c){r(c)}},o=l=>l.done?i(l.value):Promise.resolve(l.value).then(s,a);o((n=n.apply(e,t)).next())}),qf=function(e,t){this[0]=e,this[1]=t};var sc=e=>{var t=e[Fa("asyncIterator")],n=!1,i,r={};return t==null?(t=e[Fa("iterator")](),i=s=>r[s]=a=>t[s](a)):(t=t.call(e),i=s=>r[s]=a=>{if(n){if(n=!1,s==="throw")throw a;return a}return n=!0,{done:!1,value:new qf(new Promise(o=>{var l=t[s](a);l instanceof Object||_f("Object expected"),o(l)}),1)}}),r[Fa("iterator")]=()=>r,i("next"),"throw"in t?i("throw"):r.throw=s=>{throw s},"return"in t&&i("return"),r};function Oe(e){let t=e.dataset.dir;if(t!==void 0&&Wf.includes(t))return t;let n=document.documentElement.getAttribute("dir");return n==="ltr"||n==="rtl"?n:"ltr"}function tr(e){if(e)try{if(e.ownerDocument.activeElement!==e)return;let t=e.value.length;e.setSelectionRange(t,t)}catch(t){}}function em(e){return["html","body","#document"].includes(bc(e))}function es(e){if(!e)return!1;let t=e.getRootNode();return di(t)===e}function Ot(e){if(e==null||!le(e))return!1;try{return nm(e)&&e.selectionStart!=null||rm.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function ce(e,t){var i;if(!e||!t||!le(e)||!le(t))return!1;let n=(i=t.getRootNode)==null?void 0:i.call(t);if(e===t||e.contains(t))return!0;if(n&&Ln(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Le(e){var t;return nr(e)?e:Qf(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function sm(e){return Le(e).documentElement}function de(e){var t,n,i;return Ln(e)?de(e.host):nr(e)?(t=e.defaultView)!=null?t:window:le(e)&&(i=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?i:window}function di(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){let n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function am(e){if(bc(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Ln(e)&&e.host||sm(e);return Ln(t)?t.host:t}function Ya(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),nr(t)||Ln(t))return t}catch(i){}return(n=e.ownerDocument)!=null?n:document}function at(e){return Ga.has(e)||Ga.set(e,de(e).getComputedStyle(e)),Ga.get(e)}function as(e,t){let n=new Set,i=Ya(e),r=s=>{let a=s.querySelectorAll("[aria-controls]");for(let o of a){if(o.getAttribute("aria-expanded")!=="true")continue;let l=Ec(o);for(let c of l){if(!c||n.has(c))continue;n.add(c);let d=i.getElementById(c);if(d){let h=d.getAttribute("role"),m=d.getAttribute("aria-modal")==="true";if(h&&om(h)&&!m&&(d===t||d.contains(t)||r(d)))return!0}}}return!1};return r(e)}function Xa(e,t){let n=Ya(e),i=new Set,r=s=>{let a=s.querySelectorAll("[aria-controls]");for(let o of a){if(o.getAttribute("aria-expanded")!=="true")continue;let l=Ec(o);for(let c of l){if(!c||i.has(c))continue;i.add(c);let d=n.getElementById(c);if(d){let h=d.getAttribute("role"),m=d.getAttribute("aria-modal")==="true";h&&ja.has(h)&&!m&&(t(d),r(d))}}}};r(e)}function Ic(e){let t=new Set;return Xa(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function lm(e){let t=e.getAttribute("role");return!!(t&&ja.has(t))}function cm(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function Pc(e){var t;return cm(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function Cc(e){if(!e.id)return!1;let t=Ya(e),n=CSS.escape(e.id),i=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(i)&&lm(e))}function Sc(e,t){let{type:n,quality:i=.92,background:r}=t;if(!e)throw new Error("[zag-js > getDataUrl]: Could not find the svg element");let s=de(e),a=s.document,o=e.getBoundingClientRect(),l=e.cloneNode(!0);l.hasAttribute("viewBox")||l.setAttribute("viewBox",`0 0 ${o.width} ${o.height}`);let d=`\r +`+new s.XMLSerializer().serializeToString(l),h="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(d);if(n==="image/svg+xml")return Promise.resolve(h).then(I=>(l.remove(),I));let m=s.devicePixelRatio||1,u=a.createElement("canvas"),p=new s.Image;p.src=h,u.width=o.width*m,u.height=o.height*m;let v=u.getContext("2d");return(n==="image/jpeg"||r)&&(v.fillStyle=r||"white",v.fillRect(0,0,u.width,u.height)),new Promise(I=>{p.onload=()=>{v==null||v.drawImage(p,0,0,u.width,u.height),I(u.toDataURL(n,i)),l.remove()}})}function dm(){var t;let e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}function um(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Oc(e){let{selectionStart:t,selectionEnd:n,value:i}=e.currentTarget,r=e.data;return i.slice(0,t)+(r!=null?r:"")+i.slice(n)}function vm(e){var t,n,i,r;return(r=(t=e.composedPath)==null?void 0:t.call(e))!=null?r:(i=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:i.call(n)}function j(e){var n;let t=vm(e);return(n=t==null?void 0:t[0])!=null?n:e.target}function Fn(e){let t=e.currentTarget;if(!t||!t.matches("a[href], button[type='submit'], input[type='submit']"))return!1;let i=e.button===1,r=ls(e);return i||r}function rr(e){let t=e.currentTarget;if(!t)return!1;let n=t.localName;return e.altKey?n==="a"||n==="button"&&t.type==="submit"||n==="input"&&t.type==="submit":!1}function Re(e){return Yt(e).isComposing||e.keyCode===229}function ls(e){return ui()?e.metaKey:e.ctrlKey}function wc(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}function Vc(e){return e.pointerType===""&&e.isTrusted?!0:mm()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function ge(e,t={}){var a;let{dir:n="ltr",orientation:i="horizontal"}=t,r=e.key;return r=(a=bm[r])!=null?a:r,n==="rtl"&&i==="horizontal"&&r in oc&&(r=oc[r]),r}function Yt(e){var t;return(t=e.nativeEvent)!=null?t:e}function gi(e){return e.ctrlKey||e.metaKey?.1:Em.has(e.key)||e.shiftKey&&Im.has(e.key)?10:1}function je(e,t="client"){let n=ym(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}function xc(e,t){var s;let{type:n="HTMLInputElement",property:i="value"}=t,r=de(e)[n].prototype;return(s=Object.getOwnPropertyDescriptor(r,i))!=null?s:{}}function Pm(e){if(e.localName==="input")return"HTMLInputElement";if(e.localName==="textarea")return"HTMLTextAreaElement";if(e.localName==="select")return"HTMLSelectElement"}function Me(e,t,n="value"){var r;if(!e)return;let i=Pm(e);i&&((r=xc(e,{type:i,property:n}).set)==null||r.call(e,t)),e.setAttribute(n,t)}function sr(e,t){var i;if(!e)return;(i=xc(e,{type:"HTMLInputElement",property:"checked"}).set)==null||i.call(e,t),t?e.setAttribute("checked",""):e.removeAttribute("checked")}function Ac(e,t){let{value:n,bubbles:i=!0}=t;if(!e)return;let r=de(e);e instanceof r.HTMLInputElement&&(Me(e,`${n}`),e.dispatchEvent(new r.Event("input",{bubbles:i})))}function pi(e,t){let{checked:n,bubbles:i=!0}=t;if(!e)return;let r=de(e);e instanceof r.HTMLInputElement&&(sr(e,n),e.dispatchEvent(new r.Event("click",{bubbles:i})))}function Cm(e){return Sm(e)?e.form:e.closest("form")}function Sm(e){return e.matches("textarea, input, select, button")}function Tm(e,t){if(!e)return;let n=Cm(e),i=r=>{r.defaultPrevented||t()};return n==null||n.addEventListener("reset",i,{passive:!0}),()=>n==null?void 0:n.removeEventListener("reset",i)}function Om(e,t){let n=e==null?void 0:e.closest("fieldset");if(!n)return;t(n.disabled);let i=de(n),r=new i.MutationObserver(()=>t(n.disabled));return r.observe(n,{attributes:!0,attributeFilter:["disabled"]}),()=>r.disconnect()}function wt(e,t){if(!e)return;let{onFieldsetDisabledChange:n,onFormReset:i}=t,r=[Tm(e,i),Om(e,n)];return()=>r.forEach(s=>s==null?void 0:s())}function Nc(e){let t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}function Am(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;let n=t(e);return(n===!0?e.shadowRoot:n)||null}function Rc(e,t,n){let i=[...e],r=[...e],s=new Set,a=new Map;e.forEach((l,c)=>a.set(l,c));let o=0;for(;o{a.set(u,m+p)});for(let u=m+d.length;u{a.set(u,m+p)})}r.push(...d)}}return i}function Ye(e){return!le(e)||e.closest("[inert]")?!1:e.matches(cs)&&im(e)}function jt(e,t={}){if(!e)return[];let{includeContainer:n,getShadowRoot:i}=t,r=Array.from(e.querySelectorAll(cs));n&&un(e)&&r.unshift(e);let s=[];for(let a of r)if(un(a)){if(kc(a)&&a.contentDocument){let o=a.contentDocument.body;s.push(...jt(o,{getShadowRoot:i}));continue}s.push(a)}if(i){let a=Rc(s,i,un);return!a.length&&n?r:a}return!s.length&&n?r:s}function un(e){return le(e)&&e.tabIndex>0?!0:Ye(e)&&!xm(e)}function km(e,t={}){let n=jt(e,t),i=n[0]||null,r=n[n.length-1]||null;return[i,r]}function fi(e){return e.tabIndex<0&&(wm.test(e.localName)||Ot(e))&&!Vm(e)?0:e.tabIndex}function ds(e){let{root:t,getInitialEl:n,filter:i,enabled:r=!0}=e;if(!r)return;let s=null;if(s||(s=typeof n=="function"?n():n),s||(s=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!s){let a=jt(t);s=i?a.filter(i)[0]:a[0]}return s||t||void 0}function us(e){let t=e.currentTarget;if(!t)return!1;let[n,i]=km(t);return!(es(n)&&e.shiftKey||es(i)&&!e.shiftKey||!n&&!i)}function H(e){let t=eo.create();return t.request(e),t.cleanup}function $n(e){let t=new Set;function n(i){let r=globalThis.requestAnimationFrame(i);t.add(()=>globalThis.cancelAnimationFrame(r))}return n(()=>n(e)),function(){t.forEach(r=>r())}}function Nm(e,t,n){let i=H(()=>{e.removeEventListener(t,r,!0),n()}),r=()=>{i(),n()};return e.addEventListener(t,r,{once:!0,capture:!0}),i}function Rm(e,t){if(!e)return;let{attributes:n,callback:i}=t,r=e.ownerDocument.defaultView||window,s=new r.MutationObserver(a=>{for(let o of a)o.type==="attributes"&&o.attributeName&&n.includes(o.attributeName)&&i(o)});return s.observe(e,{attributes:!0,attributeFilter:n}),()=>s.disconnect()}function ot(e,t){let{defer:n}=t,i=n?H:s=>s(),r=[];return r.push(i(()=>{let s=typeof e=="function"?e():e;r.push(Rm(s,t))})),()=>{r.forEach(s=>s==null?void 0:s())}}function Dm(e,t){let{callback:n}=t;if(!e)return;let i=e.ownerDocument.defaultView||window,r=new i.MutationObserver(n);return r.observe(e,{childList:!0,subtree:!0}),()=>r.disconnect()}function hs(e,t){let{defer:n}=t,i=n?H:s=>s(),r=[];return r.push(i(()=>{let s=typeof e=="function"?e():e;r.push(Dm(s,t))})),()=>{r.forEach(s=>s==null?void 0:s())}}function mi(e){let t=()=>{let n=de(e);e.dispatchEvent(new n.MouseEvent("click"))};fm()?Nm(e,"keyup",t):queueMicrotask(t)}function gs(e){let t=am(e);return em(t)?Le(t).body:le(t)&&Lc(t)?t:gs(t)}function Lc(e){let t=de(e),{overflow:n,overflowX:i,overflowY:r,display:s}=t.getComputedStyle(e);return Lm.test(n+r+i)&&!Mm.has(s)}function Fm(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function Xt(e,t){let r=t||{},{rootEl:n}=r,i=ft(r,["rootEl"]);!e||!n||!Lc(n)||!Fm(n)||e.scrollIntoView(i)}function to(e,t){let{left:n,top:i,width:r,height:s}=t.getBoundingClientRect(),a={x:e.x-n,y:e.y-i},o={x:ac(a.x/r),y:ac(a.y/s)};function l(c={}){let{dir:d="ltr",orientation:h="horizontal",inverted:m}=c,u=typeof m=="object"?m.x:m,p=typeof m=="object"?m.y:m;return h==="horizontal"?d==="rtl"||u?1-o.x:o.x:p?1-o.y:o.y}return{offset:a,percent:o,getPercentValue:l}}function Mc(e,t){let n=e.body,i="pointerLockElement"in e||"mozPointerLockElement"in e,r=()=>!!e.pointerLockElement;function s(){t==null||t(r())}function a(l){r()&&(t==null||t(!1)),console.error("PointerLock error occurred:",l),e.exitPointerLock()}if(!i)return;try{n.requestPointerLock()}catch(l){}let o=[ee(e,"pointerlockchange",s,!1),ee(e,"pointerlockerror",a,!1)];return()=>{o.forEach(l=>l()),e.exitPointerLock()}}function $m(e={}){let{target:t,doc:n}=e,i=n!=null?n:document,r=i.documentElement;return ir()?(ci==="default"&&(qa=r.style.webkitUserSelect,r.style.webkitUserSelect="none"),ci="disabled"):t&&(Xr.set(t,t.style.userSelect),t.style.userSelect="none"),()=>no({target:t,doc:i})}function no(e={}){let{target:t,doc:n}=e,r=(n!=null?n:document).documentElement;if(ir()){if(ci!=="disabled")return;ci="restoring",setTimeout(()=>{$n(()=>{ci==="restoring"&&(r.style.webkitUserSelect==="none"&&(r.style.webkitUserSelect=qa||""),qa="",ci="default")})},300)}else if(t&&Xr.has(t)){let s=Xr.get(t);t.style.userSelect==="none"&&(t.style.userSelect=s!=null?s:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Xr.delete(t)}}function io(e={}){let a=e,{defer:t,target:n}=a,i=ft(a,["defer","target"]),r=t?H:o=>o(),s=[];return s.push(r(()=>{let o=typeof n=="function"?n():n;s.push($m(y(g({},i),{target:o})))})),()=>{s.forEach(o=>o==null?void 0:o())}}function hn(e,t){let{onPointerMove:n,onPointerUp:i}=t,r=o=>{let l=je(o),c=Math.sqrt(l.x**2+l.y**2),d=o.pointerType==="touch"?10:5;if(!(c{let l=je(o);i({point:l,event:o})},a=[ee(e,"pointermove",r,!1),ee(e,"pointerup",s,!1),ee(e,"pointercancel",s,!1),ee(e,"contextmenu",s,!1),io({doc:e})];return()=>{a.forEach(o=>o())}}function ps(e){let{pointerNode:t,keyboardNode:n=t,onPress:i,onPressStart:r,onPressEnd:s,isValidKey:a=O=>O.key==="Enter"}=e;if(!t)return qt;let o=de(t),l=qt,c=qt,d=qt,h=O=>({point:je(O),event:O});function m(O){r==null||r(h(O))}function u(O){s==null||s(h(O))}let v=ee(t,"pointerdown",O=>{c();let f=ee(o,"pointerup",P=>{let V=j(P);ce(t,V)?i==null||i(h(P)):s==null||s(h(P))},{passive:!i,once:!0}),S=ee(o,"pointercancel",u,{passive:!s,once:!0});c=_a(f,S),es(n)&&O.pointerType==="mouse"&&O.preventDefault(),m(O)},{passive:!r}),I=ee(n,"focus",T);l=_a(v,I);function T(){let O=P=>{if(!a(P))return;let V=x=>{if(!a(x))return;let k=new o.PointerEvent("pointerup"),N=h(k);i==null||i(N),s==null||s(N)};c(),c=ee(n,"keyup",V);let A=new o.PointerEvent("pointerdown");m(A)},b=()=>{let P=new o.PointerEvent("pointercancel");u(P)},f=ee(n,"keydown",O),S=ee(n,"blur",b);d=_a(f,S)}return()=>{l(),c(),d()}}function Fe(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function vi(e,t){var n;return(n=e==null?void 0:e.querySelector(t))!=null?n:null}function so(e,t,n=ro){return e.find(i=>n(i)===t)}function ao(e,t,n=ro){let i=so(e,t,n);return i?e.indexOf(i):-1}function yi(e,t,n=!0){let i=ao(e,t);return i=n?(i+1)%e.length:Math.min(i+1,e.length-1),e[i]}function bi(e,t,n=!0){let i=ao(e,t);return i===-1?n?e[e.length-1]:null:(i=n?(i-1+e.length)%e.length:Math.max(0,i-1),e[i])}function Hm(e){let t=new WeakMap,n,i=new WeakMap,r=o=>n||(n=new o.ResizeObserver(l=>{for(let c of l){i.set(c.target,c);let d=t.get(c.target);if(d)for(let h of d)h(c)}}),n);return{observe:(o,l)=>{let c=t.get(o)||new Set;c.add(l),t.set(o,c);let d=de(o);return r(d).observe(o,e),()=>{let h=t.get(o);h&&(h.delete(l),h.size===0&&(t.delete(o),r(d).unobserve(o)))}},unobserve:o=>{t.delete(o),n==null||n.unobserve(o)}}}function Um(e,t,n,i=ro){let r=n?ao(e,n,i):-1,s=n?jf(e,r):e;return t.length===1&&(s=s.filter(o=>i(o)!==n)),s.find(o=>Gm(_m(o),t))}function Fc(e,t,n){let i=e.getAttribute(t),r=i!=null;return i===n?qt:(e.setAttribute(t,n),()=>{r?e.setAttribute(t,i):e.removeAttribute(t)})}function Hn(e,t){if(!e)return qt;let n=Object.keys(t).reduce((i,r)=>(i[r]=e.style.getPropertyValue(r),i),{});return qm(n,t)?qt:(Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")})}function $c(e,t,n){if(!e)return qt;let i=e.style.getPropertyValue(t);return i===n?qt:(e.style.setProperty(t,n),()=>{e.style.setProperty(t,i),e.style.length===0&&e.removeAttribute("style")})}function qm(e,t){return Object.keys(e).every(n=>e[n]===t[n])}function Wm(e,t){let{state:n,activeId:i,key:r,timeout:s=350,itemToId:a}=t,o=n.keysSoFar+r,c=o.length>1&&Array.from(o).every(p=>p===o[0])?o[0]:o,d=e.slice(),h=Um(d,c,i,a);function m(){clearTimeout(n.timer),n.timer=-1}function u(p){n.keysSoFar=p,m(),p!==""&&(n.timer=+setTimeout(()=>{u(""),m()},s))}return u(o),h}function Km(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}function zm(e,t,n){let{signal:i}=t;return[new Promise((a,o)=>{let l=setTimeout(()=>{o(new Error(`Timeout of ${n}ms exceeded`))},n);i.addEventListener("abort",()=>{clearTimeout(l),o(new Error("Promise aborted"))}),e.then(c=>{i.aborted||(clearTimeout(l),a(c))}).catch(c=>{i.aborted||(clearTimeout(l),o(c))})}),()=>t.abort()]}function Hc(e,t){let{timeout:n,rootNode:i}=t,r=de(i),s=Le(i),a=new r.AbortController;return zm(new Promise(o=>{let l=e();if(l){o(l);return}let c=new r.MutationObserver(()=>{let d=e();d&&d.isConnected&&(c.disconnect(),o(d))});c.observe(s.body,{childList:!0,subtree:!0})}),a,n)}function or(e){return e==null?[]:Array.isArray(e)?e:[e]}function Ei(e,t,n={}){let{step:i=1,loop:r=!0}=n,s=t+i,a=e.length,o=a-1;return t===-1?i>0?0:o:s<0?r?o:0:s>=a?r?0:t>a?a:t:s}function _c(e,t,n={}){return e[Ei(e,t,n)]}function lr(e,t,n={}){let{step:i=1,loop:r=!0}=n;return Ei(e,t,{step:-i,loop:r})}function Gc(e,t,n={}){return e[lr(e,t,n)]}function cr(e,t){return e.reduce((n,i,r)=>{var s;return r%t===0?n.push([i]):(s=mt(n))==null||s.push(i),n},[])}function oo(e,t){return e.reduce(([n,i],r)=>(t(r)?n.push(r):i.push(r),[n,i]),[[],[]])}function Ce(e,t,...n){var r;if(e in t){let s=t[e];return Wt(s)?s(...n):s}let i=new Error(`No matching key: ${JSON.stringify(e)} in ${JSON.stringify(Object.keys(t))}`);throw(r=Error.captureStackTrace)==null||r.call(Error,i,Ce),i}function Yc(e,t=0){let n=0,i=null;return(...r)=>{let s=Date.now(),a=s-n;a>=t?(i&&(clearTimeout(i),i=null),e(...r),n=s):i||(i=setTimeout(()=>{e(...r),n=Date.now(),i=null},t-a))}}function Si(e){if(!Qi(e)||e===void 0)return e;let t=Reflect.ownKeys(e).filter(i=>typeof i=="string"),n={};for(let i of t){let r=e[i];r!==void 0&&(n[i]=Si(r))}return n}function fn(e,t){let n={};for(let i of t){let r=e[i];r!==void 0&&(n[i]=r)}return n}function dv(e,t){let n={},i={},r=new Set(t),s=Reflect.ownKeys(e);for(let a of s)r.has(a)?i[a]=e[a]:n[a]=e[a];return[i,n]}function sd(e,t){let n=new rd(({now:i,deltaMs:r})=>{if(r>=t){let s=t>0?i-r%t:i;n.setStartMs(s),e({startMs:s,deltaMs:r})}});return n.start(),()=>n.stop()}function mn(e,t){let n=new rd(({deltaMs:i})=>{if(i>=t)return e(),!1});return n.start(),()=>n.stop()}function zt(...e){let t=e.length===1?e[0]:e[1];(e.length===2?e[0]:!0)&&console.warn(t)}function vs(...e){let t=e.length===1?e[0]:e[1];if(e.length===2?e[0]:!0)throw new Error(t)}function vn(e,t){if(e==null)throw new Error(t())}function yn(e,t,n){let i=[];for(let r of t)e[r]==null&&i.push(r);if(i.length>0)throw new Error(`[zag-js${n?` > ${n}`:""}] missing required props: ${i.join(", ")}`)}function ad(...e){let t={};for(let n of e){if(!n)continue;for(let r in t){if(r.startsWith("on")&&typeof t[r]=="function"&&typeof n[r]=="function"){t[r]=At(n[r],t[r]);continue}if(r==="className"||r==="class"){t[r]=uv(t[r],n[r]);continue}if(r==="style"){t[r]=gv(t[r],n[r]);continue}t[r]=n[r]!==void 0?n[r]:t[r]}for(let r in n)t[r]===void 0&&(t[r]=n[r]);let i=Object.getOwnPropertySymbols(n);for(let r of i)t[r]=n[r]}return t}function Bn(e,t,n){let i=[],r;return s=>{var l;let a=e(s);return(a.length!==i.length||a.some((c,d)=>!fe(i[d],c)))&&(i=a,r=t(a,s),(l=n==null?void 0:n.onChange)==null||l.call(n,r)),r}}function Ee(){return{and:(...e)=>function(n){return e.every(i=>n.guard(i))},or:(...e)=>function(n){return e.some(i=>n.guard(i))},not:e=>function(n){return!n.guard(e)}}}function dt(){return{guards:Ee(),createMachine:e=>e,choose:e=>function({choose:n}){var i;return(i=n(e))==null?void 0:i.actions}}}function pv(e){let t=()=>{var a,o;return(o=(a=e.getRootNode)==null?void 0:a.call(e))!=null?o:document},n=()=>Le(t()),i=()=>{var a;return(a=n().defaultView)!=null?a:window},r=()=>di(t()),s=a=>t().getElementById(a);return y(g({},e),{getRootNode:t,getDoc:n,getWin:i,getActiveElement:r,isActiveElement:es,getById:s})}function fv(e){return new Proxy({},{get(t,n){return n==="style"?i=>e({style:i}).style:e}})}function bv(){if(typeof globalThis!="undefined")return globalThis;if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global}function od(e,t){let n=bv();return n?(n[e]||(n[e]=t()),n[e]):t()}function ys(e={}){return Tv(e)}function ns(e,t,n){let i=Dn.get(e);ts()&&!i&&console.warn("Please use proxy object");let r,s=[],a=i[3],o=!1,c=a(d=>{if(s.push(d),n){t(s.splice(0));return}r||(r=Promise.resolve().then(()=>{r=void 0,o&&t(s.splice(0))}))});return o=!0,()=>{o=!1,c()}}function Ov(e){let t=Dn.get(e);ts()&&!t&&console.warn("Please use proxy object");let[n,i,r]=t;return r(n,i())}function Rv(e,t,n){let i=n||"default",r=Yr.get(e);r||(r=new Map,Yr.set(e,r));let s=r.get(i)||{},a=Object.keys(t),o=(v,I)=>{e.addEventListener(v.toLowerCase(),I)},l=(v,I)=>{e.removeEventListener(v.toLowerCase(),I)},c=v=>v.startsWith("on"),d=v=>!v.startsWith("on"),h=v=>o(v.substring(2),t[v]),m=v=>l(v.substring(2),t[v]),u=v=>{let I=t[v],T=s[v];if(I!==T){if(v==="class"){e.className=I!=null?I:"";return}if(yc.has(v)){e[v]=I!=null?I:"";return}if(typeof I=="boolean"&&!v.includes("aria-")){e.toggleAttribute(jr(e,v),I);return}if(v==="children"){e.innerHTML=I;return}if(I!=null){e.setAttribute(jr(e,v),I);return}e.removeAttribute(jr(e,v))}};for(let v in s)t[v]==null&&(v==="class"?e.className="":yc.has(v)?e[v]="":e.removeAttribute(jr(e,v)));return Object.keys(s).filter(c).forEach(v=>{l(v.substring(2),s[v])}),a.filter(c).forEach(h),a.filter(d).forEach(u),r.set(i,t),function(){a.filter(c).forEach(m);let I=Yr.get(e);I&&(I.delete(i),I.size===0&&Yr.delete(e))}}function is(e){var s,a;let t=(s=e().value)!=null?s:e().defaultValue;e().debug&&console.log(`[bindable > ${e().debug}] initial`,t);let n=(a=e().isEqual)!=null?a:Object.is,i=ys({value:t}),r=()=>e().value!==void 0;return{initial:t,ref:i,get(){return r()?e().value:i.value},set(o){var d,h;let l=i.value,c=Wt(o)?o(l):o;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:c,prev:l}),r()||(i.value=c),n(c,l)||(h=(d=e()).onChange)==null||h.call(d,c,l)},invoke(o,l){var c,d;(d=(c=e()).onChange)==null||d.call(c,o,l)},hash(o){var l,c,d;return(d=(c=(l=e()).hash)==null?void 0:c.call(l,o))!=null?d:String(o)}}}function Dv(e){let t={current:e};return{get(n){return t.current[n]},set(n,i){t.current[n]=i}}}function ld(e,t){if(!Qi(e)||!Qi(t))return t===void 0?e:t;let n=g({},e);for(let i of Object.keys(t)){let r=t[i],s=e[i];r!==void 0&&(Qi(s)&&Qi(r)?n[i]=ld(s,r):n[i]=r)}return n}var Wf,w,Z,z,C,Mn,U,li,Kf,zf,Yf,Ba,ac,jf,_a,qt,rs,ss,E,X,Xf,Zf,Jf,le,nr,Qf,bc,tm,Ln,nm,st,im,rm,Ga,ja,om,Ec,os,Za,Tc,hm,Ja,gm,pm,ir,Qa,ui,Xe,fm,mm,pe,hi,xe,ym,bm,oc,Em,Im,ee,kc,wm,Vm,xm,cs,ar,eo,Lm,Mm,ci,qa,Xr,ro,gn,Bm,_m,Gm,Ue,Vt,Ym,Bc,jm,dn,Xm,lc,Zm,lt,mt,Jm,Ze,ct,vt,fs,yt,cc,Qm,fe,pn,Uc,qc,xt,Zr,Wt,Wc,$e,ev,Kc,tv,Qi,nv,iv,rv,Kt,lo,sv,zc,At,dr,jc,dc,Xc,av,ov,lv,cv,Wa,Ii,Zc,Jc,Qc,Pi,He,uc,Ci,ed,ms,hc,td,nd,id,ye,B,zr,Jr,rd,uv,hv,gc,gv,er,Ua,_,n0,mv,pc,Ka,vv,yv,fc,Qr,Ev,Iv,Pv,Cv,za,mc,ts,Dn,Sv,Tv,wv,Vv,oe,vc,xv,Av,q,Yr,yc,kv,Nv,jr,W,K,se=re(()=>{"use strict";Wf=["ltr","rtl"];w=(e,t,n)=>{let i=e.dataset[t];if(i!==void 0&&(!n||n.includes(i)))return i},Z=(e,t)=>{let n=e.dataset[t];if(typeof n=="string")return n.split(",").map(i=>i.trim()).filter(i=>i.length>0)},z=(e,t,n)=>{let i=e.dataset[t];if(i===void 0)return;let r=Number(i);if(!Number.isNaN(r))return n&&!n.includes(r)?0:r},C=(e,t)=>{let n=t.replace(/([A-Z])/g,"-$1").toLowerCase();return e.hasAttribute(`data-${n}`)},Mn=(e,t="element")=>e!=null&&e.id?e.id:`${t}-${Math.random().toString(36).substring(2,9)}`,U=(e,t=[])=>({parts:(...n)=>{if(Kf(t))return U(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>U(e,[...t,...n]),omit:(...n)=>U(e,t.filter(i=>!n.includes(i))),rename:n=>U(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,i)=>Object.assign(n,{[i]:{selector:[`&[data-scope="${li(e)}"][data-part="${li(i)}"]`,`& [data-scope="${li(e)}"][data-part="${li(i)}"]`].join(", "),attrs:{"data-scope":li(e),"data-part":li(i)}}}),{})}),li=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),Kf=e=>e.length===0,zf=Object.defineProperty,Yf=(e,t,n)=>t in e?zf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ba=(e,t,n)=>Yf(e,typeof t!="symbol"?t+"":t,n);ac=e=>Math.max(0,Math.min(1,e)),jf=(e,t)=>e.map((n,i)=>e[(Math.max(t,0)+i)%e.length]),_a=(...e)=>t=>e.reduce((n,i)=>i(n),t),qt=()=>{},rs=e=>typeof e=="object"&&e!==null,ss=2147483647,E=e=>e?"":void 0,X=e=>e?"true":void 0,Xf=1,Zf=9,Jf=11,le=e=>rs(e)&&e.nodeType===Xf&&typeof e.nodeName=="string",nr=e=>rs(e)&&e.nodeType===Zf,Qf=e=>rs(e)&&e===e.window,bc=e=>le(e)?e.localName||"":"#document";tm=e=>rs(e)&&e.nodeType!==void 0,Ln=e=>tm(e)&&e.nodeType===Jf&&"host"in e,nm=e=>le(e)&&e.localName==="input",st=e=>!!(e!=null&&e.matches("a[href]")),im=e=>le(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;rm=/(textarea|select)/;Ga=new WeakMap;ja=new Set(["menu","listbox","dialog","grid","tree","region"]),om=e=>ja.has(e),Ec=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};os=()=>typeof document!="undefined";Za=e=>os()&&e.test(dm()),Tc=e=>os()&&e.test(um()),hm=e=>os()&&e.test(navigator.vendor),Ja=()=>os()&&!!navigator.maxTouchPoints,gm=()=>Za(/^iPhone/i),pm=()=>Za(/^iPad/i)||ui()&&navigator.maxTouchPoints>1,ir=()=>gm()||pm(),Qa=()=>ui()||ir(),ui=()=>Za(/^Mac/i),Xe=()=>Qa()&&hm(/apple/i),fm=()=>Tc(/Firefox/i),mm=()=>Tc(/Android/i);pe=e=>e.button===0,hi=e=>e.button===2||ui()&&e.ctrlKey&&e.button===0,xe=e=>e.ctrlKey||e.altKey||e.metaKey,ym=e=>"touches"in e&&e.touches.length>0,bm={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},oc={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};Em=new Set(["PageUp","PageDown"]),Im=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]);ee=(e,t,n,i)=>{let r=typeof e=="function"?e():e;return r==null||r.addEventListener(t,n,i),()=>{r==null||r.removeEventListener(t,n,i)}};kc=e=>le(e)&&e.tagName==="IFRAME",wm=/^(audio|video|details)$/;Vm=e=>!Number.isNaN(Nc(e)),xm=e=>Nc(e)<0;cs="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",ar=(e,t={})=>{if(!e)return[];let{includeContainer:n=!1,getShadowRoot:i}=t,r=Array.from(e.querySelectorAll(cs));(n==!0||n=="if-empty"&&r.length===0)&&le(e)&&Ye(e)&&r.unshift(e);let a=[];for(let o of r)if(Ye(o)){if(kc(o)&&o.contentDocument){let l=o.contentDocument.body;a.push(...ar(l,{getShadowRoot:i}));continue}a.push(o)}return i?Rc(a,i,Ye):a};eo=class Dc{constructor(){Ba(this,"id",null),Ba(this,"fn_cleanup"),Ba(this,"cleanup",()=>{this.cancel()})}static create(){return new Dc}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};Lm=/auto|scroll|overlay|hidden|clip/,Mm=new Set(["inline","contents"]);ci="default",qa="",Xr=new WeakMap;ro=e=>e.id;gn=Hm({box:"border-box"}),Bm=e=>e.split("").map(t=>{let n=t.charCodeAt(0);return n>0&&n<128?t:n>=128&&n<=255?`/x${n.toString(16)}`.replace("/","\\"):""}).join("").trim(),_m=e=>{var t,n,i;return Bm((i=(n=(t=e.dataset)==null?void 0:t.valuetext)!=null?n:e.textContent)!=null?i:"")},Gm=(e,t)=>e.trim().toLowerCase().startsWith(t.toLowerCase());Ue=Object.assign(Wm,{defaultOptions:{keysSoFar:"",timer:-1},isValidEvent:Km});Vt={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"};Ym=Object.defineProperty,Bc=e=>{throw TypeError(e)},jm=(e,t,n)=>t in e?Ym(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dn=(e,t,n)=>jm(e,typeof t!="symbol"?t+"":t,n),Xm=(e,t,n)=>t.has(e)||Bc("Cannot "+n),lc=(e,t,n)=>(Xm(e,t,"read from private field"),t.get(e)),Zm=(e,t,n)=>t.has(e)?Bc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n);lt=e=>e[0],mt=e=>e[e.length-1],Jm=(e,t)=>e.indexOf(t)!==-1,Ze=(e,...t)=>e.concat(t),ct=(e,...t)=>e.filter(n=>!t.includes(n)),vt=e=>Array.from(new Set(e)),fs=(e,t)=>{let n=new Set(t);return e.filter(i=>!n.has(i))},yt=(e,t)=>Jm(e,t)?ct(e,t):Ze(e,t);cc=e=>(e==null?void 0:e.constructor.name)==="Array",Qm=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof(e==null?void 0:e.isEqual)=="function"&&typeof(t==null?void 0:t.isEqual)=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if(cc(e)&&cc(t))return Qm(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;let n=Object.keys(t!=null?t:Object.create(null)),i=n.length;for(let r=0;rArray.isArray(e),Uc=e=>e===!0||e===!1,qc=e=>e!=null&&typeof e=="object",xt=e=>qc(e)&&!pn(e),Zr=e=>typeof e=="string",Wt=e=>typeof e=="function",Wc=e=>e==null,$e=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),ev=e=>Object.prototype.toString.call(e),Kc=Function.prototype.toString,tv=Kc.call(Object),Qi=e=>{if(!qc(e)||ev(e)!="[object Object]"||rv(e))return!1;let t=Object.getPrototypeOf(e);if(t===null)return!0;let n=$e(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Kc.call(n)==tv},nv=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,iv=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,rv=e=>nv(e)||iv(e),Kt=(e,...t)=>{let n=typeof e=="function"?e(...t):e;return n!=null?n:void 0},lo=e=>e,sv=e=>e(),zc=()=>{},At=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})},dr=(()=>{let e=0;return()=>(e++,e.toString(36))})();({floor:jc,abs:dc,round:Xc,min:av,max:ov,pow:lv,sign:cv}=Math),Wa=e=>Number.isNaN(e),Ii=e=>Wa(e)?0:e,Zc=(e,t)=>(e%t+t)%t,Jc=(e,t)=>Ii(e)>=t,Qc=(e,t)=>Ii(e)<=t,Pi=(e,t,n)=>{let i=Ii(e),r=t==null||i>=t,s=n==null||i<=n;return r&&s},He=(e,t,n)=>av(ov(Ii(e),t),n),uc=(e,t)=>{let n=e,i=t.toString(),r=i.indexOf("."),s=r>=0?i.length-r:0;if(s>0){let a=lv(10,s);n=Xc(n*a)/a}return n},Ci=(e,t)=>typeof t=="number"?jc(e*t+.5)/t:Xc(e),ed=(e,t,n,i)=>{let r=t!=null?Number(t):0,s=Number(n),a=(e-r)%i,o=dc(a)*2>=i?e+cv(a)*(i-dc(a)):e-a;if(o=uc(o,i),!Wa(r)&&os){let l=jc((s-r)/i),c=r+l*i;o=l<=0||ce[t]===n?e:[...e.slice(0,t),n,...e.slice(t+1)],hc=e=>{if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n},td=(e,t,n)=>{let i=t==="+"?e+n:e-n;if(e%1!==0||n%1!==0){let r=10**Math.max(hc(e),hc(n));e=Math.round(e*r),n=Math.round(n*r),i=t==="+"?e+n:e-n,i/=r}return i},nd=(e,t)=>td(Ii(e),"+",t),id=(e,t)=>td(Ii(e),"-",t),ye=e=>typeof e=="number"?`${e}px`:e;B=e=>function(n){return dv(n,e)},zr=()=>performance.now(),rd=class{constructor(e){this.onTick=e,dn(this,"frameId",null),dn(this,"pausedAtMs",null),dn(this,"context"),dn(this,"cancelFrame",()=>{this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null)}),dn(this,"setStartMs",t=>{this.context.startMs=t}),dn(this,"start",()=>{if(this.frameId!==null)return;let t=zr();this.pausedAtMs!==null?(this.context.startMs+=t-this.pausedAtMs,this.pausedAtMs=null):this.context.startMs=t,this.frameId=requestAnimationFrame(lc(this,Jr))}),dn(this,"pause",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=zr())}),dn(this,"stop",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=null)}),Zm(this,Jr,t=>{if(this.context.now=t,this.context.deltaMs=t-this.context.startMs,this.onTick(this.context)===!1){this.stop();return}this.frameId=requestAnimationFrame(lc(this,Jr))}),this.context={now:0,startMs:zr(),deltaMs:0}}get elapsedMs(){return this.pausedAtMs!==null?this.pausedAtMs-this.context.startMs:zr()-this.context.startMs}};Jr=new WeakMap;uv=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),hv=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,gc=e=>{let t={},n;for(;n=hv.exec(e);)t[n[1]]=n[2];return t},gv=(e,t)=>{if(Zr(e)){if(Zr(t))return`${e};${t}`;e=gc(e)}else Zr(t)&&(t=gc(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};er=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(er||{}),Ua="__init__";_=()=>e=>Array.from(new Set(e)),n0=Symbol(),mv=Symbol(),pc=Object.getPrototypeOf,Ka=new WeakMap,vv=e=>e&&(Ka.has(e)?Ka.get(e):pc(e)===Object.prototype||pc(e)===Array.prototype),yv=e=>vv(e)&&e[mv]||null,fc=(e,t=!0)=>{Ka.set(e,t)};Qr=od("__zag__refSet",()=>new WeakSet),Ev=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,Iv=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,Pv=e=>typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeName=="string",Cv=e=>Ev(e)||Iv(e)||Pv(e),za=e=>e!==null&&typeof e=="object",mc=e=>za(e)&&!Qr.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!Cv(e)&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)&&!(e instanceof Promise)&&!(e instanceof File)&&!(e instanceof Blob)&&!(e instanceof AbortController),ts=()=>!0,Dn=od("__zag__proxyStateMap",()=>new WeakMap),Sv=(e=Object.is,t=(o,l)=>new Proxy(o,l),n=new WeakMap,i=(o,l)=>{let c=n.get(o);if((c==null?void 0:c[0])===l)return c[1];let d=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o));return fc(d,!0),n.set(o,[l,d]),Reflect.ownKeys(o).forEach(h=>{let m=Reflect.get(o,h);Qr.has(m)?(fc(m,!1),d[h]=m):Dn.has(m)?d[h]=Ov(m):d[h]=m}),Object.freeze(d)},r=new WeakMap,s=[1,1],a=o=>{if(!za(o))throw new Error("object required");let l=r.get(o);if(l)return l;let c=s[0],d=new Set,h=(V,A=++s[0])=>{c!==A&&(c=A,d.forEach(x=>x(V,A)))},m=s[1],u=(V=++s[1])=>(m!==V&&!d.size&&(m=V,v.forEach(([A])=>{let x=A[1](V);x>c&&(c=x)})),c),p=V=>(A,x)=>{let k=[...A];k[1]=[V,...k[1]],h(k,x)},v=new Map,I=(V,A)=>{if(ts()&&v.has(V))throw new Error("prop listener already exists");if(d.size){let x=A[3](p(V));v.set(V,[A,x])}else v.set(V,[A])},T=V=>{var x;let A=v.get(V);A&&(v.delete(V),(x=A[1])==null||x.call(A))},O=V=>(d.add(V),d.size===1&&v.forEach(([x,k],N)=>{if(ts()&&k)throw new Error("remove already exists");let D=x[3](p(N));v.set(N,[x,D])}),()=>{d.delete(V),d.size===0&&v.forEach(([x,k],N)=>{k&&(k(),v.set(N,[x]))})}),b=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o)),S=t(b,{deleteProperty(V,A){let x=Reflect.get(V,A);T(A);let k=Reflect.deleteProperty(V,A);return k&&h(["delete",[A],x]),k},set(V,A,x,k){var te;let N=Reflect.has(V,A),D=Reflect.get(V,A,k);if(N&&(e(D,x)||r.has(x)&&e(D,r.get(x))))return!0;T(A),za(x)&&(x=yv(x)||x);let $=x;if(!((te=Object.getOwnPropertyDescriptor(V,A))!=null&&te.set)){!Dn.has(x)&&mc(x)&&($=ys(x));let J=!Qr.has($)&&Dn.get($);J&&I(A,J)}return Reflect.set(V,A,$,k),h(["set",[A],x,D]),!0}});r.set(o,S);let P=[b,u,i,O];return Dn.set(S,P),Reflect.ownKeys(o).forEach(V=>{let A=Object.getOwnPropertyDescriptor(o,V);A.get||A.set?Object.defineProperty(b,V,A):S[V]=o[V]}),S})=>[a,Dn,Qr,e,t,mc,n,i,r,s],[Tv]=Sv();wv=Object.defineProperty,Vv=(e,t,n)=>t in e?wv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oe=(e,t,n)=>Vv(e,typeof t!="symbol"?t+"":t,n),vc={onFocus:"onFocusin",onBlur:"onFocusout",onChange:"onInput",onDoubleClick:"onDblclick",htmlFor:"for",className:"class",defaultValue:"value",defaultChecked:"checked"},xv=new Set(["viewBox","preserveAspectRatio"]),Av=e=>{let t="";for(let n in e){let i=e[n];i!=null&&(n.startsWith("--")||(n=n.replace(/[A-Z]/g,r=>`-${r.toLowerCase()}`)),t+=`${n}:${i};`)}return t},q=fv(e=>Object.entries(e).reduce((t,[n,i])=>{if(i===void 0)return t;if(n in vc&&(n=vc[n]),n==="style"&&typeof i=="object")return t.style=Av(i),t;let r=xv.has(n)?n:n.toLowerCase();return t[r]=i,t},{})),Yr=new WeakMap,yc=new Set(["value","checked","selected"]),kv=new Set(["viewBox","preserveAspectRatio","clipPath","clipRule","fillRule","strokeWidth","strokeLinecap","strokeLinejoin","strokeDasharray","strokeDashoffset","strokeMiterlimit"]),Nv=e=>e.tagName==="svg"||e.namespaceURI==="http://www.w3.org/2000/svg",jr=(e,t)=>Nv(e)&&kv.has(t)?t:t.toLowerCase();is.cleanup=e=>{};is.ref=e=>{let t=e;return{get:()=>t,set:n=>{t=n}}};W=class{constructor(e,t={}){var h,m,u;this.machine=e,oe(this,"scope"),oe(this,"context"),oe(this,"prop"),oe(this,"state"),oe(this,"refs"),oe(this,"computed"),oe(this,"event",{type:""}),oe(this,"previousEvent",{type:""}),oe(this,"effects",new Map),oe(this,"transition",null),oe(this,"cleanups",[]),oe(this,"subscriptions",[]),oe(this,"userPropsRef"),oe(this,"getEvent",()=>y(g({},this.event),{current:()=>this.event,previous:()=>this.previousEvent})),oe(this,"getStateConfig",p=>this.machine.states[p]),oe(this,"getState",()=>y(g({},this.state),{matches:(...p)=>p.includes(this.state.get()),hasTag:p=>{var v,I;return!!((I=(v=this.getStateConfig(this.state.get()))==null?void 0:v.tags)!=null&&I.includes(p))}})),oe(this,"debug",(...p)=>{this.machine.debug&&console.log(...p)}),oe(this,"notify",()=>{this.publish()}),oe(this,"send",p=>{this.status===er.Started&&queueMicrotask(()=>{var S,P,V,A,x;if(!p)return;this.previousEvent=this.event,this.event=p,this.debug("send",p);let v=this.state.get(),I=p.type,T=(A=(P=(S=this.getStateConfig(v))==null?void 0:S.on)==null?void 0:P[I])!=null?A:(V=this.machine.on)==null?void 0:V[I],O=this.choose(T);if(!O)return;this.transition=O;let b=(x=O.target)!=null?x:v;this.debug("transition",O);let f=b!==v;f?this.state.set(b):O.reenter&&!f?this.state.invoke(v,v):this.action(O.actions)})}),oe(this,"action",p=>{let v=Wt(p)?p(this.getParams()):p;if(!v)return;let I=v.map(T=>{var b,f;let O=(f=(b=this.machine.implementations)==null?void 0:b.actions)==null?void 0:f[T];return O||zt(`[zag-js] No implementation found for action "${JSON.stringify(T)}"`),O});for(let T of I)T==null||T(this.getParams())}),oe(this,"guard",p=>{var v,I;return Wt(p)?p(this.getParams()):(I=(v=this.machine.implementations)==null?void 0:v.guards)==null?void 0:I[p](this.getParams())}),oe(this,"effect",p=>{let v=Wt(p)?p(this.getParams()):p;if(!v)return;let I=v.map(O=>{var f,S;let b=(S=(f=this.machine.implementations)==null?void 0:f.effects)==null?void 0:S[O];return b||zt(`[zag-js] No implementation found for effect "${JSON.stringify(O)}"`),b}),T=[];for(let O of I){let b=O==null?void 0:O(this.getParams());b&&T.push(b)}return()=>T.forEach(O=>O==null?void 0:O())}),oe(this,"choose",p=>or(p).find(v=>{let I=!v.guard;return Zr(v.guard)?I=!!this.guard(v.guard):Wt(v.guard)&&(I=v.guard(this.getParams())),I})),oe(this,"subscribe",p=>(this.subscriptions.push(p),()=>{let v=this.subscriptions.indexOf(p);v>-1&&this.subscriptions.splice(v,1)})),oe(this,"status",er.NotStarted),oe(this,"publish",()=>{this.callTrackers(),this.subscriptions.forEach(p=>p(this.service))}),oe(this,"trackers",[]),oe(this,"setupTrackers",()=>{var p,v;(v=(p=this.machine).watch)==null||v.call(p,this.getParams())}),oe(this,"callTrackers",()=>{this.trackers.forEach(({deps:p,fn:v})=>{let I=p.map(T=>T());fe(v.prev,I)||(v(),v.prev=I)})}),oe(this,"getParams",()=>({state:this.getState(),context:this.context,event:this.getEvent(),prop:this.prop,send:this.send,action:this.action,guard:this.guard,track:(p,v)=>{v.prev=p.map(I=>I()),this.trackers.push({deps:p,fn:v})},refs:this.refs,computed:this.computed,flush:sv,scope:this.scope,choose:this.choose})),this.userPropsRef={current:t};let{id:n,ids:i,getRootNode:r}=Kt(t);this.scope=pv({id:n,ids:i,getRootNode:r});let s=p=>{var T,O;let v=Kt(this.userPropsRef.current);return((O=(T=e.props)==null?void 0:T.call(e,{props:Si(v),scope:this.scope}))!=null?O:v)[p]};this.prop=s;let a=(h=e.context)==null?void 0:h.call(e,{prop:s,bindable:is,scope:this.scope,flush(p){queueMicrotask(p)},getContext(){return o},getComputed(){return l},getRefs(){return c},getEvent:this.getEvent.bind(this)});a&&Object.values(a).forEach(p=>{let v=ns(p.ref,()=>this.notify());this.cleanups.push(v)});let o={get(p){return a==null?void 0:a[p].get()},set(p,v){a==null||a[p].set(v)},initial(p){return a==null?void 0:a[p].initial},hash(p){let v=a==null?void 0:a[p].get();return a==null?void 0:a[p].hash(v)}};this.context=o;let l=p=>{var v,I;return(I=(v=e.computed)==null?void 0:v[p]({context:o,event:this.getEvent(),prop:s,refs:this.refs,scope:this.scope,computed:l}))!=null?I:{}};this.computed=l;let c=Dv((u=(m=e.refs)==null?void 0:m.call(e,{prop:s,context:o}))!=null?u:{});this.refs=c;let d=is(()=>({defaultValue:e.initialState({prop:s}),onChange:(p,v)=>{var T,O,b,f;if(v){let S=this.effects.get(v);S==null||S(),this.effects.delete(v)}v&&this.action((T=this.getStateConfig(v))==null?void 0:T.exit),this.action((O=this.transition)==null?void 0:O.actions);let I=this.effect((b=this.getStateConfig(p))==null?void 0:b.effects);if(I&&this.effects.set(p,I),v===Ua){this.action(e.entry);let S=this.effect(e.effects);S&&this.effects.set(Ua,S)}this.action((f=this.getStateConfig(p))==null?void 0:f.entry)}}));this.state=d,this.cleanups.push(ns(this.state.ref,()=>this.notify()))}updateProps(e){let t=this.userPropsRef.current;this.userPropsRef.current=()=>{let n=Kt(t),i=Kt(e);return ld(n,i)},this.notify()}start(){this.status=er.Started,this.debug("initializing..."),this.state.invoke(this.state.initial,Ua),this.setupTrackers()}stop(){this.effects.forEach(e=>e==null?void 0:e()),this.effects.clear(),this.transition=null,this.action(this.machine.exit),this.cleanups.forEach(e=>e()),this.cleanups=[],this.subscriptions=[],this.status=er.Stopped,this.debug("unmounting...")}get service(){return{state:this.getState(),send:this.send,context:this.context,prop:this.prop,scope:this.scope,refs:this.refs,computed:this.computed,event:this.getEvent(),getStatus:()=>this.status}}},K=class{constructor(e,t){Y(this,"el");Y(this,"doc");Y(this,"machine");Y(this,"api");Y(this,"init",()=>{this.render(),this.machine.subscribe(()=>{this.api=this.initApi(),this.render()}),this.machine.start()});Y(this,"destroy",()=>{this.machine.stop()});Y(this,"spreadProps",(e,t)=>{Rv(e,t,this.machine.scope.id)});Y(this,"updateProps",e=>{this.machine.updateProps(e)});if(!e)throw new Error("Root element not found");this.el=e,this.doc=document,this.machine=this.initMachine(t),this.api=this.initApi()}}});var cd={};he(cd,{Accordion:()=>jv});function Gv(e,t){let{send:n,context:i,prop:r,scope:s,computed:a}=e,o=i.get("focusedValue"),l=i.get("value"),c=r("multiple");function d(m){let u=m;!c&&u.length>1&&(u=[u[0]]),n({type:"VALUE.SET",value:u})}function h(m){var u;return{expanded:l.includes(m.value),focused:o===m.value,disabled:!!((u=m.disabled)!=null?u:r("disabled"))}}return{focusedValue:o,value:l,setValue:d,getItemState:h,getRootProps(){return t.element(y(g({},ur.root.attrs),{dir:r("dir"),id:bs(s),"data-orientation":r("orientation")}))},getItemProps(m){let u=h(m);return t.element(y(g({},ur.item.attrs),{dir:r("dir"),id:Mv(s,m.value),"data-state":u.expanded?"open":"closed","data-focus":E(u.focused),"data-disabled":E(u.disabled),"data-orientation":r("orientation")}))},getItemContentProps(m){let u=h(m);return t.element(y(g({},ur.itemContent.attrs),{dir:r("dir"),role:"region",id:co(s,m.value),"aria-labelledby":Es(s,m.value),hidden:!u.expanded,"data-state":u.expanded?"open":"closed","data-disabled":E(u.disabled),"data-focus":E(u.focused),"data-orientation":r("orientation")}))},getItemIndicatorProps(m){let u=h(m);return t.element(y(g({},ur.itemIndicator.attrs),{dir:r("dir"),"aria-hidden":!0,"data-state":u.expanded?"open":"closed","data-disabled":E(u.disabled),"data-focus":E(u.focused),"data-orientation":r("orientation")}))},getItemTriggerProps(m){let{value:u}=m,p=h(m);return t.button(y(g({},ur.itemTrigger.attrs),{type:"button",dir:r("dir"),id:Es(s,u),"aria-controls":co(s,u),"data-controls":co(s,u),"aria-expanded":p.expanded,disabled:p.disabled,"data-orientation":r("orientation"),"aria-disabled":p.disabled,"data-state":p.expanded?"open":"closed","data-ownedby":bs(s),onFocus(){p.disabled||n({type:"TRIGGER.FOCUS",value:u})},onBlur(){p.disabled||n({type:"TRIGGER.BLUR"})},onClick(v){p.disabled||(Xe()&&v.currentTarget.focus(),n({type:"TRIGGER.CLICK",value:u}))},onKeyDown(v){if(v.defaultPrevented||p.disabled)return;let I={ArrowDown(){a("isHorizontal")||n({type:"GOTO.NEXT",value:u})},ArrowUp(){a("isHorizontal")||n({type:"GOTO.PREV",value:u})},ArrowRight(){a("isHorizontal")&&n({type:"GOTO.NEXT",value:u})},ArrowLeft(){a("isHorizontal")&&n({type:"GOTO.PREV",value:u})},Home(){n({type:"GOTO.FIRST",value:u})},End(){n({type:"GOTO.LAST",value:u})}},T=ge(v,{dir:r("dir"),orientation:r("orientation")}),O=I[T];O&&(O(v),v.preventDefault())}}))}}}var Lv,ur,bs,Mv,co,Es,Fv,Is,$v,Hv,Bv,_v,Uv,qv,Wv,Kv,c0,zv,d0,Yv,jv,dd=re(()=>{"use strict";se();Lv=U("accordion").parts("root","item","itemTrigger","itemContent","itemIndicator"),ur=Lv.build(),bs=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`accordion:${e.id}`},Mv=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`accordion:${e.id}:item:${t}`},co=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemContent)==null?void 0:i.call(n,t))!=null?r:`accordion:${e.id}:content:${t}`},Es=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemTrigger)==null?void 0:i.call(n,t))!=null?r:`accordion:${e.id}:trigger:${t}`},Fv=e=>e.getById(bs(e)),Is=e=>{let n=`[data-controls][data-ownedby='${CSS.escape(bs(e))}']:not([disabled])`;return Fe(Fv(e),n)},$v=e=>lt(Is(e)),Hv=e=>mt(Is(e)),Bv=(e,t)=>yi(Is(e),Es(e,t)),_v=(e,t)=>bi(Is(e),Es(e,t));({and:Uv,not:qv}=Ee()),Wv={props({props:e}){return g({collapsible:!1,multiple:!1,orientation:"vertical",defaultValue:[]},e)},initialState(){return"idle"},context({prop:e,bindable:t}){return{focusedValue:t(()=>({defaultValue:null,sync:!0,onChange(n){var i;(i=e("onFocusChange"))==null||i({value:n})}})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var i;(i=e("onValueChange"))==null||i({value:n})}}))}},computed:{isHorizontal:({prop:e})=>e("orientation")==="horizontal"},on:{"VALUE.SET":{actions:["setValue"]}},states:{idle:{on:{"TRIGGER.FOCUS":{target:"focused",actions:["setFocusedValue"]}}},focused:{on:{"GOTO.NEXT":{actions:["focusNextTrigger"]},"GOTO.PREV":{actions:["focusPrevTrigger"]},"TRIGGER.CLICK":[{guard:Uv("isExpanded","canToggle"),actions:["collapse"]},{guard:qv("isExpanded"),actions:["expand"]}],"GOTO.FIRST":{actions:["focusFirstTrigger"]},"GOTO.LAST":{actions:["focusLastTrigger"]},"TRIGGER.BLUR":{target:"idle",actions:["clearFocusedValue"]}}}},implementations:{guards:{canToggle:({prop:e})=>!!e("collapsible")||!!e("multiple"),isExpanded:({context:e,event:t})=>e.get("value").includes(t.value)},actions:{collapse({context:e,prop:t,event:n}){let i=t("multiple")?ct(e.get("value"),n.value):[];e.set("value",i)},expand({context:e,prop:t,event:n}){let i=t("multiple")?Ze(e.get("value"),n.value):[n.value];e.set("value",i)},focusFirstTrigger({scope:e}){var t;(t=$v(e))==null||t.focus()},focusLastTrigger({scope:e}){var t;(t=Hv(e))==null||t.focus()},focusNextTrigger({context:e,scope:t}){let n=e.get("focusedValue");if(!n)return;let i=Bv(t,n);i==null||i.focus()},focusPrevTrigger({context:e,scope:t}){let n=e.get("focusedValue");if(!n)return;let i=_v(t,n);i==null||i.focus()},setFocusedValue({context:e,event:t}){e.set("focusedValue",t.value)},clearFocusedValue({context:e}){e.set("focusedValue",null)},setValue({context:e,event:t}){e.set("value",t.value)},coarseValue({context:e,prop:t}){!t("multiple")&&e.get("value").length>1&&(zt("The value of accordion should be a single value when multiple is false."),e.set("value",[e.get("value")[0]]))}}}},Kv=_()(["collapsible","dir","disabled","getRootNode","id","ids","multiple","onFocusChange","onValueChange","orientation","value","defaultValue"]),c0=B(Kv),zv=_()(["value","disabled"]),d0=B(zv),Yv=class extends K{initMachine(e){return new W(Wv,e)}initApi(){return Gv(this.machine.service,q)}render(){var i;let e=(i=this.el.querySelector('[data-scope="accordion"][data-part="root"]'))!=null?i:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.getItemsList(),n=e.querySelectorAll('[data-scope="accordion"][data-part="item"]');for(let r=0;r{var a,o;let r=w(e,"onValueChange");r&&this.liveSocket.main.isConnected()&&t(r,{id:e.id,value:(a=i.value)!=null?a:null});let s=w(e,"onValueChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{id:e.id,value:(o=i.value)!=null?o:null}}))},onFocusChange:i=>{var a,o;let r=w(e,"onFocusChange");r&&this.liveSocket.main.isConnected()&&t(r,{id:e.id,value:(a=i.value)!=null?a:null});let s=w(e,"onFocusChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{id:e.id,value:(o=i.value)!=null?o:null}}))}}));n.init(),this.accordion=n,this.onSetValue=i=>{let{value:r}=i.detail;n.api.setValue(r)},e.addEventListener("phx:accordion:set-value",this.onSetValue),this.handlers=[],this.handlers.push(this.handleEvent("accordion_set_value",i=>{let r=i.accordion_id;r&&!(e.id===r||e.id===`accordion:${r}`)||n.api.setValue(i.value)})),this.handlers.push(this.handleEvent("accordion_value",()=>{this.pushEvent("accordion_value_response",{value:n.api.value})})),this.handlers.push(this.handleEvent("accordion_focused_value",()=>{this.pushEvent("accordion_focused_value_response",{value:n.api.focusedValue})}))},updated(){var t,n,i,r;let e=C(this.el,"controlled");(r=this.accordion)==null||r.updateProps(y(g({id:this.el.id},e?{value:Z(this.el,"value")}:{defaultValue:(i=(n=(t=this.accordion)==null?void 0:t.api)==null?void 0:n.value)!=null?i:Z(this.el,"defaultValue")}),{collapsible:C(this.el,"collapsible"),multiple:C(this.el,"multiple"),orientation:w(this.el,"orientation",["horizontal","vertical"]),dir:Oe(this.el)}))},destroyed(){var e;if(this.onSetValue&&this.el.removeEventListener("phx:accordion:set-value",this.onSetValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.accordion)==null||e.destroy()}}});function yd(e,t,n=e.center){let i=t.x-n.x,r=t.y-n.y;return 360-(Math.atan2(i,r)*(180/Math.PI)+180)}function bn(e){let{x:t,y:n,width:i,height:r}=e,s=t+i/2,a=n+r/2;return{x:t,y:n,width:i,height:r,minX:t,minY:n,maxX:t+i,maxY:n+r,midX:s,midY:a,center:_n(s,a)}}function ey(e){let t=_n(e.minX,e.minY),n=_n(e.maxX,e.minY),i=_n(e.maxX,e.maxY),r=_n(e.minX,e.maxY);return{top:t,right:n,bottom:i,left:r}}function ty(e){if(!uo.has(e)){let t=e.ownerDocument.defaultView||window;uo.set(e,t.getComputedStyle(e))}return uo.get(e)}function po(e,t={}){return bn(ny(e,t))}function ny(e,t={}){let{excludeScrollbar:n=!1,excludeBorders:i=!1}=t,{x:r,y:s,width:a,height:o}=e.getBoundingClientRect(),l={x:r,y:s,width:a,height:o},c=ty(e),{borderLeftWidth:d,borderTopWidth:h,borderRightWidth:m,borderBottomWidth:u}=c,p=gd(d,m),v=gd(h,u);if(i&&(l.width-=p,l.height-=v,l.x+=ho(d),l.y+=ho(h)),n){let I=e.offsetWidth-e.clientWidth-p,T=e.offsetHeight-e.clientHeight-v;l.width-=I,l.height-=T}return l}function Cd(e,t={}){return bn(iy(e,t))}function iy(e,t){let{excludeScrollbar:n=!1}=t,{innerWidth:i,innerHeight:r,document:s,visualViewport:a}=e,o=(a==null?void 0:a.width)||i,l=(a==null?void 0:a.height)||r,c={x:0,y:0,width:o,height:l};if(n){let d=i-s.documentElement.clientWidth,h=r-s.documentElement.clientHeight;c.width-=d,c.height-=h}return c}function Sd(e,t){let n=bn(e),{top:i,right:r,left:s,bottom:a}=ey(n),[o]=t.split("-");return{top:[s,i,r,a],right:[i,r,a,s],bottom:[i,s,a,r],left:[r,i,s,a]}[o]}function fo(e,t){let{x:n,y:i}=t,r=!1;for(let s=0,a=e.length-1;si!=d>i&&n<(c-o)*(i-l)/(d-l)+o&&(r=!r)}return r}function md(e,t){let{minX:n,minY:i,maxX:r,maxY:s,midX:a,midY:o}=e,l=t.includes("w")?n:t.includes("e")?r:a,c=t.includes("n")?i:t.includes("s")?s:o;return{x:l,y:c}}function sy(e){return ry[e]}function Td(e,t,n,i){let{scalingOriginMode:r,lockAspectRatio:s}=i,a=md(e,n),o=sy(n),l=md(e,o);r==="center"&&(t={x:t.x*2,y:t.y*2});let c={x:a.x+t.x,y:a.y+t.y},d={x:pd[n].x*2-1,y:pd[n].y*2-1},h={width:c.x-l.x,height:c.y-l.y},m=d.x*h.width/e.width,u=d.y*h.height/e.height,p=Ti(m)>Ti(u)?m:u,v=s?{x:p,y:p}:{x:a.x===l.x?1:m,y:a.y===l.y?1:u};switch(a.y===l.y?v.y=Ti(v.y):Ps(v.y)!==Ps(u)&&(v.y*=-1),a.x===l.x?v.x=Ti(v.x):Ps(v.x)!==Ps(m)&&(v.x*=-1),r){case"extent":return vd(e,ud.scale(v.x,v.y,l),!1);case"center":return vd(e,ud.scale(v.x,v.y,{x:e.midX,y:e.midY}),!1)}}function ay(e,t,n=!0){return n?{x:fd(t.x,e.x),y:fd(t.y,e.y),width:Ti(t.x-e.x),height:Ti(t.y-e.y)}:{x:e.x,y:e.y,width:t.x-e.x,height:t.y-e.y}}function vd(e,t,n=!0){let i=t.applyTo({x:e.minX,y:e.minY}),r=t.applyTo({x:e.maxX,y:e.maxY});return ay(i,r,n)}var Xv,Zv,Zt,ud,hd,hr,Jv,Qv,gr,_n,go,bd,Ed,Id,Pd,uo,ho,gd,g0,p0,pd,ry,Ps,Ti,fd,Cs=re(()=>{"use strict";Xv=Object.defineProperty,Zv=(e,t,n)=>t in e?Xv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zt=(e,t,n)=>Zv(e,typeof t!="symbol"?t+"":t,n),ud=class Ae{constructor([t,n,i,r,s,a]=[0,0,0,0,0,0]){Zt(this,"m00"),Zt(this,"m01"),Zt(this,"m02"),Zt(this,"m10"),Zt(this,"m11"),Zt(this,"m12"),Zt(this,"rotate",(...o)=>this.prepend(Ae.rotate(...o))),Zt(this,"scale",(...o)=>this.prepend(Ae.scale(...o))),Zt(this,"translate",(...o)=>this.prepend(Ae.translate(...o))),this.m00=t,this.m01=n,this.m02=i,this.m10=r,this.m11=s,this.m12=a}applyTo(t){let{x:n,y:i}=t,{m00:r,m01:s,m02:a,m10:o,m11:l,m12:c}=this;return{x:r*n+s*i+a,y:o*n+l*i+c}}prepend(t){return new Ae([this.m00*t.m00+this.m01*t.m10,this.m00*t.m01+this.m01*t.m11,this.m00*t.m02+this.m01*t.m12+this.m02,this.m10*t.m00+this.m11*t.m10,this.m10*t.m01+this.m11*t.m11,this.m10*t.m02+this.m11*t.m12+this.m12])}append(t){return new Ae([t.m00*this.m00+t.m01*this.m10,t.m00*this.m01+t.m01*this.m11,t.m00*this.m02+t.m01*this.m12+t.m02,t.m10*this.m00+t.m11*this.m10,t.m10*this.m01+t.m11*this.m11,t.m10*this.m02+t.m11*this.m12+t.m12])}get determinant(){return this.m00*this.m11-this.m01*this.m10}get isInvertible(){let t=this.determinant;return isFinite(t)&&isFinite(this.m02)&&isFinite(this.m12)&&t!==0}invert(){let t=this.determinant;return new Ae([this.m11/t,-this.m01/t,(this.m01*this.m12-this.m11*this.m02)/t,-this.m10/t,this.m00/t,(this.m10*this.m02-this.m00*this.m12)/t])}get array(){return[this.m00,this.m01,this.m02,this.m10,this.m11,this.m12,0,0,1]}get float32Array(){return new Float32Array(this.array)}static get identity(){return new Ae([1,0,0,0,1,0])}static rotate(t,n){let i=new Ae([Math.cos(t),-Math.sin(t),0,Math.sin(t),Math.cos(t),0]);return n&&(n.x!==0||n.y!==0)?Ae.multiply(Ae.translate(n.x,n.y),i,Ae.translate(-n.x,-n.y)):i}static scale(t,n=t,i={x:0,y:0}){let r=new Ae([t,0,0,0,n,0]);return i.x!==0||i.y!==0?Ae.multiply(Ae.translate(i.x,i.y),r,Ae.translate(-i.x,-i.y)):r}static translate(t,n){return new Ae([1,0,t,0,1,n])}static multiply(...[t,...n]){return t?n.reduce((i,r)=>i.prepend(r),t):Ae.identity}get a(){return this.m00}get b(){return this.m10}get c(){return this.m01}get d(){return this.m11}get tx(){return this.m02}get ty(){return this.m12}get scaleComponents(){return{x:this.a,y:this.d}}get translationComponents(){return{x:this.tx,y:this.ty}}get skewComponents(){return{x:this.c,y:this.b}}toString(){return`matrix(${this.a}, ${this.b}, ${this.c}, ${this.d}, ${this.tx}, ${this.ty})`}};hd=(e,t,n)=>Math.min(Math.max(e,t),n),hr=(e,t,n)=>{let i=hd(e.x,n.x,n.x+n.width-t.width),r=hd(e.y,n.y,n.y+n.height-t.height);return{x:i,y:r}},Jv={width:0,height:0},Qv={width:1/0,height:1/0},gr=(e,t=Jv,n=Qv)=>({width:Math.min(Math.max(e.width,t.width),n.width),height:Math.min(Math.max(e.height,t.height),n.height)}),_n=(e,t)=>({x:e,y:t}),go=(e,t)=>t?_n(e.x-t.x,e.y-t.y):e,bd=(e,t)=>_n(e.x+t.x,e.y+t.y);Ed=(e,t)=>{let n=Math.max(t.x,Math.min(e.x,t.x+t.width-e.width)),i=Math.max(t.y,Math.min(e.y,t.y+t.height-e.height));return{x:n,y:i,width:Math.min(e.width,t.width),height:Math.min(e.height,t.height)}},Id=(e,t)=>e.width===(t==null?void 0:t.width)&&e.height===(t==null?void 0:t.height),Pd=(e,t)=>e.x===(t==null?void 0:t.x)&&e.y===(t==null?void 0:t.y),uo=new WeakMap;ho=e=>parseFloat(e.replace("px","")),gd=(...e)=>e.reduce((t,n)=>t+(n?ho(n):0),0),{min:g0,max:p0}=Math;pd={n:{x:.5,y:0},ne:{x:1,y:0},e:{x:1,y:.5},se:{x:1,y:1},s:{x:.5,y:1},sw:{x:0,y:1},w:{x:0,y:.5},nw:{x:0,y:0}},ry={n:"s",ne:"sw",e:"w",se:"nw",s:"n",sw:"ne",w:"e",nw:"se"},{sign:Ps,abs:Ti,min:fd}=Math});var Nd={};he(Nd,{AngleSlider:()=>vy});function Ad(e,t,n){let i=bn(e.getBoundingClientRect()),r=yd(i,t);return n!=null?r-n:r}function kd(e){return Math.min(Math.max(e,Ss),Ts)}function hy(e,t){let n=kd(e),i=Math.ceil(n/t),r=Math.round(n/t);return i>=n/t?i*t===Ts?Ss:i*t:r*t}function wd(e,t){return ed(e,Ss,Ts,t)}function gy(e,t){let{state:n,send:i,context:r,prop:s,computed:a,scope:o}=e,l=n.matches("dragging"),c=r.get("value"),d=a("valueAsDegree"),h=s("disabled"),m=s("invalid"),u=s("readOnly"),p=a("interactive"),v=s("aria-label"),I=s("aria-labelledby");return{value:c,valueAsDegree:d,dragging:l,setValue(T){i({type:"VALUE.SET",value:T})},getRootProps(){return t.element(y(g({},Gn.root.attrs),{id:ly(o),"data-disabled":E(h),"data-invalid":E(m),"data-readonly":E(u),style:{"--value":c,"--angle":d}}))},getLabelProps(){return t.label(y(g({},Gn.label.attrs),{id:Od(o),htmlFor:mo(o),"data-disabled":E(h),"data-invalid":E(m),"data-readonly":E(u),onClick(T){var O;p&&(T.preventDefault(),(O=vo(o))==null||O.focus())}}))},getHiddenInputProps(){return t.element({type:"hidden",value:c,name:s("name"),id:mo(o)})},getControlProps(){return t.element(y(g({},Gn.control.attrs),{role:"presentation",id:xd(o),"data-disabled":E(h),"data-invalid":E(m),"data-readonly":E(u),onPointerDown(T){if(!p||!pe(T))return;let O=je(T),b=T.currentTarget,f=vo(o),S=Yt(T).composedPath(),P=f&&S.includes(f),V=null;P&&(V=Ad(b,O)-c),i({type:"CONTROL.POINTER_DOWN",point:O,angularOffset:V}),T.stopPropagation()},style:{touchAction:"none",userSelect:"none",WebkitUserSelect:"none"}}))},getThumbProps(){return t.element(y(g({},Gn.thumb.attrs),{id:Vd(o),role:"slider","aria-label":v,"aria-labelledby":I!=null?I:Od(o),"aria-valuemax":360,"aria-valuemin":0,"aria-valuenow":c,tabIndex:u||p?0:void 0,"data-disabled":E(h),"data-invalid":E(m),"data-readonly":E(u),onFocus(){i({type:"THUMB.FOCUS"})},onBlur(){i({type:"THUMB.BLUR"})},onKeyDown(T){if(!p)return;let O=gi(T)*s("step");switch(T.key){case"ArrowLeft":case"ArrowUp":T.preventDefault(),i({type:"THUMB.ARROW_DEC",step:O});break;case"ArrowRight":case"ArrowDown":T.preventDefault(),i({type:"THUMB.ARROW_INC",step:O});break;case"Home":T.preventDefault(),i({type:"THUMB.HOME"});break;case"End":T.preventDefault(),i({type:"THUMB.END"});break}},style:{rotate:"var(--angle)"}}))},getValueTextProps(){return t.element(y(g({},Gn.valueText.attrs),{id:cy(o)}))},getMarkerGroupProps(){return t.element(g({},Gn.markerGroup.attrs))},getMarkerProps(T){let O;return T.valuec?O="over-value":O="at-value",t.element(y(g({},Gn.marker.attrs),{"data-value":T.value,"data-state":O,"data-disabled":E(h),style:{"--marker-value":T.value,rotate:"calc(var(--marker-value) * 1deg)"}}))}}}var oy,Gn,ly,Vd,mo,xd,cy,Od,dy,uy,vo,Ss,Ts,py,fy,y0,my,vy,Rd=re(()=>{"use strict";Cs();se();oy=U("angle-slider").parts("root","label","thumb","valueText","control","track","markerGroup","marker"),Gn=oy.build(),ly=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`angle-slider:${e.id}`},Vd=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.thumb)!=null?n:`angle-slider:${e.id}:thumb`},mo=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.hiddenInput)!=null?n:`angle-slider:${e.id}:input`},xd=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`angle-slider:${e.id}:control`},cy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.valueText)!=null?n:`angle-slider:${e.id}:value-text`},Od=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`angle-slider:${e.id}:label`},dy=e=>e.getById(mo(e)),uy=e=>e.getById(xd(e)),vo=e=>e.getById(Vd(e)),Ss=0,Ts=359;py={props({props:e}){return g({step:1,defaultValue:0},e)},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var i;(i=e("onValueChange"))==null||i({value:n,valueAsDegree:`${n}deg`})}}))}},refs(){return{thumbDragOffset:null}},computed:{interactive:({prop:e})=>!(e("disabled")||e("readOnly")),valueAsDegree:({context:e})=>`${e.get("value")}deg`},watch({track:e,context:t,action:n}){e([()=>t.get("value")],()=>{n(["syncInputElement"])})},initialState(){return"idle"},on:{"VALUE.SET":{actions:["setValue"]}},states:{idle:{on:{"CONTROL.POINTER_DOWN":{target:"dragging",actions:["setThumbDragOffset","setPointerValue","focusThumb"]},"THUMB.FOCUS":{target:"focused"}}},focused:{on:{"CONTROL.POINTER_DOWN":{target:"dragging",actions:["setThumbDragOffset","setPointerValue","focusThumb"]},"THUMB.ARROW_DEC":{actions:["decrementValue","invokeOnChangeEnd"]},"THUMB.ARROW_INC":{actions:["incrementValue","invokeOnChangeEnd"]},"THUMB.HOME":{actions:["setValueToMin","invokeOnChangeEnd"]},"THUMB.END":{actions:["setValueToMax","invokeOnChangeEnd"]},"THUMB.BLUR":{target:"idle"}}},dragging:{entry:["focusThumb"],effects:["trackPointerMove"],on:{"DOC.POINTER_UP":{target:"focused",actions:["invokeOnChangeEnd","clearThumbDragOffset"]},"DOC.POINTER_MOVE":{actions:["setPointerValue"]}}}},implementations:{effects:{trackPointerMove({scope:e,send:t}){return hn(e.getDoc(),{onPointerMove(n){t({type:"DOC.POINTER_MOVE",point:n.point})},onPointerUp(){t({type:"DOC.POINTER_UP"})}})}},actions:{syncInputElement({scope:e,context:t}){let n=dy(e);Me(n,t.get("value").toString())},invokeOnChangeEnd({context:e,prop:t,computed:n}){var i;(i=t("onValueChangeEnd"))==null||i({value:e.get("value"),valueAsDegree:n("valueAsDegree")})},setPointerValue({scope:e,event:t,context:n,prop:i,refs:r}){let s=uy(e);if(!s)return;let a=r.get("thumbDragOffset"),o=Ad(s,t.point,a);n.set("value",hy(o,i("step")))},setValueToMin({context:e}){e.set("value",Ss)},setValueToMax({context:e}){e.set("value",Ts)},setValue({context:e,event:t}){e.set("value",kd(t.value))},decrementValue({context:e,event:t,prop:n}){var r;let i=wd(e.get("value")-t.step,(r=t.step)!=null?r:n("step"));e.set("value",i)},incrementValue({context:e,event:t,prop:n}){var r;let i=wd(e.get("value")+t.step,(r=t.step)!=null?r:n("step"));e.set("value",i)},focusThumb({scope:e}){H(()=>{var t;(t=vo(e))==null||t.focus({preventScroll:!0})})},setThumbDragOffset({refs:e,event:t}){var n;e.set("thumbDragOffset",(n=t.angularOffset)!=null?n:null)},clearThumbDragOffset({refs:e}){e.set("thumbDragOffset",null)}}}},fy=_()(["aria-label","aria-labelledby","dir","disabled","getRootNode","id","ids","invalid","name","onValueChange","onValueChangeEnd","readOnly","step","value","defaultValue"]),y0=B(fy),my=class extends K{initMachine(e){return new W(py,e)}initApi(){return gy(this.machine.service,q)}render(){var o;let e=(o=this.el.querySelector('[data-scope="angle-slider"][data-part="root"]'))!=null?o:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="angle-slider"][data-part="label"]');t&&this.spreadProps(t,this.api.getLabelProps());let n=this.el.querySelector('[data-scope="angle-slider"][data-part="hidden-input"]');n&&this.spreadProps(n,this.api.getHiddenInputProps());let i=this.el.querySelector('[data-scope="angle-slider"][data-part="control"]');i&&this.spreadProps(i,this.api.getControlProps());let r=this.el.querySelector('[data-scope="angle-slider"][data-part="thumb"]');r&&this.spreadProps(r,this.api.getThumbProps());let s=this.el.querySelector('[data-scope="angle-slider"][data-part="value-text"]');if(s){this.spreadProps(s,this.api.getValueTextProps());let l=s.querySelector('[data-scope="angle-slider"][data-part="value"]');l&&l.textContent!==String(this.api.value)&&(l.textContent=String(this.api.value))}let a=this.el.querySelector('[data-scope="angle-slider"][data-part="marker-group"]');a&&this.spreadProps(a,this.api.getMarkerGroupProps()),this.el.querySelectorAll('[data-scope="angle-slider"][data-part="marker"]').forEach(l=>{let c=l.dataset.value;if(c==null)return;let d=Number(c);Number.isNaN(d)||this.spreadProps(l,this.api.getMarkerProps({value:d}))})}},vy={mounted(){var s;let e=this.el,t=z(e,"value"),n=z(e,"defaultValue"),i=C(e,"controlled"),r=new my(e,y(g({id:e.id},i&&t!==void 0?{value:t}:{defaultValue:n!=null?n:0}),{step:(s=z(e,"step"))!=null?s:1,disabled:C(e,"disabled"),readOnly:C(e,"readOnly"),invalid:C(e,"invalid"),name:w(e,"name"),dir:w(e,"dir",["ltr","rtl"]),"aria-label":w(e,"aria-label"),"aria-labelledby":w(e,"aria-labelledby"),onValueChange:a=>{let o=w(e,"onValueChange");o&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(o,{value:a.value,valueAsDegree:a.valueAsDegree,id:e.id});let l=w(e,"onValueChangeClient");l&&e.dispatchEvent(new CustomEvent(l,{bubbles:!0,detail:{value:a,id:e.id}}))},onValueChangeEnd:a=>{let o=w(e,"onValueChangeEnd");o&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(o,{value:a.value,valueAsDegree:a.valueAsDegree,id:e.id});let l=w(e,"onValueChangeEndClient");l&&e.dispatchEvent(new CustomEvent(l,{bubbles:!0,detail:{value:a,id:e.id}}))}}));r.init(),this.angleSlider=r,this.handlers=[],this.onSetValue=a=>{let{value:o}=a.detail;r.api.setValue(o)},e.addEventListener("phx:angle-slider:set-value",this.onSetValue),this.handlers.push(this.handleEvent("angle_slider_set_value",a=>{let o=a.angle_slider_id;o&&!(e.id===o||e.id===`angle-slider:${o}`)||r.api.setValue(a.value)})),this.handlers.push(this.handleEvent("angle_slider_value",()=>{this.pushEvent("angle_slider_value_response",{value:r.api.value,valueAsDegree:r.api.valueAsDegree,dragging:r.api.dragging})}))},updated(){var i,r;let e=z(this.el,"value"),t=z(this.el,"defaultValue"),n=C(this.el,"controlled");(r=this.angleSlider)==null||r.updateProps(y(g({id:this.el.id},n&&e!==void 0?{value:e}:{defaultValue:t!=null?t:0}),{step:(i=z(this.el,"step"))!=null?i:1,disabled:C(this.el,"disabled"),readOnly:C(this.el,"readOnly"),invalid:C(this.el,"invalid"),name:w(this.el,"name"),dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(this.onSetValue&&this.el.removeEventListener("phx:angle-slider:set-value",this.onSetValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.angleSlider)==null||e.destroy()}}});var Md={};he(Md,{Avatar:()=>Oy});function Iy(e,t){let{state:n,send:i,prop:r,scope:s}=e,a=n.matches("loaded");return{loaded:a,setSrc(o){let l=bo(s);l==null||l.setAttribute("src",o)},setLoaded(){i({type:"img.loaded",src:"api"})},setError(){i({type:"img.error",src:"api"})},getRootProps(){return t.element(y(g({},yo.root.attrs),{dir:r("dir"),id:Dd(s)}))},getImageProps(){return t.img(y(g({},yo.image.attrs),{hidden:!a,dir:r("dir"),id:Ld(s),"data-state":a?"visible":"hidden",onLoad(){i({type:"img.loaded",src:"element"})},onError(){i({type:"img.error",src:"element"})}}))},getFallbackProps(){return t.element(y(g({},yo.fallback.attrs),{dir:r("dir"),id:by(s),hidden:a,"data-state":a?"hidden":"visible"}))}}}function Cy(e){return e.complete&&e.naturalWidth!==0&&e.naturalHeight!==0}var yy,yo,Dd,Ld,by,Ey,bo,Py,Sy,P0,Ty,Oy,Fd=re(()=>{"use strict";se();yy=U("avatar").parts("root","image","fallback"),yo=yy.build(),Dd=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`avatar:${e.id}`},Ld=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.image)!=null?n:`avatar:${e.id}:image`},by=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.fallback)!=null?n:`avatar:${e.id}:fallback`},Ey=e=>e.getById(Dd(e)),bo=e=>e.getById(Ld(e));Py={initialState(){return"loading"},effects:["trackImageRemoval","trackSrcChange"],on:{"src.change":{target:"loading"},"img.unmount":{target:"error"}},states:{loading:{entry:["checkImageStatus"],on:{"img.loaded":{target:"loaded",actions:["invokeOnLoad"]},"img.error":{target:"error",actions:["invokeOnError"]}}},error:{on:{"img.loaded":{target:"loaded",actions:["invokeOnLoad"]}}},loaded:{on:{"img.error":{target:"error",actions:["invokeOnError"]}}}},implementations:{actions:{invokeOnLoad({prop:e}){var t;(t=e("onStatusChange"))==null||t({status:"loaded"})},invokeOnError({prop:e}){var t;(t=e("onStatusChange"))==null||t({status:"error"})},checkImageStatus({send:e,scope:t}){let n=bo(t);if(!(n!=null&&n.complete))return;let i=Cy(n)?"img.loaded":"img.error";e({type:i,src:"ssr"})}},effects:{trackImageRemoval({send:e,scope:t}){let n=Ey(t);return hs(n,{callback(i){Array.from(i[0].removedNodes).find(a=>a.nodeType===Node.ELEMENT_NODE&&a.matches("[data-scope=avatar][data-part=image]"))&&e({type:"img.unmount"})}})},trackSrcChange({send:e,scope:t}){let n=bo(t);return ot(n,{attributes:["src","srcset"],callback(){e({type:"src.change"})}})}}}};Sy=_()(["dir","id","ids","onStatusChange","getRootNode"]),P0=B(Sy),Ty=class extends K{initMachine(e){return new W(Py,e)}initApi(){return Iy(this.machine.service,q)}render(){var r;let e=(r=this.el.querySelector('[data-scope="avatar"][data-part="root"]'))!=null?r:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="avatar"][data-part="image"]');t&&this.spreadProps(t,this.api.getImageProps());let n=this.el.querySelector('[data-scope="avatar"][data-part="fallback"]');n&&this.spreadProps(n,this.api.getFallbackProps());let i=this.el.querySelector('[data-scope="avatar"][data-part="skeleton"]');if(i){let s=this.machine.service.state,a=s.matches("loaded"),o=s.matches("error");i.hidden=a||o,i.setAttribute("data-state",a||o?"hidden":"visible")}}},Oy={mounted(){let e=this.el,t=w(e,"src"),n=new Ty(e,g({id:e.id,onStatusChange:i=>{let r=w(e,"onStatusChange");r&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(r,{status:i.status,id:e.id});let s=w(e,"onStatusChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{value:i,id:e.id}}))}},t!==void 0?{}:{}));n.init(),this.avatar=n,t!==void 0&&n.api.setSrc(t),this.handlers=[]},updated(){let e=w(this.el,"src");e!==void 0&&this.avatar&&this.avatar.api.setSrc(e)},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.avatar)==null||e.destroy()}}});var qd={};he(qd,{Carousel:()=>qy});function Bd(e){let t=at(e),n=e.getBoundingClientRect(),i=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),r=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),s=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function o(m,u){let p=parseFloat(m);return/%/.test(m)&&(p/=100,p*=u),Number.isNaN(p)?0:p}let l=o(i,n.width),c=o(r,n.height),d=o(s,n.width),h=o(a,n.height);return{x:{before:l,after:d},y:{before:c,after:h}}}function wy(e,t,n="both"){return n==="x"&&e.right>=t.left&&e.left<=t.right||n==="y"&&e.bottom>=t.top&&e.top<=t.bottom||n==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function _d(e){let t=[];for(let n of e.children)t=t.concat(n,_d(n));return t}function Gd(e,t=!1){let n=e.getBoundingClientRect(),r=Po(e)==="rtl",s={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},a=t?_d(e):e.children;for(let o of["x","y"]){let l=o==="x"?"y":"x",c=o==="x"?"left":"top",d=o==="x"?"right":"bottom",h=o==="x"?"width":"height",m=o==="x"?"scrollLeft":"scrollTop",u=r&&o==="x";for(let p of a){let v=p.getBoundingClientRect();if(!wy(n,v,l))continue;let I=at(p),[T,O]=I.getPropertyValue("scroll-snap-align").split(" ");typeof O=="undefined"&&(O=T);let b=o==="x"?O:T,f,S,P;if(u){let V=Math.abs(e[m]),A=n[d]-v[d]+V;f=A,S=A+v[h],P=A+v[h]/2}else f=v[c]-n[c]+e[m],S=f+v[h],P=f+v[h]/2;switch(b){case"none":break;case"start":s[o].start.push({node:p,position:f});break;case"center":s[o].center.push({node:p,position:P});break;case"end":s[o].end.push({node:p,position:S});break}}}return s}function Vy(e){let t=Po(e),n=e.getBoundingClientRect(),i=Bd(e),r=Gd(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight},a=t==="rtl",o=a&&e.scrollLeft<=0,l;return a?(l=Eo([...r.x.start.map(c=>c.position-i.x.after),...r.x.center.map(c=>c.position-n.width/2),...r.x.end.map(c=>c.position-n.width+i.x.before)].map(Io(0,s.x))),o&&(l=l.map(c=>-c))):l=Eo([...r.x.start.map(c=>c.position-i.x.before),...r.x.center.map(c=>c.position-n.width/2),...r.x.end.map(c=>c.position-n.width+i.x.after)].map(Io(0,s.x))),{x:l,y:Eo([...r.y.start.map(c=>c.position-i.y.before),...r.y.center.map(c=>c.position-n.height/2),...r.y.end.map(c=>c.position-n.height+i.y.after)].map(Io(0,s.y)))}}function xy(e,t,n){let i=Po(e),r=Bd(e),s=Gd(e),a=[...s[t].start,...s[t].center,...s[t].end],o=i==="rtl",l=o&&t==="x"&&e.scrollLeft<=0;for(let c of a)if(n(c.node)){let d;return t==="x"&&o?(d=c.position-r.x.after,l&&(d=-d)):d=c.position-(t==="x"?r.x.before:r.y.before),d}}function Fy(e,t){let{state:n,context:i,computed:r,send:s,scope:a,prop:o}=e,l=n.matches("autoplay"),c=n.matches("dragging"),d=r("canScrollNext"),h=r("canScrollPrev"),m=r("isHorizontal"),u=o("autoSize"),p=Array.from(i.get("pageSnapPoints")),v=i.get("page"),I=o("slidesPerPage"),T=o("padding"),O=o("translations");return{isPlaying:l,isDragging:c,page:v,pageSnapPoints:p,canScrollNext:d,canScrollPrev:h,getProgress(){return v/p.length},getProgressText(){var f,S;let b={page:v+1,totalPages:p.length};return(S=(f=O.progressText)==null?void 0:f.call(O,b))!=null?S:""},scrollToIndex(b,f){s({type:"INDEX.SET",index:b,instant:f})},scrollTo(b,f){s({type:"PAGE.SET",index:b,instant:f})},scrollNext(b){s({type:"PAGE.NEXT",instant:b})},scrollPrev(b){s({type:"PAGE.PREV",instant:b})},play(){s({type:"AUTOPLAY.START"})},pause(){s({type:"AUTOPLAY.PAUSE"})},isInView(b){return Array.from(i.get("slidesInView")).includes(b)},refresh(){s({type:"SNAP.REFRESH"})},getRootProps(){return t.element(y(g({},kt.root.attrs),{id:ky(a),role:"region","aria-roledescription":"carousel","data-orientation":o("orientation"),dir:o("dir"),style:{"--slides-per-page":I,"--slide-spacing":o("spacing"),"--slide-item-size":u?"auto":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(y(g({},kt.itemGroup.attrs),{id:Os(a),"data-orientation":o("orientation"),"data-dragging":E(c),dir:o("dir"),"aria-live":l?"off":"polite",onFocus(b){ce(b.currentTarget,j(b))&&s({type:"VIEWPORT.FOCUS"})},onBlur(b){ce(b.currentTarget,b.relatedTarget)||s({type:"VIEWPORT.BLUR"})},onMouseDown(b){if(b.defaultPrevented||!o("allowMouseDrag")||!pe(b))return;let f=j(b);Ye(f)&&f!==b.currentTarget||(b.preventDefault(),s({type:"DRAGGING.START"}))},onWheel:Yc(b=>{let f=o("orientation")==="horizontal"?"deltaX":"deltaY";b[f]<0&&!r("canScrollPrev")||b[f]>0&&!r("canScrollNext")||s({type:"USER.SCROLL"})},150),onTouchStart(){s({type:"USER.SCROLL"})},style:{display:u?"flex":"grid",gap:"var(--slide-spacing)",scrollSnapType:[m?"x":"y",o("snapType")].join(" "),gridAutoFlow:m?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[m?"gridAutoColumns":"gridAutoRows"]:u?void 0:"var(--slide-item-size)",[m?"scrollPaddingInline":"scrollPaddingBlock"]:T,[m?"paddingInline":"paddingBlock"]:T,[m?"overflowX":"overflowY"]:"auto"}}))},getItemProps(b){let f=i.get("slidesInView").includes(b.index);return t.element(y(g({},kt.item.attrs),{id:Ny(a,b.index),dir:o("dir"),role:"group","data-index":b.index,"data-inview":E(f),"aria-roledescription":"slide","data-orientation":o("orientation"),"aria-label":O.item(b.index,o("slideCount")),"aria-hidden":X(!f),style:{flex:"0 0 auto",[m?"maxWidth":"maxHeight"]:"100%",scrollSnapAlign:(()=>{var x;let S=(x=b.snapAlign)!=null?x:"start",P=o("slidesPerMove"),V=P==="auto"?Math.floor(o("slidesPerPage")):P;return(b.index+V)%V===0?S:void 0})()}}))},getControlProps(){return t.element(y(g({},kt.control.attrs),{"data-orientation":o("orientation")}))},getPrevTriggerProps(){return t.button(y(g({},kt.prevTrigger.attrs),{id:Dy(a),type:"button",disabled:!h,dir:o("dir"),"aria-label":O.prevTrigger,"data-orientation":o("orientation"),"aria-controls":Os(a),onClick(b){b.defaultPrevented||s({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(y(g({},kt.nextTrigger.attrs),{dir:o("dir"),id:Ry(a),type:"button","aria-label":O.nextTrigger,"data-orientation":o("orientation"),"aria-controls":Os(a),disabled:!d,onClick(b){b.defaultPrevented||s({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(y(g({},kt.indicatorGroup.attrs),{dir:o("dir"),id:Ly(a),"data-orientation":o("orientation"),onKeyDown(b){if(b.defaultPrevented)return;let f="indicator",S={ArrowDown(A){m||(s({type:"PAGE.NEXT",src:f}),A.preventDefault())},ArrowUp(A){m||(s({type:"PAGE.PREV",src:f}),A.preventDefault())},ArrowRight(A){m&&(s({type:"PAGE.NEXT",src:f}),A.preventDefault())},ArrowLeft(A){m&&(s({type:"PAGE.PREV",src:f}),A.preventDefault())},Home(A){s({type:"PAGE.SET",index:0,src:f}),A.preventDefault()},End(A){s({type:"PAGE.SET",index:p.length-1,src:f}),A.preventDefault()}},P=ge(b,{dir:o("dir"),orientation:o("orientation")}),V=S[P];V==null||V(b)}}))},getIndicatorProps(b){return t.button(y(g({},kt.indicator.attrs),{dir:o("dir"),id:Ud(a,b.index),type:"button","data-orientation":o("orientation"),"data-index":b.index,"data-readonly":E(b.readOnly),"data-current":E(b.index===v),"aria-label":O.indicator(b.index),onClick(f){f.defaultPrevented||b.readOnly||s({type:"PAGE.SET",index:b.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(y(g({},kt.autoplayTrigger.attrs),{type:"button","data-orientation":o("orientation"),"data-pressed":E(l),"aria-label":l?O.autoplayStop:O.autoplayStart,onClick(b){b.defaultPrevented||s({type:l?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))},getProgressTextProps(){return t.element(g({},kt.progressText.attrs))}}}function Hy(e,t,n){if(e==null||n<=0)return[];let i=[],r=t==="auto"?Math.floor(n):t;if(r<=0)return[];for(let s=0;se);s+=r)i.push(s);return i}var Po,Eo,Io,Ay,kt,ky,Ny,Os,Ry,Dy,Ly,Ud,qe,$d,My,Hd,$y,By,O0,_y,w0,Gy,V0,Uy,qy,Wd=re(()=>{"use strict";se();Po=e=>at(e).direction;Eo=e=>[...new Set(e)],Io=(e,t)=>n=>Math.max(e,Math.min(t,n)),Ay=U("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger","progressText"),kt=Ay.build(),ky=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},Ny=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`carousel:${e.id}:item:${t}`},Os=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},Ry=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},Dy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},Ly=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},Ud=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.indicator)==null?void 0:i.call(n,t))!=null?r:`carousel:${e.id}:indicator:${t}`},qe=e=>e.getById(Os(e)),$d=e=>Fe(qe(e),"[data-part=item]"),My=(e,t)=>e.getById(Ud(e,t)),Hd=e=>{let t=qe(e);if(!t)return;let n=jt(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};$y={props({props:e}){return yn(e,["slideCount"],"carousel"),y(g({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6,autoSize:!1},e),{translations:g({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation",progressText:({page:t,totalPages:n})=>`${t} / ${n}`},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(i){var a;let s=n().get("pageSnapPoints");(a=e("onPageChange"))==null||a({page:i,pageSnapPoint:s[i]})}})),pageSnapPoints:t(()=>({defaultValue:e("autoSize")?Array.from({length:e("slideCount")},(i,r)=>r):Hy(e("slideCount"),e("slidesPerMove"),e("slidesPerPage"))})),slidesInView:t(()=>({defaultValue:[]}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isHorizontal:({prop:e})=>e("orientation")==="horizontal",canScrollNext:({prop:e,context:t})=>e("loop")||t.get("page")e("loop")||t.get("page")>0,autoplayInterval:({prop:e})=>{let t=e("autoplay");return xt(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:i,send:r}){e([()=>i("slidesPerPage"),()=>i("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>i("orientation"),()=>i("autoSize"),()=>i("dir")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>i("slideCount")],()=>{r({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!i("autoplay")],()=>{r({type:i("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(qe(e))},effects:{autoUpdateSlide({computed:e,send:t}){let n=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(n)},trackSlideMutation({scope:e,send:t}){let n=qe(e);if(!n)return;let i=e.getWin(),r=new i.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),Hd(e)});return Hd(e),r.observe(n,{childList:!0,subtree:!0}),()=>r.disconnect()},trackSlideResize({scope:e,send:t}){if(!qe(e))return;let i=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};H(()=>{i(),H(()=>{t({type:"PAGE.SCROLL",instant:!0})})});let r=$d(e);r.forEach(i);let s=r.map(a=>gn.observe(a,i));return At(...s)},trackSlideIntersections({scope:e,prop:t,context:n}){let i=qe(e),r=e.getWin(),s=new r.IntersectionObserver(a=>{let o=a.reduce((l,c)=>{var m;let d=c.target,h=Number((m=d.dataset.index)!=null?m:"-1");return h==null||Number.isNaN(h)||h===-1?l:c.isIntersecting?Ze(l,h):ct(l,h)},n.get("slidesInView"));n.set("slidesInView",vt(o))},{root:i,threshold:t("inViewThreshold")});return $d(e).forEach(a=>s.observe(a)),()=>s.disconnect()},trackScroll({send:e,refs:t,scope:n}){let i=qe(n);return i?ee(i,"scroll",()=>{clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0),t.set("timeoutRef",setTimeout(()=>{e({type:"SCROLL.END"})},150))},{passive:!0}):void 0},trackDocumentVisibility({scope:e,send:t}){let n=e.getDoc();return ee(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){let n=e.getDoc();return hn(n,{onPointerMove({event:i}){t({type:"DRAGGING",left:-i.movementX,top:-i.movementY})},onPointerUp(){t({type:"DRAGGING.END"})}})},trackKeyboardScroll({scope:e,send:t,context:n}){let i=e.getWin();return ee(i,"keydown",s=>{switch(s.key){case"ArrowRight":s.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":s.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":s.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":s.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:i,flush:r}){var c;let s=t.instant?"instant":"smooth",a=He((c=t.index)!=null?c:e.get("page"),0,e.get("pageSnapPoints").length-1),o=qe(n);if(!o)return;let l=i("isHorizontal")?"left":"top";r(()=>{o.scrollTo({[l]:e.get("pageSnapPoints")[a],behavior:s})})},setClosestPage({context:e,scope:t,computed:n}){let i=qe(t);if(!i)return;let r=n("isHorizontal")?i.scrollLeft:i.scrollTop,s=e.get("pageSnapPoints").findIndex(a=>Math.abs(a-r)<1);s!==-1&&e.set("page",s)},setNextPage({context:e,prop:t,state:n}){let i=n.matches("autoplay")||t("loop"),r=Ei(e.get("pageSnapPoints"),e.get("page"),{loop:i});e.set("page",r)},setPrevPage({context:e,prop:t,state:n}){let i=n.matches("autoplay")||t("loop"),r=lr(e.get("pageSnapPoints"),e.get("page"),{loop:i});e.set("page",r)},setMatchingPage({context:e,event:t,computed:n,scope:i}){let r=qe(i);if(!r)return;let s=xy(r,n("isHorizontal")?"x":"y",o=>o.dataset.index===t.index.toString());if(s==null)return;let a=e.get("pageSnapPoints").findIndex(o=>Math.abs(o-s)<1);e.set("page",a)},setPage({context:e,event:t}){var i;let n=(i=t.index)!=null?i:e.get("page");e.set("page",n)},clampPage({context:e}){let t=He(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){let i=qe(n);if(!i)return;let r=Vy(i);e.set("pageSnapPoints",t("isHorizontal")?r.x:r.y)},disableScrollSnap({scope:e}){let t=qe(e);if(!t)return;let n=getComputedStyle(t);t.dataset.scrollSnapType=n.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){let n=qe(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){let i=qe(e);if(!i)return;let r=n("isHorizontal"),s=r?i.scrollLeft:i.scrollTop,a=t.get("pageSnapPoints"),o=a.reduce((l,c)=>Math.abs(c-s){i.scrollTo({left:r?o:i.scrollLeft,top:r?i.scrollTop:o,behavior:"smooth"}),t.set("page",a.indexOf(o));let l=i.dataset.scrollSnapType;l&&(i.style.setProperty("scroll-snap-type",l),delete i.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;let i=My(n,e.get("page"));i&&H(()=>i.focus({preventScroll:!0}))},invokeDragStart({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.start",isDragging:!0,page:e.get("page")})},invokeDragging({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging",isDragging:!0,page:e.get("page")})},invokeDraggingEnd({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.end",isDragging:!1,page:e.get("page")})},invokeAutoplay({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay",isPlaying:!0,page:e.get("page")})},invokeAutoplayStart({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.start",isPlaying:!0,page:e.get("page")})},invokeAutoplayEnd({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.stop",isPlaying:!1,page:e.get("page")})}}}};By=_()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","autoSize","onDragStatusChange","onAutoplayStatusChange"]),O0=B(By),_y=_()(["index","readOnly"]),w0=B(_y),Gy=_()(["index","snapAlign"]),V0=B(Gy),Uy=class extends K{initMachine(e){return new W($y,e)}initApi(){return Fy(this.machine.service,q)}render(){var d;let e=(d=this.el.querySelector('[data-scope="carousel"][data-part="root"]'))!=null?d:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="carousel"][data-part="control"]');t&&this.spreadProps(t,this.api.getControlProps());let n=this.el.querySelector('[data-scope="carousel"][data-part="item-group"]');n&&this.spreadProps(n,this.api.getItemGroupProps());let i=Number(this.el.dataset.slideCount)||0;for(let h=0;h{let h=w(e,"onPageChange");h&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(h,{page:d.page,pageSnapPoint:d.pageSnapPoint,id:e.id});let m=w(e,"onPageChangeClient");m&&e.dispatchEvent(new CustomEvent(m,{bubbles:!0,detail:{value:d,id:e.id}}))}}));s.init(),this.carousel=s,this.handlers=[]},updated(){var i,r;let e=z(this.el,"slideCount");if(e==null||e<1)return;let t=z(this.el,"page"),n=C(this.el,"controlled");(r=this.carousel)==null||r.updateProps(y(g({id:this.el.id,slideCount:e},n&&t!==void 0?{page:t}:{}),{dir:Oe(this.el),orientation:w(this.el,"orientation",["horizontal","vertical"]),slidesPerPage:(i=z(this.el,"slidesPerPage"))!=null?i:1,loop:C(this.el,"loop"),allowMouseDrag:C(this.el,"allowMouseDrag")}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.carousel)==null||e.destroy()}}});function Wy(e){return!(e.metaKey||!ui()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function zy(e,t,n){let i=n?j(n):null,r=de(i);return e=e||i instanceof r.HTMLInputElement&&!Ky.has(i==null?void 0:i.type)||i instanceof r.HTMLTextAreaElement||i instanceof r.HTMLElement&&i.isContentEditable,!(e&&t==="keyboard"&&n instanceof r.KeyboardEvent&&!Reflect.has(Yy,n.key))}function xs(e,t){for(let n of Co)n(e,t)}function Vs(e){Un=!0,Wy(e)&&(In="keyboard",xs("keyboard",e))}function ut(e){In="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Un=!0,xs("pointer",e))}function Kd(e){Vc(e)&&(Un=!0,In="virtual")}function zd(e){let t=j(e);t===de(t)||t===Le(t)||(!Un&&!So&&(In="virtual",xs("virtual",e)),Un=!1,So=!1)}function Yd(){Un=!1,So=!0}function jy(e){if(typeof window=="undefined"||ws.get(de(e)))return;let t=de(e),n=Le(e),i=t.HTMLElement.prototype.focus;function r(){In="virtual",xs("virtual",null),Un=!0,i.apply(this,arguments)}try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:r})}catch(s){}n.addEventListener("keydown",Vs,!0),n.addEventListener("keyup",Vs,!0),n.addEventListener("click",Kd,!0),t.addEventListener("focus",zd,!0),t.addEventListener("blur",Yd,!1),typeof t.PointerEvent!="undefined"?(n.addEventListener("pointerdown",ut,!0),n.addEventListener("pointermove",ut,!0),n.addEventListener("pointerup",ut,!0)):(n.addEventListener("mousedown",ut,!0),n.addEventListener("mousemove",ut,!0),n.addEventListener("mouseup",ut,!0)),t.addEventListener("beforeunload",()=>{Xy(e)},{once:!0}),ws.set(t,{focus:i})}function jd(){return In}function En(){return In==="keyboard"}function Pn(e={}){let{isTextInput:t,autoFocus:n,onChange:i,root:r}=e;jy(r),i==null||i({isFocusVisible:n||En(),modality:In});let s=(a,o)=>{zy(!!t,a,o)&&(i==null||i({isFocusVisible:En(),modality:a}))};return Co.add(s),()=>{Co.delete(s)}}var Ky,In,Co,ws,Un,So,Yy,Xy,pr=re(()=>{"use strict";se();Ky=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);In=null,Co=new Set,ws=new Map,Un=!1,So=!1,Yy={Tab:!0,Escape:!0};Xy=(e,t)=>{let n=de(e),i=Le(e),r=ws.get(n);if(r){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:r.focus})}catch(s){}i.removeEventListener("keydown",Vs,!0),i.removeEventListener("keyup",Vs,!0),i.removeEventListener("click",Kd,!0),n.removeEventListener("focus",zd,!0),n.removeEventListener("blur",Yd,!1),typeof n.PointerEvent!="undefined"?(i.removeEventListener("pointerdown",ut,!0),i.removeEventListener("pointermove",ut,!0),i.removeEventListener("pointerup",ut,!0)):(i.removeEventListener("mousedown",ut,!0),i.removeEventListener("mousemove",ut,!0),i.removeEventListener("mouseup",ut,!0)),ws.delete(n)}}});var Qd={};he(Qd,{Checkbox:()=>sb});function eb(e,t){let{send:n,context:i,prop:r,computed:s,scope:a}=e,o=!!r("disabled"),l=!!r("readOnly"),c=!!r("required"),d=!!r("invalid"),h=!o&&i.get("focused"),m=!o&&i.get("focusVisible"),u=s("checked"),p=s("indeterminate"),v=i.get("checked"),I={"data-active":E(i.get("active")),"data-focus":E(h),"data-focus-visible":E(m),"data-readonly":E(l),"data-hover":E(i.get("hovered")),"data-disabled":E(o),"data-state":p?"indeterminate":u?"checked":"unchecked","data-invalid":E(d),"data-required":E(c)};return{checked:u,disabled:o,indeterminate:p,focused:h,checkedState:v,setChecked(T){n({type:"CHECKED.SET",checked:T,isTrusted:!1})},toggleChecked(){n({type:"CHECKED.TOGGLE",checked:u,isTrusted:!1})},getRootProps(){return t.label(y(g(g({},As.root.attrs),I),{dir:r("dir"),id:Jd(a),htmlFor:To(a),onPointerMove(){o||n({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){o||n({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(T){j(T)===fr(a)&&T.stopPropagation()}}))},getLabelProps(){return t.element(y(g(g({},As.label.attrs),I),{dir:r("dir"),id:Xd(a)}))},getControlProps(){return t.element(y(g(g({},As.control.attrs),I),{dir:r("dir"),id:Jy(a),"aria-hidden":!0}))},getIndicatorProps(){return t.element(y(g(g({},As.indicator.attrs),I),{dir:r("dir"),hidden:!p&&!u}))},getHiddenInputProps(){return t.input({id:To(a),type:"checkbox",required:r("required"),defaultChecked:u,disabled:o,"aria-labelledby":Xd(a),"aria-invalid":d,name:r("name"),form:r("form"),value:r("value"),style:Vt,onFocus(){let T=En();n({type:"CONTEXT.SET",context:{focused:!0,focusVisible:T}})},onBlur(){n({type:"CONTEXT.SET",context:{focused:!1,focusVisible:!1}})},onClick(T){if(l){T.preventDefault();return}let O=T.currentTarget.checked;n({type:"CHECKED.SET",checked:O,isTrusted:!0})}})}}}function ks(e){return e==="indeterminate"}function nb(e){return ks(e)?!1:!!e}var Zy,As,Jd,Xd,Jy,To,Qy,fr,Zd,tb,ib,L0,rb,sb,eu=re(()=>{"use strict";pr();se();Zy=U("checkbox").parts("root","label","control","indicator"),As=Zy.build(),Jd=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`checkbox:${e.id}`},Xd=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`checkbox:${e.id}:label`},Jy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`checkbox:${e.id}:control`},To=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.hiddenInput)!=null?n:`checkbox:${e.id}:input`},Qy=e=>e.getById(Jd(e)),fr=e=>e.getById(To(e));({not:Zd}=Ee()),tb={props({props:e}){var t;return y(g({value:"on"},e),{defaultChecked:(t=e.defaultChecked)!=null?t:!1})},initialState(){return"ready"},context({prop:e,bindable:t}){return{checked:t(()=>({defaultValue:e("defaultChecked"),value:e("checked"),onChange(n){var i;(i=e("onCheckedChange"))==null||i({checked:n})}})),fieldsetDisabled:t(()=>({defaultValue:!1})),focusVisible:t(()=>({defaultValue:!1})),active:t(()=>({defaultValue:!1})),focused:t(()=>({defaultValue:!1})),hovered:t(()=>({defaultValue:!1}))}},watch({track:e,context:t,prop:n,action:i}){e([()=>n("disabled")],()=>{i(["removeFocusIfNeeded"])}),e([()=>t.get("checked")],()=>{i(["syncInputElement"])})},effects:["trackFormControlState","trackPressEvent","trackFocusVisible"],on:{"CHECKED.TOGGLE":[{guard:Zd("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:Zd("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},computed:{indeterminate:({context:e})=>ks(e.get("checked")),checked:({context:e})=>nb(e.get("checked")),disabled:({context:e,prop:t})=>!!t("disabled")||e.get("fieldsetDisabled")},states:{ready:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackPressEvent({context:e,computed:t,scope:n}){if(!t("disabled"))return ps({pointerNode:Qy(n),keyboardNode:fr(n),isValidKey:i=>i.key===" ",onPress:()=>e.set("active",!1),onPressStart:()=>e.set("active",!0),onPressEnd:()=>e.set("active",!1)})},trackFocusVisible({computed:e,scope:t}){var n;if(!e("disabled"))return Pn({root:(n=t.getRootNode)==null?void 0:n.call(t)})},trackFormControlState({context:e,scope:t}){return wt(fr(t),{onFieldsetDisabledChange(n){e.set("fieldsetDisabled",n)},onFormReset(){e.set("checked",e.initial("checked"))}})}},actions:{setContext({context:e,event:t}){for(let n in t.context)e.set(n,t.context[n])},syncInputElement({context:e,computed:t,scope:n}){let i=fr(n);i&&(sr(i,t("checked")),i.indeterminate=ks(e.get("checked")))},removeFocusIfNeeded({context:e,prop:t}){t("disabled")&&e.get("focused")&&(e.set("focused",!1),e.set("focusVisible",!1))},setChecked({context:e,event:t}){e.set("checked",t.checked)},toggleChecked({context:e,computed:t}){let n=ks(t("checked"))?!0:!t("checked");e.set("checked",n)},dispatchChangeEvent({computed:e,scope:t}){queueMicrotask(()=>{let n=fr(t);pi(n,{checked:e("checked")})})}}}};ib=_()(["defaultChecked","checked","dir","disabled","form","getRootNode","id","ids","invalid","name","onCheckedChange","readOnly","required","value"]),L0=B(ib),rb=class extends K{initMachine(e){return new W(tb,e)}initApi(){return eb(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="checkbox"][data-part="root"]');if(!e)return;this.spreadProps(e,this.api.getRootProps());let t=e.querySelector(':scope > [data-scope="checkbox"][data-part="hidden-input"]');t&&this.spreadProps(t,this.api.getHiddenInputProps());let n=e.querySelector(':scope > [data-scope="checkbox"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps());let i=e.querySelector(':scope > [data-scope="checkbox"][data-part="control"]');if(i){this.spreadProps(i,this.api.getControlProps());let r=i.querySelector(':scope > [data-scope="checkbox"][data-part="indicator"]');r&&this.spreadProps(r,this.api.getIndicatorProps())}}},sb={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=new rb(e,y(g({id:e.id},C(e,"controlled")?{checked:C(e,"checked")}:{defaultChecked:C(e,"defaultChecked")}),{disabled:C(e,"disabled"),name:w(e,"name"),form:w(e,"form"),value:w(e,"value"),dir:Oe(e),invalid:C(e,"invalid"),required:C(e,"required"),readOnly:C(e,"readOnly"),onCheckedChange:i=>{let r=w(e,"onCheckedChange");r&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&t(r,{checked:i.checked,id:e.id});let s=w(e,"onCheckedChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{value:i,id:e.id}}))}}));n.init(),this.checkbox=n,this.onSetChecked=i=>{let{checked:r}=i.detail;n.api.setChecked(r)},e.addEventListener("phx:checkbox:set-checked",this.onSetChecked),this.onToggleChecked=()=>{n.api.toggleChecked()},e.addEventListener("phx:checkbox:toggle-checked",this.onToggleChecked),this.handlers=[],this.handlers.push(this.handleEvent("checkbox_set_checked",i=>{let r=i.id;r&&r!==e.id||n.api.setChecked(i.checked)})),this.handlers.push(this.handleEvent("checkbox_toggle_checked",i=>{let r=i.id;r&&r!==e.id||n.api.toggleChecked()})),this.handlers.push(this.handleEvent("checkbox_checked",()=>{this.pushEvent("checkbox_checked_response",{value:n.api.checked})})),this.handlers.push(this.handleEvent("checkbox_focused",()=>{this.pushEvent("checkbox_focused_response",{value:n.api.focused})})),this.handlers.push(this.handleEvent("checkbox_disabled",()=>{this.pushEvent("checkbox_disabled_response",{value:n.api.disabled})}))},updated(){var e;(e=this.checkbox)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlled")?{checked:C(this.el,"checked")}:{defaultChecked:C(this.el,"defaultChecked")}),{disabled:C(this.el,"disabled"),name:w(this.el,"name"),form:w(this.el,"form"),value:w(this.el,"value"),dir:Oe(this.el),invalid:C(this.el,"invalid"),required:C(this.el,"required"),readOnly:C(this.el,"readOnly"),label:w(this.el,"label")}))},destroyed(){var e;if(this.onSetChecked&&this.el.removeEventListener("phx:checkbox:set-checked",this.onSetChecked),this.onToggleChecked&&this.el.removeEventListener("phx:checkbox:toggle-checked",this.onToggleChecked),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.checkbox)==null||e.destroy()}}});var tu={};he(tu,{Clipboard:()=>bb});function ub(e,t){let n=e.createElement("pre");return Object.assign(n.style,{width:"1px",height:"1px",position:"fixed",top:"5px"}),n.textContent=t,n}function hb(e){let n=de(e).getSelection();if(n==null)return Promise.reject(new Error);n.removeAllRanges();let i=e.ownerDocument,r=i.createRange();return r.selectNodeContents(e),n.addRange(r),i.execCommand("copy"),n.removeAllRanges(),Promise.resolve()}function gb(e,t){var r;let n=e.defaultView||window;if(((r=n.navigator.clipboard)==null?void 0:r.writeText)!==void 0)return n.navigator.clipboard.writeText(t);if(!e.body)return Promise.reject(new Error);let i=ub(e,t);return e.body.appendChild(i),hb(i),e.body.removeChild(i),Promise.resolve()}function pb(e,t){let{state:n,send:i,context:r,scope:s}=e,a=n.matches("copied");return{copied:a,value:r.get("value"),setValue(o){i({type:"VALUE.SET",value:o})},copy(){i({type:"COPY"})},getRootProps(){return t.element(y(g({},Oi.root.attrs),{"data-copied":E(a),id:ob(s)}))},getLabelProps(){return t.label(y(g({},Oi.label.attrs),{htmlFor:Oo(s),"data-copied":E(a),id:lb(s)}))},getControlProps(){return t.element(y(g({},Oi.control.attrs),{"data-copied":E(a)}))},getInputProps(){return t.input(y(g({},Oi.input.attrs),{defaultValue:r.get("value"),"data-copied":E(a),readOnly:!0,"data-readonly":"true",id:Oo(s),onFocus(o){o.currentTarget.select()},onCopy(){i({type:"INPUT.COPY"})}}))},getTriggerProps(){return t.button(y(g({},Oi.trigger.attrs),{type:"button","aria-label":a?"Copied to clipboard":"Copy to clipboard","data-copied":E(a),onClick(){i({type:"COPY"})}}))},getIndicatorProps(o){return t.element(y(g({},Oi.indicator.attrs),{hidden:o.copied!==a}))}}}var ab,Oi,ob,Oo,lb,cb,db,fb,mb,H0,vb,B0,yb,bb,nu=re(()=>{"use strict";se();ab=U("clipboard").parts("root","control","trigger","indicator","input","label"),Oi=ab.build(),ob=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`clip:${e.id}`},Oo=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.input)!=null?n:`clip:${e.id}:input`},lb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`clip:${e.id}:label`},cb=e=>e.getById(Oo(e)),db=(e,t)=>gb(e.getDoc(),t);fb={props({props:e}){return g({timeout:3e3,defaultValue:""},e)},initialState(){return"idle"},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var i;(i=e("onValueChange"))==null||i({value:n})}}))}},watch({track:e,context:t,action:n}){e([()=>t.get("value")],()=>{n(["syncInputElement"])})},on:{"VALUE.SET":{actions:["setValue"]},COPY:{target:"copied",actions:["copyToClipboard","invokeOnCopy"]}},states:{idle:{on:{"INPUT.COPY":{target:"copied",actions:["invokeOnCopy"]}}},copied:{effects:["waitForTimeout"],on:{"COPY.DONE":{target:"idle"},COPY:{target:"copied",actions:["copyToClipboard","invokeOnCopy"]},"INPUT.COPY":{actions:["invokeOnCopy"]}}}},implementations:{effects:{waitForTimeout({prop:e,send:t}){return mn(()=>{t({type:"COPY.DONE"})},e("timeout"))}},actions:{setValue({context:e,event:t}){e.set("value",t.value)},copyToClipboard({context:e,scope:t}){db(t,e.get("value"))},invokeOnCopy({prop:e}){var t;(t=e("onStatusChange"))==null||t({copied:!0})},syncInputElement({context:e,scope:t}){let n=cb(t);n&&Me(n,e.get("value"))}}}},mb=_()(["getRootNode","id","ids","value","defaultValue","timeout","onStatusChange","onValueChange"]),H0=B(mb),vb=_()(["copied"]),B0=B(vb),yb=class extends K{initMachine(e){return new W(fb,e)}initApi(){return pb(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="clipboard"][data-part="root"]');if(e){this.spreadProps(e,this.api.getRootProps());let t=e.querySelector('[data-scope="clipboard"][data-part="label"]');t&&this.spreadProps(t,this.api.getLabelProps());let n=e.querySelector('[data-scope="clipboard"][data-part="control"]');if(n){this.spreadProps(n,this.api.getControlProps());let i=n.querySelector('[data-scope="clipboard"][data-part="input"]');if(i){let s=g({},this.api.getInputProps()),a=this.el.dataset.inputAriaLabel;a&&(s["aria-label"]=a),this.spreadProps(i,s)}let r=n.querySelector('[data-scope="clipboard"][data-part="trigger"]');if(r){let s=g({},this.api.getTriggerProps()),a=this.el.dataset.triggerAriaLabel;a&&(s["aria-label"]=a),this.spreadProps(r,s)}}}}},bb={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=this.liveSocket,i=new yb(e,y(g({id:e.id,timeout:z(e,"timeout")},C(e,"controlled")?{value:w(e,"value")}:{defaultValue:w(e,"defaultValue")}),{onValueChange:r=>{var a;let s=w(e,"onValueChange");s&&n.main.isConnected()&&t(s,{id:e.id,value:(a=r.value)!=null?a:null})},onStatusChange:r=>{let s=w(e,"onStatusChange");s&&n.main.isConnected()&&t(s,{id:e.id,copied:r.copied});let a=w(e,"onStatusChangeClient");a&&e.dispatchEvent(new CustomEvent(a,{bubbles:!0}))}}));i.init(),this.clipboard=i,this.onCopy=()=>{i.api.copy()},e.addEventListener("phx:clipboard:copy",this.onCopy),this.onSetValue=r=>{let{value:s}=r.detail;i.api.setValue(s)},e.addEventListener("phx:clipboard:set-value",this.onSetValue),this.handlers=[],this.handlers.push(this.handleEvent("clipboard_copy",r=>{let s=r.clipboard_id;s&&s!==e.id||i.api.copy()})),this.handlers.push(this.handleEvent("clipboard_set_value",r=>{let s=r.clipboard_id;s&&s!==e.id||i.api.setValue(r.value)})),this.handlers.push(this.handleEvent("clipboard_copied",()=>{this.pushEvent("clipboard_copied_response",{value:i.api.copied})}))},updated(){var e;(e=this.clipboard)==null||e.updateProps(y(g({id:this.el.id,timeout:z(this.el,"timeout")},C(this.el,"controlled")?{value:w(this.el,"value")}:{defaultValue:w(this.el,"value")}),{dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(this.onCopy&&this.el.removeEventListener("phx:clipboard:copy",this.onCopy),this.onSetValue&&this.el.removeEventListener("phx:clipboard:set-value",this.onSetValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.clipboard)==null||e.destroy()}}});var iu={};he(iu,{Collapsible:()=>wb});function Cb(e,t){let{state:n,send:i,context:r,scope:s,prop:a}=e,o=n.matches("open")||n.matches("closing"),l=n.matches("open"),c=n.matches("closed"),{width:d,height:h}=r.get("size"),m=!!a("disabled"),u=a("collapsedHeight"),p=a("collapsedWidth"),v=u!=null,I=p!=null,T=v||I,O=!r.get("initial")&&l;return{disabled:m,visible:o,open:l,measureSize(){i({type:"size.measure"})},setOpen(b){n.matches("open")!==b&&i({type:b?"open":"close"})},getRootProps(){return t.element(y(g({},Ns.root.attrs),{"data-state":l?"open":"closed",dir:a("dir"),id:Ib(s)}))},getContentProps(){return t.element(y(g({},Ns.content.attrs),{id:wo(s),"data-collapsible":"","data-state":O?void 0:l?"open":"closed","data-disabled":E(m),"data-has-collapsed-size":E(T),hidden:!o&&!T,dir:a("dir"),style:g(g({"--height":ye(h),"--width":ye(d),"--collapsed-height":ye(u),"--collapsed-width":ye(p)},c&&v&&{overflow:"hidden",minHeight:ye(u),maxHeight:ye(u)}),c&&I&&{overflow:"hidden",minWidth:ye(p),maxWidth:ye(p)})}))},getTriggerProps(){return t.element(y(g({},Ns.trigger.attrs),{id:Pb(s),dir:a("dir"),type:"button","data-state":l?"open":"closed","data-disabled":E(m),"aria-controls":wo(s),"aria-expanded":o||!1,onClick(b){b.defaultPrevented||m||i({type:l?"close":"open"})}}))},getIndicatorProps(){return t.element(y(g({},Ns.indicator.attrs),{dir:a("dir"),"data-state":l?"open":"closed","data-disabled":E(m)}))}}}var Eb,Ns,Ib,wo,Pb,mr,Sb,Tb,q0,Ob,wb,ru=re(()=>{"use strict";se();Eb=U("collapsible").parts("root","trigger","content","indicator"),Ns=Eb.build(),Ib=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`collapsible:${e.id}`},wo=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`collapsible:${e.id}:content`},Pb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`collapsible:${e.id}:trigger`},mr=e=>e.getById(wo(e));Sb={initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{size:e(()=>({defaultValue:{height:0,width:0},sync:!0})),initial:e(()=>({defaultValue:!1}))}},refs(){return{cleanup:void 0,stylesRef:void 0}},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["setInitial","computeSize","toggleVisibility"])})},exit:["cleanupNode"],states:{closed:{effects:["trackTabbableElements"],on:{"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitial","computeSize","invokeOnOpen"]}]}},closing:{effects:["trackExitAnimation"],on:{"controlled.close":{target:"closed"},"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitial","invokeOnOpen"]}],close:[{guard:"isOpenControlled",actions:["invokeOnExitComplete"]},{target:"closed",actions:["setInitial","computeSize","invokeOnExitComplete"]}],"animation.end":{target:"closed",actions:["invokeOnExitComplete","clearInitial"]}}},open:{effects:["trackEnterAnimation"],on:{"controlled.close":{target:"closing"},close:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closing",actions:["setInitial","computeSize","invokeOnClose"]}],"size.measure":{actions:["measureSize"]},"animation.end":{actions:["clearInitial"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackEnterAnimation:({send:e,scope:t})=>{let n,i=H(()=>{let r=mr(t);if(!r)return;let s=at(r).animationName;if(!s||s==="none"){e({type:"animation.end"});return}let o=l=>{j(l)===r&&e({type:"animation.end"})};r.addEventListener("animationend",o),n=()=>{r.removeEventListener("animationend",o)}});return()=>{i(),n==null||n()}},trackExitAnimation:({send:e,scope:t})=>{let n,i=H(()=>{let r=mr(t);if(!r)return;let s=at(r).animationName;if(!s||s==="none"){e({type:"animation.end"});return}let o=c=>{j(c)===r&&e({type:"animation.end"})};r.addEventListener("animationend",o);let l=Hn(r,{animationFillMode:"forwards"});n=()=>{r.removeEventListener("animationend",o),$n(()=>l())}});return()=>{i(),n==null||n()}},trackTabbableElements:({scope:e,prop:t})=>{if(!t("collapsedHeight")&&!t("collapsedWidth"))return;let n=mr(e);if(!n)return;let i=()=>{let o=jt(n).map(l=>Fc(l,"inert",""));return()=>{o.forEach(l=>l())}},r=i(),s=hs(n,{callback(){r(),r=i()}});return()=>{r(),s()}}},actions:{setInitial:({context:e,flush:t})=>{t(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},cleanupNode:({refs:e})=>{e.set("stylesRef",null)},measureSize:({context:e,scope:t})=>{let n=mr(t);if(!n)return;let{height:i,width:r}=n.getBoundingClientRect();e.set("size",{height:i,width:r})},computeSize:({refs:e,scope:t,context:n})=>{var r;(r=e.get("cleanup"))==null||r();let i=H(()=>{let s=mr(t);if(!s)return;let a=s.hidden;s.style.animationName="none",s.style.animationDuration="0s",s.hidden=!1;let o=s.getBoundingClientRect();n.set("size",{height:o.height,width:o.width}),n.get("initial")&&(s.style.animationName="",s.style.animationDuration=""),s.hidden=a});e.set("cleanup",i)},invokeOnOpen:({prop:e})=>{var t;(t=e("onOpenChange"))==null||t({open:!0})},invokeOnClose:({prop:e})=>{var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},toggleVisibility:({prop:e,send:t})=>{t({type:e("open")?"controlled.open":"controlled.close"})}}}},Tb=_()(["dir","disabled","getRootNode","id","ids","collapsedHeight","collapsedWidth","onExitComplete","onOpenChange","defaultOpen","open"]),q0=B(Tb),Ob=class extends K{initMachine(e){return new W(Sb,e)}initApi(){return Cb(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="collapsible"][data-part="root"]');if(e){this.spreadProps(e,this.api.getRootProps());let t=e.querySelector('[data-scope="collapsible"][data-part="trigger"]');t&&this.spreadProps(t,this.api.getTriggerProps());let n=e.querySelector('[data-scope="collapsible"][data-part="content"]');n&&this.spreadProps(n,this.api.getContentProps())}}},wb={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=new Ob(e,y(g({id:e.id},C(e,"controlled")?{open:C(e,"open")}:{defaultOpen:C(e,"defaultOpen")}),{disabled:C(e,"disabled"),dir:w(e,"dir",["ltr","rtl"]),onOpenChange:i=>{let r=w(e,"onOpenChange");r&&this.liveSocket.main.isConnected()&&t(r,{id:e.id,open:i.open});let s=w(e,"onOpenChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{id:e.id,open:i.open}}))}}));n.init(),this.collapsible=n,this.onSetOpen=i=>{let{open:r}=i.detail;n.api.setOpen(r)},e.addEventListener("phx:collapsible:set-open",this.onSetOpen),this.handlers=[],this.handlers.push(this.handleEvent("collapsible_set_open",i=>{let r=i.collapsible_id;r&&r!==e.id||n.api.setOpen(i.open)})),this.handlers.push(this.handleEvent("collapsible_open",()=>{this.pushEvent("collapsible_open_response",{value:n.api.open})}))},updated(){var e;(e=this.collapsible)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlled")?{open:C(this.el,"open")}:{defaultOpen:C(this.el,"defaultOpen")}),{disabled:C(this.el,"disabled"),dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(this.onSetOpen&&this.el.removeEventListener("phx:collapsible:set-open",this.onSetOpen),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.collapsible)==null||e.destroy()}}});function vr(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function Rs(e,t,n){t=[...t].sort((r,s)=>r-s);let i=t.map(r=>e[r]);for(let r=t.length-1;r>=0;r--)e=[...e.slice(0,t[r]),...e.slice(t[r]+1)];return n=Math.max(0,n-t.filter(r=>rt[n])return 1}return e.length-t.length}function Nb(e){return e.sort(du)}function Rb(e,t){let n;return Je(e,y(g({},t),{onEnter:(i,r)=>{if(t.predicate(i,r))return n=i,"stop"}})),n}function Db(e,t){let n=[];return Je(e,{onEnter:(i,r)=>{t.predicate(i,r)&&n.push(i)},getChildren:t.getChildren}),n}function su(e,t){let n;return Je(e,{onEnter:(i,r)=>{if(t.predicate(i,r))return n=[...r],"stop"},getChildren:t.getChildren}),n}function Lb(e,t){let n=t.initialResult;return Je(e,y(g({},t),{onEnter:(i,r)=>{n=t.nextResult(n,i,r)}})),n}function Mb(e,t){return Lb(e,y(g({},t),{initialResult:[],nextResult:(n,i,r)=>(n.push(...t.transform(i,r)),n)}))}function Fb(e,t){let{predicate:n,create:i,getChildren:r}=t,s=(a,o)=>{let l=r(a,o),c=[];l.forEach((u,p)=>{let v=[...o,p],I=s(u,v);I&&c.push(I)});let d=o.length===0,h=n(a,o),m=c.length>0;return d||h||m?i(a,c,o):null};return s(e,[])||i(e,[],[])}function $b(e,t){let n=[],i=0,r=new Map,s=new Map;return Je(e,{getChildren:t.getChildren,onEnter:(a,o)=>{r.has(a)||r.set(a,i++);let l=t.getChildren(a,o);l.forEach(u=>{s.has(u)||s.set(u,a),r.has(u)||r.set(u,i++)});let c=l.length>0?l.map(u=>r.get(u)):void 0,d=s.get(a),h=d?r.get(d):void 0,m=r.get(a);n.push(y(g({},a),{_children:c,_parent:h,_index:m}))}}),n}function Hb(e,t){return{type:"insert",index:e,nodes:t}}function Bb(e){return{type:"remove",indexes:e}}function xo(){return{type:"replace"}}function uu(e){return[e.slice(0,-1),e[e.length-1]]}function hu(e,t,n=new Map){var a;let[i,r]=uu(e);for(let o=i.length-1;o>=0;o--){let l=i.slice(0,o).join();switch((a=n.get(l))==null?void 0:a.type){case"remove":continue}n.set(l,xo())}let s=n.get(i.join());switch(s==null?void 0:s.type){case"remove":n.set(i.join(),{type:"removeThenInsert",removeIndexes:s.indexes,insertIndex:r,insertNodes:t});break;default:n.set(i.join(),Hb(r,t))}return n}function gu(e){var i;let t=new Map,n=new Map;for(let r of e){let s=r.slice(0,-1).join(),a=(i=n.get(s))!=null?i:[];a.push(r[r.length-1]),n.set(s,a.sort((o,l)=>o-l))}for(let r of e)for(let s=r.length-2;s>=0;s--){let a=r.slice(0,s).join();t.has(a)||t.set(a,xo())}for(let[r,s]of n)t.set(r,Bb(s));return t}function _b(e,t){let n=new Map,[i,r]=uu(e);for(let s=i.length-1;s>=0;s--){let a=i.slice(0,s).join();n.set(a,xo())}return n.set(i.join(),{type:"removeThenInsert",removeIndexes:[r],insertIndex:r,insertNodes:[t]}),n}function Ms(e,t,n){return Gb(e,y(g({},n),{getChildren:(i,r)=>{let s=r.join(),a=t.get(s);switch(a==null?void 0:a.type){case"replace":case"remove":case"removeThenInsert":case"insert":return n.getChildren(i,r);default:return[]}},transform:(i,r,s)=>{let a=s.join(),o=t.get(a);switch(o==null?void 0:o.type){case"remove":return n.create(i,r.filter((d,h)=>!o.indexes.includes(h)),s);case"removeThenInsert":let l=r.filter((d,h)=>!o.removeIndexes.includes(h)),c=o.removeIndexes.reduce((d,h)=>h{var d,h;let s=[0,...r],a=s.join(),o=t.transform(i,(d=n[a])!=null?d:[],r),l=s.slice(0,-1).join(),c=(h=n[l])!=null?h:[];c.push(o),n[l]=c}})),n[""][0]}function Ub(e,t){let{nodes:n,at:i}=t;if(i.length===0)throw new Error("Can't insert nodes at the root");let r=hu(i,n);return Ms(e,r,t)}function qb(e,t){if(t.at.length===0)return t.node;let n=_b(t.at,t.node);return Ms(e,n,t)}function Wb(e,t){if(t.indexPaths.length===0)return e;for(let i of t.indexPaths)if(i.length===0)throw new Error("Can't remove the root node");let n=gu(t.indexPaths);return Ms(e,n,t)}function Kb(e,t){if(t.indexPaths.length===0)return e;for(let s of t.indexPaths)if(s.length===0)throw new Error("Can't move the root node");if(t.to.length===0)throw new Error("Can't move nodes to the root");let n=kb(t.indexPaths),i=n.map(s=>cu(e,s,t)),r=hu(t.to,i,gu(n));return Ms(e,r,t)}function Je(e,t){let{onEnter:n,onLeave:i,getChildren:r}=t,s=[],a=[{node:e}],o=t.reuseIndexPath?()=>s:()=>s.slice();for(;a.length>0;){let l=a[a.length-1];if(l.state===void 0){let d=n==null?void 0:n(l.node,o());if(d==="stop")return;l.state=d==="skip"?-1:0}let c=l.children||r(l.node,o());if(l.children||(l.children=c),l.state!==-1){if(l.state{"use strict";se();Vb=Object.defineProperty,xb=(e,t,n)=>t in e?Vb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,L=(e,t,n)=>xb(e,typeof t!="symbol"?t+"":t,n),Ds={itemToValue(e){return typeof e=="string"?e:xt(e)&&$e(e,"value")?e.value:""},itemToString(e){return typeof e=="string"?e:xt(e)&&$e(e,"label")?e.label:Ds.itemToValue(e)},isItemDisabled(e){return xt(e)&&$e(e,"disabled")?!!e.disabled:!1}},Nt=class ou{constructor(t){this.options=t,L(this,"items"),L(this,"indexMap",null),L(this,"copy",n=>new ou(y(g({},this.options),{items:n!=null?n:[...this.items]}))),L(this,"isEqual",n=>fe(this.items,n.items)),L(this,"setItems",n=>this.copy(n)),L(this,"getValues",(n=this.items)=>{let i=[];for(let r of n){let s=this.getItemValue(r);s!=null&&i.push(s)}return i}),L(this,"find",n=>{if(n==null)return null;let i=this.indexOf(n);return i!==-1?this.at(i):null}),L(this,"findMany",n=>{let i=[];for(let r of n){let s=this.find(r);s!=null&&i.push(s)}return i}),L(this,"at",n=>{var s;if(!this.options.groupBy&&!this.options.groupSort)return(s=this.items[n])!=null?s:null;let i=0,r=this.group();for(let[,a]of r)for(let o of a){if(i===n)return o;i++}return null}),L(this,"sortFn",(n,i)=>{let r=this.indexOf(n),s=this.indexOf(i);return(r!=null?r:0)-(s!=null?s:0)}),L(this,"sort",n=>[...n].sort(this.sortFn.bind(this))),L(this,"getItemValue",n=>{var i,r,s;return n==null?null:(s=(r=(i=this.options).itemToValue)==null?void 0:r.call(i,n))!=null?s:Ds.itemToValue(n)}),L(this,"getItemDisabled",n=>{var i,r,s;return n==null?!1:(s=(r=(i=this.options).isItemDisabled)==null?void 0:r.call(i,n))!=null?s:Ds.isItemDisabled(n)}),L(this,"stringifyItem",n=>{var i,r,s;return n==null?null:(s=(r=(i=this.options).itemToString)==null?void 0:r.call(i,n))!=null?s:Ds.itemToString(n)}),L(this,"stringify",n=>n==null?null:this.stringifyItem(this.find(n))),L(this,"stringifyItems",(n,i=", ")=>{let r=[];for(let s of n){let a=this.stringifyItem(s);a!=null&&r.push(a)}return r.join(i)}),L(this,"stringifyMany",(n,i)=>this.stringifyItems(this.findMany(n),i)),L(this,"has",n=>this.indexOf(n)!==-1),L(this,"hasItem",n=>n==null?!1:this.has(this.getItemValue(n))),L(this,"group",()=>{let{groupBy:n,groupSort:i}=this.options;if(!n)return[["",[...this.items]]];let r=new Map;this.items.forEach((a,o)=>{let l=n(a,o);r.has(l)||r.set(l,[]),r.get(l).push(a)});let s=Array.from(r.entries());return i&&s.sort(([a],[o])=>{if(typeof i=="function")return i(a,o);if(Array.isArray(i)){let l=i.indexOf(a),c=i.indexOf(o);return l===-1?1:c===-1?-1:l-c}return i==="asc"?a.localeCompare(o):i==="desc"?o.localeCompare(a):0}),s}),L(this,"getNextValue",(n,i=1,r=!1)=>{let s=this.indexOf(n);if(s===-1)return null;for(s=r?Math.min(s+i,this.size-1):s+i;s<=this.size&&this.getItemDisabled(this.at(s));)s++;return this.getItemValue(this.at(s))}),L(this,"getPreviousValue",(n,i=1,r=!1)=>{let s=this.indexOf(n);if(s===-1)return null;for(s=r?Math.max(s-i,0):s-i;s>=0&&this.getItemDisabled(this.at(s));)s--;return this.getItemValue(this.at(s))}),L(this,"indexOf",n=>{var i;if(n==null)return-1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex(r=>this.getItemValue(r)===n);if(!this.indexMap){this.indexMap=new Map;let r=0,s=this.group();for(let[,a]of s)for(let o of a){let l=this.getItemValue(o);l!=null&&this.indexMap.set(l,r),r++}}return(i=this.indexMap.get(n))!=null?i:-1}),L(this,"getByText",(n,i)=>{let r=i!=null?this.indexOf(i):-1,s=n.length===1;for(let a=0;a{let{state:r,currentValue:s,timeout:a=350}=i,o=r.keysSoFar+n,c=o.length>1&&Array.from(o).every(p=>p===o[0])?o[0]:o,d=this.getByText(c,s),h=this.getItemValue(d);function m(){clearTimeout(r.timer),r.timer=-1}function u(p){r.keysSoFar=p,m(),p!==""&&(r.timer=+setTimeout(()=>{u(""),m()},a))}return u(o),h}),L(this,"update",(n,i)=>{let r=this.indexOf(n);return r===-1?this:this.copy([...this.items.slice(0,r),i,...this.items.slice(r+1)])}),L(this,"upsert",(n,i,r="append")=>{let s=this.indexOf(n);return s===-1?(r==="append"?this.append:this.prepend)(i):this.copy([...this.items.slice(0,s),i,...this.items.slice(s+1)])}),L(this,"insert",(n,...i)=>this.copy(vr(this.items,n,...i))),L(this,"insertBefore",(n,...i)=>{let r=this.indexOf(n);if(r===-1)if(this.items.length===0)r=0;else return this;return this.copy(vr(this.items,r,...i))}),L(this,"insertAfter",(n,...i)=>{let r=this.indexOf(n);if(r===-1)if(this.items.length===0)r=0;else return this;return this.copy(vr(this.items,r+1,...i))}),L(this,"prepend",(...n)=>this.copy(vr(this.items,0,...n))),L(this,"append",(...n)=>this.copy(vr(this.items,this.items.length,...n))),L(this,"filter",n=>{let i=this.items.filter((r,s)=>n(this.stringifyItem(r),s,r));return this.copy(i)}),L(this,"remove",(...n)=>{let i=n.map(r=>typeof r=="string"?r:this.getItemValue(r));return this.copy(this.items.filter(r=>{let s=this.getItemValue(r);return s==null?!1:!i.includes(s)}))}),L(this,"move",(n,i)=>{let r=this.indexOf(n);return r===-1?this:this.copy(Rs(this.items,[r],i))}),L(this,"moveBefore",(n,...i)=>{let r=this.items.findIndex(a=>this.getItemValue(a)===n);if(r===-1)return this;let s=i.map(a=>this.items.findIndex(o=>this.getItemValue(o)===a)).sort((a,o)=>a-o);return this.copy(Rs(this.items,s,r))}),L(this,"moveAfter",(n,...i)=>{let r=this.items.findIndex(a=>this.getItemValue(a)===n);if(r===-1)return this;let s=i.map(a=>this.items.findIndex(o=>this.getItemValue(o)===a)).sort((a,o)=>a-o);return this.copy(Rs(this.items,s,r+1))}),L(this,"reorder",(n,i)=>this.copy(Rs(this.items,[n],i))),L(this,"compareValue",(n,i)=>{let r=this.indexOf(n),s=this.indexOf(i);return rs?1:0}),L(this,"range",(n,i)=>{let r=[],s=n;for(;s!=null;){if(this.find(s)&&r.push(s),s===i)return r;s=this.getNextValue(s)}return[]}),L(this,"getValueRange",(n,i)=>n&&i?this.compareValue(n,i)<=0?this.range(n,i):this.range(i,n):[]),L(this,"toString",()=>{let n="";for(let i of this.items){let r=this.getItemValue(i),s=this.stringifyItem(i),a=this.getItemDisabled(i),o=[r,s,a].filter(Boolean).join(":");n+=o+","}return n}),L(this,"toJSON",()=>({size:this.size,first:this.firstValue,last:this.lastValue})),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let t=0;for(;this.getItemDisabled(this.at(t));)t++;return this.getItemValue(this.at(t))}get lastValue(){let t=this.size-1;for(;this.getItemDisabled(this.at(t));)t--;return this.getItemValue(this.at(t))}*[Symbol.iterator](){yield*sc(this.items)}},Ab=(e,t)=>!!(e!=null&&e.toLowerCase().startsWith(t.toLowerCase()));Vo=class extends Nt{constructor(e){let{columnCount:t}=e;super(e),L(this,"columnCount"),L(this,"rows",null),L(this,"getRows",()=>(this.rows||(this.rows=cr([...this.items],this.columnCount)),this.rows)),L(this,"getRowCount",()=>Math.ceil(this.items.length/this.columnCount)),L(this,"getCellIndex",(n,i)=>n*this.columnCount+i),L(this,"getCell",(n,i)=>this.at(this.getCellIndex(n,i))),L(this,"getValueCell",n=>{let i=this.indexOf(n);if(i===-1)return null;let r=Math.floor(i/this.columnCount),s=i%this.columnCount;return{row:r,column:s}}),L(this,"getLastEnabledColumnIndex",n=>{for(let i=this.columnCount-1;i>=0;i--){let r=this.getCell(n,i);if(r&&!this.getItemDisabled(r))return i}return null}),L(this,"getFirstEnabledColumnIndex",n=>{for(let i=0;i{let r=this.getValueCell(n);if(r===null)return null;let s=this.getRows(),a=s.length,o=r.row,l=r.column;for(let c=1;c<=a;c++){o=lr(s,o,{loop:i});let d=s[o];if(!d)continue;if(!d[l]){let u=this.getLastEnabledColumnIndex(o);u!=null&&(l=u)}let m=this.getCell(o,l);if(!this.getItemDisabled(m))return this.getItemValue(m)}return this.firstValue}),L(this,"getNextRowValue",(n,i=!1)=>{let r=this.getValueCell(n);if(r===null)return null;let s=this.getRows(),a=s.length,o=r.row,l=r.column;for(let c=1;c<=a;c++){o=Ei(s,o,{loop:i});let d=s[o];if(!d)continue;if(!d[l]){let u=this.getLastEnabledColumnIndex(o);u!=null&&(l=u)}let m=this.getCell(o,l);if(!this.getItemDisabled(m))return this.getItemValue(m)}return this.lastValue}),this.columnCount=t}};lu=class Ls extends Set{constructor(t=[]){super(t),L(this,"selectionMode","single"),L(this,"deselectable",!0),L(this,"copy",()=>{let n=new Ls([...this]);return this.sync(n)}),L(this,"sync",n=>(n.selectionMode=this.selectionMode,n.deselectable=this.deselectable,n)),L(this,"isEmpty",()=>this.size===0),L(this,"isSelected",n=>this.selectionMode==="none"||n==null?!1:this.has(n)),L(this,"canSelect",(n,i)=>this.selectionMode!=="none"||!n.getItemDisabled(n.find(i))),L(this,"firstSelectedValue",n=>{let i=null;for(let r of this)(!i||n.compareValue(r,i)<0)&&(i=r);return i}),L(this,"lastSelectedValue",n=>{let i=null;for(let r of this)(!i||n.compareValue(r,i)>0)&&(i=r);return i}),L(this,"extendSelection",(n,i,r)=>{if(this.selectionMode==="none")return this;if(this.selectionMode==="single")return this.replaceSelection(n,r);let s=this.copy(),a=Array.from(this).pop();for(let o of n.getValueRange(i,a!=null?a:r))s.delete(o);for(let o of n.getValueRange(r,i))this.canSelect(n,o)&&s.add(o);return s}),L(this,"toggleSelection",(n,i)=>{if(this.selectionMode==="none")return this;if(this.selectionMode==="single"&&!this.isSelected(i))return this.replaceSelection(n,i);let r=this.copy();return r.has(i)?r.delete(i):r.canSelect(n,i)&&r.add(i),r}),L(this,"replaceSelection",(n,i)=>{if(this.selectionMode==="none")return this;if(i==null)return this;if(!this.canSelect(n,i))return this;let r=new Ls([i]);return this.sync(r)}),L(this,"setSelection",n=>{if(this.selectionMode==="none")return this;let i=new Ls;for(let r of n)if(r!=null&&(i.add(r),this.selectionMode==="single"))break;return this.sync(i)}),L(this,"clearSelection",()=>{let n=this.copy();return n.deselectable&&n.size>0&&n.clear(),n}),L(this,"select",(n,i,r)=>this.selectionMode==="none"?this:this.selectionMode==="single"?this.isSelected(i)&&this.deselectable?this.toggleSelection(n,i):this.replaceSelection(n,i):this.selectionMode==="multiple"||r?this.toggleSelection(n,i):this.replaceSelection(n,i)),L(this,"deselect",n=>{let i=this.copy();return i.delete(n),i}),L(this,"isEqual",n=>fe(Array.from(this),Array.from(n)))}};Ao=class pu{constructor(t){this.options=t,L(this,"rootNode"),L(this,"isEqual",n=>fe(this.rootNode,n.rootNode)),L(this,"getNodeChildren",n=>{var i,r,s,a;return(a=(s=(r=(i=this.options).nodeToChildren)==null?void 0:r.call(i,n))!=null?s:wi.nodeToChildren(n))!=null?a:[]}),L(this,"resolveIndexPath",n=>typeof n=="string"?this.getIndexPath(n):n),L(this,"resolveNode",n=>{let i=this.resolveIndexPath(n);return i?this.at(i):void 0}),L(this,"getNodeChildrenCount",n=>{var i,r,s;return(s=(r=(i=this.options).nodeToChildrenCount)==null?void 0:r.call(i,n))!=null?s:wi.nodeToChildrenCount(n)}),L(this,"getNodeValue",n=>{var i,r,s;return(s=(r=(i=this.options).nodeToValue)==null?void 0:r.call(i,n))!=null?s:wi.nodeToValue(n)}),L(this,"getNodeDisabled",n=>{var i,r,s;return(s=(r=(i=this.options).isNodeDisabled)==null?void 0:r.call(i,n))!=null?s:wi.isNodeDisabled(n)}),L(this,"stringify",n=>{let i=this.findNode(n);return i?this.stringifyNode(i):null}),L(this,"stringifyNode",n=>{var i,r,s;return(s=(r=(i=this.options).nodeToString)==null?void 0:r.call(i,n))!=null?s:wi.nodeToString(n)}),L(this,"getFirstNode",(n=this.rootNode,i={})=>{let r;return Je(n,{getChildren:this.getNodeChildren,onEnter:(s,a)=>{var o;if(!this.isSameNode(s,n)){if((o=i.skip)!=null&&o.call(i,{value:this.getNodeValue(s),node:s,indexPath:a}))return"skip";if(!r&&a.length>0&&!this.getNodeDisabled(s))return r=s,"stop"}}}),r}),L(this,"getLastNode",(n=this.rootNode,i={})=>{let r;return Je(n,{getChildren:this.getNodeChildren,onEnter:(s,a)=>{var o;if(!this.isSameNode(s,n)){if((o=i.skip)!=null&&o.call(i,{value:this.getNodeValue(s),node:s,indexPath:a}))return"skip";a.length>0&&!this.getNodeDisabled(s)&&(r=s)}}}),r}),L(this,"at",n=>cu(this.rootNode,n,{getChildren:this.getNodeChildren})),L(this,"findNode",(n,i=this.rootNode)=>Rb(i,{getChildren:this.getNodeChildren,predicate:r=>this.getNodeValue(r)===n})),L(this,"findNodes",(n,i=this.rootNode)=>{let r=new Set(n.filter(s=>s!=null));return Db(i,{getChildren:this.getNodeChildren,predicate:s=>r.has(this.getNodeValue(s))})}),L(this,"sort",n=>n.reduce((i,r)=>{let s=this.getIndexPath(r);return s&&i.push({value:r,indexPath:s}),i},[]).sort((i,r)=>du(i.indexPath,r.indexPath)).map(({value:i})=>i)),L(this,"getIndexPath",n=>su(this.rootNode,{getChildren:this.getNodeChildren,predicate:i=>this.getNodeValue(i)===n})),L(this,"getValue",n=>{let i=this.at(n);return i?this.getNodeValue(i):void 0}),L(this,"getValuePath",n=>{if(!n)return[];let i=[],r=[...n];for(;r.length>0;){let s=this.at(r);s&&i.unshift(this.getNodeValue(s)),r.pop()}return i}),L(this,"getDepth",n=>{var r;let i=su(this.rootNode,{getChildren:this.getNodeChildren,predicate:s=>this.getNodeValue(s)===n});return(r=i==null?void 0:i.length)!=null?r:0}),L(this,"isSameNode",(n,i)=>this.getNodeValue(n)===this.getNodeValue(i)),L(this,"isRootNode",n=>this.isSameNode(n,this.rootNode)),L(this,"contains",(n,i)=>!n||!i?!1:i.slice(0,n.length).every((r,s)=>n[s]===i[s])),L(this,"getNextNode",(n,i={})=>{let r=!1,s;return Je(this.rootNode,{getChildren:this.getNodeChildren,onEnter:(a,o)=>{var c;if(this.isRootNode(a))return;let l=this.getNodeValue(a);if((c=i.skip)!=null&&c.call(i,{value:l,node:a,indexPath:o}))return l===n&&(r=!0),"skip";if(r&&!this.getNodeDisabled(a))return s=a,"stop";l===n&&(r=!0)}}),s}),L(this,"getPreviousNode",(n,i={})=>{let r,s=!1;return Je(this.rootNode,{getChildren:this.getNodeChildren,onEnter:(a,o)=>{var c;if(this.isRootNode(a))return;let l=this.getNodeValue(a);if((c=i.skip)!=null&&c.call(i,{value:l,node:a,indexPath:o}))return"skip";if(l===n)return s=!0,"stop";this.getNodeDisabled(a)||(r=a)}}),s?r:void 0}),L(this,"getParentNodes",n=>{var s;let i=(s=this.resolveIndexPath(n))==null?void 0:s.slice();if(!i)return[];let r=[];for(;i.length>0;){i.pop();let a=this.at(i);a&&!this.isRootNode(a)&&r.unshift(a)}return r}),L(this,"getDescendantNodes",(n,i)=>{let r=this.resolveNode(n);if(!r)return[];let s=[];return Je(r,{getChildren:this.getNodeChildren,onEnter:(a,o)=>{o.length!==0&&(!(i!=null&&i.withBranch)&&this.isBranchNode(a)||s.push(a))}}),s}),L(this,"getDescendantValues",(n,i)=>this.getDescendantNodes(n,i).map(s=>this.getNodeValue(s))),L(this,"getParentIndexPath",n=>n.slice(0,-1)),L(this,"getParentNode",n=>{let i=this.resolveIndexPath(n);return i?this.at(this.getParentIndexPath(i)):void 0}),L(this,"visit",n=>{let s=n,{skip:i}=s,r=ft(s,["skip"]);Je(this.rootNode,y(g({},r),{getChildren:this.getNodeChildren,onEnter:(a,o)=>{var l;if(!this.isRootNode(a))return i!=null&&i({value:this.getNodeValue(a),node:a,indexPath:o})?"skip":(l=r.onEnter)==null?void 0:l.call(r,a,o)}}))}),L(this,"getPreviousSibling",n=>{let i=this.getParentNode(n);if(!i)return;let r=this.getNodeChildren(i),s=n[n.length-1];for(;--s>=0;){let a=r[s];if(!this.getNodeDisabled(a))return a}}),L(this,"getNextSibling",n=>{let i=this.getParentNode(n);if(!i)return;let r=this.getNodeChildren(i),s=n[n.length-1];for(;++s{let i=this.getParentNode(n);return i?this.getNodeChildren(i):[]}),L(this,"getValues",(n=this.rootNode)=>Mb(n,{getChildren:this.getNodeChildren,transform:r=>[this.getNodeValue(r)]}).slice(1)),L(this,"isValidDepth",(n,i)=>i==null?!0:typeof i=="function"?i(n.length):n.length===i),L(this,"isBranchNode",n=>this.getNodeChildren(n).length>0||this.getNodeChildrenCount(n)!=null),L(this,"getBranchValues",(n=this.rootNode,i={})=>{let r=[];return Je(n,{getChildren:this.getNodeChildren,onEnter:(s,a)=>{var l;if(a.length===0)return;let o=this.getNodeValue(s);if((l=i.skip)!=null&&l.call(i,{value:o,node:s,indexPath:a}))return"skip";this.isBranchNode(s)&&this.isValidDepth(a,i.depth)&&r.push(this.getNodeValue(s))}}),r}),L(this,"flatten",(n=this.rootNode)=>$b(n,{getChildren:this.getNodeChildren})),L(this,"_create",(n,i)=>this.getNodeChildren(n).length>0||i.length>0?y(g({},n),{children:i}):g({},n)),L(this,"_insert",(n,i,r)=>this.copy(Ub(n,{at:i,nodes:r,getChildren:this.getNodeChildren,create:this._create}))),L(this,"copy",n=>new pu(y(g({},this.options),{rootNode:n}))),L(this,"_replace",(n,i,r)=>this.copy(qb(n,{at:i,node:r,getChildren:this.getNodeChildren,create:this._create}))),L(this,"_move",(n,i,r)=>this.copy(Kb(n,{indexPaths:i,to:r,getChildren:this.getNodeChildren,create:this._create}))),L(this,"_remove",(n,i)=>this.copy(Wb(n,{indexPaths:i,getChildren:this.getNodeChildren,create:this._create}))),L(this,"replace",(n,i)=>this._replace(this.rootNode,n,i)),L(this,"remove",n=>this._remove(this.rootNode,n)),L(this,"insertBefore",(n,i)=>this.getParentNode(n)?this._insert(this.rootNode,n,i):void 0),L(this,"insertAfter",(n,i)=>{if(!this.getParentNode(n))return;let s=[...n.slice(0,-1),n[n.length-1]+1];return this._insert(this.rootNode,s,i)}),L(this,"move",(n,i)=>this._move(this.rootNode,n,i)),L(this,"filter",n=>{let i=Fb(this.rootNode,{predicate:n,getChildren:this.getNodeChildren,create:this._create});return this.copy(i)}),L(this,"toJSON",()=>this.getValues(this.rootNode)),this.rootNode=t.rootNode}},wi={nodeToValue(e){return typeof e=="string"?e:xt(e)&&$e(e,"value")?e.value:""},nodeToString(e){return typeof e=="string"?e:xt(e)&&$e(e,"label")?e.label:wi.nodeToValue(e)},isNodeDisabled(e){return xt(e)&&$e(e,"disabled")?!!e.disabled:!1},nodeToChildren(e){return e.children},nodeToChildrenCount(e){if(xt(e)&&$e(e,"childrenCount"))return e.childrenCount}}});function No(e,t,n){return Qe(e,Sn(t,n))}function Qt(e,t){return typeof e=="function"?e(t):e}function en(e){return e.split("-")[0]}function Ai(e){return e.split("-")[1]}function Lo(e){return e==="x"?"y":"x"}function Mo(e){return e==="y"?"height":"width"}function Rt(e){return Xb.has(en(e))?"y":"x"}function Fo(e){return Lo(Rt(e))}function Zb(e,t,n){n===void 0&&(n=!1);let i=Ai(e),r=Fo(e),s=Mo(r),a=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Hs(a)),[a,Hs(a)]}function Jb(e){let t=Hs(e);return[Ro(e),t,Ro(t)]}function Ro(e){return e.replace(/start|end/g,t=>jb[t])}function tE(e,t,n){switch(e){case"top":case"bottom":return n?t?mu:fu:t?fu:mu;case"left":case"right":return t?Qb:eE;default:return[]}}function nE(e,t,n,i){let r=Ai(e),s=tE(en(e),n==="start",i);return r&&(s=s.map(a=>a+"-"+r),t&&(s=s.concat(s.map(Ro)))),s}function Hs(e){return e.replace(/left|right|bottom|top/g,t=>Yb[t])}function iE(e){return g({top:0,right:0,bottom:0,left:0},e)}function Ou(e){return typeof e!="number"?iE(e):{top:e,right:e,bottom:e,left:e}}function Bs(e){let{x:t,y:n,width:i,height:r}=e;return{width:i,height:r,top:n,left:t,right:t+i,bottom:n+r,x:t,y:n}}function vu(e,t,n){let{reference:i,floating:r}=e,s=Rt(t),a=Fo(t),o=Mo(a),l=en(t),c=s==="y",d=i.x+i.width/2-r.width/2,h=i.y+i.height/2-r.height/2,m=i[o]/2-r[o]/2,u;switch(l){case"top":u={x:d,y:i.y-r.height};break;case"bottom":u={x:d,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:h};break;case"left":u={x:i.x-r.width,y:h};break;default:u={x:i.x,y:i.y}}switch(Ai(t)){case"start":u[a]-=m*(n&&c?-1:1);break;case"end":u[a]+=m*(n&&c?-1:1);break}return u}function rE(e,t){return Ve(this,null,function*(){var n;t===void 0&&(t={});let{x:i,y:r,platform:s,rects:a,elements:o,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:m=!1,padding:u=0}=Qt(t,e),p=Ou(u),I=o[m?h==="floating"?"reference":"floating":h],T=Bs(yield s.getClippingRect({element:(n=yield s.isElement==null?void 0:s.isElement(I))==null||n?I:I.contextElement||(yield s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:c,rootBoundary:d,strategy:l})),O=h==="floating"?{x:i,y:r,width:a.floating.width,height:a.floating.height}:a.reference,b=yield s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating),f=(yield s.isElement==null?void 0:s.isElement(b))?(yield s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},S=Bs(s.convertOffsetParentRelativeRectToViewportRelativeRect?yield s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:O,offsetParent:b,strategy:l}):O);return{top:(T.top-S.top+p.top)/f.y,bottom:(S.bottom-T.bottom+p.bottom)/f.y,left:(T.left-S.left+p.left)/f.x,right:(S.right-T.right+p.right)/f.x}})}function yu(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bu(e){return zb.some(t=>e[t]>=0)}function cE(e,t){return Ve(this,null,function*(){let{placement:n,platform:i,elements:r}=e,s=yield i.isRTL==null?void 0:i.isRTL(r.floating),a=en(n),o=Ai(n),l=Rt(n)==="y",c=wu.has(a)?-1:1,d=s&&l?-1:1,h=Qt(t,e),{mainAxis:m,crossAxis:u,alignmentAxis:p}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return o&&typeof p=="number"&&(u=o==="end"?p*-1:p),l?{x:u*d,y:m*c}:{x:m*c,y:u*d}})}function _s(){return typeof window!="undefined"}function ki(e){return Vu(e)?(e.nodeName||"").toLowerCase():"#document"}function et(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mt(e){var t;return(t=(Vu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Vu(e){return _s()?e instanceof Node||e instanceof et(e).Node:!1}function bt(e){return _s()?e instanceof Element||e instanceof et(e).Element:!1}function Lt(e){return _s()?e instanceof HTMLElement||e instanceof et(e).HTMLElement:!1}function Eu(e){return!_s()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof et(e).ShadowRoot}function Ir(e){let{overflow:t,overflowX:n,overflowY:i,display:r}=Et(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!pE.has(r)}function mE(e){return fE.has(ki(e))}function Gs(e){return vE.some(t=>{try{return e.matches(t)}catch(n){return!1}})}function $o(e){let t=Ho(),n=bt(e)?Et(e):e;return yE.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||bE.some(i=>(n.willChange||"").includes(i))||EE.some(i=>(n.contain||"").includes(i))}function IE(e){let t=Tn(e);for(;Lt(t)&&!xi(t);){if($o(t))return t;if(Gs(t))return null;t=Tn(t)}return null}function Ho(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function xi(e){return PE.has(ki(e))}function Et(e){return et(e).getComputedStyle(e)}function Us(e){return bt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Tn(e){if(ki(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Eu(e)&&e.host||Mt(e);return Eu(t)?t.host:t}function xu(e){let t=Tn(e);return xi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Lt(t)&&Ir(t)?t:xu(t)}function Er(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);let r=xu(e),s=r===((i=e.ownerDocument)==null?void 0:i.body),a=et(r);if(s){let o=Do(a);return t.concat(a,a.visualViewport||[],Ir(r)?r:[],o&&n?Er(o):[])}return t.concat(r,Er(r,[],n))}function Do(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Au(e){let t=Et(e),n=parseFloat(t.width)||0,i=parseFloat(t.height)||0,r=Lt(e),s=r?e.offsetWidth:n,a=r?e.offsetHeight:i,o=$s(n)!==s||$s(i)!==a;return o&&(n=s,i=a),{width:n,height:i,$:o}}function Bo(e){return bt(e)?e:e.contextElement}function Vi(e){let t=Bo(e);if(!Lt(t))return Dt(1);let n=t.getBoundingClientRect(),{width:i,height:r,$:s}=Au(t),a=(s?$s(n.width):n.width)/i,o=(s?$s(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}function ku(e){let t=et(e);return!Ho()||!t.visualViewport?CE:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function SE(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==et(e)?!1:t}function qn(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);let r=e.getBoundingClientRect(),s=Bo(e),a=Dt(1);t&&(i?bt(i)&&(a=Vi(i)):a=Vi(e));let o=SE(s,n,i)?ku(s):Dt(0),l=(r.left+o.x)/a.x,c=(r.top+o.y)/a.y,d=r.width/a.x,h=r.height/a.y;if(s){let m=et(s),u=i&&bt(i)?et(i):i,p=m,v=Do(p);for(;v&&i&&u!==p;){let I=Vi(v),T=v.getBoundingClientRect(),O=Et(v),b=T.left+(v.clientLeft+parseFloat(O.paddingLeft))*I.x,f=T.top+(v.clientTop+parseFloat(O.paddingTop))*I.y;l*=I.x,c*=I.y,d*=I.x,h*=I.y,l+=b,c+=f,p=et(v),v=Do(p)}}return Bs({width:d,height:h,x:l,y:c})}function qs(e,t){let n=Us(e).scrollLeft;return t?t.left+n:qn(Mt(e)).left+n}function Nu(e,t){let n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-qs(e,n),r=n.top+t.scrollTop;return{x:i,y:r}}function TE(e){let{elements:t,rect:n,offsetParent:i,strategy:r}=e,s=r==="fixed",a=Mt(i),o=t?Gs(t.floating):!1;if(i===a||o&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Dt(1),d=Dt(0),h=Lt(i);if((h||!h&&!s)&&((ki(i)!=="body"||Ir(a))&&(l=Us(i)),Lt(i))){let u=qn(i);c=Vi(i),d.x=u.x+i.clientLeft,d.y=u.y+i.clientTop}let m=a&&!h&&!s?Nu(a,l):Dt(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+m.x,y:n.y*c.y-l.scrollTop*c.y+d.y+m.y}}function OE(e){return Array.from(e.getClientRects())}function wE(e){let t=Mt(e),n=Us(e),i=e.ownerDocument.body,r=Qe(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),s=Qe(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight),a=-n.scrollLeft+qs(e),o=-n.scrollTop;return Et(i).direction==="rtl"&&(a+=Qe(t.clientWidth,i.clientWidth)-r),{width:r,height:s,x:a,y:o}}function VE(e,t){let n=et(e),i=Mt(e),r=n.visualViewport,s=i.clientWidth,a=i.clientHeight,o=0,l=0;if(r){s=r.width,a=r.height;let d=Ho();(!d||d&&t==="fixed")&&(o=r.offsetLeft,l=r.offsetTop)}let c=qs(i);if(c<=0){let d=i.ownerDocument,h=d.body,m=getComputedStyle(h),u=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,p=Math.abs(i.clientWidth-h.clientWidth-u);p<=Iu&&(s-=p)}else c<=Iu&&(s+=c);return{width:s,height:a,x:o,y:l}}function AE(e,t){let n=qn(e,!0,t==="fixed"),i=n.top+e.clientTop,r=n.left+e.clientLeft,s=Lt(e)?Vi(e):Dt(1),a=e.clientWidth*s.x,o=e.clientHeight*s.y,l=r*s.x,c=i*s.y;return{width:a,height:o,x:l,y:c}}function Pu(e,t,n){let i;if(t==="viewport")i=VE(e,n);else if(t==="document")i=wE(Mt(e));else if(bt(t))i=AE(t,n);else{let r=ku(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Bs(i)}function Ru(e,t){let n=Tn(e);return n===t||!bt(n)||xi(n)?!1:Et(n).position==="fixed"||Ru(n,t)}function kE(e,t){let n=t.get(e);if(n)return n;let i=Er(e,[],!1).filter(o=>bt(o)&&ki(o)!=="body"),r=null,s=Et(e).position==="fixed",a=s?Tn(e):e;for(;bt(a)&&!xi(a);){let o=Et(a),l=$o(a);!l&&o.position==="fixed"&&(r=null),(s?!l&&!r:!l&&o.position==="static"&&!!r&&xE.has(r.position)||Ir(a)&&!l&&Ru(e,a))?i=i.filter(d=>d!==a):r=o,a=Tn(a)}return t.set(e,i),i}function NE(e){let{element:t,boundary:n,rootBoundary:i,strategy:r}=e,a=[...n==="clippingAncestors"?Gs(t)?[]:kE(t,this._c):[].concat(n),i],o=a[0],l=a.reduce((c,d)=>{let h=Pu(t,d,r);return c.top=Qe(h.top,c.top),c.right=Sn(h.right,c.right),c.bottom=Sn(h.bottom,c.bottom),c.left=Qe(h.left,c.left),c},Pu(t,o,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function RE(e){let{width:t,height:n}=Au(e);return{width:t,height:n}}function DE(e,t,n){let i=Lt(t),r=Mt(t),s=n==="fixed",a=qn(e,!0,s,t),o={scrollLeft:0,scrollTop:0},l=Dt(0);function c(){l.x=qs(r)}if(i||!i&&!s)if((ki(t)!=="body"||Ir(r))&&(o=Us(t)),i){let u=qn(t,!0,s,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else r&&c();s&&!i&&r&&c();let d=r&&!i&&!s?Nu(r,o):Dt(0),h=a.left+o.scrollLeft-l.x-d.x,m=a.top+o.scrollTop-l.y-d.y;return{x:h,y:m,width:a.width,height:a.height}}function ko(e){return Et(e).position==="static"}function Cu(e,t){if(!Lt(e)||Et(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Mt(e)===n&&(n=n.ownerDocument.body),n}function Du(e,t){let n=et(e);if(Gs(e))return n;if(!Lt(e)){let r=Tn(e);for(;r&&!xi(r);){if(bt(r)&&!ko(r))return r;r=Tn(r)}return n}let i=Cu(e,t);for(;i&&mE(i)&&ko(i);)i=Cu(i,t);return i&&xi(i)&&ko(i)&&!$o(i)?n:i||IE(e)||n}function ME(e){return Et(e).direction==="rtl"}function Lu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $E(e,t){let n=null,i,r=Mt(e);function s(){var o;clearTimeout(i),(o=n)==null||o.disconnect(),n=null}function a(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),s();let c=e.getBoundingClientRect(),{left:d,top:h,width:m,height:u}=c;if(o||t(),!m||!u)return;let p=Fs(h),v=Fs(r.clientWidth-(d+m)),I=Fs(r.clientHeight-(h+u)),T=Fs(d),b={rootMargin:-p+"px "+-v+"px "+-I+"px "+-T+"px",threshold:Qe(0,Sn(1,l))||1},f=!0;function S(P){let V=P[0].intersectionRatio;if(V!==l){if(!f)return a();V?a(!1,V):i=setTimeout(()=>{a(!1,1e-7)},1e3)}V===1&&!Lu(c,e.getBoundingClientRect())&&a(),f=!1}try{n=new IntersectionObserver(S,y(g({},b),{root:r.ownerDocument}))}catch(P){n=new IntersectionObserver(S,b)}n.observe(e)}return a(!0),s}function HE(e,t,n,i){i===void 0&&(i={});let{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=Bo(e),d=r||s?[...c?Er(c):[],...Er(t)]:[];d.forEach(T=>{r&&T.addEventListener("scroll",n,{passive:!0}),s&&T.addEventListener("resize",n)});let h=c&&o?$E(c,n):null,m=-1,u=null;a&&(u=new ResizeObserver(T=>{let[O]=T;O&&O.target===c&&u&&(u.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=u)==null||b.observe(t)})),n()}),c&&!l&&u.observe(c),u.observe(t));let p,v=l?qn(e):null;l&&I();function I(){let T=qn(e);v&&!Lu(v,T)&&n(),v=T,p=requestAnimationFrame(I)}return n(),()=>{var T;d.forEach(O=>{r&&O.removeEventListener("scroll",n),s&&O.removeEventListener("resize",n)}),h==null||h(),(T=u)==null||T.disconnect(),u=null,l&&cancelAnimationFrame(p)}}function Su(e=0,t=0,n=0,i=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,i);let r={x:e,y:t,width:n,height:i,top:t,right:e+n,bottom:t+i,left:e};return y(g({},r),{toJSON:()=>r})}function YE(e){if(!e)return Su();let{x:t,y:n,width:i,height:r}=e;return Su(t,n,i,r)}function jE(e,t){return{contextElement:le(e)?e:e==null?void 0:e.contextElement,getBoundingClientRect:()=>{let n=e,i=t==null?void 0:t(n);return i||!n?YE(i):n.getBoundingClientRect()}}}function ZE(e,t){return{name:"transformOrigin",fn(n){var x,k,N,D,$;let{elements:i,middlewareData:r,placement:s,rects:a,y:o}=n,l=s.split("-")[0],c=XE(l),d=((x=r.arrow)==null?void 0:x.x)||0,h=((k=r.arrow)==null?void 0:k.y)||0,m=(t==null?void 0:t.clientWidth)||0,u=(t==null?void 0:t.clientHeight)||0,p=d+m/2,v=h+u/2,I=Math.abs(((N=r.shift)==null?void 0:N.y)||0),T=a.reference.height/2,O=u/2,b=($=(D=e.offset)==null?void 0:D.mainAxis)!=null?$:e.gutter,f=typeof b=="number"?b+O:b!=null?b:O,S=I>f,P={top:`${p}px calc(100% + ${f}px)`,bottom:`${p}px ${-f}px`,left:`calc(100% + ${f}px) ${v}px`,right:`${-f}px ${v}px`}[l],V=`${p}px ${a.reference.y+T-o}px`,A=!!e.overlap&&c==="y"&&S;return i.floating.style.setProperty(Jt.transformOrigin.variable,A?V:P),{data:{transformOrigin:A?V:P}}}}}function eI(e){let[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}function Mu(e){return e.split("-")[0]}function Tu(e,t){let n=e.devicePixelRatio||1;return Math.round(t*n)/n}function _o(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function nI(e,t,n){let i=e||t.createElement("div");return WE({element:i,padding:n.arrowPadding})}function iI(e,t){var n;if(!Wc((n=t.offset)!=null?n:t.gutter))return BE(({placement:i})=>{var d,h,m,u;let r=((e==null?void 0:e.clientHeight)||0)/2,s=(h=(d=t.offset)==null?void 0:d.mainAxis)!=null?h:t.gutter,a=typeof s=="number"?s+r:s!=null?s:r,{hasAlign:o}=eI(i),l=o?void 0:t.shift,c=(u=(m=t.offset)==null?void 0:m.crossAxis)!=null?u:l;return Si({crossAxis:c,mainAxis:a,alignmentAxis:t.shift})})}function rI(e){if(!e.flip)return;let t=_o(e.boundary);return GE(y(g({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function sI(e){if(!e.slide&&!e.overlap)return;let t=_o(e.boundary);return _E(y(g({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:KE()}))}function aI(e){return UE({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:i,availableWidth:r}){let s=t.floating,a=Math.round(n.reference.width),o=Math.round(n.reference.height);r=Math.floor(r),i=Math.floor(i),s.style.setProperty("--reference-width",`${a}px`),s.style.setProperty("--reference-height",`${o}px`),s.style.setProperty("--available-width",`${r}px`),s.style.setProperty("--available-height",`${i}px`)}})}function oI(e){var t;if(e.hideWhenDetached)return qE({strategy:"referenceHidden",boundary:(t=_o(e.boundary))!=null?t:"clippingAncestors"})}function lI(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function cI(e,t,n={}){var I,T;let i=(T=(I=n.getAnchorElement)==null?void 0:I.call(n))!=null?T:e,r=jE(i,n.getAnchorRect);if(!t||!r)return;let s=Object.assign({},tI,n),a=t.querySelector("[data-part=arrow]"),o=[iI(a,s),rI(s),sI(s),nI(a,t.ownerDocument,s),QE(a),ZE({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),aI(s),oI(s),JE],{placement:l,strategy:c,onComplete:d,onPositioned:h}=s,m=()=>Ve(null,null,function*(){var V;if(!r||!t)return;let O=yield zE(r,t,{placement:l,middleware:o,strategy:c});d==null||d(O),h==null||h({placed:!0});let b=de(t),f=Tu(b,O.x),S=Tu(b,O.y);t.style.setProperty("--x",`${f}px`),t.style.setProperty("--y",`${S}px`),s.hideWhenDetached&&(((V=O.middlewareData.hide)==null?void 0:V.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));let P=t.firstElementChild;if(P){let A=at(P);t.style.setProperty("--z-index",A.zIndex)}}),u=()=>Ve(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),h==null||h({placed:!0})):yield m()}),p=lI(s.listeners),v=s.listeners?HE(r,t,u,p):zc;return u(),()=>{v==null||v(),h==null||h({placed:!1})}}function It(e,t,n={}){let o=n,{defer:i}=o,r=ft(o,["defer"]),s=i?H:l=>l(),a=[];return a.push(s(()=>{let l=typeof e=="function"?e():e,c=typeof t=="function"?t():t;a.push(cI(l,c,r))})),()=>{a.forEach(l=>l==null?void 0:l())}}function On(e={}){let{placement:t,sameWidth:n,fitViewport:i,strategy:r="absolute"}=e;return{arrow:{position:"absolute",width:Jt.arrowSize.reference,height:Jt.arrowSize.reference,[Jt.arrowSizeHalf.variable]:`calc(${Jt.arrowSize.reference} / 2)`,[Jt.arrowOffset.variable]:`calc(${Jt.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?dI[t.split("-")[0]]:void 0,background:Jt.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:r,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:i?"var(--available-width)":void 0,maxHeight:i?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var zb,Sn,Qe,$s,Fs,Dt,Yb,jb,Xb,fu,mu,Qb,eE,sE,aE,oE,lE,wu,dE,uE,hE,gE,pE,fE,vE,yE,bE,EE,PE,CE,Iu,xE,LE,FE,BE,_E,GE,UE,qE,WE,KE,zE,br,Jt,XE,JE,QE,tI,dI,Pr=re(()=>{"use strict";se();zb=["top","right","bottom","left"],Sn=Math.min,Qe=Math.max,$s=Math.round,Fs=Math.floor,Dt=e=>({x:e,y:e}),Yb={left:"right",right:"left",bottom:"top",top:"bottom"},jb={start:"end",end:"start"};Xb=new Set(["top","bottom"]);fu=["left","right"],mu=["right","left"],Qb=["top","bottom"],eE=["bottom","top"];sE=(e,t,n)=>Ve(null,null,function*(){let{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:a}=n,o=s.filter(Boolean),l=yield a.isRTL==null?void 0:a.isRTL(t),c=yield a.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:h}=vu(c,i,l),m=i,u={},p=0;for(let I=0;I({name:"arrow",options:e,fn(n){return Ve(this,null,function*(){let{x:i,y:r,placement:s,rects:a,platform:o,elements:l,middlewareData:c}=n,{element:d,padding:h=0}=Qt(e,n)||{};if(d==null)return{};let m=Ou(h),u={x:i,y:r},p=Fo(s),v=Mo(p),I=yield o.getDimensions(d),T=p==="y",O=T?"top":"left",b=T?"bottom":"right",f=T?"clientHeight":"clientWidth",S=a.reference[v]+a.reference[p]-u[p]-a.floating[v],P=u[p]-a.reference[p],V=yield o.getOffsetParent==null?void 0:o.getOffsetParent(d),A=V?V[f]:0;(!A||!(yield o.isElement==null?void 0:o.isElement(V)))&&(A=l.floating[f]||a.floating[v]);let x=S/2-P/2,k=A/2-I[v]/2-1,N=Sn(m[O],k),D=Sn(m[b],k),$=N,te=A-I[v]-D,J=A/2-I[v]/2+x,ie=No($,J,te),Q=!c.arrow&&Ai(s)!=null&&J!==ie&&a.reference[v]/2-(J<$?N:D)-I[v]/2<0,Se=Q?J<$?J-$:J-te:0;return{[p]:u[p]+Se,data:g({[p]:ie,centerOffset:J-ie-Se},Q&&{alignmentOffset:Se}),reset:Q}})}}),oE=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Ve(this,null,function*(){var i,r;let{placement:s,middlewareData:a,rects:o,initialPlacement:l,platform:c,elements:d}=n,J=Qt(e,n),{mainAxis:h=!0,crossAxis:m=!0,fallbackPlacements:u,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:I=!0}=J,T=ft(J,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((i=a.arrow)!=null&&i.alignmentOffset)return{};let O=en(s),b=Rt(l),f=en(l)===l,S=yield c.isRTL==null?void 0:c.isRTL(d.floating),P=u||(f||!I?[Hs(l)]:Jb(l)),V=v!=="none";!u&&V&&P.push(...nE(l,I,v,S));let A=[l,...P],x=yield c.detectOverflow(n,T),k=[],N=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&k.push(x[O]),m){let ie=Zb(s,o,S);k.push(x[ie[0]],x[ie[1]])}if(N=[...N,{placement:s,overflows:k}],!k.every(ie=>ie<=0)){var D,$;let ie=(((D=a.flip)==null?void 0:D.index)||0)+1,Q=A[ie];if(Q&&(!(m==="alignment"?b!==Rt(Q):!1)||N.every(ne=>Rt(ne.placement)===b?ne.overflows[0]>0:!0)))return{data:{index:ie,overflows:N},reset:{placement:Q}};let Se=($=N.filter(Pe=>Pe.overflows[0]<=0).sort((Pe,ne)=>Pe.overflows[1]-ne.overflows[1])[0])==null?void 0:$.placement;if(!Se)switch(p){case"bestFit":{var te;let Pe=(te=N.filter(ne=>{if(V){let Ie=Rt(ne.placement);return Ie===b||Ie==="y"}return!0}).map(ne=>[ne.placement,ne.overflows.filter(Ie=>Ie>0).reduce((Ie,rt)=>Ie+rt,0)]).sort((ne,Ie)=>ne[1]-Ie[1])[0])==null?void 0:te[0];Pe&&(Se=Pe);break}case"initialPlacement":Se=l;break}if(s!==Se)return{reset:{placement:Se}}}return{}})}}};lE=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Ve(this,null,function*(){let{rects:i,platform:r}=n,o=Qt(e,n),{strategy:s="referenceHidden"}=o,a=ft(o,["strategy"]);switch(s){case"referenceHidden":{let l=yield r.detectOverflow(n,y(g({},a),{elementContext:"reference"})),c=yu(l,i.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:bu(c)}}}case"escaped":{let l=yield r.detectOverflow(n,y(g({},a),{altBoundary:!0})),c=yu(l,i.floating);return{data:{escapedOffsets:c,escaped:bu(c)}}}default:return{}}})}}},wu=new Set(["left","top"]);dE=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Ve(this,null,function*(){var i,r;let{x:s,y:a,placement:o,middlewareData:l}=n,c=yield cE(n,e);return o===((i=l.offset)==null?void 0:i.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:a+c.y,data:y(g({},c),{placement:o})}})}}},uE=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Ve(this,null,function*(){let{x:i,y:r,placement:s,platform:a}=n,O=Qt(e,n),{mainAxis:o=!0,crossAxis:l=!1,limiter:c={fn:b=>{let{x:f,y:S}=b;return{x:f,y:S}}}}=O,d=ft(O,["mainAxis","crossAxis","limiter"]),h={x:i,y:r},m=yield a.detectOverflow(n,d),u=Rt(en(s)),p=Lo(u),v=h[p],I=h[u];if(o){let b=p==="y"?"top":"left",f=p==="y"?"bottom":"right",S=v+m[b],P=v-m[f];v=No(S,v,P)}if(l){let b=u==="y"?"top":"left",f=u==="y"?"bottom":"right",S=I+m[b],P=I-m[f];I=No(S,I,P)}let T=c.fn(y(g({},n),{[p]:v,[u]:I}));return y(g({},T),{data:{x:T.x-i,y:T.y-r,enabled:{[p]:o,[u]:l}}})})}}},hE=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:i,placement:r,rects:s,middlewareData:a}=t,{offset:o=0,mainAxis:l=!0,crossAxis:c=!0}=Qt(e,t),d={x:n,y:i},h=Rt(r),m=Lo(h),u=d[m],p=d[h],v=Qt(o,t),I=typeof v=="number"?{mainAxis:v,crossAxis:0}:g({mainAxis:0,crossAxis:0},v);if(l){let b=m==="y"?"height":"width",f=s.reference[m]-s.floating[b]+I.mainAxis,S=s.reference[m]+s.reference[b]-I.mainAxis;uS&&(u=S)}if(c){var T,O;let b=m==="y"?"width":"height",f=wu.has(en(r)),S=s.reference[h]-s.floating[b]+(f&&((T=a.offset)==null?void 0:T[h])||0)+(f?0:I.crossAxis),P=s.reference[h]+s.reference[b]+(f?0:((O=a.offset)==null?void 0:O[h])||0)-(f?I.crossAxis:0);pP&&(p=P)}return{[m]:u,[h]:p}}}},gE=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Ve(this,null,function*(){var i,r;let{placement:s,rects:a,platform:o,elements:l}=n,N=Qt(e,n),{apply:c=()=>{}}=N,d=ft(N,["apply"]),h=yield o.detectOverflow(n,d),m=en(s),u=Ai(s),p=Rt(s)==="y",{width:v,height:I}=a.floating,T,O;m==="top"||m==="bottom"?(T=m,O=u===((yield o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(O=m,T=u==="end"?"top":"bottom");let b=I-h.top-h.bottom,f=v-h.left-h.right,S=Sn(I-h[T],b),P=Sn(v-h[O],f),V=!n.middlewareData.shift,A=S,x=P;if((i=n.middlewareData.shift)!=null&&i.enabled.x&&(x=f),(r=n.middlewareData.shift)!=null&&r.enabled.y&&(A=b),V&&!u){let D=Qe(h.left,0),$=Qe(h.right,0),te=Qe(h.top,0),J=Qe(h.bottom,0);p?x=v-2*(D!==0||$!==0?D+$:Qe(h.left,h.right)):A=I-2*(te!==0||J!==0?te+J:Qe(h.top,h.bottom))}yield c(y(g({},n),{availableWidth:x,availableHeight:A}));let k=yield o.getDimensions(l.floating);return v!==k.width||I!==k.height?{reset:{rects:!0}}:{}})}}};pE=new Set(["inline","contents"]);fE=new Set(["table","td","th"]);vE=[":popover-open",":modal"];yE=["transform","translate","scale","rotate","perspective"],bE=["transform","translate","scale","rotate","perspective","filter"],EE=["paint","layout","strict","content"];PE=new Set(["html","body","#document"]);CE=Dt(0);Iu=25;xE=new Set(["absolute","fixed"]);LE=function(e){return Ve(this,null,function*(){let t=this.getOffsetParent||Du,n=this.getDimensions,i=yield n(e.floating);return{reference:DE(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}})};FE={convertOffsetParentRelativeRectToViewportRelativeRect:TE,getDocumentElement:Mt,getClippingRect:NE,getOffsetParent:Du,getElementRects:LE,getClientRects:OE,getDimensions:RE,getScale:Vi,isElement:bt,isRTL:ME};BE=dE,_E=uE,GE=oE,UE=gE,qE=lE,WE=aE,KE=hE,zE=(e,t,n)=>{let i=new Map,r=g({platform:FE},n),s=y(g({},r.platform),{_c:i});return sE(e,t,y(g({},r),{platform:s}))};br=e=>({variable:e,reference:`var(${e})`}),Jt={arrowSize:br("--arrow-size"),arrowSizeHalf:br("--arrow-size-half"),arrowBg:br("--arrow-background"),transformOrigin:br("--transform-origin"),arrowOffset:br("--arrow-offset")},XE=e=>e==="top"||e==="bottom"?"y":"x";JE={name:"rects",fn({rects:e}){return{data:e}}},QE=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};let{x:i,y:r}=n.arrow,s=t.split("-")[0];return Object.assign(e.style,{left:i!=null?`${i}px`:"",top:r!=null?`${r}px`:"",[s]:`calc(100% + ${Jt.arrowOffset.reference})`}),{}}}};tI={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};dI={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"}});function uI(e){let t={each(n){var i;for(let r=0;r<((i=e.frames)==null?void 0:i.length);r+=1){let s=e.frames[r];s&&n(s)}},addEventListener(n,i,r){return t.each(s=>{try{s.document.addEventListener(n,i,r)}catch(a){}}),()=>{try{t.removeEventListener(n,i,r)}catch(s){}}},removeEventListener(n,i,r){t.each(s=>{try{s.document.removeEventListener(n,i,r)}catch(a){}})}};return t}function hI(e){let t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,i,r)=>{try{t==null||t.addEventListener(n,i,r)}catch(s){}return()=>{try{t==null||t.removeEventListener(n,i,r)}catch(s){}}},removeEventListener:(n,i,r)=>{try{t==null||t.removeEventListener(n,i,r)}catch(s){}}}}function gI(e){for(let t of e)if(le(t)&&Ye(t))return!0;return!1}function pI(e,t){if(!_u(t)||!e)return!1;let n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function fI(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function Hu(e,t){if(!t||!_u(e))return!1;let n=t.scrollHeight>t.clientHeight,i=n&&e.clientX>t.offsetLeft+t.clientWidth,r=t.scrollWidth>t.clientWidth,s=r&&e.clientY>t.offsetTop+t.clientHeight,a={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(r?16:0)},o={x:e.clientX,y:e.clientY};return fI(a,o)?i||s:!1}function mI(e,t){let{exclude:n,onFocusOutside:i,onPointerDownOutside:r,onInteractOutside:s,defer:a,followControlledElements:o=!0}=t;if(!e)return;let l=Le(e),c=de(e),d=uI(c),h=hI(c);function m(b,f){if(!le(f)||!f.isConnected||ce(e,f)||pI(e,b)||o&&as(e,f))return!1;let S=l.querySelector(`[aria-controls="${e.id}"]`);if(S){let V=gs(S);if(Hu(b,V))return!1}let P=gs(e);return Hu(b,P)?!1:!(n!=null&&n(f))}let u=new Set,p=Ln(e==null?void 0:e.getRootNode());function v(b){function f(S){var x,k;let P=a&&!Ja()?H:N=>N(),V=S!=null?S:b,A=(k=(x=V==null?void 0:V.composedPath)==null?void 0:x.call(V))!=null?k:[V==null?void 0:V.target];P(()=>{let N=p?A[0]:j(b);if(!(!e||!m(b,N))){if(r||s){let D=At(r,s);e.addEventListener(Fu,D,{once:!0})}Bu(e,Fu,{bubbles:!1,cancelable:!0,detail:{originalEvent:V,contextmenu:hi(V),focusable:gI(A),target:N}})}})}b.pointerType==="touch"?(u.forEach(S=>S()),u.add(ee(l,"click",f,{once:!0})),u.add(h.addEventListener("click",f,{once:!0})),u.add(d.addEventListener("click",f,{once:!0}))):f()}let I=new Set,T=setTimeout(()=>{I.add(ee(l,"pointerdown",v,!0)),I.add(h.addEventListener("pointerdown",v,!0)),I.add(d.addEventListener("pointerdown",v,!0))},0);function O(b){(a?H:S=>S())(()=>{var V,A;let S=(A=(V=b==null?void 0:b.composedPath)==null?void 0:V.call(b))!=null?A:[b==null?void 0:b.target],P=p?S[0]:j(b);if(!(!e||!m(b,P))){if(i||s){let x=At(i,s);e.addEventListener($u,x,{once:!0})}Bu(e,$u,{bubbles:!1,cancelable:!0,detail:{originalEvent:b,contextmenu:!1,focusable:Ye(P),target:P}})}})}return Ja()||(I.add(ee(l,"focusin",O,!0)),I.add(h.addEventListener("focusin",O,!0)),I.add(d.addEventListener("focusin",O,!0))),()=>{clearTimeout(T),u.forEach(b=>b()),I.forEach(b=>b())}}function Ws(e,t){let{defer:n}=t,i=n?H:s=>s(),r=[];return r.push(i(()=>{let s=typeof e=="function"?e():e;r.push(mI(s,t))})),()=>{r.forEach(s=>s==null?void 0:s())}}function Bu(e,t,n){let i=e.ownerDocument.defaultView||window,r=new i.CustomEvent(t,n);return e.dispatchEvent(r)}var Fu,$u,_u,tn=re(()=>{"use strict";se();Fu="pointerdown.outside",$u="focus.outside";_u=e=>"clientY"in e});function vI(e,t){let n=i=>{i.key==="Escape"&&(i.isComposing||t==null||t(i))};return ee(Le(e),"keydown",n,{capture:!0})}function yI(e,t,n){let i=e.ownerDocument.defaultView||window,r=new i.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(r)}function bI(e,t,n){e.addEventListener(t,n,{once:!0})}function qu(){We.layers.forEach(({node:e})=>{e.style.pointerEvents=We.isBelowPointerBlockingLayer(e)?"none":"auto"})}function EI(e){e.style.pointerEvents=""}function II(e,t){let n=Le(e),i=[];return We.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(Uu=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(r=>{let[s,a]=Hc(()=>{let o=r();return le(o)?o:null},{timeout:1e3});s.then(o=>i.push(Hn(o,{pointerEvents:"auto"}))),i.push(a)}),()=>{We.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=Uu,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),i.forEach(r=>r()))}}function PI(e,t){let{warnOnMissingNode:n=!0}=t;if(n&&!e){zt("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;let{onDismiss:i,onRequestDismiss:r,pointerBlocking:s,exclude:a,debug:o,type:l="dialog"}=t,c={dismiss:i,node:e,type:l,pointerBlocking:s,requestDismiss:r};We.add(c),qu();function d(v){var T,O;let I=j(v.detail.originalEvent);We.isBelowPointerBlockingLayer(e)||We.isInBranch(I)||((T=t.onPointerDownOutside)==null||T.call(t,v),(O=t.onInteractOutside)==null||O.call(t,v),!v.defaultPrevented&&(o&&console.log("onPointerDownOutside:",v.detail.originalEvent),i==null||i()))}function h(v){var T,O;let I=j(v.detail.originalEvent);We.isInBranch(I)||((T=t.onFocusOutside)==null||T.call(t,v),(O=t.onInteractOutside)==null||O.call(t,v),!v.defaultPrevented&&(o&&console.log("onFocusOutside:",v.detail.originalEvent),i==null||i()))}function m(v){var I;We.isTopMost(e)&&((I=t.onEscapeKeyDown)==null||I.call(t,v),!v.defaultPrevented&&i&&(v.preventDefault(),i()))}function u(v){var b;if(!e)return!1;let I=typeof a=="function"?a():a,T=Array.isArray(I)?I:[I],O=(b=t.persistentElements)==null?void 0:b.map(f=>f()).filter(le);return O&&T.push(...O),T.some(f=>ce(f,v))||We.isInNestedLayer(e,v)}let p=[s?II(e,t.persistentElements):void 0,vI(e,m),Ws(e,{exclude:u,onFocusOutside:h,onPointerDownOutside:d,defer:t.defer})];return()=>{We.remove(e),qu(),EI(e),p.forEach(v=>v==null?void 0:v())}}function Ft(e,t){let{defer:n}=t,i=n?H:s=>s(),r=[];return r.push(i(()=>{let s=Wt(e)?e():e;r.push(PI(s,t))})),()=>{r.forEach(s=>s==null?void 0:s())}}function Wu(e,t={}){let{defer:n}=t,i=n?H:s=>s(),r=[];return r.push(i(()=>{let s=Wt(e)?e():e;if(!s){zt("[@zag-js/dismissable] branch node is `null` or `undefined`");return}We.addBranch(s),r.push(()=>{We.removeBranch(s)})})),()=>{r.forEach(s=>s==null?void 0:s())}}var Gu,We,Uu,Wn=re(()=>{"use strict";tn();se();Gu="layer:request-dismiss",We={layers:[],branches:[],recentlyRemoved:new Set,count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){var i;let t=this.indexOf(e),n=this.topMostPointerBlockingLayer()?this.indexOf((i=this.topMostPointerBlockingLayer())==null?void 0:i.node):-1;return tt.type===e)},getNestedLayersByType(e,t){let n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(i=>i.type===t)},getParentLayerOfType(e,t){let n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(i=>i.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return!!(this.getNestedLayers(e).some(i=>ce(i.node,t))||this.recentlyRemoved.size>0)},isInBranch(e){return Array.from(this.branches).some(t=>ce(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){let t=this.indexOf(e);t<0||(this.recentlyRemoved.add(e),$n(()=>this.recentlyRemoved.delete(e)),tWe.dismiss(i.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){let t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{e.node.style.setProperty("--layer-index",`${t}`),e.node.removeAttribute("data-nested"),e.node.removeAttribute("data-has-nested"),this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute("data-nested",e.type);let i=this.countNestedLayersOfType(e.node,e.type);i>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${i}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){let n=this.indexOf(e);if(n===-1)return;let i=this.layers[n];bI(e,Gu,r=>{var s;(s=i.requestDismiss)==null||s.call(i,r),r.defaultPrevented||i==null||i.dismiss()}),yI(e,Gu,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}}});var nh={};he(nh,{Combobox:()=>BI});function VI(e,t){let{context:n,prop:i,state:r,send:s,scope:a,computed:o,event:l}=e,c=i("translations"),d=i("collection"),h=!!i("disabled"),m=o("isInteractive"),u=!!i("invalid"),p=!!i("required"),v=!!i("readOnly"),I=r.hasTag("open"),T=r.hasTag("focused"),O=i("composite"),b=n.get("highlightedValue"),f=On(y(g({},i("positioning")),{placement:n.get("currentPlacement")}));function S(P){let V=d.getItemDisabled(P.item),A=d.getItemValue(P.item);return vn(A,()=>`[zag-js] No value found for item ${JSON.stringify(P.item)}`),{value:A,disabled:!!(V||V),highlighted:b===A,selected:n.get("value").includes(A)}}return{focused:T,open:I,inputValue:n.get("inputValue"),highlightedValue:b,highlightedItem:n.get("highlightedItem"),value:n.get("value"),valueAsString:o("valueAsString"),hasSelectedItems:o("hasSelectedItems"),selectedItems:n.get("selectedItems"),collection:i("collection"),multiple:!!i("multiple"),disabled:!!h,syncSelectedItems(){s({type:"SELECTED_ITEMS.SYNC"})},reposition(P={}){s({type:"POSITIONING.SET",options:P})},setHighlightValue(P){s({type:"HIGHLIGHTED_VALUE.SET",value:P})},clearHighlightValue(){s({type:"HIGHLIGHTED_VALUE.CLEAR"})},selectValue(P){s({type:"ITEM.SELECT",value:P})},setValue(P){s({type:"VALUE.SET",value:P})},setInputValue(P,V="script"){s({type:"INPUT_VALUE.SET",value:P,src:V})},clearValue(P){P!=null?s({type:"ITEM.CLEAR",value:P}):s({type:"VALUE.CLEAR"})},focus(){var P;(P=zn(a))==null||P.focus()},setOpen(P,V="script"){r.hasTag("open")!==P&&s({type:P?"OPEN":"CLOSE",src:V})},getRootProps(){return t.element(y(g({},Ke.root.attrs),{dir:i("dir"),id:SI(a),"data-invalid":E(u),"data-readonly":E(v)}))},getLabelProps(){return t.label(y(g({},Ke.label.attrs),{dir:i("dir"),htmlFor:Ks(a),id:Go(a),"data-readonly":E(v),"data-disabled":E(h),"data-invalid":E(u),"data-required":E(p),"data-focus":E(T),onClick(P){var V;O||(P.preventDefault(),(V=Cr(a))==null||V.focus({preventScroll:!0}))}}))},getControlProps(){return t.element(y(g({},Ke.control.attrs),{dir:i("dir"),id:Ju(a),"data-state":I?"open":"closed","data-focus":E(T),"data-disabled":E(h),"data-invalid":E(u)}))},getPositionerProps(){return t.element(y(g({},Ke.positioner.attrs),{dir:i("dir"),id:Qu(a),style:f.floating}))},getInputProps(){return t.input(y(g({},Ke.input.attrs),{dir:i("dir"),"aria-invalid":X(u),"data-invalid":E(u),"data-autofocus":E(i("autoFocus")),name:i("name"),form:i("form"),disabled:h,required:i("required"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"none",spellCheck:"false",readOnly:v,placeholder:i("placeholder"),id:Ks(a),type:"text",role:"combobox",defaultValue:n.get("inputValue"),"aria-autocomplete":o("autoComplete")?"both":"list","aria-controls":zs(a),"aria-expanded":I,"data-state":I?"open":"closed","aria-activedescendant":b?zu(a,b):void 0,onClick(P){P.defaultPrevented||i("openOnClick")&&m&&s({type:"INPUT.CLICK",src:"input-click"})},onFocus(){h||s({type:"INPUT.FOCUS"})},onBlur(){h||s({type:"INPUT.BLUR"})},onChange(P){s({type:"INPUT.CHANGE",value:P.currentTarget.value,src:"input-change"})},onKeyDown(P){if(P.defaultPrevented||!m||P.ctrlKey||P.shiftKey||Re(P))return;let V=i("openOnKeyPress"),A=P.ctrlKey||P.metaKey||P.shiftKey,x=!0,k={ArrowDown($){!V&&!I||(s({type:$.altKey?"OPEN":"INPUT.ARROW_DOWN",keypress:x,src:"arrow-key"}),$.preventDefault())},ArrowUp(){!V&&!I||(s({type:P.altKey?"CLOSE":"INPUT.ARROW_UP",keypress:x,src:"arrow-key"}),P.preventDefault())},Home($){A||(s({type:"INPUT.HOME",keypress:x}),I&&$.preventDefault())},End($){A||(s({type:"INPUT.END",keypress:x}),I&&$.preventDefault())},Enter($){var Se;s({type:"INPUT.ENTER",keypress:x,src:"item-select"});let te=o("isCustomValue")&&i("allowCustomValue"),J=b!=null,ie=i("alwaysSubmitOnEnter");if(I&&!te&&!ie&&J&&$.preventDefault(),b==null)return;let Q=Ni(a,b);st(Q)&&((Se=i("navigate"))==null||Se({value:b,node:Q,href:Q.href}))},Escape(){s({type:"INPUT.ESCAPE",keypress:x,src:"escape-key"}),P.preventDefault()}},N=ge(P,{dir:i("dir")}),D=k[N];D==null||D(P)}}))},getTriggerProps(P={}){return t.button(y(g({},Ke.trigger.attrs),{dir:i("dir"),id:eh(a),"aria-haspopup":O?"listbox":"dialog",type:"button",tabIndex:P.focusable?void 0:-1,"aria-label":c.triggerLabel,"aria-expanded":I,"data-state":I?"open":"closed","aria-controls":I?zs(a):void 0,disabled:h,"data-invalid":E(u),"data-focusable":E(P.focusable),"data-readonly":E(v),"data-disabled":E(h),onFocus(){P.focusable&&s({type:"INPUT.FOCUS",src:"trigger"})},onClick(V){V.defaultPrevented||m&&pe(V)&&s({type:"TRIGGER.CLICK",src:"trigger-click"})},onPointerDown(V){m&&V.pointerType!=="touch"&&pe(V)&&(V.preventDefault(),queueMicrotask(()=>{var A;(A=zn(a))==null||A.focus({preventScroll:!0})}))},onKeyDown(V){if(V.defaultPrevented||O)return;let A={ArrowDown(){s({type:"INPUT.ARROW_DOWN",src:"arrow-key"})},ArrowUp(){s({type:"INPUT.ARROW_UP",src:"arrow-key"})}},x=ge(V,{dir:i("dir")}),k=A[x];k&&(k(V),V.preventDefault())}}))},getContentProps(){return t.element(y(g({},Ke.content.attrs),{dir:i("dir"),id:zs(a),role:O?"listbox":"dialog",tabIndex:-1,hidden:!I,"data-state":I?"open":"closed","data-placement":n.get("currentPlacement"),"aria-labelledby":Go(a),"aria-multiselectable":i("multiple")&&O?!0:void 0,"data-empty":E(d.size===0),onPointerDown(P){pe(P)&&P.preventDefault()}}))},getListProps(){return t.element(y(g({},Ke.list.attrs),{role:O?void 0:"listbox","data-empty":E(d.size===0),"aria-labelledby":Go(a),"aria-multiselectable":i("multiple")&&!O?!0:void 0}))},getClearTriggerProps(){return t.button(y(g({},Ke.clearTrigger.attrs),{dir:i("dir"),id:th(a),type:"button",tabIndex:-1,disabled:h,"data-invalid":E(u),"aria-label":c.clearTriggerLabel,"aria-controls":Ks(a),hidden:!n.get("value").length,onPointerDown(P){pe(P)&&P.preventDefault()},onClick(P){P.defaultPrevented||m&&s({type:"VALUE.CLEAR",src:"clear-trigger"})}}))},getItemState:S,getItemProps(P){let V=S(P),A=V.value;return t.element(y(g({},Ke.item.attrs),{dir:i("dir"),id:zu(a,A),role:"option",tabIndex:-1,"data-highlighted":E(V.highlighted),"data-state":V.selected?"checked":"unchecked","aria-selected":X(V.highlighted),"aria-disabled":X(V.disabled),"data-disabled":E(V.disabled),"data-value":V.value,onPointerMove(){V.disabled||V.highlighted||s({type:"ITEM.POINTER_MOVE",value:A})},onPointerLeave(){if(P.persistFocus||V.disabled)return;let x=l.previous();x!=null&&x.type.includes("POINTER")&&s({type:"ITEM.POINTER_LEAVE",value:A})},onClick(x){rr(x)||Fn(x)||hi(x)||V.disabled||s({type:"ITEM.CLICK",src:"item-select",value:A})}}))},getItemTextProps(P){let V=S(P);return t.element(y(g({},Ke.itemText.attrs),{dir:i("dir"),"data-state":V.selected?"checked":"unchecked","data-disabled":E(V.disabled),"data-highlighted":E(V.highlighted)}))},getItemIndicatorProps(P){let V=S(P);return t.element(y(g({"aria-hidden":!0},Ke.itemIndicator.attrs),{dir:i("dir"),"data-state":V.selected?"checked":"unchecked",hidden:!V.selected}))},getItemGroupProps(P){let{id:V}=P;return t.element(y(g({},Ke.itemGroup.attrs),{dir:i("dir"),id:TI(a,V),"aria-labelledby":Ku(a,V),"data-empty":E(d.size===0),role:"group"}))},getItemGroupLabelProps(P){let{htmlFor:V}=P;return t.element(y(g({},Ke.itemGroupLabel.attrs),{dir:i("dir"),id:Ku(a,V),role:"presentation"}))}}}function Zu(e){return(e.previousEvent||e).src}function $I(e){return e.replace(/_([a-z])/g,(t,n)=>n.toUpperCase())}function HI(e){let t={};for(let[n,i]of Object.entries(e)){let r=$I(n);t[r]=i}return t}var CI,Ke,Ys,SI,Go,Ju,Ks,zs,Qu,eh,th,TI,Ku,zu,Kn,zn,Yu,ju,Cr,OI,Ni,Xu,wI,xI,AI,kI,we,tt,NI,RI,dx,DI,ux,LI,hx,MI,gx,FI,BI,ih=re(()=>{"use strict";yr();Pr();Wn();tn();se();CI=U("combobox").parts("root","clearTrigger","content","control","input","item","itemGroup","itemGroupLabel","itemIndicator","itemText","label","list","positioner","trigger"),Ke=CI.build(),Ys=e=>new Nt(e);Ys.empty=()=>new Nt({items:[]});SI=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`combobox:${e.id}`},Go=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`combobox:${e.id}:label`},Ju=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`combobox:${e.id}:control`},Ks=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.input)!=null?n:`combobox:${e.id}:input`},zs=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`combobox:${e.id}:content`},Qu=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`combobox:${e.id}:popper`},eh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`combobox:${e.id}:toggle-btn`},th=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.clearTrigger)!=null?n:`combobox:${e.id}:clear-btn`},TI=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemGroup)==null?void 0:i.call(n,t))!=null?r:`combobox:${e.id}:optgroup:${t}`},Ku=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemGroupLabel)==null?void 0:i.call(n,t))!=null?r:`combobox:${e.id}:optgroup-label:${t}`},zu=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`combobox:${e.id}:option:${t}`},Kn=e=>e.getById(zs(e)),zn=e=>e.getById(Ks(e)),Yu=e=>e.getById(Qu(e)),ju=e=>e.getById(Ju(e)),Cr=e=>e.getById(eh(e)),OI=e=>e.getById(th(e)),Ni=(e,t)=>{if(t==null)return null;let n=`[role=option][data-value="${CSS.escape(t)}"]`;return vi(Kn(e),n)},Xu=e=>{let t=zn(e);e.isActiveElement(t)||t==null||t.focus({preventScroll:!0})},wI=e=>{let t=Cr(e);e.isActiveElement(t)||t==null||t.focus({preventScroll:!0})};({guards:xI,createMachine:AI,choose:kI}=dt()),{and:we,not:tt}=xI,NI=AI({props({props:e}){return y(g({loopFocus:!0,openOnClick:!1,defaultValue:[],defaultInputValue:"",closeOnSelect:!e.multiple,allowCustomValue:!1,alwaysSubmitOnEnter:!1,inputBehavior:"none",selectionBehavior:e.multiple?"clear":"replace",openOnKeyPress:!0,openOnChange:!0,composite:!0,navigate({node:t}){mi(t)},collection:Ys.empty()},e),{positioning:g({placement:"bottom",sameWidth:!0},e.positioning),translations:g({triggerLabel:"Toggle suggestions",clearTriggerLabel:"Clear value"},e.translations)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"suggesting":"idle"},context({prop:e,bindable:t,getContext:n,getEvent:i}){return{currentPlacement:t(()=>({defaultValue:void 0})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:fe,hash(r){return r.join(",")},onChange(r){var c;let s=n(),a=s.get("selectedItems"),o=e("collection"),l=r.map(d=>a.find(m=>o.getItemValue(m)===d)||o.find(d));s.set("selectedItems",l),(c=e("onValueChange"))==null||c({value:r,items:l})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),onChange(r){var a;let s=e("collection").find(r);(a=e("onHighlightChange"))==null||a({highlightedValue:r,highlightedItem:s})}})),inputValue:t(()=>{let r=e("inputValue")||e("defaultInputValue"),s=e("value")||e("defaultValue");if(!r.trim()&&!e("multiple")){let a=e("collection").stringifyMany(s);r=Ce(e("selectionBehavior"),{preserve:r||a,replace:a,clear:""})}return{defaultValue:r,value:e("inputValue"),onChange(a){var c;let o=i(),l=(o.previousEvent||o).src;(c=e("onInputValueChange"))==null||c({inputValue:a,reason:l})}}}),highlightedItem:t(()=>{let r=e("highlightedValue");return{defaultValue:e("collection").find(r)}}),selectedItems:t(()=>{let r=e("value")||e("defaultValue")||[];return{defaultValue:e("collection").findMany(r)}})}},computed:{isInputValueEmpty:({context:e})=>e.get("inputValue").length===0,isInteractive:({prop:e})=>!(e("readOnly")||e("disabled")),autoComplete:({prop:e})=>e("inputBehavior")==="autocomplete",autoHighlight:({prop:e})=>e("inputBehavior")==="autohighlight",hasSelectedItems:({context:e})=>e.get("value").length>0,valueAsString:({context:e,prop:t})=>t("collection").stringifyItems(e.get("selectedItems")),isCustomValue:({context:e,computed:t})=>e.get("inputValue")!==t("valueAsString")},watch({context:e,prop:t,track:n,action:i,send:r}){n([()=>e.hash("value")],()=>{i(["syncSelectedItems"])}),n([()=>e.get("inputValue")],()=>{i(["syncInputValue"])}),n([()=>e.get("highlightedValue")],()=>{i(["syncHighlightedItem","autofillInputValue"])}),n([()=>t("open")],()=>{i(["toggleVisibility"])}),n([()=>t("collection").toString()],()=>{r({type:"CHILDREN_CHANGE"})})},on:{"SELECTED_ITEMS.SYNC":{actions:["syncSelectedItems"]},"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedValue"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedValue"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setValue"]},"INPUT_VALUE.SET":{actions:["setInputValue"]},"POSITIONING.SET":{actions:["reposition"]}},entry:kI([{guard:"autoFocus",actions:["setInitialFocus"]}]),states:{idle:{tags:["idle","closed"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":{target:"interacting"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{target:"focused",actions:["clearInputValue","clearSelectedItems","setInitialFocus"]}}},focused:{tags:["focused","closed"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":[{guard:"isChangeEvent",target:"suggesting"},{target:"interacting"}],"INPUT.CHANGE":[{guard:we("isOpenControlled","openOnChange"),actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{guard:"openOnChange",target:"suggesting",actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{actions:["setInputValue"]}],"LAYER.INTERACT_OUTSIDE":{target:"idle"},"INPUT.ESCAPE":{guard:we("isCustomValue",tt("allowCustomValue")),actions:["revertInputValue"]},"INPUT.BLUR":{target:"idle"},"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_DOWN":[{guard:we("isOpenControlled","autoComplete"),actions:["invokeOnOpen"]},{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{guard:"isOpenControlled",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_UP":[{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{target:"interacting",actions:["highlightLastOrSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightLastOrSelectedItem","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{actions:["clearInputValue","clearSelectedItems"]}}},interacting:{tags:["open","focused"],entry:["setInitialFocus"],effects:["scrollToHighlightedItem","trackDismissableLayer","trackPlacement"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["setFinalFocus"]},{target:"idle"}],CHILDREN_CHANGE:[{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]},{actions:["scrollToHighlightedItem"]}],"INPUT.HOME":{actions:["highlightFirstItem"]},"INPUT.END":{actions:["highlightLastItem"]},"INPUT.ARROW_DOWN":[{guard:we("autoComplete","isLastItemHighlighted"),actions:["clearHighlightedValue","scrollContentToTop"]},{actions:["highlightNextItem"]}],"INPUT.ARROW_UP":[{guard:we("autoComplete","isFirstItemHighlighted"),actions:["clearHighlightedValue"]},{actions:["highlightPrevItem"]}],"INPUT.ENTER":[{guard:we("isOpenControlled","isCustomValue",tt("hasHighlightedItem"),tt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:we("isCustomValue",tt("hasHighlightedItem"),tt("allowCustomValue")),target:"focused",actions:["revertInputValue","invokeOnClose"]},{guard:we("isOpenControlled","closeOnSelect"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","setFinalFocus"]},{actions:["selectHighlightedItem"]}],"INPUT.CHANGE":[{guard:"autoComplete",target:"suggesting",actions:["setInputValue"]},{target:"suggesting",actions:["clearHighlightedValue","setInputValue"]}],"ITEM.POINTER_MOVE":{actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]},"ITEM.CLICK":[{guard:we("isOpenControlled","closeOnSelect"),actions:["selectItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectItem","invokeOnClose","setFinalFocus"]},{actions:["selectItem"]}],"LAYER.ESCAPE":[{guard:we("isOpenControlled","autoComplete"),actions:["syncInputValue","invokeOnClose"]},{guard:"autoComplete",target:"focused",actions:["syncInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"LAYER.INTERACT_OUTSIDE":[{guard:we("isOpenControlled","isCustomValue",tt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:we("isCustomValue",tt("allowCustomValue")),target:"idle",actions:["revertInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"VALUE.CLEAR":[{guard:"isOpenControlled",actions:["clearInputValue","clearSelectedItems","invokeOnClose"]},{target:"focused",actions:["clearInputValue","clearSelectedItems","invokeOnClose","setFinalFocus"]}]}},suggesting:{tags:["open","focused"],effects:["trackDismissableLayer","scrollToHighlightedItem","trackPlacement"],entry:["setInitialFocus"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["setFinalFocus"]},{target:"idle"}],CHILDREN_CHANGE:[{guard:we("isHighlightedItemRemoved","hasCollectionItems","autoHighlight"),actions:["clearHighlightedValue","highlightFirstItem"]},{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]},{guard:"autoHighlight",actions:["highlightFirstItem"]}],"INPUT.ARROW_DOWN":{target:"interacting",actions:["highlightNextItem"]},"INPUT.ARROW_UP":{target:"interacting",actions:["highlightPrevItem"]},"INPUT.HOME":{target:"interacting",actions:["highlightFirstItem"]},"INPUT.END":{target:"interacting",actions:["highlightLastItem"]},"INPUT.ENTER":[{guard:we("isOpenControlled","isCustomValue",tt("hasHighlightedItem"),tt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:we("isCustomValue",tt("hasHighlightedItem"),tt("allowCustomValue")),target:"focused",actions:["revertInputValue","invokeOnClose"]},{guard:we("isOpenControlled","closeOnSelect"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","setFinalFocus"]},{actions:["selectHighlightedItem"]}],"INPUT.CHANGE":{actions:["setInputValue"]},"LAYER.ESCAPE":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"ITEM.POINTER_MOVE":{target:"interacting",actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]},"LAYER.INTERACT_OUTSIDE":[{guard:we("isOpenControlled","isCustomValue",tt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:we("isCustomValue",tt("allowCustomValue")),target:"idle",actions:["revertInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"ITEM.CLICK":[{guard:we("isOpenControlled","closeOnSelect"),actions:["selectItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectItem","invokeOnClose","setFinalFocus"]},{actions:["selectItem"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"VALUE.CLEAR":[{guard:"isOpenControlled",actions:["clearInputValue","clearSelectedItems","invokeOnClose"]},{target:"focused",actions:["clearInputValue","clearSelectedItems","invokeOnClose","setFinalFocus"]}]}}},implementations:{guards:{isInputValueEmpty:({computed:e})=>e("isInputValueEmpty"),autoComplete:({computed:e,prop:t})=>e("autoComplete")&&!t("multiple"),autoHighlight:({computed:e})=>e("autoHighlight"),isFirstItemHighlighted:({prop:e,context:t})=>e("collection").firstValue===t.get("highlightedValue"),isLastItemHighlighted:({prop:e,context:t})=>e("collection").lastValue===t.get("highlightedValue"),isCustomValue:({computed:e})=>e("isCustomValue"),allowCustomValue:({prop:e})=>!!e("allowCustomValue"),hasHighlightedItem:({context:e})=>e.get("highlightedValue")!=null,closeOnSelect:({prop:e})=>!!e("closeOnSelect"),isOpenControlled:({prop:e})=>e("open")!=null,openOnChange:({prop:e,context:t})=>{let n=e("openOnChange");return Uc(n)?n:!!(n!=null&&n({inputValue:t.get("inputValue")}))},restoreFocus:({event:e})=>{var n,i;let t=(i=e.restoreFocus)!=null?i:(n=e.previousEvent)==null?void 0:n.restoreFocus;return t==null?!0:!!t},isChangeEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="INPUT.CHANGE"},autoFocus:({prop:e})=>!!e("autoFocus"),isHighlightedItemRemoved:({prop:e,context:t})=>!e("collection").has(t.get("highlightedValue")),hasCollectionItems:({prop:e})=>e("collection").size>0},effects:{trackDismissableLayer({send:e,prop:t,scope:n}){return t("disableLayer")?void 0:Ft(()=>Kn(n),{type:"listbox",defer:!0,exclude:()=>[zn(n),Cr(n),OI(n)],onFocusOutside:t("onFocusOutside"),onPointerDownOutside:t("onPointerDownOutside"),onInteractOutside:t("onInteractOutside"),onEscapeKeyDown(r){r.preventDefault(),r.stopPropagation(),e({type:"LAYER.ESCAPE",src:"escape-key"})},onDismiss(){e({type:"LAYER.INTERACT_OUTSIDE",src:"interact-outside",restoreFocus:!1})}})},trackPlacement({context:e,prop:t,scope:n}){let i=()=>ju(n)||Cr(n),r=()=>Yu(n);return e.set("currentPlacement",t("positioning").placement),It(i,r,y(g({},t("positioning")),{defer:!0,onComplete(s){e.set("currentPlacement",s.placement)}}))},scrollToHighlightedItem({context:e,prop:t,scope:n,event:i}){let r=zn(n),s=[],a=c=>{let d=i.current().type.includes("POINTER"),h=e.get("highlightedValue");if(d||!h)return;let m=Kn(n),u=t("scrollToIndexFn");if(u){let I=t("collection").indexOf(h);u({index:I,immediate:c,getElement:()=>Ni(n,h)});return}let p=Ni(n,h),v=H(()=>{Xt(p,{rootEl:m,block:"nearest"})});s.push(v)},o=H(()=>a(!0));s.push(o);let l=ot(r,{attributes:["aria-activedescendant"],callback:()=>a(!1)});return s.push(l),()=>{s.forEach(c=>c())}}},actions:{reposition({context:e,prop:t,scope:n,event:i}){It(()=>ju(n),()=>Yu(n),y(g(g({},t("positioning")),i.options),{defer:!0,listeners:!1,onComplete(a){e.set("currentPlacement",a.placement)}}))},setHighlightedValue({context:e,event:t}){t.value!=null&&e.set("highlightedValue",t.value)},clearHighlightedValue({context:e}){e.set("highlightedValue",null)},selectHighlightedItem(e){var o;let{context:t,prop:n}=e,i=n("collection"),r=t.get("highlightedValue");if(!r||!i.has(r))return;let s=n("multiple")?yt(t.get("value"),r):[r];(o=n("onSelect"))==null||o({value:s,itemValue:r}),t.set("value",s);let a=Ce(n("selectionBehavior"),{preserve:t.get("inputValue"),replace:i.stringifyMany(s),clear:""});t.set("inputValue",a)},scrollToHighlightedItem({context:e,prop:t,scope:n}){$n(()=>{let i=e.get("highlightedValue");if(i==null)return;let r=Ni(n,i),s=Kn(n),a=t("scrollToIndexFn");if(a){let o=t("collection").indexOf(i);a({index:o,immediate:!0,getElement:()=>Ni(n,i)});return}Xt(r,{rootEl:s,block:"nearest"})})},selectItem(e){let{context:t,event:n,flush:i,prop:r}=e;n.value!=null&&i(()=>{var o;let s=r("multiple")?yt(t.get("value"),n.value):[n.value];(o=r("onSelect"))==null||o({value:s,itemValue:n.value}),t.set("value",s);let a=Ce(r("selectionBehavior"),{preserve:t.get("inputValue"),replace:r("collection").stringifyMany(s),clear:""});t.set("inputValue",a)})},clearItem(e){let{context:t,event:n,flush:i,prop:r}=e;n.value!=null&&i(()=>{let s=ct(t.get("value"),n.value);t.set("value",s);let a=Ce(r("selectionBehavior"),{preserve:t.get("inputValue"),replace:r("collection").stringifyMany(s),clear:""});t.set("inputValue",a)})},setInitialFocus({scope:e}){H(()=>{Xu(e)})},setFinalFocus({scope:e}){H(()=>{let t=Cr(e);(t==null?void 0:t.dataset.focusable)==null?Xu(e):wI(e)})},syncInputValue({context:e,scope:t,event:n}){let i=zn(t);i&&(i.value=e.get("inputValue"),queueMicrotask(()=>{n.current().type!=="INPUT.CHANGE"&&tr(i)}))},setInputValue({context:e,event:t}){e.set("inputValue",t.value)},clearInputValue({context:e}){e.set("inputValue","")},revertInputValue({context:e,prop:t,computed:n}){let i=t("selectionBehavior"),r=Ce(i,{replace:n("hasSelectedItems")?n("valueAsString"):"",preserve:e.get("inputValue"),clear:""});e.set("inputValue",r)},setValue(e){let{context:t,flush:n,event:i,prop:r}=e;n(()=>{t.set("value",i.value);let s=Ce(r("selectionBehavior"),{preserve:t.get("inputValue"),replace:r("collection").stringifyMany(i.value),clear:""});t.set("inputValue",s)})},clearSelectedItems(e){let{context:t,flush:n,prop:i}=e;n(()=>{t.set("value",[]);let r=Ce(i("selectionBehavior"),{preserve:t.get("inputValue"),replace:i("collection").stringifyMany([]),clear:""});t.set("inputValue",r)})},scrollContentToTop({prop:e,scope:t}){let n=e("scrollToIndexFn");if(n){let i=e("collection").firstValue;n({index:0,immediate:!0,getElement:()=>Ni(t,i)})}else{let i=Kn(t);if(!i)return;i.scrollTop=0}},invokeOnOpen({prop:e,event:t,context:n}){var r;let i=Zu(t);(r=e("onOpenChange"))==null||r({open:!0,reason:i,value:n.get("value")})},invokeOnClose({prop:e,event:t,context:n}){var r;let i=Zu(t);(r=e("onOpenChange"))==null||r({open:!1,reason:i,value:n.get("value")})},highlightFirstItem({context:e,prop:t,scope:n}){(Kn(n)?queueMicrotask:H)(()=>{let r=t("collection").firstValue;r&&e.set("highlightedValue",r)})},highlightFirstItemIfNeeded({computed:e,action:t}){e("autoHighlight")&&t(["highlightFirstItem"])},highlightLastItem({context:e,prop:t,scope:n}){(Kn(n)?queueMicrotask:H)(()=>{let r=t("collection").lastValue;r&&e.set("highlightedValue",r)})},highlightNextItem({context:e,prop:t}){let n=null,i=e.get("highlightedValue"),r=t("collection");i?(n=r.getNextValue(i),!n&&t("loopFocus")&&(n=r.firstValue)):n=r.firstValue,n&&e.set("highlightedValue",n)},highlightPrevItem({context:e,prop:t}){let n=null,i=e.get("highlightedValue"),r=t("collection");i?(n=r.getPreviousValue(i),!n&&t("loopFocus")&&(n=r.lastValue)):n=r.lastValue,n&&e.set("highlightedValue",n)},highlightFirstSelectedItem({context:e,prop:t}){H(()=>{let[n]=t("collection").sort(e.get("value"));n&&e.set("highlightedValue",n)})},highlightFirstOrSelectedItem({context:e,prop:t,computed:n}){H(()=>{let i=null;n("hasSelectedItems")?i=t("collection").sort(e.get("value"))[0]:i=t("collection").firstValue,i&&e.set("highlightedValue",i)})},highlightLastOrSelectedItem({context:e,prop:t,computed:n}){H(()=>{let i=t("collection"),r=null;n("hasSelectedItems")?r=i.sort(e.get("value"))[0]:r=i.lastValue,r&&e.set("highlightedValue",r)})},autofillInputValue({context:e,computed:t,prop:n,event:i,scope:r}){let s=zn(r),a=n("collection");if(!t("autoComplete")||!s||!i.keypress)return;let o=a.stringify(e.get("highlightedValue"));H(()=>{s.value=o||e.get("inputValue")})},syncSelectedItems(e){queueMicrotask(()=>{let{context:t,prop:n}=e,i=n("collection"),r=t.get("value"),s=r.map(o=>t.get("selectedItems").find(c=>i.getItemValue(c)===o)||i.find(o));t.set("selectedItems",s);let a=Ce(n("selectionBehavior"),{preserve:t.get("inputValue"),replace:i.stringifyMany(r),clear:""});t.set("inputValue",a)})},syncHighlightedItem({context:e,prop:t}){let n=t("collection").find(e.get("highlightedValue"));e.set("highlightedItem",n)},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}});RI=_()(["allowCustomValue","autoFocus","closeOnSelect","collection","composite","defaultHighlightedValue","defaultInputValue","defaultOpen","defaultValue","dir","disabled","disableLayer","form","getRootNode","highlightedValue","id","ids","inputBehavior","inputValue","invalid","loopFocus","multiple","name","navigate","onFocusOutside","onHighlightChange","onInputValueChange","onInteractOutside","onOpenChange","onOpenChange","onPointerDownOutside","onSelect","onValueChange","open","openOnChange","openOnClick","openOnKeyPress","placeholder","positioning","readOnly","required","scrollToIndexFn","selectionBehavior","translations","value","alwaysSubmitOnEnter"]),dx=B(RI),DI=_()(["htmlFor"]),ux=B(DI),LI=_()(["id"]),hx=B(LI),MI=_()(["item","persistFocus"]),gx=B(MI),FI=class extends K{constructor(){super(...arguments);Y(this,"options",[]);Y(this,"allOptions",[]);Y(this,"hasGroups",!1)}setAllOptions(t){this.allOptions=t,this.options=t}getCollection(){let t=this.options||this.allOptions||[];return this.hasGroups?Ys({items:t,itemToValue:n=>{var i;return(i=n.id)!=null?i:""},itemToString:n=>n.label,isItemDisabled:n=>{var i;return(i=n.disabled)!=null?i:!1},groupBy:n=>{var i;return(i=n.group)!=null?i:""}}):Ys({items:t,itemToValue:n=>{var i;return(i=n.id)!=null?i:""},itemToString:n=>n.label,isItemDisabled:n=>{var i;return(i=n.disabled)!=null?i:!1}})}initMachine(t){let n=this.getCollection.bind(this);return new W(NI,y(g({},t),{get collection(){return n()},onOpenChange:i=>{i.open&&(this.options=this.allOptions),t.onOpenChange&&t.onOpenChange(i)},onInputValueChange:i=>{let r=this.allOptions.filter(s=>s.label.toLowerCase().includes(i.inputValue.toLowerCase()));this.options=r.length>0?r:this.allOptions,t.onInputValueChange&&t.onInputValueChange(i)}}))}initApi(){return VI(this.machine.service,q)}renderItems(){var i,r,s,a;let t=this.el.querySelector('[data-scope="combobox"][data-part="content"]');if(!t)return;let n=this.el.querySelector('[data-templates="combobox"]');if(n)if(t.querySelectorAll('[data-scope="combobox"][data-part="item"]:not([data-template])').forEach(o=>o.remove()),t.querySelectorAll('[data-scope="combobox"][data-part="item-group"]:not([data-template])').forEach(o=>o.remove()),this.hasGroups){let o=(s=(r=(i=this.api.collection).group)==null?void 0:r.call(i))!=null?s:[];this.renderGroupedItems(t,n,o)}else{let o=(a=this.options)!=null&&a.length?this.options:this.allOptions;this.renderFlatItems(t,n,o)}}renderGroupedItems(t,n,i){for(let[r,s]of i){if(r==null)continue;let a=n.querySelector(`[data-scope="combobox"][data-part="item-group"][data-id="${r}"][data-template]`);if(!a)continue;let o=a.cloneNode(!0);o.removeAttribute("data-template"),this.spreadProps(o,this.api.getItemGroupProps({id:r}));let l=o.querySelector('[data-scope="combobox"][data-part="item-group-label"]');l&&this.spreadProps(l,this.api.getItemGroupLabelProps({htmlFor:r}));let c=o.querySelector('[data-scope="combobox"][data-part="item-group-content"]');if(c){c.innerHTML="";for(let d of s){let h=this.cloneItem(n,d);h&&c.appendChild(h)}t.appendChild(o)}}}renderFlatItems(t,n,i){for(let r of i){let s=this.cloneItem(n,r);s&&t.appendChild(s)}}cloneItem(t,n){var l,c,d,h;let i=(h=(d=(c=(l=this.api.collection).getItemValue)==null?void 0:c.call(l,n))!=null?d:n.id)!=null?h:"",r=t.querySelector(`[data-scope="combobox"][data-part="item"][data-value="${i}"][data-template]`);if(!r)return null;let s=r.cloneNode(!0);s.removeAttribute("data-template"),this.spreadProps(s,this.api.getItemProps({item:n}));let a=s.querySelector('[data-scope="combobox"][data-part="item-text"]');a&&(this.spreadProps(a,this.api.getItemTextProps({item:n})),a.children.length===0&&(a.textContent=n.label||""));let o=s.querySelector('[data-scope="combobox"][data-part="item-indicator"]');return o&&this.spreadProps(o,this.api.getItemIndicatorProps({item:n})),s}render(){let t=this.el.querySelector('[data-scope="combobox"][data-part="root"]');if(!t)return;this.spreadProps(t,this.api.getRootProps()),["label","control","input","trigger","clear-trigger","positioner"].forEach(i=>{let r=this.el.querySelector(`[data-scope="combobox"][data-part="${i}"]`);if(!r)return;let s="get"+i.split("-").map(a=>a[0].toUpperCase()+a.slice(1)).join("")+"Props";this.spreadProps(r,this.api[s]())});let n=this.el.querySelector('[data-scope="combobox"][data-part="content"]');n&&(this.spreadProps(n,this.api.getContentProps()),this.renderItems())}};BI={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=JSON.parse(e.dataset.collection||"[]"),i=n.some(l=>!!l.group),r=y(g({id:e.id},C(e,"controlled")?{value:Z(e,"value")}:{defaultValue:Z(e,"defaultValue")}),{disabled:C(e,"disabled"),placeholder:w(e,"placeholder"),alwaysSubmitOnEnter:C(e,"alwaysSubmitOnEnter"),autoFocus:C(e,"autoFocus"),closeOnSelect:C(e,"closeOnSelect"),dir:w(e,"dir",["ltr","rtl"]),inputBehavior:w(e,"inputBehavior",["autohighlight","autocomplete","none"]),loopFocus:C(e,"loopFocus"),multiple:C(e,"multiple"),invalid:C(e,"invalid"),allowCustomValue:!1,selectionBehavior:"replace",name:"",form:w(e,"form"),readOnly:C(e,"readOnly"),required:C(e,"required"),positioning:(()=>{let l=e.dataset.positioning;if(l)try{let c=JSON.parse(l);return HI(c)}catch(c){return}})(),onOpenChange:l=>{let c=w(e,"onOpenChange");c&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&t(c,{open:l.open,reason:l.reason,value:l.value,id:e.id});let d=w(e,"onOpenChangeClient");d&&e.dispatchEvent(new CustomEvent(d,{bubbles:C(e,"bubble"),detail:{open:l.open,reason:l.reason,value:l.value,id:e.id}}))},onInputValueChange:l=>{let c=w(e,"onInputValueChange");c&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&t(c,{value:l.inputValue,reason:l.reason,id:e.id});let d=w(e,"onInputValueChangeClient");d&&e.dispatchEvent(new CustomEvent(d,{bubbles:C(e,"bubble"),detail:{value:l.inputValue,reason:l.reason,id:e.id}}))},onValueChange:l=>{let c=e.querySelector('[data-scope="combobox"][data-part="value-input"]');if(c){let m=O=>{var f;let b=n.find(S=>{var P;return String((P=S.id)!=null?P:"")===O||S.label===O});return b?String((f=b.id)!=null?f:""):O},u=l.value.length===0?"":l.value.length===1?m(String(l.value[0])):l.value.map(O=>m(String(O))).join(",");c.value=u;let p=c.getAttribute("form"),v=null;p?v=document.getElementById(p):v=c.closest("form");let I=new Event("change",{bubbles:!0,cancelable:!0});c.dispatchEvent(I);let T=new Event("input",{bubbles:!0,cancelable:!0});c.dispatchEvent(T),v&&v.hasAttribute("phx-change")&&requestAnimationFrame(()=>{let O=v.querySelector("input, select, textarea");if(O){let b=new Event("change",{bubbles:!0,cancelable:!0});O.dispatchEvent(b)}else{let b=new Event("change",{bubbles:!0,cancelable:!0});v.dispatchEvent(b)}})}let d=w(e,"onValueChange");d&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&t(d,{value:l.value,items:l.items,id:e.id});let h=w(e,"onValueChangeClient");h&&e.dispatchEvent(new CustomEvent(h,{bubbles:C(e,"bubble"),detail:{value:l.value,items:l.items,id:e.id}}))}}),s=new FI(e,r);s.hasGroups=i,s.setAllOptions(n),s.init();let a=e.querySelector('[data-scope="combobox"][data-part="input"]');a&&(a.removeAttribute("name"),a.removeAttribute("form"));let o=C(e,"controlled")?Z(e,"value"):Z(e,"defaultValue");if(o&&o.length>0){let l=n.filter(c=>{var d;return o.includes((d=c.id)!=null?d:"")});if(l.length>0){let c=l.map(d=>{var h;return(h=d.label)!=null?h:""}).join(", ");if(s.api&&typeof s.api.setInputValue=="function")s.api.setInputValue(c);else{let d=e.querySelector('[data-scope="combobox"][data-part="input"]');d&&(d.value=c)}}}this.combobox=s,this.handlers=[]},updated(){let e=JSON.parse(this.el.dataset.collection||"[]"),t=e.some(n=>!!n.group);if(this.combobox){this.combobox.hasGroups=t,this.combobox.setAllOptions(e),this.combobox.updateProps(y(g({},C(this.el,"controlled")?{value:Z(this.el,"value")}:{defaultValue:Z(this.el,"defaultValue")}),{name:w(this.el,"name"),form:w(this.el,"form"),disabled:C(this.el,"disabled"),multiple:C(this.el,"multiple"),dir:w(this.el,"dir",["ltr","rtl"]),invalid:C(this.el,"invalid"),required:C(this.el,"required"),readOnly:C(this.el,"readOnly")}));let n=this.el.querySelector('[data-scope="combobox"][data-part="input"]');n&&(n.removeAttribute("name"),n.removeAttribute("form"),n.name="")}},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.combobox)==null||e.destroy()}}});var eg={};he(eg,{DatePicker:()=>kC});function Uo(e,t){return e-t*Math.floor(e/t)}function js(e,t,n,i){t=al(e,t);let r=t-1,s=-2;return n<=2?s=0:na(t)&&(s=-1),bh-1+365*r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400)+Math.floor((367*n-362)/12+s+i)}function na(e){return e%4===0&&(e%100!==0||e%400===0)}function al(e,t){return e==="BC"?1-t:t}function _I(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}function Zn(e,t){return t=it(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function qI(e,t){return t=it(t,e.calendar),e=rn(e),t=rn(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function WI(e,t){return t=it(t,e.calendar),e=Or(e),t=Or(t),e.era===t.era&&e.year===t.year}function KI(e,t){return aa(e.calendar,t.calendar)&&Zn(e,t)}function zI(e,t){return aa(e.calendar,t.calendar)&&qI(e,t)}function YI(e,t){return aa(e.calendar,t.calendar)&&WI(e,t)}function aa(e,t){var n,i,r,s;return(s=(r=(n=e.isEqual)===null||n===void 0?void 0:n.call(e,t))!==null&&r!==void 0?r:(i=t.isEqual)===null||i===void 0?void 0:i.call(t,e))!==null&&s!==void 0?s:e.identifier===t.identifier}function jI(e,t){return Zn(e,oa(t))}function Eh(e,t,n){let i=e.calendar.toJulianDay(e),r=n?XI[n]:QI(t),s=Math.ceil(i+1-r)%7;return s<0&&(s+=7),s}function Ih(e){return sn(Date.now(),e)}function oa(e){return Yn(Ih(e))}function Ph(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function ZI(e,t){return rh(e)-rh(t)}function rh(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}function ol(){return qo==null&&(qo=new Intl.DateTimeFormat().resolvedOptions().timeZone),qo}function rn(e){return e.subtract({days:e.day-1})}function Zo(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function Or(e){return rn(e.subtract({months:e.month-1}))}function JI(e){return Zo(e.add({months:e.calendar.getMonthsInYear(e)-e.month}))}function wr(e,t,n){let i=Eh(e,t,n);return e.subtract({days:i})}function sh(e,t,n){return wr(e,t,n).add({days:6})}function Ch(e){if(Intl.Locale){let n=ah.get(e);return n||(n=new Intl.Locale(e).maximize().region,n&&ah.set(e,n)),n}let t=e.split("-")[1];return t==="u"?void 0:t}function QI(e){let t=Wo.get(e);if(!t){if(Intl.Locale){let i=new Intl.Locale(e);if("getWeekInfo"in i&&(t=i.getWeekInfo(),t))return Wo.set(e,t),t.firstDay}let n=Ch(e);if(e.includes("-fw-")){let i=e.split("-fw-")[1].split("-")[0];i==="mon"?t={firstDay:1}:i==="tue"?t={firstDay:2}:i==="wed"?t={firstDay:3}:i==="thu"?t={firstDay:4}:i==="fri"?t={firstDay:5}:i==="sat"?t={firstDay:6}:t={firstDay:0}}else e.includes("-ca-iso8601")?t={firstDay:1}:t={firstDay:n&&UI[n]||0};Wo.set(e,t)}return t.firstDay}function eP(e,t,n){let i=e.calendar.getDaysInMonth(e);return Math.ceil((Eh(rn(e),t,n)+i)/7)}function Sh(e,t){return e&&t?e.compare(t)<=0?e:t:e||t}function Th(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function nP(e,t){let n=e.calendar.toJulianDay(e),i=Math.ceil(n+1)%7;i<0&&(i+=7);let r=Ch(t),[s,a]=tP[r]||[6,0];return i===s||i===a}function Fi(e){e=it(e,new Mi);let t=al(e.era,e.year);return Oh(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Oh(e,t,n,i,r,s,a){let o=new Date;return o.setUTCHours(i,r,s,a),o.setUTCFullYear(e,t-1,n),o.getTime()}function Jo(e,t){if(t==="UTC")return 0;if(e>0&&t===ol())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:i,day:r,hour:s,minute:a,second:o}=wh(e,t);return Oh(n,i,r,s,a,o,0)-Math.floor(e/1e3)*1e3}function wh(e,t){let n=oh.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),oh.set(t,n));let i=n.formatToParts(new Date(e)),r={};for(let s of i)s.type!=="literal"&&(r[s.type]=s.value);return{year:r.era==="BC"||r.era==="B"?-r.year+1:+r.year,month:+r.month,day:+r.day,hour:r.hour==="24"?0:+r.hour,minute:+r.minute,second:+r.second}}function iP(e,t,n,i){return(n===i?[n]:[n,i]).filter(s=>rP(e,t,s))}function rP(e,t,n){let i=wh(n,t);return e.year===i.year&&e.month===i.month&&e.day===i.day&&e.hour===i.hour&&e.minute===i.minute&&e.second===i.second}function nn(e,t,n="compatible"){let i=jn(e);if(t==="UTC")return Fi(i);if(t===ol()&&n==="compatible"){i=it(i,new Mi);let l=new Date,c=al(i.era,i.year);return l.setFullYear(c,i.month-1,i.day),l.setHours(i.hour,i.minute,i.second,i.millisecond),l.getTime()}let r=Fi(i),s=Jo(r-lh,t),a=Jo(r+lh,t),o=iP(i,t,r-s,r-a);if(o.length===1)return o[0];if(o.length>1)switch(n){case"compatible":case"earlier":return o[0];case"later":return o[o.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(r-s,r-a);case"compatible":case"later":return Math.max(r-s,r-a);case"reject":throw new RangeError("No such absolute time found")}}function Vh(e,t,n="compatible"){return new Date(nn(e,t,n))}function sn(e,t){let n=Jo(e,t),i=new Date(e+n),r=i.getUTCFullYear(),s=i.getUTCMonth()+1,a=i.getUTCDate(),o=i.getUTCHours(),l=i.getUTCMinutes(),c=i.getUTCSeconds(),d=i.getUTCMilliseconds();return new Mh(r<1?"BC":"AD",r<1?-r+1:r,s,a,t,n,o,l,c,d)}function Yn(e){return new $i(e.calendar,e.era,e.year,e.month,e.day)}function jn(e,t){let n=0,i=0,r=0,s=0;if("timeZone"in e)({hour:n,minute:i,second:r,millisecond:s}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:i,second:r,millisecond:s}=t),new TP(e.calendar,e.era,e.year,e.month,e.day,n,i,r,s)}function it(e,t){if(aa(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),i=e.copy();return i.calendar=t,i.era=n.era,i.year=n.year,i.month=n.month,i.day=n.day,Xn(i),i}function sP(e,t,n){if(e instanceof Mh)return e.timeZone===t?e:oP(e,t);let i=nn(e,t,n);return sn(i,t)}function aP(e){let t=Fi(e)-e.offset;return new Date(t)}function oP(e,t){let n=Fi(e)-e.offset;return it(sn(n,t),e.calendar)}function la(e,t){let n=e.copy(),i="hour"in n?uP(n,t):0;Qo(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,el(n),xh(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=i,lP(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let r=n.calendar.getYearsInEra(n);if(n.year>r){var s,a;let l=(s=(a=n.calendar).isInverseEra)===null||s===void 0?void 0:s.call(a,n);n.year=r,n.month=l?1:n.calendar.getMonthsInYear(n),n.day=l?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let o=n.calendar.getMonthsInYear(n);return n.month>o&&(n.month=o,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function Qo(e,t){var n,i;!((n=(i=e.calendar).isInverseEra)===null||n===void 0)&&n.call(i,e)&&(t=-t),e.year+=t}function el(e){for(;e.month<1;)Qo(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,Qo(e,1)}function lP(e){for(;e.day<1;)e.month--,el(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,el(e)}function xh(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function Xn(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),xh(e)}function Ah(e){let t={};for(let n in e)typeof e[n]=="number"&&(t[n]=-e[n]);return t}function kh(e,t){return la(e,Ah(t))}function ll(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),Xn(n),n}function sa(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),dP(n),n}function cP(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=Xs(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=Xs(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=Xs(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=Xs(e.hour,24),t}function dP(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function Xs(e,t){let n=e%t;return n<0&&(n+=t),n}function uP(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,cP(e)}function cl(e,t,n,i){let r=e.copy();switch(t){case"era":{let o=e.calendar.getEras(),l=o.indexOf(e.era);if(l<0)throw new Error("Invalid era: "+e.era);l=an(l,n,0,o.length-1,i==null?void 0:i.round),r.era=o[l],Xn(r);break}case"year":var s,a;!((s=(a=r.calendar).isInverseEra)===null||s===void 0)&&s.call(a,r)&&(n=-n),r.year=an(e.year,n,-1/0,9999,i==null?void 0:i.round),r.year===-1/0&&(r.year=1),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e);break;case"month":r.month=an(e.month,n,1,e.calendar.getMonthsInYear(e),i==null?void 0:i.round);break;case"day":r.day=an(e.day,n,1,e.calendar.getDaysInMonth(e),i==null?void 0:i.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(r),Xn(r),r}function Nh(e,t,n,i){let r=e.copy();switch(t){case"hour":{let s=e.hour,a=0,o=23;if((i==null?void 0:i.hourCycle)===12){let l=s>=12;a=l?12:0,o=l?23:11}r.hour=an(s,n,a,o,i==null?void 0:i.round);break}case"minute":r.minute=an(e.minute,n,0,59,i==null?void 0:i.round);break;case"second":r.second=an(e.second,n,0,59,i==null?void 0:i.round);break;case"millisecond":r.millisecond=an(e.millisecond,n,0,999,i==null?void 0:i.round);break;default:throw new Error("Unsupported field "+t)}return r}function an(e,t,n,i,r=!1){if(r){e+=Math.sign(t),e0?e=Math.ceil(e/s)*s:e=Math.floor(e/s)*s,e>i&&(e=n)}else e+=t,ei&&(e=n+(e-i-1));return e}function Rh(e,t){let n;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let r=la(jn(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=nn(r,e.timeZone)}else n=Fi(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let i=sn(n,e.timeZone);return it(i,e.calendar)}function hP(e,t){return Rh(e,Ah(t))}function gP(e,t,n,i){switch(t){case"hour":{let r=0,s=23;if((i==null?void 0:i.hourCycle)===12){let p=e.hour>=12;r=p?12:0,s=p?23:11}let a=jn(e),o=it(sa(a,{hour:r}),new Mi),l=[nn(o,e.timeZone,"earlier"),nn(o,e.timeZone,"later")].filter(p=>sn(p,e.timeZone).day===o.day)[0],c=it(sa(a,{hour:s}),new Mi),d=[nn(c,e.timeZone,"earlier"),nn(c,e.timeZone,"later")].filter(p=>sn(p,e.timeZone).day===c.day).pop(),h=Fi(e)-e.offset,m=Math.floor(h/Sr),u=h%Sr;return h=an(m,n,Math.floor(l/Sr),Math.floor(d/Sr),i==null?void 0:i.round)*Sr+u,it(sn(h,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return Nh(e,t,n,i);case"era":case"year":case"month":case"day":{let r=cl(jn(e),t,n,i),s=nn(r,e.timeZone);return it(sn(s,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function pP(e,t,n){let i=jn(e),r=sa(ll(i,t),t);if(r.compare(i)===0)return e;let s=nn(r,e.timeZone,n);return it(sn(s,e.timeZone),e.calendar)}function yP(e){let t=e.match(fP);if(!t)throw mP.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let n=new $i(Ko(t[1],0,9999),Ko(t[2],1,12),1);return n.day=Ko(t[3],1,n.calendar.getDaysInMonth(n)),n}function Ko(e,t,n){let i=Number(e);if(in)throw new RangeError(`Value out of range: ${t} <= ${i} <= ${n}`);return i}function bP(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function Dh(e){let t=it(e,new Mi),n;return t.era==="BC"?n=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):n=String(t.year).padStart(4,"0"),`${n}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function Lh(e){return`${Dh(e)}T${bP(e)}`}function EP(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let n=Math.floor(e/36e5),i=Math.floor(e%36e5/6e4),r=Math.floor(e%36e5%6e4/1e3),s=`${t}${String(n).padStart(2,"0")}:${String(i).padStart(2,"0")}`;return r!==0&&(s+=`:${String(r).padStart(2,"0")}`),s}function IP(e){return`${Lh(e)}${EP(e.offset)}[${e.timeZone}]`}function PP(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function dl(e,t,n){PP(e,t),t.set(e,n)}function ul(e){let t=typeof e[0]=="object"?e.shift():new Mi,n;if(typeof e[0]=="string")n=e.shift();else{let a=t.getEras();n=a[a.length-1]}let i=e.shift(),r=e.shift(),s=e.shift();return[t,n,i,r,s]}function Fh(e,t={}){if(typeof t.hour12=="boolean"&&VP()){t=g({},t);let r=wP[String(t.hour12)][e.split("-")[0]],s=t.hour12?"h12":"h23";t.hourCycle=r!=null?r:s,delete t.hour12}let n=e+(t?Object.entries(t).sort((r,s)=>r[0]s.type==="hour").value,10),r=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(s=>s.type==="hour").value,10);if(i===0&&r===23)return"h23";if(i===24&&r===23)return"h24";if(i===0&&r===11)return"h11";if(i===12&&r===11)return"h12";throw new Error("Unexpected hour cycle result")}function kP(e,t,n,i,r){let s={};for(let o in t){let l=o,c=t[l];c!=null&&(s[l]=Math.floor(c/2),s[l]>0&&c%2===0&&s[l]--)}let a=Jn(e,t,n).subtract(s);return Vr(e,a,t,n,i,r)}function Jn(e,t,n,i,r){let s=e;return t.years?s=Or(e):t.months?s=rn(e):t.weeks&&(s=wr(e,n)),Vr(e,s,t,n,i,r)}function hl(e,t,n,i,r){let s=g({},t);s.days?s.days--:s.weeks?s.weeks--:s.months?s.months--:s.years&&s.years--;let a=Jn(e,t,n).subtract(s);return Vr(e,a,t,n,i,r)}function Vr(e,t,n,i,r,s){return r&&e.compare(r)>=0&&(t=Th(t,Jn(Yn(r),n,i))),s&&e.compare(s)<=0&&(t=Sh(t,hl(Yn(s),n,i))),t}function Pt(e,t,n){let i=Yn(e);return t&&(i=Th(i,Yn(t))),n&&(i=Sh(i,Yn(n))),i}function ch(e,t,n,i,r,s){switch(t){case"start":return Jn(e,n,i,r,s);case"end":return hl(e,n,i,r,s);case"center":default:return kP(e,n,i,r,s)}}function nt(e,t){return e==null||t==null?e===t:Zn(e,t)}function dh(e,t,n,i,r){return e?t!=null&&t(e,n)?!0:$t(e,i,r):!1}function $t(e,t,n){return t!=null&&e.compare(t)<0||n!=null&&e.compare(n)>0}function NP(e,t,n){let i=e.subtract({days:1});return Zn(i,e)||$t(i,t,n)}function RP(e,t,n){let i=e.add({days:1});return Zn(i,e)||$t(i,t,n)}function gl(e){let t=g({},e);for(let n in t)t[n]=1;return t}function $h(e,t){let n=g({},t);return n.days?n.days--:n.days=-1,e.add(n)}function Hh(e){return(e==null?void 0:e.calendar.identifier)==="gregory"&&e.era==="BC"?"short":void 0}function Bh(e,t){let n=jn(oa(t));return new Ct(e,{weekday:"long",month:"long",year:"numeric",day:"numeric",era:Hh(n),timeZone:t})}function uh(e,t){let n=oa(t);return new Ct(e,{month:"long",year:"numeric",era:Hh(n),calendar:n==null?void 0:n.calendar.identifier,timeZone:t})}function DP(e,t,n,i,r){let s=n.formatRangeToParts(e.toDate(r),t.toDate(r)),a=-1;for(let c=0;ca&&(l+=s[c].value);return i(o,l)}function Zs(e,t,n,i){if(!e)return"";let r=e,s=t!=null?t:e,a=Bh(n,i);return Zn(r,s)?a.format(r.toDate(i)):DP(r,s,a,(o,l)=>`${o} \u2013 ${l}`,i)}function _h(e){return e!=null?LP[e]:void 0}function Gh(e,t,n){let i=_h(n);return wr(e,t,i)}function Uh(e,t,n,i){let r=t.add({weeks:e}),s=[],a=Gh(r,n,i);for(;s.length<7;){s.push(a);let o=a.add({days:1});if(Zn(a,o))break;a=o}return s}function MP(e,t,n,i){let r=_h(i),s=n!=null?n:eP(e,t,r);return[...new Array(s).keys()].map(o=>Uh(o,e,t,i))}function FP(e,t){let n=new Ct(e,{weekday:"long",timeZone:t}),i=new Ct(e,{weekday:"short",timeZone:t}),r=new Ct(e,{weekday:"narrow",timeZone:t});return s=>{let a=s instanceof Date?s:s.toDate(t);return{value:s,short:i.format(a),long:n.format(a),narrow:r.format(a)}}}function $P(e,t,n,i){let r=Gh(e,i,t),s=[...new Array(7).keys()],a=FP(i,n);return s.map(o=>a(r.add({days:o})))}function HP(e,t="long"){let n=new Date(2021,0,1),i=[];for(let r=0;r<12;r++)i.push(n.toLocaleString(e,{month:t})),n.setMonth(n.getMonth()+1);return i}function BP(e){let t=[];for(let n=e.from;n<=e.to;n+=1)t.push(n);return t}function GP(e){if(e){if(e.length===3)return e.padEnd(4,"0");if(e.length===2){let t=new Date().getFullYear(),n=Math.floor(t/100)*100,i=parseInt(e.slice(-2),10),r=n+i;return r>t+_P?(r-100).toString():r.toString()}return e}}function Li(e,t){let n=t!=null&&t.strict?10:12,i=e-e%10,r=[];for(let s=0;s0?{startDate:Jn(o,e,t,n,i),endDate:l,focusedDate:Pt(o,n,i)}:{startDate:a,endDate:l,focusedDate:Pt(o,n,i)}}}function qh(e,t,n,i,r,s){let a=xr(n,i,r,s),o=t.add(n);return a({focusedDate:e.add(n),startDate:Jn(Vr(e,o,n,i,r,s),n,i)})}function Wh(e,t,n,i,r,s){let a=xr(n,i,r,s),o=t.subtract(n);return a({focusedDate:e.subtract(n),startDate:Jn(Vr(e,o,n,i,r,s),n,i)})}function UP(e,t,n,i,r,s,a){let o=xr(i,r,s,a);if(!n&&!i.days)return o({focusedDate:e.add(gl(i)),startDate:t});if(i.days)return qh(e,t,i,r,s,a);if(i.weeks)return o({focusedDate:e.add({months:1}),startDate:t});if(i.months||i.years)return o({focusedDate:e.add({years:1}),startDate:t})}function qP(e,t,n,i,r,s,a){let o=xr(i,r,s,a);if(!n&&!i.days)return o({focusedDate:e.subtract(gl(i)),startDate:t});if(i.days)return Wh(e,t,i,r,s,a);if(i.weeks)return o({focusedDate:e.subtract({months:1}),startDate:t});if(i.months||i.years)return o({focusedDate:e.subtract({years:1}),startDate:t})}function zP(e,t,n){var c;let i=YP(t,n),{year:r,month:s,day:a}=(c=jP(i,e))!=null?c:{};if(r!=null||s!=null||a!=null){let d=new Date;r||(r=d.getFullYear().toString()),s||(s=(d.getMonth()+1).toString()),a||(a=d.getDate().toString())}if(hh(r)||(r=GP(r)),hh(r)&&WP(s)&&KP(a))return new $i(+r,+s,+a);let l=Date.parse(e);if(!isNaN(l)){let d=new Date(l);return new $i(d.getFullYear(),d.getMonth()+1,d.getDate())}}function YP(e,t){return new Ct(e,{day:"numeric",month:"numeric",year:"numeric",timeZone:t}).formatToParts(new Date(2e3,11,25)).map(({type:r,value:s})=>r==="literal"?`${s}?`:`((?!=<${r}>)\\d+)?`).join("")}function jP(e,t){var i;let n=t.match(e);return(i=e.toString().match(/<(.+?)>/g))==null?void 0:i.map(r=>{var a;let s=r.match(/<(.+)>/);return!s||s.length<=0?null:(a=r.match(/<(.+)>/))==null?void 0:a[1]}).reduce((r,s,a)=>(s&&(n&&n.length>a?r[s]=n[a+1]:r[s]=null),r),{})}function gh(e,t,n){let i=Yn(Ih(n));switch(e){case"thisWeek":return[wr(i,t),sh(i,t)];case"thisMonth":return[rn(i),i];case"thisQuarter":return[rn(i).add({months:-((i.month-1)%3)}),i];case"thisYear":return[Or(i),i];case"last3Days":return[i.add({days:-2}),i];case"last7Days":return[i.add({days:-6}),i];case"last14Days":return[i.add({days:-13}),i];case"last30Days":return[i.add({days:-29}),i];case"last90Days":return[i.add({days:-89}),i];case"lastMonth":return[rn(i.add({months:-1})),Zo(i.add({months:-1}))];case"lastQuarter":return[rn(i.add({months:-((i.month-1)%3)-3})),Zo(i.add({months:-((i.month-1)%3)-1}))];case"lastWeek":return[wr(i,t).add({weeks:-1}),sh(i,t).add({weeks:-1})];case"lastYear":return[Or(i.add({years:-1})),JI(i.add({years:-1}))];default:throw new Error(`Invalid date range preset: ${e}`)}}function XP(e={}){var c;let{level:t="polite",document:n=document,root:i,delay:r=0}=e,s=(c=n.defaultView)!=null?c:window,a=i!=null?i:n.body;function o(d,h){let m=n.getElementById(Js);m==null||m.remove(),h=h!=null?h:r;let u=n.createElement("span");u.id=Js,u.dataset.liveAnnouncer="true";let p=t!=="assertive"?"status":"alert";u.setAttribute("aria-live",t),u.setAttribute("role",p),Object.assign(u.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}),a.appendChild(u),s.setTimeout(()=>{u.textContent=d},h)}function l(){let d=n.getElementById(Js);d==null||d.remove()}return{announce:o,destroy:l,toJSON(){return Js}}}function sl(e){let[t,n]=e,i;return!t||!n?i=e:i=t.compare(n)<=0?e:[n,t],i}function Ri(e,t){let[n,i]=t;return!n||!i?!1:n.compare(e)<=0&&i.compare(e)>=0}function Qs(e){return e.slice().filter(t=>t!=null).sort((t,n)=>t.compare(n))}function lC(e){return Ce(e,{year:"calendar decade",month:"calendar year",day:"calendar month"})}function dC(e){return new Ct(e).formatToParts(new Date).map(t=>{var n;return(n=cC[t.type])!=null?n:t.value}).join("")}function hC(e){let i=new Intl.DateTimeFormat(e).formatToParts(new Date).find(r=>r.type==="literal");return i?i.value:"/"}function on(e,t){return e?e==="day"?0:e==="month"?1:2:t||0}function pl(e){return e===0?"day":e===1?"month":"year"}function fl(e,t,n){return pl(He(on(e,0),on(t,0),on(n,2)))}function pC(e,t){return on(e,0)>on(t,0)}function fC(e,t){return on(e,0)e(t))}function IC(e,t){let{state:n,context:i,prop:r,send:s,computed:a,scope:o}=e,l=i.get("startValue"),c=a("endValue"),d=i.get("value"),h=i.get("focusedValue"),m=i.get("hoveredValue"),u=m?sl([d[0],m]):[],p=!!r("disabled"),v=!!r("readOnly"),I=!!r("invalid"),T=a("isInteractive"),O=d.length===0,b=r("min"),f=r("max"),S=r("locale"),P=r("timeZone"),V=r("startOfWeek"),A=n.matches("focused"),x=n.matches("open"),k=r("selectionMode")==="range",N=r("isDateUnavailable"),D=i.get("currentPlacement"),$=On(y(g({},r("positioning")),{placement:D})),te=hC(S),J=g(g({},gC),r("translations"));function ie(M=l){let R=r("fixedWeeks")?6:void 0;return MP(M,S,R,V)}function Q(M={}){let{format:R}=M;return HP(S,R).map((F,G)=>{let ae=G+1,ze=h.set({month:ae}),Ne=$t(ze,b,f);return{label:F,value:ae,disabled:Ne}})}function Se(){var R,F;return BP({from:(R=b==null?void 0:b.year)!=null?R:1900,to:(F=f==null?void 0:f.year)!=null?F:2100}).map(G=>({label:G.toString(),value:G,disabled:!Pi(G,b==null?void 0:b.year,f==null?void 0:f.year)}))}function Pe(M){return dh(M,N,S,b,f)}function ne(M){let R=l!=null?l:Di(P);s({type:"FOCUS.SET",value:R.set({month:M})})}function Ie(M){let R=l!=null?l:Di(P);s({type:"FOCUS.SET",value:R.set({year:M})})}function rt(M){let{value:R,disabled:F}=M,G=h.set({year:R}),ze=!Li(l.year,{strict:!0}).includes(R),Ne=Pi(R,b==null?void 0:b.year,f==null?void 0:f.year),Tt={focused:h.year===M.value,selectable:ze||Ne,outsideRange:ze,selected:!!d.find(Zi=>Zi&&Zi.year===R),valueText:R.toString(),inRange:k&&(Ri(G,d)||Ri(G,u)),value:G,get disabled(){return F||!Tt.selectable}};return Tt}function Ut(M){let{value:R,disabled:F}=M,G=h.set({month:R}),ae=uh(S,P),ze={focused:h.month===M.value,selectable:!$t(G,b,f),selected:!!d.find(Ne=>Ne&&Ne.month===R&&Ne.year===h.year),valueText:ae.format(G.toDate(P)),inRange:k&&(Ri(G,d)||Ri(G,u)),value:G,get disabled(){return F||!ze.selectable}};return ze}function Xi(M){let{value:R,disabled:F,visibleRange:G=a("visibleRange")}=M,ae=Bh(S,P),ze=gl(a("visibleDuration")),Ne=r("outsideDaySelectable"),Tt=G.start.add(ze).subtract({days:1}),Zi=$t(R,G.start,Tt),kf=k&&Ri(R,d),Nf=k&&nt(R,d[0]),Rf=k&&nt(R,d[1]),Ma=k&&u.length>0,ic=Ma&&Ri(R,u),Df=Ma&&nt(R,u[0]),Lf=Ma&&nt(R,u[1]),Ji={invalid:$t(R,b,f),disabled:F||!Ne&&Zi||$t(R,b,f),selected:d.some(Mf=>nt(R,Mf)),unavailable:dh(R,N,S,b,f)&&!F,outsideRange:Zi,today:jI(R,P),weekend:nP(R,S),formattedDate:ae.format(R.toDate(P)),get focused(){return nt(R,h)&&(!Ji.outsideRange||Ne)},get ariaLabel(){return J.dayCell(Ji)},get selectable(){return!Ji.disabled&&!Ji.unavailable},inRange:kf||ic,firstInRange:Nf,lastInRange:Rf,inHoveredRange:ic,firstInHoveredRange:Df,lastInHoveredRange:Lf};return Ji}function La(M){let{view:R="day",id:F}=M;return[R,F].filter(Boolean).join(" ")}return{focused:A,open:x,disabled:p,invalid:I,readOnly:v,inline:!!r("inline"),numOfMonths:r("numOfMonths"),selectionMode:r("selectionMode"),view:i.get("view"),getRangePresetValue(M){return gh(M,S,P)},getDaysInWeek(M,R=l){return Uh(M,R,S,V)},getOffset(M){let R=l.add(M),F=c.add(M),G=uh(S,P);return{visibleRange:{start:R,end:F},weeks:ie(R),visibleRangeText:{start:G.format(R.toDate(P)),end:G.format(F.toDate(P))}}},getMonthWeeks:ie,isUnavailable:Pe,weeks:ie(),weekDays:$P(Di(P),V,P,S),visibleRangeText:a("visibleRangeText"),value:d,valueAsDate:d.filter(M=>M!=null).map(M=>M.toDate(P)),valueAsString:a("valueAsString"),focusedValue:h,focusedValueAsDate:h==null?void 0:h.toDate(P),focusedValueAsString:r("format")(h,{locale:S,timeZone:P}),visibleRange:a("visibleRange"),selectToday(){let M=Pt(Di(P),b,f);s({type:"VALUE.SET",value:M})},setValue(M){let R=M.map(F=>Pt(F,b,f));s({type:"VALUE.SET",value:R})},clearValue(){s({type:"VALUE.CLEAR"})},setFocusedValue(M){s({type:"FOCUS.SET",value:M})},setOpen(M){r("inline")||n.matches("open")===M||s({type:M?"OPEN":"CLOSE"})},focusMonth:ne,focusYear:Ie,getYears:Se,getMonths:Q,getYearsGrid(M={}){let{columns:R=1}=M,F=Li(l.year,{strict:!0}).map(G=>({label:G.toString(),value:G,disabled:!Pi(G,b==null?void 0:b.year,f==null?void 0:f.year)}));return cr(F,R)},getDecade(){let M=Li(l.year,{strict:!0});return{start:M.at(0),end:M.at(-1)}},getMonthsGrid(M={}){let{columns:R=1,format:F}=M;return cr(Q({format:F}),R)},format(M,R={month:"long",year:"numeric"}){return new Ct(S,R).format(M.toDate(P))},setView(M){s({type:"VIEW.SET",view:M})},goToNext(){s({type:"GOTO.NEXT",view:i.get("view")})},goToPrev(){s({type:"GOTO.PREV",view:i.get("view")})},getRootProps(){return t.element(y(g({},ue.root.attrs),{dir:r("dir"),id:QP(o),"data-state":x?"open":"closed","data-disabled":E(p),"data-readonly":E(v),"data-empty":E(O)}))},getLabelProps(M={}){let{index:R=0}=M;return t.label(y(g({},ue.label.attrs),{id:JP(o,R),dir:r("dir"),htmlFor:ph(o,R),"data-state":x?"open":"closed","data-index":R,"data-disabled":E(p),"data-readonly":E(v)}))},getControlProps(){return t.element(y(g({},ue.control.attrs),{dir:r("dir"),id:zh(o),"data-disabled":E(p),"data-placeholder-shown":E(O)}))},getRangeTextProps(){return t.element(y(g({},ue.rangeText.attrs),{dir:r("dir")}))},getContentProps(){return t.element(y(g({},ue.content.attrs),{hidden:!x,dir:r("dir"),"data-state":x?"open":"closed","data-placement":D,"data-inline":E(r("inline")),id:rl(o),tabIndex:-1,role:"application","aria-roledescription":"datepicker","aria-label":J.content}))},getTableProps(M={}){let{view:R="day",columns:F=R==="day"?7:4}=M,G=La(M);return t.element(y(g({},ue.table.attrs),{role:"grid","data-columns":F,"aria-roledescription":lC(R),id:eC(o,G),"aria-readonly":X(v),"aria-disabled":X(p),"aria-multiselectable":X(r("selectionMode")!=="single"),"data-view":R,dir:r("dir"),tabIndex:-1,onKeyDown(ae){if(ae.defaultPrevented)return;let Ne={Enter(){R==="day"&&Pe(h)||R==="month"&&!Ut({value:h.month}).selectable||R==="year"&&!rt({value:h.year}).selectable||s({type:"TABLE.ENTER",view:R,columns:F,focus:!0})},ArrowLeft(){s({type:"TABLE.ARROW_LEFT",view:R,columns:F,focus:!0})},ArrowRight(){s({type:"TABLE.ARROW_RIGHT",view:R,columns:F,focus:!0})},ArrowUp(){s({type:"TABLE.ARROW_UP",view:R,columns:F,focus:!0})},ArrowDown(){s({type:"TABLE.ARROW_DOWN",view:R,columns:F,focus:!0})},PageUp(Tt){s({type:"TABLE.PAGE_UP",larger:Tt.shiftKey,view:R,columns:F,focus:!0})},PageDown(Tt){s({type:"TABLE.PAGE_DOWN",larger:Tt.shiftKey,view:R,columns:F,focus:!0})},Home(){s({type:"TABLE.HOME",view:R,columns:F,focus:!0})},End(){s({type:"TABLE.END",view:R,columns:F,focus:!0})}}[ge(ae,{dir:r("dir")})];Ne&&(Ne(ae),ae.preventDefault(),ae.stopPropagation())},onPointerLeave(){s({type:"TABLE.POINTER_LEAVE"})},onPointerDown(){s({type:"TABLE.POINTER_DOWN",view:R})},onPointerUp(){s({type:"TABLE.POINTER_UP",view:R})}}))},getTableHeadProps(M={}){let{view:R="day"}=M;return t.element(y(g({},ue.tableHead.attrs),{"aria-hidden":!0,dir:r("dir"),"data-view":R,"data-disabled":E(p)}))},getTableHeaderProps(M={}){let{view:R="day"}=M;return t.element(y(g({},ue.tableHeader.attrs),{dir:r("dir"),"data-view":R,"data-disabled":E(p)}))},getTableBodyProps(M={}){let{view:R="day"}=M;return t.element(y(g({},ue.tableBody.attrs),{"data-view":R,"data-disabled":E(p)}))},getTableRowProps(M={}){let{view:R="day"}=M;return t.element(y(g({},ue.tableRow.attrs),{"aria-disabled":X(p),"data-disabled":E(p),"data-view":R}))},getDayTableCellState:Xi,getDayTableCellProps(M){let{value:R}=M,F=Xi(M);return t.element(y(g({},ue.tableCell.attrs),{role:"gridcell","aria-disabled":X(!F.selectable),"aria-selected":F.selected||F.inRange,"aria-invalid":X(F.invalid),"aria-current":F.today?"date":void 0,"data-value":R.toString()}))},getDayTableCellTriggerProps(M){let{value:R}=M,F=Xi(M);return t.element(y(g({},ue.tableCellTrigger.attrs),{id:Xo(o,R.toString()),role:"button",dir:r("dir"),tabIndex:F.focused?0:-1,"aria-label":F.ariaLabel,"aria-disabled":X(!F.selectable),"aria-invalid":X(F.invalid),"data-disabled":E(!F.selectable),"data-selected":E(F.selected),"data-value":R.toString(),"data-view":"day","data-today":E(F.today),"data-focus":E(F.focused),"data-unavailable":E(F.unavailable),"data-range-start":E(F.firstInRange),"data-range-end":E(F.lastInRange),"data-in-range":E(F.inRange),"data-outside-range":E(F.outsideRange),"data-weekend":E(F.weekend),"data-in-hover-range":E(F.inHoveredRange),"data-hover-range-start":E(F.firstInHoveredRange),"data-hover-range-end":E(F.lastInHoveredRange),onClick(G){G.defaultPrevented||F.selectable&&s({type:"CELL.CLICK",cell:"day",value:R})},onPointerMove:k?G=>{if(G.pointerType==="touch"||!F.selectable)return;let ae=!o.isActiveElement(G.currentTarget);m&&KI(R,m)||s({type:"CELL.POINTER_MOVE",cell:"day",value:R,focus:ae})}:void 0}))},getMonthTableCellState:Ut,getMonthTableCellProps(M){let{value:R,columns:F}=M,G=Ut(M);return t.element(y(g({},ue.tableCell.attrs),{dir:r("dir"),colSpan:F,role:"gridcell","aria-selected":X(G.selected||G.inRange),"data-selected":E(G.selected),"aria-disabled":X(!G.selectable),"data-value":R}))},getMonthTableCellTriggerProps(M){let{value:R}=M,F=Ut(M);return t.element(y(g({},ue.tableCellTrigger.attrs),{dir:r("dir"),role:"button",id:Xo(o,R.toString()),"data-selected":E(F.selected),"aria-disabled":X(!F.selectable),"data-disabled":E(!F.selectable),"data-focus":E(F.focused),"data-in-range":E(F.inRange),"data-outside-range":E(F.outsideRange),"aria-label":F.valueText,"data-view":"month","data-value":R,tabIndex:F.focused?0:-1,onClick(G){G.defaultPrevented||F.selectable&&s({type:"CELL.CLICK",cell:"month",value:R})},onPointerMove:k?G=>{if(G.pointerType==="touch"||!F.selectable)return;let ae=!o.isActiveElement(G.currentTarget);m&&F.value&&zI(F.value,m)||s({type:"CELL.POINTER_MOVE",cell:"month",value:F.value,focus:ae})}:void 0}))},getYearTableCellState:rt,getYearTableCellProps(M){let{value:R,columns:F}=M,G=rt(M);return t.element(y(g({},ue.tableCell.attrs),{dir:r("dir"),colSpan:F,role:"gridcell","aria-selected":X(G.selected),"data-selected":E(G.selected),"aria-disabled":X(!G.selectable),"data-value":R}))},getYearTableCellTriggerProps(M){let{value:R}=M,F=rt(M);return t.element(y(g({},ue.tableCellTrigger.attrs),{dir:r("dir"),role:"button",id:Xo(o,R.toString()),"data-selected":E(F.selected),"data-focus":E(F.focused),"data-in-range":E(F.inRange),"aria-disabled":X(!F.selectable),"data-disabled":E(!F.selectable),"aria-label":F.valueText,"data-outside-range":E(F.outsideRange),"data-value":R,"data-view":"year",tabIndex:F.focused?0:-1,onClick(G){G.defaultPrevented||F.selectable&&s({type:"CELL.CLICK",cell:"year",value:R})},onPointerMove:k?G=>{if(G.pointerType==="touch"||!F.selectable)return;let ae=!o.isActiveElement(G.currentTarget);m&&F.value&&YI(F.value,m)||s({type:"CELL.POINTER_MOVE",cell:"year",value:F.value,focus:ae})}:void 0}))},getNextTriggerProps(M={}){let{view:R="day"}=M,F=p||!a("isNextVisibleRangeValid");return t.button(y(g({},ue.nextTrigger.attrs),{dir:r("dir"),id:nC(o,R),type:"button","aria-label":J.nextTrigger(R),disabled:F,"data-disabled":E(F),onClick(G){G.defaultPrevented||s({type:"GOTO.NEXT",view:R})}}))},getPrevTriggerProps(M={}){let{view:R="day"}=M,F=p||!a("isPrevVisibleRangeValid");return t.button(y(g({},ue.prevTrigger.attrs),{dir:r("dir"),id:tC(o,R),type:"button","aria-label":J.prevTrigger(R),disabled:F,"data-disabled":E(F),onClick(G){G.defaultPrevented||s({type:"GOTO.PREV",view:R})}}))},getClearTriggerProps(){return t.button(y(g({},ue.clearTrigger.attrs),{id:Kh(o),dir:r("dir"),type:"button","aria-label":J.clearTrigger,hidden:!d.length,onClick(M){M.defaultPrevented||s({type:"VALUE.CLEAR"})}}))},getTriggerProps(){return t.button(y(g({},ue.trigger.attrs),{id:Yh(o),dir:r("dir"),type:"button","data-placement":D,"aria-label":J.trigger(x),"aria-controls":rl(o),"data-state":x?"open":"closed","data-placeholder-shown":E(O),"aria-haspopup":"grid",disabled:p,onClick(M){M.defaultPrevented||T&&s({type:"TRIGGER.CLICK"})}}))},getViewProps(M={}){let{view:R="day"}=M;return t.element(y(g({},ue.view.attrs),{"data-view":R,hidden:i.get("view")!==R}))},getViewTriggerProps(M={}){let{view:R="day"}=M;return t.button(y(g({},ue.viewTrigger.attrs),{"data-view":R,dir:r("dir"),id:iC(o,R),type:"button",disabled:p,"aria-label":J.viewTrigger(R),onClick(F){F.defaultPrevented||T&&s({type:"VIEW.TOGGLE",src:"viewTrigger"})}}))},getViewControlProps(M={}){let{view:R="day"}=M;return t.element(y(g({},ue.viewControl.attrs),{"data-view":R,dir:r("dir")}))},getInputProps(M={}){let{index:R=0,fixOnBlur:F=!0}=M;return t.input(y(g({},ue.input.attrs),{id:ph(o,R),autoComplete:"off",autoCorrect:"off",spellCheck:"false",dir:r("dir"),name:r("name"),"data-index":R,"data-state":x?"open":"closed","data-placeholder-shown":E(O),readOnly:v,disabled:p,required:r("required"),"aria-invalid":X(I),"data-invalid":E(I),placeholder:r("placeholder")||dC(S),defaultValue:a("valueAsString")[R],onBeforeInput(G){let{data:ae}=Yt(G);Qh(ae,te)||G.preventDefault()},onFocus(){s({type:"INPUT.FOCUS",index:R})},onBlur(G){let ae=G.currentTarget.value.trim();s({type:"INPUT.BLUR",value:ae,index:R,fixOnBlur:F})},onKeyDown(G){if(G.defaultPrevented||!T)return;let ze={Enter(Ne){Re(Ne)||Pe(h)||Ne.currentTarget.value.trim()!==""&&s({type:"INPUT.ENTER",value:Ne.currentTarget.value,index:R})}}[G.key];ze&&(ze(G),G.preventDefault())},onInput(G){let ae=G.currentTarget.value;s({type:"INPUT.CHANGE",value:uC(ae,te),index:R})}}))},getMonthSelectProps(){return t.select(y(g({},ue.monthSelect.attrs),{id:Xh(o),"aria-label":J.monthSelect,disabled:p,dir:r("dir"),defaultValue:l.month,onChange(M){ne(Number(M.currentTarget.value))}}))},getYearSelectProps(){return t.select(y(g({},ue.yearSelect.attrs),{id:Zh(o),disabled:p,"aria-label":J.yearSelect,dir:r("dir"),defaultValue:l.year,onChange(M){Ie(Number(M.currentTarget.value))}}))},getPositionerProps(){return t.element(y(g({id:jh(o)},ue.positioner.attrs),{dir:r("dir"),style:$.floating}))},getPresetTriggerProps(M){let R=Array.isArray(M.value)?M.value:gh(M.value,S,P),F=R.filter(G=>G!=null).map(G=>G.toDate(P).toDateString());return t.button(y(g({},ue.presetTrigger.attrs),{"aria-label":J.presetTrigger(F),type:"button",onClick(G){G.defaultPrevented||s({type:"PRESET.CLICK",value:R})}}))}}}function PC(e,t){if((e==null?void 0:e.length)!==(t==null?void 0:t.length))return!1;let n=Math.max(e.length,t.length);for(let i=0;in==null?"":t("format")(n,{locale:t("locale"),timeZone:t("timeZone")}))}function ve(e,t){let{context:n,prop:i,computed:r}=e;if(!t)return;let s=ra(e,t);if(nt(n.get("focusedValue"),s))return;let o=xr(r("visibleDuration"),i("locale"),i("min"),i("max"))({focusedDate:s,startDate:n.get("startValue")});n.set("startValue",o.startDate),n.set("focusedValue",o.focusedDate)}function ta(e,t){let{context:n}=e;n.set("startValue",t.startDate);let i=n.get("focusedValue");nt(i,t.focusedDate)||n.set("focusedValue",t.focusedDate)}function gt(e){return Array.isArray(e)?e.map(t=>gt(t)):e instanceof Date?new $i(e.getFullYear(),e.getMonth()+1,e.getDate()):yP(e)}function yh(e){let t=n=>String(n).padStart(2,"0");return`${e.year}-${t(e.month)}-${t(e.day)}`}var bh,GI,Mi,UI,XI,qo,ah,Wo,tP,oh,lh,Sr,fP,mP,vP,Ex,CP,$i,SP,TP,OP,Mh,zo,Ct,wP,Yo,jo,LP,_P,hh,WP,KP,Js,ZP,ue,JP,QP,eC,rl,Xo,tC,nC,iC,Kh,zh,ph,Yh,jh,Xh,Zh,fh,mh,ia,Tr,rC,sC,aC,oC,Jh,cC,Qh,vh,uC,gC,yC,EC,ht,CC,ra,SC,Ix,TC,Px,OC,Cx,wC,Sx,VC,Tx,xC,Ox,AC,kC,tg=re(()=>{"use strict";Pr();Wn();tn();se();bh=1721426;GI={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]},Mi=class{fromJulianDay(e){let t=e,n=t-bh,i=Math.floor(n/146097),r=Uo(n,146097),s=Math.floor(r/36524),a=Uo(r,36524),o=Math.floor(a/1461),l=Uo(a,1461),c=Math.floor(l/365),d=i*400+s*100+o*4+c+(s!==4&&c!==4?1:0),[h,m]=_I(d),u=t-js(h,m,1,1),p=2;t= start date");return`${this.formatter.format(e)} \u2013 ${this.formatter.format(t)}`}formatRangeToParts(e,t){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(e,t);if(t= start date");let n=this.formatter.formatToParts(e),i=this.formatter.formatToParts(t);return[...n.map(r=>y(g({},r),{source:"startRange"})),{type:"literal",value:" \u2013 ",source:"shared"},...i.map(r=>y(g({},r),{source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return xP()&&(this.resolvedHourCycle||(this.resolvedHourCycle=AP(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),e.calendar==="ethiopic-amete-alem"&&(e.calendar="ethioaa"),e}constructor(e,t={}){this.formatter=Fh(e,t),this.options=t}},wP={true:{ja:"h11"},false:{}};Yo=null;jo=null;LP=["sun","mon","tue","wed","thu","fri","sat"];_P=10;hh=e=>e!=null&&e.length===4,WP=e=>e!=null&&parseFloat(e)<=12,KP=e=>e!=null&&parseFloat(e)<=31;Js="__live-region__";ZP=U("date-picker").parts("clearTrigger","content","control","input","label","monthSelect","nextTrigger","positioner","presetTrigger","prevTrigger","rangeText","root","table","tableBody","tableCell","tableCellTrigger","tableHead","tableHeader","tableRow","trigger","view","viewControl","viewTrigger","yearSelect"),ue=ZP.build(),JP=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.label)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:label:${t}`},QP=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`datepicker:${e.id}`},eC=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.table)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:table:${t}`},rl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`datepicker:${e.id}:content`},Xo=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.cellTrigger)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:cell-trigger:${t}`},tC=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.prevTrigger)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:prev:${t}`},nC=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.nextTrigger)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:next:${t}`},iC=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.viewTrigger)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:view:${t}`},Kh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.clearTrigger)!=null?n:`datepicker:${e.id}:clear`},zh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`datepicker:${e.id}:control`},ph=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.input)==null?void 0:i.call(n,t))!=null?r:`datepicker:${e.id}:input:${t}`},Yh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`datepicker:${e.id}:trigger`},jh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`datepicker:${e.id}:positioner`},Xh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.monthSelect)!=null?n:`datepicker:${e.id}:month-select`},Zh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.yearSelect)!=null?n:`datepicker:${e.id}:year-select`},fh=(e,t)=>vi(ia(e),`[data-part=table-cell-trigger][data-view=${t}][data-focus]:not([data-outside-range])`),mh=e=>e.getById(Yh(e)),ia=e=>e.getById(rl(e)),Tr=e=>Fe(Jh(e),"[data-part=input]"),rC=e=>e.getById(Zh(e)),sC=e=>e.getById(Xh(e)),aC=e=>e.getById(Kh(e)),oC=e=>e.getById(jh(e)),Jh=e=>e.getById(zh(e));cC={day:"dd",month:"mm",year:"yyyy"};Qh=(e,t)=>e?/\d/.test(e)||e===t||e.length!==1:!0,vh=e=>!Number.isNaN(e.day)&&!Number.isNaN(e.month)&&!Number.isNaN(e.year),uC=(e,t)=>e.split("").filter(n=>Qh(n,t)).join("");gC={dayCell(e){return e.unavailable?`Not available. ${e.formattedDate}`:e.selected?`Selected date. ${e.formattedDate}`:`Choose ${e.formattedDate}`},trigger(e){return e?"Close calendar":"Open calendar"},viewTrigger(e){return Ce(e,{year:"Switch to month view",month:"Switch to day view",day:"Switch to year view"})},presetTrigger(e){let[t="",n=""]=e;return`select ${t} to ${n}`},prevTrigger(e){return Ce(e,{year:"Switch to previous decade",month:"Switch to previous year",day:"Switch to previous month"})},nextTrigger(e){return Ce(e,{year:"Switch to next decade",month:"Switch to next year",day:"Switch to next month"})},placeholder(){return{day:"dd",month:"mm",year:"yyyy"}},content:"calendar",monthSelect:"Select month",yearSelect:"Select year",clearTrigger:"Clear selected dates"};yC=["day","month","year"];EC=Bn(e=>[e.view,e.startValue.toString(),e.endValue.toString(),e.locale],([e],t)=>{let{startValue:n,endValue:i,locale:r,timeZone:s,selectionMode:a}=t;if(e==="year"){let h=Li(n.year,{strict:!0}),m=h.at(0).toString(),u=h.at(-1).toString();return{start:m,end:u,formatted:`${m} - ${u}`}}if(e==="month"){let h=new Ct(r,{year:"numeric",timeZone:s}),m=h.format(n.toDate(s)),u=h.format(i.toDate(s)),p=a==="range"?`${m} - ${u}`:m;return{start:m,end:u,formatted:p}}let o=new Ct(r,{month:"long",year:"numeric",timeZone:s}),l=o.format(n.toDate(s)),c=o.format(i.toDate(s)),d=a==="range"?`${l} - ${c}`:l;return{start:l,end:c,formatted:d}});({and:ht}=Ee());CC={props({props:e}){let t=e.locale||"en-US",n=e.timeZone||"UTC",i=e.selectionMode||"single",r=e.numOfMonths||1,s=e.defaultValue?Qs(e.defaultValue).map(h=>Pt(h,e.min,e.max)):void 0,a=e.value?Qs(e.value).map(h=>Pt(h,e.min,e.max)):void 0,o=e.focusedValue||e.defaultFocusedValue||(a==null?void 0:a[0])||(s==null?void 0:s[0])||Di(n);o=Pt(o,e.min,e.max);let l="day",c="year",d=fl(e.view||l,l,c);return y(g({locale:t,numOfMonths:r,timeZone:n,selectionMode:i,defaultView:d,minView:l,maxView:c,outsideDaySelectable:!1,closeOnSelect:!0,format(h,{locale:m,timeZone:u}){return new Ct(m,{timeZone:u,day:"2-digit",month:"2-digit",year:"numeric"}).format(h.toDate(u))},parse(h,{locale:m,timeZone:u}){return zP(h,m,u)}},e),{focusedValue:typeof e.focusedValue=="undefined"?void 0:o,defaultFocusedValue:o,value:a,defaultValue:s!=null?s:[],positioning:g({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")||e("inline")?"open":"idle"},refs(){return{announcer:void 0}},context({prop:e,bindable:t,getContext:n}){return{focusedValue:t(()=>({defaultValue:e("defaultFocusedValue"),value:e("focusedValue"),isEqual:nt,hash:i=>i.toString(),sync:!0,onChange(i){var l;let r=n(),s=r.get("view"),a=r.get("value"),o=ea(a,e);(l=e("onFocusChange"))==null||l({value:a,valueAsString:o,view:s,focusedValue:i})}})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:PC,hash:i=>i.map(r=>{var s;return(s=r==null?void 0:r.toString())!=null?s:""}).join(","),onChange(i){var a;let r=n(),s=ea(i,e);(a=e("onValueChange"))==null||a({value:i,valueAsString:s,view:r.get("view")})}})),inputValue:t(()=>({defaultValue:""})),activeIndex:t(()=>({defaultValue:0,sync:!0})),hoveredValue:t(()=>({defaultValue:null,isEqual:nt})),view:t(()=>({defaultValue:e("defaultView"),value:e("view"),onChange(i){var r;(r=e("onViewChange"))==null||r({view:i})}})),startValue:t(()=>{let i=e("focusedValue")||e("defaultFocusedValue");return{defaultValue:ch(i,"start",{months:e("numOfMonths")},e("locale")),isEqual:nt,hash:r=>r.toString()}}),currentPlacement:t(()=>({defaultValue:void 0})),restoreFocus:t(()=>({defaultValue:!1}))}},computed:{isInteractive:({prop:e})=>!e("disabled")&&!e("readOnly"),visibleDuration:({prop:e})=>({months:e("numOfMonths")}),endValue:({context:e,computed:t})=>$h(e.get("startValue"),t("visibleDuration")),visibleRange:({context:e,computed:t})=>({start:e.get("startValue"),end:t("endValue")}),visibleRangeText:({context:e,prop:t,computed:n})=>EC({view:e.get("view"),startValue:e.get("startValue"),endValue:n("endValue"),locale:t("locale"),timeZone:t("timeZone"),selectionMode:t("selectionMode")}),isPrevVisibleRangeValid:({context:e,prop:t})=>!NP(e.get("startValue"),t("min"),t("max")),isNextVisibleRangeValid:({prop:e,computed:t})=>!RP(t("endValue"),e("min"),e("max")),valueAsString:({context:e,prop:t})=>ea(e.get("value"),t)},effects:["setupLiveRegion"],watch({track:e,prop:t,context:n,action:i,computed:r}){e([()=>t("locale")],()=>{i(["setStartValue","syncInputElement"])}),e([()=>n.hash("focusedValue")],()=>{i(["setStartValue","focusActiveCellIfNeeded","setHoveredValueIfKeyboard"])}),e([()=>n.hash("startValue")],()=>{i(["syncMonthSelectElement","syncYearSelectElement","invokeOnVisibleRangeChange"])}),e([()=>n.get("inputValue")],()=>{i(["syncInputValue"])}),e([()=>n.hash("value")],()=>{i(["syncInputElement"])}),e([()=>r("valueAsString").toString()],()=>{i(["announceValueText"])}),e([()=>n.get("view")],()=>{i(["focusActiveCell"])}),e([()=>t("open")],()=>{i(["toggleVisibility"])})},on:{"VALUE.SET":{actions:["setDateValue","setFocusedDate"]},"VIEW.SET":{actions:["setView"]},"FOCUS.SET":{actions:["setFocusedDate"]},"VALUE.CLEAR":{actions:["clearDateValue","clearFocusedDate","focusFirstInputElement"]},"INPUT.CHANGE":[{guard:"isInputValueEmpty",actions:["setInputValue","clearDateValue","clearFocusedDate"]},{actions:["setInputValue","focusParsedDate"]}],"INPUT.ENTER":{actions:["focusParsedDate","selectFocusedDate"]},"INPUT.FOCUS":{actions:["setActiveIndex"]},"INPUT.BLUR":[{guard:"shouldFixOnBlur",actions:["setActiveIndexToStart","selectParsedDate"]},{actions:["setActiveIndexToStart"]}],"PRESET.CLICK":[{guard:"isOpenControlled",actions:["setDateValue","setFocusedDate","invokeOnClose"]},{target:"focused",actions:["setDateValue","setFocusedDate","focusInputElement"]}],"GOTO.NEXT":[{guard:"isYearView",actions:["focusNextDecade","announceVisibleRange"]},{guard:"isMonthView",actions:["focusNextYear","announceVisibleRange"]},{actions:["focusNextPage"]}],"GOTO.PREV":[{guard:"isYearView",actions:["focusPreviousDecade","announceVisibleRange"]},{guard:"isMonthView",actions:["focusPreviousYear","announceVisibleRange"]},{actions:["focusPreviousPage"]}]},states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open",actions:["focusFirstSelectedDate","focusActiveCell"]},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}]}},focused:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open",actions:["focusFirstSelectedDate","focusActiveCell"]},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}]}},open:{tags:["open"],effects:["trackDismissableElement","trackPositioning"],exit:["clearHoveredDate","resetView"],on:{"CONTROLLED.CLOSE":[{guard:ht("shouldRestoreFocus","isInteractOutsideEvent"),target:"focused",actions:["focusTriggerElement"]},{guard:"shouldRestoreFocus",target:"focused",actions:["focusInputElement"]},{target:"idle"}],"CELL.CLICK":[{guard:"isAboveMinView",actions:["setFocusedValueForView","setPreviousView"]},{guard:ht("isRangePicker","hasSelectedRange"),actions:["setActiveIndexToStart","resetSelection","setActiveIndexToEnd"]},{guard:ht("isRangePicker","isSelectingEndDate","closeOnSelect","isOpenControlled"),actions:["setFocusedDate","setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose","setRestoreFocus"]},{guard:ht("isRangePicker","isSelectingEndDate","closeOnSelect"),target:"focused",actions:["setFocusedDate","setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose","focusInputElement"]},{guard:ht("isRangePicker","isSelectingEndDate"),actions:["setFocusedDate","setSelectedDate","setActiveIndexToStart","clearHoveredDate"]},{guard:"isRangePicker",actions:["setFocusedDate","setSelectedDate","setActiveIndexToEnd"]},{guard:"isMultiPicker",actions:["setFocusedDate","toggleSelectedDate"]},{guard:ht("closeOnSelect","isOpenControlled"),actions:["setFocusedDate","setSelectedDate","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["setFocusedDate","setSelectedDate","invokeOnClose","focusInputElement"]},{actions:["setFocusedDate","setSelectedDate"]}],"CELL.POINTER_MOVE":{guard:ht("isRangePicker","isSelectingEndDate"),actions:["setHoveredDate","setFocusedDate"]},"TABLE.POINTER_LEAVE":{guard:"isRangePicker",actions:["clearHoveredDate"]},"TABLE.POINTER_DOWN":{actions:["disableTextSelection"]},"TABLE.POINTER_UP":{actions:["enableTextSelection"]},"TABLE.ESCAPE":[{guard:"isOpenControlled",actions:["focusFirstSelectedDate","invokeOnClose"]},{target:"focused",actions:["focusFirstSelectedDate","invokeOnClose","focusTriggerElement"]}],"TABLE.ENTER":[{guard:"isAboveMinView",actions:["setPreviousView"]},{guard:ht("isRangePicker","hasSelectedRange"),actions:["setActiveIndexToStart","clearDateValue","setSelectedDate","setActiveIndexToEnd"]},{guard:ht("isRangePicker","isSelectingEndDate","closeOnSelect","isOpenControlled"),actions:["setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose"]},{guard:ht("isRangePicker","isSelectingEndDate","closeOnSelect"),target:"focused",actions:["setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose","focusInputElement"]},{guard:ht("isRangePicker","isSelectingEndDate"),actions:["setSelectedDate","setActiveIndexToStart","clearHoveredDate"]},{guard:"isRangePicker",actions:["setSelectedDate","setActiveIndexToEnd","focusNextDay"]},{guard:"isMultiPicker",actions:["toggleSelectedDate"]},{guard:ht("closeOnSelect","isOpenControlled"),actions:["selectFocusedDate","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectFocusedDate","invokeOnClose","focusInputElement"]},{actions:["selectFocusedDate"]}],"TABLE.ARROW_RIGHT":[{guard:"isMonthView",actions:["focusNextMonth"]},{guard:"isYearView",actions:["focusNextYear"]},{actions:["focusNextDay","setHoveredDate"]}],"TABLE.ARROW_LEFT":[{guard:"isMonthView",actions:["focusPreviousMonth"]},{guard:"isYearView",actions:["focusPreviousYear"]},{actions:["focusPreviousDay"]}],"TABLE.ARROW_UP":[{guard:"isMonthView",actions:["focusPreviousMonthColumn"]},{guard:"isYearView",actions:["focusPreviousYearColumn"]},{actions:["focusPreviousWeek"]}],"TABLE.ARROW_DOWN":[{guard:"isMonthView",actions:["focusNextMonthColumn"]},{guard:"isYearView",actions:["focusNextYearColumn"]},{actions:["focusNextWeek"]}],"TABLE.PAGE_UP":{actions:["focusPreviousSection"]},"TABLE.PAGE_DOWN":{actions:["focusNextSection"]},"TABLE.HOME":[{guard:"isMonthView",actions:["focusFirstMonth"]},{guard:"isYearView",actions:["focusFirstYear"]},{actions:["focusSectionStart"]}],"TABLE.END":[{guard:"isMonthView",actions:["focusLastMonth"]},{guard:"isYearView",actions:["focusLastYear"]},{actions:["focusSectionEnd"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"VIEW.TOGGLE":{actions:["setNextView"]},INTERACT_OUTSIDE:[{guard:"isOpenControlled",actions:["setActiveIndexToStart","invokeOnClose"]},{guard:"shouldRestoreFocus",target:"focused",actions:["setActiveIndexToStart","invokeOnClose","focusTriggerElement"]},{target:"idle",actions:["setActiveIndexToStart","invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["setActiveIndexToStart","invokeOnClose"]},{target:"idle",actions:["setActiveIndexToStart","invokeOnClose"]}]}}},implementations:{guards:{isAboveMinView:({context:e,prop:t})=>pC(e.get("view"),t("minView")),isDayView:({context:e,event:t})=>(t.view||e.get("view"))==="day",isMonthView:({context:e,event:t})=>(t.view||e.get("view"))==="month",isYearView:({context:e,event:t})=>(t.view||e.get("view"))==="year",isRangePicker:({prop:e})=>e("selectionMode")==="range",hasSelectedRange:({context:e})=>e.get("value").length===2,isMultiPicker:({prop:e})=>e("selectionMode")==="multiple",shouldRestoreFocus:({context:e})=>!!e.get("restoreFocus"),isSelectingEndDate:({context:e})=>e.get("activeIndex")===1,closeOnSelect:({prop:e})=>!!e("closeOnSelect"),isOpenControlled:({prop:e})=>e("open")!=null||!!e("inline"),isInteractOutsideEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="INTERACT_OUTSIDE"},isInputValueEmpty:({event:e})=>e.value.trim()==="",shouldFixOnBlur:({event:e})=>!!e.fixOnBlur},effects:{trackPositioning({context:e,prop:t,scope:n}){if(t("inline"))return;e.get("currentPlacement")||e.set("currentPlacement",t("positioning").placement);let i=Jh(n);return It(i,()=>oC(n),y(g({},t("positioning")),{defer:!0,onComplete(s){e.set("currentPlacement",s.placement)}}))},setupLiveRegion({scope:e,refs:t}){let n=e.getDoc();return t.set("announcer",XP({level:"assertive",document:n})),()=>{var i,r;return(r=(i=t.get("announcer"))==null?void 0:i.destroy)==null?void 0:r.call(i)}},trackDismissableElement({scope:e,send:t,context:n,prop:i}){return i("inline")?void 0:Ft(()=>ia(e),{type:"popover",defer:!0,exclude:[...Tr(e),mh(e),aC(e)],onInteractOutside(s){n.set("restoreFocus",!s.detail.focusable)},onDismiss(){t({type:"INTERACT_OUTSIDE"})},onEscapeKeyDown(s){s.preventDefault(),t({type:"TABLE.ESCAPE",src:"dismissable"})}})}},actions:{setNextView({context:e,prop:t}){let n=mC(e.get("view"),t("minView"),t("maxView"));e.set("view",n)},setPreviousView({context:e,prop:t}){let n=vC(e.get("view"),t("minView"),t("maxView"));e.set("view",n)},setView({context:e,event:t}){e.set("view",t.view)},setRestoreFocus({context:e}){e.set("restoreFocus",!0)},announceValueText({context:e,prop:t,refs:n}){var o;let i=e.get("value"),r=t("locale"),s=t("timeZone"),a;if(t("selectionMode")==="range"){let[l,c]=i;l&&c?a=Zs(l,c,r,s):l?a=Zs(l,null,r,s):c?a=Zs(c,null,r,s):a=""}else a=i.map(l=>Zs(l,null,r,s)).filter(Boolean).join(",");(o=n.get("announcer"))==null||o.announce(a,3e3)},announceVisibleRange({computed:e,refs:t}){var i;let{formatted:n}=e("visibleRangeText");(i=t.get("announcer"))==null||i.announce(n)},disableTextSelection({scope:e}){io({target:ia(e),doc:e.getDoc()})},enableTextSelection({scope:e}){no({doc:e.getDoc(),target:ia(e)})},focusFirstSelectedDate(e){let{context:t}=e;t.get("value").length&&ve(e,t.get("value")[0])},syncInputElement({scope:e,computed:t}){H(()=>{Tr(e).forEach((i,r)=>{Me(i,t("valueAsString")[r]||"")})})},setFocusedDate(e){let{event:t}=e,n=Array.isArray(t.value)?t.value[0]:t.value;ve(e,n)},setFocusedValueForView(e){let{context:t,event:n}=e;ve(e,t.get("focusedValue").set({[t.get("view")]:n.value}))},focusNextMonth(e){let{context:t}=e;ve(e,t.get("focusedValue").add({months:1}))},focusPreviousMonth(e){let{context:t}=e;ve(e,t.get("focusedValue").subtract({months:1}))},setDateValue({context:e,event:t,prop:n}){if(!Array.isArray(t.value))return;let i=t.value.map(r=>Pt(r,n("min"),n("max")));e.set("value",i)},clearDateValue({context:e}){e.set("value",[])},setSelectedDate(e){var r;let{context:t,event:n}=e,i=Array.from(t.get("value"));i[t.get("activeIndex")]=ra(e,(r=n.value)!=null?r:t.get("focusedValue")),t.set("value",sl(i))},resetSelection(e){var r;let{context:t,event:n}=e,i=ra(e,(r=n.value)!=null?r:t.get("focusedValue"));t.set("value",[i])},toggleSelectedDate(e){var s;let{context:t,event:n}=e,i=ra(e,(s=n.value)!=null?s:t.get("focusedValue")),r=t.get("value").findIndex(a=>nt(a,i));if(r===-1){let a=[...t.get("value"),i];t.set("value",Qs(a))}else{let a=Array.from(t.get("value"));a.splice(r,1),t.set("value",Qs(a))}},setHoveredDate({context:e,event:t}){e.set("hoveredValue",t.value)},clearHoveredDate({context:e}){e.set("hoveredValue",null)},selectFocusedDate({context:e,computed:t}){let n=Array.from(e.get("value")),i=e.get("activeIndex");n[i]=e.get("focusedValue").copy(),e.set("value",sl(n));let r=t("valueAsString");e.set("inputValue",r[i])},focusPreviousDay(e){let{context:t}=e,n=t.get("focusedValue").subtract({days:1});ve(e,n)},focusNextDay(e){let{context:t}=e,n=t.get("focusedValue").add({days:1});ve(e,n)},focusPreviousWeek(e){let{context:t}=e,n=t.get("focusedValue").subtract({weeks:1});ve(e,n)},focusNextWeek(e){let{context:t}=e,n=t.get("focusedValue").add({weeks:1});ve(e,n)},focusNextPage(e){let{context:t,computed:n,prop:i}=e,r=qh(t.get("focusedValue"),t.get("startValue"),n("visibleDuration"),i("locale"),i("min"),i("max"));ta(e,r)},focusPreviousPage(e){let{context:t,computed:n,prop:i}=e,r=Wh(t.get("focusedValue"),t.get("startValue"),n("visibleDuration"),i("locale"),i("min"),i("max"));ta(e,r)},focusSectionStart(e){let{context:t}=e;ve(e,t.get("startValue").copy())},focusSectionEnd(e){let{computed:t}=e;ve(e,t("endValue").copy())},focusNextSection(e){let{context:t,event:n,computed:i,prop:r}=e,s=UP(t.get("focusedValue"),t.get("startValue"),n.larger,i("visibleDuration"),r("locale"),r("min"),r("max"));s&&ta(e,s)},focusPreviousSection(e){let{context:t,event:n,computed:i,prop:r}=e,s=qP(t.get("focusedValue"),t.get("startValue"),n.larger,i("visibleDuration"),r("locale"),r("min"),r("max"));s&&ta(e,s)},focusNextYear(e){let{context:t}=e,n=t.get("focusedValue").add({years:1});ve(e,n)},focusPreviousYear(e){let{context:t}=e,n=t.get("focusedValue").subtract({years:1});ve(e,n)},focusNextDecade(e){let{context:t}=e,n=t.get("focusedValue").add({years:10});ve(e,n)},focusPreviousDecade(e){let{context:t}=e,n=t.get("focusedValue").subtract({years:10});ve(e,n)},clearFocusedDate(e){let{prop:t}=e;ve(e,Di(t("timeZone")))},focusPreviousMonthColumn(e){let{context:t,event:n}=e,i=t.get("focusedValue").subtract({months:n.columns});ve(e,i)},focusNextMonthColumn(e){let{context:t,event:n}=e,i=t.get("focusedValue").add({months:n.columns});ve(e,i)},focusPreviousYearColumn(e){let{context:t,event:n}=e,i=t.get("focusedValue").subtract({years:n.columns});ve(e,i)},focusNextYearColumn(e){let{context:t,event:n}=e,i=t.get("focusedValue").add({years:n.columns});ve(e,i)},focusFirstMonth(e){let{context:t}=e,n=t.get("focusedValue").set({month:1});ve(e,n)},focusLastMonth(e){let{context:t}=e,n=t.get("focusedValue").set({month:12});ve(e,n)},focusFirstYear(e){let{context:t}=e,n=Li(t.get("focusedValue").year),i=t.get("focusedValue").set({year:n[0]});ve(e,i)},focusLastYear(e){let{context:t}=e,n=Li(t.get("focusedValue").year),i=t.get("focusedValue").set({year:n[n.length-1]});ve(e,i)},setActiveIndex({context:e,event:t}){e.set("activeIndex",t.index)},setActiveIndexToEnd({context:e}){e.set("activeIndex",1)},setActiveIndexToStart({context:e}){e.set("activeIndex",0)},focusActiveCell({scope:e,context:t}){H(()=>{var i;let n=t.get("view");(i=fh(e,n))==null||i.focus({preventScroll:!0})})},focusActiveCellIfNeeded({scope:e,context:t,event:n}){n.focus&&H(()=>{var r;let i=t.get("view");(r=fh(e,i))==null||r.focus({preventScroll:!0})})},setHoveredValueIfKeyboard({context:e,event:t,prop:n}){!t.type.startsWith("TABLE.ARROW")||n("selectionMode")!=="range"||e.get("activeIndex")===0||e.set("hoveredValue",e.get("focusedValue").copy())},focusTriggerElement({scope:e}){H(()=>{var t;(t=mh(e))==null||t.focus({preventScroll:!0})})},focusFirstInputElement({scope:e}){H(()=>{let[t]=Tr(e);t==null||t.focus({preventScroll:!0})})},focusInputElement({scope:e}){H(()=>{let t=Tr(e),n=t.findLastIndex(s=>s.value!==""),i=Math.max(n,0),r=t[i];r==null||r.focus({preventScroll:!0}),r==null||r.setSelectionRange(r.value.length,r.value.length)})},syncMonthSelectElement({scope:e,context:t}){let n=sC(e);Me(n,t.get("startValue").month.toString())},syncYearSelectElement({scope:e,context:t}){let n=rC(e);Me(n,t.get("startValue").year.toString())},setInputValue({context:e,event:t}){e.get("activeIndex")===t.index&&e.set("inputValue",t.value)},syncInputValue({scope:e,context:t,event:n}){queueMicrotask(()=>{var s;let i=Tr(e),r=(s=n.index)!=null?s:t.get("activeIndex");Me(i[r],t.get("inputValue"))})},focusParsedDate(e){let{event:t,prop:n}=e;if(t.index==null)return;let r=n("parse")(t.value,{locale:n("locale"),timeZone:n("timeZone")});!r||!vh(r)||ve(e,r)},selectParsedDate({context:e,event:t,prop:n}){if(t.index==null)return;let r=n("parse")(t.value,{locale:n("locale"),timeZone:n("timeZone")});if((!r||!vh(r))&&t.value&&(r=e.get("focusedValue").copy()),!r)return;r=Pt(r,n("min"),n("max"));let s=Array.from(e.get("value"));s[t.index]=r,e.set("value",s);let a=ea(s,n);e.set("inputValue",a[t.index])},resetView({context:e}){e.set("view",e.initial("view"))},setStartValue({context:e,computed:t,prop:n}){let i=e.get("focusedValue");if(!$t(i,e.get("startValue"),t("endValue")))return;let s=ch(i,"start",{months:n("numOfMonths")},n("locale"));e.set("startValue",s)},invokeOnOpen({prop:e,context:t}){var n;e("inline")||(n=e("onOpenChange"))==null||n({open:!0,value:t.get("value")})},invokeOnClose({prop:e,context:t}){var n;e("inline")||(n=e("onOpenChange"))==null||n({open:!1,value:t.get("value")})},invokeOnVisibleRangeChange({prop:e,context:t,computed:n}){var i;(i=e("onVisibleRangeChange"))==null||i({view:t.get("view"),visibleRange:n("visibleRange")})},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}},ra=(e,t)=>{let{context:n,prop:i}=e,r=n.get("view"),s=typeof t=="number"?n.get("focusedValue").set({[r]:t}):t;return bC(a=>{fC(a,i("minView"))&&(s=s.set({[a]:a==="day"?1:0}))}),s};SC=_()(["closeOnSelect","dir","disabled","fixedWeeks","focusedValue","format","parse","placeholder","getRootNode","id","ids","inline","invalid","isDateUnavailable","locale","max","min","name","numOfMonths","onFocusChange","onOpenChange","onValueChange","onViewChange","onVisibleRangeChange","open","defaultOpen","positioning","readOnly","required","selectionMode","startOfWeek","timeZone","translations","value","defaultView","defaultValue","view","defaultFocusedValue","outsideDaySelectable","minView","maxView"]),Ix=B(SC),TC=_()(["index","fixOnBlur"]),Px=B(TC),OC=_()(["value"]),Cx=B(OC),wC=_()(["columns","id","view"]),Sx=B(wC),VC=_()(["disabled","value","columns"]),Tx=B(VC),xC=_()(["view"]),Ox=B(xC),AC=class extends K{constructor(){super(...arguments);Y(this,"getDayView",()=>this.el.querySelector('[data-part="day-view"]'));Y(this,"getMonthView",()=>this.el.querySelector('[data-part="month-view"]'));Y(this,"getYearView",()=>this.el.querySelector('[data-part="year-view"]'));Y(this,"renderDayTableHeader",()=>{let t=this.getDayView(),n=t==null?void 0:t.querySelector("thead");if(!n||!this.api.weekDays)return;let i=this.doc.createElement("tr");this.spreadProps(i,this.api.getTableRowProps({view:"day"})),this.api.weekDays.forEach(r=>{let s=this.doc.createElement("th");s.scope="col",s.setAttribute("aria-label",r.long),s.textContent=r.narrow,i.appendChild(s)}),n.innerHTML="",n.appendChild(i)});Y(this,"renderDayTableBody",()=>{let t=this.getDayView(),n=t==null?void 0:t.querySelector("tbody");n&&(this.spreadProps(n,this.api.getTableBodyProps({view:"day"})),this.api.weeks&&(n.innerHTML="",this.api.weeks.forEach(i=>{let r=this.doc.createElement("tr");this.spreadProps(r,this.api.getTableRowProps({view:"day"})),i.forEach(s=>{let a=this.doc.createElement("td");this.spreadProps(a,this.api.getDayTableCellProps({value:s}));let o=this.doc.createElement("div");this.spreadProps(o,this.api.getDayTableCellTriggerProps({value:s})),o.textContent=String(s.day),a.appendChild(o),r.appendChild(a)}),n.appendChild(r)})))});Y(this,"renderMonthTableBody",()=>{let t=this.getMonthView(),n=t==null?void 0:t.querySelector("tbody");if(!n)return;this.spreadProps(n,this.api.getTableBodyProps({view:"month"}));let i=this.api.getMonthsGrid({columns:4,format:"short"});n.innerHTML="",i.forEach(r=>{let s=this.doc.createElement("tr");this.spreadProps(s,this.api.getTableRowProps()),r.forEach(a=>{let o=this.doc.createElement("td");this.spreadProps(o,this.api.getMonthTableCellProps(y(g({},a),{columns:4})));let l=this.doc.createElement("div");this.spreadProps(l,this.api.getMonthTableCellTriggerProps(y(g({},a),{columns:4}))),l.textContent=a.label,o.appendChild(l),s.appendChild(o)}),n.appendChild(s)})});Y(this,"renderYearTableBody",()=>{let t=this.getYearView(),n=t==null?void 0:t.querySelector("tbody");if(!n)return;this.spreadProps(n,this.api.getTableBodyProps());let i=this.api.getYearsGrid({columns:4});n.innerHTML="",i.forEach(r=>{let s=this.doc.createElement("tr");this.spreadProps(s,this.api.getTableRowProps({view:"year"})),r.forEach(a=>{let o=this.doc.createElement("td");this.spreadProps(o,this.api.getYearTableCellProps(y(g({},a),{columns:4})));let l=this.doc.createElement("div");this.spreadProps(l,this.api.getYearTableCellTriggerProps(y(g({},a),{columns:4}))),l.textContent=a.label,o.appendChild(l),s.appendChild(o)}),n.appendChild(s)})})}initMachine(t){return new W(CC,t)}initApi(){return IC(this.machine.service,q)}render(){let t=this.el.querySelector('[data-scope="date-picker"][data-part="root"]');t&&this.spreadProps(t,this.api.getRootProps());let n=this.el.querySelector('[data-scope="date-picker"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps());let i=this.el.querySelector('[data-scope="date-picker"][data-part="control"]');i&&this.spreadProps(i,this.api.getControlProps());let r=this.el.querySelector('[data-scope="date-picker"][data-part="input"]');r&&this.spreadProps(r,this.api.getInputProps());let s=this.el.querySelector('[data-scope="date-picker"][data-part="trigger"]');s&&this.spreadProps(s,this.api.getTriggerProps());let a=this.el.querySelector('[data-scope="date-picker"][data-part="positioner"]');a&&this.spreadProps(a,this.api.getPositionerProps());let o=this.el.querySelector('[data-scope="date-picker"][data-part="content"]');if(o&&this.spreadProps(o,this.api.getContentProps()),this.api.open){let l=this.getDayView(),c=this.getMonthView(),d=this.getYearView();if(l&&(l.hidden=this.api.view!=="day"),c&&(c.hidden=this.api.view!=="month"),d&&(d.hidden=this.api.view!=="year"),this.api.view==="day"&&l){let h=l.querySelector('[data-part="view-control"]');h&&this.spreadProps(h,this.api.getViewControlProps({view:"year"}));let m=l.querySelector('[data-part="prev-trigger"]');m&&this.spreadProps(m,this.api.getPrevTriggerProps());let u=l.querySelector('[data-part="view-trigger"]');u&&(this.spreadProps(u,this.api.getViewTriggerProps()),u.textContent=this.api.visibleRangeText.start);let p=l.querySelector('[data-part="next-trigger"]');p&&this.spreadProps(p,this.api.getNextTriggerProps());let v=l.querySelector("table");v&&this.spreadProps(v,this.api.getTableProps({view:"day"}));let I=l.querySelector("thead");I&&this.spreadProps(I,this.api.getTableHeaderProps({view:"day"})),this.renderDayTableHeader(),this.renderDayTableBody()}else if(this.api.view==="month"&&c){let h=c.querySelector('[data-part="view-control"]');h&&this.spreadProps(h,this.api.getViewControlProps({view:"month"}));let m=c.querySelector('[data-part="prev-trigger"]');m&&this.spreadProps(m,this.api.getPrevTriggerProps({view:"month"}));let u=c.querySelector('[data-part="view-trigger"]');u&&(this.spreadProps(u,this.api.getViewTriggerProps({view:"month"})),u.textContent=String(this.api.visibleRange.start.year));let p=c.querySelector('[data-part="next-trigger"]');p&&this.spreadProps(p,this.api.getNextTriggerProps({view:"month"}));let v=c.querySelector("table");v&&this.spreadProps(v,this.api.getTableProps({view:"month",columns:4})),this.renderMonthTableBody()}else if(this.api.view==="year"&&d){let h=d.querySelector('[data-part="view-control"]');h&&this.spreadProps(h,this.api.getViewControlProps({view:"year"}));let m=d.querySelector('[data-part="prev-trigger"]');m&&this.spreadProps(m,this.api.getPrevTriggerProps({view:"year"}));let u=d.querySelector('[data-part="decade"]');if(u){let I=this.api.getDecade();u.textContent=`${I.start} - ${I.end}`}let p=d.querySelector('[data-part="next-trigger"]');p&&this.spreadProps(p,this.api.getNextTriggerProps({view:"year"}));let v=d.querySelector("table");v&&this.spreadProps(v,this.api.getTableProps({view:"year",columns:4})),this.renderYearTableBody()}}}};kC={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=this.liveSocket,i=w(e,"min"),r=w(e,"max"),s=w(e,"positioning"),a=d=>d?d.map(h=>gt(h)):void 0,o=d=>d?gt(d):void 0,l=new AC(e,y(g({id:e.id},C(e,"controlled")?{value:a(Z(e,"value"))}:{defaultValue:a(Z(e,"defaultValue"))}),{defaultFocusedValue:o(w(e,"focusedValue")),defaultView:w(e,"defaultView",["day","month","year"]),dir:w(e,"dir",["ltr","rtl"]),locale:w(e,"locale"),timeZone:w(e,"timeZone"),disabled:C(e,"disabled"),readOnly:C(e,"readOnly"),required:C(e,"required"),invalid:C(e,"invalid"),outsideDaySelectable:C(e,"outsideDaySelectable"),closeOnSelect:C(e,"closeOnSelect"),min:i?gt(i):void 0,max:r?gt(r):void 0,numOfMonths:z(e,"numOfMonths"),startOfWeek:z(e,"startOfWeek"),fixedWeeks:C(e,"fixedWeeks"),selectionMode:w(e,"selectionMode",["single","multiple","range"]),placeholder:w(e,"placeholder"),minView:w(e,"minView",["day","month","year"]),maxView:w(e,"maxView",["day","month","year"]),inline:C(e,"inline"),positioning:s?JSON.parse(s):void 0,onValueChange:d=>{var p;let h=(p=d.value)!=null&&p.length?d.value.map(v=>yh(v)).join(","):"",m=e.querySelector(`#${e.id}-value`);m&&m.value!==h&&(m.value=h,m.dispatchEvent(new Event("input",{bubbles:!0})),m.dispatchEvent(new Event("change",{bubbles:!0})));let u=w(e,"onValueChange");u&&n.main.isConnected()&&t(u,{id:e.id,value:h||null})},onFocusChange:d=>{var m;let h=w(e,"onFocusChange");h&&n.main.isConnected()&&t(h,{id:e.id,focused:(m=d.focused)!=null?m:!1})},onViewChange:d=>{let h=w(e,"onViewChange");h&&n.main.isConnected()&&t(h,{id:e.id,view:d.view})},onVisibleRangeChange:d=>{let h=w(e,"onVisibleRangeChange");h&&n.main.isConnected()&&t(h,{id:e.id,start:d.start,end:d.end})},onOpenChange:d=>{let h=w(e,"onOpenChange");h&&n.main.isConnected()&&t(h,{id:e.id,open:d.open})}}));l.init(),this.datePicker=l;let c=e.querySelector('[data-scope="date-picker"][data-part="input-wrapper"]');c&&c.removeAttribute("data-loading"),this.handlers=[],this.handlers.push(this.handleEvent("date_picker_set_value",d=>{let h=d.date_picker_id;h&&h!==e.id||l.api.setValue([gt(d.value)])})),this.onSetValue=d=>{var m;let h=(m=d.detail)==null?void 0:m.value;typeof h=="string"&&l.api.setValue([gt(h)])},e.addEventListener("phx:date-picker:set-value",this.onSetValue)},updated(){var l,c;let e=this.el,t=e.querySelector('[data-scope="date-picker"][data-part="input-wrapper"]');t&&t.removeAttribute("data-loading");let n=d=>d?d.map(h=>gt(h)):void 0,i=w(e,"min"),r=w(e,"max"),s=w(e,"positioning"),a=C(e,"controlled"),o=w(e,"focusedValue");if((l=this.datePicker)==null||l.updateProps(y(g({},C(e,"controlled")?{value:n(Z(e,"value"))}:{defaultValue:n(Z(e,"defaultValue"))}),{defaultFocusedValue:o?gt(o):void 0,defaultView:w(e,"defaultView",["day","month","year"]),dir:w(this.el,"dir",["ltr","rtl"]),locale:w(this.el,"locale"),timeZone:w(this.el,"timeZone"),disabled:C(this.el,"disabled"),readOnly:C(this.el,"readOnly"),required:C(this.el,"required"),invalid:C(this.el,"invalid"),outsideDaySelectable:C(this.el,"outsideDaySelectable"),closeOnSelect:C(this.el,"closeOnSelect"),min:i?gt(i):void 0,max:r?gt(r):void 0,numOfMonths:z(this.el,"numOfMonths"),startOfWeek:z(this.el,"startOfWeek"),fixedWeeks:C(this.el,"fixedWeeks"),selectionMode:w(this.el,"selectionMode",["single","multiple","range"]),placeholder:w(this.el,"placeholder"),minView:w(this.el,"minView",["day","month","year"]),maxView:w(this.el,"maxView",["day","month","year"]),inline:C(this.el,"inline"),positioning:s?JSON.parse(s):void 0})),a&&this.datePicker){let d=Z(e,"value"),h=(c=d==null?void 0:d.join(","))!=null?c:"",m=this.datePicker.api.value,u=m!=null&&m.length?m.map(p=>yh(p)).join(","):"";if(h!==u){let p=d!=null&&d.length?d.map(v=>gt(v)):[];this.datePicker.api.setValue(p)}}},destroyed(){var e;if(this.onSetValue&&this.el.removeEventListener("phx:date-picker:set-value",this.onSetValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.datePicker)==null||e.destroy()}}});var dg={};he(dg,{Dialog:()=>lS});function HC(e,t={}){let{defer:n=!0}=t,i=n?$C:s=>s(),r=[];return r.push(i(()=>{let a=(typeof e=="function"?e():e).filter(Boolean);a.length!==0&&r.push(FC(a))})),()=>{r.forEach(s=>s==null?void 0:s())}}function YC(e,t={}){let n,i=H(()=>{let s=(Array.isArray(e)?e:[e]).map(o=>typeof o=="function"?o():o).filter(o=>o!=null);if(s.length===0)return;let a=s[0];n=new UC(s,y(g({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:a},t),{document:Le(a)}));try{n.activate()}catch(o){}});return function(){n==null||n.deactivate(),i()}}function jC(e){let t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function rg(e){let t=at(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function XC(e){var u;let t=e!=null?e:document,n=(u=t.defaultView)!=null?u:window,{documentElement:i,body:r}=t;if(r.hasAttribute(yl))return;let a=rg(i)||rg(r),o=n.innerWidth-i.clientWidth;r.setAttribute(yl,"");let l=()=>$c(i,"--scrollbar-width",`${o}px`),c=jC(i),d=()=>{let p={overflow:"hidden"};return!a&&o>0&&(p[c]=`${o}px`),Hn(r,p)},h=()=>{var S,P;let{scrollX:p,scrollY:v,visualViewport:I}=n,T=(S=I==null?void 0:I.offsetLeft)!=null?S:0,O=(P=I==null?void 0:I.offsetTop)!=null?P:0,b={position:"fixed",overflow:"hidden",top:`${-(v-Math.floor(O))}px`,left:`${-(p-Math.floor(T))}px`,right:"0"};!a&&o>0&&(b[c]=`${o}px`);let f=Hn(r,b);return()=>{f==null||f(),n.scrollTo({left:p,top:v,behavior:"instant"})}},m=[l(),ir()?h():d()];return()=>{m.forEach(p=>p==null?void 0:p()),r.removeAttribute(yl)}}function rS(e,t){let{state:n,send:i,context:r,prop:s,scope:a}=e,o=s("aria-label"),l=n.matches("open");return{open:l,setOpen(c){n.matches("open")!==c&&i({type:c?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(y(g({},Qn.trigger.attrs),{dir:s("dir"),id:lg(a),"aria-haspopup":"dialog",type:"button","aria-expanded":l,"data-state":l?"open":"closed","aria-controls":bl(a),onClick(c){c.defaultPrevented||i({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(y(g({},Qn.backdrop.attrs),{dir:s("dir"),hidden:!l,id:og(a),"data-state":l?"open":"closed"}))},getPositionerProps(){return t.element(y(g({},Qn.positioner.attrs),{dir:s("dir"),id:ag(a),style:{pointerEvents:l?void 0:"none"}}))},getContentProps(){let c=r.get("rendered");return t.element(y(g({},Qn.content.attrs),{dir:s("dir"),role:s("role"),hidden:!l,id:bl(a),tabIndex:-1,"data-state":l?"open":"closed","aria-modal":!0,"aria-label":o||void 0,"aria-labelledby":o||!c.title?void 0:El(a),"aria-describedby":c.description?Il(a):void 0}))},getTitleProps(){return t.element(y(g({},Qn.title.attrs),{dir:s("dir"),id:El(a)}))},getDescriptionProps(){return t.element(y(g({},Qn.description.attrs),{dir:s("dir"),id:Il(a)}))},getCloseTriggerProps(){return t.button(y(g({},Qn.closeTrigger.attrs),{dir:s("dir"),id:cg(a),type:"button",onClick(c){c.defaultPrevented||(c.stopPropagation(),i({type:"CLOSE"}))}}))}}}var Hi,ca,da,ml,sg,NC,RC,DC,LC,MC,FC,$C,BC,_C,be,ng,GC,UC,Pl,vl,qC,WC,Ar,KC,ig,zC,yl,ZC,Qn,ag,og,bl,lg,El,Il,cg,ua,JC,QC,eS,tS,nS,iS,sS,aS,Dx,oS,lS,ug=re(()=>{"use strict";Wn();tn();se();Hi=new WeakMap,ca=new WeakMap,da={},ml=0,sg=e=>e&&(e.host||sg(e.parentNode)),NC=(e,t)=>t.map(n=>{if(e.contains(n))return n;let i=sg(n);return i&&e.contains(i)?i:(console.error("[zag-js > ariaHidden] target",n,"in not contained inside",e,". Doing nothing"),null)}).filter(n=>!!n),RC=new Set(["script","output","status","next-route-announcer"]),DC=e=>RC.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),LC=(e,t)=>{let{parentNode:n,markerName:i,controlAttribute:r,followControlledElements:s=!0}=t,a=NC(n,Array.isArray(e)?e:[e]);da[i]||(da[i]=new WeakMap);let o=da[i],l=[],c=new Set,d=new Set(a),h=u=>{!u||c.has(u)||(c.add(u),h(u.parentNode))};a.forEach(u=>{h(u),s&&le(u)&&Xa(u,p=>{h(p)})});let m=u=>{!u||d.has(u)||Array.prototype.forEach.call(u.children,p=>{if(c.has(p))m(p);else try{if(DC(p))return;let I=p.getAttribute(r)==="true",T=(Hi.get(p)||0)+1,O=(o.get(p)||0)+1;Hi.set(p,T),o.set(p,O),l.push(p),T===1&&I&&ca.set(p,!0),O===1&&p.setAttribute(i,""),I||p.setAttribute(r,"true")}catch(v){console.error("[zag-js > ariaHidden] cannot operate on ",p,v)}})};return m(n),c.clear(),ml++,()=>{l.forEach(u=>{let p=Hi.get(u)-1,v=o.get(u)-1;Hi.set(u,p),o.set(u,v),p||(ca.has(u)||u.removeAttribute(r),ca.delete(u)),v||u.removeAttribute(i)}),ml--,ml||(Hi=new WeakMap,Hi=new WeakMap,ca=new WeakMap,da={})}},MC=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,FC=(e,t=MC(e),n="data-aria-hidden",i=!0)=>{if(t)return LC(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:i})},$C=e=>{let t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};BC=Object.defineProperty,_C=(e,t,n)=>t in e?BC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,be=(e,t,n)=>_C(e,typeof t!="symbol"?t+"":t,n),ng={activateTrap(e,t){if(e.length>0){let i=e[e.length-1];i!==t&&i.pause()}let n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},GC=[],UC=class{constructor(e,t){be(this,"trapStack"),be(this,"config"),be(this,"doc"),be(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),be(this,"portalContainers",new Set),be(this,"listenerCleanups",[]),be(this,"handleFocus",i=>{let r=j(i),s=this.findContainerIndex(r,i)>=0;if(s||nr(r))s&&(this.state.mostRecentlyFocusedNode=r);else{i.stopImmediatePropagation();let a,o=!0;if(this.state.mostRecentlyFocusedNode)if(fi(this.state.mostRecentlyFocusedNode)>0){let l=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:c}=this.state.containerGroups[l];if(c.length>0){let d=c.findIndex(h=>h===this.state.mostRecentlyFocusedNode);d>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?d+1=0&&(a=c[d-1],o=!1))}}else this.state.containerGroups.some(l=>l.tabbableNodes.some(c=>fi(c)>0))||(o=!1);else o=!1;o&&(a=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),a?this.tryFocus(a):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),be(this,"handlePointerDown",i=>{let r=j(i);if(!(this.findContainerIndex(r,i)>=0)){if(Ar(this.config.clickOutsideDeactivates,i)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Ar(this.config.allowOutsideClick,i)||i.preventDefault()}}),be(this,"handleClick",i=>{let r=j(i);this.findContainerIndex(r,i)>=0||Ar(this.config.clickOutsideDeactivates,i)||Ar(this.config.allowOutsideClick,i)||(i.preventDefault(),i.stopImmediatePropagation())}),be(this,"handleTabKey",i=>{if(this.config.isKeyForward(i)||this.config.isKeyBackward(i)){this.state.recentNavEvent=i;let r=this.config.isKeyBackward(i),s=this.findNextNavNode({event:i,isBackward:r});if(!s)return;vl(i)&&i.preventDefault(),this.tryFocus(s)}}),be(this,"handleEscapeKey",i=>{KC(i)&&Ar(this.config.escapeDeactivates,i)!==!1&&(i.preventDefault(),this.deactivate())}),be(this,"_mutationObserver"),be(this,"setupMutationObserver",()=>{let i=this.doc.defaultView||window;this._mutationObserver=new i.MutationObserver(r=>{r.some(o=>Array.from(o.removedNodes).some(c=>c===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),r.some(o=>o.type==="attributes"&&(o.attributeName==="aria-controls"||o.attributeName==="aria-expanded")?!0:o.type==="childList"&&o.addedNodes.length>0?Array.from(o.addedNodes).some(l=>{if(l.nodeType!==Node.ELEMENT_NODE)return!1;let c=l;return Pc(c)?!0:c.id&&!this.state.containers.some(d=>d.contains(c))?Cc(c):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),be(this,"updateObservedNodes",()=>{var i;(i=this._mutationObserver)==null||i.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(r=>{var s;(s=this._mutationObserver)==null||s.observe(r,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(r=>{this.observePortalContainer(r)}))}),be(this,"getInitialFocusNode",()=>{let i=this.getNodeForOption("initialFocus",{hasFallback:!0});if(i===!1)return!1;if(i===void 0||i&&!Ye(i)){let r=di(this.doc);if(r&&this.findContainerIndex(r)>=0)i=r;else{let s=this.state.tabbableGroups[0];i=s&&s.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else i===null&&(i=this.getNodeForOption("fallbackFocus"));if(!i)throw new Error("Your focus-trap needs to have at least one focusable element");return i.isConnected||(i=this.getNodeForOption("fallbackFocus")),i}),be(this,"tryFocus",i=>{if(i!==!1&&i!==di(this.doc)){if(!i||!i.focus){this.tryFocus(this.getInitialFocusNode());return}i.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=i,zC(i)&&i.select()}}),be(this,"deactivate",i=>{if(!this.state.active)return this;let r=g({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},i);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),ng.deactivateTrap(this.trapStack,this),this.portalContainers.clear();let s=this.getOption(r,"onDeactivate"),a=this.getOption(r,"onPostDeactivate"),o=this.getOption(r,"checkCanReturnFocus"),l=this.getOption(r,"returnFocus","returnFocusOnDeactivate");s==null||s();let c=()=>{ig(()=>{if(l){let d=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(d)}a==null||a()})};if(l&&o){let d=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return o(d).then(c,c),this}return c(),this}),be(this,"pause",i=>{if(this.state.paused||!this.state.active)return this;let r=this.getOption(i,"onPause"),s=this.getOption(i,"onPostPause");return this.state.paused=!0,r==null||r(),this.removeListeners(),this.updateObservedNodes(),s==null||s(),this}),be(this,"unpause",i=>{if(!this.state.paused||!this.state.active)return this;let r=this.getOption(i,"onUnpause"),s=this.getOption(i,"onPostUnpause");return this.state.paused=!1,r==null||r(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),s==null||s(),this}),be(this,"updateContainerElements",i=>(this.state.containers=Array.isArray(i)?i.filter(Boolean):[i].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),be(this,"getReturnFocusNode",i=>{let r=this.getNodeForOption("setReturnFocus",{params:[i]});return r||(r===!1?!1:i)}),be(this,"getOption",(i,r,s)=>i&&i[r]!==void 0?i[r]:this.config[s||r]),be(this,"getNodeForOption",(i,{hasFallback:r=!1,params:s=[]}={})=>{let a=this.config[i];if(typeof a=="function"&&(a=a(...s)),a===!0&&(a=void 0),!a){if(a===void 0||a===!1)return a;throw new Error(`\`${i}\` was specified but was not a node, or did not return a node`)}let o=a;if(typeof a=="string"){try{o=this.doc.querySelector(a)}catch(l){throw new Error(`\`${i}\` appears to be an invalid selector; error="${l.message}"`)}if(!o&&!r)throw new Error(`\`${i}\` as selector refers to no known node`)}return o}),be(this,"findNextNavNode",i=>{let{event:r,isBackward:s=!1}=i,a=i.target||j(r);this.updateTabbableNodes();let o=null;if(this.state.tabbableGroups.length>0){let l=this.findContainerIndex(a,r),c=l>=0?this.state.containerGroups[l]:void 0;if(l<0)s?o=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:o=this.state.tabbableGroups[0].firstTabbableNode;else if(s){let d=this.state.tabbableGroups.findIndex(({firstTabbableNode:h})=>a===h);if(d<0&&((c==null?void 0:c.container)===a||Ye(a)&&!un(a)&&!(c!=null&&c.nextTabbableNode(a,!1)))&&(d=l),d>=0){let h=d===0?this.state.tabbableGroups.length-1:d-1,m=this.state.tabbableGroups[h];o=fi(a)>=0?m.lastTabbableNode:m.lastDomTabbableNode}else vl(r)||(o=c==null?void 0:c.nextTabbableNode(a,!1))}else{let d=this.state.tabbableGroups.findIndex(({lastTabbableNode:h})=>a===h);if(d<0&&((c==null?void 0:c.container)===a||Ye(a)&&!un(a)&&!(c!=null&&c.nextTabbableNode(a)))&&(d=l),d>=0){let h=d===this.state.tabbableGroups.length-1?0:d+1,m=this.state.tabbableGroups[h];o=fi(a)>=0?m.firstTabbableNode:m.firstDomTabbableNode}else vl(r)||(o=c==null?void 0:c.nextTabbableNode(a))}}else o=this.getNodeForOption("fallbackFocus");return o}),this.trapStack=t.trapStack||GC;let n=g({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward:qC,isKeyBackward:WC},t);this.doc=n.document||Le(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){let t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){var t;(t=this._mutationObserver)==null||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{Ic(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){let n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:i,tabbableNodes:r})=>i.contains(e)||(n==null?void 0:n.includes(i))||r.find(s=>s===e)||this.isControlledElement(i,e))}isControlledElement(e,t){return this.config.followControlledElements?as(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{let t=jt(e,{getShadowRoot:this.config.getShadowRoot}),n=ar(e,{getShadowRoot:this.config.getShadowRoot}),i=t[0],r=t[t.length-1],s=i,a=r,o=!1;for(let c=0;c0){o=!0;break}function l(c,d=!0){let h=t.indexOf(c);if(h>=0)return t[h+(d?1:-1)];let m=n.indexOf(c);if(!(m<0)){if(d){for(let u=m+1;u=0;u--)if(un(n[u]))return n[u]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:o,firstTabbableNode:i,lastTabbableNode:r,firstDomTabbableNode:s,lastDomTabbableNode:a,nextTabbableNode:l}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return ng.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?ig(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(ee(this.doc,"focusin",this.handleFocus,!0),ee(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),ee(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),ee(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),ee(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),ee(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;let t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),i=this.getOption(e,"checkCanFocusTrap");i||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=di(this.doc),t==null||t();let r=()=>{i&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return i?(i(this.state.containers.concat()).then(r,r),this):(r(),this)}},Pl=e=>e.type==="keydown",vl=e=>Pl(e)&&(e==null?void 0:e.key)==="Tab",qC=e=>Pl(e)&&e.key==="Tab"&&!(e!=null&&e.shiftKey),WC=e=>Pl(e)&&e.key==="Tab"&&(e==null?void 0:e.shiftKey),Ar=(e,...t)=>typeof e=="function"?e(...t):e,KC=e=>!e.isComposing&&e.key==="Escape",ig=e=>setTimeout(e,0),zC=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";yl="data-scroll-lock";ZC=U("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),Qn=ZC.build(),ag=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},og=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},bl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},lg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},El=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},Il=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},cg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},ua=e=>e.getById(bl(e)),JC=e=>e.getById(ag(e)),QC=e=>e.getById(og(e)),eS=e=>e.getById(lg(e)),tS=e=>e.getById(El(e)),nS=e=>e.getById(Il(e)),iS=e=>e.getById(cg(e));sS={props({props:e,scope:t}){let n=e.role==="alertdialog",i=n?()=>iS(t):void 0,r=typeof e.modal=="boolean"?e.modal:!0;return g({role:"dialog",modal:r,trapFocus:r,preventScroll:r,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:i},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return Ft(()=>ua(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[eS(e)],onInteractOutside(r){var s;(s=n("onInteractOutside"))==null||s(r),n("closeOnInteractOutside")||r.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(r){var s;(s=n("onEscapeKeyDown"))==null||s(r),n("closeOnEscape")||r.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return XC(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?YC(()=>ua(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:i=>{var r,s;return(s=(r=t("finalFocusEl"))==null?void 0:r())!=null?s:i},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?HC(()=>[ua(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){H(()=>{e.set("rendered",{title:!!tS(t),description:!!nS(t)})})},syncZIndex({scope:e}){H(()=>{let t=ua(e);if(!t)return;let n=at(t);[JC(e),QC(e)].forEach(r=>{r==null||r.style.setProperty("--z-index",n.zIndex),r==null||r.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}},aS=_()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]),Dx=B(aS),oS=class extends K{initMachine(e){return new W(sS,e)}initApi(){return rS(this.machine.service,q)}render(){let e=this.el,t=e.querySelector('[data-scope="dialog"][data-part="trigger"]');t&&this.spreadProps(t,this.api.getTriggerProps());let n=e.querySelector('[data-scope="dialog"][data-part="backdrop"]');n&&this.spreadProps(n,this.api.getBackdropProps());let i=e.querySelector('[data-scope="dialog"][data-part="positioner"]');i&&this.spreadProps(i,this.api.getPositionerProps());let r=e.querySelector('[data-scope="dialog"][data-part="content"]');r&&this.spreadProps(r,this.api.getContentProps());let s=e.querySelector('[data-scope="dialog"][data-part="title"]');s&&this.spreadProps(s,this.api.getTitleProps());let a=e.querySelector('[data-scope="dialog"][data-part="description"]');a&&this.spreadProps(a,this.api.getDescriptionProps());let o=e.querySelector('[data-scope="dialog"][data-part="close-trigger"]');o&&this.spreadProps(o,this.api.getCloseTriggerProps())}},lS={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=new oS(e,y(g({id:e.id},C(e,"controlled")?{open:C(e,"open")}:{defaultOpen:C(e,"defaultOpen")}),{modal:C(e,"modal"),closeOnInteractOutside:C(e,"closeOnInteractOutside"),closeOnEscape:C(e,"closeOnEscapeKeyDown"),preventScroll:C(e,"preventScroll"),restoreFocus:C(e,"restoreFocus"),dir:w(e,"dir",["ltr","rtl"]),onOpenChange:i=>{let r=w(e,"onOpenChange");r&&this.liveSocket.main.isConnected()&&t(r,{id:e.id,open:i.open});let s=w(e,"onOpenChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{id:e.id,open:i.open}}))}}));n.init(),this.dialog=n,this.onSetOpen=i=>{let{open:r}=i.detail;n.api.setOpen(r)},e.addEventListener("phx:dialog:set-open",this.onSetOpen),this.handlers=[],this.handlers.push(this.handleEvent("dialog_set_open",i=>{let r=i.dialog_id;r&&r!==e.id||n.api.setOpen(i.open)})),this.handlers.push(this.handleEvent("dialog_open",()=>{this.pushEvent("dialog_open_response",{value:n.api.open})}))},updated(){var e;(e=this.dialog)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlled")?{open:C(this.el,"open")}:{defaultOpen:C(this.el,"defaultOpen")}),{modal:C(this.el,"modal"),closeOnInteractOutside:C(this.el,"closeOnInteractOutside"),closeOnEscape:C(this.el,"closeOnEscapeKeyDown"),preventScroll:C(this.el,"preventScroll"),restoreFocus:C(this.el,"restoreFocus"),dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(this.onSetOpen&&this.el.removeEventListener("phx:dialog:set-open",this.onSetOpen),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.dialog)==null||e.destroy()}}});var mg={};he(mg,{Editable:()=>PS});function yS(e,t){var S;let{state:n,context:i,send:r,prop:s,scope:a,computed:o}=e,l=!!s("disabled"),c=o("isInteractive"),d=!!s("readOnly"),h=!!s("required"),m=!!s("invalid"),u=!!s("autoResize"),p=s("translations"),v=n.matches("edit"),I=s("placeholder"),T=typeof I=="string"?{edit:I,preview:I}:I,O=i.get("value"),b=O.trim()==="",f=b?(S=T==null?void 0:T.preview)!=null?S:"":O;return{editing:v,empty:b,value:O,valueText:f,setValue(P){r({type:"VALUE.SET",value:P,src:"setValue"})},clearValue(){r({type:"VALUE.SET",value:"",src:"clearValue"})},edit(){c&&r({type:"EDIT"})},cancel(){c&&r({type:"CANCEL"})},submit(){c&&r({type:"SUBMIT"})},getRootProps(){return t.element(y(g({},ln.root.attrs),{id:dS(a),dir:s("dir")}))},getAreaProps(){return t.element(y(g({},ln.area.attrs),{id:uS(a),dir:s("dir"),style:u?{display:"inline-grid"}:void 0,"data-focus":E(v),"data-disabled":E(l),"data-placeholder-shown":E(b)}))},getLabelProps(){return t.label(y(g({},ln.label.attrs),{id:hS(a),dir:s("dir"),htmlFor:Cl(a),"data-focus":E(v),"data-invalid":E(m),"data-required":E(h),onClick(){if(v)return;let P=pS(a);P==null||P.focus({preventScroll:!0})}}))},getInputProps(){return t.input(y(g({},ln.input.attrs),{dir:s("dir"),"aria-label":p==null?void 0:p.input,name:s("name"),form:s("form"),id:Cl(a),hidden:u?void 0:!v,placeholder:T==null?void 0:T.edit,maxLength:s("maxLength"),required:s("required"),disabled:l,"data-disabled":E(l),readOnly:d,"data-readonly":E(d),"aria-invalid":X(m),"data-invalid":E(m),"data-autoresize":E(u),defaultValue:O,size:u?1:void 0,onChange(P){r({type:"VALUE.SET",src:"input.change",value:P.currentTarget.value})},onKeyDown(P){if(P.defaultPrevented||Re(P))return;let A={Escape(){r({type:"CANCEL"}),P.preventDefault()},Enter(x){if(!o("submitOnEnter"))return;let{localName:k}=x.currentTarget;if(k==="textarea"){if(!(Qa()?x.metaKey:x.ctrlKey))return;r({type:"SUBMIT",src:"keydown.enter"});return}k==="input"&&!x.shiftKey&&!x.metaKey&&(r({type:"SUBMIT",src:"keydown.enter"}),x.preventDefault())}}[P.key];A&&A(P)},style:u?{gridArea:"1 / 1 / auto / auto",visibility:v?void 0:"hidden"}:void 0}))},getPreviewProps(){return t.element(y(g({id:hg(a)},ln.preview.attrs),{dir:s("dir"),"data-placeholder-shown":E(b),"aria-readonly":X(d),"data-readonly":E(l),"data-disabled":E(l),"aria-disabled":X(l),"aria-invalid":X(m),"data-invalid":E(m),"aria-label":p==null?void 0:p.edit,"data-autoresize":E(u),children:f,hidden:u?void 0:v,tabIndex:c?0:void 0,onClick(){c&&s("activationMode")==="click"&&r({type:"EDIT",src:"click"})},onFocus(){c&&s("activationMode")==="focus"&&r({type:"EDIT",src:"focus"})},onDoubleClick(P){P.defaultPrevented||c&&s("activationMode")==="dblclick"&&r({type:"EDIT",src:"dblclick"})},style:u?{whiteSpace:"pre",gridArea:"1 / 1 / auto / auto",visibility:v?"hidden":void 0,overflow:"hidden",textOverflow:"ellipsis"}:void 0}))},getEditTriggerProps(){return t.button(y(g({},ln.editTrigger.attrs),{id:fg(a),dir:s("dir"),"aria-label":p==null?void 0:p.edit,hidden:v,type:"button",disabled:l,onClick(P){P.defaultPrevented||c&&r({type:"EDIT",src:"edit.click"})}}))},getControlProps(){return t.element(y(g({id:gS(a)},ln.control.attrs),{dir:s("dir")}))},getSubmitTriggerProps(){return t.button(y(g({},ln.submitTrigger.attrs),{dir:s("dir"),id:gg(a),"aria-label":p==null?void 0:p.submit,hidden:!v,disabled:l,type:"button",onClick(P){P.defaultPrevented||c&&r({type:"SUBMIT",src:"submit.click"})}}))},getCancelTriggerProps(){return t.button(y(g({},ln.cancelTrigger.attrs),{dir:s("dir"),"aria-label":p==null?void 0:p.cancel,id:pg(a),hidden:!v,type:"button",disabled:l,onClick(P){P.defaultPrevented||c&&r({type:"CANCEL",src:"cancel.click"})}}))}}}var cS,ln,dS,uS,hS,hg,Cl,gS,gg,pg,fg,ha,pS,fS,mS,vS,bS,ES,Bx,IS,PS,vg=re(()=>{"use strict";tn();se();cS=U("editable").parts("root","area","label","preview","input","editTrigger","submitTrigger","cancelTrigger","control"),ln=cS.build(),dS=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`editable:${e.id}`},uS=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.area)!=null?n:`editable:${e.id}:area`},hS=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`editable:${e.id}:label`},hg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.preview)!=null?n:`editable:${e.id}:preview`},Cl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.input)!=null?n:`editable:${e.id}:input`},gS=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`editable:${e.id}:control`},gg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.submitTrigger)!=null?n:`editable:${e.id}:submit`},pg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.cancelTrigger)!=null?n:`editable:${e.id}:cancel`},fg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.editTrigger)!=null?n:`editable:${e.id}:edit`},ha=e=>e.getById(Cl(e)),pS=e=>e.getById(hg(e)),fS=e=>e.getById(gg(e)),mS=e=>e.getById(pg(e)),vS=e=>e.getById(fg(e));bS={props({props:e}){return y(g({activationMode:"focus",submitMode:"both",defaultValue:"",selectOnFocus:!0},e),{translations:g({input:"editable input",edit:"edit",submit:"submit",cancel:"cancel"},e.translations)})},initialState({prop:e}){return e("edit")||e("defaultEdit")?"edit":"preview"},entry:["focusInputIfNeeded"],context:({bindable:e,prop:t})=>({value:e(()=>({defaultValue:t("defaultValue"),value:t("value"),onChange(n){var i;return(i=t("onValueChange"))==null?void 0:i({value:n})}})),previousValue:e(()=>({defaultValue:""}))}),watch({track:e,action:t,context:n,prop:i}){e([()=>n.get("value")],()=>{t(["syncInputValue"])}),e([()=>i("edit")],()=>{t(["toggleEditing"])})},computed:{submitOnEnter({prop:e}){let t=e("submitMode");return t==="both"||t==="enter"},submitOnBlur({prop:e}){let t=e("submitMode");return t==="both"||t==="blur"},isInteractive({prop:e}){return!(e("disabled")||e("readOnly"))}},on:{"VALUE.SET":{actions:["setValue"]}},states:{preview:{entry:["blurInput"],on:{"CONTROLLED.EDIT":{target:"edit",actions:["setPreviousValue","focusInput"]},EDIT:[{guard:"isEditControlled",actions:["invokeOnEdit"]},{target:"edit",actions:["setPreviousValue","focusInput","invokeOnEdit"]}]}},edit:{effects:["trackInteractOutside"],entry:["syncInputValue"],on:{"CONTROLLED.PREVIEW":[{guard:"isSubmitEvent",target:"preview",actions:["setPreviousValue","restoreFocus","invokeOnSubmit"]},{target:"preview",actions:["revertValue","restoreFocus","invokeOnCancel"]}],CANCEL:[{guard:"isEditControlled",actions:["invokeOnPreview"]},{target:"preview",actions:["revertValue","restoreFocus","invokeOnCancel","invokeOnPreview"]}],SUBMIT:[{guard:"isEditControlled",actions:["invokeOnPreview"]},{target:"preview",actions:["setPreviousValue","restoreFocus","invokeOnSubmit","invokeOnPreview"]}]}}},implementations:{guards:{isEditControlled:({prop:e})=>e("edit")!=null,isSubmitEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="SUBMIT"}},effects:{trackInteractOutside({send:e,scope:t,prop:n,computed:i}){return Ws(ha(t),{exclude(r){return[mS(t),fS(t)].some(a=>ce(a,r))},onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onInteractOutside(r){var a;if((a=n("onInteractOutside"))==null||a(r),r.defaultPrevented)return;let{focusable:s}=r.detail;e({type:i("submitOnBlur")?"SUBMIT":"CANCEL",src:"interact-outside",focusable:s})}})}},actions:{restoreFocus({event:e,scope:t,prop:n}){e.focusable||H(()=>{var r,s;let i=(s=(r=n("finalFocusEl"))==null?void 0:r())!=null?s:vS(t);i==null||i.focus({preventScroll:!0})})},clearValue({context:e}){e.set("value","")},focusInputIfNeeded({action:e,prop:t}){(t("edit")||t("defaultEdit"))&&e(["focusInput"])},focusInput({scope:e,prop:t}){H(()=>{let n=ha(e);n&&(t("selectOnFocus")?n.select():n.focus({preventScroll:!0}))})},invokeOnCancel({prop:e,context:t}){var i;let n=t.get("previousValue");(i=e("onValueRevert"))==null||i({value:n})},invokeOnSubmit({prop:e,context:t}){var i;let n=t.get("value");(i=e("onValueCommit"))==null||i({value:n})},invokeOnEdit({prop:e}){var t;(t=e("onEditChange"))==null||t({edit:!0})},invokeOnPreview({prop:e}){var t;(t=e("onEditChange"))==null||t({edit:!1})},toggleEditing({prop:e,send:t,event:n}){t({type:e("edit")?"CONTROLLED.EDIT":"CONTROLLED.PREVIEW",previousEvent:n})},syncInputValue({context:e,scope:t}){let n=ha(t);n&&Me(n,e.get("value"))},setValue({context:e,prop:t,event:n}){let i=t("maxLength"),r=i!=null?n.value.slice(0,i):n.value;e.set("value",r)},setPreviousValue({context:e}){e.set("previousValue",e.get("value"))},revertValue({context:e}){let t=e.get("previousValue");t&&e.set("value",t)},blurInput({scope:e}){var t;(t=ha(e))==null||t.blur()}}}},ES=_()(["activationMode","autoResize","dir","disabled","finalFocusEl","form","getRootNode","id","ids","invalid","maxLength","name","onEditChange","onFocusOutside","onInteractOutside","onPointerDownOutside","onValueChange","onValueCommit","onValueRevert","placeholder","readOnly","required","selectOnFocus","edit","defaultEdit","submitMode","translations","defaultValue","value"]),Bx=B(ES),IS=class extends K{initMachine(e){return new W(bS,e)}initApi(){return yS(this.machine.service,q)}render(){var l;let e=(l=this.el.querySelector('[data-scope="editable"][data-part="root"]'))!=null?l:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="editable"][data-part="area"]');t&&this.spreadProps(t,this.api.getAreaProps());let n=this.el.querySelector('[data-scope="editable"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps());let i=this.el.querySelector('[data-scope="editable"][data-part="input"]');i&&this.spreadProps(i,this.api.getInputProps());let r=this.el.querySelector('[data-scope="editable"][data-part="preview"]');r&&this.spreadProps(r,this.api.getPreviewProps());let s=this.el.querySelector('[data-scope="editable"][data-part="edit-trigger"]');s&&this.spreadProps(s,this.api.getEditTriggerProps());let a=this.el.querySelector('[data-scope="editable"][data-part="submit-trigger"]');a&&this.spreadProps(a,this.api.getSubmitTriggerProps());let o=this.el.querySelector('[data-scope="editable"][data-part="cancel-trigger"]');o&&this.spreadProps(o,this.api.getCancelTriggerProps())}},PS={mounted(){let e=this.el,t=w(e,"value"),n=w(e,"defaultValue"),i=C(e,"controlled"),r=w(e,"placeholder"),s=w(e,"activationMode"),a=C(e,"selectOnFocus"),o=new IS(e,y(g(g(g(g(y(g({id:e.id},i&&t!==void 0?{value:t}:{defaultValue:n!=null?n:""}),{disabled:C(e,"disabled"),readOnly:C(e,"readOnly"),required:C(e,"required"),invalid:C(e,"invalid"),name:w(e,"name"),form:w(e,"form"),dir:Oe(e)}),r!==void 0?{placeholder:r}:{}),s!==void 0?{activationMode:s}:{}),a!==void 0?{selectOnFocus:a}:{}),C(e,"controlledEdit")?{edit:C(e,"edit")}:{defaultEdit:C(e,"defaultEdit")}),{onValueChange:l=>{let c=e.querySelector('[data-scope="editable"][data-part="input"]');c&&(c.value=l.value,c.dispatchEvent(new Event("input",{bubbles:!0})),c.dispatchEvent(new Event("change",{bubbles:!0})));let d=w(e,"onValueChange");d&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(d,{value:l.value,id:e.id});let h=w(e,"onValueChangeClient");h&&e.dispatchEvent(new CustomEvent(h,{bubbles:!0,detail:{value:l,id:e.id}}))}}));o.init(),this.editable=o,this.handlers=[]},updated(){var n;let e=w(this.el,"value"),t=C(this.el,"controlled");(n=this.editable)==null||n.updateProps(y(g({id:this.el.id},t&&e!==void 0?{value:e}:{}),{disabled:C(this.el,"disabled"),readOnly:C(this.el,"readOnly"),required:C(this.el,"required"),invalid:C(this.el,"invalid"),name:w(this.el,"name"),form:w(this.el,"form")}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.editable)==null||e.destroy()}}});var Vg={};he(Vg,{FloatingPanel:()=>RS});function TS(e){switch(e){case"n":return{cursor:"n-resize",width:"100%",top:0,left:"50%",translate:"-50%"};case"e":return{cursor:"e-resize",height:"100%",right:0,top:"50%",translate:"0 -50%"};case"s":return{cursor:"s-resize",width:"100%",bottom:0,left:"50%",translate:"-50%"};case"w":return{cursor:"w-resize",height:"100%",left:0,top:"50%",translate:"0 -50%"};case"se":return{cursor:"se-resize",bottom:0,right:0};case"sw":return{cursor:"sw-resize",bottom:0,left:0};case"ne":return{cursor:"ne-resize",top:0,right:0};case"nw":return{cursor:"nw-resize",top:0,left:0};default:throw new Error(`Invalid axis: ${e}`)}}function OS(e,t){let{state:n,send:i,scope:r,prop:s,computed:a,context:o}=e,l=n.hasTag("open"),c=n.matches("open.dragging"),d=n.matches("open.resizing"),h=o.get("isTopmost"),m=o.get("size"),u=o.get("position"),p=a("isMaximized"),v=a("isMinimized"),I=a("isStaged"),T=a("canResize"),O=a("canDrag");return{open:l,resizable:s("resizable"),draggable:s("draggable"),setOpen(b){n.hasTag("open")!==b&&i({type:b?"OPEN":"CLOSE"})},dragging:c,resizing:d,position:u,size:m,setPosition(b){i({type:"SET_POSITION",position:b})},setSize(b){i({type:"SET_SIZE",size:b})},minimize(){i({type:"MINIMIZE"})},maximize(){i({type:"MAXIMIZE"})},restore(){i({type:"RESTORE"})},getTriggerProps(){return t.button(y(g({},St.trigger.attrs),{dir:s("dir"),type:"button",disabled:s("disabled"),id:Tg(r),"data-state":l?"open":"closed","data-dragging":E(c),"aria-controls":Sl(r),onClick(b){if(b.defaultPrevented||s("disabled"))return;let f=n.hasTag("open");i({type:f?"CLOSE":"OPEN",src:"trigger"})}}))},getPositionerProps(){return t.element(y(g({},St.positioner.attrs),{dir:s("dir"),id:Og(r),style:{"--width":ye(m==null?void 0:m.width),"--height":ye(m==null?void 0:m.height),"--x":ye(u==null?void 0:u.x),"--y":ye(u==null?void 0:u.y),position:s("strategy"),top:"var(--y)",left:"var(--x)"}}))},getContentProps(){return t.element(y(g({},St.content.attrs),{dir:s("dir"),role:"dialog",tabIndex:0,hidden:!l,id:Sl(r),"aria-labelledby":yg(r),"data-state":l?"open":"closed","data-dragging":E(c),"data-topmost":E(h),"data-behind":E(!h),"data-minimized":E(v),"data-maximized":E(p),"data-staged":E(I),style:{width:"var(--width)",height:"var(--height)",overflow:v?"hidden":void 0},onFocus(){i({type:"CONTENT_FOCUS"})},onKeyDown(b){if(b.defaultPrevented||b.currentTarget!==j(b))return;let f=gi(b)*s("gridSize"),P={Escape(){h&&i({type:"ESCAPE"})},ArrowLeft(){i({type:"MOVE",direction:"left",step:f})},ArrowRight(){i({type:"MOVE",direction:"right",step:f})},ArrowUp(){i({type:"MOVE",direction:"up",step:f})},ArrowDown(){i({type:"MOVE",direction:"down",step:f})}}[ge(b,{dir:s("dir")})];P&&(b.preventDefault(),P(b))}}))},getCloseTriggerProps(){return t.button(y(g({},St.closeTrigger.attrs),{dir:s("dir"),disabled:s("disabled"),"aria-label":"Close Window",type:"button",onClick(b){b.defaultPrevented||i({type:"CLOSE"})}}))},getStageTriggerProps(b){if(!Pg.has(b.stage))throw new Error(`[zag-js] Invalid stage: ${b.stage}. Must be one of: ${Array.from(Pg).join(", ")}`);let f=s("translations"),S=Ce(b.stage,{minimized:()=>({"aria-label":f.minimize,hidden:I}),maximized:()=>({"aria-label":f.maximize,hidden:I}),default:()=>({"aria-label":f.restore,hidden:!I})});return t.button(y(g(y(g({},St.stageTrigger.attrs),{dir:s("dir"),disabled:s("disabled"),"data-stage":b.stage}),S),{type:"button",onClick(P){if(P.defaultPrevented||!s("resizable"))return;let V=Ce(b.stage,{minimized:()=>"MINIMIZE",maximized:()=>"MAXIMIZE",default:()=>"RESTORE"});i({type:V.toUpperCase()})}}))},getResizeTriggerProps(b){return t.element(y(g({},St.resizeTrigger.attrs),{dir:s("dir"),"data-disabled":E(!T),"data-axis":b.axis,onPointerDown(f){T&&pe(f)&&(f.currentTarget.setPointerCapture(f.pointerId),f.stopPropagation(),i({type:"RESIZE_START",axis:b.axis,position:{x:f.clientX,y:f.clientY}}))},onPointerUp(f){if(!T)return;let S=f.currentTarget;S.hasPointerCapture(f.pointerId)&&S.releasePointerCapture(f.pointerId)},style:g({position:"absolute",touchAction:"none"},TS(b.axis))}))},getDragTriggerProps(){return t.element(y(g({},St.dragTrigger.attrs),{dir:s("dir"),"data-disabled":E(!O),onPointerDown(b){if(!O||!pe(b))return;let f=j(b);f!=null&&f.closest("button")||f!=null&&f.closest("[data-no-drag]")||(b.currentTarget.setPointerCapture(b.pointerId),b.stopPropagation(),i({type:"DRAG_START",pointerId:b.pointerId,position:{x:b.clientX,y:b.clientY}}))},onPointerUp(b){if(!O)return;let f=b.currentTarget;f.hasPointerCapture(b.pointerId)&&f.releasePointerCapture(b.pointerId)},onDoubleClick(b){b.defaultPrevented||s("resizable")&&i({type:I?"RESTORE":"MAXIMIZE"})},style:{WebkitUserSelect:"none",userSelect:"none",touchAction:"none",cursor:"move"}}))},getControlProps(){return t.element(y(g({},St.control.attrs),{dir:s("dir"),"data-disabled":E(s("disabled")),"data-stage":o.get("stage"),"data-minimized":E(v),"data-maximized":E(p),"data-staged":E(I)}))},getTitleProps(){return t.element(y(g({},St.title.attrs),{dir:s("dir"),id:yg(r)}))},getHeaderProps(){return t.element(y(g({},St.header.attrs),{dir:s("dir"),id:wg(r),"data-dragging":E(c),"data-topmost":E(h),"data-behind":E(!h),"data-minimized":E(v),"data-maximized":E(p),"data-staged":E(I)}))},getBodyProps(){return t.element(y(g({},St.body.attrs),{dir:s("dir"),"data-dragging":E(c),"data-minimized":E(v),"data-maximized":E(p),"data-staged":E(I),hidden:v}))}}}function ga(e){if(e)try{let t=JSON.parse(e);if(typeof t.width=="number"&&typeof t.height=="number")return{width:t.width,height:t.height}}catch(t){}}function Sg(e){if(e)try{let t=JSON.parse(e);if(typeof t.x=="number"&&typeof t.y=="number")return{x:t.x,y:t.y}}catch(t){}}var CS,St,Tg,Og,Sl,yg,wg,bg,Eg,Ig,SS,wn,Pg,kr,Cg,wS,VS,xS,AS,Wx,kS,Kx,NS,RS,xg=re(()=>{"use strict";Cs();se();CS=U("floating-panel").parts("trigger","positioner","content","header","body","title","resizeTrigger","dragTrigger","stageTrigger","closeTrigger","control"),St=CS.build(),Tg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`float:${e.id}:trigger`},Og=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`float:${e.id}:positioner`},Sl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`float:${e.id}:content`},yg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`float:${e.id}:title`},wg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.header)!=null?n:`float:${e.id}:header`},bg=e=>e.getById(Tg(e)),Eg=e=>e.getById(Og(e)),Ig=e=>e.getById(Sl(e)),SS=e=>e.getById(wg(e)),wn=(e,t,n)=>{let i;return le(t)?i=po(t):i=Cd(e.getWin()),n&&(i=bn({x:-i.width,y:i.minY,width:i.width*3,height:i.height*2})),fn(i,["x","y","width","height"])};Pg=new Set(["minimized","maximized","default"]);kr=ys({stack:[],count(){return this.stack.length},add(e){this.stack.includes(e)||this.stack.push(e)},remove(e){let t=this.stack.indexOf(e);t<0||this.stack.splice(t,1)},bringToFront(e){this.remove(e),this.add(e)},isTopmost(e){return this.stack[this.stack.length-1]===e},indexOf(e){return this.stack.indexOf(e)}}),{not:Cg,and:wS}=Ee(),VS={minimize:"Minimize window",maximize:"Maximize window",restore:"Restore window"},xS={props({props:e}){return yn(e,["id"],"floating-panel"),y(g({strategy:"fixed",gridSize:1,defaultSize:{width:320,height:240},defaultPosition:{x:300,y:100},allowOverflow:!0,resizable:!0,draggable:!0},e),{hasSpecifiedPosition:!!e.defaultPosition||!!e.position,translations:g(g({},VS),e.translations)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({prop:e,bindable:t}){return{size:t(()=>({defaultValue:e("defaultSize"),value:e("size"),isEqual:Id,sync:!0,hash(n){return`W:${n.width} H:${n.height}`},onChange(n){var i;(i=e("onSizeChange"))==null||i({size:n})}})),position:t(()=>({defaultValue:e("defaultPosition"),value:e("position"),isEqual:Pd,sync:!0,hash(n){return`X:${n.x} Y:${n.y}`},onChange(n){var i;(i=e("onPositionChange"))==null||i({position:n})}})),stage:t(()=>({defaultValue:"default",onChange(n){var i;(i=e("onStageChange"))==null||i({stage:n})}})),lastEventPosition:t(()=>({defaultValue:null})),prevPosition:t(()=>({defaultValue:null})),prevSize:t(()=>({defaultValue:null})),isTopmost:t(()=>({defaultValue:void 0}))}},computed:{isMaximized:({context:e})=>e.get("stage")==="maximized",isMinimized:({context:e})=>e.get("stage")==="minimized",isStaged:({context:e})=>e.get("stage")!=="default",canResize:({context:e,prop:t})=>t("resizable")&&!t("disabled")&&e.get("stage")==="default",canDrag:({prop:e,computed:t})=>e("draggable")&&!e("disabled")&&!t("isMaximized")},watch({track:e,context:t,action:n,prop:i}){e([()=>t.hash("position")],()=>{n(["setPositionStyle"])}),e([()=>t.hash("size")],()=>{n(["setSizeStyle"])}),e([()=>i("open")],()=>{n(["toggleVisibility"])})},effects:["trackPanelStack"],on:{CONTENT_FOCUS:{actions:["bringToFrontOfPanelStack"]},SET_POSITION:{actions:["setPosition"]},SET_SIZE:{actions:["setSize"]}},states:{closed:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open",actions:["setAnchorPosition","setPositionStyle","setSizeStyle","focusContentEl"]},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setAnchorPosition","setPositionStyle","setSizeStyle","focusContentEl"]}]}},open:{tags:["open"],entry:["bringToFrontOfPanelStack"],effects:["trackBoundaryRect"],on:{DRAG_START:{guard:Cg("isMaximized"),target:"open.dragging",actions:["setPrevPosition"]},RESIZE_START:{guard:Cg("isMinimized"),target:"open.resizing",actions:["setPrevSize"]},"CONTROLLED.CLOSE":{target:"closed",actions:["resetRect","focusTriggerEl"]},CLOSE:[{guard:"isOpenControlled",target:"closed",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","resetRect","focusTriggerEl"]}],ESCAPE:[{guard:wS("isOpenControlled","closeOnEsc"),actions:["invokeOnClose"]},{guard:"closeOnEsc",target:"closed",actions:["invokeOnClose","resetRect","focusTriggerEl"]}],MINIMIZE:{actions:["setMinimized"]},MAXIMIZE:{actions:["setMaximized"]},RESTORE:{actions:["setRestored"]},MOVE:{actions:["setPositionFromKeyboard"]}}},"open.dragging":{tags:["open"],effects:["trackPointerMove"],exit:["clearPrevPosition"],on:{DRAG:{actions:["setPosition"]},DRAG_END:{target:"open",actions:["invokeOnDragEnd"]},"CONTROLLED.CLOSE":{target:"closed",actions:["resetRect"]},CLOSE:[{guard:"isOpenControlled",target:"closed",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","resetRect"]}],ESCAPE:{target:"open"}}},"open.resizing":{tags:["open"],effects:["trackPointerMove"],exit:["clearPrevSize"],on:{DRAG:{actions:["setSize"]},DRAG_END:{target:"open",actions:["invokeOnResizeEnd"]},"CONTROLLED.CLOSE":{target:"closed",actions:["resetRect"]},CLOSE:[{guard:"isOpenControlled",target:"closed",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","resetRect"]}],ESCAPE:{target:"open"}}}},implementations:{guards:{closeOnEsc:({prop:e})=>!!e("closeOnEscape"),isMaximized:({context:e})=>e.get("stage")==="maximized",isMinimized:({context:e})=>e.get("stage")==="minimized",isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPointerMove({scope:e,send:t,event:n,prop:i}){var o;let r=e.getDoc(),s=(o=i("getBoundaryEl"))==null?void 0:o(),a=wn(e,s,!1);return hn(r,{onPointerMove({point:l,event:c}){let{altKey:d,shiftKey:h}=c,m=He(l.x,a.x,a.x+a.width),u=He(l.y,a.y,a.y+a.height);t({type:"DRAG",position:{x:m,y:u},axis:n.axis,altKey:d,shiftKey:h})},onPointerUp(){t({type:"DRAG_END"})}})},trackBoundaryRect({context:e,scope:t,prop:n,computed:i}){var l;let r=t.getWin(),s=!0,a=()=>{var h;if(s){s=!1;return}let c=(h=n("getBoundaryEl"))==null?void 0:h(),d=wn(t,c,!1);if(!i("isMaximized")){let m=g(g({},e.get("position")),e.get("size"));d=Ed(m,d)}e.set("size",fn(d,["width","height"])),e.set("position",fn(d,["x","y"]))},o=(l=n("getBoundaryEl"))==null?void 0:l();return le(o)?gn.observe(o,a):ee(r,"resize",a)},trackPanelStack({context:e,scope:t}){let n=ns(kr,()=>{e.set("isTopmost",kr.isTopmost(t.id));let i=Ig(t);if(!i)return;let r=kr.indexOf(t.id);r!==-1&&i.style.setProperty("--z-index",`${r+1}`)});return()=>{kr.remove(t.id),n()}}},actions:{setAnchorPosition({context:e,prop:t,scope:n}){if(t("hasSpecifiedPosition"))return;let i=e.get("prevPosition")||e.get("prevSize");t("persistRect")&&i||H(()=>{var o,l;let r=bg(n),s=wn(n,(o=t("getBoundaryEl"))==null?void 0:o(),!1),a=(l=t("getAnchorPosition"))==null?void 0:l({triggerRect:r?DOMRect.fromRect(po(r)):null,boundaryRect:DOMRect.fromRect(s)});if(!a){let c=e.get("size");a={x:s.x+(s.width-c.width)/2,y:s.y+(s.height-c.height)/2}}a&&e.set("position",a)})},setPrevPosition({context:e,event:t}){e.set("prevPosition",g({},e.get("position"))),e.set("lastEventPosition",t.position)},clearPrevPosition({context:e,prop:t}){t("persistRect")||e.set("prevPosition",null),e.set("lastEventPosition",null)},setPosition({context:e,event:t,prop:n,scope:i}){var c;let r=go(t.position,e.get("lastEventPosition"));r.x=Math.round(r.x/n("gridSize"))*n("gridSize"),r.y=Math.round(r.y/n("gridSize"))*n("gridSize");let s=e.get("prevPosition");if(!s)return;let a=bd(s,r),o=(c=n("getBoundaryEl"))==null?void 0:c(),l=wn(i,o,n("allowOverflow"));a=hr(a,e.get("size"),l),e.set("position",a)},setPositionStyle({scope:e,context:t}){let n=Eg(e),i=t.get("position");n==null||n.style.setProperty("--x",`${i.x}px`),n==null||n.style.setProperty("--y",`${i.y}px`)},resetRect({context:e,prop:t}){e.set("stage","default"),t("persistRect")||(e.set("position",e.initial("position")),e.set("size",e.initial("size")))},setPrevSize({context:e,event:t}){e.set("prevSize",g({},e.get("size"))),e.set("prevPosition",g({},e.get("position"))),e.set("lastEventPosition",t.position)},clearPrevSize({context:e}){e.set("prevSize",null),e.set("prevPosition",null),e.set("lastEventPosition",null)},setSize({context:e,event:t,scope:n,prop:i}){var p;let r=e.get("prevSize"),s=e.get("prevPosition"),a=e.get("lastEventPosition");if(!r||!s||!a)return;let o=bn(g(g({},s),r)),l=go(t.position,a),c=Td(o,l,t.axis,{scalingOriginMode:t.altKey?"center":"extent",lockAspectRatio:!!i("lockAspectRatio")||t.shiftKey}),d=fn(c,["width","height"]),h=fn(c,["x","y"]),m=(p=i("getBoundaryEl"))==null?void 0:p(),u=wn(n,m,!1);if(d=gr(d,i("minSize"),i("maxSize")),d=gr(d,i("minSize"),u),e.set("size",d),h){let v=hr(h,d,u);e.set("position",v)}},setSizeStyle({scope:e,context:t}){queueMicrotask(()=>{let n=Eg(e),i=t.get("size");n==null||n.style.setProperty("--width",`${i.width}px`),n==null||n.style.setProperty("--height",`${i.height}px`)})},setMaximized({context:e,prop:t,scope:n}){var s;e.set("stage","maximized"),e.set("prevSize",e.get("size")),e.set("prevPosition",e.get("position"));let i=(s=t("getBoundaryEl"))==null?void 0:s(),r=wn(n,i,!1);e.set("position",fn(r,["x","y"])),e.set("size",fn(r,["height","width"]))},setMinimized({context:e,scope:t}){e.set("stage","minimized"),e.set("prevSize",e.get("size")),e.set("prevPosition",e.get("position"));let n=SS(t);if(!n)return;let i=y(g({},e.get("size")),{height:n==null?void 0:n.offsetHeight});e.set("size",i)},setRestored({context:e,prop:t,scope:n}){var s;let i=wn(n,(s=t("getBoundaryEl"))==null?void 0:s(),!1);e.set("stage","default");let r=e.get("prevSize");if(r){let a=r;a=gr(a,t("minSize"),t("maxSize")),a=gr(a,t("minSize"),i),e.set("size",a),e.set("prevSize",null)}if(e.get("prevPosition")){let a=e.get("prevPosition");a=hr(a,e.get("size"),i),e.set("position",a),e.set("prevPosition",null)}},setPositionFromKeyboard({context:e,event:t,prop:n,scope:i}){var c;vs(t.step==null,"step is required");let r=e.get("position"),s=t.step,a=Ce(t.direction,{left:{x:r.x-s,y:r.y},right:{x:r.x+s,y:r.y},up:{x:r.x,y:r.y-s},down:{x:r.x,y:r.y+s}}),o=(c=n("getBoundaryEl"))==null?void 0:c(),l=wn(i,o,!1);a=hr(a,e.get("size"),l),e.set("position",a)},bringToFrontOfPanelStack({prop:e}){kr.bringToFront(e("id"))},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnDragEnd({context:e,prop:t}){var n;(n=t("onPositionChangeEnd"))==null||n({position:e.get("position")})},invokeOnResizeEnd({context:e,prop:t}){var n;(n=t("onSizeChangeEnd"))==null||n({size:e.get("size")})},focusTriggerEl({scope:e}){H(()=>{var t;(t=bg(e))==null||t.focus()})},focusContentEl({scope:e}){H(()=>{var t;(t=Ig(e))==null||t.focus()})},toggleVisibility({send:e,prop:t,event:n}){e({type:t("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}},AS=_()(["allowOverflow","closeOnEscape","defaultOpen","defaultPosition","defaultSize","dir","disabled","draggable","getAnchorPosition","getBoundaryEl","getRootNode","gridSize","id","ids","lockAspectRatio","maxSize","minSize","onOpenChange","onPositionChange","onPositionChangeEnd","onSizeChange","onSizeChangeEnd","onStageChange","open","persistRect","position","resizable","size","strategy","translations"]),Wx=B(AS),kS=_()(["axis"]),Kx=B(kS),NS=class extends K{initMachine(e){return new W(xS,e)}initApi(){return OS(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="floating-panel"][data-part="trigger"]');e&&this.spreadProps(e,this.api.getTriggerProps());let t=this.el.querySelector('[data-scope="floating-panel"][data-part="positioner"]');t&&this.spreadProps(t,this.api.getPositionerProps());let n=this.el.querySelector('[data-scope="floating-panel"][data-part="content"]');n&&this.spreadProps(n,this.api.getContentProps());let i=this.el.querySelector('[data-scope="floating-panel"][data-part="title"]');i&&this.spreadProps(i,this.api.getTitleProps());let r=this.el.querySelector('[data-scope="floating-panel"][data-part="header"]');r&&this.spreadProps(r,this.api.getHeaderProps());let s=this.el.querySelector('[data-scope="floating-panel"][data-part="body"]');s&&this.spreadProps(s,this.api.getBodyProps());let a=this.el.querySelector('[data-scope="floating-panel"][data-part="drag-trigger"]');a&&this.spreadProps(a,this.api.getDragTriggerProps()),["s","w","e","n","sw","nw","se","ne"].forEach(h=>{let m=this.el.querySelector(`[data-scope="floating-panel"][data-part="resize-trigger"][data-axis="${h}"]`);m&&this.spreadProps(m,this.api.getResizeTriggerProps({axis:h}))});let l=this.el.querySelector('[data-scope="floating-panel"][data-part="close-trigger"]');l&&this.spreadProps(l,this.api.getCloseTriggerProps());let c=this.el.querySelector('[data-scope="floating-panel"][data-part="control"]');c&&this.spreadProps(c,this.api.getControlProps()),["minimized","maximized","default"].forEach(h=>{let m=this.el.querySelector(`[data-scope="floating-panel"][data-part="stage-trigger"][data-stage="${h}"]`);m&&this.spreadProps(m,this.api.getStageTriggerProps({stage:h}))})}};RS={mounted(){let e=this.el,t=C(e,"open"),n=C(e,"defaultOpen"),i=C(e,"controlled"),r=ga(e.dataset.size),s=ga(e.dataset.defaultSize),a=Sg(e.dataset.position),o=Sg(e.dataset.defaultPosition),l=new NS(e,y(g({id:e.id},i?{open:t}:{defaultOpen:n}),{draggable:C(e,"draggable")!==!1,resizable:C(e,"resizable")!==!1,allowOverflow:C(e,"allowOverflow")!==!1,closeOnEscape:C(e,"closeOnEscape")!==!1,disabled:C(e,"disabled"),dir:Oe(e),size:r,defaultSize:s,position:a,defaultPosition:o,minSize:ga(e.dataset.minSize),maxSize:ga(e.dataset.maxSize),persistRect:C(e,"persistRect"),gridSize:Number(e.dataset.gridSize)||1,onOpenChange:c=>{let d=w(e,"onOpenChange");d&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(d,{open:c.open,id:e.id});let h=w(e,"onOpenChangeClient");h&&e.dispatchEvent(new CustomEvent(h,{bubbles:!0,detail:{value:c,id:e.id}}))},onPositionChange:c=>{let d=w(e,"onPositionChange");d&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(d,{position:c.position,id:e.id})},onSizeChange:c=>{let d=w(e,"onSizeChange");d&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(d,{size:c.size,id:e.id})},onStageChange:c=>{let d=w(e,"onStageChange");d&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(d,{stage:c.stage,id:e.id})}}));l.init(),this.floatingPanel=l,this.handlers=[]},updated(){var n;let e=C(this.el,"open"),t=C(this.el,"controlled");(n=this.floatingPanel)==null||n.updateProps(y(g({id:this.el.id},t?{open:e}:{}),{disabled:C(this.el,"disabled"),dir:Oe(this.el)}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.floatingPanel)==null||e.destroy()}}});var Dg={};he(Dg,{Listbox:()=>jS});function $S(e,t){let{context:n,prop:i,scope:r,computed:s,send:a,refs:o}=e,l=i("disabled"),c=i("collection"),d=Cn(c)?"grid":"list",h=n.get("focused"),m=o.get("focusVisible")&&h,u=o.get("inputState"),p=n.get("value"),v=n.get("selectedItems"),I=n.get("highlightedValue"),T=n.get("highlightedItem"),O=s("isTypingAhead"),b=s("isInteractive"),f=I?Ol(r,I):void 0;function S(P){let V=c.getItemDisabled(P.item),A=c.getItemValue(P.item);vn(A,()=>`[zag-js] No value found for item ${JSON.stringify(P.item)}`);let x=I===A;return{value:A,disabled:!!(l||V),focused:x&&h,focusVisible:x&&m,highlighted:x&&(u.focused?h:m),selected:n.get("value").includes(A)}}return{empty:p.length===0,highlightedItem:T,highlightedValue:I,clearHighlightedValue(){a({type:"HIGHLIGHTED_VALUE.SET",value:null})},selectedItems:v,hasSelectedItems:s("hasSelectedItems"),value:p,valueAsString:s("valueAsString"),collection:c,disabled:!!l,selectValue(P){a({type:"ITEM.SELECT",value:P})},setValue(P){a({type:"VALUE.SET",value:P})},selectAll(){if(!s("multiple"))throw new Error("[zag-js] Cannot select all items in a single-select listbox");a({type:"VALUE.SET",value:c.getValues()})},highlightValue(P){a({type:"HIGHLIGHTED_VALUE.SET",value:P})},clearValue(P){a(P?{type:"ITEM.CLEAR",value:P}:{type:"VALUE.CLEAR"})},getItemState:S,getRootProps(){return t.element(y(g({},Ht.root.attrs),{dir:i("dir"),id:MS(r),"data-orientation":i("orientation"),"data-disabled":E(l)}))},getInputProps(P={}){return t.input(y(g({},Ht.input.attrs),{dir:i("dir"),disabled:l,"data-disabled":E(l),autoComplete:"off",autoCorrect:"off","aria-haspopup":"listbox","aria-controls":Tl(r),"aria-autocomplete":"list","aria-activedescendant":f,spellCheck:!1,enterKeyHint:"go",onFocus(){queueMicrotask(()=>{a({type:"INPUT.FOCUS",autoHighlight:!!(P!=null&&P.autoHighlight)})})},onBlur(){a({type:"CONTENT.BLUR",src:"input"})},onInput(V){P!=null&&P.autoHighlight&&(V.currentTarget.value.trim()||queueMicrotask(()=>{a({type:"HIGHLIGHTED_VALUE.SET",value:null})}))},onKeyDown(V){if(V.defaultPrevented||Re(V))return;let A=Yt(V),x=()=>{var D;V.preventDefault();let k=r.getWin(),N=new k.KeyboardEvent(A.type,A);(D=pa(r))==null||D.dispatchEvent(N)};switch(A.key){case"ArrowLeft":case"ArrowRight":{if(!Cn(c)||V.ctrlKey)return;x()}case"Home":case"End":{if(I==null&&V.shiftKey)return;x()}case"ArrowDown":case"ArrowUp":{x();break}case"Enter":I!=null&&(V.preventDefault(),a({type:"ITEM.CLICK",value:I}));break}}}))},getLabelProps(){return t.element(y(g({dir:i("dir"),id:Ag(r)},Ht.label.attrs),{"data-disabled":E(l)}))},getValueTextProps(){return t.element(y(g({},Ht.valueText.attrs),{dir:i("dir"),"data-disabled":E(l)}))},getItemProps(P){let V=S(P);return t.element(y(g({id:Ol(r,V.value),role:"option"},Ht.item.attrs),{dir:i("dir"),"data-value":V.value,"aria-selected":V.selected,"data-selected":E(V.selected),"data-layout":d,"data-state":V.selected?"checked":"unchecked","data-orientation":i("orientation"),"data-highlighted":E(V.highlighted),"data-disabled":E(V.disabled),"aria-disabled":X(V.disabled),onPointerMove(A){P.highlightOnHover&&(V.disabled||A.pointerType!=="mouse"||V.highlighted||a({type:"ITEM.POINTER_MOVE",value:V.value}))},onMouseDown(A){var x;A.preventDefault(),(x=pa(r))==null||x.focus()},onClick(A){A.defaultPrevented||V.disabled||a({type:"ITEM.CLICK",value:V.value,shiftKey:A.shiftKey,anchorValue:I,metaKey:ls(A)})}}))},getItemTextProps(P){let V=S(P);return t.element(y(g({},Ht.itemText.attrs),{"data-state":V.selected?"checked":"unchecked","data-disabled":E(V.disabled),"data-highlighted":E(V.highlighted)}))},getItemIndicatorProps(P){let V=S(P);return t.element(y(g({},Ht.itemIndicator.attrs),{"aria-hidden":!0,"data-state":V.selected?"checked":"unchecked",hidden:!V.selected}))},getItemGroupLabelProps(P){let{htmlFor:V}=P;return t.element(y(g({},Ht.itemGroupLabel.attrs),{id:kg(r,V),dir:i("dir"),role:"presentation"}))},getItemGroupProps(P){let{id:V}=P;return t.element(y(g({},Ht.itemGroup.attrs),{"data-disabled":E(l),"data-orientation":i("orientation"),"data-empty":E(c.size===0),id:FS(r,V),"aria-labelledby":kg(r,V),role:"group",dir:i("dir")}))},getContentProps(){return t.element(y(g({dir:i("dir"),id:Tl(r),role:"listbox"},Ht.content.attrs),{"data-activedescendant":f,"aria-activedescendant":f,"data-orientation":i("orientation"),"aria-multiselectable":s("multiple")?!0:void 0,"aria-labelledby":Ag(r),tabIndex:0,"data-layout":d,"data-empty":E(c.size===0),style:{"--column-count":Cn(c)?c.columnCount:1},onFocus(){a({type:"CONTENT.FOCUS"})},onBlur(){a({type:"CONTENT.BLUR"})},onKeyDown(P){if(!b||!ce(P.currentTarget,j(P)))return;let V=P.shiftKey,A={ArrowUp(N){let D=null;Cn(c)&&I?D=c.getPreviousRowValue(I):I&&(D=c.getPreviousValue(I)),!D&&(i("loopFocus")||!I)&&(D=c.lastValue),D&&(N.preventDefault(),a({type:"NAVIGATE",value:D,shiftKey:V,anchorValue:I}))},ArrowDown(N){let D=null;Cn(c)&&I?D=c.getNextRowValue(I):I&&(D=c.getNextValue(I)),!D&&(i("loopFocus")||!I)&&(D=c.firstValue),D&&(N.preventDefault(),a({type:"NAVIGATE",value:D,shiftKey:V,anchorValue:I}))},ArrowLeft(){if(!Cn(c)&&i("orientation")==="vertical")return;let N=I?c.getPreviousValue(I):null;!N&&i("loopFocus")&&(N=c.lastValue),N&&(P.preventDefault(),a({type:"NAVIGATE",value:N,shiftKey:V,anchorValue:I}))},ArrowRight(){if(!Cn(c)&&i("orientation")==="vertical")return;let N=I?c.getNextValue(I):null;!N&&i("loopFocus")&&(N=c.firstValue),N&&(P.preventDefault(),a({type:"NAVIGATE",value:N,shiftKey:V,anchorValue:I}))},Home(N){N.preventDefault();let D=c.firstValue;a({type:"NAVIGATE",value:D,shiftKey:V,anchorValue:I})},End(N){N.preventDefault();let D=c.lastValue;a({type:"NAVIGATE",value:D,shiftKey:V,anchorValue:I})},Enter(){a({type:"ITEM.CLICK",value:I})},a(N){ls(N)&&s("multiple")&&!i("disallowSelectAll")&&(N.preventDefault(),a({type:"VALUE.SET",value:c.getValues()}))},Space(N){var D;O&&i("typeahead")?a({type:"CONTENT.TYPEAHEAD",key:N.key}):(D=A.Enter)==null||D.call(A,N)},Escape(N){i("deselectable")&&p.length>0&&(N.preventDefault(),N.stopPropagation(),a({type:"VALUE.CLEAR"}))}},x=A[ge(P)];if(x){x(P);return}let k=j(P);Ot(k)||Ue.isValidEvent(P)&&i("typeahead")&&(a({type:"CONTENT.TYPEAHEAD",key:P.key}),P.preventDefault())}}))}}}function Nr(e,t,n){let i=US(t,e);for(let r of i)n==null||n({value:r})}function Rg(e,t){return Bi(t?{items:e,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled,groupBy:n=>{var i;return(i=n.group)!=null?i:""}}:{items:e,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled})}var DS,Ht,Bi,LS,MS,Tl,Ag,Ol,FS,kg,pa,Ng,HS,BS,_S,GS,US,qS,Jx,WS,Qx,KS,eA,zS,tA,YS,jS,Lg=re(()=>{"use strict";pr();yr();se();DS=U("listbox").parts("label","input","item","itemText","itemIndicator","itemGroup","itemGroupLabel","content","root","valueText"),Ht=DS.build(),Bi=e=>new Nt(e);Bi.empty=()=>new Nt({items:[]});LS=e=>new Vo(e);LS.empty=()=>new Vo({items:[],columnCount:0});MS=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`select:${e.id}`},Tl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`select:${e.id}:content`},Ag=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`select:${e.id}:label`},Ol=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`select:${e.id}:option:${t}`},FS=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemGroup)==null?void 0:i.call(n,t))!=null?r:`select:${e.id}:optgroup:${t}`},kg=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemGroupLabel)==null?void 0:i.call(n,t))!=null?r:`select:${e.id}:optgroup-label:${t}`},pa=e=>e.getById(Tl(e)),Ng=(e,t)=>e.getById(Ol(e,t));({guards:HS,createMachine:BS}=dt()),{or:_S}=HS,GS=BS({props({props:e}){return g({loopFocus:!1,composite:!0,defaultValue:[],multiple:!1,typeahead:!0,collection:Bi.empty(),orientation:"vertical",selectionMode:"single"},e)},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:fe,onChange(n){var r;let i=e("collection").findMany(n);return(r=e("onValueChange"))==null?void 0:r({value:n,items:i})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),sync:!0,onChange(n){var i;(i=e("onHighlightChange"))==null||i({highlightedValue:n,highlightedItem:e("collection").find(n),highlightedIndex:e("collection").indexOf(n)})}})),highlightedItem:t(()=>({defaultValue:null})),selectedItems:t(()=>{var r,s;let n=(s=(r=e("value"))!=null?r:e("defaultValue"))!=null?s:[];return{defaultValue:e("collection").findMany(n)}}),focused:t(()=>({sync:!0,defaultValue:!1}))}},refs(){return{typeahead:g({},Ue.defaultOptions),focusVisible:!1,inputState:{autoHighlight:!1,focused:!1}}},computed:{hasSelectedItems:({context:e})=>e.get("value").length>0,isTypingAhead:({refs:e})=>e.get("typeahead").keysSoFar!=="",isInteractive:({prop:e})=>!e("disabled"),selection:({context:e,prop:t})=>{let n=new lu(e.get("value"));return n.selectionMode=t("selectionMode"),n.deselectable=!!t("deselectable"),n},multiple:({prop:e})=>e("selectionMode")==="multiple"||e("selectionMode")==="extended",valueAsString:({context:e,prop:t})=>t("collection").stringifyItems(e.get("selectedItems"))},initialState(){return"idle"},watch({context:e,prop:t,track:n,action:i}){n([()=>e.get("value").toString()],()=>{i(["syncSelectedItems"])}),n([()=>e.get("highlightedValue")],()=>{i(["syncHighlightedItem"])}),n([()=>t("collection").toString()],()=>{i(["syncHighlightedValue"])})},effects:["trackFocusVisible"],on:{"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedItem"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setSelectedItems"]},"VALUE.CLEAR":{actions:["clearSelectedItems"]}},states:{idle:{effects:["scrollToHighlightedItem"],on:{"INPUT.FOCUS":{actions:["setFocused","setInputState"]},"CONTENT.FOCUS":[{guard:_S("hasSelectedValue","hasHighlightedValue"),actions:["setFocused"]},{actions:["setFocused","setDefaultHighlightedValue"]}],"CONTENT.BLUR":{actions:["clearFocused","clearInputState"]},"ITEM.CLICK":{actions:["setHighlightedItem","selectHighlightedItem"]},"CONTENT.TYPEAHEAD":{actions:["setFocused","highlightMatchingItem"]},"ITEM.POINTER_MOVE":{actions:["highlightItem"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedItem"]},NAVIGATE:{actions:["setFocused","setHighlightedItem","selectWithKeyboard"]}}}},implementations:{guards:{hasSelectedValue:({context:e})=>e.get("value").length>0,hasHighlightedValue:({context:e})=>e.get("highlightedValue")!=null},effects:{trackFocusVisible:({scope:e,refs:t})=>{var n;return Pn({root:(n=e.getRootNode)==null?void 0:n.call(e),onChange(i){t.set("focusVisible",i.isFocusVisible)}})},scrollToHighlightedItem({context:e,prop:t,scope:n}){let i=s=>{let a=e.get("highlightedValue");if(a==null||jd()!=="keyboard")return;let l=pa(n),c=t("scrollToIndexFn");if(c){let h=t("collection").indexOf(a);c==null||c({index:h,immediate:s,getElement(){return Ng(n,a)}});return}let d=Ng(n,a);Xt(d,{rootEl:l,block:"nearest"})};return H(()=>i(!0)),ot(()=>pa(n),{defer:!0,attributes:["data-activedescendant"],callback(){i(!1)}})}},actions:{selectHighlightedItem({context:e,prop:t,event:n,computed:i}){var o;let r=(o=n.value)!=null?o:e.get("highlightedValue"),s=t("collection");if(r==null||!s.has(r))return;let a=i("selection");if(n.shiftKey&&i("multiple")&&n.anchorValue){let l=a.extendSelection(s,n.anchorValue,r);Nr(a,l,t("onSelect")),e.set("value",Array.from(l))}else{let l=a.select(s,r,n.metaKey);Nr(a,l,t("onSelect")),e.set("value",Array.from(l))}},selectWithKeyboard({context:e,prop:t,event:n,computed:i}){let r=i("selection"),s=t("collection");if(n.shiftKey&&i("multiple")&&n.anchorValue){let a=r.extendSelection(s,n.anchorValue,n.value);Nr(r,a,t("onSelect")),e.set("value",Array.from(a));return}if(t("selectOnHighlight")){let a=r.replaceSelection(s,n.value);Nr(r,a,t("onSelect")),e.set("value",Array.from(a))}},highlightItem({context:e,event:t}){e.set("highlightedValue",t.value)},highlightMatchingItem({context:e,prop:t,event:n,refs:i}){let r=t("collection").search(n.key,{state:i.get("typeahead"),currentValue:e.get("highlightedValue")});r!=null&&e.set("highlightedValue",r)},setHighlightedItem({context:e,event:t}){e.set("highlightedValue",t.value)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},selectItem({context:e,prop:t,event:n,computed:i}){let r=t("collection"),s=i("selection"),a=s.select(r,n.value);Nr(s,a,t("onSelect")),e.set("value",Array.from(a))},clearItem({context:e,event:t,computed:n}){let r=n("selection").deselect(t.value);e.set("value",Array.from(r))},setSelectedItems({context:e,event:t}){e.set("value",t.value)},clearSelectedItems({context:e}){e.set("value",[])},syncSelectedItems({context:e,prop:t}){let n=t("collection"),i=e.get("selectedItems"),s=e.get("value").map(a=>i.find(l=>n.getItemValue(l)===a)||n.find(a));e.set("selectedItems",s)},syncHighlightedItem({context:e,prop:t}){let n=t("collection"),i=e.get("highlightedValue"),r=i?n.find(i):null;e.set("highlightedItem",r)},syncHighlightedValue({context:e,prop:t,refs:n}){let i=t("collection"),r=e.get("highlightedValue"),{autoHighlight:s}=n.get("inputState");if(s){queueMicrotask(()=>{var a;e.set("highlightedValue",(a=t("collection").firstValue)!=null?a:null)});return}r!=null&&!i.has(r)&&queueMicrotask(()=>{e.set("highlightedValue",null)})},setFocused({context:e}){e.set("focused",!0)},setDefaultHighlightedValue({context:e,prop:t}){let i=t("collection").firstValue;i!=null&&e.set("highlightedValue",i)},clearFocused({context:e}){e.set("focused",!1)},setInputState({refs:e,event:t}){e.set("inputState",{autoHighlight:!!t.autoHighlight,focused:!0})},clearInputState({refs:e}){e.set("inputState",{autoHighlight:!1,focused:!1})}}}}),US=(e,t)=>{let n=new Set(e);for(let i of t)n.delete(i);return n};qS=_()(["collection","defaultHighlightedValue","defaultValue","dir","disabled","deselectable","disallowSelectAll","getRootNode","highlightedValue","id","ids","loopFocus","onHighlightChange","onSelect","onValueChange","orientation","scrollToIndexFn","selectionMode","selectOnHighlight","typeahead","value"]),Jx=B(qS),WS=_()(["item","highlightOnHover"]),Qx=B(WS),KS=_()(["id"]),eA=B(KS),zS=_()(["htmlFor"]),tA=B(zS),YS=class extends K{constructor(t,n){var r;super(t,n);Y(this,"_options",[]);Y(this,"hasGroups",!1);Y(this,"init",()=>{this.machine.start(),this.render(),this.machine.subscribe(()=>{this.api=this.initApi(),this.render()})});let i=n.collection;this._options=(r=i==null?void 0:i.items)!=null?r:[]}get options(){return Array.isArray(this._options)?this._options:[]}setOptions(t){this._options=Array.isArray(t)?t:[]}getCollection(){let t=this.options;return this.hasGroups?Bi({items:t,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled,groupBy:n=>{var i;return(i=n.group)!=null?i:""}}):Bi({items:t,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled})}initMachine(t){let n=this.getCollection.bind(this),i=t.collection;return new W(GS,y(g({},t),{get collection(){return i!=null?i:n()}}))}initApi(){return $S(this.machine.service,q)}applyItemProps(){let t=this.el.querySelector('[data-scope="listbox"][data-part="content"]');t&&(t.querySelectorAll('[data-scope="listbox"][data-part="item-group"]').forEach(n=>{var s;let i=(s=n.dataset.id)!=null?s:"";this.spreadProps(n,this.api.getItemGroupProps({id:i}));let r=n.querySelector('[data-scope="listbox"][data-part="item-group-label"]');r&&this.spreadProps(r,this.api.getItemGroupLabelProps({htmlFor:i}))}),t.querySelectorAll('[data-scope="listbox"][data-part="item"]').forEach(n=>{var o;let i=(o=n.dataset.value)!=null?o:"",r=this.options.find(l=>{var c,d;return String((d=(c=l.id)!=null?c:l.value)!=null?d:"")===String(i)});if(!r)return;this.spreadProps(n,this.api.getItemProps({item:r}));let s=n.querySelector('[data-scope="listbox"][data-part="item-text"]');s&&this.spreadProps(s,this.api.getItemTextProps({item:r}));let a=n.querySelector('[data-scope="listbox"][data-part="item-indicator"]');a&&this.spreadProps(a,this.api.getItemIndicatorProps({item:r}))}))}render(){var a;let t=(a=this.el.querySelector('[data-scope="listbox"][data-part="root"]'))!=null?a:this.el;this.spreadProps(t,this.api.getRootProps());let n=this.el.querySelector('[data-scope="listbox"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps());let i=this.el.querySelector('[data-scope="listbox"][data-part="value-text"]');i&&this.spreadProps(i,this.api.getValueTextProps());let r=this.el.querySelector('[data-scope="listbox"][data-part="input"]');r&&this.spreadProps(r,this.api.getInputProps());let s=this.el.querySelector('[data-scope="listbox"][data-part="content"]');s&&(this.spreadProps(s,this.api.getContentProps()),this.applyItemProps())}};jS={mounted(){var o;let e=this.el,t=JSON.parse((o=e.dataset.collection)!=null?o:"[]"),n=t.some(l=>l.group!==void 0),i=Z(e,"value"),r=Z(e,"defaultValue"),s=C(e,"controlled"),a=new YS(e,y(g({id:e.id,collection:Rg(t,n)},s&&i?{value:i}:{defaultValue:r!=null?r:[]}),{disabled:C(e,"disabled"),dir:w(e,"dir",["ltr","rtl"]),orientation:w(e,"orientation",["horizontal","vertical"]),loopFocus:C(e,"loopFocus"),selectionMode:w(e,"selectionMode",["single","multiple","extended"]),selectOnHighlight:C(e,"selectOnHighlight"),deselectable:C(e,"deselectable"),typeahead:C(e,"typeahead"),onValueChange:l=>{let c=w(e,"onValueChange");c&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(c,{value:l.value,items:l.items,id:e.id});let d=w(e,"onValueChangeClient");d&&e.dispatchEvent(new CustomEvent(d,{bubbles:!0,detail:{value:l,id:e.id}}))}}));a.hasGroups=n,a.setOptions(t),a.init(),this.listbox=a,this.handlers=[]},updated(){var r;let e=JSON.parse((r=this.el.dataset.collection)!=null?r:"[]"),t=e.some(s=>s.group!==void 0),n=Z(this.el,"value"),i=C(this.el,"controlled");this.listbox&&(this.listbox.hasGroups=t,this.listbox.setOptions(e),this.listbox.updateProps(y(g({collection:Rg(e,t),id:this.el.id},i&&n?{value:n}:{}),{disabled:C(this.el,"disabled"),dir:w(this.el,"dir",["ltr","rtl"]),orientation:w(this.el,"orientation",["horizontal","vertical"])})))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.listbox)==null||e.destroy()}}});var Ug={};he(Ug,{Menu:()=>mT});function sT(e,t){if(!e)return;let n=de(e),i=new n.CustomEvent(Vl,{detail:{value:t}});e.dispatchEvent(i)}function aT(e,t){let{context:n,send:i,state:r,computed:s,prop:a,scope:o}=e,l=r.hasTag("open"),c=n.get("isSubmenu"),d=s("isTypingAhead"),h=a("composite"),m=n.get("currentPlacement"),u=n.get("anchorPoint"),p=n.get("highlightedValue"),v=On(y(g({},a("positioning")),{placement:u?"bottom":m}));function I(f){return{id:Rr(o,f.value),disabled:!!f.disabled,highlighted:p===f.value}}function T(f){var P;let S=(P=f.valueText)!=null?P:f.value;return y(g({},f),{id:f.value,valueText:S})}function O(f){let S=I(T(f));return y(g({},S),{checked:!!f.checked})}function b(f){let{closeOnSelect:S,valueText:P,value:V}=f,A=I(f),x=Rr(o,V);return t.element(y(g({},Be.item.attrs),{id:x,role:"menuitem","aria-disabled":X(A.disabled),"data-disabled":E(A.disabled),"data-ownedby":Gi(o),"data-highlighted":E(A.highlighted),"data-value":V,"data-valuetext":P,onDragStart(k){k.currentTarget.matches("a[href]")&&k.preventDefault()},onPointerMove(k){if(A.disabled||k.pointerType!=="mouse")return;let N=k.currentTarget;if(A.highlighted)return;let D=je(k);i({type:"ITEM_POINTERMOVE",id:x,target:N,closeOnSelect:S,point:D})},onPointerLeave(k){var $;if(A.disabled||k.pointerType!=="mouse"||!(($=e.event.previous())==null?void 0:$.type.includes("POINTER")))return;let D=k.currentTarget;i({type:"ITEM_POINTERLEAVE",id:x,target:D,closeOnSelect:S})},onPointerDown(k){if(A.disabled)return;let N=k.currentTarget;i({type:"ITEM_POINTERDOWN",target:N,id:x,closeOnSelect:S})},onClick(k){if(rr(k)||Fn(k)||A.disabled)return;let N=k.currentTarget;i({type:"ITEM_CLICK",target:N,id:x,closeOnSelect:S})}}))}return{highlightedValue:p,open:l,setOpen(f){r.hasTag("open")!==f&&i({type:f?"OPEN":"CLOSE"})},setHighlightedValue(f){i({type:"HIGHLIGHTED.SET",value:f})},setParent(f){i({type:"PARENT.SET",value:f,id:f.prop("id")})},setChild(f){i({type:"CHILD.SET",value:f,id:f.prop("id")})},reposition(f={}){i({type:"POSITIONING.SET",options:f})},addItemListener(f){let S=o.getById(f.id);if(!S)return;let P=()=>{var V;return(V=f.onSelect)==null?void 0:V.call(f)};return S.addEventListener(Vl,P),()=>S.removeEventListener(Vl,P)},getContextTriggerProps(){return t.element(y(g({},Be.contextTrigger.attrs),{dir:a("dir"),id:_g(o),"data-state":l?"open":"closed",onPointerDown(f){if(f.pointerType==="mouse")return;let S=je(f);i({type:"CONTEXT_MENU_START",point:S})},onPointerCancel(f){f.pointerType!=="mouse"&&i({type:"CONTEXT_MENU_CANCEL"})},onPointerMove(f){f.pointerType!=="mouse"&&i({type:"CONTEXT_MENU_CANCEL"})},onPointerUp(f){f.pointerType!=="mouse"&&i({type:"CONTEXT_MENU_CANCEL"})},onContextMenu(f){let S=je(f);i({type:"CONTEXT_MENU",point:S}),f.preventDefault()},style:{WebkitTouchCallout:"none",WebkitUserSelect:"none",userSelect:"none"}}))},getTriggerItemProps(f){let S=f.getTriggerProps();return ad(b({value:S.id}),S)},getTriggerProps(){return t.button(y(g({},c?Be.triggerItem.attrs:Be.trigger.attrs),{"data-placement":n.get("currentPlacement"),type:"button",dir:a("dir"),id:va(o),"data-uid":a("id"),"aria-haspopup":h?"menu":"dialog","aria-controls":Gi(o),"data-controls":Gi(o),"aria-expanded":l||void 0,"data-state":l?"open":"closed",onPointerMove(f){if(f.pointerType!=="mouse"||ma(f.currentTarget)||!c)return;let P=je(f);i({type:"TRIGGER_POINTERMOVE",target:f.currentTarget,point:P})},onPointerLeave(f){if(ma(f.currentTarget)||f.pointerType!=="mouse"||!c)return;let S=je(f);i({type:"TRIGGER_POINTERLEAVE",target:f.currentTarget,point:S})},onPointerDown(f){ma(f.currentTarget)||hi(f)||f.preventDefault()},onClick(f){f.defaultPrevented||ma(f.currentTarget)||i({type:"TRIGGER_CLICK",target:f.currentTarget})},onBlur(){i({type:"TRIGGER_BLUR"})},onFocus(){i({type:"TRIGGER_FOCUS"})},onKeyDown(f){if(f.defaultPrevented)return;let S={ArrowDown(){i({type:"ARROW_DOWN"})},ArrowUp(){i({type:"ARROW_UP"})},Enter(){i({type:"ARROW_DOWN",src:"enter"})},Space(){i({type:"ARROW_DOWN",src:"space"})}},P=ge(f,{orientation:"vertical",dir:a("dir")}),V=S[P];V&&(f.preventDefault(),V(f))}}))},getIndicatorProps(){return t.element(y(g({},Be.indicator.attrs),{dir:a("dir"),"data-state":l?"open":"closed"}))},getPositionerProps(){return t.element(y(g({},Be.positioner.attrs),{dir:a("dir"),id:Gg(o),style:v.floating}))},getArrowProps(){return t.element(y(g({id:ZS(o)},Be.arrow.attrs),{dir:a("dir"),style:v.arrow}))},getArrowTipProps(){return t.element(y(g({},Be.arrowTip.attrs),{dir:a("dir"),style:v.arrowTip}))},getContentProps(){return t.element(y(g({},Be.content.attrs),{id:Gi(o),"aria-label":a("aria-label"),hidden:!l,"data-state":l?"open":"closed",role:h?"menu":"dialog",tabIndex:0,dir:a("dir"),"aria-activedescendant":s("highlightedId")||void 0,"aria-labelledby":va(o),"data-placement":m,onPointerEnter(f){f.pointerType==="mouse"&&i({type:"MENU_POINTERENTER"})},onKeyDown(f){if(f.defaultPrevented||!ce(f.currentTarget,j(f)))return;let S=j(f);if(!((S==null?void 0:S.closest("[role=menu]"))===f.currentTarget||S===f.currentTarget))return;if(f.key==="Tab"&&!us(f)){f.preventDefault();return}let V={ArrowDown(){i({type:"ARROW_DOWN"})},ArrowUp(){i({type:"ARROW_UP"})},ArrowLeft(){i({type:"ARROW_LEFT"})},ArrowRight(){i({type:"ARROW_RIGHT"})},Enter(){i({type:"ENTER"})},Space(k){var N;d?i({type:"TYPEAHEAD",key:k.key}):(N=V.Enter)==null||N.call(V,k)},Home(){i({type:"HOME"})},End(){i({type:"END"})}},A=ge(f,{dir:a("dir")}),x=V[A];if(x){x(f),f.stopPropagation(),f.preventDefault();return}a("typeahead")&&wc(f)&&(xe(f)||Ot(S)||(i({type:"TYPEAHEAD",key:f.key}),f.preventDefault()))}}))},getSeparatorProps(){return t.element(y(g({},Be.separator.attrs),{role:"separator",dir:a("dir"),"aria-orientation":"horizontal"}))},getItemState:I,getItemProps:b,getOptionItemState:O,getOptionItemProps(f){let{type:S,disabled:P,closeOnSelect:V}=f,A=T(f),x=O(f);return g(g({},b(A)),t.element(y(g({"data-type":S},Be.item.attrs),{dir:a("dir"),"data-value":A.value,role:`menuitem${S}`,"aria-checked":!!x.checked,"data-state":x.checked?"checked":"unchecked",onClick(k){if(P||rr(k)||Fn(k))return;let N=k.currentTarget;i({type:"ITEM_CLICK",target:N,option:A,closeOnSelect:V})}})))},getItemIndicatorProps(f){let S=O(lo(f)),P=S.checked?"checked":"unchecked";return t.element(y(g({},Be.itemIndicator.attrs),{dir:a("dir"),"data-disabled":E(S.disabled),"data-highlighted":E(S.highlighted),"data-state":$e(f,"checked")?P:void 0,hidden:$e(f,"checked")?!S.checked:void 0}))},getItemTextProps(f){let S=O(lo(f)),P=S.checked?"checked":"unchecked";return t.element(y(g({},Be.itemText.attrs),{dir:a("dir"),"data-disabled":E(S.disabled),"data-highlighted":E(S.highlighted),"data-state":$e(f,"checked")?P:void 0}))},getItemGroupLabelProps(f){return t.element(y(g({},Be.itemGroupLabel.attrs),{id:Mg(o,f.htmlFor),dir:a("dir")}))},getItemGroupProps(f){return t.element(y(g({id:JS(o,f.id)},Be.itemGroup.attrs),{dir:a("dir"),"aria-labelledby":Mg(o,f.id),role:"group"}))}}}function Hg(e){let t=e.parent;for(;t&&t.context.get("isSubmenu");)t=t.refs.get("parent");t==null||t.send({type:"CLOSE"})}function cT(e,t){return e?fo(e,t):!1}function dT(e,t,n){let i=Object.keys(e).length>0;if(!t)return null;if(!i)return Rr(n,t);for(let r in e){let s=e[r],a=va(s.scope);if(a===t)return a}return Rr(n,t)}var XS,Be,va,_g,Gi,ZS,Gg,JS,Rr,ei,Mg,cn,Fg,fa,QS,wl,Dr,eT,tT,xl,nT,iT,rT,ma,$g,Vl,pt,_i,oT,lT,uT,cA,hT,dA,gT,uA,pT,hA,fT,gA,Bg,mT,qg=re(()=>{"use strict";Cs();Pr();Wn();tn();se();XS=U("menu").parts("arrow","arrowTip","content","contextTrigger","indicator","item","itemGroup","itemGroupLabel","itemIndicator","itemText","positioner","separator","trigger","triggerItem"),Be=XS.build(),va=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`menu:${e.id}:trigger`},_g=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.contextTrigger)!=null?n:`menu:${e.id}:ctx-trigger`},Gi=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`menu:${e.id}:content`},ZS=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`menu:${e.id}:arrow`},Gg=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`menu:${e.id}:popper`},JS=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.group)==null?void 0:i.call(n,t))!=null?r:`menu:${e.id}:group:${t}`},Rr=(e,t)=>`${e.id}/${t}`,ei=e=>{var t;return(t=e==null?void 0:e.dataset.value)!=null?t:null},Mg=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.groupLabel)==null?void 0:i.call(n,t))!=null?r:`menu:${e.id}:group-label:${t}`},cn=e=>e.getById(Gi(e)),Fg=e=>e.getById(Gg(e)),fa=e=>e.getById(va(e)),QS=(e,t)=>t?e.getById(Rr(e,t)):null,wl=e=>e.getById(_g(e)),Dr=e=>{let n=`[role^="menuitem"][data-ownedby=${CSS.escape(Gi(e))}]:not([data-disabled])`;return Fe(cn(e),n)},eT=e=>lt(Dr(e)),tT=e=>mt(Dr(e)),xl=(e,t)=>t?e.id===t||e.dataset.value===t:!1,nT=(e,t)=>{var r;let n=Dr(e),i=n.findIndex(s=>xl(s,t.value));return _c(n,i,{loop:(r=t.loop)!=null?r:t.loopFocus})},iT=(e,t)=>{var r;let n=Dr(e),i=n.findIndex(s=>xl(s,t.value));return Gc(n,i,{loop:(r=t.loop)!=null?r:t.loopFocus})},rT=(e,t)=>{var r;let n=Dr(e),i=n.find(s=>xl(s,t.value));return Ue(n,{state:t.typeaheadState,key:t.key,activeId:(r=i==null?void 0:i.id)!=null?r:null})},ma=e=>le(e)&&(e.dataset.disabled===""||e.hasAttribute("disabled")),$g=e=>{var t;return!!((t=e==null?void 0:e.getAttribute("role"))!=null&&t.startsWith("menuitem"))&&!!(e!=null&&e.hasAttribute("data-controls"))},Vl="menu:select";({not:pt,and:_i,or:oT}=Ee()),lT={props({props:e}){return y(g({closeOnSelect:!0,typeahead:!0,composite:!0,loopFocus:!1,navigate(t){mi(t.node)}},e),{positioning:g({placement:"bottom-start",gutter:8},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"idle"},context({bindable:e,prop:t}){return{suspendPointer:e(()=>({defaultValue:!1})),highlightedValue:e(()=>({defaultValue:t("defaultHighlightedValue")||null,value:t("highlightedValue"),onChange(n){var i;(i=t("onHighlightChange"))==null||i({highlightedValue:n})}})),lastHighlightedValue:e(()=>({defaultValue:null})),currentPlacement:e(()=>({defaultValue:void 0})),intentPolygon:e(()=>({defaultValue:null})),anchorPoint:e(()=>({defaultValue:null,hash(n){return`x: ${n==null?void 0:n.x}, y: ${n==null?void 0:n.y}`}})),isSubmenu:e(()=>({defaultValue:!1}))}},refs(){return{parent:null,children:{},typeaheadState:g({},Ue.defaultOptions),positioningOverride:{}}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isTypingAhead:({refs:e})=>e.get("typeaheadState").keysSoFar!=="",highlightedId:({context:e,scope:t,refs:n})=>dT(n.get("children"),e.get("highlightedValue"),t)},watch({track:e,action:t,context:n,prop:i}){e([()=>n.get("isSubmenu")],()=>{t(["setSubmenuPlacement"])}),e([()=>n.hash("anchorPoint")],()=>{n.get("anchorPoint")&&t(["reposition"])}),e([()=>i("open")],()=>{t(["toggleVisibility"])})},on:{"PARENT.SET":{actions:["setParentMenu"]},"CHILD.SET":{actions:["setChildMenu"]},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],OPEN_AUTOFOCUS:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["highlightFirstItem","invokeOnOpen"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"HIGHLIGHTED.RESTORE":{actions:["restoreHighlightedItem"]},"HIGHLIGHTED.SET":{actions:["setHighlightedItem"]}},states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed"},CONTEXT_MENU_START:{target:"opening:contextmenu",actions:["setAnchorPoint"]},CONTEXT_MENU:[{guard:"isOpenControlled",actions:["setAnchorPoint","invokeOnOpen"]},{target:"open",actions:["setAnchorPoint","invokeOnOpen"]}],TRIGGER_CLICK:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TRIGGER_FOCUS:{guard:pt("isSubmenu"),target:"closed"},TRIGGER_POINTERMOVE:{guard:"isSubmenu",target:"opening"}}},"opening:contextmenu":{tags:["closed"],effects:["waitForLongPress"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed"},CONTEXT_MENU_CANCEL:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"LONG_PRESS.OPEN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}},opening:{tags:["closed"],effects:["waitForOpenDelay"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed"},BLUR:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TRIGGER_POINTERLEAVE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"DELAY.OPEN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}},closing:{tags:["open"],effects:["trackPointerMove","trackInteractOutside","waitForCloseDelay"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem"]},MENU_POINTERENTER:{target:"open",actions:["clearIntentPolygon"]},POINTER_MOVED_AWAY_FROM_SUBMENU:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem"]}],"DELAY.CLOSE":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem","invokeOnClose"]}]}},closed:{tags:["closed"],entry:["clearHighlightedItem","focusTrigger","resumePointer","clearAnchorPoint"],on:{"CONTROLLED.OPEN":[{guard:oT("isOpenAutoFocusEvent","isArrowDownEvent"),target:"open",actions:["highlightFirstItem"]},{guard:"isArrowUpEvent",target:"open",actions:["highlightLastItem"]},{target:"open"}],CONTEXT_MENU_START:{target:"opening:contextmenu",actions:["setAnchorPoint"]},CONTEXT_MENU:[{guard:"isOpenControlled",actions:["setAnchorPoint","invokeOnOpen"]},{target:"open",actions:["setAnchorPoint","invokeOnOpen"]}],TRIGGER_CLICK:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TRIGGER_POINTERMOVE:{guard:"isTriggerItem",target:"opening"},TRIGGER_BLUR:{target:"idle"},ARROW_DOWN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["highlightFirstItem","invokeOnOpen"]}],ARROW_UP:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["highlightLastItem","invokeOnOpen"]}]}},open:{tags:["open"],effects:["trackInteractOutside","trackPositioning","scrollToHighlightedItem"],entry:["focusMenu","resumePointer"],on:{"CONTROLLED.CLOSE":[{target:"closed",guard:"isArrowLeftEvent",actions:["focusParentMenu"]},{target:"closed"}],TRIGGER_CLICK:[{guard:_i(pt("isTriggerItem"),"isOpenControlled"),actions:["invokeOnClose"]},{guard:pt("isTriggerItem"),target:"closed",actions:["invokeOnClose"]}],CONTEXT_MENU:{actions:["setAnchorPoint","focusMenu"]},ARROW_UP:{actions:["highlightPrevItem","focusMenu"]},ARROW_DOWN:{actions:["highlightNextItem","focusMenu"]},ARROW_LEFT:[{guard:_i("isSubmenu","isOpenControlled"),actions:["invokeOnClose"]},{guard:"isSubmenu",target:"closed",actions:["focusParentMenu","invokeOnClose"]}],HOME:{actions:["highlightFirstItem","focusMenu"]},END:{actions:["highlightLastItem","focusMenu"]},ARROW_RIGHT:{guard:"isTriggerItemHighlighted",actions:["openSubmenu"]},ENTER:[{guard:"isTriggerItemHighlighted",actions:["openSubmenu"]},{actions:["clickHighlightedItem"]}],ITEM_POINTERMOVE:[{guard:pt("isPointerSuspended"),actions:["setHighlightedItem","focusMenu","closeSiblingMenus"]},{actions:["setLastHighlightedItem","closeSiblingMenus"]}],ITEM_POINTERLEAVE:{guard:_i(pt("isPointerSuspended"),pt("isTriggerItem")),actions:["clearHighlightedItem"]},ITEM_CLICK:[{guard:_i(pt("isTriggerItemHighlighted"),pt("isHighlightedItemEditable"),"closeOnSelect","isOpenControlled"),actions:["invokeOnSelect","setOptionState","closeRootMenu","invokeOnClose"]},{guard:_i(pt("isTriggerItemHighlighted"),pt("isHighlightedItemEditable"),"closeOnSelect"),target:"closed",actions:["invokeOnSelect","setOptionState","closeRootMenu","invokeOnClose"]},{guard:_i(pt("isTriggerItemHighlighted"),pt("isHighlightedItemEditable")),actions:["invokeOnSelect","setOptionState"]},{actions:["setHighlightedItem"]}],TRIGGER_POINTERMOVE:{guard:"isTriggerItem",actions:["setIntentPolygon"]},TRIGGER_POINTERLEAVE:{target:"closing",actions:["setIntentPolygon"]},ITEM_POINTERDOWN:{actions:["setHighlightedItem"]},TYPEAHEAD:{actions:["highlightMatchedItem"]},FOCUS_MENU:{actions:["focusMenu"]},"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{closeOnSelect:({prop:e,event:t})=>{var n;return!!((n=t==null?void 0:t.closeOnSelect)!=null?n:e("closeOnSelect"))},isTriggerItem:({event:e})=>$g(e.target),isTriggerItemHighlighted:({event:e,scope:t,computed:n})=>{var r;let i=(r=e.target)!=null?r:t.getById(n("highlightedId"));return!!(i!=null&&i.hasAttribute("data-controls"))},isSubmenu:({context:e})=>e.get("isSubmenu"),isPointerSuspended:({context:e})=>e.get("suspendPointer"),isHighlightedItemEditable:({scope:e,computed:t})=>Ot(e.getById(t("highlightedId"))),isOpenControlled:({prop:e})=>e("open")!==void 0,isArrowLeftEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="ARROW_LEFT"},isArrowUpEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="ARROW_UP"},isArrowDownEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="ARROW_DOWN"},isOpenAutoFocusEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="OPEN_AUTOFOCUS"}},effects:{waitForOpenDelay({send:e}){let t=setTimeout(()=>{e({type:"DELAY.OPEN"})},200);return()=>clearTimeout(t)},waitForCloseDelay({send:e}){let t=setTimeout(()=>{e({type:"DELAY.CLOSE"})},100);return()=>clearTimeout(t)},waitForLongPress({send:e}){let t=setTimeout(()=>{e({type:"LONG_PRESS.OPEN"})},700);return()=>clearTimeout(t)},trackPositioning({context:e,prop:t,scope:n,refs:i}){if(wl(n))return;let r=g(g({},t("positioning")),i.get("positioningOverride"));e.set("currentPlacement",r.placement);let s=()=>Fg(n);return It(fa(n),s,y(g({},r),{defer:!0,onComplete(a){e.set("currentPlacement",a.placement)}}))},trackInteractOutside({refs:e,scope:t,prop:n,context:i,send:r}){let s=()=>cn(t),a=!0;return Ft(s,{type:"menu",defer:!0,exclude:[fa(t)],onInteractOutside:n("onInteractOutside"),onRequestDismiss:n("onRequestDismiss"),onFocusOutside(o){var d;(d=n("onFocusOutside"))==null||d(o);let l=j(o.detail.originalEvent);if(ce(wl(t),l)){o.preventDefault();return}},onEscapeKeyDown(o){var l;(l=n("onEscapeKeyDown"))==null||l(o),i.get("isSubmenu")&&o.preventDefault(),Hg({parent:e.get("parent")})},onPointerDownOutside(o){var d;(d=n("onPointerDownOutside"))==null||d(o);let l=j(o.detail.originalEvent);if(ce(wl(t),l)&&o.detail.contextmenu){o.preventDefault();return}a=!o.detail.focusable},onDismiss(){r({type:"CLOSE",src:"interact-outside",restoreFocus:a})}})},trackPointerMove({context:e,scope:t,send:n,refs:i,flush:r}){let s=i.get("parent");r(()=>{s.context.set("suspendPointer",!0)});let a=t.getDoc();return ee(a,"pointermove",o=>{cT(e.get("intentPolygon"),{x:o.clientX,y:o.clientY})||(n({type:"POINTER_MOVED_AWAY_FROM_SUBMENU"}),s.context.set("suspendPointer",!1))})},scrollToHighlightedItem({event:e,scope:t,computed:n}){let i=()=>{if(e.current().type.startsWith("ITEM_POINTER"))return;let s=t.getById(n("highlightedId")),a=cn(t);Xt(s,{rootEl:a,block:"nearest"})};return H(()=>i()),ot(()=>cn(t),{defer:!0,attributes:["aria-activedescendant"],callback:i})}},actions:{setAnchorPoint({context:e,event:t}){e.set("anchorPoint",n=>fe(n,t.point)?n:t.point)},setSubmenuPlacement({context:e,computed:t,refs:n}){if(!e.get("isSubmenu"))return;let i=t("isRtl")?"left-start":"right-start";n.set("positioningOverride",{placement:i,gutter:0})},reposition({context:e,scope:t,prop:n,event:i,refs:r}){var c;let s=()=>Fg(t),a=e.get("anchorPoint"),o=a?()=>g({width:0,height:0},a):void 0,l=g(g({},n("positioning")),r.get("positioningOverride"));It(fa(t),s,y(g(y(g({},l),{defer:!0,getAnchorRect:o}),(c=i.options)!=null?c:{}),{listeners:!1,onComplete(d){e.set("currentPlacement",d.placement)}}))},setOptionState({event:e}){if(!e.option)return;let{checked:t,onCheckedChange:n,type:i}=e.option;i==="radio"?n==null||n(!0):i==="checkbox"&&(n==null||n(!t))},clickHighlightedItem({scope:e,computed:t,prop:n,context:i}){var a;let r=e.getById(t("highlightedId"));if(!r||r.dataset.disabled)return;let s=i.get("highlightedValue");st(r)?(a=n("navigate"))==null||a({value:s,node:r,href:r.href}):queueMicrotask(()=>r.click())},setIntentPolygon({context:e,scope:t,event:n}){let i=cn(t),r=e.get("currentPlacement");if(!i||!r)return;let s=i.getBoundingClientRect(),a=Sd(s,r);if(!a)return;let l=Mu(r)==="right"?-5:5;e.set("intentPolygon",[y(g({},n.point),{x:n.point.x+l}),...a])},clearIntentPolygon({context:e}){e.set("intentPolygon",null)},clearAnchorPoint({context:e}){e.set("anchorPoint",null)},resumePointer({refs:e,flush:t}){let n=e.get("parent");n&&t(()=>{n.context.set("suspendPointer",!1)})},setHighlightedItem({context:e,event:t}){let n=t.value||ei(t.target);e.set("highlightedValue",n)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},focusMenu({scope:e}){H(()=>{let t=cn(e),n=ds({root:t,enabled:!ce(t,e.getActiveElement()),filter(i){var r;return!((r=i.role)!=null&&r.startsWith("menuitem"))}});n==null||n.focus({preventScroll:!0})})},highlightFirstItem({context:e,scope:t}){(cn(t)?queueMicrotask:H)(()=>{let i=eT(t);i&&e.set("highlightedValue",ei(i))})},highlightLastItem({context:e,scope:t}){(cn(t)?queueMicrotask:H)(()=>{let i=tT(t);i&&e.set("highlightedValue",ei(i))})},highlightNextItem({context:e,scope:t,event:n,prop:i}){let r=nT(t,{loop:n.loop,value:e.get("highlightedValue"),loopFocus:i("loopFocus")});e.set("highlightedValue",ei(r))},highlightPrevItem({context:e,scope:t,event:n,prop:i}){let r=iT(t,{loop:n.loop,value:e.get("highlightedValue"),loopFocus:i("loopFocus")});e.set("highlightedValue",ei(r))},invokeOnSelect({context:e,prop:t,scope:n}){var s;let i=e.get("highlightedValue");if(i==null)return;let r=QS(n,i);sT(r,i),(s=t("onSelect"))==null||s({value:i})},focusTrigger({scope:e,context:t,event:n}){t.get("isSubmenu")||t.get("anchorPoint")||n.restoreFocus===!1||queueMicrotask(()=>{var i;return(i=fa(e))==null?void 0:i.focus({preventScroll:!0})})},highlightMatchedItem({scope:e,context:t,event:n,refs:i}){let r=rT(e,{key:n.key,value:t.get("highlightedValue"),typeaheadState:i.get("typeaheadState")});r&&t.set("highlightedValue",ei(r))},setParentMenu({refs:e,event:t,context:n}){e.set("parent",t.value),n.set("isSubmenu",!0)},setChildMenu({refs:e,event:t}){let n=e.get("children");n[t.id]=t.value,e.set("children",n)},closeSiblingMenus({refs:e,event:t,scope:n}){var a;let i=t.target;if(!$g(i))return;let r=i==null?void 0:i.getAttribute("data-uid"),s=e.get("children");for(let o in s){if(o===r)continue;let l=s[o],c=l.context.get("intentPolygon");c&&t.point&&fo(c,t.point)||((a=cn(n))==null||a.focus({preventScroll:!0}),l.send({type:"CLOSE"}))}},closeRootMenu({refs:e}){Hg({parent:e.get("parent")})},openSubmenu({refs:e,scope:t,computed:n}){let i=t.getById(n("highlightedId")),r=i==null?void 0:i.getAttribute("data-uid"),s=e.get("children"),a=r?s[r]:null;a==null||a.send({type:"OPEN_AUTOFOCUS"})},focusParentMenu({refs:e}){var t;(t=e.get("parent"))==null||t.send({type:"FOCUS_MENU"})},setLastHighlightedItem({context:e,event:t}){e.set("lastHighlightedValue",ei(t.target))},restoreHighlightedItem({context:e}){e.get("lastHighlightedValue")&&(e.set("highlightedValue",e.get("lastHighlightedValue")),e.set("lastHighlightedValue",null))},restoreParentHighlightedItem({refs:e}){var t;(t=e.get("parent"))==null||t.send({type:"HIGHLIGHTED.RESTORE"})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},toggleVisibility({prop:e,event:t,send:n}){n({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:t})}}}};uT=_()(["anchorPoint","aria-label","closeOnSelect","composite","defaultHighlightedValue","defaultOpen","dir","getRootNode","highlightedValue","id","ids","loopFocus","navigate","onEscapeKeyDown","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","onSelect","open","positioning","typeahead"]),cA=B(uT),hT=_()(["closeOnSelect","disabled","value","valueText"]),dA=B(hT),gT=_()(["htmlFor"]),uA=B(gT),pT=_()(["id"]),hA=B(pT),fT=_()(["checked","closeOnSelect","disabled","onCheckedChange","type","value","valueText"]),gA=B(fT),Bg=class extends K{constructor(){super(...arguments);Y(this,"children",[])}initMachine(t){return new W(lT,t)}initApi(){return aT(this.machine.service,q)}setChild(t){this.api.setChild(t.machine.service),this.children.includes(t)||this.children.push(t)}setParent(t){this.api.setParent(t.machine.service)}isOwnElement(t){return t.closest('[phx-hook="Menu"]')===this.el}renderSubmenuTriggers(){let t=this.el.querySelector('[data-scope="menu"][data-part="content"]');if(!t)return;let n=t.querySelectorAll('[data-scope="menu"][data-nested-menu]');for(let i of n){if(!this.isOwnElement(i))continue;let r=i.dataset.nestedMenu;if(!r)continue;let s=this.children.find(o=>o.el.id===`menu:${r}`);if(!s)continue;let a=()=>{let o=this.api.getTriggerItemProps(s.api);this.spreadProps(i,o)};a(),this.machine.subscribe(a),s.machine.subscribe(a)}}render(){let t=this.el.querySelector('[data-scope="menu"][data-part="trigger"]');t&&this.spreadProps(t,this.api.getTriggerProps());let n=this.el.querySelector('[data-scope="menu"][data-part="positioner"]'),i=this.el.querySelector('[data-scope="menu"][data-part="content"]');if(n&&i){this.spreadProps(n,this.api.getPositionerProps()),this.spreadProps(i,this.api.getContentProps()),i.style.pointerEvents="auto",n.hidden=!this.api.open;let s=!this.el.querySelector('[data-scope="menu"][data-part="trigger"]');(this.api.open||s)&&(i.querySelectorAll('[data-scope="menu"][data-part="item"]').forEach(d=>{if(!this.isOwnElement(d))return;let h=d.dataset.value;if(h){let m=d.hasAttribute("data-disabled");this.spreadProps(d,this.api.getItemProps({value:h,disabled:m||void 0}))}}),i.querySelectorAll('[data-scope="menu"][data-part="item-group"]').forEach(d=>{if(!this.isOwnElement(d))return;let h=d.id;h&&this.spreadProps(d,this.api.getItemGroupProps({id:h}))}),i.querySelectorAll('[data-scope="menu"][data-part="separator"]').forEach(d=>{this.isOwnElement(d)&&this.spreadProps(d,this.api.getSeparatorProps())}))}let r=this.el.querySelector('[data-scope="menu"][data-part="indicator"]');r&&this.spreadProps(r,this.api.getIndicatorProps())}},mT={mounted(){let e=this.el;if(e.hasAttribute("data-nested"))return;let t=this.pushEvent.bind(this),n=()=>{var a;return(a=this.liveSocket)==null?void 0:a.main},i=new Bg(e,y(g({id:e.id.replace("menu:","")},C(e,"controlled")?{open:C(e,"open")}:{defaultOpen:C(e,"defaultOpen")}),{closeOnSelect:C(e,"closeOnSelect"),loopFocus:C(e,"loopFocus"),typeahead:C(e,"typeahead"),composite:C(e,"composite"),dir:w(e,"dir",["ltr","rtl"]),onSelect:a=>{var v,I,T;let o=C(e,"redirect"),l=[...e.querySelectorAll('[data-scope="menu"][data-part="item"]')].find(O=>O.getAttribute("data-value")===a.value),c=l==null?void 0:l.getAttribute("data-redirect"),d=l==null?void 0:l.hasAttribute("data-new-tab"),h=n();o&&a.value&&((v=h==null?void 0:h.isDead)!=null?v:!0)&&c!=="false"&&(d?window.open(a.value,"_blank","noopener,noreferrer"):window.location.href=a.value);let u=w(e,"onSelect");u&&h&&!h.isDead&&h.isConnected()&&t(u,{id:e.id,value:(I=a.value)!=null?I:null});let p=w(e,"onSelectClient");p&&e.dispatchEvent(new CustomEvent(p,{bubbles:!0,detail:{id:e.id,value:(T=a.value)!=null?T:null}}))},onOpenChange:a=>{var d,h;let o=n(),l=w(e,"onOpenChange");l&&o&&!o.isDead&&o.isConnected()&&t(l,{id:e.id,open:(d=a.open)!=null?d:!1});let c=w(e,"onOpenChangeClient");c&&e.dispatchEvent(new CustomEvent(c,{bubbles:!0,detail:{id:e.id,open:(h=a.open)!=null?h:!1}}))}}));i.init(),this.menu=i,this.nestedMenus=new Map;let r=e.querySelectorAll('[data-scope="menu"][data-nested="menu"]'),s=[];r.forEach((a,o)=>{var c;let l=a.id;if(l){let d=`${l}-${o}`,h=new Bg(a,{id:d,dir:w(a,"dir",["ltr","rtl"]),closeOnSelect:C(a,"closeOnSelect"),loopFocus:C(a,"loopFocus"),typeahead:C(a,"typeahead"),composite:C(a,"composite"),onSelect:m=>{var S,P,V;let u=C(e,"redirect"),p=[...e.querySelectorAll('[data-scope="menu"][data-part="item"]')].find(A=>A.getAttribute("data-value")===m.value),v=p==null?void 0:p.getAttribute("data-redirect"),I=p==null?void 0:p.hasAttribute("data-new-tab"),T=n();u&&m.value&&((S=T==null?void 0:T.isDead)!=null?S:!0)&&v!=="false"&&(I?window.open(m.value,"_blank","noopener,noreferrer"):window.location.href=m.value);let b=w(e,"onSelect");b&&T&&!T.isDead&&T.isConnected()&&t(b,{id:e.id,value:(P=m.value)!=null?P:null});let f=w(e,"onSelectClient");f&&e.dispatchEvent(new CustomEvent(f,{bubbles:!0,detail:{id:e.id,value:(V=m.value)!=null?V:null}}))}});h.init(),(c=this.nestedMenus)==null||c.set(l,h),s.push(h)}}),setTimeout(()=>{s.forEach(a=>{this.menu&&(this.menu.setChild(a),a.setParent(this.menu))}),this.menu&&this.menu.children.length>0&&this.menu.renderSubmenuTriggers()},0),this.onSetOpen=a=>{let{open:o}=a.detail;i.api.open!==o&&i.api.setOpen(o)},e.addEventListener("phx:menu:set-open",this.onSetOpen),this.handlers=[],this.handlers.push(this.handleEvent("menu_set_open",a=>{let o=a.menu_id;(!o||e.id===o||e.id===`menu:${o}`)&&i.api.setOpen(a.open)})),this.handlers.push(this.handleEvent("menu_open",()=>{this.pushEvent("menu_open_response",{open:i.api.open})}))},updated(){var e;this.el.hasAttribute("data-nested")||(e=this.menu)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlled")?{open:C(this.el,"open")}:{defaultOpen:C(this.el,"defaultOpen")}),{closeOnSelect:C(this.el,"closeOnSelect"),loopFocus:C(this.el,"loopFocus"),typeahead:C(this.el,"typeahead"),composite:C(this.el,"composite"),dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(!this.el.hasAttribute("data-nested")){if(this.onSetOpen&&this.el.removeEventListener("phx:menu:set-open",this.onSetOpen),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);if(this.nestedMenus)for(let[,t]of this.nestedMenus)t.destroy();(e=this.menu)==null||e.destroy()}}}});var rp={};he(rp,{NumberInput:()=>zT});function yT(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${n}`),t.style==="unit"&&!ya){var i;let{unit:a,unitDisplay:o="short"}=t;if(!a)throw new Error('unit option must be provided with style: "unit"');if(!(!((i=Jg[a])===null||i===void 0)&&i[o]))throw new Error(`Unsupported unit ${a} with unitDisplay = ${o}`);t=y(g({},t),{style:"decimal"})}let r=e+(t?Object.entries(t).sort((a,o)=>a[0]0||Object.is(n,0):t==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):i=n>0),i){let r=e.format(-n),s=e.format(n),a=r.replace(s,"").replace(/\u200e|\u061C/,"");return[...a].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),r.replace(s,"!!!").replace(a,"+").replace("!!!",s)}else return e.format(n)}}function kl(e,t,n){let i=Kg(e,t);if(!e.includes("-nu-")&&!i.isValidPartialNumber(n)){for(let r of IT)if(r!==i.options.numberingSystem){let s=Kg(e+(e.includes("-u-")?"-nu-":"-u-nu-")+r,t);if(s.isValidPartialNumber(n))return s}}return i}function Kg(e,t){let n=e+(t?Object.entries(t).sort((r,s)=>r[0]l.formatToParts(k));var m;let u=(m=(r=c.find(k=>k.type==="minusSign"))===null||r===void 0?void 0:r.value)!==null&&m!==void 0?m:"-",p=(s=d.find(k=>k.type==="plusSign"))===null||s===void 0?void 0:s.value;!p&&((i==null?void 0:i.signDisplay)==="exceptZero"||(i==null?void 0:i.signDisplay)==="always")&&(p="+");let I=(a=new Intl.NumberFormat(e,y(g({},n),{minimumFractionDigits:2,maximumFractionDigits:2})).formatToParts(.001).find(k=>k.type==="decimal"))===null||a===void 0?void 0:a.value,T=(o=c.find(k=>k.type==="group"))===null||o===void 0?void 0:o.value,O=c.filter(k=>!zg.has(k.type)).map(k=>Yg(k.value)),b=h.flatMap(k=>k.filter(N=>!zg.has(N.type)).map(N=>Yg(N.value))),f=[...new Set([...O,...b])].sort((k,N)=>N.length-k.length),S=f.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${f.join("|")}|[\\p{White_Space}]`,"gu"),P=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),V=new Map(P.map((k,N)=>[k,N])),A=new RegExp(`[${P.join("")}]`,"g");return{minusSign:u,plusSign:p,decimal:I,group:T,literals:S,numeral:A,index:k=>String(V.get(k))}}function Ui(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function Yg(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Dl(e,t){if(!(!e||!t.isActiveElement(e)))try{let{selectionStart:n,selectionEnd:i,value:r}=e;return n==null||i==null?void 0:{start:n,end:i,value:r}}catch(n){return}}function OT(e,t,n){if(!(!e||!n.isActiveElement(e))){if(!t){let i=e.value.length;e.setSelectionRange(i,i);return}try{let i=e.value,{start:r,end:s,value:a}=t;if(i===a){e.setSelectionRange(r,s);return}let o=jg(a,i,r),l=r===s?o:jg(a,i,s),c=Math.max(0,Math.min(o,i.length)),d=Math.max(c,Math.min(l,i.length));e.setSelectionRange(c,d)}catch(i){let r=e.value.length;e.setSelectionRange(r,r)}}}function jg(e,t,n){let i=e.slice(0,n),r=e.slice(n),s=0,a=Math.min(i.length,t.length);for(let c=0;c0&&s>=i.length)return s;if(o>=r.length)return t.length-o;if(s>0)return s;if(o>0)return t.length-o;if(n===0&&s===0&&o===0)return t.length;if(e.length>0){let c=n/e.length;return Math.round(c*t.length)}return t.length}function FT(e,t){let{state:n,send:i,prop:r,scope:s,computed:a}=e,o=n.hasTag("focus"),l=a("isDisabled"),c=!!r("readOnly"),d=!!r("required"),h=n.matches("scrubbing"),m=a("isValueEmpty"),u=a("isOutOfRange")||!!r("invalid"),p=l||!a("canIncrement")||c,v=l||!a("canDecrement")||c,I=r("translations");return{focused:o,invalid:u,empty:m,value:a("formattedValue"),valueAsNumber:a("valueAsNumber"),setValue(T){i({type:"VALUE.SET",value:T})},clearValue(){i({type:"VALUE.CLEAR"})},increment(){i({type:"VALUE.INCREMENT"})},decrement(){i({type:"VALUE.DECREMENT"})},setToMax(){i({type:"VALUE.SET",value:r("max")})},setToMin(){i({type:"VALUE.SET",value:r("min")})},focus(){var T;(T=ni(s))==null||T.focus()},getRootProps(){return t.element(y(g({id:wT(s)},Vn.root.attrs),{dir:r("dir"),"data-disabled":E(l),"data-focus":E(o),"data-invalid":E(u),"data-scrubbing":E(h)}))},getLabelProps(){return t.label(y(g({},Vn.label.attrs),{dir:r("dir"),"data-disabled":E(l),"data-focus":E(o),"data-invalid":E(u),"data-required":E(d),"data-scrubbing":E(h),id:xT(s),htmlFor:Lr(s),onClick(){H(()=>{tr(ni(s))})}}))},getControlProps(){return t.element(y(g({},Vn.control.attrs),{dir:r("dir"),role:"group","aria-disabled":l,"data-focus":E(o),"data-disabled":E(l),"data-invalid":E(u),"data-scrubbing":E(h),"aria-invalid":X(u)}))},getValueTextProps(){return t.element(y(g({},Vn.valueText.attrs),{dir:r("dir"),"data-disabled":E(l),"data-invalid":E(u),"data-focus":E(o),"data-scrubbing":E(h)}))},getInputProps(){return t.input(y(g({},Vn.input.attrs),{dir:r("dir"),name:r("name"),form:r("form"),id:Lr(s),role:"spinbutton",defaultValue:a("formattedValue"),pattern:r("formatOptions")?void 0:r("pattern"),inputMode:r("inputMode"),"aria-invalid":X(u),"data-invalid":E(u),disabled:l,"data-disabled":E(l),readOnly:c,required:r("required"),autoComplete:"off",autoCorrect:"off",spellCheck:"false",type:"text","aria-roledescription":"numberfield","aria-valuemin":r("min"),"aria-valuemax":r("max"),"aria-valuenow":Number.isNaN(a("valueAsNumber"))?void 0:a("valueAsNumber"),"aria-valuetext":a("valueText"),"data-scrubbing":E(h),onFocus(){i({type:"INPUT.FOCUS"})},onBlur(){i({type:"INPUT.BLUR"})},onInput(T){let O=Dl(T.currentTarget,s);i({type:"INPUT.CHANGE",target:T.currentTarget,hint:"set",selection:O})},onBeforeInput(T){var O;try{let{selectionStart:b,selectionEnd:f,value:S}=T.currentTarget,P=S.slice(0,b)+((O=T.data)!=null?O:"")+S.slice(f);a("parser").isValidPartialNumber(P)||T.preventDefault()}catch(b){}},onKeyDown(T){if(T.defaultPrevented||c||Re(T))return;let O=gi(T)*r("step"),f={ArrowUp(){i({type:"INPUT.ARROW_UP",step:O}),T.preventDefault()},ArrowDown(){i({type:"INPUT.ARROW_DOWN",step:O}),T.preventDefault()},Home(){xe(T)||(i({type:"INPUT.HOME"}),T.preventDefault())},End(){xe(T)||(i({type:"INPUT.END"}),T.preventDefault())},Enter(S){let P=Dl(S.currentTarget,s);i({type:"INPUT.ENTER",selection:P})}}[T.key];f==null||f(T)}}))},getDecrementTriggerProps(){return t.button(y(g({},Vn.decrementTrigger.attrs),{dir:r("dir"),id:tp(s),disabled:v,"data-disabled":E(v),"aria-label":I.decrementLabel,type:"button",tabIndex:-1,"aria-controls":Lr(s),"data-scrubbing":E(h),onPointerDown(T){var O;v||pe(T)&&(i({type:"TRIGGER.PRESS_DOWN",hint:"decrement",pointerType:T.pointerType}),T.pointerType==="mouse"&&T.preventDefault(),T.pointerType==="touch"&&((O=T.currentTarget)==null||O.focus({preventScroll:!0})))},onPointerUp(T){i({type:"TRIGGER.PRESS_UP",hint:"decrement",pointerType:T.pointerType})},onPointerLeave(){v||i({type:"TRIGGER.PRESS_UP",hint:"decrement"})}}))},getIncrementTriggerProps(){return t.button(y(g({},Vn.incrementTrigger.attrs),{dir:r("dir"),id:ep(s),disabled:p,"data-disabled":E(p),"aria-label":I.incrementLabel,type:"button",tabIndex:-1,"aria-controls":Lr(s),"data-scrubbing":E(h),onPointerDown(T){var O;p||!pe(T)||(i({type:"TRIGGER.PRESS_DOWN",hint:"increment",pointerType:T.pointerType}),T.pointerType==="mouse"&&T.preventDefault(),T.pointerType==="touch"&&((O=T.currentTarget)==null||O.focus({preventScroll:!0})))},onPointerUp(T){i({type:"TRIGGER.PRESS_UP",hint:"increment",pointerType:T.pointerType})},onPointerLeave(T){i({type:"TRIGGER.PRESS_UP",hint:"increment",pointerType:T.pointerType})}}))},getScrubberProps(){return t.element(y(g({},Vn.scrubber.attrs),{dir:r("dir"),"data-disabled":E(l),id:VT(s),role:"presentation","data-scrubbing":E(h),onMouseDown(T){if(l||!pe(T))return;let O=je(T),f=de(T.currentTarget).devicePixelRatio;O.x=O.x-Ci(7.5,f),O.y=O.y-Ci(7.5,f),i({type:"SCRUBBER.PRESS_DOWN",point:O}),T.preventDefault(),H(()=>{tr(ni(s))})},style:{cursor:l?void 0:"ew-resize"}}))}}}var Al,Rl,ya,Jg,vT,ET,IT,Qg,Wg,PT,zg,CT,TT,Vn,wT,Lr,ep,tp,VT,np,xT,ni,AT,kT,ip,NT,RT,DT,LT,MT,$T,HT,Nl,ti,BT,_T,GT,UT,Xg,Zg,qT,WT,vA,KT,zT,sp=re(()=>{"use strict";se();Al=new Map,Rl=!1;try{Rl=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch(e){}ya=!1;try{ya=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch(e){}Jg={degree:{narrow:{default:"\xB0","ja-JP":" \u5EA6","zh-TW":"\u5EA6","sl-SI":" \xB0"}}},vT=class{format(e){let t="";if(!Rl&&this.options.signDisplay!=null?t=bT(this.numberFormatter,this.options.signDisplay,e):t=this.numberFormatter.format(e),this.options.style==="unit"&&!ya){var n;let{unit:i,unitDisplay:r="short",locale:s}=this.resolvedOptions();if(!i)return t;let a=(n=Jg[i])===null||n===void 0?void 0:n[r];t+=a[s]||a.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(e,t);if(t= start date");return`${this.format(e)} \u2013 ${this.format(t)}`}formatRangeToParts(e,t){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(e,t);if(t= start date");let n=this.numberFormatter.formatToParts(e),i=this.numberFormatter.formatToParts(t);return[...n.map(r=>y(g({},r),{source:"startRange"})),{type:"literal",value:" \u2013 ",source:"shared"},...i.map(r=>y(g({},r),{source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!Rl&&this.options.signDisplay!=null&&(e=y(g({},e),{signDisplay:this.options.signDisplay})),!ya&&this.options.style==="unit"&&(e=y(g({},e),{style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay})),e}constructor(e,t={}){this.numberFormatter=yT(e,t),this.options=t}};ET=new RegExp("^.*\\(.*\\).*$"),IT=["latn","arab","hanidec","deva","beng","fullwide"],Qg=class{parse(e){return kl(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,n){return kl(this.locale,this.options,e).isValidPartialNumber(e,t,n)}getNumberingSystem(e){return kl(this.locale,this.options,e).options.numberingSystem}constructor(e,t={}){this.locale=e,this.options=t}},Wg=new Map;PT=class{parse(e){let t=this.sanitize(e);if(this.symbols.group&&(t=Ui(t,this.symbols.group,"")),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(t=t.replace(this.symbols.minusSign,"-")),t=t.replace(this.symbols.numeral,this.symbols.index),this.options.style==="percent"){let s=t.indexOf("-");t=t.replace("-",""),t=t.replace("+","");let a=t.indexOf(".");a===-1&&(a=t.length),t=t.replace(".",""),a-2===0?t=`0.${t}`:a-2===-1?t=`0.0${t}`:a-2===-2?t="0.00":t=`${t.slice(0,a-2)}.${t.slice(a-2)}`,s>-1&&(t=`-${t}`)}let n=t?+t:NaN;if(isNaN(n))return NaN;if(this.options.style==="percent"){var i,r;let s=y(g({},this.options),{style:"decimal",minimumFractionDigits:Math.min(((i=this.options.minimumFractionDigits)!==null&&i!==void 0?i:0)+2,20),maximumFractionDigits:Math.min(((r=this.options.maximumFractionDigits)!==null&&r!==void 0?r:0)+2,20)});return new Qg(this.locale,s).parse(new vT(this.locale,s).format(n))}return this.options.currencySign==="accounting"&&ET.test(e)&&(n=-1*n),n}sanitize(e){return e=e.replace(this.symbols.literals,""),this.symbols.minusSign&&(e=e.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(e=e.replace(",",this.symbols.decimal),e=e.replace("\u060C",this.symbols.decimal)),this.symbols.group&&(e=Ui(e,".",this.symbols.group))),this.symbols.group==="\u2019"&&e.includes("'")&&(e=Ui(e,"'",this.symbols.group)),this.options.locale==="fr-FR"&&this.symbols.group&&(e=Ui(e," ",this.symbols.group),e=Ui(e,/\u00A0/g,this.symbols.group)),e}isValidPartialNumber(e,t=-1/0,n=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&n>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(e=Ui(e,this.symbols.group,"")),e=e.replace(this.symbols.numeral,""),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,"")),e.length===0)}constructor(e,t={}){this.locale=e,t.roundingIncrement!==1&&t.roundingIncrement!=null&&(t.maximumFractionDigits==null&&t.minimumFractionDigits==null?(t.maximumFractionDigits=0,t.minimumFractionDigits=0):t.maximumFractionDigits==null?t.maximumFractionDigits=t.minimumFractionDigits:t.minimumFractionDigits==null&&(t.minimumFractionDigits=t.maximumFractionDigits)),this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=ST(e,this.formatter,this.options,t);var n,i;this.options.style==="percent"&&(((n=this.options.minimumFractionDigits)!==null&&n!==void 0?n:0)>18||((i=this.options.maximumFractionDigits)!==null&&i!==void 0?i:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}},zg=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),CT=[0,4,2,1,11,20,3,7,100,21,.1,1.1];TT=U("numberInput").parts("root","label","input","control","valueText","incrementTrigger","decrementTrigger","scrubber"),Vn=TT.build();wT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`number-input:${e.id}`},Lr=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.input)!=null?n:`number-input:${e.id}:input`},ep=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.incrementTrigger)!=null?n:`number-input:${e.id}:inc`},tp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.decrementTrigger)!=null?n:`number-input:${e.id}:dec`},VT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.scrubber)!=null?n:`number-input:${e.id}:scrubber`},np=e=>`number-input:${e.id}:cursor`,xT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`number-input:${e.id}:label`},ni=e=>e.getById(Lr(e)),AT=e=>e.getById(ep(e)),kT=e=>e.getById(tp(e)),ip=e=>e.getDoc().getElementById(np(e)),NT=(e,t)=>{let n=null;return t==="increment"&&(n=AT(e)),t==="decrement"&&(n=kT(e)),n},RT=(e,t)=>{if(!Xe())return MT(e,t),()=>{var n;(n=ip(e))==null||n.remove()}},DT=e=>{let t=e.getDoc(),n=t.documentElement,i=t.body;return i.style.pointerEvents="none",n.style.userSelect="none",n.style.cursor="ew-resize",()=>{i.style.pointerEvents="",n.style.userSelect="",n.style.cursor="",n.style.length||n.removeAttribute("style"),i.style.length||i.removeAttribute("style")}},LT=(e,t)=>{let{point:n,isRtl:i,event:r}=t,s=e.getWin(),a=Ci(r.movementX,s.devicePixelRatio),o=Ci(r.movementY,s.devicePixelRatio),l=a>0?"increment":a<0?"decrement":null;i&&l==="increment"&&(l="decrement"),i&&l==="decrement"&&(l="increment");let c={x:n.x+a,y:n.y+o},d=s.innerWidth,h=Ci(7.5,s.devicePixelRatio);return c.x=Zc(c.x+h,d)-h,{hint:l,point:c}},MT=(e,t)=>{let n=e.getDoc(),i=n.createElement("div");i.className="scrubber--cursor",i.id=np(e),Object.assign(i.style,{width:"15px",height:"15px",position:"fixed",pointerEvents:"none",left:"0px",top:"0px",zIndex:ss,transform:t?`translate3d(${t.x}px, ${t.y}px, 0px)`:void 0,willChange:"transform"}),i.innerHTML=` - `,n.body.appendChild(i)};$T=(e,t={})=>new Intl.NumberFormat(e,t),HT=(e,t={})=>new Qg(e,t),Nl=(e,t)=>{let{prop:n,computed:i}=t;return n("formatOptions")?e===""?Number.NaN:i("parser").parse(e):parseFloat(e)},ti=(e,t)=>{let{prop:n,computed:i}=t;return Number.isNaN(e)?"":n("formatOptions")?i("formatter").format(e):e.toString()},BT=(e,t)=>{let n=e!==void 0&&!Number.isNaN(e)?e:1;return(t==null?void 0:t.style)==="percent"&&(e===void 0||Number.isNaN(e))&&(n=.01),n},{choose:_T,guards:GT,createMachine:UT}=ut(),{not:Xg,and:Zg}=GT,qT=UT({props({props:e}){let t=BT(e.step,e.formatOptions);return y(g({dir:"ltr",locale:"en-US",focusInputOnChange:!0,clampValueOnBlur:!e.allowOverflow,allowOverflow:!1,inputMode:"decimal",pattern:"-?[0-9]*(.[0-9]+)?",defaultValue:"",step:t,min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,spinOnPress:!0},e),{translations:g({incrementLabel:"increment value",decrementLabel:"decrease value"},e.translations)})},initialState(){return"idle"},context({prop:e,bindable:t,getComputed:n}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(i){var a;let r=n(),s=Nl(i,{computed:r,prop:e});(a=e("onValueChange"))==null||a({value:i,valueAsNumber:s})}})),hint:t(()=>({defaultValue:null})),scrubberCursorPoint:t(()=>({defaultValue:null,hash(i){return i?`x:${i.x}, y:${i.y}`:""}})),fieldsetDisabled:t(()=>({defaultValue:!1}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",valueAsNumber:({context:e,computed:t,prop:n})=>Nl(e.get("value"),{computed:t,prop:n}),formattedValue:({computed:e,prop:t})=>ti(e("valueAsNumber"),{computed:e,prop:t}),isAtMin:({computed:e,prop:t})=>Qc(e("valueAsNumber"),t("min")),isAtMax:({computed:e,prop:t})=>Jc(e("valueAsNumber"),t("max")),isOutOfRange:({computed:e,prop:t})=>!Pi(e("valueAsNumber"),t("min"),t("max")),isValueEmpty:({context:e})=>e.get("value")==="",isDisabled:({prop:e,context:t})=>!!e("disabled")||t.get("fieldsetDisabled"),canIncrement:({prop:e,computed:t})=>e("allowOverflow")||!t("isAtMax"),canDecrement:({prop:e,computed:t})=>e("allowOverflow")||!t("isAtMin"),valueText:({prop:e,context:t})=>{var n,i;return(i=(n=e("translations")).valueText)==null?void 0:i.call(n,t.get("value"))},formatter:Bn(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>$T(e,t)),parser:Bn(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>HT(e,t))},watch({track:e,action:t,context:n,computed:i,prop:r}){e([()=>n.get("value"),()=>r("locale"),()=>JSON.stringify(r("formatOptions"))],()=>{t(["syncInputElement"])}),e([()=>i("isOutOfRange")],()=>{t(["invokeOnInvalid"])}),e([()=>n.hash("scrubberCursorPoint")],()=>{t(["setVirtualCursorPosition"])})},effects:["trackFormControl"],on:{"VALUE.SET":{actions:["setRawValue"]},"VALUE.CLEAR":{actions:["clearValue"]},"VALUE.INCREMENT":{actions:["increment"]},"VALUE.DECREMENT":{actions:["decrement"]}},states:{idle:{on:{"TRIGGER.PRESS_DOWN":[{guard:"isTouchPointer",target:"before:spin",actions:["setHint"]},{target:"before:spin",actions:["focusInput","invokeOnFocus","setHint"]}],"SCRUBBER.PRESS_DOWN":{target:"scrubbing",actions:["focusInput","invokeOnFocus","setHint","setCursorPoint"]},"INPUT.FOCUS":{target:"focused",actions:["focusInput","invokeOnFocus"]}}},focused:{tags:["focus"],effects:["attachWheelListener"],on:{"TRIGGER.PRESS_DOWN":[{guard:"isTouchPointer",target:"before:spin",actions:["setHint"]},{target:"before:spin",actions:["focusInput","setHint"]}],"SCRUBBER.PRESS_DOWN":{target:"scrubbing",actions:["focusInput","setHint","setCursorPoint"]},"INPUT.ARROW_UP":{actions:["increment"]},"INPUT.ARROW_DOWN":{actions:["decrement"]},"INPUT.HOME":{actions:["decrementToMin"]},"INPUT.END":{actions:["incrementToMax"]},"INPUT.CHANGE":{actions:["setValue","setHint"]},"INPUT.BLUR":[{guard:Zg("clampValueOnBlur",Xg("isInRange")),target:"idle",actions:["setClampedValue","clearHint","invokeOnBlur","invokeOnValueCommit"]},{guard:Xg("isInRange"),target:"idle",actions:["setFormattedValue","clearHint","invokeOnBlur","invokeOnInvalid","invokeOnValueCommit"]},{target:"idle",actions:["setFormattedValue","clearHint","invokeOnBlur","invokeOnValueCommit"]}],"INPUT.ENTER":{actions:["setFormattedValue","clearHint","invokeOnBlur","invokeOnValueCommit"]}}},"before:spin":{tags:["focus"],effects:["trackButtonDisabled","waitForChangeDelay"],entry:_T([{guard:"isIncrementHint",actions:["increment"]},{guard:"isDecrementHint",actions:["decrement"]}]),on:{CHANGE_DELAY:{target:"spinning",guard:Zg("isInRange","spinOnPress")},"TRIGGER.PRESS_UP":[{guard:"isTouchPointer",target:"focused",actions:["clearHint"]},{target:"focused",actions:["focusInput","clearHint"]}]}},spinning:{tags:["focus"],effects:["trackButtonDisabled","spinValue"],on:{SPIN:[{guard:"isIncrementHint",actions:["increment"]},{guard:"isDecrementHint",actions:["decrement"]}],"TRIGGER.PRESS_UP":{target:"focused",actions:["focusInput","clearHint"]}}},scrubbing:{tags:["focus"],effects:["activatePointerLock","trackMousemove","setupVirtualCursor","preventTextSelection"],on:{"SCRUBBER.POINTER_UP":{target:"focused",actions:["focusInput","clearCursorPoint"]},"SCRUBBER.POINTER_MOVE":[{guard:"isIncrementHint",actions:["increment","setCursorPoint"]},{guard:"isDecrementHint",actions:["decrement","setCursorPoint"]}]}}},implementations:{guards:{clampValueOnBlur:({prop:e})=>e("clampValueOnBlur"),spinOnPress:({prop:e})=>!!e("spinOnPress"),isInRange:({computed:e})=>!e("isOutOfRange"),isDecrementHint:({context:e,event:t})=>{var n;return((n=t.hint)!=null?n:e.get("hint"))==="decrement"},isIncrementHint:({context:e,event:t})=>{var n;return((n=t.hint)!=null?n:e.get("hint"))==="increment"},isTouchPointer:({event:e})=>e.pointerType==="touch"},effects:{waitForChangeDelay({send:e}){let t=setTimeout(()=>{e({type:"CHANGE_DELAY"})},300);return()=>clearTimeout(t)},spinValue({send:e}){let t=setInterval(()=>{e({type:"SPIN"})},50);return()=>clearInterval(t)},trackFormControl({context:e,scope:t}){let n=ni(t);return wt(n,{onFieldsetDisabledChange(i){e.set("fieldsetDisabled",i)},onFormReset(){e.set("value",e.initial("value"))}})},setupVirtualCursor({context:e,scope:t}){let n=e.get("scrubberCursorPoint");return RT(t,n)},preventTextSelection({scope:e}){return DT(e)},trackButtonDisabled({context:e,scope:t,send:n}){let i=e.get("hint"),r=NT(t,i);return ot(r,{attributes:["disabled"],callback(){n({type:"TRIGGER.PRESS_UP",src:"attr"})}})},attachWheelListener({scope:e,send:t,prop:n}){let i=ni(e);if(!i||!e.isActiveElement(i)||!n("allowMouseWheel"))return;function r(s){s.preventDefault();let a=Math.sign(s.deltaY)*-1;a===1?t({type:"VALUE.INCREMENT"}):a===-1&&t({type:"VALUE.DECREMENT"})}return ee(i,"wheel",r,{passive:!1})},activatePointerLock({scope:e}){if(!Xe())return Mc(e.getDoc())},trackMousemove({scope:e,send:t,context:n,computed:i}){let r=e.getDoc();function s(o){let l=n.get("scrubberCursorPoint"),c=i("isRtl"),u=LT(e,{point:l,isRtl:c,event:o});u.hint&&t({type:"SCRUBBER.POINTER_MOVE",hint:u.hint,point:u.point})}function a(){t({type:"SCRUBBER.POINTER_UP"})}return At(ee(r,"mousemove",s,!1),ee(r,"mouseup",a,!1))}},actions:{focusInput({scope:e,prop:t}){if(!t("focusInputOnChange"))return;let n=ni(e);e.isActiveElement(n)||H(()=>n==null?void 0:n.focus({preventScroll:!0}))},increment({context:e,event:t,prop:n,computed:i}){var s;let r=nu(i("valueAsNumber"),(s=t.step)!=null?s:n("step"));n("allowOverflow")||(r=He(r,n("min"),n("max"))),e.set("value",ti(r,{computed:i,prop:n}))},decrement({context:e,event:t,prop:n,computed:i}){var s;let r=iu(i("valueAsNumber"),(s=t.step)!=null?s:n("step"));n("allowOverflow")||(r=He(r,n("min"),n("max"))),e.set("value",ti(r,{computed:i,prop:n}))},setClampedValue({context:e,prop:t,computed:n}){let i=He(n("valueAsNumber"),t("min"),t("max"));e.set("value",ti(i,{computed:n,prop:t}))},setRawValue({context:e,event:t,prop:n,computed:i}){let r=Nl(t.value,{computed:i,prop:n});n("allowOverflow")||(r=He(r,n("min"),n("max"))),e.set("value",ti(r,{computed:i,prop:n}))},setValue({context:e,event:t}){var i,r;let n=(r=(i=t.target)==null?void 0:i.value)!=null?r:t.value;e.set("value",n)},clearValue({context:e}){e.set("value","")},incrementToMax({context:e,prop:t,computed:n}){let i=ti(t("max"),{computed:n,prop:t});e.set("value",i)},decrementToMin({context:e,prop:t,computed:n}){let i=ti(t("min"),{computed:n,prop:t});e.set("value",i)},setHint({context:e,event:t}){e.set("hint",t.hint)},clearHint({context:e}){e.set("hint",null)},invokeOnFocus({computed:e,prop:t}){var n;(n=t("onFocusChange"))==null||n({focused:!0,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnBlur({computed:e,prop:t}){var n;(n=t("onFocusChange"))==null||n({focused:!1,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnInvalid({computed:e,prop:t,event:n}){var r;if(n.type==="INPUT.CHANGE")return;let i=e("valueAsNumber")>t("max")?"rangeOverflow":"rangeUnderflow";(r=t("onValueInvalid"))==null||r({reason:i,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnValueCommit({computed:e,prop:t}){var n;(n=t("onValueCommit"))==null||n({value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},syncInputElement({context:e,event:t,computed:n,scope:i}){var o;let r=t.type.endsWith("CHANGE")?e.get("value"):n("formattedValue"),s=ni(i),a=(o=t.selection)!=null?o:Dl(s,i);H(()=>{Me(s,r),OT(s,a,i)})},setFormattedValue({context:e,computed:t,action:n}){e.set("value",t("formattedValue")),n(["syncInputElement"])},setCursorPoint({context:e,event:t}){e.set("scrubberCursorPoint",t.point)},clearCursorPoint({context:e}){e.set("scrubberCursorPoint",null)},setVirtualCursorPosition({context:e,scope:t}){let n=ip(t),i=e.get("scrubberCursorPoint");!n||!i||(n.style.transform=`translate3d(${i.x}px, ${i.y}px, 0px)`)}}}}),WT=_()(["allowMouseWheel","allowOverflow","clampValueOnBlur","dir","disabled","focusInputOnChange","form","formatOptions","getRootNode","id","ids","inputMode","invalid","locale","max","min","name","onFocusChange","onValueChange","onValueCommit","onValueInvalid","pattern","required","readOnly","spinOnPress","step","translations","value","defaultValue"]),vA=B(WT),KT=class extends K{initMachine(e){return new W(qT,e)}initApi(){return FT(this.machine.service,q)}render(){var l;let e=(l=this.el.querySelector('[data-scope="number-input"][data-part="root"]'))!=null?l:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="number-input"][data-part="label"]');t&&this.spreadProps(t,this.api.getLabelProps());let n=this.el.querySelector('[data-scope="number-input"][data-part="control"]');n&&this.spreadProps(n,this.api.getControlProps());let i=this.el.querySelector('[data-scope="number-input"][data-part="value-text"]');i&&this.spreadProps(i,this.api.getValueTextProps());let r=this.el.querySelector('[data-scope="number-input"][data-part="input"]');r&&this.spreadProps(r,this.api.getInputProps());let s=this.el.querySelector('[data-scope="number-input"][data-part="decrement-trigger"]');s&&this.spreadProps(s,this.api.getDecrementTriggerProps());let a=this.el.querySelector('[data-scope="number-input"][data-part="increment-trigger"]');a&&this.spreadProps(a,this.api.getIncrementTriggerProps());let o=this.el.querySelector('[data-scope="number-input"][data-part="scrubber"]');o&&(this.spreadProps(o,this.api.getScrubberProps()),o.setAttribute("aria-label","Scrub to adjust value"),o.removeAttribute("role"))}},zT={mounted(){let e=this.el,t=w(e,"value"),n=w(e,"defaultValue"),i=C(e,"controlled"),r=new KT(e,y(g({id:e.id},i&&t!==void 0?{value:t}:{defaultValue:n}),{min:z(e,"min"),max:z(e,"max"),step:z(e,"step"),disabled:C(e,"disabled"),readOnly:C(e,"readOnly"),invalid:C(e,"invalid"),required:C(e,"required"),allowMouseWheel:C(e,"allowMouseWheel"),name:w(e,"name"),form:w(e,"form"),onValueChange:s=>{let a=e.querySelector('[data-scope="number-input"][data-part="input"]');a&&(a.value=s.value,a.dispatchEvent(new Event("input",{bubbles:!0})),a.dispatchEvent(new Event("change",{bubbles:!0})));let o=w(e,"onValueChange");o&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(o,{value:s.value,valueAsNumber:s.valueAsNumber,id:e.id});let l=w(e,"onValueChangeClient");l&&e.dispatchEvent(new CustomEvent(l,{bubbles:!0,detail:{value:s,id:e.id}}))}}));r.init(),this.numberInput=r,this.handlers=[]},updated(){var n;let e=w(this.el,"value"),t=C(this.el,"controlled");(n=this.numberInput)==null||n.updateProps(y(g({id:this.el.id},t&&e!==void 0?{value:e}:{}),{min:z(this.el,"min"),max:z(this.el,"max"),step:z(this.el,"step"),disabled:C(this.el,"disabled"),readOnly:C(this.el,"readOnly"),invalid:C(this.el,"invalid"),required:C(this.el,"required"),name:w(this.el,"name"),form:w(this.el,"form")}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.numberInput)==null||e.destroy()}}});var ap={};he(ap,{PasswordInput:()=>eO});function jT(e,t){let{scope:n,prop:i,context:r}=e,s=r.get("visible"),a=!!i("disabled"),o=!!i("invalid"),l=!!i("readOnly"),c=!!i("required"),u=!(l||a),h=i("translations");return{visible:s,disabled:a,invalid:o,focus(){var m;(m=Ll(n))==null||m.focus()},setVisible(m){e.send({type:"VISIBILITY.SET",value:m})},toggleVisible(){e.send({type:"VISIBILITY.SET",value:!s})},getRootProps(){return t.element(y(g({},qi.root.attrs),{dir:i("dir"),"data-disabled":E(a),"data-invalid":E(o),"data-readonly":E(l)}))},getLabelProps(){return t.label(y(g({},qi.label.attrs),{htmlFor:ba(n),"data-disabled":E(a),"data-invalid":E(o),"data-readonly":E(l),"data-required":E(c)}))},getInputProps(){return t.input(g(y(g({},qi.input.attrs),{id:ba(n),autoCapitalize:"off",name:i("name"),required:i("required"),autoComplete:i("autoComplete"),spellCheck:!1,readOnly:l,disabled:a,type:s?"text":"password","data-state":s?"visible":"hidden","aria-invalid":X(o),"data-disabled":E(a),"data-invalid":E(o),"data-readonly":E(l)}),i("ignorePasswordManagers")?XT:{}))},getVisibilityTriggerProps(){var m;return t.button(y(g({},qi.visibilityTrigger.attrs),{type:"button",tabIndex:-1,"aria-controls":ba(n),"aria-expanded":s,"data-readonly":E(l),disabled:a,"data-disabled":E(a),"data-state":s?"visible":"hidden","aria-label":(m=h==null?void 0:h.visibilityTrigger)==null?void 0:m.call(h,s),onPointerDown(d){pe(d)&&u&&(d.preventDefault(),e.send({type:"TRIGGER.CLICK"}))}}))},getIndicatorProps(){return t.element(y(g({},qi.indicator.attrs),{"aria-hidden":!0,"data-state":s?"visible":"hidden","data-disabled":E(a),"data-invalid":E(o),"data-readonly":E(l)}))},getControlProps(){return t.element(y(g({},qi.control.attrs),{"data-disabled":E(a),"data-invalid":E(o),"data-readonly":E(l)}))}}}var YT,qi,ba,Ll,XT,ZT,JT,SA,QT,eO,op=re(()=>{"use strict";se();YT=U("password-input").parts("root","input","label","control","indicator","visibilityTrigger"),qi=YT.build(),ba=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.input)!=null?n:`p-input-${e.id}-input`},Ll=e=>e.getById(ba(e));XT={"data-1p-ignore":"","data-lpignore":"true","data-bwignore":"true","data-form-type":"other","data-protonpass-ignore":"true"},ZT={props({props:e}){return y(g({id:ur(),defaultVisible:!1,autoComplete:"current-password",ignorePasswordManagers:!1},e),{translations:g({visibilityTrigger(t){return t?"Hide password":"Show password"}},e.translations)})},context({prop:e,bindable:t}){return{visible:t(()=>({value:e("visible"),defaultValue:e("defaultVisible"),onChange(n){var i;(i=e("onVisibilityChange"))==null||i({visible:n})}}))}},initialState(){return"idle"},effects:["trackFormEvents"],states:{idle:{on:{"VISIBILITY.SET":{actions:["setVisibility"]},"TRIGGER.CLICK":{actions:["toggleVisibility","focusInputEl"]}}}},implementations:{actions:{setVisibility({context:e,event:t}){e.set("visible",t.value)},toggleVisibility({context:e}){e.set("visible",t=>!t)},focusInputEl({scope:e}){let t=Ll(e);t==null||t.focus()}},effects:{trackFormEvents({scope:e,send:t}){let n=Ll(e),i=n==null?void 0:n.form;if(!i)return;let r=e.getWin(),s=new r.AbortController;return i.addEventListener("reset",a=>{a.defaultPrevented||t({type:"VISIBILITY.SET",value:!1})},{signal:s.signal}),i.addEventListener("submit",()=>{t({type:"VISIBILITY.SET",value:!1})},{signal:s.signal}),()=>s.abort()}}}},JT=_()(["defaultVisible","dir","id","onVisibilityChange","visible","ids","getRootNode","disabled","invalid","required","readOnly","translations","ignorePasswordManagers","autoComplete","name"]),SA=B(JT),QT=class extends K{initMachine(e){return new W(ZT,e)}initApi(){return jT(this.machine.service,q)}render(){var a;let e=(a=this.el.querySelector('[data-scope="password-input"][data-part="root"]'))!=null?a:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="password-input"][data-part="label"]');t&&this.spreadProps(t,this.api.getLabelProps());let n=this.el.querySelector('[data-scope="password-input"][data-part="control"]');n&&this.spreadProps(n,this.api.getControlProps());let i=this.el.querySelector('[data-scope="password-input"][data-part="input"]');i&&this.spreadProps(i,this.api.getInputProps());let r=this.el.querySelector('[data-scope="password-input"][data-part="visibility-trigger"]');r&&this.spreadProps(r,this.api.getVisibilityTriggerProps());let s=this.el.querySelector('[data-scope="password-input"][data-part="indicator"]');s&&this.spreadProps(s,this.api.getIndicatorProps())}},eO={mounted(){let e=this.el,t=new QT(e,y(g({id:e.id},C(e,"controlledVisible")?{visible:C(e,"visible")}:{defaultVisible:C(e,"defaultVisible")}),{disabled:C(e,"disabled"),invalid:C(e,"invalid"),readOnly:C(e,"readOnly"),required:C(e,"required"),ignorePasswordManagers:C(e,"ignorePasswordManagers"),name:w(e,"name"),dir:Oe(e),autoComplete:w(e,"autoComplete",["current-password","new-password"]),onVisibilityChange:n=>{let i=w(e,"onVisibilityChange");i&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(i,{visible:n.visible,id:e.id});let r=w(e,"onVisibilityChangeClient");r&&e.dispatchEvent(new CustomEvent(r,{bubbles:!0,detail:{value:n,id:e.id}}))}}));t.init(),this.passwordInput=t,this.handlers=[]},updated(){var e;(e=this.passwordInput)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlledVisible")?{visible:C(this.el,"visible")}:{}),{disabled:C(this.el,"disabled"),invalid:C(this.el,"invalid"),readOnly:C(this.el,"readOnly"),required:C(this.el,"required"),name:w(this.el,"name"),form:w(this.el,"form"),dir:Oe(this.el)}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.passwordInput)==null||e.destroy()}}});var dp={};he(dp,{PinInput:()=>fO});function lO(e,t){var n;return e?!!((n=oO[e])!=null&&n.test(t)):!0}function cp(e,t,n){return n?new RegExp(n,"g").test(e):lO(t,e)}function cO(e,t){let{send:n,context:i,computed:r,prop:s,scope:a}=e,o=r("isValueComplete"),l=!!s("disabled"),c=!!s("readOnly"),u=!!s("invalid"),h=!!s("required"),m=s("translations"),d=i.get("focusedIndex");function p(){var v;(v=aO(a))==null||v.focus()}return{focus:p,count:i.get("count"),items:Array.from({length:i.get("count")}).map((v,I)=>I),value:i.get("value"),valueAsString:r("valueAsString"),complete:o,setValue(v){Array.isArray(v)||vs("[pin-input/setValue] value must be an array"),n({type:"VALUE.SET",value:v})},clearValue(){n({type:"VALUE.CLEAR"})},setValueAtIndex(v,I){n({type:"VALUE.SET",value:I,index:v})},getRootProps(){return t.element(y(g({dir:s("dir")},Ea.root.attrs),{id:Fr(a),"data-invalid":E(u),"data-disabled":E(l),"data-complete":E(o),"data-readonly":E(c)}))},getLabelProps(){return t.label(y(g({},Ea.label.attrs),{dir:s("dir"),htmlFor:Fl(a),id:iO(a),"data-invalid":E(u),"data-disabled":E(l),"data-complete":E(o),"data-required":E(h),"data-readonly":E(c),onClick(v){v.preventDefault(),p()}}))},getHiddenInputProps(){return t.input({"aria-hidden":!0,type:"text",tabIndex:-1,id:Fl(a),readOnly:c,disabled:l,required:h,name:s("name"),form:s("form"),style:Vt,maxLength:r("valueLength"),defaultValue:r("valueAsString")})},getControlProps(){return t.element(y(g({},Ea.control.attrs),{dir:s("dir"),id:rO(a)}))},getInputProps(v){var O;let{index:I}=v,T=s("type")==="numeric"?"tel":"text";return t.input(y(g({},Ea.input.attrs),{dir:s("dir"),disabled:l,"data-disabled":E(l),"data-complete":E(o),id:nO(a,I.toString()),"data-index":I,"data-ownedby":Fr(a),"aria-label":(O=m==null?void 0:m.inputLabel)==null?void 0:O.call(m,I,r("valueLength")),inputMode:s("otp")||s("type")==="numeric"?"numeric":"text","aria-invalid":X(u),"data-invalid":E(u),type:s("mask")?"password":T,defaultValue:i.get("value")[I]||"",readOnly:c,autoCapitalize:"none",autoComplete:s("otp")?"one-time-code":"off",placeholder:d===I?"":s("placeholder"),onPaste(b){var P;let f=(P=b.clipboardData)==null?void 0:P.getData("text/plain");if(!f)return;if(!cp(f,s("type"),s("pattern"))){n({type:"VALUE.INVALID",value:f}),b.preventDefault();return}b.preventDefault(),n({type:"INPUT.PASTE",value:f})},onBeforeInput(b){try{let f=Oc(b);cp(f,s("type"),s("pattern"))||(n({type:"VALUE.INVALID",value:f}),b.preventDefault()),f.length>1&&b.currentTarget.setSelectionRange(0,1,"forward")}catch(f){}},onChange(b){let f=Yt(b),{value:S}=b.currentTarget;if(f.inputType==="insertFromPaste"){b.currentTarget.value=S[0]||"";return}if(S.length>2){n({type:"INPUT.PASTE",value:S}),b.currentTarget.value=S[0],b.preventDefault();return}if(f.inputType==="deleteContentBackward"){n({type:"INPUT.BACKSPACE"});return}n({type:"INPUT.CHANGE",value:S,index:I})},onKeyDown(b){if(b.defaultPrevented||Re(b)||xe(b))return;let S={Backspace(){n({type:"INPUT.BACKSPACE"})},Delete(){n({type:"INPUT.DELETE"})},ArrowLeft(){n({type:"INPUT.ARROW_LEFT"})},ArrowRight(){n({type:"INPUT.ARROW_RIGHT"})},Enter(){n({type:"INPUT.ENTER"})}}[ge(b,{dir:s("dir"),orientation:"horizontal"})];S&&(S(b),b.preventDefault())},onFocus(){n({type:"INPUT.FOCUS",index:I})},onBlur(b){let f=b.relatedTarget;le(f)&&f.dataset.ownedby===Fr(a)||n({type:"INPUT.BLUR",index:I})}}))}}}function up(e,t){let n=t;e[0]===t[0]?n=t[1]:e[0]===t[1]&&(n=t[0]);let i=n.split("");return n=i[i.length-1],n!=null?n:""}function Ia(e,t){return Array.from({length:t}).fill("").map((n,i)=>e[i]||n)}var tO,Ea,Fr,nO,Fl,iO,rO,sO,Pa,Mr,aO,lp,Ml,oO,uO,dO,hO,gO,VA,pO,fO,hp=re(()=>{"use strict";se();tO=U("pinInput").parts("root","label","input","control"),Ea=tO.build(),Fr=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`pin-input:${e.id}`},nO=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.input)==null?void 0:i.call(n,t))!=null?r:`pin-input:${e.id}:${t}`},Fl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.hiddenInput)!=null?n:`pin-input:${e.id}:hidden`},iO=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`pin-input:${e.id}:label`},rO=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`pin-input:${e.id}:control`},sO=e=>e.getById(Fr(e)),Pa=e=>{let n=`input[data-ownedby=${CSS.escape(Fr(e))}]`;return Fe(sO(e),n)},Mr=(e,t)=>Pa(e)[t],aO=e=>Pa(e)[0],lp=e=>e.getById(Fl(e)),Ml=(e,t)=>{e.value=t,e.setAttribute("value",t)},oO={numeric:/^[0-9]+$/,alphabetic:/^[A-Za-z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/i};({choose:uO,createMachine:dO}=ut()),hO=dO({props({props:e}){return y(g({placeholder:"\u25CB",otp:!1,type:"numeric",defaultValue:e.count?Ia([],e.count):[]},e),{translations:g({inputLabel:(t,n)=>`pin code ${t+1} of ${n}`},e.translations)})},initialState(){return"idle"},context({prop:e,bindable:t}){return{value:t(()=>({value:e("value"),defaultValue:e("defaultValue"),isEqual:fe,onChange(n){var i;(i=e("onValueChange"))==null||i({value:n,valueAsString:n.join("")})}})),focusedIndex:t(()=>({sync:!0,defaultValue:-1})),count:t(()=>({defaultValue:e("count")}))}},computed:{_value:({context:e})=>Ia(e.get("value"),e.get("count")),valueLength:({computed:e})=>e("_value").length,filledValueLength:({computed:e})=>e("_value").filter(t=>(t==null?void 0:t.trim())!=="").length,isValueComplete:({computed:e})=>e("valueLength")===e("filledValueLength"),valueAsString:({computed:e})=>e("_value").join(""),focusedValue:({computed:e,context:t})=>e("_value")[t.get("focusedIndex")]||""},entry:uO([{guard:"autoFocus",actions:["setInputCount","setFocusIndexToFirst"]},{actions:["setInputCount"]}]),watch({action:e,track:t,context:n,computed:i}){t([()=>n.get("focusedIndex")],()=>{e(["focusInput","selectInputIfNeeded"])}),t([()=>n.get("value").join(",")],()=>{e(["syncInputElements","dispatchInputEvent"])}),t([()=>i("isValueComplete")],()=>{e(["invokeOnComplete","blurFocusedInputIfNeeded"])})},on:{"VALUE.SET":[{guard:"hasIndex",actions:["setValueAtIndex"]},{actions:["setValue"]}],"VALUE.CLEAR":{actions:["clearValue","setFocusIndexToFirst"]}},states:{idle:{on:{"INPUT.FOCUS":{target:"focused",actions:["setFocusedIndex"]}}},focused:{on:{"INPUT.CHANGE":{actions:["setFocusedValue","syncInputValue","setNextFocusedIndex"]},"INPUT.PASTE":{actions:["setPastedValue","setLastValueFocusIndex"]},"INPUT.FOCUS":{actions:["setFocusedIndex"]},"INPUT.BLUR":{target:"idle",actions:["clearFocusedIndex"]},"INPUT.DELETE":{guard:"hasValue",actions:["clearFocusedValue"]},"INPUT.ARROW_LEFT":{actions:["setPrevFocusedIndex"]},"INPUT.ARROW_RIGHT":{actions:["setNextFocusedIndex"]},"INPUT.BACKSPACE":[{guard:"hasValue",actions:["clearFocusedValue"]},{actions:["setPrevFocusedIndex","clearFocusedValue"]}],"INPUT.ENTER":{guard:"isValueComplete",actions:["requestFormSubmit"]},"VALUE.INVALID":{actions:["invokeOnInvalid"]}}}},implementations:{guards:{autoFocus:({prop:e})=>!!e("autoFocus"),hasValue:({context:e})=>e.get("value")[e.get("focusedIndex")]!=="",isValueComplete:({computed:e})=>e("isValueComplete"),hasIndex:({event:e})=>e.index!==void 0},actions:{dispatchInputEvent({computed:e,scope:t}){let n=lp(t);Ac(n,{value:e("valueAsString")})},setInputCount({scope:e,context:t,prop:n}){if(n("count"))return;let i=Pa(e);t.set("count",i.length)},focusInput({context:e,scope:t}){var i;let n=e.get("focusedIndex");n!==-1&&((i=Mr(t,n))==null||i.focus({preventScroll:!0}))},selectInputIfNeeded({context:e,prop:t,scope:n}){let i=e.get("focusedIndex");!t("selectOnFocus")||i===-1||H(()=>{var r;(r=Mr(n,i))==null||r.select()})},invokeOnComplete({computed:e,prop:t}){var n;e("isValueComplete")&&((n=t("onValueComplete"))==null||n({value:e("_value"),valueAsString:e("valueAsString")}))},invokeOnInvalid({context:e,event:t,prop:n}){var i;(i=n("onValueInvalid"))==null||i({value:t.value,index:e.get("focusedIndex")})},clearFocusedIndex({context:e}){e.set("focusedIndex",-1)},setFocusedIndex({context:e,event:t}){e.set("focusedIndex",t.index)},setValue({context:e,event:t}){let n=Ia(t.value,e.get("count"));e.set("value",n)},setFocusedValue({context:e,event:t,computed:n,flush:i}){let r=n("focusedValue"),s=e.get("focusedIndex"),a=up(r,t.value);i(()=>{e.set("value",ms(n("_value"),s,a))})},revertInputValue({context:e,computed:t,scope:n}){let i=Mr(n,e.get("focusedIndex"));Ml(i,t("focusedValue"))},syncInputValue({context:e,event:t,scope:n}){let i=e.get("value"),r=Mr(n,t.index);Ml(r,i[t.index])},syncInputElements({context:e,scope:t}){let n=Pa(t),i=e.get("value");n.forEach((r,s)=>{Ml(r,i[s])})},setPastedValue({context:e,event:t,computed:n,flush:i}){H(()=>{let r=n("valueAsString"),s=e.get("focusedIndex"),a=n("valueLength"),o=n("filledValueLength"),l=Math.min(s,o),c=l>0?r.substring(0,s):"",u=t.value.substring(0,a-l),h=Ia(`${c}${u}`.split(""),a);i(()=>{e.set("value",h)})})},setValueAtIndex({context:e,event:t,computed:n}){let i=up(n("focusedValue"),t.value);e.set("value",ms(n("_value"),t.index,i))},clearValue({context:e}){let t=Array.from({length:e.get("count")}).fill("");queueMicrotask(()=>{e.set("value",t)})},clearFocusedValue({context:e,computed:t}){let n=e.get("focusedIndex");n!==-1&&e.set("value",ms(t("_value"),n,""))},setFocusIndexToFirst({context:e}){e.set("focusedIndex",0)},setNextFocusedIndex({context:e,computed:t}){e.set("focusedIndex",Math.min(e.get("focusedIndex")+1,t("valueLength")-1))},setPrevFocusedIndex({context:e}){e.set("focusedIndex",Math.max(e.get("focusedIndex")-1,0))},setLastValueFocusIndex({context:e,computed:t}){H(()=>{e.set("focusedIndex",Math.min(t("filledValueLength"),t("valueLength")-1))})},blurFocusedInputIfNeeded({context:e,prop:t,scope:n}){t("blurOnComplete")&&H(()=>{var i;(i=Mr(n,e.get("focusedIndex")))==null||i.blur()})},requestFormSubmit({computed:e,prop:t,scope:n}){var r;if(!t("name")||!e("isValueComplete"))return;let i=lp(n);(r=i==null?void 0:i.form)==null||r.requestSubmit()}}}});gO=_()(["autoFocus","blurOnComplete","count","defaultValue","dir","disabled","form","getRootNode","id","ids","invalid","mask","name","onValueChange","onValueComplete","onValueInvalid","otp","pattern","placeholder","readOnly","required","selectOnFocus","translations","type","value"]),VA=B(gO),pO=class extends K{initMachine(e){return new W(hO,e)}initApi(){return cO(this.machine.service,q)}render(){var r;let e=(r=this.el.querySelector('[data-scope="pin-input"][data-part="root"]'))!=null?r:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="pin-input"][data-part="label"]');t&&this.spreadProps(t,this.api.getLabelProps());let n=this.el.querySelector('[data-scope="pin-input"][data-part="hidden-input"]');n&&this.spreadProps(n,this.api.getHiddenInputProps());let i=this.el.querySelector('[data-scope="pin-input"][data-part="control"]');i&&this.spreadProps(i,this.api.getControlProps()),this.api.items.forEach(s=>{let a=this.el.querySelector(`[data-scope="pin-input"][data-part="input"][data-index="${s}"]`);a&&this.spreadProps(a,this.api.getInputProps({index:s}))})}},fO={mounted(){var s;let e=this.el,t=Z(e,"value"),n=Z(e,"defaultValue"),i=C(e,"controlled"),r=new pO(e,y(g({id:e.id,count:(s=z(e,"count"))!=null?s:4},i&&t?{value:t}:{defaultValue:n!=null?n:[]}),{disabled:C(e,"disabled"),invalid:C(e,"invalid"),required:C(e,"required"),readOnly:C(e,"readOnly"),mask:C(e,"mask"),otp:C(e,"otp"),blurOnComplete:C(e,"blurOnComplete"),selectOnFocus:C(e,"selectOnFocus"),name:w(e,"name"),form:w(e,"form"),dir:w(e,"dir",["ltr","rtl"]),type:w(e,"type",["alphanumeric","numeric","alphabetic"]),placeholder:w(e,"placeholder"),onValueChange:a=>{let o=e.querySelector('[data-scope="pin-input"][data-part="hidden-input"]');o&&(o.value=a.valueAsString,o.dispatchEvent(new Event("input",{bubbles:!0})),o.dispatchEvent(new Event("change",{bubbles:!0})));let l=w(e,"onValueChange");l&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(l,{value:a.value,valueAsString:a.valueAsString,id:e.id});let c=w(e,"onValueChangeClient");c&&e.dispatchEvent(new CustomEvent(c,{bubbles:!0,detail:{value:a,id:e.id}}))},onValueComplete:a=>{let o=w(e,"onValueComplete");o&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(o,{value:a.value,valueAsString:a.valueAsString,id:e.id})}}));r.init(),this.pinInput=r,this.handlers=[]},updated(){var n,i,r,s;let e=Z(this.el,"value"),t=C(this.el,"controlled");(s=this.pinInput)==null||s.updateProps(y(g({id:this.el.id,count:(r=(i=z(this.el,"count"))!=null?i:(n=this.pinInput)==null?void 0:n.api.count)!=null?r:4},t&&e?{value:e}:{}),{disabled:C(this.el,"disabled"),invalid:C(this.el,"invalid"),required:C(this.el,"required"),readOnly:C(this.el,"readOnly"),name:w(this.el,"name"),form:w(this.el,"form")}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.pinInput)==null||e.destroy()}}});var vp={};he(vp,{RadioGroup:()=>kO});function TO(e,t){let{context:n,send:i,computed:r,prop:s,scope:a}=e,o=r("isDisabled"),l=s("invalid"),c=s("readOnly");function u(d){return{value:d.value,invalid:!!d.invalid||!!l,disabled:!!d.disabled||o,checked:n.get("value")===d.value,focused:n.get("focusedValue")===d.value,focusVisible:n.get("focusVisibleValue")===d.value,hovered:n.get("hoveredValue")===d.value,active:n.get("activeValue")===d.value}}function h(d){let p=u(d);return{"data-focus":E(p.focused),"data-focus-visible":E(p.focusVisible),"data-disabled":E(p.disabled),"data-readonly":E(c),"data-state":p.checked?"checked":"unchecked","data-hover":E(p.hovered),"data-invalid":E(p.invalid),"data-orientation":s("orientation"),"data-ssr":E(n.get("ssr"))}}let m=()=>{var p;let d=(p=PO(a))!=null?p:IO(a);d==null||d.focus()};return{focus:m,value:n.get("value"),setValue(d){i({type:"SET_VALUE",value:d,isTrusted:!1})},clearValue(){i({type:"SET_VALUE",value:null,isTrusted:!1})},getRootProps(){return t.element(y(g({},Wi.root.attrs),{role:"radiogroup",id:Ca(a),"aria-labelledby":gp(a),"aria-required":s("required")||void 0,"aria-disabled":o||void 0,"aria-readonly":c||void 0,"data-orientation":s("orientation"),"data-disabled":E(o),"data-invalid":E(l),"data-required":E(s("required")),"aria-orientation":s("orientation"),dir:s("dir"),style:{position:"relative"}}))},getLabelProps(){return t.element(y(g({},Wi.label.attrs),{dir:s("dir"),"data-orientation":s("orientation"),"data-disabled":E(o),"data-invalid":E(l),"data-required":E(s("required")),id:gp(a),onClick:m}))},getItemState:u,getItemProps(d){let p=u(d);return t.label(y(g(y(g({},Wi.item.attrs),{dir:s("dir"),id:fp(a,d.value),htmlFor:$l(a,d.value)}),h(d)),{onPointerMove(){p.disabled||p.hovered||i({type:"SET_HOVERED",value:d.value,hovered:!0})},onPointerLeave(){p.disabled||i({type:"SET_HOVERED",value:null})},onPointerDown(v){p.disabled||pe(v)&&(p.focused&&v.pointerType==="mouse"&&v.preventDefault(),i({type:"SET_ACTIVE",value:d.value,active:!0}))},onPointerUp(){p.disabled||i({type:"SET_ACTIVE",value:null})},onClick(){var v;!p.disabled&&Xe()&&((v=bO(a,d.value))==null||v.focus())}}))},getItemTextProps(d){return t.element(g(y(g({},Wi.itemText.attrs),{dir:s("dir"),id:yO(a,d.value)}),h(d)))},getItemControlProps(d){let p=u(d);return t.element(g(y(g({},Wi.itemControl.attrs),{dir:s("dir"),id:vO(a,d.value),"data-active":E(p.active),"aria-hidden":!0}),h(d)))},getItemHiddenInputProps(d){let p=u(d);return t.input({"data-ownedby":Ca(a),id:$l(a,d.value),type:"radio",name:s("name")||s("id"),form:s("form"),value:d.value,required:s("required"),"aria-invalid":p.invalid||void 0,onClick(v){if(c){v.preventDefault();return}v.currentTarget.checked&&i({type:"SET_VALUE",value:d.value,isTrusted:!0})},onBlur(){i({type:"SET_FOCUSED",value:null,focused:!1,focusVisible:!1})},onFocus(){let v=En();i({type:"SET_FOCUSED",value:d.value,focused:!0,focusVisible:v})},onKeyDown(v){v.defaultPrevented||v.key===" "&&i({type:"SET_ACTIVE",value:d.value,active:!0})},onKeyUp(v){v.defaultPrevented||v.key===" "&&i({type:"SET_ACTIVE",value:null})},disabled:p.disabled||c,defaultChecked:p.checked,style:Vt})},getIndicatorProps(){let d=n.get("indicatorRect"),p=d==null||d.width===0&&d.height===0&&d.x===0&&d.y===0;return t.element(y(g({id:mp(a)},Wi.indicator.attrs),{dir:s("dir"),hidden:n.get("value")==null||p,"data-disabled":E(o),"data-orientation":s("orientation"),style:{"--transition-property":"left, top, width, height","--left":ye(d==null?void 0:d.x),"--top":ye(d==null?void 0:d.y),"--width":ye(d==null?void 0:d.width),"--height":ye(d==null?void 0:d.height),position:"absolute",willChange:"var(--transition-property)",transitionProperty:"var(--transition-property)",transitionDuration:"var(--transition-duration, 150ms)",transitionTimingFunction:"var(--transition-timing-function)",[s("orientation")==="horizontal"?"left":"top"]:s("orientation")==="horizontal"?"var(--left)":"var(--top)"}}))}}}var mO,Wi,Ca,gp,fp,$l,vO,yO,mp,Sa,bO,EO,IO,PO,pp,CO,SO,OO,wO,VO,RA,xO,DA,AO,kO,yp=re(()=>{"use strict";pr();se();mO=U("radio-group").parts("root","label","item","itemText","itemControl","indicator"),Wi=mO.build(),Ca=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`radio-group:${e.id}`},gp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`radio-group:${e.id}:label`},fp=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`radio-group:${e.id}:radio:${t}`},$l=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemHiddenInput)==null?void 0:i.call(n,t))!=null?r:`radio-group:${e.id}:radio:input:${t}`},vO=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemControl)==null?void 0:i.call(n,t))!=null?r:`radio-group:${e.id}:radio:control:${t}`},yO=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemLabel)==null?void 0:i.call(n,t))!=null?r:`radio-group:${e.id}:radio:label:${t}`},mp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicator)!=null?n:`radio-group:${e.id}:indicator`},Sa=e=>e.getById(Ca(e)),bO=(e,t)=>e.getById($l(e,t)),EO=e=>e.getById(mp(e)),IO=e=>{var t;return(t=Sa(e))==null?void 0:t.querySelector("input:not(:disabled)")},PO=e=>{var t;return(t=Sa(e))==null?void 0:t.querySelector("input:not(:disabled):checked")},pp=e=>{let n=`input[type=radio][data-ownedby='${CSS.escape(Ca(e))}']:not([disabled])`;return Fe(Sa(e),n)},CO=(e,t)=>{if(t)return e.getById(fp(e,t))},SO=e=>{var t,n,i,r;return{x:(t=e==null?void 0:e.offsetLeft)!=null?t:0,y:(n=e==null?void 0:e.offsetTop)!=null?n:0,width:(i=e==null?void 0:e.offsetWidth)!=null?i:0,height:(r=e==null?void 0:e.offsetHeight)!=null?r:0}};({not:OO}=Ee()),wO={props({props:e}){return g({orientation:"vertical"},e)},initialState(){return"idle"},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var i;(i=e("onValueChange"))==null||i({value:n})}})),activeValue:t(()=>({defaultValue:null})),focusedValue:t(()=>({defaultValue:null})),focusVisibleValue:t(()=>({defaultValue:null})),hoveredValue:t(()=>({defaultValue:null})),indicatorRect:t(()=>({defaultValue:null})),fieldsetDisabled:t(()=>({defaultValue:!1})),ssr:t(()=>({defaultValue:!0}))}},refs(){return{indicatorCleanup:null,focusVisibleValue:null}},computed:{isDisabled:({prop:e,context:t})=>!!e("disabled")||t.get("fieldsetDisabled")},entry:["syncIndicatorRect","syncSsr"],exit:["cleanupObserver"],effects:["trackFormControlState","trackFocusVisible"],watch({track:e,action:t,context:n}){e([()=>n.get("value")],()=>{t(["syncIndicatorRect","syncInputElements"])})},on:{SET_VALUE:[{guard:OO("isTrusted"),actions:["setValue","dispatchChangeEvent"]},{actions:["setValue"]}],SET_HOVERED:{actions:["setHovered"]},SET_ACTIVE:{actions:["setActive"]},SET_FOCUSED:{actions:["setFocused"]}},states:{idle:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackFormControlState({context:e,scope:t}){return wt(Sa(t),{onFieldsetDisabledChange(n){e.set("fieldsetDisabled",n)},onFormReset(){e.set("value",e.initial("value"))}})},trackFocusVisible({scope:e}){var t;return Pn({root:(t=e.getRootNode)==null?void 0:t.call(e)})}},actions:{setValue({context:e,event:t}){e.set("value",t.value)},setHovered({context:e,event:t}){e.set("hoveredValue",t.value)},setActive({context:e,event:t}){e.set("activeValue",t.value)},setFocused({context:e,event:t}){e.set("focusedValue",t.value);let n=t.value!=null&&t.focusVisible?t.value:null;e.set("focusVisibleValue",n)},syncInputElements({context:e,scope:t}){pp(t).forEach(i=>{i.checked=i.value===e.get("value")})},cleanupObserver({refs:e}){var t;(t=e.get("indicatorCleanup"))==null||t()},syncSsr({context:e}){e.set("ssr",!1)},syncIndicatorRect({context:e,scope:t,refs:n}){var o;if((o=n.get("indicatorCleanup"))==null||o(),!EO(t))return;let i=e.get("value"),r=CO(t,i);if(i==null||!r){e.set("indicatorRect",null);return}let s=()=>{e.set("indicatorRect",SO(r))};s();let a=gn.observe(r,s);n.set("indicatorCleanup",a)},dispatchChangeEvent({context:e,scope:t}){pp(t).forEach(i=>{let r=i.value===e.get("value");r!==i.checked&&pi(i,{checked:r})})}}}},VO=_()(["dir","disabled","form","getRootNode","id","ids","invalid","name","onValueChange","orientation","readOnly","required","value","defaultValue"]),RA=B(VO),xO=_()(["value","disabled","invalid"]),DA=B(xO),AO=class extends K{initMachine(e){return new W(wO,e)}initApi(){return TO(this.machine.service,q)}render(){var i;let e=(i=this.el.querySelector('[data-scope="radio-group"][data-part="root"]'))!=null?i:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="radio-group"][data-part="label"]');t&&this.spreadProps(t,this.api.getLabelProps());let n=this.el.querySelector('[data-scope="radio-group"][data-part="indicator"]');n&&this.spreadProps(n,this.api.getIndicatorProps()),this.el.querySelectorAll('[data-scope="radio-group"][data-part="item"]').forEach(r=>{let s=r.dataset.value;if(s==null)return;let a=r.dataset.disabled==="true",o=r.dataset.invalid==="true";this.spreadProps(r,this.api.getItemProps({value:s,disabled:a,invalid:o}));let l=r.querySelector('[data-scope="radio-group"][data-part="item-text"]');l&&this.spreadProps(l,this.api.getItemTextProps({value:s,disabled:a,invalid:o}));let c=r.querySelector('[data-scope="radio-group"][data-part="item-control"]');c&&this.spreadProps(c,this.api.getItemControlProps({value:s,disabled:a,invalid:o}));let u=r.querySelector('[data-scope="radio-group"][data-part="item-hidden-input"]');u&&this.spreadProps(u,this.api.getItemHiddenInputProps({value:s,disabled:a,invalid:o}))})}},kO={mounted(){let e=this.el,t=w(e,"value"),n=w(e,"defaultValue"),i=C(e,"controlled"),r=new AO(e,y(g({id:e.id},i&&t!==void 0?{value:t!=null?t:null}:{defaultValue:n!=null?n:null}),{name:w(e,"name"),form:w(e,"form"),disabled:C(e,"disabled"),invalid:C(e,"invalid"),required:C(e,"required"),readOnly:C(e,"readOnly"),dir:w(e,"dir",["ltr","rtl"]),orientation:w(e,"orientation",["horizontal","vertical"]),onValueChange:s=>{let a=w(e,"onValueChange");a&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(a,{value:s.value,id:e.id});let o=w(e,"onValueChangeClient");o&&e.dispatchEvent(new CustomEvent(o,{bubbles:!0,detail:{value:s,id:e.id}}))}}));r.init(),this.radioGroup=r,this.handlers=[]},updated(){var n;let e=w(this.el,"value"),t=C(this.el,"controlled");(n=this.radioGroup)==null||n.updateProps(y(g({id:this.el.id},t&&e!==void 0?{value:e!=null?e:null}:{}),{name:w(this.el,"name"),form:w(this.el,"form"),disabled:C(this.el,"disabled"),invalid:C(this.el,"invalid"),required:C(this.el,"required"),readOnly:C(this.el,"readOnly"),orientation:w(this.el,"orientation",["horizontal","vertical"])}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.radioGroup)==null||e.destroy()}}});var Tp={};he(Tp,{Select:()=>zO});function FO(e,t){let{context:n,prop:i,scope:r,state:s,computed:a,send:o}=e,l=i("disabled")||n.get("fieldsetDisabled"),c=!!i("invalid"),u=!!i("required"),h=!!i("readOnly"),m=i("composite"),d=i("collection"),p=s.hasTag("open"),v=s.matches("focused"),I=n.get("highlightedValue"),T=n.get("highlightedItem"),O=n.get("selectedItems"),b=n.get("currentPlacement"),f=a("isTypingAhead"),S=a("isInteractive"),P=I?Ul(r,I):void 0;function V(x){let k=d.getItemDisabled(x.item),N=d.getItemValue(x.item);return vn(N,()=>`[zag-js] No value found for item ${JSON.stringify(x.item)}`),{value:N,disabled:!!(l||k),highlighted:I===N,selected:n.get("value").includes(N)}}let A=On(y(g({},i("positioning")),{placement:b}));return{open:p,focused:v,empty:n.get("value").length===0,highlightedItem:T,highlightedValue:I,selectedItems:O,hasSelectedItems:a("hasSelectedItems"),value:n.get("value"),valueAsString:a("valueAsString"),collection:d,multiple:!!i("multiple"),disabled:!!l,reposition(x={}){o({type:"POSITIONING.SET",options:x})},focus(){var x;(x=ri(r))==null||x.focus({preventScroll:!0})},setOpen(x){s.hasTag("open")!==x&&o({type:x?"OPEN":"CLOSE"})},selectValue(x){o({type:"ITEM.SELECT",value:x})},setValue(x){o({type:"VALUE.SET",value:x})},selectAll(){o({type:"VALUE.SET",value:d.getValues()})},setHighlightValue(x){o({type:"HIGHLIGHTED_VALUE.SET",value:x})},clearHighlightValue(){o({type:"HIGHLIGHTED_VALUE.CLEAR"})},clearValue(x){o(x?{type:"ITEM.CLEAR",value:x}:{type:"VALUE.CLEAR"})},getItemState:V,getRootProps(){return t.element(y(g({},_e.root.attrs),{dir:i("dir"),id:RO(r),"data-invalid":E(c),"data-readonly":E(h)}))},getLabelProps(){return t.label(y(g({dir:i("dir"),id:Ta(r)},_e.label.attrs),{"data-disabled":E(l),"data-invalid":E(c),"data-readonly":E(h),"data-required":E(u),htmlFor:ql(r),onClick(x){var k;x.defaultPrevented||l||(k=ri(r))==null||k.focus({preventScroll:!0})}}))},getControlProps(){return t.element(y(g({},_e.control.attrs),{dir:i("dir"),id:DO(r),"data-state":p?"open":"closed","data-focus":E(v),"data-disabled":E(l),"data-invalid":E(c)}))},getValueTextProps(){return t.element(y(g({},_e.valueText.attrs),{dir:i("dir"),"data-disabled":E(l),"data-invalid":E(c),"data-focus":E(v)}))},getTriggerProps(){return t.button(y(g({id:Gl(r),disabled:l,dir:i("dir"),type:"button",role:"combobox","aria-controls":_l(r),"aria-expanded":p,"aria-haspopup":"listbox","data-state":p?"open":"closed","aria-invalid":c,"aria-required":u,"aria-labelledby":Ta(r)},_e.trigger.attrs),{"data-disabled":E(l),"data-invalid":E(c),"data-readonly":E(h),"data-placement":b,"data-placeholder-shown":E(!a("hasSelectedItems")),onClick(x){S&&(x.defaultPrevented||o({type:"TRIGGER.CLICK"}))},onFocus(){o({type:"TRIGGER.FOCUS"})},onBlur(){o({type:"TRIGGER.BLUR"})},onKeyDown(x){if(x.defaultPrevented||!S)return;let N={ArrowUp(){o({type:"TRIGGER.ARROW_UP"})},ArrowDown(D){o({type:D.altKey?"OPEN":"TRIGGER.ARROW_DOWN"})},ArrowLeft(){o({type:"TRIGGER.ARROW_LEFT"})},ArrowRight(){o({type:"TRIGGER.ARROW_RIGHT"})},Home(){o({type:"TRIGGER.HOME"})},End(){o({type:"TRIGGER.END"})},Enter(){o({type:"TRIGGER.ENTER"})},Space(D){o(f?{type:"TRIGGER.TYPEAHEAD",key:D.key}:{type:"TRIGGER.ENTER"})}}[ge(x,{dir:i("dir"),orientation:"vertical"})];if(N){N(x),x.preventDefault();return}Ue.isValidEvent(x)&&(o({type:"TRIGGER.TYPEAHEAD",key:x.key}),x.preventDefault())}}))},getIndicatorProps(){return t.element(y(g({},_e.indicator.attrs),{dir:i("dir"),"aria-hidden":!0,"data-state":p?"open":"closed","data-disabled":E(l),"data-invalid":E(c),"data-readonly":E(h)}))},getItemProps(x){let k=V(x);return t.element(y(g({id:Ul(r,k.value),role:"option"},_e.item.attrs),{dir:i("dir"),"data-value":k.value,"aria-selected":k.selected,"data-state":k.selected?"checked":"unchecked","data-highlighted":E(k.highlighted),"data-disabled":E(k.disabled),"aria-disabled":X(k.disabled),onPointerMove(N){k.disabled||N.pointerType!=="mouse"||k.value!==I&&o({type:"ITEM.POINTER_MOVE",value:k.value})},onClick(N){N.defaultPrevented||k.disabled||o({type:"ITEM.CLICK",src:"pointerup",value:k.value})},onPointerLeave(N){var $;k.disabled||x.persistFocus||N.pointerType!=="mouse"||!(($=e.event.previous())!=null&&$.type.includes("POINTER"))||o({type:"ITEM.POINTER_LEAVE"})}}))},getItemTextProps(x){let k=V(x);return t.element(y(g({},_e.itemText.attrs),{"data-state":k.selected?"checked":"unchecked","data-disabled":E(k.disabled),"data-highlighted":E(k.highlighted)}))},getItemIndicatorProps(x){let k=V(x);return t.element(y(g({"aria-hidden":!0},_e.itemIndicator.attrs),{"data-state":k.selected?"checked":"unchecked",hidden:!k.selected}))},getItemGroupLabelProps(x){let{htmlFor:k}=x;return t.element(y(g({},_e.itemGroupLabel.attrs),{id:bp(r,k),dir:i("dir"),role:"presentation"}))},getItemGroupProps(x){let{id:k}=x;return t.element(y(g({},_e.itemGroup.attrs),{"data-disabled":E(l),id:LO(r,k),"aria-labelledby":bp(r,k),role:"group",dir:i("dir")}))},getClearTriggerProps(){return t.button(y(g({},_e.clearTrigger.attrs),{id:Cp(r),type:"button","aria-label":"Clear value","data-invalid":E(c),disabled:l,hidden:!a("hasSelectedItems"),dir:i("dir"),onClick(x){x.defaultPrevented||o({type:"CLEAR.CLICK"})}}))},getHiddenSelectProps(){let x=n.get("value"),k=i("multiple")?x:x==null?void 0:x[0];return t.select({name:i("name"),form:i("form"),disabled:l,multiple:i("multiple"),required:i("required"),"aria-hidden":!0,id:ql(r),defaultValue:k,style:Vt,tabIndex:-1,onFocus(){var N;(N=ri(r))==null||N.focus({preventScroll:!0})},"aria-labelledby":Ta(r)})},getPositionerProps(){return t.element(y(g({},_e.positioner.attrs),{dir:i("dir"),id:Sp(r),style:A.floating}))},getContentProps(){return t.element(y(g({hidden:!p,dir:i("dir"),id:_l(r),role:m?"listbox":"dialog"},_e.content.attrs),{"data-state":p?"open":"closed","data-placement":b,"data-activedescendant":P,"aria-activedescendant":m?P:void 0,"aria-multiselectable":i("multiple")&&m?!0:void 0,"aria-labelledby":Ta(r),tabIndex:0,onKeyDown(x){if(!S||!ce(x.currentTarget,j(x)))return;if(x.key==="Tab"&&!ds(x)){x.preventDefault();return}let k={ArrowUp(){o({type:"CONTENT.ARROW_UP"})},ArrowDown(){o({type:"CONTENT.ARROW_DOWN"})},Home(){o({type:"CONTENT.HOME"})},End(){o({type:"CONTENT.END"})},Enter(){o({type:"ITEM.CLICK",src:"keydown.enter"})},Space($){var te;f?o({type:"CONTENT.TYPEAHEAD",key:$.key}):(te=k.Enter)==null||te.call(k,$)}},N=k[ge(x)];if(N){N(x),x.preventDefault();return}let D=j(x);Ot(D)||Ue.isValidEvent(x)&&(o({type:"CONTENT.TYPEAHEAD",key:x.key}),x.preventDefault())}}))},getListProps(){return t.element(y(g({},_e.list.attrs),{tabIndex:0,role:m?void 0:"listbox","aria-labelledby":Gl(r),"aria-activedescendant":m?void 0:P,"aria-multiselectable":!m&&i("multiple")?!0:void 0}))}}}function Ip(e){var n,i;let t=(i=e.restoreFocus)!=null?i:(n=e.previousEvent)==null?void 0:n.restoreFocus;return t==null||!!t}function Pp(e,t){return Ki(t?{items:e,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled,groupBy:n=>{var i;return(i=n.group)!=null?i:""}}:{items:e,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled})}function WO(e){return e.replace(/_([a-z])/g,(t,n)=>n.toUpperCase())}function KO(e){let t={};for(let[n,i]of Object.entries(e)){let r=WO(n);t[r]=i}return t}var NO,_e,Ki,RO,_l,Gl,Cp,Ta,DO,Ul,ql,Sp,LO,bp,Hl,$r,ri,MO,Ep,Bl,Hr,ii,$O,HO,BO,GA,_O,UA,GO,qA,UO,WA,qO,zO,Op=re(()=>{"use strict";yr();Pr();Wn();tn();se();NO=U("select").parts("label","positioner","trigger","indicator","clearTrigger","item","itemText","itemIndicator","itemGroup","itemGroupLabel","list","content","root","control","valueText"),_e=NO.build(),Ki=e=>new Nt(e);Ki.empty=()=>new Nt({items:[]});RO=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`select:${e.id}`},_l=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`select:${e.id}:content`},Gl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`select:${e.id}:trigger`},Cp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.clearTrigger)!=null?n:`select:${e.id}:clear-trigger`},Ta=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`select:${e.id}:label`},DO=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`select:${e.id}:control`},Ul=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`select:${e.id}:option:${t}`},ql=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.hiddenSelect)!=null?n:`select:${e.id}:select`},Sp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`select:${e.id}:positioner`},LO=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemGroup)==null?void 0:i.call(n,t))!=null?r:`select:${e.id}:optgroup:${t}`},bp=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemGroupLabel)==null?void 0:i.call(n,t))!=null?r:`select:${e.id}:optgroup-label:${t}`},Hl=e=>e.getById(ql(e)),$r=e=>e.getById(_l(e)),ri=e=>e.getById(Gl(e)),MO=e=>e.getById(Cp(e)),Ep=e=>e.getById(Sp(e)),Bl=(e,t)=>t==null?null:e.getById(Ul(e,t));({and:Hr,not:ii,or:$O}=Ee()),HO={props({props:e}){var t;return y(g({loopFocus:!1,closeOnSelect:!e.multiple,composite:!0,defaultValue:[]},e),{collection:(t=e.collection)!=null?t:Ki.empty(),positioning:g({placement:"bottom-start",gutter:8},e.positioning)})},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:fe,onChange(n){var r;let i=e("collection").findMany(n);return(r=e("onValueChange"))==null?void 0:r({value:n,items:i})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),onChange(n){var i;(i=e("onHighlightChange"))==null||i({highlightedValue:n,highlightedItem:e("collection").find(n),highlightedIndex:e("collection").indexOf(n)})}})),currentPlacement:t(()=>({defaultValue:void 0})),fieldsetDisabled:t(()=>({defaultValue:!1})),highlightedItem:t(()=>({defaultValue:null})),selectedItems:t(()=>{var r,s;let n=(s=(r=e("value"))!=null?r:e("defaultValue"))!=null?s:[];return{defaultValue:e("collection").findMany(n)}})}},refs(){return{typeahead:g({},Ue.defaultOptions)}},computed:{hasSelectedItems:({context:e})=>e.get("value").length>0,isTypingAhead:({refs:e})=>e.get("typeahead").keysSoFar!=="",isDisabled:({prop:e,context:t})=>!!e("disabled")||!!t.get("fieldsetDisabled"),isInteractive:({prop:e})=>!(e("disabled")||e("readOnly")),valueAsString:({context:e,prop:t})=>t("collection").stringifyItems(e.get("selectedItems"))},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"idle"},entry:["syncSelectElement"],watch({context:e,prop:t,track:n,action:i}){n([()=>e.get("value").toString()],()=>{i(["syncSelectedItems","syncSelectElement","dispatchChangeEvent"])}),n([()=>t("open")],()=>{i(["toggleVisibility"])}),n([()=>e.get("highlightedValue")],()=>{i(["syncHighlightedItem"])}),n([()=>t("collection").toString()],()=>{i(["syncCollection"])})},on:{"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedItem"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedItem"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setSelectedItems"]},"VALUE.CLEAR":{actions:["clearSelectedItems"]},"CLEAR.CLICK":{actions:["clearSelectedItems","focusTriggerEl"]}},effects:["trackFormControlState"],states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":[{guard:"isTriggerClickEvent",target:"open",actions:["setInitialFocus","highlightFirstSelectedItem"]},{target:"open",actions:["setInitialFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus","highlightFirstSelectedItem"]}],"TRIGGER.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen"]}]}},focused:{tags:["closed"],on:{"CONTROLLED.OPEN":[{guard:"isTriggerClickEvent",target:"open",actions:["setInitialFocus","highlightFirstSelectedItem"]},{guard:"isTriggerArrowUpEvent",target:"open",actions:["setInitialFocus","highlightComputedLastItem"]},{guard:$O("isTriggerArrowDownEvent","isTriggerEnterEvent"),target:"open",actions:["setInitialFocus","highlightComputedFirstItem"]},{target:"open",actions:["setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen"]}],"TRIGGER.BLUR":{target:"idle"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightFirstSelectedItem"]}],"TRIGGER.ENTER":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedFirstItem"]}],"TRIGGER.ARROW_UP":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedLastItem"]}],"TRIGGER.ARROW_DOWN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedFirstItem"]}],"TRIGGER.ARROW_LEFT":[{guard:Hr(ii("multiple"),"hasSelectedItems"),actions:["selectPreviousItem"]},{guard:ii("multiple"),actions:["selectLastItem"]}],"TRIGGER.ARROW_RIGHT":[{guard:Hr(ii("multiple"),"hasSelectedItems"),actions:["selectNextItem"]},{guard:ii("multiple"),actions:["selectFirstItem"]}],"TRIGGER.HOME":{guard:ii("multiple"),actions:["selectFirstItem"]},"TRIGGER.END":{guard:ii("multiple"),actions:["selectLastItem"]},"TRIGGER.TYPEAHEAD":{guard:ii("multiple"),actions:["selectMatchingItem"]}}},open:{tags:["open"],exit:["scrollContentToTop"],effects:["trackDismissableElement","computePlacement","scrollToHighlightedItem"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["focusTriggerEl","clearHighlightedItem"]},{target:"idle",actions:["clearHighlightedItem"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{guard:"restoreFocus",target:"focused",actions:["invokeOnClose","focusTriggerEl","clearHighlightedItem"]},{target:"idle",actions:["invokeOnClose","clearHighlightedItem"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","clearHighlightedItem"]}],"ITEM.CLICK":[{guard:Hr("closeOnSelect","isOpenControlled"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","focusTriggerEl","clearHighlightedItem"]},{actions:["selectHighlightedItem"]}],"CONTENT.HOME":{actions:["highlightFirstItem"]},"CONTENT.END":{actions:["highlightLastItem"]},"CONTENT.ARROW_DOWN":[{guard:Hr("hasHighlightedItem","loop","isLastItemHighlighted"),actions:["highlightFirstItem"]},{guard:"hasHighlightedItem",actions:["highlightNextItem"]},{actions:["highlightFirstItem"]}],"CONTENT.ARROW_UP":[{guard:Hr("hasHighlightedItem","loop","isFirstItemHighlighted"),actions:["highlightLastItem"]},{guard:"hasHighlightedItem",actions:["highlightPreviousItem"]},{actions:["highlightLastItem"]}],"CONTENT.TYPEAHEAD":{actions:["highlightMatchingItem"]},"ITEM.POINTER_MOVE":{actions:["highlightItem"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedItem"]},"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{loop:({prop:e})=>!!e("loopFocus"),multiple:({prop:e})=>!!e("multiple"),hasSelectedItems:({computed:e})=>!!e("hasSelectedItems"),hasHighlightedItem:({context:e})=>e.get("highlightedValue")!=null,isFirstItemHighlighted:({context:e,prop:t})=>e.get("highlightedValue")===t("collection").firstValue,isLastItemHighlighted:({context:e,prop:t})=>e.get("highlightedValue")===t("collection").lastValue,closeOnSelect:({prop:e,event:t})=>{var n;return!!((n=t.closeOnSelect)!=null?n:e("closeOnSelect"))},restoreFocus:({event:e})=>Ip(e),isOpenControlled:({prop:e})=>e("open")!==void 0,isTriggerClickEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.CLICK"},isTriggerEnterEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.ENTER"},isTriggerArrowUpEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.ARROW_UP"},isTriggerArrowDownEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.ARROW_DOWN"}},effects:{trackFormControlState({context:e,scope:t}){return wt(Hl(t),{onFieldsetDisabledChange(n){e.set("fieldsetDisabled",n)},onFormReset(){let n=e.initial("value");e.set("value",n)}})},trackDismissableElement({scope:e,send:t,prop:n}){let i=()=>$r(e),r=!0;return Ft(i,{type:"listbox",defer:!0,exclude:[ri(e),MO(e)],onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onInteractOutside(s){var a;(a=n("onInteractOutside"))==null||a(s),r=!(s.detail.focusable||s.detail.contextmenu)},onDismiss(){t({type:"CLOSE",src:"interact-outside",restoreFocus:r})}})},computePlacement({context:e,prop:t,scope:n}){let i=t("positioning");return e.set("currentPlacement",i.placement),It(()=>ri(n),()=>Ep(n),y(g({defer:!0},i),{onComplete(a){e.set("currentPlacement",a.placement)}}))},scrollToHighlightedItem({context:e,prop:t,scope:n,event:i}){let r=a=>{let o=e.get("highlightedValue");if(o==null||i.current().type.includes("POINTER"))return;let l=$r(n),c=t("scrollToIndexFn");if(c){let h=t("collection").indexOf(o);c==null||c({index:h,immediate:a,getElement:()=>Bl(n,o)});return}let u=Bl(n,o);Xt(u,{rootEl:l,block:"nearest"})};return H(()=>r(!0)),ot(()=>$r(n),{defer:!0,attributes:["data-activedescendant"],callback(){r(!1)}})}},actions:{reposition({context:e,prop:t,scope:n,event:i}){let r=()=>Ep(n);It(ri(n),r,y(g(g({},t("positioning")),i.options),{defer:!0,listeners:!1,onComplete(s){e.set("currentPlacement",s.placement)}}))},toggleVisibility({send:e,prop:t,event:n}){e({type:t("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})},highlightPreviousItem({context:e,prop:t}){let n=e.get("highlightedValue");if(n==null)return;let i=t("collection").getPreviousValue(n,1,t("loopFocus"));i!=null&&e.set("highlightedValue",i)},highlightNextItem({context:e,prop:t}){let n=e.get("highlightedValue");if(n==null)return;let i=t("collection").getNextValue(n,1,t("loopFocus"));i!=null&&e.set("highlightedValue",i)},highlightFirstItem({context:e,prop:t}){let n=t("collection").firstValue;e.set("highlightedValue",n)},highlightLastItem({context:e,prop:t}){let n=t("collection").lastValue;e.set("highlightedValue",n)},setInitialFocus({scope:e}){H(()=>{let t=us({root:$r(e)});t==null||t.focus({preventScroll:!0})})},focusTriggerEl({event:e,scope:t}){Ip(e)&&H(()=>{let n=ri(t);n==null||n.focus({preventScroll:!0})})},selectHighlightedItem({context:e,prop:t,event:n}){var s,a;let i=(s=n.value)!=null?s:e.get("highlightedValue");if(i==null||!t("collection").has(i))return;(a=t("onSelect"))==null||a({value:i}),i=t("deselectable")&&!t("multiple")&&e.get("value").includes(i)?null:i,e.set("value",o=>i==null?[]:t("multiple")?yt(o,i):[i])},highlightComputedFirstItem({context:e,prop:t,computed:n}){let i=t("collection"),r=n("hasSelectedItems")?i.sort(e.get("value"))[0]:i.firstValue;e.set("highlightedValue",r)},highlightComputedLastItem({context:e,prop:t,computed:n}){let i=t("collection"),r=n("hasSelectedItems")?i.sort(e.get("value"))[0]:i.lastValue;e.set("highlightedValue",r)},highlightFirstSelectedItem({context:e,prop:t,computed:n}){if(!n("hasSelectedItems"))return;let i=t("collection").sort(e.get("value"))[0];e.set("highlightedValue",i)},highlightItem({context:e,event:t}){e.set("highlightedValue",t.value)},highlightMatchingItem({context:e,prop:t,event:n,refs:i}){let r=t("collection").search(n.key,{state:i.get("typeahead"),currentValue:e.get("highlightedValue")});r!=null&&e.set("highlightedValue",r)},setHighlightedItem({context:e,event:t}){e.set("highlightedValue",t.value)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},selectItem({context:e,prop:t,event:n}){var s;(s=t("onSelect"))==null||s({value:n.value});let r=t("deselectable")&&!t("multiple")&&e.get("value").includes(n.value)?null:n.value;e.set("value",a=>r==null?[]:t("multiple")?yt(a,r):[r])},clearItem({context:e,event:t}){e.set("value",n=>n.filter(i=>i!==t.value))},setSelectedItems({context:e,event:t}){e.set("value",t.value)},clearSelectedItems({context:e}){e.set("value",[])},selectPreviousItem({context:e,prop:t}){let[n]=e.get("value"),i=t("collection").getPreviousValue(n);i&&e.set("value",[i])},selectNextItem({context:e,prop:t}){let[n]=e.get("value"),i=t("collection").getNextValue(n);i&&e.set("value",[i])},selectFirstItem({context:e,prop:t}){let n=t("collection").firstValue;n&&e.set("value",[n])},selectLastItem({context:e,prop:t}){let n=t("collection").lastValue;n&&e.set("value",[n])},selectMatchingItem({context:e,prop:t,event:n,refs:i}){let r=t("collection").search(n.key,{state:i.get("typeahead"),currentValue:e.get("value")[0]});r!=null&&e.set("value",[r])},scrollContentToTop({prop:e,scope:t}){var n,i;if(e("scrollToIndexFn")){let r=e("collection").firstValue;(n=e("scrollToIndexFn"))==null||n({index:0,immediate:!0,getElement:()=>Bl(t,r)})}else(i=$r(t))==null||i.scrollTo(0,0)},invokeOnOpen({prop:e,context:t}){var n;(n=e("onOpenChange"))==null||n({open:!0,value:t.get("value")})},invokeOnClose({prop:e,context:t}){var n;(n=e("onOpenChange"))==null||n({open:!1,value:t.get("value")})},syncSelectElement({context:e,prop:t,scope:n}){let i=Hl(n);if(i){if(e.get("value").length===0&&!t("multiple")){i.selectedIndex=-1;return}for(let r of i.options)r.selected=e.get("value").includes(r.value)}},syncCollection({context:e,prop:t}){let n=t("collection"),i=n.find(e.get("highlightedValue"));i&&e.set("highlightedItem",i);let r=n.findMany(e.get("value"));e.set("selectedItems",r)},syncSelectedItems({context:e,prop:t}){let n=t("collection"),i=e.get("selectedItems"),s=e.get("value").map(a=>i.find(l=>n.getItemValue(l)===a)||n.find(a));e.set("selectedItems",s)},syncHighlightedItem({context:e,prop:t}){let n=t("collection"),i=e.get("highlightedValue"),r=i?n.find(i):null;e.set("highlightedItem",r)},dispatchChangeEvent({scope:e}){queueMicrotask(()=>{let t=Hl(e);if(!t)return;let n=e.getWin(),i=new n.Event("change",{bubbles:!0,composed:!0});t.dispatchEvent(i)})}}}};BO=_()(["closeOnSelect","collection","composite","defaultHighlightedValue","defaultOpen","defaultValue","deselectable","dir","disabled","form","getRootNode","highlightedValue","id","ids","invalid","loopFocus","multiple","name","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onSelect","onValueChange","open","positioning","readOnly","required","scrollToIndexFn","value"]),GA=B(BO),_O=_()(["item","persistFocus"]),UA=B(_O),GO=_()(["id"]),qA=B(GO),UO=_()(["htmlFor"]),WA=B(UO),qO=class extends K{constructor(t,n){var r;super(t,n);Y(this,"_options",[]);Y(this,"hasGroups",!1);Y(this,"placeholder","");Y(this,"init",()=>{this.machine.start(),this.render(),this.machine.subscribe(()=>{this.api=this.initApi(),this.render()})});let i=n.collection;this._options=(r=i==null?void 0:i.items)!=null?r:[],this.placeholder=w(this.el,"placeholder")||""}get options(){return Array.isArray(this._options)?this._options:[]}setOptions(t){this._options=Array.isArray(t)?t:[]}getCollection(){let t=this.options;return this.hasGroups?Ki({items:t,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled,groupBy:n=>{var i;return(i=n.group)!=null?i:""}}):Ki({items:t,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled})}initMachine(t){let n=this.getCollection.bind(this),i=t.collection;return new W(HO,y(g({},t),{get collection(){return i!=null?i:n()}}))}initApi(){return FO(this.machine.service,q)}applyItemProps(){let t=this.el.querySelector('[data-scope="select"][data-part="content"]');t&&(t.querySelectorAll('[data-scope="select"][data-part="item-group"]').forEach(n=>{var s;let i=(s=n.dataset.id)!=null?s:"";this.spreadProps(n,this.api.getItemGroupProps({id:i}));let r=n.querySelector('[data-scope="select"][data-part="item-group-label"]');r&&this.spreadProps(r,this.api.getItemGroupLabelProps({htmlFor:i}))}),t.querySelectorAll('[data-scope="select"][data-part="item"]').forEach(n=>{var o;let i=(o=n.dataset.value)!=null?o:"",r=this.options.find(l=>{var c,u;return String((u=(c=l.id)!=null?c:l.value)!=null?u:"")===String(i)});if(!r)return;this.spreadProps(n,this.api.getItemProps({item:r}));let s=n.querySelector('[data-scope="select"][data-part="item-text"]');s&&this.spreadProps(s,this.api.getItemTextProps({item:r}));let a=n.querySelector('[data-scope="select"][data-part="item-indicator"]');a&&this.spreadProps(a,this.api.getItemIndicatorProps({item:r}))}))}render(){var a;let t=(a=this.el.querySelector('[data-scope="select"][data-part="root"]'))!=null?a:this.el;this.spreadProps(t,this.api.getRootProps());let n=this.el.querySelector('[data-scope="select"][data-part="hidden-select"]'),i=this.el.querySelector('[data-scope="select"][data-part="value-input"]');i&&(!this.api.value||this.api.value.length===0?i.value="":this.api.value.length===1?i.value=String(this.api.value[0]):i.value=this.api.value.map(String).join(",")),n&&this.spreadProps(n,this.api.getHiddenSelectProps()),["label","control","trigger","indicator","clear-trigger","positioner"].forEach(o=>{let l=this.el.querySelector(`[data-scope="select"][data-part="${o}"]`);if(!l)return;let c="get"+o.split("-").map(u=>u[0].toUpperCase()+u.slice(1)).join("")+"Props";this.spreadProps(l,this.api[c]())});let r=this.el.querySelector('[data-scope="select"][data-part="item-text"]');if(r){let o=this.api.valueAsString;if(this.api.value&&this.api.value.length>0&&!o){let l=this.api.value[0],c=this.options.find(u=>{var m,d;let h=(d=(m=u.id)!=null?m:u.value)!=null?d:"";return String(h)===String(l)});c?r.textContent=c.label:r.textContent=this.placeholder||""}else r.textContent=o||this.placeholder||""}let s=this.el.querySelector('[data-scope="select"][data-part="content"]');s&&(this.spreadProps(s,this.api.getContentProps()),this.applyItemProps())}};zO={mounted(){let e=this.el,t=JSON.parse(e.dataset.collection||"[]"),n=t.some(s=>s.group!==void 0),i=Pp(t,n),r=new qO(e,y(g({id:e.id,collection:i},C(e,"controlled")?{value:Z(e,"value")}:{defaultValue:Z(e,"defaultValue")}),{disabled:C(e,"disabled"),closeOnSelect:C(e,"closeOnSelect"),dir:w(e,"dir",["ltr","rtl"]),loopFocus:C(e,"loopFocus"),multiple:C(e,"multiple"),invalid:C(e,"invalid"),name:w(e,"name"),form:w(e,"form"),readOnly:C(e,"readOnly"),required:C(e,"required"),positioning:(()=>{let s=e.dataset.positioning;if(s)try{let a=JSON.parse(s);return KO(a)}catch(a){return}})(),onValueChange:s=>{var T;let a=C(e,"redirect"),o=s.value.length>0?String(s.value[0]):null,l=(T=s.items)!=null&&T.length?s.items[0]:null,c=l&&typeof l=="object"&&l!==null&&"redirect"in l?l.redirect:void 0,u=l&&typeof l=="object"&&l!==null&&"new_tab"in l?l.new_tab:void 0;a&&o&&this.liveSocket.main.isDead&&c!==!1&&(u===!0?window.open(o,"_blank","noopener,noreferrer"):window.location.href=o);let d=e.querySelector('[data-scope="select"][data-part="value-input"]');d&&(d.value=s.value.length===0?"":s.value.length===1?String(s.value[0]):s.value.map(String).join(","),d.dispatchEvent(new Event("input",{bubbles:!0})),d.dispatchEvent(new Event("change",{bubbles:!0})));let p={value:s.value,items:s.items,id:e.id},v=w(e,"onValueChangeClient");v&&e.dispatchEvent(new CustomEvent(v,{bubbles:!0,detail:p}));let I=w(e,"onValueChange");I&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(I,p)}}));r.hasGroups=n,r.setOptions(t),r.init(),this.select=r,this.handlers=[]},updated(){let e=JSON.parse(this.el.dataset.collection||"[]"),t=e.some(n=>n.group!==void 0);this.select&&(this.select.hasGroups=t,this.select.setOptions(e),this.select.updateProps(y(g({collection:Pp(e,t),id:this.el.id},C(this.el,"controlled")?{value:Z(this.el,"value")}:{defaultValue:Z(this.el,"defaultValue")}),{name:w(this.el,"name"),form:w(this.el,"form"),disabled:C(this.el,"disabled"),multiple:C(this.el,"multiple"),dir:w(this.el,"dir",["ltr","rtl"]),invalid:C(this.el,"invalid"),required:C(this.el,"required"),readOnly:C(this.el,"readOnly")})))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.select)==null||e.destroy()}}});var Kp={};he(Kp,{SignaturePad:()=>Ew});function xp(e,t,n,i=r=>r){return e*i(.5-t*(.5-n))}function Bp(e,t,n){let i=Wl(1,t/n);return Wl(1,e+(Wl(1,1-i)-e)*(i*.275))}function jO(e){return[-e[0],-e[1]]}function Bt(e,t){return[e[0]+t[0],e[1]+t[1]]}function Ap(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function Nn(e,t){return[e[0]-t[0],e[1]-t[1]]}function Yl(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function kn(e,t){return[e[0]*t,e[1]*t]}function Kl(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function XO(e,t){return[e[0]/t,e[1]/t]}function _p(e){return[e[1],-e[0]]}function zl(e,t){let n=t[0];return e[0]=t[1],e[1]=-n,e}function kp(e,t){return e[0]*t[0]+e[1]*t[1]}function ZO(e,t){return e[0]===t[0]&&e[1]===t[1]}function JO(e){return Math.hypot(e[0],e[1])}function Np(e,t){let n=e[0]-t[0],i=e[1]-t[1];return n*n+i*i}function Gp(e){return XO(e,JO(e))}function QO(e,t){return Math.hypot(e[1]-t[1],e[0]-t[0])}function jl(e,t,n){let i=Math.sin(n),r=Math.cos(n),s=e[0]-t[0],a=e[1]-t[1],o=s*r-a*i,l=s*i+a*r;return[o+t[0],l+t[1]]}function Rp(e,t,n,i){let r=Math.sin(i),s=Math.cos(i),a=t[0]-n[0],o=t[1]-n[1],l=a*s-o*r,c=a*r+o*s;return e[0]=l+n[0],e[1]=c+n[1],e}function Dp(e,t,n){return Bt(e,kn(Nn(t,e),n))}function ew(e,t,n,i){let r=n[0]-t[0],s=n[1]-t[1];return e[0]=t[0]+r*i,e[1]=t[1]+s*i,e}function Up(e,t,n){return Bt(e,kn(t,n))}function tw(e,t){let n=Up(e,Gp(_p(Nn(e,Bt(e,[1,1])))),-t),i=[],r=1/13;for(let s=r;s<=1;s+=r)i.push(jl(n,e,Br*2*s));return i}function nw(e,t,n){let i=[],r=1/n;for(let s=r;s<=1;s+=r)i.push(jl(t,e,Br*s));return i}function iw(e,t,n){let i=Nn(t,n),r=kn(i,.5),s=kn(i,.51);return[Nn(e,r),Nn(e,s),Bt(e,s),Bt(e,r)]}function rw(e,t,n,i){let r=[],s=Up(e,t,n),a=1/i;for(let o=a;o<1;o+=a)r.push(jl(s,e,Br*3*o));return r}function sw(e,t,n){return[Bt(e,kn(t,n)),Bt(e,kn(t,n*.99)),Nn(e,kn(t,n*.99)),Nn(e,kn(t,n))]}function Lp(e,t,n){return e===!1||e===void 0?0:e===!0?Math.max(t,n):e}function aw(e,t,n){return e.slice(0,10).reduce((i,r)=>{let s=r.pressure;return t&&(s=Bp(i,r.distance,n)),(i+s)/2},e[0].pressure)}function ow(e,t={}){let{size:n=16,smoothing:i=.5,thinning:r=.5,simulatePressure:s=!0,easing:a=Q=>Q,start:o={},end:l={},last:c=!1}=t,{cap:u=!0,easing:h=Q=>Q*(2-Q)}=o,{cap:m=!0,easing:d=Q=>--Q*Q*Q+1}=l;if(e.length===0||n<=0)return[];let p=e[e.length-1].runningLength,v=Lp(o.taper,n,p),I=Lp(l.taper,n,p),T=(n*i)**2,O=[],b=[],f=aw(e,s,n),S=xp(n,r,e[e.length-1].pressure,a),P,V=e[0].vector,A=e[0].point,x=A,k=A,N=x,D=!1;for(let Q=0;QT)&&(O.push(k),A=k),Ap(An,Pe,De),N=[An[0],An[1]],(Q<=1||Np(x,N)>T)&&(b.push(N),x=N),f=Se,V=ne}let $=[e[0].point[0],e[0].point[1]],te=e.length>1?[e[e.length-1].point[0],e[e.length-1].point[1]]:Bt(e[0].point,[1,1]),J=[],ie=[];if(e.length===1){if(!(v||I)||c)return tw($,P||S)}else{v||I&&e.length===1||(u?J.push(...nw($,b[0],13)):J.push(...iw($,O[0],b[0])));let Q=_p(jO(e[e.length-1].vector));I||v&&e.length===1?ie.push(te):m?ie.push(...rw(te,Q,S,29)):ie.push(...sw(te,Q,S))}return O.concat(ie,b.reverse(),J)}function Fp(e){return e!=null&&e>=0}function lw(e,t={}){var m;let{streamline:n=.5,size:i=16,last:r=!1}=t;if(e.length===0)return[];let s=.15+(1-n)*.85,a=Array.isArray(e[0])?e:e.map(({x:d,y:p,pressure:v=wp})=>[d,p,v]);if(a.length===2){let d=a[1];a=a.slice(0,-1);for(let p=1;p<5;p++)a.push(Dp(a[0],d,p/4))}a.length===1&&(a=[...a,[...Bt(a[0],Vp),...a[0].slice(2)]]);let o=[{point:[a[0][0],a[0][1]],pressure:Fp(a[0][2])?a[0][2]:.25,vector:[...Vp],distance:0,runningLength:0}],l=!1,c=0,u=o[0],h=a.length-1;for(let d=1;d{"use strict";se();({PI:YO}=Math),Br=YO+1e-4,wp=.5,Vp=[1,1];({min:Wl}=Math);De=[0,0],xn=[0,0],An=[0,0];Mp=[0,0];uw=cw,dw=U("signature-pad").parts("root","control","segment","segmentPath","guide","clearTrigger","label"),si=dw.build(),hw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`signature-${e.id}`},qp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`signature-control-${e.id}`},gw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`signature-label-${e.id}`},$p=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.hiddenInput)!=null?n:`signature-input-${e.id}`},Va=e=>e.getById(qp(e)),pw=e=>vi(Va(e),"[data-part=segment]"),Wp=(e,t)=>Sc(pw(e),t);Oa=(e,t)=>(e+t)/2;vw={props({props:e}){return y(g({defaultPaths:[]},e),{drawing:g({size:2,simulatePressure:!1,thinning:.7,smoothing:.4,streamline:.6},e.drawing),translations:g({control:"signature pad",clearTrigger:"clear signature"},e.translations)})},initialState(){return"idle"},context({prop:e,bindable:t}){return{paths:t(()=>({defaultValue:e("defaultPaths"),value:e("paths"),sync:!0,onChange(n){var i;(i=e("onDraw"))==null||i({paths:n})}})),currentPoints:t(()=>({defaultValue:[]})),currentPath:t(()=>({defaultValue:null}))}},computed:{isInteractive:({prop:e})=>!(e("disabled")||e("readOnly")),isEmpty:({context:e})=>e.get("paths").length===0},on:{CLEAR:{actions:["clearPoints","invokeOnDrawEnd","focusCanvasEl"]}},states:{idle:{on:{POINTER_DOWN:{target:"drawing",actions:["addPoint"]}}},drawing:{effects:["trackPointerMove"],on:{POINTER_MOVE:{actions:["addPoint","invokeOnDraw"]},POINTER_UP:{target:"idle",actions:["endStroke","invokeOnDrawEnd"]}}}},implementations:{effects:{trackPointerMove({scope:e,send:t}){let n=e.getDoc();return hn(n,{onPointerMove({event:i,point:r}){let s=Va(e);if(!s)return;let{offset:a}=to(r,s);t({type:"POINTER_MOVE",point:a,pressure:i.pressure})},onPointerUp(){t({type:"POINTER_UP"})}})}},actions:{addPoint({context:e,event:t,prop:n}){let i=[...e.get("currentPoints"),t.point];e.set("currentPoints",i);let r=uw(i,n("drawing"));e.set("currentPath",mw(r))},endStroke({context:e}){let t=[...e.get("paths"),e.get("currentPath")];e.set("paths",t),e.set("currentPoints",[]),e.set("currentPath",null)},clearPoints({context:e}){e.set("currentPoints",[]),e.set("paths",[]),e.set("currentPath",null)},focusCanvasEl({scope:e}){queueMicrotask(()=>{var t;(t=e.getActiveElement())==null||t.focus({preventScroll:!0})})},invokeOnDraw({context:e,prop:t}){var n;(n=t("onDraw"))==null||n({paths:[...e.get("paths"),e.get("currentPath")]})},invokeOnDrawEnd({context:e,prop:t,scope:n,computed:i}){var r;(r=t("onDrawEnd"))==null||r({paths:[...e.get("paths")],getDataUrl(s,a=.92){return i("isEmpty")?Promise.resolve(""):Wp(n,{type:s,quality:a})}})}}}},yw=_()(["defaultPaths","dir","disabled","drawing","getRootNode","id","ids","name","onDraw","onDrawEnd","paths","readOnly","required","translations"]),jA=B(yw),bw=class extends K{constructor(){super(...arguments);Y(this,"imageURL","");Y(this,"paths",[]);Y(this,"name");Y(this,"syncPaths",()=>{let t=this.el.querySelector('[data-scope="signature-pad"][data-part="segment"]');if(!t)return;if(this.api.paths.length+(this.api.currentPath?1:0)===0){t.innerHTML="",this.imageURL="",this.paths=[];let i=this.el.querySelector('[data-scope="signature-pad"][data-part="hidden-input"]');i&&(i.value="");return}if(t.innerHTML="",this.api.paths.forEach(i=>{let r=document.createElementNS("http://www.w3.org/2000/svg","path");r.setAttribute("data-scope","signature-pad"),r.setAttribute("data-part","path"),this.spreadProps(r,this.api.getSegmentPathProps({path:i})),t.appendChild(r)}),this.api.currentPath){let i=document.createElementNS("http://www.w3.org/2000/svg","path");i.setAttribute("data-scope","signature-pad"),i.setAttribute("data-part","current-path"),this.spreadProps(i,this.api.getSegmentPathProps({path:this.api.currentPath})),t.appendChild(i)}})}initMachine(t){return this.name=t.name,new W(vw,t)}setName(t){this.name=t}setPaths(t){this.paths=t}initApi(){return fw(this.machine.service,q)}render(){let t=this.el.querySelector('[data-scope="signature-pad"][data-part="root"]');if(!t)return;this.spreadProps(t,this.api.getRootProps());let n=t.querySelector('[data-scope="signature-pad"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps());let i=t.querySelector('[data-scope="signature-pad"][data-part="control"]');i&&this.spreadProps(i,this.api.getControlProps());let r=t.querySelector('[data-scope="signature-pad"][data-part="segment"]');r&&this.spreadProps(r,this.api.getSegmentProps());let s=t.querySelector('[data-scope="signature-pad"][data-part="guide"]');s&&this.spreadProps(s,this.api.getGuideProps());let a=t.querySelector('[data-scope="signature-pad"][data-part="clear-trigger"]');a&&this.spreadProps(a,this.api.getClearTriggerProps());let o=t.querySelector('[data-scope="signature-pad"][data-part="hidden-input"]');o&&this.spreadProps(o,this.api.getHiddenInputProps({value:this.api.paths.length>0?JSON.stringify(this.api.paths):""})),this.syncPaths()}};Ew={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=C(e,"controlled"),i=wa(e,"paths"),r=wa(e,"defaultPaths"),s=new bw(e,y(g(g({id:e.id,name:w(e,"name")},n&&i.length>0?{paths:i}:void 0),!n&&r.length>0?{defaultPaths:r}:void 0),{drawing:Hp(e),onDrawEnd:a=>{s.setPaths(a.paths);let o=e.querySelector('[data-scope="signature-pad"][data-part="hidden-input"]');o&&(o.value=a.paths.length>0?JSON.stringify(a.paths):"",o.dispatchEvent(new Event("input",{bubbles:!0})),o.dispatchEvent(new Event("change",{bubbles:!0}))),a.getDataUrl("image/png").then(l=>{s.imageURL=l;let c=w(e,"onDrawEnd");c&&this.liveSocket.main.isConnected()&&t(c,{id:e.id,paths:a.paths,url:l});let u=w(e,"onDrawEndClient");u&&e.dispatchEvent(new CustomEvent(u,{bubbles:!0,detail:{id:e.id,paths:a.paths,url:l}}))})}}));s.init(),this.signaturePad=s,this.onClear=a=>{let{id:o}=a.detail;o&&o!==e.id||s.api.clear()},e.addEventListener("phx:signature-pad:clear",this.onClear),this.handlers=[],this.handlers.push(this.handleEvent("signature_pad_clear",a=>{let o=a.signature_pad_id;o&&o!==e.id||s.api.clear()}))},updated(){var r,s;let e=C(this.el,"controlled"),t=wa(this.el,"paths"),n=wa(this.el,"defaultPaths"),i=w(this.el,"name");i&&((r=this.signaturePad)==null||r.setName(i)),(s=this.signaturePad)==null||s.updateProps(y(g(g({id:this.el.id,name:i},e&&t.length>0?{paths:t}:{}),!e&&n.length>0?{defaultPaths:n}:{}),{drawing:Hp(this.el)}))},destroyed(){var e;if(this.onClear&&this.el.removeEventListener("phx:signature-pad:clear",this.onClear),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.signaturePad)==null||e.destroy()}}});var Zp={};he(Zp,{Switch:()=>xw});function Tw(e,t){let{context:n,send:i,prop:r,scope:s}=e,a=!!r("disabled"),o=!!r("readOnly"),l=!!r("required"),c=!!n.get("checked"),u=!a&&n.get("focused"),h=!a&&n.get("focusVisible"),m=!a&&n.get("active"),d={"data-active":E(m),"data-focus":E(u),"data-focus-visible":E(h),"data-readonly":E(o),"data-hover":E(n.get("hovered")),"data-disabled":E(a),"data-state":c?"checked":"unchecked","data-invalid":E(r("invalid")),"data-required":E(l)};return{checked:c,disabled:a,focused:u,setChecked(p){i({type:"CHECKED.SET",checked:p,isTrusted:!1})},toggleChecked(){i({type:"CHECKED.TOGGLE",checked:c,isTrusted:!1})},getRootProps(){return t.label(y(g(g({},xa.root.attrs),d),{dir:r("dir"),id:Xp(s),htmlFor:Xl(s),onPointerMove(){a||i({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){a||i({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(p){var I;if(a)return;j(p)===zi(s)&&p.stopPropagation(),Xe()&&((I=zi(s))==null||I.focus())}}))},getLabelProps(){return t.element(y(g(g({},xa.label.attrs),d),{dir:r("dir"),id:Yp(s)}))},getThumbProps(){return t.element(y(g(g({},xa.thumb.attrs),d),{dir:r("dir"),id:Pw(s),"aria-hidden":!0}))},getControlProps(){return t.element(y(g(g({},xa.control.attrs),d),{dir:r("dir"),id:Cw(s),"aria-hidden":!0}))},getHiddenInputProps(){return t.input({id:Xl(s),type:"checkbox",required:r("required"),defaultChecked:c,disabled:a,"aria-labelledby":Yp(s),"aria-invalid":r("invalid"),name:r("name"),form:r("form"),value:r("value"),style:Vt,onFocus(){let p=En();i({type:"CONTEXT.SET",context:{focused:!0,focusVisible:p}})},onBlur(){i({type:"CONTEXT.SET",context:{focused:!1,focusVisible:!1}})},onClick(p){if(o){p.preventDefault();return}let v=p.currentTarget.checked;i({type:"CHECKED.SET",checked:v,isTrusted:!0})}})}}}var Iw,xa,Xp,Yp,Pw,Cw,Xl,Sw,zi,jp,Ow,ww,ek,Vw,xw,Jp=re(()=>{"use strict";pr();se();Iw=U("switch").parts("root","label","control","thumb"),xa=Iw.build(),Xp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`switch:${e.id}`},Yp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`switch:${e.id}:label`},Pw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.thumb)!=null?n:`switch:${e.id}:thumb`},Cw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`switch:${e.id}:control`},Xl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.hiddenInput)!=null?n:`switch:${e.id}:input`},Sw=e=>e.getById(Xp(e)),zi=e=>e.getById(Xl(e));({not:jp}=Ee()),Ow={props({props:e}){return g({defaultChecked:!1,label:"switch",value:"on"},e)},initialState(){return"ready"},context({prop:e,bindable:t}){return{checked:t(()=>({defaultValue:e("defaultChecked"),value:e("checked"),onChange(n){var i;(i=e("onCheckedChange"))==null||i({checked:n})}})),fieldsetDisabled:t(()=>({defaultValue:!1})),focusVisible:t(()=>({defaultValue:!1})),active:t(()=>({defaultValue:!1})),focused:t(()=>({defaultValue:!1})),hovered:t(()=>({defaultValue:!1}))}},computed:{isDisabled:({context:e,prop:t})=>t("disabled")||e.get("fieldsetDisabled")},watch({track:e,prop:t,context:n,action:i}){e([()=>t("disabled")],()=>{i(["removeFocusIfNeeded"])}),e([()=>n.get("checked")],()=>{i(["syncInputElement"])})},effects:["trackFormControlState","trackPressEvent","trackFocusVisible"],on:{"CHECKED.TOGGLE":[{guard:jp("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:jp("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},states:{ready:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackPressEvent({computed:e,scope:t,context:n}){if(!e("isDisabled"))return ps({pointerNode:Sw(t),keyboardNode:zi(t),isValidKey:i=>i.key===" ",onPress:()=>n.set("active",!1),onPressStart:()=>n.set("active",!0),onPressEnd:()=>n.set("active",!1)})},trackFocusVisible({computed:e,scope:t}){if(!e("isDisabled"))return Pn({root:t.getRootNode()})},trackFormControlState({context:e,send:t,scope:n}){return wt(zi(n),{onFieldsetDisabledChange(i){e.set("fieldsetDisabled",i)},onFormReset(){let i=e.initial("checked");t({type:"CHECKED.SET",checked:!!i,src:"form-reset"})}})}},actions:{setContext({context:e,event:t}){for(let n in t.context)e.set(n,t.context[n])},syncInputElement({context:e,scope:t}){let n=zi(t);n&&sr(n,!!e.get("checked"))},removeFocusIfNeeded({context:e,prop:t}){t("disabled")&&e.set("focused",!1)},setChecked({context:e,event:t}){e.set("checked",t.checked)},toggleChecked({context:e}){e.set("checked",!e.get("checked"))},dispatchChangeEvent({context:e,scope:t}){queueMicrotask(()=>{let n=zi(t);pi(n,{checked:e.get("checked")})})}}}},ww=_()(["checked","defaultChecked","dir","disabled","form","getRootNode","id","ids","invalid","label","name","onCheckedChange","readOnly","required","value"]),ek=B(ww),Vw=class extends K{initMachine(e){return new W(Ow,e)}initApi(){return Tw(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="switch"][data-part="root"]');if(!e)return;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="switch"][data-part="hidden-input"]');t&&this.spreadProps(t,this.api.getHiddenInputProps());let n=this.el.querySelector('[data-scope="switch"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps());let i=this.el.querySelector('[data-scope="switch"][data-part="control"]');i&&this.spreadProps(i,this.api.getControlProps());let r=this.el.querySelector('[data-scope="switch"][data-part="thumb"]');r&&this.spreadProps(r,this.api.getThumbProps())}},xw={mounted(){let e=this.el,t=this.pushEvent.bind(this);this.wasFocused=!1;let n=new Vw(e,y(g({id:e.id},C(e,"controlled")?{checked:C(e,"checked")}:{defaultChecked:C(e,"defaultChecked")}),{disabled:C(e,"disabled"),name:w(e,"name"),form:w(e,"form"),value:w(e,"value"),dir:w(e,"dir",["ltr","rtl"]),invalid:C(e,"invalid"),required:C(e,"required"),readOnly:C(e,"readOnly"),label:w(e,"label"),onCheckedChange:i=>{let r=w(e,"onCheckedChange");r&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&t(r,{checked:i.checked,id:e.id});let s=w(e,"onCheckedChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{value:i,id:e.id}}))}}));n.init(),this.zagSwitch=n,this.onSetChecked=i=>{let{value:r}=i.detail;n.api.setChecked(r)},e.addEventListener("phx:switch:set-checked",this.onSetChecked),this.handlers=[],this.handlers.push(this.handleEvent("switch_set_checked",i=>{let r=i.id;r&&r!==e.id||n.api.setChecked(i.value)})),this.handlers.push(this.handleEvent("switch_toggle_checked",i=>{let r=i.id;r&&r!==e.id||n.api.toggleChecked()})),this.handlers.push(this.handleEvent("switch_checked",()=>{this.pushEvent("switch_checked_response",{value:n.api.checked})})),this.handlers.push(this.handleEvent("switch_focused",()=>{this.pushEvent("switch_focused_response",{value:n.api.focused})})),this.handlers.push(this.handleEvent("switch_disabled",()=>{this.pushEvent("switch_disabled_response",{value:n.api.disabled})}))},beforeUpdate(){var e,t;this.wasFocused=(t=(e=this.zagSwitch)==null?void 0:e.api.focused)!=null?t:!1},updated(){var e;if((e=this.zagSwitch)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlled")?{checked:C(this.el,"checked")}:{defaultChecked:C(this.el,"defaultChecked")}),{disabled:C(this.el,"disabled"),name:w(this.el,"name"),form:w(this.el,"form"),value:w(this.el,"value"),dir:w(this.el,"dir",["ltr","rtl"]),invalid:C(this.el,"invalid"),required:C(this.el,"required"),readOnly:C(this.el,"readOnly"),label:w(this.el,"label")})),C(this.el,"controlled")&&this.wasFocused){let t=this.el.querySelector('[data-part="hidden-input"]');t==null||t.focus()}},destroyed(){var e;if(this.onSetChecked&&this.el.removeEventListener("phx:switch:set-checked",this.onSetChecked),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.zagSwitch)==null||e.destroy()}}});var nf={};he(nf,{Tabs:()=>Kw});function Hw(e,t){let{state:n,send:i,context:r,prop:s,scope:a}=e,o=s("translations"),l=n.matches("focused"),c=s("orientation")==="vertical",u=s("orientation")==="horizontal",h=s("composite");function m(d){return{selected:r.get("value")===d.value,focused:r.get("focusedValue")===d.value,disabled:!!d.disabled}}return{value:r.get("value"),focusedValue:r.get("focusedValue"),setValue(d){i({type:"SET_VALUE",value:d})},clearValue(){i({type:"CLEAR_VALUE"})},setIndicatorRect(d){let p=ai(a,d);i({type:"SET_INDICATOR_RECT",id:p})},syncTabIndex(){i({type:"SYNC_TAB_INDEX"})},selectNext(d){i({type:"TAB_FOCUS",value:d,src:"selectNext"}),i({type:"ARROW_NEXT",src:"selectNext"})},selectPrev(d){i({type:"TAB_FOCUS",value:d,src:"selectPrev"}),i({type:"ARROW_PREV",src:"selectPrev"})},focus(){var p;let d=r.get("value");d&&((p=Aa(a,d))==null||p.focus())},getRootProps(){return t.element(y(g({},_r.root.attrs),{id:kw(a),"data-orientation":s("orientation"),"data-focus":E(l),dir:s("dir")}))},getListProps(){return t.element(y(g({},_r.list.attrs),{id:Gr(a),role:"tablist",dir:s("dir"),"data-focus":E(l),"aria-orientation":s("orientation"),"data-orientation":s("orientation"),"aria-label":o==null?void 0:o.listLabel,onKeyDown(d){if(d.defaultPrevented||Re(d)||!ce(d.currentTarget,j(d)))return;let p={ArrowDown(){u||i({type:"ARROW_NEXT",key:"ArrowDown"})},ArrowUp(){u||i({type:"ARROW_PREV",key:"ArrowUp"})},ArrowLeft(){c||i({type:"ARROW_PREV",key:"ArrowLeft"})},ArrowRight(){c||i({type:"ARROW_NEXT",key:"ArrowRight"})},Home(){i({type:"HOME"})},End(){i({type:"END"})}},v=ge(d,{dir:s("dir"),orientation:s("orientation")}),I=p[v];if(I){d.preventDefault(),I(d);return}}}))},getTriggerState:m,getTriggerProps(d){let{value:p,disabled:v}=d,I=m(d);return t.button(y(g({},_r.trigger.attrs),{role:"tab",type:"button",disabled:v,dir:s("dir"),"data-orientation":s("orientation"),"data-disabled":E(v),"aria-disabled":v,"data-value":p,"aria-selected":I.selected,"data-selected":E(I.selected),"data-focus":E(I.focused),"aria-controls":I.selected?Zl(a,p):void 0,"data-ownedby":Gr(a),"data-ssr":E(r.get("ssr")),id:ai(a,p),tabIndex:I.selected&&h?0:-1,onFocus(){i({type:"TAB_FOCUS",value:p})},onBlur(T){let O=T.relatedTarget;(O==null?void 0:O.getAttribute("role"))!=="tab"&&i({type:"TAB_BLUR"})},onClick(T){T.defaultPrevented||Fn(T)||v||(Xe()&&T.currentTarget.focus(),i({type:"TAB_CLICK",value:p}))}}))},getContentProps(d){let{value:p}=d,v=r.get("value")===p;return t.element(y(g({},_r.content.attrs),{dir:s("dir"),id:Zl(a,p),tabIndex:h?0:-1,"aria-labelledby":ai(a,p),role:"tabpanel","data-ownedby":Gr(a),"data-selected":E(v),"data-orientation":s("orientation"),hidden:!v}))},getIndicatorProps(){let d=r.get("indicatorRect"),p=d==null||d.width===0&&d.height===0&&d.x===0&&d.y===0;return t.element(y(g({id:ef(a)},_r.indicator.attrs),{dir:s("dir"),"data-orientation":s("orientation"),hidden:p,style:{"--transition-property":"left, right, top, bottom, width, height","--left":ye(d==null?void 0:d.x),"--top":ye(d==null?void 0:d.y),"--width":ye(d==null?void 0:d.width),"--height":ye(d==null?void 0:d.height),position:"absolute",willChange:"var(--transition-property)",transitionProperty:"var(--transition-property)",transitionDuration:"var(--transition-duration, 150ms)",transitionTimingFunction:"var(--transition-timing-function)",[u?"left":"top"]:u?"var(--left)":"var(--top)"}}))}}}var Aw,_r,kw,Gr,Zl,ai,ef,Nw,Rw,Aa,Qp,Yi,Dw,Lw,Mw,Fw,tf,$w,Bw,_w,Gw,rk,Uw,sk,qw,ak,Ww,Kw,rf=re(()=>{"use strict";se();Aw=U("tabs").parts("root","list","trigger","content","indicator"),_r=Aw.build(),kw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`tabs:${e.id}`},Gr=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.list)!=null?n:`tabs:${e.id}:list`},Zl=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.content)==null?void 0:i.call(n,t))!=null?r:`tabs:${e.id}:content-${t}`},ai=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.trigger)==null?void 0:i.call(n,t))!=null?r:`tabs:${e.id}:trigger-${t}`},ef=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicator)!=null?n:`tabs:${e.id}:indicator`},Nw=e=>e.getById(Gr(e)),Rw=(e,t)=>e.getById(Zl(e,t)),Aa=(e,t)=>t!=null?e.getById(ai(e,t)):null,Qp=e=>e.getById(ef(e)),Yi=e=>{let n=`[role=tab][data-ownedby='${CSS.escape(Gr(e))}']:not([disabled])`;return Fe(Nw(e),n)},Dw=e=>lt(Yi(e)),Lw=e=>mt(Yi(e)),Mw=(e,t)=>yi(Yi(e),ai(e,t.value),t.loopFocus),Fw=(e,t)=>bi(Yi(e),ai(e,t.value),t.loopFocus),tf=e=>{var t,n,i,r;return{x:(t=e==null?void 0:e.offsetLeft)!=null?t:0,y:(n=e==null?void 0:e.offsetTop)!=null?n:0,width:(i=e==null?void 0:e.offsetWidth)!=null?i:0,height:(r=e==null?void 0:e.offsetHeight)!=null?r:0}},$w=(e,t)=>{let n=so(Yi(e),ai(e,t));return tf(n)};({createMachine:Bw}=ut()),_w=Bw({props({props:e}){return g({dir:"ltr",orientation:"horizontal",activationMode:"automatic",loopFocus:!0,composite:!0,navigate(t){mi(t.node)},defaultValue:null},e)},initialState(){return"idle"},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var i;(i=e("onValueChange"))==null||i({value:n})}})),focusedValue:t(()=>({defaultValue:e("value")||e("defaultValue"),sync:!0,onChange(n){var i;(i=e("onFocusChange"))==null||i({focusedValue:n})}})),ssr:t(()=>({defaultValue:!0})),indicatorRect:t(()=>({defaultValue:null}))}},watch({context:e,prop:t,track:n,action:i}){n([()=>e.get("value")],()=>{i(["syncIndicatorRect","syncTabIndex","navigateIfNeeded"])}),n([()=>t("dir"),()=>t("orientation")],()=>{i(["syncIndicatorRect"])})},on:{SET_VALUE:{actions:["setValue"]},CLEAR_VALUE:{actions:["clearValue"]},SET_INDICATOR_RECT:{actions:["setIndicatorRect"]},SYNC_TAB_INDEX:{actions:["syncTabIndex"]}},entry:["syncIndicatorRect","syncTabIndex","syncSsr"],exit:["cleanupObserver"],states:{idle:{on:{TAB_FOCUS:{target:"focused",actions:["setFocusedValue"]},TAB_CLICK:{target:"focused",actions:["setFocusedValue","setValue"]}}},focused:{on:{TAB_CLICK:{actions:["setFocusedValue","setValue"]},ARROW_PREV:[{guard:"selectOnFocus",actions:["focusPrevTab","selectFocusedTab"]},{actions:["focusPrevTab"]}],ARROW_NEXT:[{guard:"selectOnFocus",actions:["focusNextTab","selectFocusedTab"]},{actions:["focusNextTab"]}],HOME:[{guard:"selectOnFocus",actions:["focusFirstTab","selectFocusedTab"]},{actions:["focusFirstTab"]}],END:[{guard:"selectOnFocus",actions:["focusLastTab","selectFocusedTab"]},{actions:["focusLastTab"]}],TAB_FOCUS:{actions:["setFocusedValue"]},TAB_BLUR:{target:"idle",actions:["clearFocusedValue"]}}}},implementations:{guards:{selectOnFocus:({prop:e})=>e("activationMode")==="automatic"},actions:{selectFocusedTab({context:e,prop:t}){H(()=>{let n=e.get("focusedValue");if(!n)return;let r=t("deselectable")&&e.get("value")===n?null:n;e.set("value",r)})},setFocusedValue({context:e,event:t,flush:n}){t.value!=null&&n(()=>{e.set("focusedValue",t.value)})},clearFocusedValue({context:e}){e.set("focusedValue",null)},setValue({context:e,event:t,prop:n}){let i=n("deselectable")&&e.get("value")===e.get("focusedValue");e.set("value",i?null:t.value)},clearValue({context:e}){e.set("value",null)},focusFirstTab({scope:e}){H(()=>{var t;(t=Dw(e))==null||t.focus()})},focusLastTab({scope:e}){H(()=>{var t;(t=Lw(e))==null||t.focus()})},focusNextTab({context:e,prop:t,scope:n,event:i}){var a;let r=(a=i.value)!=null?a:e.get("focusedValue");if(!r)return;let s=Mw(n,{value:r,loopFocus:t("loopFocus")});H(()=>{t("composite")?s==null||s.focus():(s==null?void 0:s.dataset.value)!=null&&e.set("focusedValue",s.dataset.value)})},focusPrevTab({context:e,prop:t,scope:n,event:i}){var a;let r=(a=i.value)!=null?a:e.get("focusedValue");if(!r)return;let s=Fw(n,{value:r,loopFocus:t("loopFocus")});H(()=>{t("composite")?s==null||s.focus():(s==null?void 0:s.dataset.value)!=null&&e.set("focusedValue",s.dataset.value)})},syncTabIndex({context:e,scope:t}){H(()=>{let n=e.get("value");if(!n)return;let i=Rw(t,n);if(!i)return;ar(i).length>0?i.removeAttribute("tabindex"):i.setAttribute("tabindex","0")})},cleanupObserver({refs:e}){let t=e.get("indicatorCleanup");t&&t()},setIndicatorRect({context:e,event:t,scope:n}){var a;let i=(a=t.id)!=null?a:e.get("value");!Qp(n)||!i||!Aa(n,i)||e.set("indicatorRect",$w(n,i))},syncSsr({context:e}){e.set("ssr",!1)},syncIndicatorRect({context:e,refs:t,scope:n}){let i=t.get("indicatorCleanup");if(i&&i(),!Qp(n))return;let s=()=>{let l=Aa(n,e.get("value"));if(!l)return;let c=tf(l);e.set("indicatorRect",u=>fe(u,c)?u:c)};s();let a=Yi(n),o=At(...a.map(l=>gn.observe(l,s)));t.set("indicatorCleanup",o)},navigateIfNeeded({context:e,prop:t,scope:n}){var s;let i=e.get("value");if(!i)return;let r=Aa(n,i);st(r)&&((s=t("navigate"))==null||s({value:i,node:r,href:r.href}))}}}}),Gw=_()(["activationMode","composite","deselectable","dir","getRootNode","id","ids","loopFocus","navigate","onFocusChange","onValueChange","orientation","translations","value","defaultValue"]),rk=B(Gw),Uw=_()(["disabled","value"]),sk=B(Uw),qw=_()(["value"]),ak=B(qw),Ww=class extends K{initMachine(e){return new W(_w,e)}initApi(){return Hw(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="tabs"][data-part="root"]');if(!e)return;this.spreadProps(e,this.api.getRootProps());let t=e.querySelector('[data-scope="tabs"][data-part="list"]');if(!t)return;this.spreadProps(t,this.api.getListProps());let n=this.el.getAttribute("data-items"),i=n?JSON.parse(n):[],r=t.querySelectorAll('[data-scope="tabs"][data-part="trigger"]');for(let a=0;a{var a,o;let r=w(e,"onValueChange");r&&this.liveSocket.main.isConnected()&&t(r,{id:e.id,value:(a=i.value)!=null?a:null});let s=w(e,"onValueChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{id:e.id,value:(o=i.value)!=null?o:null}}))},onFocusChange:i=>{var a,o;let r=w(e,"onFocusChange");r&&this.liveSocket.main.isConnected()&&t(r,{id:e.id,value:(a=i.focusedValue)!=null?a:null});let s=w(e,"onFocusChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{id:e.id,value:(o=i.focusedValue)!=null?o:null}}))}}));n.init(),this.tabs=n,this.onSetValue=i=>{let{value:r}=i.detail;n.api.setValue(r)},e.addEventListener("phx:tabs:set-value",this.onSetValue),this.handlers=[],this.handlers.push(this.handleEvent("tabs_set_value",i=>{let r=i.tabs_id;r&&r!==e.id||n.api.setValue(i.value)})),this.handlers.push(this.handleEvent("tabs_value",()=>{this.pushEvent("tabs_value_response",{value:n.api.value})})),this.handlers.push(this.handleEvent("tabs_focused_value",()=>{this.pushEvent("tabs_focused_value_response",{value:n.api.focusedValue})}))},updated(){var e;(e=this.tabs)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlled")?{value:w(this.el,"value")}:{defaultValue:w(this.el,"defaultValue")}),{orientation:w(this.el,"orientation",["horizontal","vertical"]),dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(this.onSetValue&&this.el.removeEventListener("phx:tabs:set-value",this.onSetValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.tabs)==null||e.destroy()}}});var of={};he(of,{Timer:()=>rV});function Xw(e,t){let{state:n,send:i,computed:r,scope:s}=e,a=n.matches("running"),o=n.matches("paused"),l=r("time"),c=r("formattedTime"),u=r("progressPercent");return{running:a,paused:o,time:l,formattedTime:c,progressPercent:u,start(){i({type:"START"})},pause(){i({type:"PAUSE"})},resume(){i({type:"RESUME"})},reset(){i({type:"RESET"})},restart(){i({type:"RESTART"})},getRootProps(){return t.element(g({id:Yw(s)},Rn.root.attrs))},getAreaProps(){return t.element(g({role:"timer",id:jw(s),"aria-label":`${l.days} days ${c.hours}:${c.minutes}:${c.seconds}`,"aria-atomic":!0},Rn.area.attrs))},getControlProps(){return t.element(g({},Rn.control.attrs))},getItemProps(h){let m=l[h.type];return t.element(y(g({},Rn.item.attrs),{"data-type":h.type,style:{"--value":m}}))},getItemLabelProps(h){return t.element(y(g({},Rn.itemLabel.attrs),{"data-type":h.type}))},getItemValueProps(h){return t.element(y(g({},Rn.itemValue.attrs),{"data-type":h.type}))},getSeparatorProps(){return t.element(g({"aria-hidden":!0},Rn.separator.attrs))},getActionTriggerProps(h){if(!sf.has(h.action))throw new Error(`[zag-js] Invalid action: ${h.action}. Must be one of: ${Array.from(sf).join(", ")}`);return t.button(y(g({},Rn.actionTrigger.attrs),{hidden:Ce(h.action,{start:()=>a||o,pause:()=>!a,reset:()=>!a&&!o,resume:()=>!o,restart:()=>!1}),type:"button",onClick(m){m.defaultPrevented||i({type:h.action.toUpperCase()})}}))}}}function Jw(e){let t=Math.max(0,e),n=t%1e3,i=Math.floor(t/1e3)%60,r=Math.floor(t/(1e3*60))%60,s=Math.floor(t/(1e3*60*60))%24;return{days:Math.floor(t/(1e3*60*60*24)),hours:s,minutes:r,seconds:i,milliseconds:n}}function af(e,t,n){let i=n-t;return i===0?0:(e-t)/i}function Ur(e,t=2){return e.toString().padStart(t,"0")}function Qw(e,t){return Math.floor(e/t)*t}function eV(e){let{days:t,hours:n,minutes:i,seconds:r}=e;return{days:Ur(t),hours:Ur(n),minutes:Ur(i),seconds:Ur(r),milliseconds:Ur(e.milliseconds,3)}}function tV(e){let{startMs:t,targetMs:n,countdown:i,interval:r}=e;if(r!=null&&(typeof r!="number"||r<=0))throw new Error(`[timer] Invalid interval: ${r}. Must be a positive number.`);if(t!=null&&(typeof t!="number"||t<0))throw new Error(`[timer] Invalid startMs: ${t}. Must be a non-negative number.`);if(n!=null&&(typeof n!="number"||n<0))throw new Error(`[timer] Invalid targetMs: ${n}. Must be a non-negative number.`);if(i&&t!=null&&n!=null&&t<=n)throw new Error(`[timer] Invalid countdown configuration: startMs (${t}) must be greater than targetMs (${n}).`);if(!i&&t!=null&&n!=null&&t>=n)throw new Error(`[timer] Invalid stopwatch configuration: startMs (${t}) must be less than targetMs (${n}).`);if(i&&n==null&&t!=null&&t<=0)throw new Error(`[timer] Invalid countdown configuration: startMs (${t}) must be greater than 0 when no targetMs is provided.`)}var zw,Rn,Yw,jw,sf,Zw,nV,uk,iV,rV,lf=re(()=>{"use strict";se();zw=U("timer").parts("root","area","control","item","itemValue","itemLabel","actionTrigger","separator"),Rn=zw.build(),Yw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`timer:${e.id}:root`},jw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.area)!=null?n:`timer:${e.id}:area`},sf=new Set(["start","pause","resume","reset","restart"]);Zw={props({props:e}){return tV(e),g({interval:1e3,startMs:0},e)},initialState({prop:e}){return e("autoStart")?"running":"idle"},context({prop:e,bindable:t}){return{currentMs:t(()=>({defaultValue:e("startMs")}))}},watch({track:e,send:t,prop:n}){e([()=>n("startMs")],()=>{t({type:"RESTART"})})},on:{RESTART:{target:"running:temp",actions:["resetTime"]}},computed:{time:({context:e})=>Jw(e.get("currentMs")),formattedTime:({computed:e})=>eV(e("time")),progressPercent:Bn(({context:e,prop:t})=>[e.get("currentMs"),t("targetMs"),t("startMs"),t("countdown")],([e,t=0,n,i])=>{let r=i?af(e,t,n):af(e,n,t);return He(r,0,1)})},states:{idle:{on:{START:{target:"running"},RESET:{actions:["resetTime"]}}},"running:temp":{effects:["waitForNextTick"],on:{CONTINUE:{target:"running"}}},running:{effects:["keepTicking"],on:{PAUSE:{target:"paused"},TICK:[{target:"idle",guard:"hasReachedTarget",actions:["invokeOnComplete"]},{actions:["updateTime","invokeOnTick"]}],RESET:{actions:["resetTime"]}}},paused:{on:{RESUME:{target:"running"},RESET:{target:"idle",actions:["resetTime"]}}}},implementations:{effects:{keepTicking({prop:e,send:t}){return su(({deltaMs:n})=>{t({type:"TICK",deltaMs:n})},e("interval"))},waitForNextTick({send:e}){return mn(()=>{e({type:"CONTINUE"})},0)}},actions:{updateTime({context:e,prop:t,event:n}){let i=t("countdown")?-1:1,r=Qw(n.deltaMs,t("interval"));e.set("currentMs",s=>{let a=s+i*r,o=t("targetMs");return o==null&&t("countdown")&&(o=0),t("countdown")&&o!=null?Math.max(a,o):!t("countdown")&&o!=null?Math.min(a,o):a})},resetTime({context:e,prop:t}){var i;let n=t("targetMs");n==null&&t("countdown")&&(n=0),e.set("currentMs",(i=t("startMs"))!=null?i:0)},invokeOnTick({context:e,prop:t,computed:n}){var i;(i=t("onTick"))==null||i({value:e.get("currentMs"),time:n("time"),formattedTime:n("formattedTime")})},invokeOnComplete({prop:e}){var t;(t=e("onComplete"))==null||t()}},guards:{hasReachedTarget:({context:e,prop:t})=>{let n=t("targetMs");if(n==null&&t("countdown")&&(n=0),n==null)return!1;let i=e.get("currentMs");return t("countdown")?i<=n:i>=n}}}};nV=_()(["autoStart","countdown","getRootNode","id","ids","interval","onComplete","onTick","startMs","targetMs"]),uk=B(nV),iV=class extends K{constructor(){super(...arguments);Y(this,"init",()=>{this.machine.subscribe(()=>{this.api=this.initApi(),this.render()}),this.machine.start(),this.api=this.initApi(),this.render()})}initMachine(t){return new W(Zw,t)}initApi(){return Xw(this.machine.service,q)}render(){var a;let t=(a=this.el.querySelector('[data-scope="timer"][data-part="root"]'))!=null?a:this.el;this.spreadProps(t,this.api.getRootProps());let n=this.el.querySelector('[data-scope="timer"][data-part="area"]');n&&this.spreadProps(n,this.api.getAreaProps());let i=this.el.querySelector('[data-scope="timer"][data-part="control"]');i&&this.spreadProps(i,this.api.getControlProps()),["days","hours","minutes","seconds"].forEach(o=>{let l=this.el.querySelector(`[data-scope="timer"][data-part="item"][data-type="${o}"]`);l&&this.spreadProps(l,this.api.getItemProps({type:o}))}),this.el.querySelectorAll('[data-scope="timer"][data-part="separator"]').forEach(o=>{this.spreadProps(o,this.api.getSeparatorProps())}),["start","pause","resume","reset"].forEach(o=>{let l=this.el.querySelector(`[data-scope="timer"][data-part="action-trigger"][data-action="${o}"]`);l&&this.spreadProps(l,this.api.getActionTriggerProps({action:o}))})}},rV={mounted(){var n;let e=this.el,t=new iV(e,{id:e.id,countdown:C(e,"countdown"),startMs:z(e,"startMs"),targetMs:z(e,"targetMs"),autoStart:C(e,"autoStart"),interval:(n=z(e,"interval"))!=null?n:1e3,onTick:i=>{let r=w(e,"onTick");r&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(r,{value:i.value,time:i.time,formattedTime:i.formattedTime,id:e.id})},onComplete:()=>{let i=w(e,"onComplete");i&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(i,{id:e.id})}});t.init(),this.timer=t,this.handlers=[]},updated(){var e,t;(t=this.timer)==null||t.updateProps({id:this.el.id,countdown:C(this.el,"countdown"),startMs:z(this.el,"startMs"),targetMs:z(this.el,"targetMs"),autoStart:C(this.el,"autoStart"),interval:(e=z(this.el,"interval"))!=null?e:1e3})},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.timer)==null||e.destroy()}}});var vf={};he(vf,{Toast:()=>VV});function Jl(e,t){var n;return(n=e!=null?e:gf[t])!=null?n:gf.DEFAULT}function cV(e,t){var v;let{prop:n,computed:i,context:r}=e,{offsets:s,gap:a}=n("store").attrs,o=r.get("heights"),l=lV(s),c=n("dir")==="rtl",u=t.replace("-start",c?"-right":"-left").replace("-end",c?"-left":"-right"),h=u.includes("right"),m=u.includes("left"),d={position:"fixed",pointerEvents:i("count")>0?void 0:"none",display:"flex",flexDirection:"column","--gap":`${a}px`,"--first-height":`${((v=o[0])==null?void 0:v.height)||0}px`,"--viewport-offset-left":l.left,"--viewport-offset-right":l.right,"--viewport-offset-top":l.top,"--viewport-offset-bottom":l.bottom,zIndex:ss},p="center";if(h&&(p="flex-end"),m&&(p="flex-start"),d.alignItems=p,u.includes("top")){let I=l.top;d.top=`max(env(safe-area-inset-top, 0px), ${I})`}if(u.includes("bottom")){let I=l.bottom;d.bottom=`max(env(safe-area-inset-bottom, 0px), ${I})`}if(!u.includes("left")){let I=l.right;d.insetInlineEnd=`calc(env(safe-area-inset-right, 0px) + ${I})`}if(!u.includes("right")){let I=l.left;d.insetInlineStart=`calc(env(safe-area-inset-left, 0px) + ${I})`}return d}function uV(e,t){let{prop:n,context:i,computed:r}=e,s=n("parent"),a=s.computed("placement"),{gap:o}=s.prop("store").attrs,[l]=a.split("-"),c=i.get("mounted"),u=i.get("remainingTime"),h=r("height"),m=r("frontmost"),d=!m,p=!n("stacked"),v=n("stacked"),T=n("type")==="loading"?Number.MAX_SAFE_INTEGER:u,O=r("heightIndex")*o+r("heightBefore"),b={position:"absolute",pointerEvents:"auto","--opacity":"0","--remove-delay":`${n("removeDelay")}ms`,"--duration":`${T}ms`,"--initial-height":`${h}px`,"--offset":`${O}px`,"--index":n("index"),"--z-index":r("zIndex"),"--lift-amount":"calc(var(--lift) * var(--gap))","--y":"100%","--x":"0"},f=S=>Object.assign(b,S);return l==="top"?f({top:"0","--sign":"-1","--y":"-100%","--lift":"1"}):l==="bottom"&&f({bottom:"0","--sign":"1","--y":"100%","--lift":"-1"}),c&&(f({"--y":"0","--opacity":"1"}),v&&f({"--y":"calc(var(--lift) * var(--offset))","--height":"var(--initial-height)"})),t||f({"--opacity":"0",pointerEvents:"none"}),d&&p&&(f({"--base-scale":"var(--index) * 0.05 + 1","--y":"calc(var(--lift-amount) * var(--index))","--scale":"calc(-1 * var(--base-scale))","--height":"var(--first-height)"}),t||f({"--y":"calc(var(--sign) * 40%)"})),d&&v&&!t&&f({"--y":"calc(var(--lift) * var(--offset) + var(--lift) * -100%)"}),m&&!t&&f({"--y":"calc(var(--lift) * -100%)"}),b}function dV(e,t){let{computed:n}=e,i={position:"absolute",inset:"0",scale:"1 2",pointerEvents:t?"none":"auto"},r=s=>Object.assign(i,s);return n("frontmost")&&!t&&r({height:"calc(var(--initial-height) + 80%)"}),i}function hV(){return{position:"absolute",left:"0",height:"calc(var(--gap) + 2px)",bottom:"100%",width:"100%"}}function gV(e,t){let{context:n,prop:i,send:r,refs:s,computed:a}=e;return{getCount(){return n.get("toasts").length},getToasts(){return n.get("toasts")},getGroupProps(o={}){let{label:l="Notifications"}=o,{hotkey:c}=i("store").attrs,u=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=a("placement"),[m,d="center"]=h.split("-");return t.element(y(g({},ji.group.attrs),{dir:i("dir"),tabIndex:-1,"aria-label":`${h} ${l} ${u}`,id:aV(h),"data-placement":h,"data-side":m,"data-align":d,"aria-live":"polite",role:"region",style:cV(e,h),onMouseEnter(){s.get("ignoreMouseTimer").isActive()||r({type:"REGION.POINTER_ENTER",placement:h})},onMouseMove(){s.get("ignoreMouseTimer").isActive()||r({type:"REGION.POINTER_ENTER",placement:h})},onMouseLeave(){s.get("ignoreMouseTimer").isActive()||r({type:"REGION.POINTER_LEAVE",placement:h})},onFocus(p){r({type:"REGION.FOCUS",target:p.relatedTarget})},onBlur(p){s.get("isFocusWithin")&&!ce(p.currentTarget,p.relatedTarget)&&queueMicrotask(()=>r({type:"REGION.BLUR"}))}}))},subscribe(o){return i("store").subscribe(()=>o(n.get("toasts")))}}}function yV(e,t){let{state:n,send:i,prop:r,scope:s,context:a,computed:o}=e,l=n.hasTag("visible"),c=n.hasTag("paused"),u=a.get("mounted"),h=o("frontmost"),m=r("parent").computed("placement"),d=r("type"),p=r("stacked"),v=r("title"),I=r("description"),T=r("action"),[O,b="center"]=m.split("-");return{type:d,title:v,description:I,placement:m,visible:l,paused:c,closable:!!r("closable"),pause(){i({type:"PAUSE"})},resume(){i({type:"RESUME"})},dismiss(){i({type:"DISMISS",src:"programmatic"})},getRootProps(){return t.element(y(g({},ji.root.attrs),{dir:r("dir"),id:mf(s),"data-state":l?"open":"closed","data-type":d,"data-placement":m,"data-align":b,"data-side":O,"data-mounted":E(u),"data-paused":E(c),"data-first":E(h),"data-sibling":E(!h),"data-stack":E(p),"data-overlap":E(!p),role:"status","aria-atomic":"true","aria-describedby":I?hf(s):void 0,"aria-labelledby":v?df(s):void 0,tabIndex:0,style:uV(e,l),onKeyDown(f){f.defaultPrevented||f.key=="Escape"&&(i({type:"DISMISS",src:"keyboard"}),f.preventDefault())}}))},getGhostBeforeProps(){return t.element({"data-ghost":"before",style:dV(e,l)})},getGhostAfterProps(){return t.element({"data-ghost":"after",style:hV()})},getTitleProps(){return t.element(y(g({},ji.title.attrs),{id:df(s)}))},getDescriptionProps(){return t.element(y(g({},ji.description.attrs),{id:hf(s)}))},getActionTriggerProps(){return t.button(y(g({},ji.actionTrigger.attrs),{type:"button",onClick(f){var S;f.defaultPrevented||((S=T==null?void 0:T.onClick)==null||S.call(T),i({type:"DISMISS",src:"user"}))}}))},getCloseTriggerProps(){return t.button(y(g({id:oV(s)},ji.closeTrigger.attrs),{type:"button","aria-label":"Dismiss notification",onClick(f){f.defaultPrevented||i({type:"DISMISS",src:"user"})}}))}}}function pf(e,t){let{id:n,height:i}=t;e.context.set("heights",r=>r.find(a=>a.id===n)?r.map(a=>a.id===n?y(g({},a),{height:i}):a):[{id:n,height:i},...r])}function PV(e={}){let t=IV(e,{placement:"bottom",overlap:!1,max:24,gap:16,offsets:"1rem",hotkey:["altKey","KeyT"],removeDelay:200,pauseOnPageIdle:!0}),n=[],i=[],r=new Set,s=[],a=D=>(n.push(D),()=>{let $=n.indexOf(D);n.splice($,1)}),o=D=>(n.forEach($=>$(D)),D),l=D=>{if(i.length>=t.max){s.push(D);return}o(D),i.unshift(D)},c=()=>{for(;s.length>0&&i.length{var J;let $=(J=D.id)!=null?J:`toast:${ur()}`,te=i.find(ie=>ie.id===$);return r.has($)&&r.delete($),te?i=i.map(ie=>ie.id===$?o(y(g(g({},ie),D),{id:$})):ie):l(y(g({id:$,duration:t.duration,removeDelay:t.removeDelay,type:"info"},D),{stacked:!t.overlap,gap:t.gap})),$},h=D=>(r.add(D),D?(n.forEach($=>$({id:D,dismiss:!0})),i=i.filter($=>$.id!==D),c()):(i.forEach($=>{n.forEach(te=>te({id:$.id,dismiss:!0}))}),i=[],s=[]),D);return{attrs:t,subscribe:a,create:u,update:(D,$)=>u(g({id:D},$)),remove:h,dismiss:D=>{D!=null?i=i.map($=>$.id===D?o(y(g({},$),{message:"DISMISS"})):$):i=i.map($=>o(y(g({},$),{message:"DISMISS"})))},error:D=>u(y(g({},D),{type:"error"})),success:D=>u(y(g({},D),{type:"success"})),info:D=>u(y(g({},D),{type:"info"})),warning:D=>u(y(g({},D),{type:"warning"})),loading:D=>u(y(g({},D),{type:"loading"})),getVisibleToasts:()=>i.filter(D=>!r.has(D.id)),getCount:()=>i.length,promise:(D,$,te={})=>{if(!$||!$.loading){zt("[zag-js > toast] toaster.promise() requires at least a 'loading' option to be specified");return}let J=u(y(g(g({},te),$.loading),{promise:D,type:"loading"})),ie=!0,Q,Se=Kt(D).then(ne=>Ve(null,null,function*(){if(Q=["resolve",ne],CV(ne)&&!ne.ok){ie=!1;let Ie=Kt($.error,`HTTP Error! status: ${ne.status}`);u(y(g(g({},te),Ie),{id:J,type:"error"}))}else if($.success!==void 0){ie=!1;let Ie=Kt($.success,ne);u(y(g(g({},te),Ie),{id:J,type:"success"}))}})).catch(ne=>Ve(null,null,function*(){if(Q=["reject",ne],$.error!==void 0){ie=!1;let Ie=Kt($.error,ne);u(y(g(g({},te),Ie),{id:J,type:"error"}))}})).finally(()=>{var ne;ie&&h(J),(ne=$.finally)==null||ne.call($)});return{id:J,unwrap:()=>new Promise((ne,Ie)=>Se.then(()=>Q[0]==="reject"?Ie(Q[1]):ne(Q[1])).catch(Ie))}},pause:D=>{D!=null?i=i.map($=>$.id===D?o(y(g({},$),{message:"PAUSE"})):$):i=i.map($=>o(y(g({},$),{message:"PAUSE"})))},resume:D=>{D!=null?i=i.map($=>$.id===D?o(y(g({},$),{message:"RESUME"})):$):i=i.map($=>o(y(g({},$),{message:"RESUME"})))},isVisible:D=>!r.has(D)&&!!i.find($=>$.id===D),isDismissed:D=>r.has(D),expand:()=>{i=i.map(D=>o(y(g({},D),{stacked:!0})))},collapse:()=>{i=i.map(D=>o(y(g({},D),{stacked:!1})))}}}function wV(e,t){var s,a,o;let n=(s=t==null?void 0:t.id)!=null?s:Mn(e,"toast"),i=(o=t==null?void 0:t.store)!=null?o:PV({placement:(a=t==null?void 0:t.placement)!=null?a:"bottom",overlap:t==null?void 0:t.overlap,max:t==null?void 0:t.max,gap:t==null?void 0:t.gap,offsets:t==null?void 0:t.offsets,pauseOnPageIdle:t==null?void 0:t.pauseOnPageIdle}),r=new OV(e,{id:n,store:i});return r.init(),SV.set(n,r),Ql.set(n,i),e.dataset.toastGroup="true",e.dataset.toastGroupId=n,{group:r,store:i}}function qr(e){if(e)return Ql.get(e);let t=document.querySelector("[data-toast-group]");if(!t)return;let n=t.dataset.toastGroupId||t.id;return n?Ql.get(n):void 0}var sV,ji,aV,cf,mf,uf,df,hf,oV,gf,lV,pV,fV,mV,vV,bV,EV,IV,CV,ff,SV,Ql,TV,OV,VV,yf=re(()=>{"use strict";Wn();tn();se();sV=U("toast").parts("group","root","title","description","actionTrigger","closeTrigger"),ji=sV.build(),aV=e=>`toast-group:${e}`,cf=(e,t)=>e.getById(`toast-group:${t}`),mf=e=>`toast:${e.id}`,uf=e=>e.getById(mf(e)),df=e=>`toast:${e.id}:title`,hf=e=>`toast:${e.id}:description`,oV=e=>`toast${e.id}:close`,gf={info:5e3,error:5e3,success:2e3,loading:1/0,DEFAULT:5e3};lV=e=>typeof e=="string"?{left:e,right:e,bottom:e,top:e}:e;({guards:pV,createMachine:fV}=ut()),{and:mV}=pV,vV=fV({props({props:e}){return y(g({dir:"ltr",id:ur()},e),{store:e.store})},initialState({prop:e}){return e("store").attrs.overlap?"overlap":"stack"},refs(){return{lastFocusedEl:null,isFocusWithin:!1,isPointerWithin:!1,ignoreMouseTimer:eo.create(),dismissableCleanup:void 0}},context({bindable:e}){return{toasts:e(()=>({defaultValue:[],sync:!0,hash:t=>t.map(n=>n.id).join(",")})),heights:e(()=>({defaultValue:[],sync:!0}))}},computed:{count:({context:e})=>e.get("toasts").length,overlap:({prop:e})=>e("store").attrs.overlap,placement:({prop:e})=>e("store").attrs.placement},effects:["subscribeToStore","trackDocumentVisibility","trackHotKeyPress"],watch({track:e,context:t,action:n}){e([()=>t.hash("toasts")],()=>{queueMicrotask(()=>{n(["collapsedIfEmpty","setDismissableBranch"])})})},exit:["clearDismissableBranch","clearLastFocusedEl","clearMouseEventTimer"],on:{"DOC.HOTKEY":{actions:["focusRegionEl"]},"REGION.BLUR":[{guard:mV("isOverlapping","isPointerOut"),target:"overlap",actions:["collapseToasts","resumeToasts","restoreFocusIfPointerOut"]},{guard:"isPointerOut",target:"stack",actions:["resumeToasts","restoreFocusIfPointerOut"]},{actions:["clearFocusWithin"]}],"TOAST.REMOVE":{actions:["removeToast","removeHeight","ignoreMouseEventsTemporarily"]},"TOAST.PAUSE":{actions:["pauseToasts"]}},states:{stack:{on:{"REGION.POINTER_LEAVE":[{guard:"isOverlapping",target:"overlap",actions:["clearPointerWithin","resumeToasts","collapseToasts"]},{actions:["clearPointerWithin","resumeToasts"]}],"REGION.OVERLAP":{target:"overlap",actions:["collapseToasts"]},"REGION.FOCUS":{actions:["setLastFocusedEl","pauseToasts"]},"REGION.POINTER_ENTER":{actions:["setPointerWithin","pauseToasts"]}}},overlap:{on:{"REGION.STACK":{target:"stack",actions:["expandToasts"]},"REGION.POINTER_ENTER":{target:"stack",actions:["setPointerWithin","pauseToasts","expandToasts"]},"REGION.FOCUS":{target:"stack",actions:["setLastFocusedEl","pauseToasts","expandToasts"]}}}},implementations:{guards:{isOverlapping:({computed:e})=>e("overlap"),isPointerOut:({refs:e})=>!e.get("isPointerWithin")},effects:{subscribeToStore({context:e,prop:t}){let n=t("store");return e.set("toasts",n.getVisibleToasts()),n.subscribe(i=>{if(i.dismiss){e.set("toasts",r=>r.filter(s=>s.id!==i.id));return}e.set("toasts",r=>{let s=r.findIndex(a=>a.id===i.id);return s!==-1?[...r.slice(0,s),g(g({},r[s]),i),...r.slice(s+1)]:[i,...r]})})},trackHotKeyPress({prop:e,send:t}){return ee(document,"keydown",i=>{let{hotkey:r}=e("store").attrs;r.every(a=>i[a]||i.code===a)&&t({type:"DOC.HOTKEY"})},{capture:!0})},trackDocumentVisibility({prop:e,send:t,scope:n}){let{pauseOnPageIdle:i}=e("store").attrs;if(!i)return;let r=n.getDoc();return ee(r,"visibilitychange",()=>{let s=r.visibilityState==="hidden";t({type:s?"PAUSE_ALL":"RESUME_ALL"})})}},actions:{setDismissableBranch({refs:e,context:t,computed:n,scope:i}){var c;let r=t.get("toasts"),s=n("placement"),a=r.length>0;if(!a){(c=e.get("dismissableCleanup"))==null||c();return}if(a&&e.get("dismissableCleanup"))return;let l=Wd(()=>cf(i,s),{defer:!0});e.set("dismissableCleanup",l)},clearDismissableBranch({refs:e}){var t;(t=e.get("dismissableCleanup"))==null||t()},focusRegionEl({scope:e,computed:t}){queueMicrotask(()=>{var n;(n=cf(e,t("placement")))==null||n.focus()})},pauseToasts({prop:e}){e("store").pause()},resumeToasts({prop:e}){e("store").resume()},expandToasts({prop:e}){e("store").expand()},collapseToasts({prop:e}){e("store").collapse()},removeToast({prop:e,event:t}){e("store").remove(t.id)},removeHeight({event:e,context:t}){(e==null?void 0:e.id)!=null&&queueMicrotask(()=>{t.set("heights",n=>n.filter(i=>i.id!==e.id))})},collapsedIfEmpty({send:e,computed:t}){!t("overlap")||t("count")>1||e({type:"REGION.OVERLAP"})},setLastFocusedEl({refs:e,event:t}){e.get("isFocusWithin")||!t.target||(e.set("isFocusWithin",!0),e.set("lastFocusedEl",t.target))},restoreFocusIfPointerOut({refs:e}){var t;!e.get("lastFocusedEl")||e.get("isPointerWithin")||((t=e.get("lastFocusedEl"))==null||t.focus({preventScroll:!0}),e.set("lastFocusedEl",null),e.set("isFocusWithin",!1))},setPointerWithin({refs:e}){e.set("isPointerWithin",!0)},clearPointerWithin({refs:e}){var t;e.set("isPointerWithin",!1),e.get("lastFocusedEl")&&!e.get("isFocusWithin")&&((t=e.get("lastFocusedEl"))==null||t.focus({preventScroll:!0}),e.set("lastFocusedEl",null))},clearFocusWithin({refs:e}){e.set("isFocusWithin",!1)},clearLastFocusedEl({refs:e}){var t;e.get("lastFocusedEl")&&((t=e.get("lastFocusedEl"))==null||t.focus({preventScroll:!0}),e.set("lastFocusedEl",null),e.set("isFocusWithin",!1))},ignoreMouseEventsTemporarily({refs:e}){e.get("ignoreMouseTimer").request()},clearMouseEventTimer({refs:e}){e.get("ignoreMouseTimer").cancel()}}}});({not:bV}=Ee()),EV={props({props:e}){return yn(e,["id","type","parent","removeDelay"],"toast"),y(g({closable:!0},e),{duration:Jl(e.duration,e.type)})},initialState({prop:e}){return e("type")==="loading"||e("duration")===1/0?"visible:persist":"visible"},context({prop:e,bindable:t}){return{remainingTime:t(()=>({defaultValue:Jl(e("duration"),e("type"))})),createdAt:t(()=>({defaultValue:Date.now()})),mounted:t(()=>({defaultValue:!1})),initialHeight:t(()=>({defaultValue:0}))}},refs(){return{closeTimerStartTime:Date.now(),lastCloseStartTimerStartTime:0}},computed:{zIndex:({prop:e})=>{let t=e("parent").context.get("toasts"),n=t.findIndex(i=>i.id===e("id"));return t.length-n},height:({prop:e})=>{var i;let n=e("parent").context.get("heights").find(r=>r.id===e("id"));return(i=n==null?void 0:n.height)!=null?i:0},heightIndex:({prop:e})=>e("parent").context.get("heights").findIndex(n=>n.id===e("id")),frontmost:({prop:e})=>e("index")===0,heightBefore:({prop:e})=>{let t=e("parent").context.get("heights"),n=t.findIndex(i=>i.id===e("id"));return t.reduce((i,r,s)=>s>=n?i:i+r.height,0)},shouldPersist:({prop:e})=>e("type")==="loading"||e("duration")===1/0},watch({track:e,prop:t,send:n}){e([()=>t("message")],()=>{let i=t("message");i&&n({type:i,src:"programmatic"})}),e([()=>t("type"),()=>t("duration")],()=>{n({type:"UPDATE"})})},on:{UPDATE:[{guard:"shouldPersist",target:"visible:persist",actions:["resetCloseTimer"]},{target:"visible:updating",actions:["resetCloseTimer"]}],MEASURE:{actions:["measureHeight"]}},entry:["setMounted","measureHeight","invokeOnVisible"],effects:["trackHeight"],states:{"visible:updating":{tags:["visible","updating"],effects:["waitForNextTick"],on:{SHOW:{target:"visible"}}},"visible:persist":{tags:["visible","paused"],on:{RESUME:{guard:bV("isLoadingType"),target:"visible",actions:["setCloseTimer"]},DISMISS:{target:"dismissing"}}},visible:{tags:["visible"],effects:["waitForDuration"],on:{DISMISS:{target:"dismissing"},PAUSE:{target:"visible:persist",actions:["syncRemainingTime"]}}},dismissing:{entry:["invokeOnDismiss"],effects:["waitForRemoveDelay"],on:{REMOVE:{target:"unmounted",actions:["notifyParentToRemove"]}}},unmounted:{entry:["invokeOnUnmount"]}},implementations:{effects:{waitForRemoveDelay({prop:e,send:t}){return mn(()=>{t({type:"REMOVE",src:"timer"})},e("removeDelay"))},waitForDuration({send:e,context:t,computed:n}){if(!n("shouldPersist"))return mn(()=>{e({type:"DISMISS",src:"timer"})},t.get("remainingTime"))},waitForNextTick({send:e}){return mn(()=>{e({type:"SHOW",src:"timer"})},0)},trackHeight({scope:e,prop:t}){let n;return H(()=>{let i=uf(e);if(!i)return;let r=()=>{let o=i.style.height;i.style.height="auto";let l=i.getBoundingClientRect().height;i.style.height=o;let c={id:t("id"),height:l};pf(t("parent"),c)},s=e.getWin(),a=new s.MutationObserver(r);a.observe(i,{childList:!0,subtree:!0,characterData:!0}),n=()=>a.disconnect()}),()=>n==null?void 0:n()}},guards:{isLoadingType:({prop:e})=>e("type")==="loading",shouldPersist:({computed:e})=>e("shouldPersist")},actions:{setMounted({context:e}){H(()=>{e.set("mounted",!0)})},measureHeight({scope:e,prop:t,context:n}){queueMicrotask(()=>{let i=uf(e);if(!i)return;let r=i.style.height;i.style.height="auto";let s=i.getBoundingClientRect().height;i.style.height=r,n.set("initialHeight",s);let a={id:t("id"),height:s};pf(t("parent"),a)})},setCloseTimer({refs:e}){e.set("closeTimerStartTime",Date.now())},resetCloseTimer({context:e,refs:t,prop:n}){t.set("closeTimerStartTime",Date.now()),e.set("remainingTime",Jl(n("duration"),n("type")))},syncRemainingTime({context:e,refs:t}){e.set("remainingTime",n=>{let i=t.get("closeTimerStartTime"),r=Date.now()-i;return t.set("lastCloseStartTimerStartTime",Date.now()),n-r})},notifyParentToRemove({prop:e}){e("parent").send({type:"TOAST.REMOVE",id:e("id")})},invokeOnDismiss({prop:e,event:t}){var n;(n=e("onStatusChange"))==null||n({status:"dismissing",src:t.src})},invokeOnUnmount({prop:e}){var t;(t=e("onStatusChange"))==null||t({status:"unmounted"})},invokeOnVisible({prop:e}){var t;(t=e("onStatusChange"))==null||t({status:"visible"})}}}};IV=(e,t)=>g(g({},t),Si(e));CV=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",ff={connect:gV,machine:vV},SV=new Map,Ql=new Map,TV=class extends K{constructor(t,n){super(t,n);Y(this,"parts");Y(this,"duration");Y(this,"destroy",()=>{this.machine.stop(),this.el.remove()});this.duration=n.duration,this.el.setAttribute("data-scope","toast"),this.el.setAttribute("data-part","root"),this.el.innerHTML=` + `,n.body.appendChild(i)};$T=(e,t={})=>new Intl.NumberFormat(e,t),HT=(e,t={})=>new Qg(e,t),Nl=(e,t)=>{let{prop:n,computed:i}=t;return n("formatOptions")?e===""?Number.NaN:i("parser").parse(e):parseFloat(e)},ti=(e,t)=>{let{prop:n,computed:i}=t;return Number.isNaN(e)?"":n("formatOptions")?i("formatter").format(e):e.toString()},BT=(e,t)=>{let n=e!==void 0&&!Number.isNaN(e)?e:1;return(t==null?void 0:t.style)==="percent"&&(e===void 0||Number.isNaN(e))&&(n=.01),n},{choose:_T,guards:GT,createMachine:UT}=dt(),{not:Xg,and:Zg}=GT,qT=UT({props({props:e}){let t=BT(e.step,e.formatOptions);return y(g({dir:"ltr",locale:"en-US",focusInputOnChange:!0,clampValueOnBlur:!e.allowOverflow,allowOverflow:!1,inputMode:"decimal",pattern:"-?[0-9]*(.[0-9]+)?",defaultValue:"",step:t,min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,spinOnPress:!0},e),{translations:g({incrementLabel:"increment value",decrementLabel:"decrease value"},e.translations)})},initialState(){return"idle"},context({prop:e,bindable:t,getComputed:n}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(i){var a;let r=n(),s=Nl(i,{computed:r,prop:e});(a=e("onValueChange"))==null||a({value:i,valueAsNumber:s})}})),hint:t(()=>({defaultValue:null})),scrubberCursorPoint:t(()=>({defaultValue:null,hash(i){return i?`x:${i.x}, y:${i.y}`:""}})),fieldsetDisabled:t(()=>({defaultValue:!1}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",valueAsNumber:({context:e,computed:t,prop:n})=>Nl(e.get("value"),{computed:t,prop:n}),formattedValue:({computed:e,prop:t})=>ti(e("valueAsNumber"),{computed:e,prop:t}),isAtMin:({computed:e,prop:t})=>Qc(e("valueAsNumber"),t("min")),isAtMax:({computed:e,prop:t})=>Jc(e("valueAsNumber"),t("max")),isOutOfRange:({computed:e,prop:t})=>!Pi(e("valueAsNumber"),t("min"),t("max")),isValueEmpty:({context:e})=>e.get("value")==="",isDisabled:({prop:e,context:t})=>!!e("disabled")||t.get("fieldsetDisabled"),canIncrement:({prop:e,computed:t})=>e("allowOverflow")||!t("isAtMax"),canDecrement:({prop:e,computed:t})=>e("allowOverflow")||!t("isAtMin"),valueText:({prop:e,context:t})=>{var n,i;return(i=(n=e("translations")).valueText)==null?void 0:i.call(n,t.get("value"))},formatter:Bn(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>$T(e,t)),parser:Bn(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>HT(e,t))},watch({track:e,action:t,context:n,computed:i,prop:r}){e([()=>n.get("value"),()=>r("locale"),()=>JSON.stringify(r("formatOptions"))],()=>{t(["syncInputElement"])}),e([()=>i("isOutOfRange")],()=>{t(["invokeOnInvalid"])}),e([()=>n.hash("scrubberCursorPoint")],()=>{t(["setVirtualCursorPosition"])})},effects:["trackFormControl"],on:{"VALUE.SET":{actions:["setRawValue"]},"VALUE.CLEAR":{actions:["clearValue"]},"VALUE.INCREMENT":{actions:["increment"]},"VALUE.DECREMENT":{actions:["decrement"]}},states:{idle:{on:{"TRIGGER.PRESS_DOWN":[{guard:"isTouchPointer",target:"before:spin",actions:["setHint"]},{target:"before:spin",actions:["focusInput","invokeOnFocus","setHint"]}],"SCRUBBER.PRESS_DOWN":{target:"scrubbing",actions:["focusInput","invokeOnFocus","setHint","setCursorPoint"]},"INPUT.FOCUS":{target:"focused",actions:["focusInput","invokeOnFocus"]}}},focused:{tags:["focus"],effects:["attachWheelListener"],on:{"TRIGGER.PRESS_DOWN":[{guard:"isTouchPointer",target:"before:spin",actions:["setHint"]},{target:"before:spin",actions:["focusInput","setHint"]}],"SCRUBBER.PRESS_DOWN":{target:"scrubbing",actions:["focusInput","setHint","setCursorPoint"]},"INPUT.ARROW_UP":{actions:["increment"]},"INPUT.ARROW_DOWN":{actions:["decrement"]},"INPUT.HOME":{actions:["decrementToMin"]},"INPUT.END":{actions:["incrementToMax"]},"INPUT.CHANGE":{actions:["setValue","setHint"]},"INPUT.BLUR":[{guard:Zg("clampValueOnBlur",Xg("isInRange")),target:"idle",actions:["setClampedValue","clearHint","invokeOnBlur","invokeOnValueCommit"]},{guard:Xg("isInRange"),target:"idle",actions:["setFormattedValue","clearHint","invokeOnBlur","invokeOnInvalid","invokeOnValueCommit"]},{target:"idle",actions:["setFormattedValue","clearHint","invokeOnBlur","invokeOnValueCommit"]}],"INPUT.ENTER":{actions:["setFormattedValue","clearHint","invokeOnBlur","invokeOnValueCommit"]}}},"before:spin":{tags:["focus"],effects:["trackButtonDisabled","waitForChangeDelay"],entry:_T([{guard:"isIncrementHint",actions:["increment"]},{guard:"isDecrementHint",actions:["decrement"]}]),on:{CHANGE_DELAY:{target:"spinning",guard:Zg("isInRange","spinOnPress")},"TRIGGER.PRESS_UP":[{guard:"isTouchPointer",target:"focused",actions:["clearHint"]},{target:"focused",actions:["focusInput","clearHint"]}]}},spinning:{tags:["focus"],effects:["trackButtonDisabled","spinValue"],on:{SPIN:[{guard:"isIncrementHint",actions:["increment"]},{guard:"isDecrementHint",actions:["decrement"]}],"TRIGGER.PRESS_UP":{target:"focused",actions:["focusInput","clearHint"]}}},scrubbing:{tags:["focus"],effects:["activatePointerLock","trackMousemove","setupVirtualCursor","preventTextSelection"],on:{"SCRUBBER.POINTER_UP":{target:"focused",actions:["focusInput","clearCursorPoint"]},"SCRUBBER.POINTER_MOVE":[{guard:"isIncrementHint",actions:["increment","setCursorPoint"]},{guard:"isDecrementHint",actions:["decrement","setCursorPoint"]}]}}},implementations:{guards:{clampValueOnBlur:({prop:e})=>e("clampValueOnBlur"),spinOnPress:({prop:e})=>!!e("spinOnPress"),isInRange:({computed:e})=>!e("isOutOfRange"),isDecrementHint:({context:e,event:t})=>{var n;return((n=t.hint)!=null?n:e.get("hint"))==="decrement"},isIncrementHint:({context:e,event:t})=>{var n;return((n=t.hint)!=null?n:e.get("hint"))==="increment"},isTouchPointer:({event:e})=>e.pointerType==="touch"},effects:{waitForChangeDelay({send:e}){let t=setTimeout(()=>{e({type:"CHANGE_DELAY"})},300);return()=>clearTimeout(t)},spinValue({send:e}){let t=setInterval(()=>{e({type:"SPIN"})},50);return()=>clearInterval(t)},trackFormControl({context:e,scope:t}){let n=ni(t);return wt(n,{onFieldsetDisabledChange(i){e.set("fieldsetDisabled",i)},onFormReset(){e.set("value",e.initial("value"))}})},setupVirtualCursor({context:e,scope:t}){let n=e.get("scrubberCursorPoint");return RT(t,n)},preventTextSelection({scope:e}){return DT(e)},trackButtonDisabled({context:e,scope:t,send:n}){let i=e.get("hint"),r=NT(t,i);return ot(r,{attributes:["disabled"],callback(){n({type:"TRIGGER.PRESS_UP",src:"attr"})}})},attachWheelListener({scope:e,send:t,prop:n}){let i=ni(e);if(!i||!e.isActiveElement(i)||!n("allowMouseWheel"))return;function r(s){s.preventDefault();let a=Math.sign(s.deltaY)*-1;a===1?t({type:"VALUE.INCREMENT"}):a===-1&&t({type:"VALUE.DECREMENT"})}return ee(i,"wheel",r,{passive:!1})},activatePointerLock({scope:e}){if(!Xe())return Mc(e.getDoc())},trackMousemove({scope:e,send:t,context:n,computed:i}){let r=e.getDoc();function s(o){let l=n.get("scrubberCursorPoint"),c=i("isRtl"),d=LT(e,{point:l,isRtl:c,event:o});d.hint&&t({type:"SCRUBBER.POINTER_MOVE",hint:d.hint,point:d.point})}function a(){t({type:"SCRUBBER.POINTER_UP"})}return At(ee(r,"mousemove",s,!1),ee(r,"mouseup",a,!1))}},actions:{focusInput({scope:e,prop:t}){if(!t("focusInputOnChange"))return;let n=ni(e);e.isActiveElement(n)||H(()=>n==null?void 0:n.focus({preventScroll:!0}))},increment({context:e,event:t,prop:n,computed:i}){var s;let r=nd(i("valueAsNumber"),(s=t.step)!=null?s:n("step"));n("allowOverflow")||(r=He(r,n("min"),n("max"))),e.set("value",ti(r,{computed:i,prop:n}))},decrement({context:e,event:t,prop:n,computed:i}){var s;let r=id(i("valueAsNumber"),(s=t.step)!=null?s:n("step"));n("allowOverflow")||(r=He(r,n("min"),n("max"))),e.set("value",ti(r,{computed:i,prop:n}))},setClampedValue({context:e,prop:t,computed:n}){let i=He(n("valueAsNumber"),t("min"),t("max"));e.set("value",ti(i,{computed:n,prop:t}))},setRawValue({context:e,event:t,prop:n,computed:i}){let r=Nl(t.value,{computed:i,prop:n});n("allowOverflow")||(r=He(r,n("min"),n("max"))),e.set("value",ti(r,{computed:i,prop:n}))},setValue({context:e,event:t}){var i,r;let n=(r=(i=t.target)==null?void 0:i.value)!=null?r:t.value;e.set("value",n)},clearValue({context:e}){e.set("value","")},incrementToMax({context:e,prop:t,computed:n}){let i=ti(t("max"),{computed:n,prop:t});e.set("value",i)},decrementToMin({context:e,prop:t,computed:n}){let i=ti(t("min"),{computed:n,prop:t});e.set("value",i)},setHint({context:e,event:t}){e.set("hint",t.hint)},clearHint({context:e}){e.set("hint",null)},invokeOnFocus({computed:e,prop:t}){var n;(n=t("onFocusChange"))==null||n({focused:!0,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnBlur({computed:e,prop:t}){var n;(n=t("onFocusChange"))==null||n({focused:!1,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnInvalid({computed:e,prop:t,event:n}){var r;if(n.type==="INPUT.CHANGE")return;let i=e("valueAsNumber")>t("max")?"rangeOverflow":"rangeUnderflow";(r=t("onValueInvalid"))==null||r({reason:i,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnValueCommit({computed:e,prop:t}){var n;(n=t("onValueCommit"))==null||n({value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},syncInputElement({context:e,event:t,computed:n,scope:i}){var o;let r=t.type.endsWith("CHANGE")?e.get("value"):n("formattedValue"),s=ni(i),a=(o=t.selection)!=null?o:Dl(s,i);H(()=>{Me(s,r),OT(s,a,i)})},setFormattedValue({context:e,computed:t,action:n}){e.set("value",t("formattedValue")),n(["syncInputElement"])},setCursorPoint({context:e,event:t}){e.set("scrubberCursorPoint",t.point)},clearCursorPoint({context:e}){e.set("scrubberCursorPoint",null)},setVirtualCursorPosition({context:e,scope:t}){let n=ip(t),i=e.get("scrubberCursorPoint");!n||!i||(n.style.transform=`translate3d(${i.x}px, ${i.y}px, 0px)`)}}}}),WT=_()(["allowMouseWheel","allowOverflow","clampValueOnBlur","dir","disabled","focusInputOnChange","form","formatOptions","getRootNode","id","ids","inputMode","invalid","locale","max","min","name","onFocusChange","onValueChange","onValueCommit","onValueInvalid","pattern","required","readOnly","spinOnPress","step","translations","value","defaultValue"]),vA=B(WT),KT=class extends K{initMachine(e){return new W(qT,e)}initApi(){return FT(this.machine.service,q)}render(){var l;let e=(l=this.el.querySelector('[data-scope="number-input"][data-part="root"]'))!=null?l:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="number-input"][data-part="label"]');t&&this.spreadProps(t,this.api.getLabelProps());let n=this.el.querySelector('[data-scope="number-input"][data-part="control"]');n&&this.spreadProps(n,this.api.getControlProps());let i=this.el.querySelector('[data-scope="number-input"][data-part="value-text"]');i&&this.spreadProps(i,this.api.getValueTextProps());let r=this.el.querySelector('[data-scope="number-input"][data-part="input"]');r&&this.spreadProps(r,this.api.getInputProps());let s=this.el.querySelector('[data-scope="number-input"][data-part="decrement-trigger"]');s&&this.spreadProps(s,this.api.getDecrementTriggerProps());let a=this.el.querySelector('[data-scope="number-input"][data-part="increment-trigger"]');a&&this.spreadProps(a,this.api.getIncrementTriggerProps());let o=this.el.querySelector('[data-scope="number-input"][data-part="scrubber"]');o&&(this.spreadProps(o,this.api.getScrubberProps()),o.setAttribute("aria-label","Scrub to adjust value"),o.removeAttribute("role"))}},zT={mounted(){let e=this.el,t=w(e,"value"),n=w(e,"defaultValue"),i=C(e,"controlled"),r=new KT(e,y(g({id:e.id},i&&t!==void 0?{value:t}:{defaultValue:n}),{min:z(e,"min"),max:z(e,"max"),step:z(e,"step"),disabled:C(e,"disabled"),readOnly:C(e,"readOnly"),invalid:C(e,"invalid"),required:C(e,"required"),allowMouseWheel:C(e,"allowMouseWheel"),name:w(e,"name"),form:w(e,"form"),onValueChange:s=>{let a=e.querySelector('[data-scope="number-input"][data-part="input"]');a&&(a.value=s.value,a.dispatchEvent(new Event("input",{bubbles:!0})),a.dispatchEvent(new Event("change",{bubbles:!0})));let o=w(e,"onValueChange");o&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(o,{value:s.value,valueAsNumber:s.valueAsNumber,id:e.id});let l=w(e,"onValueChangeClient");l&&e.dispatchEvent(new CustomEvent(l,{bubbles:!0,detail:{value:s,id:e.id}}))}}));r.init(),this.numberInput=r,this.handlers=[]},updated(){var n;let e=w(this.el,"value"),t=C(this.el,"controlled");(n=this.numberInput)==null||n.updateProps(y(g({id:this.el.id},t&&e!==void 0?{value:e}:{}),{min:z(this.el,"min"),max:z(this.el,"max"),step:z(this.el,"step"),disabled:C(this.el,"disabled"),readOnly:C(this.el,"readOnly"),invalid:C(this.el,"invalid"),required:C(this.el,"required"),name:w(this.el,"name"),form:w(this.el,"form")}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.numberInput)==null||e.destroy()}}});var ap={};he(ap,{PasswordInput:()=>eO});function jT(e,t){let{scope:n,prop:i,context:r}=e,s=r.get("visible"),a=!!i("disabled"),o=!!i("invalid"),l=!!i("readOnly"),c=!!i("required"),d=!(l||a),h=i("translations");return{visible:s,disabled:a,invalid:o,focus(){var m;(m=Ll(n))==null||m.focus()},setVisible(m){e.send({type:"VISIBILITY.SET",value:m})},toggleVisible(){e.send({type:"VISIBILITY.SET",value:!s})},getRootProps(){return t.element(y(g({},qi.root.attrs),{dir:i("dir"),"data-disabled":E(a),"data-invalid":E(o),"data-readonly":E(l)}))},getLabelProps(){return t.label(y(g({},qi.label.attrs),{htmlFor:ba(n),"data-disabled":E(a),"data-invalid":E(o),"data-readonly":E(l),"data-required":E(c)}))},getInputProps(){return t.input(g(y(g({},qi.input.attrs),{id:ba(n),autoCapitalize:"off",name:i("name"),required:i("required"),autoComplete:i("autoComplete"),spellCheck:!1,readOnly:l,disabled:a,type:s?"text":"password","data-state":s?"visible":"hidden","aria-invalid":X(o),"data-disabled":E(a),"data-invalid":E(o),"data-readonly":E(l)}),i("ignorePasswordManagers")?XT:{}))},getVisibilityTriggerProps(){var m;return t.button(y(g({},qi.visibilityTrigger.attrs),{type:"button",tabIndex:-1,"aria-controls":ba(n),"aria-expanded":s,"data-readonly":E(l),disabled:a,"data-disabled":E(a),"data-state":s?"visible":"hidden","aria-label":(m=h==null?void 0:h.visibilityTrigger)==null?void 0:m.call(h,s),onPointerDown(u){pe(u)&&d&&(u.preventDefault(),e.send({type:"TRIGGER.CLICK"}))}}))},getIndicatorProps(){return t.element(y(g({},qi.indicator.attrs),{"aria-hidden":!0,"data-state":s?"visible":"hidden","data-disabled":E(a),"data-invalid":E(o),"data-readonly":E(l)}))},getControlProps(){return t.element(y(g({},qi.control.attrs),{"data-disabled":E(a),"data-invalid":E(o),"data-readonly":E(l)}))}}}var YT,qi,ba,Ll,XT,ZT,JT,SA,QT,eO,op=re(()=>{"use strict";se();YT=U("password-input").parts("root","input","label","control","indicator","visibilityTrigger"),qi=YT.build(),ba=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.input)!=null?n:`p-input-${e.id}-input`},Ll=e=>e.getById(ba(e));XT={"data-1p-ignore":"","data-lpignore":"true","data-bwignore":"true","data-form-type":"other","data-protonpass-ignore":"true"},ZT={props({props:e}){return y(g({id:dr(),defaultVisible:!1,autoComplete:"current-password",ignorePasswordManagers:!1},e),{translations:g({visibilityTrigger(t){return t?"Hide password":"Show password"}},e.translations)})},context({prop:e,bindable:t}){return{visible:t(()=>({value:e("visible"),defaultValue:e("defaultVisible"),onChange(n){var i;(i=e("onVisibilityChange"))==null||i({visible:n})}}))}},initialState(){return"idle"},effects:["trackFormEvents"],states:{idle:{on:{"VISIBILITY.SET":{actions:["setVisibility"]},"TRIGGER.CLICK":{actions:["toggleVisibility","focusInputEl"]}}}},implementations:{actions:{setVisibility({context:e,event:t}){e.set("visible",t.value)},toggleVisibility({context:e}){e.set("visible",t=>!t)},focusInputEl({scope:e}){let t=Ll(e);t==null||t.focus()}},effects:{trackFormEvents({scope:e,send:t}){let n=Ll(e),i=n==null?void 0:n.form;if(!i)return;let r=e.getWin(),s=new r.AbortController;return i.addEventListener("reset",a=>{a.defaultPrevented||t({type:"VISIBILITY.SET",value:!1})},{signal:s.signal}),i.addEventListener("submit",()=>{t({type:"VISIBILITY.SET",value:!1})},{signal:s.signal}),()=>s.abort()}}}},JT=_()(["defaultVisible","dir","id","onVisibilityChange","visible","ids","getRootNode","disabled","invalid","required","readOnly","translations","ignorePasswordManagers","autoComplete","name"]),SA=B(JT),QT=class extends K{initMachine(e){return new W(ZT,e)}initApi(){return jT(this.machine.service,q)}render(){var a;let e=(a=this.el.querySelector('[data-scope="password-input"][data-part="root"]'))!=null?a:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="password-input"][data-part="label"]');t&&this.spreadProps(t,this.api.getLabelProps());let n=this.el.querySelector('[data-scope="password-input"][data-part="control"]');n&&this.spreadProps(n,this.api.getControlProps());let i=this.el.querySelector('[data-scope="password-input"][data-part="input"]');i&&this.spreadProps(i,this.api.getInputProps());let r=this.el.querySelector('[data-scope="password-input"][data-part="visibility-trigger"]');r&&this.spreadProps(r,this.api.getVisibilityTriggerProps());let s=this.el.querySelector('[data-scope="password-input"][data-part="indicator"]');s&&this.spreadProps(s,this.api.getIndicatorProps())}},eO={mounted(){let e=this.el,t=new QT(e,y(g({id:e.id},C(e,"controlledVisible")?{visible:C(e,"visible")}:{defaultVisible:C(e,"defaultVisible")}),{disabled:C(e,"disabled"),invalid:C(e,"invalid"),readOnly:C(e,"readOnly"),required:C(e,"required"),ignorePasswordManagers:C(e,"ignorePasswordManagers"),name:w(e,"name"),dir:Oe(e),autoComplete:w(e,"autoComplete",["current-password","new-password"]),onVisibilityChange:n=>{let i=w(e,"onVisibilityChange");i&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(i,{visible:n.visible,id:e.id});let r=w(e,"onVisibilityChangeClient");r&&e.dispatchEvent(new CustomEvent(r,{bubbles:!0,detail:{value:n,id:e.id}}))}}));t.init(),this.passwordInput=t,this.handlers=[]},updated(){var e;(e=this.passwordInput)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlledVisible")?{visible:C(this.el,"visible")}:{}),{disabled:C(this.el,"disabled"),invalid:C(this.el,"invalid"),readOnly:C(this.el,"readOnly"),required:C(this.el,"required"),name:w(this.el,"name"),form:w(this.el,"form"),dir:Oe(this.el)}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.passwordInput)==null||e.destroy()}}});var up={};he(up,{PinInput:()=>fO});function lO(e,t){var n;return e?!!((n=oO[e])!=null&&n.test(t)):!0}function cp(e,t,n){return n?new RegExp(n,"g").test(e):lO(t,e)}function cO(e,t){let{send:n,context:i,computed:r,prop:s,scope:a}=e,o=r("isValueComplete"),l=!!s("disabled"),c=!!s("readOnly"),d=!!s("invalid"),h=!!s("required"),m=s("translations"),u=i.get("focusedIndex");function p(){var v;(v=aO(a))==null||v.focus()}return{focus:p,count:i.get("count"),items:Array.from({length:i.get("count")}).map((v,I)=>I),value:i.get("value"),valueAsString:r("valueAsString"),complete:o,setValue(v){Array.isArray(v)||vs("[pin-input/setValue] value must be an array"),n({type:"VALUE.SET",value:v})},clearValue(){n({type:"VALUE.CLEAR"})},setValueAtIndex(v,I){n({type:"VALUE.SET",value:I,index:v})},getRootProps(){return t.element(y(g({dir:s("dir")},Ea.root.attrs),{id:Fr(a),"data-invalid":E(d),"data-disabled":E(l),"data-complete":E(o),"data-readonly":E(c)}))},getLabelProps(){return t.label(y(g({},Ea.label.attrs),{dir:s("dir"),htmlFor:Fl(a),id:iO(a),"data-invalid":E(d),"data-disabled":E(l),"data-complete":E(o),"data-required":E(h),"data-readonly":E(c),onClick(v){v.preventDefault(),p()}}))},getHiddenInputProps(){return t.input({"aria-hidden":!0,type:"text",tabIndex:-1,id:Fl(a),readOnly:c,disabled:l,required:h,name:s("name"),form:s("form"),style:Vt,maxLength:r("valueLength"),defaultValue:r("valueAsString")})},getControlProps(){return t.element(y(g({},Ea.control.attrs),{dir:s("dir"),id:rO(a)}))},getInputProps(v){var O;let{index:I}=v,T=s("type")==="numeric"?"tel":"text";return t.input(y(g({},Ea.input.attrs),{dir:s("dir"),disabled:l,"data-disabled":E(l),"data-complete":E(o),id:nO(a,I.toString()),"data-index":I,"data-ownedby":Fr(a),"aria-label":(O=m==null?void 0:m.inputLabel)==null?void 0:O.call(m,I,r("valueLength")),inputMode:s("otp")||s("type")==="numeric"?"numeric":"text","aria-invalid":X(d),"data-invalid":E(d),type:s("mask")?"password":T,defaultValue:i.get("value")[I]||"",readOnly:c,autoCapitalize:"none",autoComplete:s("otp")?"one-time-code":"off",placeholder:u===I?"":s("placeholder"),onPaste(b){var P;let f=(P=b.clipboardData)==null?void 0:P.getData("text/plain");if(!f)return;if(!cp(f,s("type"),s("pattern"))){n({type:"VALUE.INVALID",value:f}),b.preventDefault();return}b.preventDefault(),n({type:"INPUT.PASTE",value:f})},onBeforeInput(b){try{let f=Oc(b);cp(f,s("type"),s("pattern"))||(n({type:"VALUE.INVALID",value:f}),b.preventDefault()),f.length>1&&b.currentTarget.setSelectionRange(0,1,"forward")}catch(f){}},onChange(b){let f=Yt(b),{value:S}=b.currentTarget;if(f.inputType==="insertFromPaste"){b.currentTarget.value=S[0]||"";return}if(S.length>2){n({type:"INPUT.PASTE",value:S}),b.currentTarget.value=S[0],b.preventDefault();return}if(f.inputType==="deleteContentBackward"){n({type:"INPUT.BACKSPACE"});return}n({type:"INPUT.CHANGE",value:S,index:I})},onKeyDown(b){if(b.defaultPrevented||Re(b)||xe(b))return;let S={Backspace(){n({type:"INPUT.BACKSPACE"})},Delete(){n({type:"INPUT.DELETE"})},ArrowLeft(){n({type:"INPUT.ARROW_LEFT"})},ArrowRight(){n({type:"INPUT.ARROW_RIGHT"})},Enter(){n({type:"INPUT.ENTER"})}}[ge(b,{dir:s("dir"),orientation:"horizontal"})];S&&(S(b),b.preventDefault())},onFocus(){n({type:"INPUT.FOCUS",index:I})},onBlur(b){let f=b.relatedTarget;le(f)&&f.dataset.ownedby===Fr(a)||n({type:"INPUT.BLUR",index:I})}}))}}}function dp(e,t){let n=t;e[0]===t[0]?n=t[1]:e[0]===t[1]&&(n=t[0]);let i=n.split("");return n=i[i.length-1],n!=null?n:""}function Ia(e,t){return Array.from({length:t}).fill("").map((n,i)=>e[i]||n)}var tO,Ea,Fr,nO,Fl,iO,rO,sO,Pa,Mr,aO,lp,Ml,oO,dO,uO,hO,gO,VA,pO,fO,hp=re(()=>{"use strict";se();tO=U("pinInput").parts("root","label","input","control"),Ea=tO.build(),Fr=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`pin-input:${e.id}`},nO=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.input)==null?void 0:i.call(n,t))!=null?r:`pin-input:${e.id}:${t}`},Fl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.hiddenInput)!=null?n:`pin-input:${e.id}:hidden`},iO=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`pin-input:${e.id}:label`},rO=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`pin-input:${e.id}:control`},sO=e=>e.getById(Fr(e)),Pa=e=>{let n=`input[data-ownedby=${CSS.escape(Fr(e))}]`;return Fe(sO(e),n)},Mr=(e,t)=>Pa(e)[t],aO=e=>Pa(e)[0],lp=e=>e.getById(Fl(e)),Ml=(e,t)=>{e.value=t,e.setAttribute("value",t)},oO={numeric:/^[0-9]+$/,alphabetic:/^[A-Za-z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/i};({choose:dO,createMachine:uO}=dt()),hO=uO({props({props:e}){return y(g({placeholder:"\u25CB",otp:!1,type:"numeric",defaultValue:e.count?Ia([],e.count):[]},e),{translations:g({inputLabel:(t,n)=>`pin code ${t+1} of ${n}`},e.translations)})},initialState(){return"idle"},context({prop:e,bindable:t}){return{value:t(()=>({value:e("value"),defaultValue:e("defaultValue"),isEqual:fe,onChange(n){var i;(i=e("onValueChange"))==null||i({value:n,valueAsString:n.join("")})}})),focusedIndex:t(()=>({sync:!0,defaultValue:-1})),count:t(()=>({defaultValue:e("count")}))}},computed:{_value:({context:e})=>Ia(e.get("value"),e.get("count")),valueLength:({computed:e})=>e("_value").length,filledValueLength:({computed:e})=>e("_value").filter(t=>(t==null?void 0:t.trim())!=="").length,isValueComplete:({computed:e})=>e("valueLength")===e("filledValueLength"),valueAsString:({computed:e})=>e("_value").join(""),focusedValue:({computed:e,context:t})=>e("_value")[t.get("focusedIndex")]||""},entry:dO([{guard:"autoFocus",actions:["setInputCount","setFocusIndexToFirst"]},{actions:["setInputCount"]}]),watch({action:e,track:t,context:n,computed:i}){t([()=>n.get("focusedIndex")],()=>{e(["focusInput","selectInputIfNeeded"])}),t([()=>n.get("value").join(",")],()=>{e(["syncInputElements","dispatchInputEvent"])}),t([()=>i("isValueComplete")],()=>{e(["invokeOnComplete","blurFocusedInputIfNeeded"])})},on:{"VALUE.SET":[{guard:"hasIndex",actions:["setValueAtIndex"]},{actions:["setValue"]}],"VALUE.CLEAR":{actions:["clearValue","setFocusIndexToFirst"]}},states:{idle:{on:{"INPUT.FOCUS":{target:"focused",actions:["setFocusedIndex"]}}},focused:{on:{"INPUT.CHANGE":{actions:["setFocusedValue","syncInputValue","setNextFocusedIndex"]},"INPUT.PASTE":{actions:["setPastedValue","setLastValueFocusIndex"]},"INPUT.FOCUS":{actions:["setFocusedIndex"]},"INPUT.BLUR":{target:"idle",actions:["clearFocusedIndex"]},"INPUT.DELETE":{guard:"hasValue",actions:["clearFocusedValue"]},"INPUT.ARROW_LEFT":{actions:["setPrevFocusedIndex"]},"INPUT.ARROW_RIGHT":{actions:["setNextFocusedIndex"]},"INPUT.BACKSPACE":[{guard:"hasValue",actions:["clearFocusedValue"]},{actions:["setPrevFocusedIndex","clearFocusedValue"]}],"INPUT.ENTER":{guard:"isValueComplete",actions:["requestFormSubmit"]},"VALUE.INVALID":{actions:["invokeOnInvalid"]}}}},implementations:{guards:{autoFocus:({prop:e})=>!!e("autoFocus"),hasValue:({context:e})=>e.get("value")[e.get("focusedIndex")]!=="",isValueComplete:({computed:e})=>e("isValueComplete"),hasIndex:({event:e})=>e.index!==void 0},actions:{dispatchInputEvent({computed:e,scope:t}){let n=lp(t);Ac(n,{value:e("valueAsString")})},setInputCount({scope:e,context:t,prop:n}){if(n("count"))return;let i=Pa(e);t.set("count",i.length)},focusInput({context:e,scope:t}){var i;let n=e.get("focusedIndex");n!==-1&&((i=Mr(t,n))==null||i.focus({preventScroll:!0}))},selectInputIfNeeded({context:e,prop:t,scope:n}){let i=e.get("focusedIndex");!t("selectOnFocus")||i===-1||H(()=>{var r;(r=Mr(n,i))==null||r.select()})},invokeOnComplete({computed:e,prop:t}){var n;e("isValueComplete")&&((n=t("onValueComplete"))==null||n({value:e("_value"),valueAsString:e("valueAsString")}))},invokeOnInvalid({context:e,event:t,prop:n}){var i;(i=n("onValueInvalid"))==null||i({value:t.value,index:e.get("focusedIndex")})},clearFocusedIndex({context:e}){e.set("focusedIndex",-1)},setFocusedIndex({context:e,event:t}){e.set("focusedIndex",t.index)},setValue({context:e,event:t}){let n=Ia(t.value,e.get("count"));e.set("value",n)},setFocusedValue({context:e,event:t,computed:n,flush:i}){let r=n("focusedValue"),s=e.get("focusedIndex"),a=dp(r,t.value);i(()=>{e.set("value",ms(n("_value"),s,a))})},revertInputValue({context:e,computed:t,scope:n}){let i=Mr(n,e.get("focusedIndex"));Ml(i,t("focusedValue"))},syncInputValue({context:e,event:t,scope:n}){let i=e.get("value"),r=Mr(n,t.index);Ml(r,i[t.index])},syncInputElements({context:e,scope:t}){let n=Pa(t),i=e.get("value");n.forEach((r,s)=>{Ml(r,i[s])})},setPastedValue({context:e,event:t,computed:n,flush:i}){H(()=>{let r=n("valueAsString"),s=e.get("focusedIndex"),a=n("valueLength"),o=n("filledValueLength"),l=Math.min(s,o),c=l>0?r.substring(0,s):"",d=t.value.substring(0,a-l),h=Ia(`${c}${d}`.split(""),a);i(()=>{e.set("value",h)})})},setValueAtIndex({context:e,event:t,computed:n}){let i=dp(n("focusedValue"),t.value);e.set("value",ms(n("_value"),t.index,i))},clearValue({context:e}){let t=Array.from({length:e.get("count")}).fill("");queueMicrotask(()=>{e.set("value",t)})},clearFocusedValue({context:e,computed:t}){let n=e.get("focusedIndex");n!==-1&&e.set("value",ms(t("_value"),n,""))},setFocusIndexToFirst({context:e}){e.set("focusedIndex",0)},setNextFocusedIndex({context:e,computed:t}){e.set("focusedIndex",Math.min(e.get("focusedIndex")+1,t("valueLength")-1))},setPrevFocusedIndex({context:e}){e.set("focusedIndex",Math.max(e.get("focusedIndex")-1,0))},setLastValueFocusIndex({context:e,computed:t}){H(()=>{e.set("focusedIndex",Math.min(t("filledValueLength"),t("valueLength")-1))})},blurFocusedInputIfNeeded({context:e,prop:t,scope:n}){t("blurOnComplete")&&H(()=>{var i;(i=Mr(n,e.get("focusedIndex")))==null||i.blur()})},requestFormSubmit({computed:e,prop:t,scope:n}){var r;if(!t("name")||!e("isValueComplete"))return;let i=lp(n);(r=i==null?void 0:i.form)==null||r.requestSubmit()}}}});gO=_()(["autoFocus","blurOnComplete","count","defaultValue","dir","disabled","form","getRootNode","id","ids","invalid","mask","name","onValueChange","onValueComplete","onValueInvalid","otp","pattern","placeholder","readOnly","required","selectOnFocus","translations","type","value"]),VA=B(gO),pO=class extends K{initMachine(e){return new W(hO,e)}initApi(){return cO(this.machine.service,q)}render(){var r;let e=(r=this.el.querySelector('[data-scope="pin-input"][data-part="root"]'))!=null?r:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="pin-input"][data-part="label"]');t&&this.spreadProps(t,this.api.getLabelProps());let n=this.el.querySelector('[data-scope="pin-input"][data-part="hidden-input"]');n&&this.spreadProps(n,this.api.getHiddenInputProps());let i=this.el.querySelector('[data-scope="pin-input"][data-part="control"]');i&&this.spreadProps(i,this.api.getControlProps()),this.api.items.forEach(s=>{let a=this.el.querySelector(`[data-scope="pin-input"][data-part="input"][data-index="${s}"]`);a&&this.spreadProps(a,this.api.getInputProps({index:s}))})}},fO={mounted(){var s;let e=this.el,t=Z(e,"value"),n=Z(e,"defaultValue"),i=C(e,"controlled"),r=new pO(e,y(g({id:e.id,count:(s=z(e,"count"))!=null?s:4},i&&t?{value:t}:{defaultValue:n!=null?n:[]}),{disabled:C(e,"disabled"),invalid:C(e,"invalid"),required:C(e,"required"),readOnly:C(e,"readOnly"),mask:C(e,"mask"),otp:C(e,"otp"),blurOnComplete:C(e,"blurOnComplete"),selectOnFocus:C(e,"selectOnFocus"),name:w(e,"name"),form:w(e,"form"),dir:w(e,"dir",["ltr","rtl"]),type:w(e,"type",["alphanumeric","numeric","alphabetic"]),placeholder:w(e,"placeholder"),onValueChange:a=>{let o=e.querySelector('[data-scope="pin-input"][data-part="hidden-input"]');o&&(o.value=a.valueAsString,o.dispatchEvent(new Event("input",{bubbles:!0})),o.dispatchEvent(new Event("change",{bubbles:!0})));let l=w(e,"onValueChange");l&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(l,{value:a.value,valueAsString:a.valueAsString,id:e.id});let c=w(e,"onValueChangeClient");c&&e.dispatchEvent(new CustomEvent(c,{bubbles:!0,detail:{value:a,id:e.id}}))},onValueComplete:a=>{let o=w(e,"onValueComplete");o&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(o,{value:a.value,valueAsString:a.valueAsString,id:e.id})}}));r.init(),this.pinInput=r,this.handlers=[]},updated(){var n,i,r,s;let e=Z(this.el,"value"),t=C(this.el,"controlled");(s=this.pinInput)==null||s.updateProps(y(g({id:this.el.id,count:(r=(i=z(this.el,"count"))!=null?i:(n=this.pinInput)==null?void 0:n.api.count)!=null?r:4},t&&e?{value:e}:{}),{disabled:C(this.el,"disabled"),invalid:C(this.el,"invalid"),required:C(this.el,"required"),readOnly:C(this.el,"readOnly"),name:w(this.el,"name"),form:w(this.el,"form")}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.pinInput)==null||e.destroy()}}});var vp={};he(vp,{RadioGroup:()=>kO});function TO(e,t){let{context:n,send:i,computed:r,prop:s,scope:a}=e,o=r("isDisabled"),l=s("invalid"),c=s("readOnly");function d(u){return{value:u.value,invalid:!!u.invalid||!!l,disabled:!!u.disabled||o,checked:n.get("value")===u.value,focused:n.get("focusedValue")===u.value,focusVisible:n.get("focusVisibleValue")===u.value,hovered:n.get("hoveredValue")===u.value,active:n.get("activeValue")===u.value}}function h(u){let p=d(u);return{"data-focus":E(p.focused),"data-focus-visible":E(p.focusVisible),"data-disabled":E(p.disabled),"data-readonly":E(c),"data-state":p.checked?"checked":"unchecked","data-hover":E(p.hovered),"data-invalid":E(p.invalid),"data-orientation":s("orientation"),"data-ssr":E(n.get("ssr"))}}let m=()=>{var p;let u=(p=PO(a))!=null?p:IO(a);u==null||u.focus()};return{focus:m,value:n.get("value"),setValue(u){i({type:"SET_VALUE",value:u,isTrusted:!1})},clearValue(){i({type:"SET_VALUE",value:null,isTrusted:!1})},getRootProps(){return t.element(y(g({},Wi.root.attrs),{role:"radiogroup",id:Ca(a),"aria-labelledby":gp(a),"aria-required":s("required")||void 0,"aria-disabled":o||void 0,"aria-readonly":c||void 0,"data-orientation":s("orientation"),"data-disabled":E(o),"data-invalid":E(l),"data-required":E(s("required")),"aria-orientation":s("orientation"),dir:s("dir"),style:{position:"relative"}}))},getLabelProps(){return t.element(y(g({},Wi.label.attrs),{dir:s("dir"),"data-orientation":s("orientation"),"data-disabled":E(o),"data-invalid":E(l),"data-required":E(s("required")),id:gp(a),onClick:m}))},getItemState:d,getItemProps(u){let p=d(u);return t.label(y(g(y(g({},Wi.item.attrs),{dir:s("dir"),id:fp(a,u.value),htmlFor:$l(a,u.value)}),h(u)),{onPointerMove(){p.disabled||p.hovered||i({type:"SET_HOVERED",value:u.value,hovered:!0})},onPointerLeave(){p.disabled||i({type:"SET_HOVERED",value:null})},onPointerDown(v){p.disabled||pe(v)&&(p.focused&&v.pointerType==="mouse"&&v.preventDefault(),i({type:"SET_ACTIVE",value:u.value,active:!0}))},onPointerUp(){p.disabled||i({type:"SET_ACTIVE",value:null})},onClick(){var v;!p.disabled&&Xe()&&((v=bO(a,u.value))==null||v.focus())}}))},getItemTextProps(u){return t.element(g(y(g({},Wi.itemText.attrs),{dir:s("dir"),id:yO(a,u.value)}),h(u)))},getItemControlProps(u){let p=d(u);return t.element(g(y(g({},Wi.itemControl.attrs),{dir:s("dir"),id:vO(a,u.value),"data-active":E(p.active),"aria-hidden":!0}),h(u)))},getItemHiddenInputProps(u){let p=d(u);return t.input({"data-ownedby":Ca(a),id:$l(a,u.value),type:"radio",name:s("name")||s("id"),form:s("form"),value:u.value,required:s("required"),"aria-invalid":p.invalid||void 0,onClick(v){if(c){v.preventDefault();return}v.currentTarget.checked&&i({type:"SET_VALUE",value:u.value,isTrusted:!0})},onBlur(){i({type:"SET_FOCUSED",value:null,focused:!1,focusVisible:!1})},onFocus(){let v=En();i({type:"SET_FOCUSED",value:u.value,focused:!0,focusVisible:v})},onKeyDown(v){v.defaultPrevented||v.key===" "&&i({type:"SET_ACTIVE",value:u.value,active:!0})},onKeyUp(v){v.defaultPrevented||v.key===" "&&i({type:"SET_ACTIVE",value:null})},disabled:p.disabled||c,defaultChecked:p.checked,style:Vt})},getIndicatorProps(){let u=n.get("indicatorRect"),p=u==null||u.width===0&&u.height===0&&u.x===0&&u.y===0;return t.element(y(g({id:mp(a)},Wi.indicator.attrs),{dir:s("dir"),hidden:n.get("value")==null||p,"data-disabled":E(o),"data-orientation":s("orientation"),style:{"--transition-property":"left, top, width, height","--left":ye(u==null?void 0:u.x),"--top":ye(u==null?void 0:u.y),"--width":ye(u==null?void 0:u.width),"--height":ye(u==null?void 0:u.height),position:"absolute",willChange:"var(--transition-property)",transitionProperty:"var(--transition-property)",transitionDuration:"var(--transition-duration, 150ms)",transitionTimingFunction:"var(--transition-timing-function)",[s("orientation")==="horizontal"?"left":"top"]:s("orientation")==="horizontal"?"var(--left)":"var(--top)"}}))}}}var mO,Wi,Ca,gp,fp,$l,vO,yO,mp,Sa,bO,EO,IO,PO,pp,CO,SO,OO,wO,VO,RA,xO,DA,AO,kO,yp=re(()=>{"use strict";pr();se();mO=U("radio-group").parts("root","label","item","itemText","itemControl","indicator"),Wi=mO.build(),Ca=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`radio-group:${e.id}`},gp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`radio-group:${e.id}:label`},fp=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`radio-group:${e.id}:radio:${t}`},$l=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemHiddenInput)==null?void 0:i.call(n,t))!=null?r:`radio-group:${e.id}:radio:input:${t}`},vO=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemControl)==null?void 0:i.call(n,t))!=null?r:`radio-group:${e.id}:radio:control:${t}`},yO=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemLabel)==null?void 0:i.call(n,t))!=null?r:`radio-group:${e.id}:radio:label:${t}`},mp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicator)!=null?n:`radio-group:${e.id}:indicator`},Sa=e=>e.getById(Ca(e)),bO=(e,t)=>e.getById($l(e,t)),EO=e=>e.getById(mp(e)),IO=e=>{var t;return(t=Sa(e))==null?void 0:t.querySelector("input:not(:disabled)")},PO=e=>{var t;return(t=Sa(e))==null?void 0:t.querySelector("input:not(:disabled):checked")},pp=e=>{let n=`input[type=radio][data-ownedby='${CSS.escape(Ca(e))}']:not([disabled])`;return Fe(Sa(e),n)},CO=(e,t)=>{if(t)return e.getById(fp(e,t))},SO=e=>{var t,n,i,r;return{x:(t=e==null?void 0:e.offsetLeft)!=null?t:0,y:(n=e==null?void 0:e.offsetTop)!=null?n:0,width:(i=e==null?void 0:e.offsetWidth)!=null?i:0,height:(r=e==null?void 0:e.offsetHeight)!=null?r:0}};({not:OO}=Ee()),wO={props({props:e}){return g({orientation:"vertical"},e)},initialState(){return"idle"},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var i;(i=e("onValueChange"))==null||i({value:n})}})),activeValue:t(()=>({defaultValue:null})),focusedValue:t(()=>({defaultValue:null})),focusVisibleValue:t(()=>({defaultValue:null})),hoveredValue:t(()=>({defaultValue:null})),indicatorRect:t(()=>({defaultValue:null})),fieldsetDisabled:t(()=>({defaultValue:!1})),ssr:t(()=>({defaultValue:!0}))}},refs(){return{indicatorCleanup:null,focusVisibleValue:null}},computed:{isDisabled:({prop:e,context:t})=>!!e("disabled")||t.get("fieldsetDisabled")},entry:["syncIndicatorRect","syncSsr"],exit:["cleanupObserver"],effects:["trackFormControlState","trackFocusVisible"],watch({track:e,action:t,context:n}){e([()=>n.get("value")],()=>{t(["syncIndicatorRect","syncInputElements"])})},on:{SET_VALUE:[{guard:OO("isTrusted"),actions:["setValue","dispatchChangeEvent"]},{actions:["setValue"]}],SET_HOVERED:{actions:["setHovered"]},SET_ACTIVE:{actions:["setActive"]},SET_FOCUSED:{actions:["setFocused"]}},states:{idle:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackFormControlState({context:e,scope:t}){return wt(Sa(t),{onFieldsetDisabledChange(n){e.set("fieldsetDisabled",n)},onFormReset(){e.set("value",e.initial("value"))}})},trackFocusVisible({scope:e}){var t;return Pn({root:(t=e.getRootNode)==null?void 0:t.call(e)})}},actions:{setValue({context:e,event:t}){e.set("value",t.value)},setHovered({context:e,event:t}){e.set("hoveredValue",t.value)},setActive({context:e,event:t}){e.set("activeValue",t.value)},setFocused({context:e,event:t}){e.set("focusedValue",t.value);let n=t.value!=null&&t.focusVisible?t.value:null;e.set("focusVisibleValue",n)},syncInputElements({context:e,scope:t}){pp(t).forEach(i=>{i.checked=i.value===e.get("value")})},cleanupObserver({refs:e}){var t;(t=e.get("indicatorCleanup"))==null||t()},syncSsr({context:e}){e.set("ssr",!1)},syncIndicatorRect({context:e,scope:t,refs:n}){var o;if((o=n.get("indicatorCleanup"))==null||o(),!EO(t))return;let i=e.get("value"),r=CO(t,i);if(i==null||!r){e.set("indicatorRect",null);return}let s=()=>{e.set("indicatorRect",SO(r))};s();let a=gn.observe(r,s);n.set("indicatorCleanup",a)},dispatchChangeEvent({context:e,scope:t}){pp(t).forEach(i=>{let r=i.value===e.get("value");r!==i.checked&&pi(i,{checked:r})})}}}},VO=_()(["dir","disabled","form","getRootNode","id","ids","invalid","name","onValueChange","orientation","readOnly","required","value","defaultValue"]),RA=B(VO),xO=_()(["value","disabled","invalid"]),DA=B(xO),AO=class extends K{initMachine(e){return new W(wO,e)}initApi(){return TO(this.machine.service,q)}render(){var i;let e=(i=this.el.querySelector('[data-scope="radio-group"][data-part="root"]'))!=null?i:this.el;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="radio-group"][data-part="label"]');t&&this.spreadProps(t,this.api.getLabelProps());let n=this.el.querySelector('[data-scope="radio-group"][data-part="indicator"]');n&&this.spreadProps(n,this.api.getIndicatorProps()),this.el.querySelectorAll('[data-scope="radio-group"][data-part="item"]').forEach(r=>{let s=r.dataset.value;if(s==null)return;let a=r.dataset.disabled==="true",o=r.dataset.invalid==="true";this.spreadProps(r,this.api.getItemProps({value:s,disabled:a,invalid:o}));let l=r.querySelector('[data-scope="radio-group"][data-part="item-text"]');l&&this.spreadProps(l,this.api.getItemTextProps({value:s,disabled:a,invalid:o}));let c=r.querySelector('[data-scope="radio-group"][data-part="item-control"]');c&&this.spreadProps(c,this.api.getItemControlProps({value:s,disabled:a,invalid:o}));let d=r.querySelector('[data-scope="radio-group"][data-part="item-hidden-input"]');d&&this.spreadProps(d,this.api.getItemHiddenInputProps({value:s,disabled:a,invalid:o}))})}},kO={mounted(){let e=this.el,t=w(e,"value"),n=w(e,"defaultValue"),i=C(e,"controlled"),r=new AO(e,y(g({id:e.id},i&&t!==void 0?{value:t!=null?t:null}:{defaultValue:n!=null?n:null}),{name:w(e,"name"),form:w(e,"form"),disabled:C(e,"disabled"),invalid:C(e,"invalid"),required:C(e,"required"),readOnly:C(e,"readOnly"),dir:w(e,"dir",["ltr","rtl"]),orientation:w(e,"orientation",["horizontal","vertical"]),onValueChange:s=>{let a=w(e,"onValueChange");a&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(a,{value:s.value,id:e.id});let o=w(e,"onValueChangeClient");o&&e.dispatchEvent(new CustomEvent(o,{bubbles:!0,detail:{value:s,id:e.id}}))}}));r.init(),this.radioGroup=r,this.handlers=[]},updated(){var n;let e=w(this.el,"value"),t=C(this.el,"controlled");(n=this.radioGroup)==null||n.updateProps(y(g({id:this.el.id},t&&e!==void 0?{value:e!=null?e:null}:{}),{name:w(this.el,"name"),form:w(this.el,"form"),disabled:C(this.el,"disabled"),invalid:C(this.el,"invalid"),required:C(this.el,"required"),readOnly:C(this.el,"readOnly"),orientation:w(this.el,"orientation",["horizontal","vertical"])}))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.radioGroup)==null||e.destroy()}}});var Tp={};he(Tp,{Select:()=>zO});function FO(e,t){let{context:n,prop:i,scope:r,state:s,computed:a,send:o}=e,l=i("disabled")||n.get("fieldsetDisabled"),c=!!i("invalid"),d=!!i("required"),h=!!i("readOnly"),m=i("composite"),u=i("collection"),p=s.hasTag("open"),v=s.matches("focused"),I=n.get("highlightedValue"),T=n.get("highlightedItem"),O=n.get("selectedItems"),b=n.get("currentPlacement"),f=a("isTypingAhead"),S=a("isInteractive"),P=I?Ul(r,I):void 0;function V(x){let k=u.getItemDisabled(x.item),N=u.getItemValue(x.item);return vn(N,()=>`[zag-js] No value found for item ${JSON.stringify(x.item)}`),{value:N,disabled:!!(l||k),highlighted:I===N,selected:n.get("value").includes(N)}}let A=On(y(g({},i("positioning")),{placement:b}));return{open:p,focused:v,empty:n.get("value").length===0,highlightedItem:T,highlightedValue:I,selectedItems:O,hasSelectedItems:a("hasSelectedItems"),value:n.get("value"),valueAsString:a("valueAsString"),collection:u,multiple:!!i("multiple"),disabled:!!l,reposition(x={}){o({type:"POSITIONING.SET",options:x})},focus(){var x;(x=ri(r))==null||x.focus({preventScroll:!0})},setOpen(x){s.hasTag("open")!==x&&o({type:x?"OPEN":"CLOSE"})},selectValue(x){o({type:"ITEM.SELECT",value:x})},setValue(x){o({type:"VALUE.SET",value:x})},selectAll(){o({type:"VALUE.SET",value:u.getValues()})},setHighlightValue(x){o({type:"HIGHLIGHTED_VALUE.SET",value:x})},clearHighlightValue(){o({type:"HIGHLIGHTED_VALUE.CLEAR"})},clearValue(x){o(x?{type:"ITEM.CLEAR",value:x}:{type:"VALUE.CLEAR"})},getItemState:V,getRootProps(){return t.element(y(g({},_e.root.attrs),{dir:i("dir"),id:RO(r),"data-invalid":E(c),"data-readonly":E(h)}))},getLabelProps(){return t.label(y(g({dir:i("dir"),id:Ta(r)},_e.label.attrs),{"data-disabled":E(l),"data-invalid":E(c),"data-readonly":E(h),"data-required":E(d),htmlFor:ql(r),onClick(x){var k;x.defaultPrevented||l||(k=ri(r))==null||k.focus({preventScroll:!0})}}))},getControlProps(){return t.element(y(g({},_e.control.attrs),{dir:i("dir"),id:DO(r),"data-state":p?"open":"closed","data-focus":E(v),"data-disabled":E(l),"data-invalid":E(c)}))},getValueTextProps(){return t.element(y(g({},_e.valueText.attrs),{dir:i("dir"),"data-disabled":E(l),"data-invalid":E(c),"data-focus":E(v)}))},getTriggerProps(){return t.button(y(g({id:Gl(r),disabled:l,dir:i("dir"),type:"button",role:"combobox","aria-controls":_l(r),"aria-expanded":p,"aria-haspopup":"listbox","data-state":p?"open":"closed","aria-invalid":c,"aria-required":d,"aria-labelledby":Ta(r)},_e.trigger.attrs),{"data-disabled":E(l),"data-invalid":E(c),"data-readonly":E(h),"data-placement":b,"data-placeholder-shown":E(!a("hasSelectedItems")),onClick(x){S&&(x.defaultPrevented||o({type:"TRIGGER.CLICK"}))},onFocus(){o({type:"TRIGGER.FOCUS"})},onBlur(){o({type:"TRIGGER.BLUR"})},onKeyDown(x){if(x.defaultPrevented||!S)return;let N={ArrowUp(){o({type:"TRIGGER.ARROW_UP"})},ArrowDown(D){o({type:D.altKey?"OPEN":"TRIGGER.ARROW_DOWN"})},ArrowLeft(){o({type:"TRIGGER.ARROW_LEFT"})},ArrowRight(){o({type:"TRIGGER.ARROW_RIGHT"})},Home(){o({type:"TRIGGER.HOME"})},End(){o({type:"TRIGGER.END"})},Enter(){o({type:"TRIGGER.ENTER"})},Space(D){o(f?{type:"TRIGGER.TYPEAHEAD",key:D.key}:{type:"TRIGGER.ENTER"})}}[ge(x,{dir:i("dir"),orientation:"vertical"})];if(N){N(x),x.preventDefault();return}Ue.isValidEvent(x)&&(o({type:"TRIGGER.TYPEAHEAD",key:x.key}),x.preventDefault())}}))},getIndicatorProps(){return t.element(y(g({},_e.indicator.attrs),{dir:i("dir"),"aria-hidden":!0,"data-state":p?"open":"closed","data-disabled":E(l),"data-invalid":E(c),"data-readonly":E(h)}))},getItemProps(x){let k=V(x);return t.element(y(g({id:Ul(r,k.value),role:"option"},_e.item.attrs),{dir:i("dir"),"data-value":k.value,"aria-selected":k.selected,"data-state":k.selected?"checked":"unchecked","data-highlighted":E(k.highlighted),"data-disabled":E(k.disabled),"aria-disabled":X(k.disabled),onPointerMove(N){k.disabled||N.pointerType!=="mouse"||k.value!==I&&o({type:"ITEM.POINTER_MOVE",value:k.value})},onClick(N){N.defaultPrevented||k.disabled||o({type:"ITEM.CLICK",src:"pointerup",value:k.value})},onPointerLeave(N){var $;k.disabled||x.persistFocus||N.pointerType!=="mouse"||!(($=e.event.previous())!=null&&$.type.includes("POINTER"))||o({type:"ITEM.POINTER_LEAVE"})}}))},getItemTextProps(x){let k=V(x);return t.element(y(g({},_e.itemText.attrs),{"data-state":k.selected?"checked":"unchecked","data-disabled":E(k.disabled),"data-highlighted":E(k.highlighted)}))},getItemIndicatorProps(x){let k=V(x);return t.element(y(g({"aria-hidden":!0},_e.itemIndicator.attrs),{"data-state":k.selected?"checked":"unchecked",hidden:!k.selected}))},getItemGroupLabelProps(x){let{htmlFor:k}=x;return t.element(y(g({},_e.itemGroupLabel.attrs),{id:bp(r,k),dir:i("dir"),role:"presentation"}))},getItemGroupProps(x){let{id:k}=x;return t.element(y(g({},_e.itemGroup.attrs),{"data-disabled":E(l),id:LO(r,k),"aria-labelledby":bp(r,k),role:"group",dir:i("dir")}))},getClearTriggerProps(){return t.button(y(g({},_e.clearTrigger.attrs),{id:Cp(r),type:"button","aria-label":"Clear value","data-invalid":E(c),disabled:l,hidden:!a("hasSelectedItems"),dir:i("dir"),onClick(x){x.defaultPrevented||o({type:"CLEAR.CLICK"})}}))},getHiddenSelectProps(){let x=n.get("value"),k=i("multiple")?x:x==null?void 0:x[0];return t.select({name:i("name"),form:i("form"),disabled:l,multiple:i("multiple"),required:i("required"),"aria-hidden":!0,id:ql(r),defaultValue:k,style:Vt,tabIndex:-1,onFocus(){var N;(N=ri(r))==null||N.focus({preventScroll:!0})},"aria-labelledby":Ta(r)})},getPositionerProps(){return t.element(y(g({},_e.positioner.attrs),{dir:i("dir"),id:Sp(r),style:A.floating}))},getContentProps(){return t.element(y(g({hidden:!p,dir:i("dir"),id:_l(r),role:m?"listbox":"dialog"},_e.content.attrs),{"data-state":p?"open":"closed","data-placement":b,"data-activedescendant":P,"aria-activedescendant":m?P:void 0,"aria-multiselectable":i("multiple")&&m?!0:void 0,"aria-labelledby":Ta(r),tabIndex:0,onKeyDown(x){if(!S||!ce(x.currentTarget,j(x)))return;if(x.key==="Tab"&&!us(x)){x.preventDefault();return}let k={ArrowUp(){o({type:"CONTENT.ARROW_UP"})},ArrowDown(){o({type:"CONTENT.ARROW_DOWN"})},Home(){o({type:"CONTENT.HOME"})},End(){o({type:"CONTENT.END"})},Enter(){o({type:"ITEM.CLICK",src:"keydown.enter"})},Space($){var te;f?o({type:"CONTENT.TYPEAHEAD",key:$.key}):(te=k.Enter)==null||te.call(k,$)}},N=k[ge(x)];if(N){N(x),x.preventDefault();return}let D=j(x);Ot(D)||Ue.isValidEvent(x)&&(o({type:"CONTENT.TYPEAHEAD",key:x.key}),x.preventDefault())}}))},getListProps(){return t.element(y(g({},_e.list.attrs),{tabIndex:0,role:m?void 0:"listbox","aria-labelledby":Gl(r),"aria-activedescendant":m?void 0:P,"aria-multiselectable":!m&&i("multiple")?!0:void 0}))}}}function Ip(e){var n,i;let t=(i=e.restoreFocus)!=null?i:(n=e.previousEvent)==null?void 0:n.restoreFocus;return t==null||!!t}function Pp(e,t){return Ki(t?{items:e,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled,groupBy:n=>{var i;return(i=n.group)!=null?i:""}}:{items:e,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled})}function WO(e){return e.replace(/_([a-z])/g,(t,n)=>n.toUpperCase())}function KO(e){let t={};for(let[n,i]of Object.entries(e)){let r=WO(n);t[r]=i}return t}var NO,_e,Ki,RO,_l,Gl,Cp,Ta,DO,Ul,ql,Sp,LO,bp,Hl,$r,ri,MO,Ep,Bl,Hr,ii,$O,HO,BO,GA,_O,UA,GO,qA,UO,WA,qO,zO,Op=re(()=>{"use strict";yr();Pr();Wn();tn();se();NO=U("select").parts("label","positioner","trigger","indicator","clearTrigger","item","itemText","itemIndicator","itemGroup","itemGroupLabel","list","content","root","control","valueText"),_e=NO.build(),Ki=e=>new Nt(e);Ki.empty=()=>new Nt({items:[]});RO=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`select:${e.id}`},_l=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`select:${e.id}:content`},Gl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`select:${e.id}:trigger`},Cp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.clearTrigger)!=null?n:`select:${e.id}:clear-trigger`},Ta=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`select:${e.id}:label`},DO=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`select:${e.id}:control`},Ul=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`select:${e.id}:option:${t}`},ql=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.hiddenSelect)!=null?n:`select:${e.id}:select`},Sp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`select:${e.id}:positioner`},LO=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemGroup)==null?void 0:i.call(n,t))!=null?r:`select:${e.id}:optgroup:${t}`},bp=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.itemGroupLabel)==null?void 0:i.call(n,t))!=null?r:`select:${e.id}:optgroup-label:${t}`},Hl=e=>e.getById(ql(e)),$r=e=>e.getById(_l(e)),ri=e=>e.getById(Gl(e)),MO=e=>e.getById(Cp(e)),Ep=e=>e.getById(Sp(e)),Bl=(e,t)=>t==null?null:e.getById(Ul(e,t));({and:Hr,not:ii,or:$O}=Ee()),HO={props({props:e}){var t;return y(g({loopFocus:!1,closeOnSelect:!e.multiple,composite:!0,defaultValue:[]},e),{collection:(t=e.collection)!=null?t:Ki.empty(),positioning:g({placement:"bottom-start",gutter:8},e.positioning)})},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:fe,onChange(n){var r;let i=e("collection").findMany(n);return(r=e("onValueChange"))==null?void 0:r({value:n,items:i})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),onChange(n){var i;(i=e("onHighlightChange"))==null||i({highlightedValue:n,highlightedItem:e("collection").find(n),highlightedIndex:e("collection").indexOf(n)})}})),currentPlacement:t(()=>({defaultValue:void 0})),fieldsetDisabled:t(()=>({defaultValue:!1})),highlightedItem:t(()=>({defaultValue:null})),selectedItems:t(()=>{var r,s;let n=(s=(r=e("value"))!=null?r:e("defaultValue"))!=null?s:[];return{defaultValue:e("collection").findMany(n)}})}},refs(){return{typeahead:g({},Ue.defaultOptions)}},computed:{hasSelectedItems:({context:e})=>e.get("value").length>0,isTypingAhead:({refs:e})=>e.get("typeahead").keysSoFar!=="",isDisabled:({prop:e,context:t})=>!!e("disabled")||!!t.get("fieldsetDisabled"),isInteractive:({prop:e})=>!(e("disabled")||e("readOnly")),valueAsString:({context:e,prop:t})=>t("collection").stringifyItems(e.get("selectedItems"))},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"idle"},entry:["syncSelectElement"],watch({context:e,prop:t,track:n,action:i}){n([()=>e.get("value").toString()],()=>{i(["syncSelectedItems","syncSelectElement","dispatchChangeEvent"])}),n([()=>t("open")],()=>{i(["toggleVisibility"])}),n([()=>e.get("highlightedValue")],()=>{i(["syncHighlightedItem"])}),n([()=>t("collection").toString()],()=>{i(["syncCollection"])})},on:{"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedItem"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedItem"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setSelectedItems"]},"VALUE.CLEAR":{actions:["clearSelectedItems"]},"CLEAR.CLICK":{actions:["clearSelectedItems","focusTriggerEl"]}},effects:["trackFormControlState"],states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":[{guard:"isTriggerClickEvent",target:"open",actions:["setInitialFocus","highlightFirstSelectedItem"]},{target:"open",actions:["setInitialFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus","highlightFirstSelectedItem"]}],"TRIGGER.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen"]}]}},focused:{tags:["closed"],on:{"CONTROLLED.OPEN":[{guard:"isTriggerClickEvent",target:"open",actions:["setInitialFocus","highlightFirstSelectedItem"]},{guard:"isTriggerArrowUpEvent",target:"open",actions:["setInitialFocus","highlightComputedLastItem"]},{guard:$O("isTriggerArrowDownEvent","isTriggerEnterEvent"),target:"open",actions:["setInitialFocus","highlightComputedFirstItem"]},{target:"open",actions:["setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen"]}],"TRIGGER.BLUR":{target:"idle"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightFirstSelectedItem"]}],"TRIGGER.ENTER":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedFirstItem"]}],"TRIGGER.ARROW_UP":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedLastItem"]}],"TRIGGER.ARROW_DOWN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedFirstItem"]}],"TRIGGER.ARROW_LEFT":[{guard:Hr(ii("multiple"),"hasSelectedItems"),actions:["selectPreviousItem"]},{guard:ii("multiple"),actions:["selectLastItem"]}],"TRIGGER.ARROW_RIGHT":[{guard:Hr(ii("multiple"),"hasSelectedItems"),actions:["selectNextItem"]},{guard:ii("multiple"),actions:["selectFirstItem"]}],"TRIGGER.HOME":{guard:ii("multiple"),actions:["selectFirstItem"]},"TRIGGER.END":{guard:ii("multiple"),actions:["selectLastItem"]},"TRIGGER.TYPEAHEAD":{guard:ii("multiple"),actions:["selectMatchingItem"]}}},open:{tags:["open"],exit:["scrollContentToTop"],effects:["trackDismissableElement","computePlacement","scrollToHighlightedItem"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["focusTriggerEl","clearHighlightedItem"]},{target:"idle",actions:["clearHighlightedItem"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{guard:"restoreFocus",target:"focused",actions:["invokeOnClose","focusTriggerEl","clearHighlightedItem"]},{target:"idle",actions:["invokeOnClose","clearHighlightedItem"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","clearHighlightedItem"]}],"ITEM.CLICK":[{guard:Hr("closeOnSelect","isOpenControlled"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","focusTriggerEl","clearHighlightedItem"]},{actions:["selectHighlightedItem"]}],"CONTENT.HOME":{actions:["highlightFirstItem"]},"CONTENT.END":{actions:["highlightLastItem"]},"CONTENT.ARROW_DOWN":[{guard:Hr("hasHighlightedItem","loop","isLastItemHighlighted"),actions:["highlightFirstItem"]},{guard:"hasHighlightedItem",actions:["highlightNextItem"]},{actions:["highlightFirstItem"]}],"CONTENT.ARROW_UP":[{guard:Hr("hasHighlightedItem","loop","isFirstItemHighlighted"),actions:["highlightLastItem"]},{guard:"hasHighlightedItem",actions:["highlightPreviousItem"]},{actions:["highlightLastItem"]}],"CONTENT.TYPEAHEAD":{actions:["highlightMatchingItem"]},"ITEM.POINTER_MOVE":{actions:["highlightItem"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedItem"]},"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{loop:({prop:e})=>!!e("loopFocus"),multiple:({prop:e})=>!!e("multiple"),hasSelectedItems:({computed:e})=>!!e("hasSelectedItems"),hasHighlightedItem:({context:e})=>e.get("highlightedValue")!=null,isFirstItemHighlighted:({context:e,prop:t})=>e.get("highlightedValue")===t("collection").firstValue,isLastItemHighlighted:({context:e,prop:t})=>e.get("highlightedValue")===t("collection").lastValue,closeOnSelect:({prop:e,event:t})=>{var n;return!!((n=t.closeOnSelect)!=null?n:e("closeOnSelect"))},restoreFocus:({event:e})=>Ip(e),isOpenControlled:({prop:e})=>e("open")!==void 0,isTriggerClickEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.CLICK"},isTriggerEnterEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.ENTER"},isTriggerArrowUpEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.ARROW_UP"},isTriggerArrowDownEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.ARROW_DOWN"}},effects:{trackFormControlState({context:e,scope:t}){return wt(Hl(t),{onFieldsetDisabledChange(n){e.set("fieldsetDisabled",n)},onFormReset(){let n=e.initial("value");e.set("value",n)}})},trackDismissableElement({scope:e,send:t,prop:n}){let i=()=>$r(e),r=!0;return Ft(i,{type:"listbox",defer:!0,exclude:[ri(e),MO(e)],onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onInteractOutside(s){var a;(a=n("onInteractOutside"))==null||a(s),r=!(s.detail.focusable||s.detail.contextmenu)},onDismiss(){t({type:"CLOSE",src:"interact-outside",restoreFocus:r})}})},computePlacement({context:e,prop:t,scope:n}){let i=t("positioning");return e.set("currentPlacement",i.placement),It(()=>ri(n),()=>Ep(n),y(g({defer:!0},i),{onComplete(a){e.set("currentPlacement",a.placement)}}))},scrollToHighlightedItem({context:e,prop:t,scope:n,event:i}){let r=a=>{let o=e.get("highlightedValue");if(o==null||i.current().type.includes("POINTER"))return;let l=$r(n),c=t("scrollToIndexFn");if(c){let h=t("collection").indexOf(o);c==null||c({index:h,immediate:a,getElement:()=>Bl(n,o)});return}let d=Bl(n,o);Xt(d,{rootEl:l,block:"nearest"})};return H(()=>r(!0)),ot(()=>$r(n),{defer:!0,attributes:["data-activedescendant"],callback(){r(!1)}})}},actions:{reposition({context:e,prop:t,scope:n,event:i}){let r=()=>Ep(n);It(ri(n),r,y(g(g({},t("positioning")),i.options),{defer:!0,listeners:!1,onComplete(s){e.set("currentPlacement",s.placement)}}))},toggleVisibility({send:e,prop:t,event:n}){e({type:t("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})},highlightPreviousItem({context:e,prop:t}){let n=e.get("highlightedValue");if(n==null)return;let i=t("collection").getPreviousValue(n,1,t("loopFocus"));i!=null&&e.set("highlightedValue",i)},highlightNextItem({context:e,prop:t}){let n=e.get("highlightedValue");if(n==null)return;let i=t("collection").getNextValue(n,1,t("loopFocus"));i!=null&&e.set("highlightedValue",i)},highlightFirstItem({context:e,prop:t}){let n=t("collection").firstValue;e.set("highlightedValue",n)},highlightLastItem({context:e,prop:t}){let n=t("collection").lastValue;e.set("highlightedValue",n)},setInitialFocus({scope:e}){H(()=>{let t=ds({root:$r(e)});t==null||t.focus({preventScroll:!0})})},focusTriggerEl({event:e,scope:t}){Ip(e)&&H(()=>{let n=ri(t);n==null||n.focus({preventScroll:!0})})},selectHighlightedItem({context:e,prop:t,event:n}){var s,a;let i=(s=n.value)!=null?s:e.get("highlightedValue");if(i==null||!t("collection").has(i))return;(a=t("onSelect"))==null||a({value:i}),i=t("deselectable")&&!t("multiple")&&e.get("value").includes(i)?null:i,e.set("value",o=>i==null?[]:t("multiple")?yt(o,i):[i])},highlightComputedFirstItem({context:e,prop:t,computed:n}){let i=t("collection"),r=n("hasSelectedItems")?i.sort(e.get("value"))[0]:i.firstValue;e.set("highlightedValue",r)},highlightComputedLastItem({context:e,prop:t,computed:n}){let i=t("collection"),r=n("hasSelectedItems")?i.sort(e.get("value"))[0]:i.lastValue;e.set("highlightedValue",r)},highlightFirstSelectedItem({context:e,prop:t,computed:n}){if(!n("hasSelectedItems"))return;let i=t("collection").sort(e.get("value"))[0];e.set("highlightedValue",i)},highlightItem({context:e,event:t}){e.set("highlightedValue",t.value)},highlightMatchingItem({context:e,prop:t,event:n,refs:i}){let r=t("collection").search(n.key,{state:i.get("typeahead"),currentValue:e.get("highlightedValue")});r!=null&&e.set("highlightedValue",r)},setHighlightedItem({context:e,event:t}){e.set("highlightedValue",t.value)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},selectItem({context:e,prop:t,event:n}){var s;(s=t("onSelect"))==null||s({value:n.value});let r=t("deselectable")&&!t("multiple")&&e.get("value").includes(n.value)?null:n.value;e.set("value",a=>r==null?[]:t("multiple")?yt(a,r):[r])},clearItem({context:e,event:t}){e.set("value",n=>n.filter(i=>i!==t.value))},setSelectedItems({context:e,event:t}){e.set("value",t.value)},clearSelectedItems({context:e}){e.set("value",[])},selectPreviousItem({context:e,prop:t}){let[n]=e.get("value"),i=t("collection").getPreviousValue(n);i&&e.set("value",[i])},selectNextItem({context:e,prop:t}){let[n]=e.get("value"),i=t("collection").getNextValue(n);i&&e.set("value",[i])},selectFirstItem({context:e,prop:t}){let n=t("collection").firstValue;n&&e.set("value",[n])},selectLastItem({context:e,prop:t}){let n=t("collection").lastValue;n&&e.set("value",[n])},selectMatchingItem({context:e,prop:t,event:n,refs:i}){let r=t("collection").search(n.key,{state:i.get("typeahead"),currentValue:e.get("value")[0]});r!=null&&e.set("value",[r])},scrollContentToTop({prop:e,scope:t}){var n,i;if(e("scrollToIndexFn")){let r=e("collection").firstValue;(n=e("scrollToIndexFn"))==null||n({index:0,immediate:!0,getElement:()=>Bl(t,r)})}else(i=$r(t))==null||i.scrollTo(0,0)},invokeOnOpen({prop:e,context:t}){var n;(n=e("onOpenChange"))==null||n({open:!0,value:t.get("value")})},invokeOnClose({prop:e,context:t}){var n;(n=e("onOpenChange"))==null||n({open:!1,value:t.get("value")})},syncSelectElement({context:e,prop:t,scope:n}){let i=Hl(n);if(i){if(e.get("value").length===0&&!t("multiple")){i.selectedIndex=-1;return}for(let r of i.options)r.selected=e.get("value").includes(r.value)}},syncCollection({context:e,prop:t}){let n=t("collection"),i=n.find(e.get("highlightedValue"));i&&e.set("highlightedItem",i);let r=n.findMany(e.get("value"));e.set("selectedItems",r)},syncSelectedItems({context:e,prop:t}){let n=t("collection"),i=e.get("selectedItems"),s=e.get("value").map(a=>i.find(l=>n.getItemValue(l)===a)||n.find(a));e.set("selectedItems",s)},syncHighlightedItem({context:e,prop:t}){let n=t("collection"),i=e.get("highlightedValue"),r=i?n.find(i):null;e.set("highlightedItem",r)},dispatchChangeEvent({scope:e}){queueMicrotask(()=>{let t=Hl(e);if(!t)return;let n=e.getWin(),i=new n.Event("change",{bubbles:!0,composed:!0});t.dispatchEvent(i)})}}}};BO=_()(["closeOnSelect","collection","composite","defaultHighlightedValue","defaultOpen","defaultValue","deselectable","dir","disabled","form","getRootNode","highlightedValue","id","ids","invalid","loopFocus","multiple","name","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onSelect","onValueChange","open","positioning","readOnly","required","scrollToIndexFn","value"]),GA=B(BO),_O=_()(["item","persistFocus"]),UA=B(_O),GO=_()(["id"]),qA=B(GO),UO=_()(["htmlFor"]),WA=B(UO),qO=class extends K{constructor(t,n){var r;super(t,n);Y(this,"_options",[]);Y(this,"hasGroups",!1);Y(this,"placeholder","");Y(this,"init",()=>{this.machine.start(),this.render(),this.machine.subscribe(()=>{this.api=this.initApi(),this.render()})});let i=n.collection;this._options=(r=i==null?void 0:i.items)!=null?r:[],this.placeholder=w(this.el,"placeholder")||""}get options(){return Array.isArray(this._options)?this._options:[]}setOptions(t){this._options=Array.isArray(t)?t:[]}getCollection(){let t=this.options;return this.hasGroups?Ki({items:t,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled,groupBy:n=>{var i;return(i=n.group)!=null?i:""}}):Ki({items:t,itemToValue:n=>{var i,r;return(r=(i=n.id)!=null?i:n.value)!=null?r:""},itemToString:n=>n.label,isItemDisabled:n=>!!n.disabled})}initMachine(t){let n=this.getCollection.bind(this),i=t.collection;return new W(HO,y(g({},t),{get collection(){return i!=null?i:n()}}))}initApi(){return FO(this.machine.service,q)}applyItemProps(){let t=this.el.querySelector('[data-scope="select"][data-part="content"]');t&&(t.querySelectorAll('[data-scope="select"][data-part="item-group"]').forEach(n=>{var s;let i=(s=n.dataset.id)!=null?s:"";this.spreadProps(n,this.api.getItemGroupProps({id:i}));let r=n.querySelector('[data-scope="select"][data-part="item-group-label"]');r&&this.spreadProps(r,this.api.getItemGroupLabelProps({htmlFor:i}))}),t.querySelectorAll('[data-scope="select"][data-part="item"]').forEach(n=>{var o;let i=(o=n.dataset.value)!=null?o:"",r=this.options.find(l=>{var c,d;return String((d=(c=l.id)!=null?c:l.value)!=null?d:"")===String(i)});if(!r)return;this.spreadProps(n,this.api.getItemProps({item:r}));let s=n.querySelector('[data-scope="select"][data-part="item-text"]');s&&this.spreadProps(s,this.api.getItemTextProps({item:r}));let a=n.querySelector('[data-scope="select"][data-part="item-indicator"]');a&&this.spreadProps(a,this.api.getItemIndicatorProps({item:r}))}))}render(){var a;let t=(a=this.el.querySelector('[data-scope="select"][data-part="root"]'))!=null?a:this.el;this.spreadProps(t,this.api.getRootProps());let n=this.el.querySelector('[data-scope="select"][data-part="hidden-select"]'),i=this.el.querySelector('[data-scope="select"][data-part="value-input"]');i&&(!this.api.value||this.api.value.length===0?i.value="":this.api.value.length===1?i.value=String(this.api.value[0]):i.value=this.api.value.map(String).join(",")),n&&this.spreadProps(n,this.api.getHiddenSelectProps()),["label","control","trigger","indicator","clear-trigger","positioner"].forEach(o=>{let l=this.el.querySelector(`[data-scope="select"][data-part="${o}"]`);if(!l)return;let c="get"+o.split("-").map(d=>d[0].toUpperCase()+d.slice(1)).join("")+"Props";this.spreadProps(l,this.api[c]())});let r=this.el.querySelector('[data-scope="select"][data-part="item-text"]');if(r){let o=this.api.valueAsString;if(this.api.value&&this.api.value.length>0&&!o){let l=this.api.value[0],c=this.options.find(d=>{var m,u;let h=(u=(m=d.id)!=null?m:d.value)!=null?u:"";return String(h)===String(l)});c?r.textContent=c.label:r.textContent=this.placeholder||""}else r.textContent=o||this.placeholder||""}let s=this.el.querySelector('[data-scope="select"][data-part="content"]');s&&(this.spreadProps(s,this.api.getContentProps()),this.applyItemProps())}};zO={mounted(){let e=this.el,t=JSON.parse(e.dataset.collection||"[]"),n=t.some(s=>s.group!==void 0),i=Pp(t,n),r=new qO(e,y(g({id:e.id,collection:i},C(e,"controlled")?{value:Z(e,"value")}:{defaultValue:Z(e,"defaultValue")}),{disabled:C(e,"disabled"),closeOnSelect:C(e,"closeOnSelect"),dir:w(e,"dir",["ltr","rtl"]),loopFocus:C(e,"loopFocus"),multiple:C(e,"multiple"),invalid:C(e,"invalid"),name:w(e,"name"),form:w(e,"form"),readOnly:C(e,"readOnly"),required:C(e,"required"),positioning:(()=>{let s=e.dataset.positioning;if(s)try{let a=JSON.parse(s);return KO(a)}catch(a){return}})(),onValueChange:s=>{var T;let a=C(e,"redirect"),o=s.value.length>0?String(s.value[0]):null,l=(T=s.items)!=null&&T.length?s.items[0]:null,c=l&&typeof l=="object"&&l!==null&&"redirect"in l?l.redirect:void 0,d=l&&typeof l=="object"&&l!==null&&"new_tab"in l?l.new_tab:void 0;a&&o&&this.liveSocket.main.isDead&&c!==!1&&(d===!0?window.open(o,"_blank","noopener,noreferrer"):window.location.href=o);let u=e.querySelector('[data-scope="select"][data-part="value-input"]');u&&(u.value=s.value.length===0?"":s.value.length===1?String(s.value[0]):s.value.map(String).join(","),u.dispatchEvent(new Event("input",{bubbles:!0})),u.dispatchEvent(new Event("change",{bubbles:!0})));let p={value:s.value,items:s.items,id:e.id},v=w(e,"onValueChangeClient");v&&e.dispatchEvent(new CustomEvent(v,{bubbles:!0,detail:p}));let I=w(e,"onValueChange");I&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(I,p)}}));r.hasGroups=n,r.setOptions(t),r.init(),this.select=r,this.handlers=[]},updated(){let e=JSON.parse(this.el.dataset.collection||"[]"),t=e.some(n=>n.group!==void 0);this.select&&(this.select.hasGroups=t,this.select.setOptions(e),this.select.updateProps(y(g({collection:Pp(e,t),id:this.el.id},C(this.el,"controlled")?{value:Z(this.el,"value")}:{defaultValue:Z(this.el,"defaultValue")}),{name:w(this.el,"name"),form:w(this.el,"form"),disabled:C(this.el,"disabled"),multiple:C(this.el,"multiple"),dir:w(this.el,"dir",["ltr","rtl"]),invalid:C(this.el,"invalid"),required:C(this.el,"required"),readOnly:C(this.el,"readOnly")})))},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.select)==null||e.destroy()}}});var Kp={};he(Kp,{SignaturePad:()=>Ew});function xp(e,t,n,i=r=>r){return e*i(.5-t*(.5-n))}function Bp(e,t,n){let i=Wl(1,t/n);return Wl(1,e+(Wl(1,1-i)-e)*(i*.275))}function jO(e){return[-e[0],-e[1]]}function Bt(e,t){return[e[0]+t[0],e[1]+t[1]]}function Ap(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function Nn(e,t){return[e[0]-t[0],e[1]-t[1]]}function Yl(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function kn(e,t){return[e[0]*t,e[1]*t]}function Kl(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function XO(e,t){return[e[0]/t,e[1]/t]}function _p(e){return[e[1],-e[0]]}function zl(e,t){let n=t[0];return e[0]=t[1],e[1]=-n,e}function kp(e,t){return e[0]*t[0]+e[1]*t[1]}function ZO(e,t){return e[0]===t[0]&&e[1]===t[1]}function JO(e){return Math.hypot(e[0],e[1])}function Np(e,t){let n=e[0]-t[0],i=e[1]-t[1];return n*n+i*i}function Gp(e){return XO(e,JO(e))}function QO(e,t){return Math.hypot(e[1]-t[1],e[0]-t[0])}function jl(e,t,n){let i=Math.sin(n),r=Math.cos(n),s=e[0]-t[0],a=e[1]-t[1],o=s*r-a*i,l=s*i+a*r;return[o+t[0],l+t[1]]}function Rp(e,t,n,i){let r=Math.sin(i),s=Math.cos(i),a=t[0]-n[0],o=t[1]-n[1],l=a*s-o*r,c=a*r+o*s;return e[0]=l+n[0],e[1]=c+n[1],e}function Dp(e,t,n){return Bt(e,kn(Nn(t,e),n))}function ew(e,t,n,i){let r=n[0]-t[0],s=n[1]-t[1];return e[0]=t[0]+r*i,e[1]=t[1]+s*i,e}function Up(e,t,n){return Bt(e,kn(t,n))}function tw(e,t){let n=Up(e,Gp(_p(Nn(e,Bt(e,[1,1])))),-t),i=[],r=1/13;for(let s=r;s<=1;s+=r)i.push(jl(n,e,Br*2*s));return i}function nw(e,t,n){let i=[],r=1/n;for(let s=r;s<=1;s+=r)i.push(jl(t,e,Br*s));return i}function iw(e,t,n){let i=Nn(t,n),r=kn(i,.5),s=kn(i,.51);return[Nn(e,r),Nn(e,s),Bt(e,s),Bt(e,r)]}function rw(e,t,n,i){let r=[],s=Up(e,t,n),a=1/i;for(let o=a;o<1;o+=a)r.push(jl(s,e,Br*3*o));return r}function sw(e,t,n){return[Bt(e,kn(t,n)),Bt(e,kn(t,n*.99)),Nn(e,kn(t,n*.99)),Nn(e,kn(t,n))]}function Lp(e,t,n){return e===!1||e===void 0?0:e===!0?Math.max(t,n):e}function aw(e,t,n){return e.slice(0,10).reduce((i,r)=>{let s=r.pressure;return t&&(s=Bp(i,r.distance,n)),(i+s)/2},e[0].pressure)}function ow(e,t={}){let{size:n=16,smoothing:i=.5,thinning:r=.5,simulatePressure:s=!0,easing:a=Q=>Q,start:o={},end:l={},last:c=!1}=t,{cap:d=!0,easing:h=Q=>Q*(2-Q)}=o,{cap:m=!0,easing:u=Q=>--Q*Q*Q+1}=l;if(e.length===0||n<=0)return[];let p=e[e.length-1].runningLength,v=Lp(o.taper,n,p),I=Lp(l.taper,n,p),T=(n*i)**2,O=[],b=[],f=aw(e,s,n),S=xp(n,r,e[e.length-1].pressure,a),P,V=e[0].vector,A=e[0].point,x=A,k=A,N=x,D=!1;for(let Q=0;QT)&&(O.push(k),A=k),Ap(An,Pe,De),N=[An[0],An[1]],(Q<=1||Np(x,N)>T)&&(b.push(N),x=N),f=Se,V=ne}let $=[e[0].point[0],e[0].point[1]],te=e.length>1?[e[e.length-1].point[0],e[e.length-1].point[1]]:Bt(e[0].point,[1,1]),J=[],ie=[];if(e.length===1){if(!(v||I)||c)return tw($,P||S)}else{v||I&&e.length===1||(d?J.push(...nw($,b[0],13)):J.push(...iw($,O[0],b[0])));let Q=_p(jO(e[e.length-1].vector));I||v&&e.length===1?ie.push(te):m?ie.push(...rw(te,Q,S,29)):ie.push(...sw(te,Q,S))}return O.concat(ie,b.reverse(),J)}function Fp(e){return e!=null&&e>=0}function lw(e,t={}){var m;let{streamline:n=.5,size:i=16,last:r=!1}=t;if(e.length===0)return[];let s=.15+(1-n)*.85,a=Array.isArray(e[0])?e:e.map(({x:u,y:p,pressure:v=wp})=>[u,p,v]);if(a.length===2){let u=a[1];a=a.slice(0,-1);for(let p=1;p<5;p++)a.push(Dp(a[0],u,p/4))}a.length===1&&(a=[...a,[...Bt(a[0],Vp),...a[0].slice(2)]]);let o=[{point:[a[0][0],a[0][1]],pressure:Fp(a[0][2])?a[0][2]:.25,vector:[...Vp],distance:0,runningLength:0}],l=!1,c=0,d=o[0],h=a.length-1;for(let u=1;u{"use strict";se();({PI:YO}=Math),Br=YO+1e-4,wp=.5,Vp=[1,1];({min:Wl}=Math);De=[0,0],xn=[0,0],An=[0,0];Mp=[0,0];dw=cw,uw=U("signature-pad").parts("root","control","segment","segmentPath","guide","clearTrigger","label"),si=uw.build(),hw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`signature-${e.id}`},qp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`signature-control-${e.id}`},gw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`signature-label-${e.id}`},$p=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.hiddenInput)!=null?n:`signature-input-${e.id}`},Va=e=>e.getById(qp(e)),pw=e=>vi(Va(e),"[data-part=segment]"),Wp=(e,t)=>Sc(pw(e),t);Oa=(e,t)=>(e+t)/2;vw={props({props:e}){return y(g({defaultPaths:[]},e),{drawing:g({size:2,simulatePressure:!1,thinning:.7,smoothing:.4,streamline:.6},e.drawing),translations:g({control:"signature pad",clearTrigger:"clear signature"},e.translations)})},initialState(){return"idle"},context({prop:e,bindable:t}){return{paths:t(()=>({defaultValue:e("defaultPaths"),value:e("paths"),sync:!0,onChange(n){var i;(i=e("onDraw"))==null||i({paths:n})}})),currentPoints:t(()=>({defaultValue:[]})),currentPath:t(()=>({defaultValue:null}))}},computed:{isInteractive:({prop:e})=>!(e("disabled")||e("readOnly")),isEmpty:({context:e})=>e.get("paths").length===0},on:{CLEAR:{actions:["clearPoints","invokeOnDrawEnd","focusCanvasEl"]}},states:{idle:{on:{POINTER_DOWN:{target:"drawing",actions:["addPoint"]}}},drawing:{effects:["trackPointerMove"],on:{POINTER_MOVE:{actions:["addPoint","invokeOnDraw"]},POINTER_UP:{target:"idle",actions:["endStroke","invokeOnDrawEnd"]}}}},implementations:{effects:{trackPointerMove({scope:e,send:t}){let n=e.getDoc();return hn(n,{onPointerMove({event:i,point:r}){let s=Va(e);if(!s)return;let{offset:a}=to(r,s);t({type:"POINTER_MOVE",point:a,pressure:i.pressure})},onPointerUp(){t({type:"POINTER_UP"})}})}},actions:{addPoint({context:e,event:t,prop:n}){let i=[...e.get("currentPoints"),t.point];e.set("currentPoints",i);let r=dw(i,n("drawing"));e.set("currentPath",mw(r))},endStroke({context:e}){let t=[...e.get("paths"),e.get("currentPath")];e.set("paths",t),e.set("currentPoints",[]),e.set("currentPath",null)},clearPoints({context:e}){e.set("currentPoints",[]),e.set("paths",[]),e.set("currentPath",null)},focusCanvasEl({scope:e}){queueMicrotask(()=>{var t;(t=e.getActiveElement())==null||t.focus({preventScroll:!0})})},invokeOnDraw({context:e,prop:t}){var n;(n=t("onDraw"))==null||n({paths:[...e.get("paths"),e.get("currentPath")]})},invokeOnDrawEnd({context:e,prop:t,scope:n,computed:i}){var r;(r=t("onDrawEnd"))==null||r({paths:[...e.get("paths")],getDataUrl(s,a=.92){return i("isEmpty")?Promise.resolve(""):Wp(n,{type:s,quality:a})}})}}}},yw=_()(["defaultPaths","dir","disabled","drawing","getRootNode","id","ids","name","onDraw","onDrawEnd","paths","readOnly","required","translations"]),jA=B(yw),bw=class extends K{constructor(){super(...arguments);Y(this,"imageURL","");Y(this,"paths",[]);Y(this,"name");Y(this,"syncPaths",()=>{let t=this.el.querySelector('[data-scope="signature-pad"][data-part="segment"]');if(!t)return;if(this.api.paths.length+(this.api.currentPath?1:0)===0){t.innerHTML="",this.imageURL="",this.paths=[];let i=this.el.querySelector('[data-scope="signature-pad"][data-part="hidden-input"]');i&&(i.value="");return}if(t.innerHTML="",this.api.paths.forEach(i=>{let r=document.createElementNS("http://www.w3.org/2000/svg","path");r.setAttribute("data-scope","signature-pad"),r.setAttribute("data-part","path"),this.spreadProps(r,this.api.getSegmentPathProps({path:i})),t.appendChild(r)}),this.api.currentPath){let i=document.createElementNS("http://www.w3.org/2000/svg","path");i.setAttribute("data-scope","signature-pad"),i.setAttribute("data-part","current-path"),this.spreadProps(i,this.api.getSegmentPathProps({path:this.api.currentPath})),t.appendChild(i)}})}initMachine(t){return this.name=t.name,new W(vw,t)}setName(t){this.name=t}setPaths(t){this.paths=t}initApi(){return fw(this.machine.service,q)}render(){let t=this.el.querySelector('[data-scope="signature-pad"][data-part="root"]');if(!t)return;this.spreadProps(t,this.api.getRootProps());let n=t.querySelector('[data-scope="signature-pad"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps());let i=t.querySelector('[data-scope="signature-pad"][data-part="control"]');i&&this.spreadProps(i,this.api.getControlProps());let r=t.querySelector('[data-scope="signature-pad"][data-part="segment"]');r&&this.spreadProps(r,this.api.getSegmentProps());let s=t.querySelector('[data-scope="signature-pad"][data-part="guide"]');s&&this.spreadProps(s,this.api.getGuideProps());let a=t.querySelector('[data-scope="signature-pad"][data-part="clear-trigger"]');a&&this.spreadProps(a,this.api.getClearTriggerProps());let o=t.querySelector('[data-scope="signature-pad"][data-part="hidden-input"]');o&&this.spreadProps(o,this.api.getHiddenInputProps({value:this.api.paths.length>0?JSON.stringify(this.api.paths):""})),this.syncPaths()}};Ew={mounted(){let e=this.el,t=this.pushEvent.bind(this),n=C(e,"controlled"),i=wa(e,"paths"),r=wa(e,"defaultPaths"),s=new bw(e,y(g(g({id:e.id,name:w(e,"name")},n&&i.length>0?{paths:i}:void 0),!n&&r.length>0?{defaultPaths:r}:void 0),{drawing:Hp(e),onDrawEnd:a=>{s.setPaths(a.paths);let o=e.querySelector('[data-scope="signature-pad"][data-part="hidden-input"]');o&&(o.value=a.paths.length>0?JSON.stringify(a.paths):"",o.dispatchEvent(new Event("input",{bubbles:!0})),o.dispatchEvent(new Event("change",{bubbles:!0}))),a.getDataUrl("image/png").then(l=>{s.imageURL=l;let c=w(e,"onDrawEnd");c&&this.liveSocket.main.isConnected()&&t(c,{id:e.id,paths:a.paths,url:l});let d=w(e,"onDrawEndClient");d&&e.dispatchEvent(new CustomEvent(d,{bubbles:!0,detail:{id:e.id,paths:a.paths,url:l}}))})}}));s.init(),this.signaturePad=s,this.onClear=a=>{let{id:o}=a.detail;o&&o!==e.id||s.api.clear()},e.addEventListener("phx:signature-pad:clear",this.onClear),this.handlers=[],this.handlers.push(this.handleEvent("signature_pad_clear",a=>{let o=a.signature_pad_id;o&&o!==e.id||s.api.clear()}))},updated(){var r,s;let e=C(this.el,"controlled"),t=wa(this.el,"paths"),n=wa(this.el,"defaultPaths"),i=w(this.el,"name");i&&((r=this.signaturePad)==null||r.setName(i)),(s=this.signaturePad)==null||s.updateProps(y(g(g({id:this.el.id,name:i},e&&t.length>0?{paths:t}:{}),!e&&n.length>0?{defaultPaths:n}:{}),{drawing:Hp(this.el)}))},destroyed(){var e;if(this.onClear&&this.el.removeEventListener("phx:signature-pad:clear",this.onClear),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.signaturePad)==null||e.destroy()}}});var Zp={};he(Zp,{Switch:()=>xw});function Tw(e,t){let{context:n,send:i,prop:r,scope:s}=e,a=!!r("disabled"),o=!!r("readOnly"),l=!!r("required"),c=!!n.get("checked"),d=!a&&n.get("focused"),h=!a&&n.get("focusVisible"),m=!a&&n.get("active"),u={"data-active":E(m),"data-focus":E(d),"data-focus-visible":E(h),"data-readonly":E(o),"data-hover":E(n.get("hovered")),"data-disabled":E(a),"data-state":c?"checked":"unchecked","data-invalid":E(r("invalid")),"data-required":E(l)};return{checked:c,disabled:a,focused:d,setChecked(p){i({type:"CHECKED.SET",checked:p,isTrusted:!1})},toggleChecked(){i({type:"CHECKED.TOGGLE",checked:c,isTrusted:!1})},getRootProps(){return t.label(y(g(g({},xa.root.attrs),u),{dir:r("dir"),id:Xp(s),htmlFor:Xl(s),onPointerMove(){a||i({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){a||i({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(p){var I;if(a)return;j(p)===zi(s)&&p.stopPropagation(),Xe()&&((I=zi(s))==null||I.focus())}}))},getLabelProps(){return t.element(y(g(g({},xa.label.attrs),u),{dir:r("dir"),id:Yp(s)}))},getThumbProps(){return t.element(y(g(g({},xa.thumb.attrs),u),{dir:r("dir"),id:Pw(s),"aria-hidden":!0}))},getControlProps(){return t.element(y(g(g({},xa.control.attrs),u),{dir:r("dir"),id:Cw(s),"aria-hidden":!0}))},getHiddenInputProps(){return t.input({id:Xl(s),type:"checkbox",required:r("required"),defaultChecked:c,disabled:a,"aria-labelledby":Yp(s),"aria-invalid":r("invalid"),name:r("name"),form:r("form"),value:r("value"),style:Vt,onFocus(){let p=En();i({type:"CONTEXT.SET",context:{focused:!0,focusVisible:p}})},onBlur(){i({type:"CONTEXT.SET",context:{focused:!1,focusVisible:!1}})},onClick(p){if(o){p.preventDefault();return}let v=p.currentTarget.checked;i({type:"CHECKED.SET",checked:v,isTrusted:!0})}})}}}var Iw,xa,Xp,Yp,Pw,Cw,Xl,Sw,zi,jp,Ow,ww,ek,Vw,xw,Jp=re(()=>{"use strict";pr();se();Iw=U("switch").parts("root","label","control","thumb"),xa=Iw.build(),Xp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`switch:${e.id}`},Yp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`switch:${e.id}:label`},Pw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.thumb)!=null?n:`switch:${e.id}:thumb`},Cw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.control)!=null?n:`switch:${e.id}:control`},Xl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.hiddenInput)!=null?n:`switch:${e.id}:input`},Sw=e=>e.getById(Xp(e)),zi=e=>e.getById(Xl(e));({not:jp}=Ee()),Ow={props({props:e}){return g({defaultChecked:!1,label:"switch",value:"on"},e)},initialState(){return"ready"},context({prop:e,bindable:t}){return{checked:t(()=>({defaultValue:e("defaultChecked"),value:e("checked"),onChange(n){var i;(i=e("onCheckedChange"))==null||i({checked:n})}})),fieldsetDisabled:t(()=>({defaultValue:!1})),focusVisible:t(()=>({defaultValue:!1})),active:t(()=>({defaultValue:!1})),focused:t(()=>({defaultValue:!1})),hovered:t(()=>({defaultValue:!1}))}},computed:{isDisabled:({context:e,prop:t})=>t("disabled")||e.get("fieldsetDisabled")},watch({track:e,prop:t,context:n,action:i}){e([()=>t("disabled")],()=>{i(["removeFocusIfNeeded"])}),e([()=>n.get("checked")],()=>{i(["syncInputElement"])})},effects:["trackFormControlState","trackPressEvent","trackFocusVisible"],on:{"CHECKED.TOGGLE":[{guard:jp("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:jp("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},states:{ready:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackPressEvent({computed:e,scope:t,context:n}){if(!e("isDisabled"))return ps({pointerNode:Sw(t),keyboardNode:zi(t),isValidKey:i=>i.key===" ",onPress:()=>n.set("active",!1),onPressStart:()=>n.set("active",!0),onPressEnd:()=>n.set("active",!1)})},trackFocusVisible({computed:e,scope:t}){if(!e("isDisabled"))return Pn({root:t.getRootNode()})},trackFormControlState({context:e,send:t,scope:n}){return wt(zi(n),{onFieldsetDisabledChange(i){e.set("fieldsetDisabled",i)},onFormReset(){let i=e.initial("checked");t({type:"CHECKED.SET",checked:!!i,src:"form-reset"})}})}},actions:{setContext({context:e,event:t}){for(let n in t.context)e.set(n,t.context[n])},syncInputElement({context:e,scope:t}){let n=zi(t);n&&sr(n,!!e.get("checked"))},removeFocusIfNeeded({context:e,prop:t}){t("disabled")&&e.set("focused",!1)},setChecked({context:e,event:t}){e.set("checked",t.checked)},toggleChecked({context:e}){e.set("checked",!e.get("checked"))},dispatchChangeEvent({context:e,scope:t}){queueMicrotask(()=>{let n=zi(t);pi(n,{checked:e.get("checked")})})}}}},ww=_()(["checked","defaultChecked","dir","disabled","form","getRootNode","id","ids","invalid","label","name","onCheckedChange","readOnly","required","value"]),ek=B(ww),Vw=class extends K{initMachine(e){return new W(Ow,e)}initApi(){return Tw(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="switch"][data-part="root"]');if(!e)return;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelector('[data-scope="switch"][data-part="hidden-input"]');t&&this.spreadProps(t,this.api.getHiddenInputProps());let n=this.el.querySelector('[data-scope="switch"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps());let i=this.el.querySelector('[data-scope="switch"][data-part="control"]');i&&this.spreadProps(i,this.api.getControlProps());let r=this.el.querySelector('[data-scope="switch"][data-part="thumb"]');r&&this.spreadProps(r,this.api.getThumbProps())}},xw={mounted(){let e=this.el,t=this.pushEvent.bind(this);this.wasFocused=!1;let n=new Vw(e,y(g({id:e.id},C(e,"controlled")?{checked:C(e,"checked")}:{defaultChecked:C(e,"defaultChecked")}),{disabled:C(e,"disabled"),name:w(e,"name"),form:w(e,"form"),value:w(e,"value"),dir:w(e,"dir",["ltr","rtl"]),invalid:C(e,"invalid"),required:C(e,"required"),readOnly:C(e,"readOnly"),label:w(e,"label"),onCheckedChange:i=>{let r=w(e,"onCheckedChange");r&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&t(r,{checked:i.checked,id:e.id});let s=w(e,"onCheckedChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{value:i,id:e.id}}))}}));n.init(),this.zagSwitch=n,this.onSetChecked=i=>{let{value:r}=i.detail;n.api.setChecked(r)},e.addEventListener("phx:switch:set-checked",this.onSetChecked),this.handlers=[],this.handlers.push(this.handleEvent("switch_set_checked",i=>{let r=i.id;r&&r!==e.id||n.api.setChecked(i.value)})),this.handlers.push(this.handleEvent("switch_toggle_checked",i=>{let r=i.id;r&&r!==e.id||n.api.toggleChecked()})),this.handlers.push(this.handleEvent("switch_checked",()=>{this.pushEvent("switch_checked_response",{value:n.api.checked})})),this.handlers.push(this.handleEvent("switch_focused",()=>{this.pushEvent("switch_focused_response",{value:n.api.focused})})),this.handlers.push(this.handleEvent("switch_disabled",()=>{this.pushEvent("switch_disabled_response",{value:n.api.disabled})}))},beforeUpdate(){var e,t;this.wasFocused=(t=(e=this.zagSwitch)==null?void 0:e.api.focused)!=null?t:!1},updated(){var e;if((e=this.zagSwitch)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlled")?{checked:C(this.el,"checked")}:{defaultChecked:C(this.el,"defaultChecked")}),{disabled:C(this.el,"disabled"),name:w(this.el,"name"),form:w(this.el,"form"),value:w(this.el,"value"),dir:w(this.el,"dir",["ltr","rtl"]),invalid:C(this.el,"invalid"),required:C(this.el,"required"),readOnly:C(this.el,"readOnly"),label:w(this.el,"label")})),C(this.el,"controlled")&&this.wasFocused){let t=this.el.querySelector('[data-part="hidden-input"]');t==null||t.focus()}},destroyed(){var e;if(this.onSetChecked&&this.el.removeEventListener("phx:switch:set-checked",this.onSetChecked),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.zagSwitch)==null||e.destroy()}}});var nf={};he(nf,{Tabs:()=>Kw});function Hw(e,t){let{state:n,send:i,context:r,prop:s,scope:a}=e,o=s("translations"),l=n.matches("focused"),c=s("orientation")==="vertical",d=s("orientation")==="horizontal",h=s("composite");function m(u){return{selected:r.get("value")===u.value,focused:r.get("focusedValue")===u.value,disabled:!!u.disabled}}return{value:r.get("value"),focusedValue:r.get("focusedValue"),setValue(u){i({type:"SET_VALUE",value:u})},clearValue(){i({type:"CLEAR_VALUE"})},setIndicatorRect(u){let p=ai(a,u);i({type:"SET_INDICATOR_RECT",id:p})},syncTabIndex(){i({type:"SYNC_TAB_INDEX"})},selectNext(u){i({type:"TAB_FOCUS",value:u,src:"selectNext"}),i({type:"ARROW_NEXT",src:"selectNext"})},selectPrev(u){i({type:"TAB_FOCUS",value:u,src:"selectPrev"}),i({type:"ARROW_PREV",src:"selectPrev"})},focus(){var p;let u=r.get("value");u&&((p=Aa(a,u))==null||p.focus())},getRootProps(){return t.element(y(g({},_r.root.attrs),{id:kw(a),"data-orientation":s("orientation"),"data-focus":E(l),dir:s("dir")}))},getListProps(){return t.element(y(g({},_r.list.attrs),{id:Gr(a),role:"tablist",dir:s("dir"),"data-focus":E(l),"aria-orientation":s("orientation"),"data-orientation":s("orientation"),"aria-label":o==null?void 0:o.listLabel,onKeyDown(u){if(u.defaultPrevented||Re(u)||!ce(u.currentTarget,j(u)))return;let p={ArrowDown(){d||i({type:"ARROW_NEXT",key:"ArrowDown"})},ArrowUp(){d||i({type:"ARROW_PREV",key:"ArrowUp"})},ArrowLeft(){c||i({type:"ARROW_PREV",key:"ArrowLeft"})},ArrowRight(){c||i({type:"ARROW_NEXT",key:"ArrowRight"})},Home(){i({type:"HOME"})},End(){i({type:"END"})}},v=ge(u,{dir:s("dir"),orientation:s("orientation")}),I=p[v];if(I){u.preventDefault(),I(u);return}}}))},getTriggerState:m,getTriggerProps(u){let{value:p,disabled:v}=u,I=m(u);return t.button(y(g({},_r.trigger.attrs),{role:"tab",type:"button",disabled:v,dir:s("dir"),"data-orientation":s("orientation"),"data-disabled":E(v),"aria-disabled":v,"data-value":p,"aria-selected":I.selected,"data-selected":E(I.selected),"data-focus":E(I.focused),"aria-controls":I.selected?Zl(a,p):void 0,"data-ownedby":Gr(a),"data-ssr":E(r.get("ssr")),id:ai(a,p),tabIndex:I.selected&&h?0:-1,onFocus(){i({type:"TAB_FOCUS",value:p})},onBlur(T){let O=T.relatedTarget;(O==null?void 0:O.getAttribute("role"))!=="tab"&&i({type:"TAB_BLUR"})},onClick(T){T.defaultPrevented||Fn(T)||v||(Xe()&&T.currentTarget.focus(),i({type:"TAB_CLICK",value:p}))}}))},getContentProps(u){let{value:p}=u,v=r.get("value")===p;return t.element(y(g({},_r.content.attrs),{dir:s("dir"),id:Zl(a,p),tabIndex:h?0:-1,"aria-labelledby":ai(a,p),role:"tabpanel","data-ownedby":Gr(a),"data-selected":E(v),"data-orientation":s("orientation"),hidden:!v}))},getIndicatorProps(){let u=r.get("indicatorRect"),p=u==null||u.width===0&&u.height===0&&u.x===0&&u.y===0;return t.element(y(g({id:ef(a)},_r.indicator.attrs),{dir:s("dir"),"data-orientation":s("orientation"),hidden:p,style:{"--transition-property":"left, right, top, bottom, width, height","--left":ye(u==null?void 0:u.x),"--top":ye(u==null?void 0:u.y),"--width":ye(u==null?void 0:u.width),"--height":ye(u==null?void 0:u.height),position:"absolute",willChange:"var(--transition-property)",transitionProperty:"var(--transition-property)",transitionDuration:"var(--transition-duration, 150ms)",transitionTimingFunction:"var(--transition-timing-function)",[d?"left":"top"]:d?"var(--left)":"var(--top)"}}))}}}var Aw,_r,kw,Gr,Zl,ai,ef,Nw,Rw,Aa,Qp,Yi,Dw,Lw,Mw,Fw,tf,$w,Bw,_w,Gw,rk,Uw,sk,qw,ak,Ww,Kw,rf=re(()=>{"use strict";se();Aw=U("tabs").parts("root","list","trigger","content","indicator"),_r=Aw.build(),kw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`tabs:${e.id}`},Gr=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.list)!=null?n:`tabs:${e.id}:list`},Zl=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.content)==null?void 0:i.call(n,t))!=null?r:`tabs:${e.id}:content-${t}`},ai=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.trigger)==null?void 0:i.call(n,t))!=null?r:`tabs:${e.id}:trigger-${t}`},ef=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicator)!=null?n:`tabs:${e.id}:indicator`},Nw=e=>e.getById(Gr(e)),Rw=(e,t)=>e.getById(Zl(e,t)),Aa=(e,t)=>t!=null?e.getById(ai(e,t)):null,Qp=e=>e.getById(ef(e)),Yi=e=>{let n=`[role=tab][data-ownedby='${CSS.escape(Gr(e))}']:not([disabled])`;return Fe(Nw(e),n)},Dw=e=>lt(Yi(e)),Lw=e=>mt(Yi(e)),Mw=(e,t)=>yi(Yi(e),ai(e,t.value),t.loopFocus),Fw=(e,t)=>bi(Yi(e),ai(e,t.value),t.loopFocus),tf=e=>{var t,n,i,r;return{x:(t=e==null?void 0:e.offsetLeft)!=null?t:0,y:(n=e==null?void 0:e.offsetTop)!=null?n:0,width:(i=e==null?void 0:e.offsetWidth)!=null?i:0,height:(r=e==null?void 0:e.offsetHeight)!=null?r:0}},$w=(e,t)=>{let n=so(Yi(e),ai(e,t));return tf(n)};({createMachine:Bw}=dt()),_w=Bw({props({props:e}){return g({dir:"ltr",orientation:"horizontal",activationMode:"automatic",loopFocus:!0,composite:!0,navigate(t){mi(t.node)},defaultValue:null},e)},initialState(){return"idle"},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var i;(i=e("onValueChange"))==null||i({value:n})}})),focusedValue:t(()=>({defaultValue:e("value")||e("defaultValue"),sync:!0,onChange(n){var i;(i=e("onFocusChange"))==null||i({focusedValue:n})}})),ssr:t(()=>({defaultValue:!0})),indicatorRect:t(()=>({defaultValue:null}))}},watch({context:e,prop:t,track:n,action:i}){n([()=>e.get("value")],()=>{i(["syncIndicatorRect","syncTabIndex","navigateIfNeeded"])}),n([()=>t("dir"),()=>t("orientation")],()=>{i(["syncIndicatorRect"])})},on:{SET_VALUE:{actions:["setValue"]},CLEAR_VALUE:{actions:["clearValue"]},SET_INDICATOR_RECT:{actions:["setIndicatorRect"]},SYNC_TAB_INDEX:{actions:["syncTabIndex"]}},entry:["syncIndicatorRect","syncTabIndex","syncSsr"],exit:["cleanupObserver"],states:{idle:{on:{TAB_FOCUS:{target:"focused",actions:["setFocusedValue"]},TAB_CLICK:{target:"focused",actions:["setFocusedValue","setValue"]}}},focused:{on:{TAB_CLICK:{actions:["setFocusedValue","setValue"]},ARROW_PREV:[{guard:"selectOnFocus",actions:["focusPrevTab","selectFocusedTab"]},{actions:["focusPrevTab"]}],ARROW_NEXT:[{guard:"selectOnFocus",actions:["focusNextTab","selectFocusedTab"]},{actions:["focusNextTab"]}],HOME:[{guard:"selectOnFocus",actions:["focusFirstTab","selectFocusedTab"]},{actions:["focusFirstTab"]}],END:[{guard:"selectOnFocus",actions:["focusLastTab","selectFocusedTab"]},{actions:["focusLastTab"]}],TAB_FOCUS:{actions:["setFocusedValue"]},TAB_BLUR:{target:"idle",actions:["clearFocusedValue"]}}}},implementations:{guards:{selectOnFocus:({prop:e})=>e("activationMode")==="automatic"},actions:{selectFocusedTab({context:e,prop:t}){H(()=>{let n=e.get("focusedValue");if(!n)return;let r=t("deselectable")&&e.get("value")===n?null:n;e.set("value",r)})},setFocusedValue({context:e,event:t,flush:n}){t.value!=null&&n(()=>{e.set("focusedValue",t.value)})},clearFocusedValue({context:e}){e.set("focusedValue",null)},setValue({context:e,event:t,prop:n}){let i=n("deselectable")&&e.get("value")===e.get("focusedValue");e.set("value",i?null:t.value)},clearValue({context:e}){e.set("value",null)},focusFirstTab({scope:e}){H(()=>{var t;(t=Dw(e))==null||t.focus()})},focusLastTab({scope:e}){H(()=>{var t;(t=Lw(e))==null||t.focus()})},focusNextTab({context:e,prop:t,scope:n,event:i}){var a;let r=(a=i.value)!=null?a:e.get("focusedValue");if(!r)return;let s=Mw(n,{value:r,loopFocus:t("loopFocus")});H(()=>{t("composite")?s==null||s.focus():(s==null?void 0:s.dataset.value)!=null&&e.set("focusedValue",s.dataset.value)})},focusPrevTab({context:e,prop:t,scope:n,event:i}){var a;let r=(a=i.value)!=null?a:e.get("focusedValue");if(!r)return;let s=Fw(n,{value:r,loopFocus:t("loopFocus")});H(()=>{t("composite")?s==null||s.focus():(s==null?void 0:s.dataset.value)!=null&&e.set("focusedValue",s.dataset.value)})},syncTabIndex({context:e,scope:t}){H(()=>{let n=e.get("value");if(!n)return;let i=Rw(t,n);if(!i)return;ar(i).length>0?i.removeAttribute("tabindex"):i.setAttribute("tabindex","0")})},cleanupObserver({refs:e}){let t=e.get("indicatorCleanup");t&&t()},setIndicatorRect({context:e,event:t,scope:n}){var a;let i=(a=t.id)!=null?a:e.get("value");!Qp(n)||!i||!Aa(n,i)||e.set("indicatorRect",$w(n,i))},syncSsr({context:e}){e.set("ssr",!1)},syncIndicatorRect({context:e,refs:t,scope:n}){let i=t.get("indicatorCleanup");if(i&&i(),!Qp(n))return;let s=()=>{let l=Aa(n,e.get("value"));if(!l)return;let c=tf(l);e.set("indicatorRect",d=>fe(d,c)?d:c)};s();let a=Yi(n),o=At(...a.map(l=>gn.observe(l,s)));t.set("indicatorCleanup",o)},navigateIfNeeded({context:e,prop:t,scope:n}){var s;let i=e.get("value");if(!i)return;let r=Aa(n,i);st(r)&&((s=t("navigate"))==null||s({value:i,node:r,href:r.href}))}}}}),Gw=_()(["activationMode","composite","deselectable","dir","getRootNode","id","ids","loopFocus","navigate","onFocusChange","onValueChange","orientation","translations","value","defaultValue"]),rk=B(Gw),Uw=_()(["disabled","value"]),sk=B(Uw),qw=_()(["value"]),ak=B(qw),Ww=class extends K{initMachine(e){return new W(_w,e)}initApi(){return Hw(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="tabs"][data-part="root"]');if(!e)return;this.spreadProps(e,this.api.getRootProps());let t=e.querySelector('[data-scope="tabs"][data-part="list"]');if(!t)return;this.spreadProps(t,this.api.getListProps());let n=this.el.getAttribute("data-items"),i=n?JSON.parse(n):[],r=t.querySelectorAll('[data-scope="tabs"][data-part="trigger"]');for(let a=0;a{var a,o;let r=w(e,"onValueChange");r&&this.liveSocket.main.isConnected()&&t(r,{id:e.id,value:(a=i.value)!=null?a:null});let s=w(e,"onValueChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{id:e.id,value:(o=i.value)!=null?o:null}}))},onFocusChange:i=>{var a,o;let r=w(e,"onFocusChange");r&&this.liveSocket.main.isConnected()&&t(r,{id:e.id,value:(a=i.focusedValue)!=null?a:null});let s=w(e,"onFocusChangeClient");s&&e.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:{id:e.id,value:(o=i.focusedValue)!=null?o:null}}))}}));n.init(),this.tabs=n,this.onSetValue=i=>{let{value:r}=i.detail;n.api.setValue(r)},e.addEventListener("phx:tabs:set-value",this.onSetValue),this.handlers=[],this.handlers.push(this.handleEvent("tabs_set_value",i=>{let r=i.tabs_id;r&&r!==e.id||n.api.setValue(i.value)})),this.handlers.push(this.handleEvent("tabs_value",()=>{this.pushEvent("tabs_value_response",{value:n.api.value})})),this.handlers.push(this.handleEvent("tabs_focused_value",()=>{this.pushEvent("tabs_focused_value_response",{value:n.api.focusedValue})}))},updated(){var e;(e=this.tabs)==null||e.updateProps(y(g({id:this.el.id},C(this.el,"controlled")?{value:w(this.el,"value")}:{defaultValue:w(this.el,"defaultValue")}),{orientation:w(this.el,"orientation",["horizontal","vertical"]),dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(this.onSetValue&&this.el.removeEventListener("phx:tabs:set-value",this.onSetValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.tabs)==null||e.destroy()}}});var of={};he(of,{Timer:()=>rV});function Xw(e,t){let{state:n,send:i,computed:r,scope:s}=e,a=n.matches("running"),o=n.matches("paused"),l=r("time"),c=r("formattedTime"),d=r("progressPercent");return{running:a,paused:o,time:l,formattedTime:c,progressPercent:d,start(){i({type:"START"})},pause(){i({type:"PAUSE"})},resume(){i({type:"RESUME"})},reset(){i({type:"RESET"})},restart(){i({type:"RESTART"})},getRootProps(){return t.element(g({id:Yw(s)},Rn.root.attrs))},getAreaProps(){return t.element(g({role:"timer",id:jw(s),"aria-label":`${l.days} days ${c.hours}:${c.minutes}:${c.seconds}`,"aria-atomic":!0},Rn.area.attrs))},getControlProps(){return t.element(g({},Rn.control.attrs))},getItemProps(h){let m=l[h.type];return t.element(y(g({},Rn.item.attrs),{"data-type":h.type,style:{"--value":m}}))},getItemLabelProps(h){return t.element(y(g({},Rn.itemLabel.attrs),{"data-type":h.type}))},getItemValueProps(h){return t.element(y(g({},Rn.itemValue.attrs),{"data-type":h.type}))},getSeparatorProps(){return t.element(g({"aria-hidden":!0},Rn.separator.attrs))},getActionTriggerProps(h){if(!sf.has(h.action))throw new Error(`[zag-js] Invalid action: ${h.action}. Must be one of: ${Array.from(sf).join(", ")}`);return t.button(y(g({},Rn.actionTrigger.attrs),{hidden:Ce(h.action,{start:()=>a||o,pause:()=>!a,reset:()=>!a&&!o,resume:()=>!o,restart:()=>!1}),type:"button",onClick(m){m.defaultPrevented||i({type:h.action.toUpperCase()})}}))}}}function Jw(e){let t=Math.max(0,e),n=t%1e3,i=Math.floor(t/1e3)%60,r=Math.floor(t/(1e3*60))%60,s=Math.floor(t/(1e3*60*60))%24;return{days:Math.floor(t/(1e3*60*60*24)),hours:s,minutes:r,seconds:i,milliseconds:n}}function af(e,t,n){let i=n-t;return i===0?0:(e-t)/i}function Ur(e,t=2){return e.toString().padStart(t,"0")}function Qw(e,t){return Math.floor(e/t)*t}function eV(e){let{days:t,hours:n,minutes:i,seconds:r}=e;return{days:Ur(t),hours:Ur(n),minutes:Ur(i),seconds:Ur(r),milliseconds:Ur(e.milliseconds,3)}}function tV(e){let{startMs:t,targetMs:n,countdown:i,interval:r}=e;if(r!=null&&(typeof r!="number"||r<=0))throw new Error(`[timer] Invalid interval: ${r}. Must be a positive number.`);if(t!=null&&(typeof t!="number"||t<0))throw new Error(`[timer] Invalid startMs: ${t}. Must be a non-negative number.`);if(n!=null&&(typeof n!="number"||n<0))throw new Error(`[timer] Invalid targetMs: ${n}. Must be a non-negative number.`);if(i&&t!=null&&n!=null&&t<=n)throw new Error(`[timer] Invalid countdown configuration: startMs (${t}) must be greater than targetMs (${n}).`);if(!i&&t!=null&&n!=null&&t>=n)throw new Error(`[timer] Invalid stopwatch configuration: startMs (${t}) must be less than targetMs (${n}).`);if(i&&n==null&&t!=null&&t<=0)throw new Error(`[timer] Invalid countdown configuration: startMs (${t}) must be greater than 0 when no targetMs is provided.`)}var zw,Rn,Yw,jw,sf,Zw,nV,dk,iV,rV,lf=re(()=>{"use strict";se();zw=U("timer").parts("root","area","control","item","itemValue","itemLabel","actionTrigger","separator"),Rn=zw.build(),Yw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`timer:${e.id}:root`},jw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.area)!=null?n:`timer:${e.id}:area`},sf=new Set(["start","pause","resume","reset","restart"]);Zw={props({props:e}){return tV(e),g({interval:1e3,startMs:0},e)},initialState({prop:e}){return e("autoStart")?"running":"idle"},context({prop:e,bindable:t}){return{currentMs:t(()=>({defaultValue:e("startMs")}))}},watch({track:e,send:t,prop:n}){e([()=>n("startMs")],()=>{t({type:"RESTART"})})},on:{RESTART:{target:"running:temp",actions:["resetTime"]}},computed:{time:({context:e})=>Jw(e.get("currentMs")),formattedTime:({computed:e})=>eV(e("time")),progressPercent:Bn(({context:e,prop:t})=>[e.get("currentMs"),t("targetMs"),t("startMs"),t("countdown")],([e,t=0,n,i])=>{let r=i?af(e,t,n):af(e,n,t);return He(r,0,1)})},states:{idle:{on:{START:{target:"running"},RESET:{actions:["resetTime"]}}},"running:temp":{effects:["waitForNextTick"],on:{CONTINUE:{target:"running"}}},running:{effects:["keepTicking"],on:{PAUSE:{target:"paused"},TICK:[{target:"idle",guard:"hasReachedTarget",actions:["invokeOnComplete"]},{actions:["updateTime","invokeOnTick"]}],RESET:{actions:["resetTime"]}}},paused:{on:{RESUME:{target:"running"},RESET:{target:"idle",actions:["resetTime"]}}}},implementations:{effects:{keepTicking({prop:e,send:t}){return sd(({deltaMs:n})=>{t({type:"TICK",deltaMs:n})},e("interval"))},waitForNextTick({send:e}){return mn(()=>{e({type:"CONTINUE"})},0)}},actions:{updateTime({context:e,prop:t,event:n}){let i=t("countdown")?-1:1,r=Qw(n.deltaMs,t("interval"));e.set("currentMs",s=>{let a=s+i*r,o=t("targetMs");return o==null&&t("countdown")&&(o=0),t("countdown")&&o!=null?Math.max(a,o):!t("countdown")&&o!=null?Math.min(a,o):a})},resetTime({context:e,prop:t}){var i;let n=t("targetMs");n==null&&t("countdown")&&(n=0),e.set("currentMs",(i=t("startMs"))!=null?i:0)},invokeOnTick({context:e,prop:t,computed:n}){var i;(i=t("onTick"))==null||i({value:e.get("currentMs"),time:n("time"),formattedTime:n("formattedTime")})},invokeOnComplete({prop:e}){var t;(t=e("onComplete"))==null||t()}},guards:{hasReachedTarget:({context:e,prop:t})=>{let n=t("targetMs");if(n==null&&t("countdown")&&(n=0),n==null)return!1;let i=e.get("currentMs");return t("countdown")?i<=n:i>=n}}}};nV=_()(["autoStart","countdown","getRootNode","id","ids","interval","onComplete","onTick","startMs","targetMs"]),dk=B(nV),iV=class extends K{constructor(){super(...arguments);Y(this,"init",()=>{this.machine.subscribe(()=>{this.api=this.initApi(),this.render()}),this.machine.start(),this.api=this.initApi(),this.render()})}initMachine(t){return new W(Zw,t)}initApi(){return Xw(this.machine.service,q)}render(){var a;let t=(a=this.el.querySelector('[data-scope="timer"][data-part="root"]'))!=null?a:this.el;this.spreadProps(t,this.api.getRootProps());let n=this.el.querySelector('[data-scope="timer"][data-part="area"]');n&&this.spreadProps(n,this.api.getAreaProps());let i=this.el.querySelector('[data-scope="timer"][data-part="control"]');i&&this.spreadProps(i,this.api.getControlProps()),["days","hours","minutes","seconds"].forEach(o=>{let l=this.el.querySelector(`[data-scope="timer"][data-part="item"][data-type="${o}"]`);l&&this.spreadProps(l,this.api.getItemProps({type:o}))}),this.el.querySelectorAll('[data-scope="timer"][data-part="separator"]').forEach(o=>{this.spreadProps(o,this.api.getSeparatorProps())}),["start","pause","resume","reset"].forEach(o=>{let l=this.el.querySelector(`[data-scope="timer"][data-part="action-trigger"][data-action="${o}"]`);l&&this.spreadProps(l,this.api.getActionTriggerProps({action:o}))})}},rV={mounted(){var n;let e=this.el,t=new iV(e,{id:e.id,countdown:C(e,"countdown"),startMs:z(e,"startMs"),targetMs:z(e,"targetMs"),autoStart:C(e,"autoStart"),interval:(n=z(e,"interval"))!=null?n:1e3,onTick:i=>{let r=w(e,"onTick");r&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(r,{value:i.value,time:i.time,formattedTime:i.formattedTime,id:e.id})},onComplete:()=>{let i=w(e,"onComplete");i&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&this.pushEvent(i,{id:e.id})}});t.init(),this.timer=t,this.handlers=[]},updated(){var e,t;(t=this.timer)==null||t.updateProps({id:this.el.id,countdown:C(this.el,"countdown"),startMs:z(this.el,"startMs"),targetMs:z(this.el,"targetMs"),autoStart:C(this.el,"autoStart"),interval:(e=z(this.el,"interval"))!=null?e:1e3})},destroyed(){var e;if(this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.timer)==null||e.destroy()}}});var vf={};he(vf,{Toast:()=>VV});function Jl(e,t){var n;return(n=e!=null?e:gf[t])!=null?n:gf.DEFAULT}function cV(e,t){var v;let{prop:n,computed:i,context:r}=e,{offsets:s,gap:a}=n("store").attrs,o=r.get("heights"),l=lV(s),c=n("dir")==="rtl",d=t.replace("-start",c?"-right":"-left").replace("-end",c?"-left":"-right"),h=d.includes("right"),m=d.includes("left"),u={position:"fixed",pointerEvents:i("count")>0?void 0:"none",display:"flex",flexDirection:"column","--gap":`${a}px`,"--first-height":`${((v=o[0])==null?void 0:v.height)||0}px`,"--viewport-offset-left":l.left,"--viewport-offset-right":l.right,"--viewport-offset-top":l.top,"--viewport-offset-bottom":l.bottom,zIndex:ss},p="center";if(h&&(p="flex-end"),m&&(p="flex-start"),u.alignItems=p,d.includes("top")){let I=l.top;u.top=`max(env(safe-area-inset-top, 0px), ${I})`}if(d.includes("bottom")){let I=l.bottom;u.bottom=`max(env(safe-area-inset-bottom, 0px), ${I})`}if(!d.includes("left")){let I=l.right;u.insetInlineEnd=`calc(env(safe-area-inset-right, 0px) + ${I})`}if(!d.includes("right")){let I=l.left;u.insetInlineStart=`calc(env(safe-area-inset-left, 0px) + ${I})`}return u}function dV(e,t){let{prop:n,context:i,computed:r}=e,s=n("parent"),a=s.computed("placement"),{gap:o}=s.prop("store").attrs,[l]=a.split("-"),c=i.get("mounted"),d=i.get("remainingTime"),h=r("height"),m=r("frontmost"),u=!m,p=!n("stacked"),v=n("stacked"),T=n("type")==="loading"?Number.MAX_SAFE_INTEGER:d,O=r("heightIndex")*o+r("heightBefore"),b={position:"absolute",pointerEvents:"auto","--opacity":"0","--remove-delay":`${n("removeDelay")}ms`,"--duration":`${T}ms`,"--initial-height":`${h}px`,"--offset":`${O}px`,"--index":n("index"),"--z-index":r("zIndex"),"--lift-amount":"calc(var(--lift) * var(--gap))","--y":"100%","--x":"0"},f=S=>Object.assign(b,S);return l==="top"?f({top:"0","--sign":"-1","--y":"-100%","--lift":"1"}):l==="bottom"&&f({bottom:"0","--sign":"1","--y":"100%","--lift":"-1"}),c&&(f({"--y":"0","--opacity":"1"}),v&&f({"--y":"calc(var(--lift) * var(--offset))","--height":"var(--initial-height)"})),t||f({"--opacity":"0",pointerEvents:"none"}),u&&p&&(f({"--base-scale":"var(--index) * 0.05 + 1","--y":"calc(var(--lift-amount) * var(--index))","--scale":"calc(-1 * var(--base-scale))","--height":"var(--first-height)"}),t||f({"--y":"calc(var(--sign) * 40%)"})),u&&v&&!t&&f({"--y":"calc(var(--lift) * var(--offset) + var(--lift) * -100%)"}),m&&!t&&f({"--y":"calc(var(--lift) * -100%)"}),b}function uV(e,t){let{computed:n}=e,i={position:"absolute",inset:"0",scale:"1 2",pointerEvents:t?"none":"auto"},r=s=>Object.assign(i,s);return n("frontmost")&&!t&&r({height:"calc(var(--initial-height) + 80%)"}),i}function hV(){return{position:"absolute",left:"0",height:"calc(var(--gap) + 2px)",bottom:"100%",width:"100%"}}function gV(e,t){let{context:n,prop:i,send:r,refs:s,computed:a}=e;return{getCount(){return n.get("toasts").length},getToasts(){return n.get("toasts")},getGroupProps(o={}){let{label:l="Notifications"}=o,{hotkey:c}=i("store").attrs,d=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=a("placement"),[m,u="center"]=h.split("-");return t.element(y(g({},ji.group.attrs),{dir:i("dir"),tabIndex:-1,"aria-label":`${h} ${l} ${d}`,id:aV(h),"data-placement":h,"data-side":m,"data-align":u,"aria-live":"polite",role:"region",style:cV(e,h),onMouseEnter(){s.get("ignoreMouseTimer").isActive()||r({type:"REGION.POINTER_ENTER",placement:h})},onMouseMove(){s.get("ignoreMouseTimer").isActive()||r({type:"REGION.POINTER_ENTER",placement:h})},onMouseLeave(){s.get("ignoreMouseTimer").isActive()||r({type:"REGION.POINTER_LEAVE",placement:h})},onFocus(p){r({type:"REGION.FOCUS",target:p.relatedTarget})},onBlur(p){s.get("isFocusWithin")&&!ce(p.currentTarget,p.relatedTarget)&&queueMicrotask(()=>r({type:"REGION.BLUR"}))}}))},subscribe(o){return i("store").subscribe(()=>o(n.get("toasts")))}}}function yV(e,t){let{state:n,send:i,prop:r,scope:s,context:a,computed:o}=e,l=n.hasTag("visible"),c=n.hasTag("paused"),d=a.get("mounted"),h=o("frontmost"),m=r("parent").computed("placement"),u=r("type"),p=r("stacked"),v=r("title"),I=r("description"),T=r("action"),[O,b="center"]=m.split("-");return{type:u,title:v,description:I,placement:m,visible:l,paused:c,closable:!!r("closable"),pause(){i({type:"PAUSE"})},resume(){i({type:"RESUME"})},dismiss(){i({type:"DISMISS",src:"programmatic"})},getRootProps(){return t.element(y(g({},ji.root.attrs),{dir:r("dir"),id:mf(s),"data-state":l?"open":"closed","data-type":u,"data-placement":m,"data-align":b,"data-side":O,"data-mounted":E(d),"data-paused":E(c),"data-first":E(h),"data-sibling":E(!h),"data-stack":E(p),"data-overlap":E(!p),role:"status","aria-atomic":"true","aria-describedby":I?hf(s):void 0,"aria-labelledby":v?uf(s):void 0,tabIndex:0,style:dV(e,l),onKeyDown(f){f.defaultPrevented||f.key=="Escape"&&(i({type:"DISMISS",src:"keyboard"}),f.preventDefault())}}))},getGhostBeforeProps(){return t.element({"data-ghost":"before",style:uV(e,l)})},getGhostAfterProps(){return t.element({"data-ghost":"after",style:hV()})},getTitleProps(){return t.element(y(g({},ji.title.attrs),{id:uf(s)}))},getDescriptionProps(){return t.element(y(g({},ji.description.attrs),{id:hf(s)}))},getActionTriggerProps(){return t.button(y(g({},ji.actionTrigger.attrs),{type:"button",onClick(f){var S;f.defaultPrevented||((S=T==null?void 0:T.onClick)==null||S.call(T),i({type:"DISMISS",src:"user"}))}}))},getCloseTriggerProps(){return t.button(y(g({id:oV(s)},ji.closeTrigger.attrs),{type:"button","aria-label":"Dismiss notification",onClick(f){f.defaultPrevented||i({type:"DISMISS",src:"user"})}}))}}}function pf(e,t){let{id:n,height:i}=t;e.context.set("heights",r=>r.find(a=>a.id===n)?r.map(a=>a.id===n?y(g({},a),{height:i}):a):[{id:n,height:i},...r])}function PV(e={}){let t=IV(e,{placement:"bottom",overlap:!1,max:24,gap:16,offsets:"1rem",hotkey:["altKey","KeyT"],removeDelay:200,pauseOnPageIdle:!0}),n=[],i=[],r=new Set,s=[],a=D=>(n.push(D),()=>{let $=n.indexOf(D);n.splice($,1)}),o=D=>(n.forEach($=>$(D)),D),l=D=>{if(i.length>=t.max){s.push(D);return}o(D),i.unshift(D)},c=()=>{for(;s.length>0&&i.length{var J;let $=(J=D.id)!=null?J:`toast:${dr()}`,te=i.find(ie=>ie.id===$);return r.has($)&&r.delete($),te?i=i.map(ie=>ie.id===$?o(y(g(g({},ie),D),{id:$})):ie):l(y(g({id:$,duration:t.duration,removeDelay:t.removeDelay,type:"info"},D),{stacked:!t.overlap,gap:t.gap})),$},h=D=>(r.add(D),D?(n.forEach($=>$({id:D,dismiss:!0})),i=i.filter($=>$.id!==D),c()):(i.forEach($=>{n.forEach(te=>te({id:$.id,dismiss:!0}))}),i=[],s=[]),D);return{attrs:t,subscribe:a,create:d,update:(D,$)=>d(g({id:D},$)),remove:h,dismiss:D=>{D!=null?i=i.map($=>$.id===D?o(y(g({},$),{message:"DISMISS"})):$):i=i.map($=>o(y(g({},$),{message:"DISMISS"})))},error:D=>d(y(g({},D),{type:"error"})),success:D=>d(y(g({},D),{type:"success"})),info:D=>d(y(g({},D),{type:"info"})),warning:D=>d(y(g({},D),{type:"warning"})),loading:D=>d(y(g({},D),{type:"loading"})),getVisibleToasts:()=>i.filter(D=>!r.has(D.id)),getCount:()=>i.length,promise:(D,$,te={})=>{if(!$||!$.loading){zt("[zag-js > toast] toaster.promise() requires at least a 'loading' option to be specified");return}let J=d(y(g(g({},te),$.loading),{promise:D,type:"loading"})),ie=!0,Q,Se=Kt(D).then(ne=>Ve(null,null,function*(){if(Q=["resolve",ne],CV(ne)&&!ne.ok){ie=!1;let Ie=Kt($.error,`HTTP Error! status: ${ne.status}`);d(y(g(g({},te),Ie),{id:J,type:"error"}))}else if($.success!==void 0){ie=!1;let Ie=Kt($.success,ne);d(y(g(g({},te),Ie),{id:J,type:"success"}))}})).catch(ne=>Ve(null,null,function*(){if(Q=["reject",ne],$.error!==void 0){ie=!1;let Ie=Kt($.error,ne);d(y(g(g({},te),Ie),{id:J,type:"error"}))}})).finally(()=>{var ne;ie&&h(J),(ne=$.finally)==null||ne.call($)});return{id:J,unwrap:()=>new Promise((ne,Ie)=>Se.then(()=>Q[0]==="reject"?Ie(Q[1]):ne(Q[1])).catch(Ie))}},pause:D=>{D!=null?i=i.map($=>$.id===D?o(y(g({},$),{message:"PAUSE"})):$):i=i.map($=>o(y(g({},$),{message:"PAUSE"})))},resume:D=>{D!=null?i=i.map($=>$.id===D?o(y(g({},$),{message:"RESUME"})):$):i=i.map($=>o(y(g({},$),{message:"RESUME"})))},isVisible:D=>!r.has(D)&&!!i.find($=>$.id===D),isDismissed:D=>r.has(D),expand:()=>{i=i.map(D=>o(y(g({},D),{stacked:!0})))},collapse:()=>{i=i.map(D=>o(y(g({},D),{stacked:!1})))}}}function wV(e,t){var s,a,o;let n=(s=t==null?void 0:t.id)!=null?s:Mn(e,"toast"),i=(o=t==null?void 0:t.store)!=null?o:PV({placement:(a=t==null?void 0:t.placement)!=null?a:"bottom",overlap:t==null?void 0:t.overlap,max:t==null?void 0:t.max,gap:t==null?void 0:t.gap,offsets:t==null?void 0:t.offsets,pauseOnPageIdle:t==null?void 0:t.pauseOnPageIdle}),r=new OV(e,{id:n,store:i});return r.init(),SV.set(n,r),Ql.set(n,i),e.dataset.toastGroup="true",e.dataset.toastGroupId=n,{group:r,store:i}}function qr(e){if(e)return Ql.get(e);let t=document.querySelector("[data-toast-group]");if(!t)return;let n=t.dataset.toastGroupId||t.id;return n?Ql.get(n):void 0}var sV,ji,aV,cf,mf,df,uf,hf,oV,gf,lV,pV,fV,mV,vV,bV,EV,IV,CV,ff,SV,Ql,TV,OV,VV,yf=re(()=>{"use strict";Wn();tn();se();sV=U("toast").parts("group","root","title","description","actionTrigger","closeTrigger"),ji=sV.build(),aV=e=>`toast-group:${e}`,cf=(e,t)=>e.getById(`toast-group:${t}`),mf=e=>`toast:${e.id}`,df=e=>e.getById(mf(e)),uf=e=>`toast:${e.id}:title`,hf=e=>`toast:${e.id}:description`,oV=e=>`toast${e.id}:close`,gf={info:5e3,error:5e3,success:2e3,loading:1/0,DEFAULT:5e3};lV=e=>typeof e=="string"?{left:e,right:e,bottom:e,top:e}:e;({guards:pV,createMachine:fV}=dt()),{and:mV}=pV,vV=fV({props({props:e}){return y(g({dir:"ltr",id:dr()},e),{store:e.store})},initialState({prop:e}){return e("store").attrs.overlap?"overlap":"stack"},refs(){return{lastFocusedEl:null,isFocusWithin:!1,isPointerWithin:!1,ignoreMouseTimer:eo.create(),dismissableCleanup:void 0}},context({bindable:e}){return{toasts:e(()=>({defaultValue:[],sync:!0,hash:t=>t.map(n=>n.id).join(",")})),heights:e(()=>({defaultValue:[],sync:!0}))}},computed:{count:({context:e})=>e.get("toasts").length,overlap:({prop:e})=>e("store").attrs.overlap,placement:({prop:e})=>e("store").attrs.placement},effects:["subscribeToStore","trackDocumentVisibility","trackHotKeyPress"],watch({track:e,context:t,action:n}){e([()=>t.hash("toasts")],()=>{queueMicrotask(()=>{n(["collapsedIfEmpty","setDismissableBranch"])})})},exit:["clearDismissableBranch","clearLastFocusedEl","clearMouseEventTimer"],on:{"DOC.HOTKEY":{actions:["focusRegionEl"]},"REGION.BLUR":[{guard:mV("isOverlapping","isPointerOut"),target:"overlap",actions:["collapseToasts","resumeToasts","restoreFocusIfPointerOut"]},{guard:"isPointerOut",target:"stack",actions:["resumeToasts","restoreFocusIfPointerOut"]},{actions:["clearFocusWithin"]}],"TOAST.REMOVE":{actions:["removeToast","removeHeight","ignoreMouseEventsTemporarily"]},"TOAST.PAUSE":{actions:["pauseToasts"]}},states:{stack:{on:{"REGION.POINTER_LEAVE":[{guard:"isOverlapping",target:"overlap",actions:["clearPointerWithin","resumeToasts","collapseToasts"]},{actions:["clearPointerWithin","resumeToasts"]}],"REGION.OVERLAP":{target:"overlap",actions:["collapseToasts"]},"REGION.FOCUS":{actions:["setLastFocusedEl","pauseToasts"]},"REGION.POINTER_ENTER":{actions:["setPointerWithin","pauseToasts"]}}},overlap:{on:{"REGION.STACK":{target:"stack",actions:["expandToasts"]},"REGION.POINTER_ENTER":{target:"stack",actions:["setPointerWithin","pauseToasts","expandToasts"]},"REGION.FOCUS":{target:"stack",actions:["setLastFocusedEl","pauseToasts","expandToasts"]}}}},implementations:{guards:{isOverlapping:({computed:e})=>e("overlap"),isPointerOut:({refs:e})=>!e.get("isPointerWithin")},effects:{subscribeToStore({context:e,prop:t}){let n=t("store");return e.set("toasts",n.getVisibleToasts()),n.subscribe(i=>{if(i.dismiss){e.set("toasts",r=>r.filter(s=>s.id!==i.id));return}e.set("toasts",r=>{let s=r.findIndex(a=>a.id===i.id);return s!==-1?[...r.slice(0,s),g(g({},r[s]),i),...r.slice(s+1)]:[i,...r]})})},trackHotKeyPress({prop:e,send:t}){return ee(document,"keydown",i=>{let{hotkey:r}=e("store").attrs;r.every(a=>i[a]||i.code===a)&&t({type:"DOC.HOTKEY"})},{capture:!0})},trackDocumentVisibility({prop:e,send:t,scope:n}){let{pauseOnPageIdle:i}=e("store").attrs;if(!i)return;let r=n.getDoc();return ee(r,"visibilitychange",()=>{let s=r.visibilityState==="hidden";t({type:s?"PAUSE_ALL":"RESUME_ALL"})})}},actions:{setDismissableBranch({refs:e,context:t,computed:n,scope:i}){var c;let r=t.get("toasts"),s=n("placement"),a=r.length>0;if(!a){(c=e.get("dismissableCleanup"))==null||c();return}if(a&&e.get("dismissableCleanup"))return;let l=Wu(()=>cf(i,s),{defer:!0});e.set("dismissableCleanup",l)},clearDismissableBranch({refs:e}){var t;(t=e.get("dismissableCleanup"))==null||t()},focusRegionEl({scope:e,computed:t}){queueMicrotask(()=>{var n;(n=cf(e,t("placement")))==null||n.focus()})},pauseToasts({prop:e}){e("store").pause()},resumeToasts({prop:e}){e("store").resume()},expandToasts({prop:e}){e("store").expand()},collapseToasts({prop:e}){e("store").collapse()},removeToast({prop:e,event:t}){e("store").remove(t.id)},removeHeight({event:e,context:t}){(e==null?void 0:e.id)!=null&&queueMicrotask(()=>{t.set("heights",n=>n.filter(i=>i.id!==e.id))})},collapsedIfEmpty({send:e,computed:t}){!t("overlap")||t("count")>1||e({type:"REGION.OVERLAP"})},setLastFocusedEl({refs:e,event:t}){e.get("isFocusWithin")||!t.target||(e.set("isFocusWithin",!0),e.set("lastFocusedEl",t.target))},restoreFocusIfPointerOut({refs:e}){var t;!e.get("lastFocusedEl")||e.get("isPointerWithin")||((t=e.get("lastFocusedEl"))==null||t.focus({preventScroll:!0}),e.set("lastFocusedEl",null),e.set("isFocusWithin",!1))},setPointerWithin({refs:e}){e.set("isPointerWithin",!0)},clearPointerWithin({refs:e}){var t;e.set("isPointerWithin",!1),e.get("lastFocusedEl")&&!e.get("isFocusWithin")&&((t=e.get("lastFocusedEl"))==null||t.focus({preventScroll:!0}),e.set("lastFocusedEl",null))},clearFocusWithin({refs:e}){e.set("isFocusWithin",!1)},clearLastFocusedEl({refs:e}){var t;e.get("lastFocusedEl")&&((t=e.get("lastFocusedEl"))==null||t.focus({preventScroll:!0}),e.set("lastFocusedEl",null),e.set("isFocusWithin",!1))},ignoreMouseEventsTemporarily({refs:e}){e.get("ignoreMouseTimer").request()},clearMouseEventTimer({refs:e}){e.get("ignoreMouseTimer").cancel()}}}});({not:bV}=Ee()),EV={props({props:e}){return yn(e,["id","type","parent","removeDelay"],"toast"),y(g({closable:!0},e),{duration:Jl(e.duration,e.type)})},initialState({prop:e}){return e("type")==="loading"||e("duration")===1/0?"visible:persist":"visible"},context({prop:e,bindable:t}){return{remainingTime:t(()=>({defaultValue:Jl(e("duration"),e("type"))})),createdAt:t(()=>({defaultValue:Date.now()})),mounted:t(()=>({defaultValue:!1})),initialHeight:t(()=>({defaultValue:0}))}},refs(){return{closeTimerStartTime:Date.now(),lastCloseStartTimerStartTime:0}},computed:{zIndex:({prop:e})=>{let t=e("parent").context.get("toasts"),n=t.findIndex(i=>i.id===e("id"));return t.length-n},height:({prop:e})=>{var i;let n=e("parent").context.get("heights").find(r=>r.id===e("id"));return(i=n==null?void 0:n.height)!=null?i:0},heightIndex:({prop:e})=>e("parent").context.get("heights").findIndex(n=>n.id===e("id")),frontmost:({prop:e})=>e("index")===0,heightBefore:({prop:e})=>{let t=e("parent").context.get("heights"),n=t.findIndex(i=>i.id===e("id"));return t.reduce((i,r,s)=>s>=n?i:i+r.height,0)},shouldPersist:({prop:e})=>e("type")==="loading"||e("duration")===1/0},watch({track:e,prop:t,send:n}){e([()=>t("message")],()=>{let i=t("message");i&&n({type:i,src:"programmatic"})}),e([()=>t("type"),()=>t("duration")],()=>{n({type:"UPDATE"})})},on:{UPDATE:[{guard:"shouldPersist",target:"visible:persist",actions:["resetCloseTimer"]},{target:"visible:updating",actions:["resetCloseTimer"]}],MEASURE:{actions:["measureHeight"]}},entry:["setMounted","measureHeight","invokeOnVisible"],effects:["trackHeight"],states:{"visible:updating":{tags:["visible","updating"],effects:["waitForNextTick"],on:{SHOW:{target:"visible"}}},"visible:persist":{tags:["visible","paused"],on:{RESUME:{guard:bV("isLoadingType"),target:"visible",actions:["setCloseTimer"]},DISMISS:{target:"dismissing"}}},visible:{tags:["visible"],effects:["waitForDuration"],on:{DISMISS:{target:"dismissing"},PAUSE:{target:"visible:persist",actions:["syncRemainingTime"]}}},dismissing:{entry:["invokeOnDismiss"],effects:["waitForRemoveDelay"],on:{REMOVE:{target:"unmounted",actions:["notifyParentToRemove"]}}},unmounted:{entry:["invokeOnUnmount"]}},implementations:{effects:{waitForRemoveDelay({prop:e,send:t}){return mn(()=>{t({type:"REMOVE",src:"timer"})},e("removeDelay"))},waitForDuration({send:e,context:t,computed:n}){if(!n("shouldPersist"))return mn(()=>{e({type:"DISMISS",src:"timer"})},t.get("remainingTime"))},waitForNextTick({send:e}){return mn(()=>{e({type:"SHOW",src:"timer"})},0)},trackHeight({scope:e,prop:t}){let n;return H(()=>{let i=df(e);if(!i)return;let r=()=>{let o=i.style.height;i.style.height="auto";let l=i.getBoundingClientRect().height;i.style.height=o;let c={id:t("id"),height:l};pf(t("parent"),c)},s=e.getWin(),a=new s.MutationObserver(r);a.observe(i,{childList:!0,subtree:!0,characterData:!0}),n=()=>a.disconnect()}),()=>n==null?void 0:n()}},guards:{isLoadingType:({prop:e})=>e("type")==="loading",shouldPersist:({computed:e})=>e("shouldPersist")},actions:{setMounted({context:e}){H(()=>{e.set("mounted",!0)})},measureHeight({scope:e,prop:t,context:n}){queueMicrotask(()=>{let i=df(e);if(!i)return;let r=i.style.height;i.style.height="auto";let s=i.getBoundingClientRect().height;i.style.height=r,n.set("initialHeight",s);let a={id:t("id"),height:s};pf(t("parent"),a)})},setCloseTimer({refs:e}){e.set("closeTimerStartTime",Date.now())},resetCloseTimer({context:e,refs:t,prop:n}){t.set("closeTimerStartTime",Date.now()),e.set("remainingTime",Jl(n("duration"),n("type")))},syncRemainingTime({context:e,refs:t}){e.set("remainingTime",n=>{let i=t.get("closeTimerStartTime"),r=Date.now()-i;return t.set("lastCloseStartTimerStartTime",Date.now()),n-r})},notifyParentToRemove({prop:e}){e("parent").send({type:"TOAST.REMOVE",id:e("id")})},invokeOnDismiss({prop:e,event:t}){var n;(n=e("onStatusChange"))==null||n({status:"dismissing",src:t.src})},invokeOnUnmount({prop:e}){var t;(t=e("onStatusChange"))==null||t({status:"unmounted"})},invokeOnVisible({prop:e}){var t;(t=e("onStatusChange"))==null||t({status:"visible"})}}}};IV=(e,t)=>g(g({},t),Si(e));CV=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",ff={connect:gV,machine:vV},SV=new Map,Ql=new Map,TV=class extends K{constructor(t,n){super(t,n);Y(this,"parts");Y(this,"duration");Y(this,"destroy",()=>{this.machine.stop(),this.el.remove()});this.duration=n.duration,this.el.setAttribute("data-scope","toast"),this.el.setAttribute("data-part","root"),this.el.innerHTML=`
@@ -22,4 +22,4 @@ - `,this.parts={title:this.el.querySelector('[data-scope="toast"][data-part="title"]'),description:this.el.querySelector('[data-scope="toast"][data-part="description"]'),close:this.el.querySelector('[data-scope="toast"][data-part="close-trigger"]'),ghostBefore:this.el.querySelector('[data-scope="toast"][data-part="ghost-before"]'),ghostAfter:this.el.querySelector('[data-scope="toast"][data-part="ghost-after"]'),progressbar:this.el.querySelector('[data-scope="toast"][data-part="progressbar"]'),loadingSpinner:this.el.querySelector('[data-scope="toast"][data-part="loading-spinner"]')}}initMachine(t){return new W(EV,t)}initApi(){return yV(this.machine.service,q)}render(){var a,o;this.spreadProps(this.el,this.api.getRootProps()),this.spreadProps(this.parts.close,this.api.getCloseTriggerProps()),this.spreadProps(this.parts.ghostBefore,this.api.getGhostBeforeProps()),this.spreadProps(this.parts.ghostAfter,this.api.getGhostAfterProps()),this.parts.title.textContent!==this.api.title&&(this.parts.title.textContent=(a=this.api.title)!=null?a:""),this.parts.description.textContent!==this.api.description&&(this.parts.description.textContent=(o=this.api.description)!=null?o:""),this.spreadProps(this.parts.title,this.api.getTitleProps()),this.spreadProps(this.parts.description,this.api.getDescriptionProps());let t=this.duration,n=t==="Infinity"||t===1/0||t===Number.POSITIVE_INFINITY,i=this.el.closest('[phx-hook="Toast"]'),r=i==null?void 0:i.querySelector("[data-loading-icon-template]"),s=r==null?void 0:r.innerHTML;n?(this.parts.progressbar.style.display="none",this.parts.loadingSpinner.style.display="flex",this.el.setAttribute("data-duration-infinity","true"),s&&this.parts.loadingSpinner.innerHTML!==s&&(this.parts.loadingSpinner.innerHTML=s)):(this.parts.progressbar.style.display="block",this.parts.loadingSpinner.style.display="none",this.el.removeAttribute("data-duration-infinity"))}},OV=class extends K{constructor(t,n){var i;super(t,n);Y(this,"toastComponents",new Map);Y(this,"groupEl");Y(this,"store");Y(this,"destroy",()=>{for(let t of this.toastComponents.values())t.destroy();this.toastComponents.clear(),this.machine.stop()});this.store=n.store,this.groupEl=(i=t.querySelector('[data-part="group"]'))!=null?i:(()=>{let r=document.createElement("div");return r.setAttribute("data-scope","toast"),r.setAttribute("data-part","group"),t.appendChild(r),r})()}initMachine(t){return new W(ff.machine,t)}initApi(){return ff.connect(this.machine.service,q)}render(){this.spreadProps(this.groupEl,this.api.getGroupProps());let t=this.api.getToasts().filter(i=>typeof i.id=="string"),n=new Set(t.map(i=>i.id));t.forEach((i,r)=>{let s=this.toastComponents.get(i.id);if(s)s.duration=i.duration,s.updateProps(y(g({},i),{parent:this.machine.service,index:r}));else{let a=document.createElement("div");a.setAttribute("data-scope","toast"),a.setAttribute("data-part","root"),this.groupEl.appendChild(a),s=new TV(a,y(g({},i),{parent:this.machine.service,index:r})),s.init(),this.toastComponents.set(i.id,s)}});for(let[i,r]of this.toastComponents)n.has(i)||(r.destroy(),this.toastComponents.delete(i))}};VV={mounted(){var h;let e=this.el;e.id||(e.id=Mn(e,"toast")),this.groupId=e.id;let t=m=>{if(m)try{return m.includes("{")?JSON.parse(m):m}catch(d){return m}},n=m=>m==="Infinity"||m===1/0?1/0:typeof m=="string"?parseInt(m,10)||void 0:m,i=(h=w(e,"placement",["top-start","top","top-end","bottom-start","bottom","bottom-end"]))!=null?h:"bottom-end";wV(e,{id:this.groupId,placement:i,overlap:C(e,"overlap"),max:z(e,"max"),gap:z(e,"gap"),offsets:t(w(e,"offset")),pauseOnPageIdle:C(e,"pauseOnPageIdle")});let r=qr(this.groupId),s=e.getAttribute("data-flash-info"),a=e.getAttribute("data-flash-info-title"),o=e.getAttribute("data-flash-error"),l=e.getAttribute("data-flash-error-title"),c=e.getAttribute("data-flash-info-duration"),u=e.getAttribute("data-flash-error-duration");if(r&&s)try{r.create({title:a||"Success",description:s,type:"info",id:Mn(void 0,"toast"),duration:n(c!=null?c:void 0)})}catch(m){console.error("Failed to create flash info toast:",m)}if(r&&o)try{r.create({title:l||"Error",description:o,type:"error",id:Mn(void 0,"toast"),duration:n(u!=null?u:void 0)})}catch(m){console.error("Failed to create flash error toast:",m)}this.handlers=[],this.handlers.push(this.handleEvent("toast-create",m=>{let d=qr(m.groupId||this.groupId);if(d)try{d.create({title:m.title,description:m.description,type:m.type||"info",id:m.id||Mn(void 0,"toast"),duration:n(m.duration)})}catch(p){console.error("Failed to create toast:",p)}})),this.handlers.push(this.handleEvent("toast-update",m=>{let d=qr(m.groupId||this.groupId);if(d)try{d.update(m.id,{title:m.title,description:m.description,type:m.type})}catch(p){console.error("Failed to update toast:",p)}})),this.handlers.push(this.handleEvent("toast-dismiss",m=>{let d=qr(m.groupId||this.groupId);if(d)try{d.dismiss(m.id)}catch(p){console.error("Failed to dismiss toast:",p)}})),e.addEventListener("toast:create",m=>{let{detail:d}=m,p=qr(d.groupId||this.groupId);if(p)try{p.create({title:d.title,description:d.description,type:d.type||"info",id:d.id||Mn(void 0,"toast"),duration:n(d.duration)})}catch(v){console.error("Failed to create toast:",v)}})},destroyed(){if(this.handlers)for(let e of this.handlers)this.removeHandleEvent(e)}}});var Cf={};he(Cf,{ToggleGroup:()=>BV});function DV(e,t){let{context:n,send:i,prop:r,scope:s}=e,a=n.get("value"),o=r("disabled"),l=!r("multiple"),c=r("rovingFocus"),u=r("orientation")==="horizontal";function h(m){let d=AV(s,m.value);return{id:d,disabled:!!(m.disabled||o),pressed:!!a.includes(m.value),focused:n.get("focusedId")===d}}return{value:a,setValue(m){i({type:"VALUE.SET",value:m})},getRootProps(){return t.element(y(g({},bf.root.attrs),{id:ka(s),dir:r("dir"),role:l?"radiogroup":"group",tabIndex:n.get("isTabbingBackward")?-1:0,"data-disabled":E(o),"data-orientation":r("orientation"),"data-focus":E(n.get("focusedId")!=null),style:{outline:"none"},onMouseDown(){o||i({type:"ROOT.MOUSE_DOWN"})},onFocus(m){o||m.currentTarget===j(m)&&(n.get("isClickFocus")||n.get("isTabbingBackward")||i({type:"ROOT.FOCUS"}))},onBlur(m){let d=m.relatedTarget;ce(m.currentTarget,d)||o||i({type:"ROOT.BLUR"})}}))},getItemState:h,getItemProps(m){let d=h(m),p=d.focused?0:-1;return t.button(y(g({},bf.item.attrs),{id:d.id,type:"button","data-ownedby":ka(s),"data-focus":E(d.focused),disabled:d.disabled,tabIndex:c?p:void 0,role:l?"radio":void 0,"aria-checked":l?d.pressed:void 0,"aria-pressed":l?void 0:d.pressed,"data-disabled":E(d.disabled),"data-orientation":r("orientation"),dir:r("dir"),"data-state":d.pressed?"on":"off",onFocus(){d.disabled||i({type:"TOGGLE.FOCUS",id:d.id})},onClick(v){d.disabled||(i({type:"TOGGLE.CLICK",id:d.id,value:m.value}),Xe()&&v.currentTarget.focus({preventScroll:!0}))},onKeyDown(v){if(v.defaultPrevented||!ce(v.currentTarget,j(v))||d.disabled)return;let T={Tab(O){let b=O.shiftKey;i({type:"TOGGLE.SHIFT_TAB",isShiftTab:b})},ArrowLeft(){!c||!u||i({type:"TOGGLE.FOCUS_PREV"})},ArrowRight(){!c||!u||i({type:"TOGGLE.FOCUS_NEXT"})},ArrowUp(){!c||u||i({type:"TOGGLE.FOCUS_PREV"})},ArrowDown(){!c||u||i({type:"TOGGLE.FOCUS_NEXT"})},Home(){c&&i({type:"TOGGLE.FOCUS_FIRST"})},End(){c&&i({type:"TOGGLE.FOCUS_LAST"})}}[ge(v)];T&&(T(v),v.key!=="Tab"&&v.preventDefault())}}))}}}var xV,bf,ka,AV,Pf,Na,Ef,kV,NV,RV,If,LV,MV,FV,Ek,$V,Ik,HV,BV,Sf=re(()=>{"use strict";se();xV=U("toggle-group").parts("root","item"),bf=xV.build(),ka=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`toggle-group:${e.id}`},AV=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`toggle-group:${e.id}:${t}`},Pf=e=>e.getById(ka(e)),Na=e=>{let n=`[data-ownedby='${CSS.escape(ka(e))}']:not([data-disabled])`;return Fe(Pf(e),n)},Ef=e=>lt(Na(e)),kV=e=>mt(Na(e)),NV=(e,t,n)=>yi(Na(e),t,n),RV=(e,t,n)=>bi(Na(e),t,n);({not:If,and:LV}=Ee()),MV={props({props:e}){return g({defaultValue:[],orientation:"horizontal",rovingFocus:!0,loopFocus:!0,deselectable:!0},e)},initialState(){return"idle"},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var i;(i=e("onValueChange"))==null||i({value:n})}})),focusedId:t(()=>({defaultValue:null})),isTabbingBackward:t(()=>({defaultValue:!1})),isClickFocus:t(()=>({defaultValue:!1})),isWithinToolbar:t(()=>({defaultValue:!1}))}},computed:{currentLoopFocus:({context:e,prop:t})=>t("loopFocus")&&!e.get("isWithinToolbar")},entry:["checkIfWithinToolbar"],on:{"VALUE.SET":{actions:["setValue"]},"TOGGLE.CLICK":{actions:["setValue"]},"ROOT.MOUSE_DOWN":{actions:["setClickFocus"]}},states:{idle:{on:{"ROOT.FOCUS":{target:"focused",guard:If(LV("isClickFocus","isTabbingBackward")),actions:["focusFirstToggle","clearClickFocus"]},"TOGGLE.FOCUS":{target:"focused",actions:["setFocusedId"]}}},focused:{on:{"ROOT.BLUR":{target:"idle",actions:["clearIsTabbingBackward","clearFocusedId","clearClickFocus"]},"TOGGLE.FOCUS":{actions:["setFocusedId"]},"TOGGLE.FOCUS_NEXT":{actions:["focusNextToggle"]},"TOGGLE.FOCUS_PREV":{actions:["focusPrevToggle"]},"TOGGLE.FOCUS_FIRST":{actions:["focusFirstToggle"]},"TOGGLE.FOCUS_LAST":{actions:["focusLastToggle"]},"TOGGLE.SHIFT_TAB":[{guard:If("isFirstToggleFocused"),target:"idle",actions:["setIsTabbingBackward"]},{actions:["setIsTabbingBackward"]}]}}},implementations:{guards:{isClickFocus:({context:e})=>e.get("isClickFocus"),isTabbingBackward:({context:e})=>e.get("isTabbingBackward"),isFirstToggleFocused:({context:e,scope:t})=>{var n;return e.get("focusedId")===((n=Ef(t))==null?void 0:n.id)}},actions:{setIsTabbingBackward({context:e}){e.set("isTabbingBackward",!0)},clearIsTabbingBackward({context:e}){e.set("isTabbingBackward",!1)},setClickFocus({context:e}){e.set("isClickFocus",!0)},clearClickFocus({context:e}){e.set("isClickFocus",!1)},checkIfWithinToolbar({context:e,scope:t}){var i;let n=(i=Pf(t))==null?void 0:i.closest("[role=toolbar]");e.set("isWithinToolbar",!!n)},setFocusedId({context:e,event:t}){e.set("focusedId",t.id)},clearFocusedId({context:e}){e.set("focusedId",null)},setValue({context:e,event:t,prop:n}){yn(t,["value"]);let i=e.get("value");pn(t.value)?i=t.value:n("multiple")?i=yt(i,t.value):i=fe(i,[t.value])&&n("deselectable")?[]:[t.value],e.set("value",i)},focusNextToggle({context:e,scope:t,prop:n}){H(()=>{var r;let i=e.get("focusedId");i&&((r=NV(t,i,n("loopFocus")))==null||r.focus({preventScroll:!0}))})},focusPrevToggle({context:e,scope:t,prop:n}){H(()=>{var r;let i=e.get("focusedId");i&&((r=RV(t,i,n("loopFocus")))==null||r.focus({preventScroll:!0}))})},focusFirstToggle({scope:e}){H(()=>{var t;(t=Ef(e))==null||t.focus({preventScroll:!0})})},focusLastToggle({scope:e}){H(()=>{var t;(t=kV(e))==null||t.focus({preventScroll:!0})})}}}},FV=_()(["dir","disabled","getRootNode","id","ids","loopFocus","multiple","onValueChange","orientation","rovingFocus","value","defaultValue","deselectable"]),Ek=B(FV),$V=_()(["value","disabled"]),Ik=B($V),HV=class extends K{initMachine(e){return new W(MV,e)}initApi(){return DV(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="toggle-group"][data-part="root"]');if(!e)return;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelectorAll('[data-scope="toggle-group"][data-part="item"]');for(let n=0;n{let s=w(e,"onValueChange");s&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&t(s,{value:r.value,id:e.id});let a=w(e,"onValueChangeClient");a&&e.dispatchEvent(new CustomEvent(a,{bubbles:!0,detail:{value:r.value,id:e.id}}))}}),i=new HV(e,n);i.init(),this.toggleGroup=i,this.onSetValue=r=>{let{value:s}=r.detail;i.api.setValue(s)},e.addEventListener("phx:toggle-group:set-value",this.onSetValue),this.handlers=[],this.handlers.push(this.handleEvent("toggle-group_set_value",r=>{let s=r.id;s&&s!==e.id||i.api.setValue(r.value)})),this.handlers.push(this.handleEvent("toggle-group:value",()=>{this.pushEvent("toggle-group:value_response",{value:i.api.value})}))},updated(){var e;(e=this.toggleGroup)==null||e.updateProps(y(g({},C(this.el,"controlled")?{value:Z(this.el,"value")}:{defaultValue:Z(this.el,"defaultValue")}),{deselectable:C(this.el,"deselectable"),loopFocus:C(this.el,"loopFocus"),rovingFocus:C(this.el,"rovingFocus"),disabled:C(this.el,"disabled"),multiple:C(this.el,"multiple"),orientation:w(this.el,"orientation",["horizontal","vertical"]),dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(this.onSetValue&&this.el.removeEventListener("phx:toggle-group:set-value",this.onSetValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.toggleGroup)==null||e.destroy()}}});var xf={};he(xf,{TreeView:()=>ZV});function Vf(e,t,n){let i=e.getNodeValue(t);if(!e.isBranchNode(t))return n.includes(i);let r=e.getDescendantValues(i),s=r.every(o=>n.includes(o)),a=r.some(o=>n.includes(o));return s?!0:a?"indeterminate":!1}function UV(e,t,n){let i=e.getDescendantValues(t),r=i.every(s=>n.includes(s));return vt(r?ct(n,...i):Ze(n,...i))}function qV(e,t){let n=new Map;return e.visit({onEnter:i=>{let r=e.getNodeValue(i),s=e.isBranchNode(i),a=Vf(e,i,t);n.set(r,{type:s?"branch":"leaf",checked:a})}}),n}function WV(e,t){let{context:n,scope:i,computed:r,prop:s,send:a}=e,o=s("collection"),l=Array.from(n.get("expandedValue")),c=Array.from(n.get("selectedValue")),u=Array.from(n.get("checkedValue")),h=r("isTypingAhead"),m=n.get("focusedValue"),d=n.get("loadingStatus"),p=n.get("renamingValue"),v=({indexPath:b})=>o.getValuePath(b).slice(0,-1).some(S=>!l.includes(S)),I=o.getFirstNode(void 0,{skip:v}),T=I?o.getNodeValue(I):null;function O(b){let{node:f,indexPath:S}=b,P=o.getNodeValue(f);return{id:nc(i,P),value:P,indexPath:S,valuePath:o.getValuePath(S),disabled:!!f.disabled,focused:m==null?T===P:m===P,selected:c.includes(P),expanded:l.includes(P),loading:d[P]==="loading",depth:S.length,isBranch:o.isBranchNode(f),renaming:p===P,get checked(){return Vf(o,f,u)}}}return{collection:o,expandedValue:l,selectedValue:c,checkedValue:u,toggleChecked(b,f){a({type:"CHECKED.TOGGLE",value:b,isBranch:f})},setChecked(b){a({type:"CHECKED.SET",value:b})},clearChecked(){a({type:"CHECKED.CLEAR"})},getCheckedMap(){return qV(o,u)},expand(b){a({type:b?"BRANCH.EXPAND":"EXPANDED.ALL",value:b})},collapse(b){a({type:b?"BRANCH.COLLAPSE":"EXPANDED.CLEAR",value:b})},deselect(b){a({type:b?"NODE.DESELECT":"SELECTED.CLEAR",value:b})},select(b){a({type:b?"NODE.SELECT":"SELECTED.ALL",value:b,isTrusted:!1})},getVisibleNodes(){return r("visibleNodes")},focus(b){ke(i,b)},selectParent(b){let f=o.getParentNode(b);if(!f)return;let S=Ze(c,o.getNodeValue(f));a({type:"SELECTED.SET",value:S,src:"select.parent"})},expandParent(b){let f=o.getParentNode(b);if(!f)return;let S=Ze(l,o.getNodeValue(f));a({type:"EXPANDED.SET",value:S,src:"expand.parent"})},setExpandedValue(b){let f=vt(b);a({type:"EXPANDED.SET",value:f})},setSelectedValue(b){let f=vt(b);a({type:"SELECTED.SET",value:f})},startRenaming(b){a({type:"NODE.RENAME",value:b})},submitRenaming(b,f){a({type:"RENAME.SUBMIT",value:b,label:f})},cancelRenaming(){a({type:"RENAME.CANCEL"})},getRootProps(){return t.element(y(g({},Ge.root.attrs),{id:GV(i),dir:s("dir")}))},getLabelProps(){return t.element(y(g({},Ge.label.attrs),{id:Tf(i),dir:s("dir")}))},getTreeProps(){return t.element(y(g({},Ge.tree.attrs),{id:ec(i),dir:s("dir"),role:"tree","aria-label":"Tree View","aria-labelledby":Tf(i),"aria-multiselectable":s("selectionMode")==="multiple"||void 0,tabIndex:-1,onKeyDown(b){if(b.defaultPrevented||Re(b))return;let f=j(b);if(Ot(f))return;let S=f==null?void 0:f.closest("[data-part=branch-control], [data-part=item]");if(!S)return;let P=S.dataset.value;if(P==null){console.warn("[zag-js/tree-view] Node id not found for node",S);return}let V=S.matches("[data-part=branch-control]"),A={ArrowDown(N){xe(N)||(N.preventDefault(),a({type:"NODE.ARROW_DOWN",id:P,shiftKey:N.shiftKey}))},ArrowUp(N){xe(N)||(N.preventDefault(),a({type:"NODE.ARROW_UP",id:P,shiftKey:N.shiftKey}))},ArrowLeft(N){xe(N)||S.dataset.disabled||(N.preventDefault(),a({type:V?"BRANCH_NODE.ARROW_LEFT":"NODE.ARROW_LEFT",id:P}))},ArrowRight(N){!V||S.dataset.disabled||(N.preventDefault(),a({type:"BRANCH_NODE.ARROW_RIGHT",id:P}))},Home(N){xe(N)||(N.preventDefault(),a({type:"NODE.HOME",id:P,shiftKey:N.shiftKey}))},End(N){xe(N)||(N.preventDefault(),a({type:"NODE.END",id:P,shiftKey:N.shiftKey}))},Space(N){var D;S.dataset.disabled||(h?a({type:"TREE.TYPEAHEAD",key:N.key}):(D=A.Enter)==null||D.call(A,N))},Enter(N){S.dataset.disabled||st(f)&&xe(N)||(a({type:V?"BRANCH_NODE.CLICK":"NODE.CLICK",id:P,src:"keyboard"}),st(f)||N.preventDefault())},"*"(N){S.dataset.disabled||(N.preventDefault(),a({type:"SIBLINGS.EXPAND",id:P}))},a(N){!N.metaKey||S.dataset.disabled||(N.preventDefault(),a({type:"SELECTED.ALL",moveFocus:!0}))},F2(N){if(S.dataset.disabled)return;let D=s("canRename");if(!D)return;let $=o.getIndexPath(P);if($){let te=o.at($);if(te&&!D(te,$))return}N.preventDefault(),a({type:"NODE.RENAME",value:P})}},x=ge(b,{dir:s("dir")}),k=A[x];if(k){k(b);return}Ue.isValidEvent(b)&&(a({type:"TREE.TYPEAHEAD",key:b.key,id:P}),b.preventDefault())}}))},getNodeState:O,getItemProps(b){let f=O(b);return t.element(y(g({},Ge.item.attrs),{id:f.id,dir:s("dir"),"data-ownedby":ec(i),"data-path":b.indexPath.join("/"),"data-value":f.value,tabIndex:f.focused?0:-1,"data-focus":E(f.focused),role:"treeitem","aria-current":f.selected?"true":void 0,"aria-selected":f.disabled?void 0:f.selected,"data-selected":E(f.selected),"aria-disabled":X(f.disabled),"data-disabled":E(f.disabled),"data-renaming":E(f.renaming),"aria-level":f.depth,"data-depth":f.depth,style:{"--depth":f.depth},onFocus(S){S.stopPropagation(),a({type:"NODE.FOCUS",id:f.value})},onClick(S){if(f.disabled||!pe(S)||st(S.currentTarget)&&xe(S))return;let P=S.metaKey||S.ctrlKey;a({type:"NODE.CLICK",id:f.value,shiftKey:S.shiftKey,ctrlKey:P}),S.stopPropagation(),st(S.currentTarget)||S.preventDefault()}}))},getItemTextProps(b){let f=O(b);return t.element(y(g({},Ge.itemText.attrs),{"data-disabled":E(f.disabled),"data-selected":E(f.selected),"data-focus":E(f.focused)}))},getItemIndicatorProps(b){let f=O(b);return t.element(y(g({},Ge.itemIndicator.attrs),{"aria-hidden":!0,"data-disabled":E(f.disabled),"data-selected":E(f.selected),"data-focus":E(f.focused),hidden:!f.selected}))},getBranchProps(b){let f=O(b);return t.element(y(g({},Ge.branch.attrs),{"data-depth":f.depth,dir:s("dir"),"data-branch":f.value,role:"treeitem","data-ownedby":ec(i),"data-value":f.value,"aria-level":f.depth,"aria-selected":f.disabled?void 0:f.selected,"data-path":b.indexPath.join("/"),"data-selected":E(f.selected),"aria-expanded":f.expanded,"data-state":f.expanded?"open":"closed","aria-disabled":X(f.disabled),"data-disabled":E(f.disabled),"data-loading":E(f.loading),"aria-busy":X(f.loading),style:{"--depth":f.depth}}))},getBranchIndicatorProps(b){let f=O(b);return t.element(y(g({},Ge.branchIndicator.attrs),{"aria-hidden":!0,"data-state":f.expanded?"open":"closed","data-disabled":E(f.disabled),"data-selected":E(f.selected),"data-focus":E(f.focused),"data-loading":E(f.loading)}))},getBranchTriggerProps(b){let f=O(b);return t.element(y(g({},Ge.branchTrigger.attrs),{role:"button",dir:s("dir"),"data-disabled":E(f.disabled),"data-state":f.expanded?"open":"closed","data-value":f.value,"data-loading":E(f.loading),disabled:f.loading,onClick(S){f.disabled||f.loading||(a({type:"BRANCH_TOGGLE.CLICK",id:f.value}),S.stopPropagation())}}))},getBranchControlProps(b){let f=O(b);return t.element(y(g({},Ge.branchControl.attrs),{role:"button",id:f.id,dir:s("dir"),tabIndex:f.focused?0:-1,"data-path":b.indexPath.join("/"),"data-state":f.expanded?"open":"closed","data-disabled":E(f.disabled),"data-selected":E(f.selected),"data-focus":E(f.focused),"data-renaming":E(f.renaming),"data-value":f.value,"data-depth":f.depth,"data-loading":E(f.loading),"aria-busy":X(f.loading),onFocus(S){a({type:"NODE.FOCUS",id:f.value}),S.stopPropagation()},onClick(S){if(f.disabled||f.loading||!pe(S)||st(S.currentTarget)&&xe(S))return;let P=S.metaKey||S.ctrlKey;a({type:"BRANCH_NODE.CLICK",id:f.value,shiftKey:S.shiftKey,ctrlKey:P}),S.stopPropagation()}}))},getBranchTextProps(b){let f=O(b);return t.element(y(g({},Ge.branchText.attrs),{dir:s("dir"),"data-disabled":E(f.disabled),"data-state":f.expanded?"open":"closed","data-loading":E(f.loading)}))},getBranchContentProps(b){let f=O(b);return t.element(y(g({},Ge.branchContent.attrs),{role:"group",dir:s("dir"),"data-state":f.expanded?"open":"closed","data-depth":f.depth,"data-path":b.indexPath.join("/"),"data-value":f.value,hidden:!f.expanded}))},getBranchIndentGuideProps(b){let f=O(b);return t.element(y(g({},Ge.branchIndentGuide.attrs),{"data-depth":f.depth}))},getNodeCheckboxProps(b){let f=O(b),S=f.checked;return t.element(y(g({},Ge.nodeCheckbox.attrs),{tabIndex:-1,role:"checkbox","data-state":S===!0?"checked":S===!1?"unchecked":"indeterminate","aria-checked":S===!0?"true":S===!1?"false":"mixed","data-disabled":E(f.disabled),onClick(P){if(P.defaultPrevented||f.disabled||!pe(P))return;a({type:"CHECKED.TOGGLE",value:f.value,isBranch:f.isBranch}),P.stopPropagation();let V=P.currentTarget.closest("[role=treeitem]");V==null||V.focus({preventScroll:!0})}}))},getNodeRenameInputProps(b){let f=O(b);return t.input(y(g({},Ge.nodeRenameInput.attrs),{id:wf(i,f.value),type:"text","aria-label":"Rename tree item",hidden:!f.renaming,onKeyDown(S){Re(S)||(S.key==="Escape"&&(a({type:"RENAME.CANCEL"}),S.preventDefault()),S.key==="Enter"&&(a({type:"RENAME.SUBMIT",label:S.currentTarget.value}),S.preventDefault()),S.stopPropagation())},onBlur(S){a({type:"RENAME.SUBMIT",label:S.currentTarget.value})}}))}}}function Ra(e,t){let{context:n,prop:i,refs:r}=e;if(!i("loadChildren")){n.set("expandedValue",v=>vt(Ze(v,...t)));return}let s=n.get("loadingStatus"),[a,o]=oo(t,v=>s[v]==="loaded");if(a.length>0&&n.set("expandedValue",v=>vt(Ze(v,...a))),o.length===0)return;let l=i("collection"),[c,u]=oo(o,v=>{let I=l.findNode(v);return l.getNodeChildren(I).length>0});if(c.length>0&&n.set("expandedValue",v=>vt(Ze(v,...c))),u.length===0)return;n.set("loadingStatus",v=>g(g({},v),u.reduce((I,T)=>y(g({},I),{[T]:"loading"}),{})));let h=u.map(v=>{let I=l.getIndexPath(v),T=l.getValuePath(I),O=l.findNode(v);return{id:v,indexPath:I,valuePath:T,node:O}}),m=r.get("pendingAborts"),d=i("loadChildren");vn(d,()=>"[zag-js/tree-view] `loadChildren` is required for async expansion");let p=h.map(({id:v,indexPath:I,valuePath:T,node:O})=>{let b=m.get(v);b&&(b.abort(),m.delete(v));let f=new AbortController;return m.set(v,f),d({valuePath:T,indexPath:I,node:O,signal:f.signal})});Promise.allSettled(p).then(v=>{var f,S;let I=[],T=[],O=n.get("loadingStatus"),b=i("collection");v.forEach((P,V)=>{let{id:A,indexPath:x,node:k,valuePath:N}=h[V];P.status==="fulfilled"?(O[A]="loaded",I.push(A),b=b.replace(x,y(g({},k),{children:P.value}))):(m.delete(A),Reflect.deleteProperty(O,A),T.push({node:k,error:P.reason,indexPath:x,valuePath:N}))}),n.set("loadingStatus",O),I.length&&(n.set("expandedValue",P=>vt(Ze(P,...I))),(f=i("onLoadChildrenComplete"))==null||f({collection:b})),T.length&&((S=i("onLoadChildrenError"))==null||S({nodes:T}))})}function _t(e){let{prop:t,context:n}=e;return function({indexPath:r}){return t("collection").getValuePath(r).slice(0,-1).some(a=>!n.get("expandedValue").includes(a))}}function oi(e,t){let{prop:n,scope:i,computed:r}=e,s=n("scrollToIndexFn");if(!s)return!1;let a=n("collection"),o=r("visibleNodes");for(let l=0;li.getById(nc(i,t))}),!0}return!1}function jV(e){var s;let n=e.querySelectorAll('[data-scope="tree-view"][data-part="branch"], [data-scope="tree-view"][data-part="item"]'),i=[];for(let a of n){let o=a.getAttribute("data-path"),l=a.getAttribute("data-value");if(o==null||l==null)continue;let c=o.split("/").map(m=>parseInt(m,10));if(c.some(Number.isNaN))continue;let u=(s=a.getAttribute("data-name"))!=null?s:l,h=a.getAttribute("data-part")==="branch";i.push({pathArr:c,id:l,name:u,isBranch:h})}i.sort((a,o)=>{let l=Math.min(a.pathArr.length,o.pathArr.length);for(let c=0;c{"use strict";yr();se();_V=U("tree-view").parts("branch","branchContent","branchControl","branchIndentGuide","branchIndicator","branchText","branchTrigger","item","itemIndicator","itemText","label","nodeCheckbox","nodeRenameInput","root","tree"),Ge=_V.build(),tc=e=>new Ao(e);tc.empty=()=>new Ao({rootNode:{children:[]}});GV=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`tree:${e.id}:root`},Tf=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`tree:${e.id}:label`},nc=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.node)==null?void 0:i.call(n,t))!=null?r:`tree:${e.id}:node:${t}`},ec=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.tree)!=null?n:`tree:${e.id}:tree`},ke=(e,t)=>{var n;t!=null&&((n=e.getById(nc(e,t)))==null||n.focus())},wf=(e,t)=>`tree:${e.id}:rename-input:${t}`,Of=(e,t)=>e.getById(wf(e,t));({and:Gt}=Ee()),KV={props({props:e}){return g({selectionMode:"single",collection:tc.empty(),typeahead:!0,expandOnClick:!0,defaultExpandedValue:[],defaultSelectedValue:[]},e)},initialState(){return"idle"},context({prop:e,bindable:t,getContext:n}){return{expandedValue:t(()=>({defaultValue:e("defaultExpandedValue"),value:e("expandedValue"),isEqual:fe,onChange(i){var a;let s=n().get("focusedValue");(a=e("onExpandedChange"))==null||a({expandedValue:i,focusedValue:s,get expandedNodes(){return e("collection").findNodes(i)}})}})),selectedValue:t(()=>({defaultValue:e("defaultSelectedValue"),value:e("selectedValue"),isEqual:fe,onChange(i){var a;let s=n().get("focusedValue");(a=e("onSelectionChange"))==null||a({selectedValue:i,focusedValue:s,get selectedNodes(){return e("collection").findNodes(i)}})}})),focusedValue:t(()=>({defaultValue:e("defaultFocusedValue")||null,value:e("focusedValue"),onChange(i){var r;(r=e("onFocusChange"))==null||r({focusedValue:i,get focusedNode(){return i?e("collection").findNode(i):null}})}})),loadingStatus:t(()=>({defaultValue:{}})),checkedValue:t(()=>({defaultValue:e("defaultCheckedValue")||[],value:e("checkedValue"),isEqual:fe,onChange(i){var r;(r=e("onCheckedChange"))==null||r({checkedValue:i})}})),renamingValue:t(()=>({sync:!0,defaultValue:null}))}},refs(){return{typeaheadState:g({},Ue.defaultOptions),pendingAborts:new Map}},computed:{isMultipleSelection:({prop:e})=>e("selectionMode")==="multiple",isTypingAhead:({refs:e})=>e.get("typeaheadState").keysSoFar.length>0,visibleNodes:({prop:e,context:t})=>{let n=[];return e("collection").visit({skip:_t({prop:e,context:t}),onEnter:(i,r)=>{n.push({node:i,indexPath:r})}}),n}},on:{"EXPANDED.SET":{actions:["setExpanded"]},"EXPANDED.CLEAR":{actions:["clearExpanded"]},"EXPANDED.ALL":{actions:["expandAllBranches"]},"BRANCH.EXPAND":{actions:["expandBranches"]},"BRANCH.COLLAPSE":{actions:["collapseBranches"]},"SELECTED.SET":{actions:["setSelected"]},"SELECTED.ALL":[{guard:Gt("isMultipleSelection","moveFocus"),actions:["selectAllNodes","focusTreeLastNode"]},{guard:"isMultipleSelection",actions:["selectAllNodes"]}],"SELECTED.CLEAR":{actions:["clearSelected"]},"NODE.SELECT":{actions:["selectNode"]},"NODE.DESELECT":{actions:["deselectNode"]},"CHECKED.TOGGLE":{actions:["toggleChecked"]},"CHECKED.SET":{actions:["setChecked"]},"CHECKED.CLEAR":{actions:["clearChecked"]},"NODE.FOCUS":{actions:["setFocusedNode"]},"NODE.ARROW_DOWN":[{guard:Gt("isShiftKey","isMultipleSelection"),actions:["focusTreeNextNode","extendSelectionToNextNode"]},{actions:["focusTreeNextNode"]}],"NODE.ARROW_UP":[{guard:Gt("isShiftKey","isMultipleSelection"),actions:["focusTreePrevNode","extendSelectionToPrevNode"]},{actions:["focusTreePrevNode"]}],"NODE.ARROW_LEFT":{actions:["focusBranchNode"]},"BRANCH_NODE.ARROW_LEFT":[{guard:"isBranchExpanded",actions:["collapseBranch"]},{actions:["focusBranchNode"]}],"BRANCH_NODE.ARROW_RIGHT":[{guard:Gt("isBranchFocused","isBranchExpanded"),actions:["focusBranchFirstNode"]},{actions:["expandBranch"]}],"SIBLINGS.EXPAND":{actions:["expandSiblingBranches"]},"NODE.HOME":[{guard:Gt("isShiftKey","isMultipleSelection"),actions:["extendSelectionToFirstNode","focusTreeFirstNode"]},{actions:["focusTreeFirstNode"]}],"NODE.END":[{guard:Gt("isShiftKey","isMultipleSelection"),actions:["extendSelectionToLastNode","focusTreeLastNode"]},{actions:["focusTreeLastNode"]}],"NODE.CLICK":[{guard:Gt("isCtrlKey","isMultipleSelection"),actions:["toggleNodeSelection"]},{guard:Gt("isShiftKey","isMultipleSelection"),actions:["extendSelectionToNode"]},{actions:["selectNode"]}],"BRANCH_NODE.CLICK":[{guard:Gt("isCtrlKey","isMultipleSelection"),actions:["toggleNodeSelection"]},{guard:Gt("isShiftKey","isMultipleSelection"),actions:["extendSelectionToNode"]},{guard:"expandOnClick",actions:["selectNode","toggleBranchNode"]},{actions:["selectNode"]}],"BRANCH_TOGGLE.CLICK":{actions:["toggleBranchNode"]},"TREE.TYPEAHEAD":{actions:["focusMatchedNode"]}},exit:["clearPendingAborts"],states:{idle:{on:{"NODE.RENAME":{target:"renaming",actions:["setRenamingValue"]}}},renaming:{entry:["syncRenameInput","focusRenameInput"],on:{"RENAME.SUBMIT":{guard:"isRenameLabelValid",target:"idle",actions:["submitRenaming"]},"RENAME.CANCEL":{target:"idle",actions:["cancelRenaming"]}}}},implementations:{guards:{isBranchFocused:({context:e,event:t})=>e.get("focusedValue")===t.id,isBranchExpanded:({context:e,event:t})=>e.get("expandedValue").includes(t.id),isShiftKey:({event:e})=>e.shiftKey,isCtrlKey:({event:e})=>e.ctrlKey,hasSelectedItems:({context:e})=>e.get("selectedValue").length>0,isMultipleSelection:({prop:e})=>e("selectionMode")==="multiple",moveFocus:({event:e})=>!!e.moveFocus,expandOnClick:({prop:e})=>!!e("expandOnClick"),isRenameLabelValid:({event:e})=>e.label.trim()!==""},actions:{selectNode({context:e,event:t}){let n=t.id||t.value;e.set("selectedValue",i=>n==null?i:!t.isTrusted&&pn(n)?i.concat(...n):[pn(n)?mt(n):n].filter(Boolean))},deselectNode({context:e,event:t}){let n=or(t.id||t.value);e.set("selectedValue",i=>ct(i,...n))},setFocusedNode({context:e,event:t}){e.set("focusedValue",t.id)},clearFocusedNode({context:e}){e.set("focusedValue",null)},clearSelectedItem({context:e}){e.set("selectedValue",[])},toggleBranchNode({context:e,event:t,action:n}){let i=e.get("expandedValue").includes(t.id);n(i?["collapseBranch"]:["expandBranch"])},expandBranch(e){let{event:t}=e;Ra(e,[t.id])},expandBranches(e){let{context:t,event:n}=e,i=or(n.value);Ra(e,fs(i,t.get("expandedValue")))},collapseBranch({context:e,event:t}){e.set("expandedValue",n=>ct(n,t.id))},collapseBranches(e){let{context:t,event:n}=e,i=or(n.value);t.set("expandedValue",r=>ct(r,...i))},setExpanded({context:e,event:t}){pn(t.value)&&e.set("expandedValue",t.value)},clearExpanded({context:e}){e.set("expandedValue",[])},setSelected({context:e,event:t}){pn(t.value)&&e.set("selectedValue",t.value)},clearSelected({context:e}){e.set("selectedValue",[])},focusTreeFirstNode(e){let{prop:t,scope:n}=e,i=t("collection"),r=i.getFirstNode(void 0,{skip:_t(e)});if(!r)return;let s=i.getNodeValue(r);oi(e,s)?H(()=>ke(n,s)):ke(n,s)},focusTreeLastNode(e){let{prop:t,scope:n}=e,i=t("collection"),r=i.getLastNode(void 0,{skip:_t(e)}),s=i.getNodeValue(r);oi(e,s)?H(()=>ke(n,s)):ke(n,s)},focusBranchFirstNode(e){let{event:t,prop:n,scope:i}=e,r=n("collection"),s=r.findNode(t.id),a=r.getFirstNode(s,{skip:_t(e)});if(!a)return;let o=r.getNodeValue(a);oi(e,o)?H(()=>ke(i,o)):ke(i,o)},focusTreeNextNode(e){let{event:t,prop:n,scope:i}=e,r=n("collection"),s=r.getNextNode(t.id,{skip:_t(e)});if(!s)return;let a=r.getNodeValue(s);oi(e,a)?H(()=>ke(i,a)):ke(i,a)},focusTreePrevNode(e){let{event:t,prop:n,scope:i}=e,r=n("collection"),s=r.getPreviousNode(t.id,{skip:_t(e)});if(!s)return;let a=r.getNodeValue(s);oi(e,a)?H(()=>ke(i,a)):ke(i,a)},focusBranchNode(e){let{event:t,prop:n,scope:i}=e,r=n("collection"),s=r.getParentNode(t.id),a=s?r.getNodeValue(s):void 0;if(!a)return;oi(e,a)?H(()=>ke(i,a)):ke(i,a)},selectAllNodes({context:e,prop:t}){e.set("selectedValue",t("collection").getValues())},focusMatchedNode(e){let{context:t,prop:n,refs:i,event:r,scope:s,computed:a}=e,l=a("visibleNodes").map(({node:h})=>({textContent:n("collection").stringifyNode(h),id:n("collection").getNodeValue(h)})),c=Ue(l,{state:i.get("typeaheadState"),activeId:t.get("focusedValue"),key:r.key});if(!(c!=null&&c.id))return;oi(e,c.id)?H(()=>ke(s,c.id)):ke(s,c.id)},toggleNodeSelection({context:e,event:t}){let n=yt(e.get("selectedValue"),t.id);e.set("selectedValue",n)},expandAllBranches(e){let{context:t,prop:n}=e,i=n("collection").getBranchValues(),r=fs(i,t.get("expandedValue"));Ra(e,r)},expandSiblingBranches(e){let{context:t,event:n,prop:i}=e,r=i("collection"),s=r.getIndexPath(n.id);if(!s)return;let o=r.getSiblingNodes(s).map(c=>r.getNodeValue(c)),l=fs(o,t.get("expandedValue"));Ra(e,l)},extendSelectionToNode(e){let{context:t,event:n,prop:i,computed:r}=e,s=i("collection"),a=lt(t.get("selectedValue"))||s.getNodeValue(s.getFirstNode()),o=n.id,l=[a,o],c=0;r("visibleNodes").forEach(({node:h})=>{let m=s.getNodeValue(h);c===1&&l.push(m),(m===a||m===o)&&c++}),t.set("selectedValue",vt(l))},extendSelectionToNextNode(e){let{context:t,event:n,prop:i}=e,r=i("collection"),s=r.getNextNode(n.id,{skip:_t(e)});if(!s)return;let a=new Set(t.get("selectedValue")),o=r.getNodeValue(s);o!=null&&(a.has(n.id)&&a.has(o)?a.delete(n.id):a.has(o)||a.add(o),t.set("selectedValue",Array.from(a)))},extendSelectionToPrevNode(e){let{context:t,event:n,prop:i}=e,r=i("collection"),s=r.getPreviousNode(n.id,{skip:_t(e)});if(!s)return;let a=new Set(t.get("selectedValue")),o=r.getNodeValue(s);o!=null&&(a.has(n.id)&&a.has(o)?a.delete(n.id):a.has(o)||a.add(o),t.set("selectedValue",Array.from(a)))},extendSelectionToFirstNode(e){let{context:t,prop:n}=e,i=n("collection"),r=lt(t.get("selectedValue")),s=[];i.visit({skip:_t(e),onEnter:a=>{let o=i.getNodeValue(a);if(s.push(o),o===r)return"stop"}}),t.set("selectedValue",s)},extendSelectionToLastNode(e){let{context:t,prop:n}=e,i=n("collection"),r=lt(t.get("selectedValue")),s=[],a=!1;i.visit({skip:_t(e),onEnter:o=>{let l=i.getNodeValue(o);l===r&&(a=!0),a&&s.push(l)}}),t.set("selectedValue",s)},clearPendingAborts({refs:e}){let t=e.get("pendingAborts");t.forEach(n=>n.abort()),t.clear()},toggleChecked({context:e,event:t,prop:n}){let i=n("collection");e.set("checkedValue",r=>t.isBranch?UV(i,t.value,r):yt(r,t.value))},setChecked({context:e,event:t}){e.set("checkedValue",t.value)},clearChecked({context:e}){e.set("checkedValue",[])},setRenamingValue({context:e,event:t,prop:n}){e.set("renamingValue",t.value);let i=n("onRenameStart");if(i){let r=n("collection"),s=r.getIndexPath(t.value);if(s){let a=r.at(s);a&&i({value:t.value,node:a,indexPath:s})}}},submitRenaming({context:e,event:t,prop:n,scope:i}){var c;let r=e.get("renamingValue");if(!r)return;let a=n("collection").getIndexPath(r);if(!a)return;let o=t.label.trim(),l=n("onBeforeRename");if(l&&!l({value:r,label:o,indexPath:a})){e.set("renamingValue",null),ke(i,r);return}(c=n("onRenameComplete"))==null||c({value:r,label:o,indexPath:a}),e.set("renamingValue",null),ke(i,r)},cancelRenaming({context:e,scope:t}){let n=e.get("renamingValue");e.set("renamingValue",null),n&&ke(t,n)},syncRenameInput({context:e,scope:t,prop:n}){let i=e.get("renamingValue");if(!i)return;let r=n("collection"),s=r.findNode(i);if(!s)return;let a=r.stringifyNode(s),o=Of(t,i);Me(o,a)},focusRenameInput({context:e,scope:t}){let n=e.get("renamingValue");if(!n)return;let i=Of(t,n);i&&(i.focus(),i.select())}}}};zV=_()(["ids","collection","dir","expandedValue","expandOnClick","defaultFocusedValue","focusedValue","getRootNode","id","onExpandedChange","onFocusChange","onSelectionChange","checkedValue","selectedValue","selectionMode","typeahead","defaultExpandedValue","defaultSelectedValue","defaultCheckedValue","onCheckedChange","onLoadChildrenComplete","onLoadChildrenError","loadChildren","canRename","onRenameStart","onBeforeRename","onRenameComplete","scrollToIndexFn"]),Ok=B(zV),YV=_()(["node","indexPath"]),wk=B(YV);XV=class extends K{constructor(t,n){var s;let i=(s=n.treeData)!=null?s:jV(t),r=tc({nodeToValue:a=>a.id,nodeToString:a=>a.name,rootNode:i});super(t,y(g({},n),{collection:r}));Y(this,"treeCollection");Y(this,"syncTree",()=>{let t=this.el.querySelector('[data-scope="tree-view"][data-part="tree"]');t&&(this.spreadProps(t,this.api.getTreeProps()),this.updateExistingTree(t))});this.treeCollection=r}initMachine(t){return new W(KV,g({},t))}initApi(){return WV(this.machine.service,q)}getNodeAt(t){var i;if(t.length===0)return;let n=this.treeCollection.rootNode;for(let r of t)if(n=(i=n==null?void 0:n.children)==null?void 0:i[r],!n)return;return n}updateExistingTree(t){this.spreadProps(t,this.api.getTreeProps());let n=t.querySelectorAll('[data-scope="tree-view"][data-part="branch"]');for(let r of n){let s=r.getAttribute("data-path");if(s==null)continue;let a=s.split("/").map(p=>parseInt(p,10)),o=this.getNodeAt(a);if(!o)continue;let l={indexPath:a,node:o};this.spreadProps(r,this.api.getBranchProps(l));let c=r.querySelector('[data-scope="tree-view"][data-part="branch-control"]');c&&this.spreadProps(c,this.api.getBranchControlProps(l));let u=r.querySelector('[data-scope="tree-view"][data-part="branch-text"]');u&&this.spreadProps(u,this.api.getBranchTextProps(l));let h=r.querySelector('[data-scope="tree-view"][data-part="branch-indicator"]');h&&this.spreadProps(h,this.api.getBranchIndicatorProps(l));let m=r.querySelector('[data-scope="tree-view"][data-part="branch-content"]');m&&this.spreadProps(m,this.api.getBranchContentProps(l));let d=r.querySelector('[data-scope="tree-view"][data-part="branch-indent-guide"]');d&&this.spreadProps(d,this.api.getBranchIndentGuideProps(l))}let i=t.querySelectorAll('[data-scope="tree-view"][data-part="item"]');for(let r of i){let s=r.getAttribute("data-path");if(s==null)continue;let a=s.split("/").map(c=>parseInt(c,10)),o=this.getNodeAt(a);if(!o)continue;let l={indexPath:a,node:o};this.spreadProps(r,this.api.getItemProps(l))}}render(){var i;let t=(i=this.el.querySelector('[data-scope="tree-view"][data-part="root"]'))!=null?i:this.el;this.spreadProps(t,this.api.getRootProps());let n=this.el.querySelector('[data-scope="tree-view"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps()),this.syncTree()}},ZV={mounted(){var i;let e=this.el,t=this.pushEvent.bind(this),n=new XV(e,y(g({id:e.id},C(e,"controlled")?{expandedValue:Z(e,"expandedValue"),selectedValue:Z(e,"selectedValue")}:{defaultExpandedValue:Z(e,"defaultExpandedValue"),defaultSelectedValue:Z(e,"defaultSelectedValue")}),{selectionMode:(i=w(e,"selectionMode",["single","multiple"]))!=null?i:"single",dir:Oe(e),onSelectionChange:r=>{var d;let s=C(e,"redirect"),a=(d=r.selectedValue)!=null&&d.length?r.selectedValue[0]:void 0,o=[...e.querySelectorAll('[data-scope="tree-view"][data-part="item"], [data-scope="tree-view"][data-part="branch"]')].find(p=>p.getAttribute("data-value")===a),l=(o==null?void 0:o.getAttribute("data-part"))==="item",c=o==null?void 0:o.getAttribute("data-redirect"),u=o==null?void 0:o.hasAttribute("data-new-tab");s&&a&&l&&this.liveSocket.main.isDead&&c!=="false"&&(u?window.open(a,"_blank","noopener,noreferrer"):window.location.href=a);let m=w(e,"onSelectionChange");m&&this.liveSocket.main.isConnected()&&t(m,{id:e.id,value:y(g({},r),{isItem:l!=null?l:!1})})},onExpandedChange:r=>{let s=w(e,"onExpandedChange");s&&this.liveSocket.main.isConnected()&&t(s,{id:e.id,value:r})}}));n.init(),this.treeView=n,this.onSetExpandedValue=r=>{let{value:s}=r.detail;n.api.setExpandedValue(s)},e.addEventListener("phx:tree-view:set-expanded-value",this.onSetExpandedValue),this.onSetSelectedValue=r=>{let{value:s}=r.detail;n.api.setSelectedValue(s)},e.addEventListener("phx:tree-view:set-selected-value",this.onSetSelectedValue),this.handlers=[],this.handlers.push(this.handleEvent("tree_view_set_expanded_value",r=>{let s=r.tree_view_id;s&&e.id!==s&&e.id!==`tree-view:${s}`||n.api.setExpandedValue(r.value)})),this.handlers.push(this.handleEvent("tree_view_set_selected_value",r=>{let s=r.tree_view_id;s&&e.id!==s&&e.id!==`tree-view:${s}`||n.api.setSelectedValue(r.value)})),this.handlers.push(this.handleEvent("tree_view_expanded_value",()=>{t("tree_view_expanded_value_response",{value:n.api.expandedValue})})),this.handlers.push(this.handleEvent("tree_view_selected_value",()=>{t("tree_view_selected_value_response",{value:n.api.selectedValue})}))},updated(){var e;C(this.el,"controlled")&&((e=this.treeView)==null||e.updateProps({expandedValue:Z(this.el,"expandedValue"),selectedValue:Z(this.el,"selectedValue")}))},destroyed(){var e;if(this.onSetExpandedValue&&this.el.removeEventListener("phx:tree-view:set-expanded-value",this.onSetExpandedValue),this.onSetSelectedValue&&this.el.removeEventListener("phx:tree-view:set-selected-value",this.onSetSelectedValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.treeView)==null||e.destroy()}}});var e0={};he(e0,{Hooks:()=>Da,default:()=>QV,hooks:()=>JV});function me(e,t){return{mounted(){return Ve(this,null,function*(){let r=(yield e())[t];if(this._realHook=r,r!=null&&r.mounted)return r.mounted.call(this)})},updated(){var i,r;(r=(i=this._realHook)==null?void 0:i.updated)==null||r.call(this)},destroyed(){var i,r;(r=(i=this._realHook)==null?void 0:i.destroyed)==null||r.call(this)},disconnected(){var i,r;(r=(i=this._realHook)==null?void 0:i.disconnected)==null||r.call(this)},reconnected(){var i,r;(r=(i=this._realHook)==null?void 0:i.reconnected)==null||r.call(this)},beforeUpdate(){var i,r;(r=(i=this._realHook)==null?void 0:i.beforeUpdate)==null||r.call(this)}}}var Da={Accordion:me(()=>Promise.resolve().then(()=>(uu(),cu)),"Accordion"),AngleSlider:me(()=>Promise.resolve().then(()=>(Ru(),Nu)),"AngleSlider"),Avatar:me(()=>Promise.resolve().then(()=>(Fu(),Mu)),"Avatar"),Carousel:me(()=>Promise.resolve().then(()=>(Wu(),qu)),"Carousel"),Checkbox:me(()=>Promise.resolve().then(()=>(ed(),Qu)),"Checkbox"),Clipboard:me(()=>Promise.resolve().then(()=>(nd(),td)),"Clipboard"),Collapsible:me(()=>Promise.resolve().then(()=>(rd(),id)),"Collapsible"),Combobox:me(()=>Promise.resolve().then(()=>(ih(),nh)),"Combobox"),DatePicker:me(()=>Promise.resolve().then(()=>(tg(),eg)),"DatePicker"),Dialog:me(()=>Promise.resolve().then(()=>(dg(),ug)),"Dialog"),Editable:me(()=>Promise.resolve().then(()=>(vg(),mg)),"Editable"),FloatingPanel:me(()=>Promise.resolve().then(()=>(xg(),Vg)),"FloatingPanel"),Listbox:me(()=>Promise.resolve().then(()=>(Lg(),Dg)),"Listbox"),Menu:me(()=>Promise.resolve().then(()=>(qg(),Ug)),"Menu"),NumberInput:me(()=>Promise.resolve().then(()=>(sp(),rp)),"NumberInput"),PasswordInput:me(()=>Promise.resolve().then(()=>(op(),ap)),"PasswordInput"),PinInput:me(()=>Promise.resolve().then(()=>(hp(),dp)),"PinInput"),RadioGroup:me(()=>Promise.resolve().then(()=>(yp(),vp)),"RadioGroup"),Select:me(()=>Promise.resolve().then(()=>(Op(),Tp)),"Select"),SignaturePad:me(()=>Promise.resolve().then(()=>(zp(),Kp)),"SignaturePad"),Switch:me(()=>Promise.resolve().then(()=>(Jp(),Zp)),"Switch"),Tabs:me(()=>Promise.resolve().then(()=>(rf(),nf)),"Tabs"),Timer:me(()=>Promise.resolve().then(()=>(lf(),of)),"Timer"),Toast:me(()=>Promise.resolve().then(()=>(yf(),vf)),"Toast"),ToggleGroup:me(()=>Promise.resolve().then(()=>(Sf(),Cf)),"ToggleGroup"),TreeView:me(()=>Promise.resolve().then(()=>(Af(),xf)),"TreeView")};function JV(e){return Object.fromEntries(e.filter(t=>t in Da).map(t=>[t,Da[t]]))}var QV=Da;return Uf(e0);})(); + `,this.parts={title:this.el.querySelector('[data-scope="toast"][data-part="title"]'),description:this.el.querySelector('[data-scope="toast"][data-part="description"]'),close:this.el.querySelector('[data-scope="toast"][data-part="close-trigger"]'),ghostBefore:this.el.querySelector('[data-scope="toast"][data-part="ghost-before"]'),ghostAfter:this.el.querySelector('[data-scope="toast"][data-part="ghost-after"]'),progressbar:this.el.querySelector('[data-scope="toast"][data-part="progressbar"]'),loadingSpinner:this.el.querySelector('[data-scope="toast"][data-part="loading-spinner"]')}}initMachine(t){return new W(EV,t)}initApi(){return yV(this.machine.service,q)}render(){var a,o;this.spreadProps(this.el,this.api.getRootProps()),this.spreadProps(this.parts.close,this.api.getCloseTriggerProps()),this.spreadProps(this.parts.ghostBefore,this.api.getGhostBeforeProps()),this.spreadProps(this.parts.ghostAfter,this.api.getGhostAfterProps()),this.parts.title.textContent!==this.api.title&&(this.parts.title.textContent=(a=this.api.title)!=null?a:""),this.parts.description.textContent!==this.api.description&&(this.parts.description.textContent=(o=this.api.description)!=null?o:""),this.spreadProps(this.parts.title,this.api.getTitleProps()),this.spreadProps(this.parts.description,this.api.getDescriptionProps());let t=this.duration,n=t==="Infinity"||t===1/0||t===Number.POSITIVE_INFINITY,i=this.el.closest('[phx-hook="Toast"]'),r=i==null?void 0:i.querySelector("[data-loading-icon-template]"),s=r==null?void 0:r.innerHTML;n?(this.parts.progressbar.style.display="none",this.parts.loadingSpinner.style.display="flex",this.el.setAttribute("data-duration-infinity","true"),s&&this.parts.loadingSpinner.innerHTML!==s&&(this.parts.loadingSpinner.innerHTML=s)):(this.parts.progressbar.style.display="block",this.parts.loadingSpinner.style.display="none",this.el.removeAttribute("data-duration-infinity"))}},OV=class extends K{constructor(t,n){var i;super(t,n);Y(this,"toastComponents",new Map);Y(this,"groupEl");Y(this,"store");Y(this,"destroy",()=>{for(let t of this.toastComponents.values())t.destroy();this.toastComponents.clear(),this.machine.stop()});this.store=n.store,this.groupEl=(i=t.querySelector('[data-part="group"]'))!=null?i:(()=>{let r=document.createElement("div");return r.setAttribute("data-scope","toast"),r.setAttribute("data-part","group"),t.appendChild(r),r})()}initMachine(t){return new W(ff.machine,t)}initApi(){return ff.connect(this.machine.service,q)}render(){this.spreadProps(this.groupEl,this.api.getGroupProps());let t=this.api.getToasts().filter(i=>typeof i.id=="string"),n=new Set(t.map(i=>i.id));t.forEach((i,r)=>{let s=this.toastComponents.get(i.id);if(s)s.duration=i.duration,s.updateProps(y(g({},i),{parent:this.machine.service,index:r}));else{let a=document.createElement("div");a.setAttribute("data-scope","toast"),a.setAttribute("data-part","root"),this.groupEl.appendChild(a),s=new TV(a,y(g({},i),{parent:this.machine.service,index:r})),s.init(),this.toastComponents.set(i.id,s)}});for(let[i,r]of this.toastComponents)n.has(i)||(r.destroy(),this.toastComponents.delete(i))}};VV={mounted(){var h;let e=this.el;e.id||(e.id=Mn(e,"toast")),this.groupId=e.id;let t=m=>{if(m)try{return m.includes("{")?JSON.parse(m):m}catch(u){return m}},n=m=>m==="Infinity"||m===1/0?1/0:typeof m=="string"?parseInt(m,10)||void 0:m,i=(h=w(e,"placement",["top-start","top","top-end","bottom-start","bottom","bottom-end"]))!=null?h:"bottom-end";wV(e,{id:this.groupId,placement:i,overlap:C(e,"overlap"),max:z(e,"max"),gap:z(e,"gap"),offsets:t(w(e,"offset")),pauseOnPageIdle:C(e,"pauseOnPageIdle")});let r=qr(this.groupId),s=e.getAttribute("data-flash-info"),a=e.getAttribute("data-flash-info-title"),o=e.getAttribute("data-flash-error"),l=e.getAttribute("data-flash-error-title"),c=e.getAttribute("data-flash-info-duration"),d=e.getAttribute("data-flash-error-duration");if(r&&s)try{r.create({title:a||"Success",description:s,type:"info",id:Mn(void 0,"toast"),duration:n(c!=null?c:void 0)})}catch(m){console.error("Failed to create flash info toast:",m)}if(r&&o)try{r.create({title:l||"Error",description:o,type:"error",id:Mn(void 0,"toast"),duration:n(d!=null?d:void 0)})}catch(m){console.error("Failed to create flash error toast:",m)}this.handlers=[],this.handlers.push(this.handleEvent("toast-create",m=>{let u=qr(m.groupId||this.groupId);if(u)try{u.create({title:m.title,description:m.description,type:m.type||"info",id:m.id||Mn(void 0,"toast"),duration:n(m.duration)})}catch(p){console.error("Failed to create toast:",p)}})),this.handlers.push(this.handleEvent("toast-update",m=>{let u=qr(m.groupId||this.groupId);if(u)try{u.update(m.id,{title:m.title,description:m.description,type:m.type})}catch(p){console.error("Failed to update toast:",p)}})),this.handlers.push(this.handleEvent("toast-dismiss",m=>{let u=qr(m.groupId||this.groupId);if(u)try{u.dismiss(m.id)}catch(p){console.error("Failed to dismiss toast:",p)}})),e.addEventListener("toast:create",m=>{let{detail:u}=m,p=qr(u.groupId||this.groupId);if(p)try{p.create({title:u.title,description:u.description,type:u.type||"info",id:u.id||Mn(void 0,"toast"),duration:n(u.duration)})}catch(v){console.error("Failed to create toast:",v)}})},destroyed(){if(this.handlers)for(let e of this.handlers)this.removeHandleEvent(e)}}});var Cf={};he(Cf,{ToggleGroup:()=>BV});function DV(e,t){let{context:n,send:i,prop:r,scope:s}=e,a=n.get("value"),o=r("disabled"),l=!r("multiple"),c=r("rovingFocus"),d=r("orientation")==="horizontal";function h(m){let u=AV(s,m.value);return{id:u,disabled:!!(m.disabled||o),pressed:!!a.includes(m.value),focused:n.get("focusedId")===u}}return{value:a,setValue(m){i({type:"VALUE.SET",value:m})},getRootProps(){return t.element(y(g({},bf.root.attrs),{id:ka(s),dir:r("dir"),role:l?"radiogroup":"group",tabIndex:n.get("isTabbingBackward")?-1:0,"data-disabled":E(o),"data-orientation":r("orientation"),"data-focus":E(n.get("focusedId")!=null),style:{outline:"none"},onMouseDown(){o||i({type:"ROOT.MOUSE_DOWN"})},onFocus(m){o||m.currentTarget===j(m)&&(n.get("isClickFocus")||n.get("isTabbingBackward")||i({type:"ROOT.FOCUS"}))},onBlur(m){let u=m.relatedTarget;ce(m.currentTarget,u)||o||i({type:"ROOT.BLUR"})}}))},getItemState:h,getItemProps(m){let u=h(m),p=u.focused?0:-1;return t.button(y(g({},bf.item.attrs),{id:u.id,type:"button","data-ownedby":ka(s),"data-focus":E(u.focused),disabled:u.disabled,tabIndex:c?p:void 0,role:l?"radio":void 0,"aria-checked":l?u.pressed:void 0,"aria-pressed":l?void 0:u.pressed,"data-disabled":E(u.disabled),"data-orientation":r("orientation"),dir:r("dir"),"data-state":u.pressed?"on":"off",onFocus(){u.disabled||i({type:"TOGGLE.FOCUS",id:u.id})},onClick(v){u.disabled||(i({type:"TOGGLE.CLICK",id:u.id,value:m.value}),Xe()&&v.currentTarget.focus({preventScroll:!0}))},onKeyDown(v){if(v.defaultPrevented||!ce(v.currentTarget,j(v))||u.disabled)return;let T={Tab(O){let b=O.shiftKey;i({type:"TOGGLE.SHIFT_TAB",isShiftTab:b})},ArrowLeft(){!c||!d||i({type:"TOGGLE.FOCUS_PREV"})},ArrowRight(){!c||!d||i({type:"TOGGLE.FOCUS_NEXT"})},ArrowUp(){!c||d||i({type:"TOGGLE.FOCUS_PREV"})},ArrowDown(){!c||d||i({type:"TOGGLE.FOCUS_NEXT"})},Home(){c&&i({type:"TOGGLE.FOCUS_FIRST"})},End(){c&&i({type:"TOGGLE.FOCUS_LAST"})}}[ge(v)];T&&(T(v),v.key!=="Tab"&&v.preventDefault())}}))}}}var xV,bf,ka,AV,Pf,Na,Ef,kV,NV,RV,If,LV,MV,FV,Ek,$V,Ik,HV,BV,Sf=re(()=>{"use strict";se();xV=U("toggle-group").parts("root","item"),bf=xV.build(),ka=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`toggle-group:${e.id}`},AV=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))!=null?r:`toggle-group:${e.id}:${t}`},Pf=e=>e.getById(ka(e)),Na=e=>{let n=`[data-ownedby='${CSS.escape(ka(e))}']:not([data-disabled])`;return Fe(Pf(e),n)},Ef=e=>lt(Na(e)),kV=e=>mt(Na(e)),NV=(e,t,n)=>yi(Na(e),t,n),RV=(e,t,n)=>bi(Na(e),t,n);({not:If,and:LV}=Ee()),MV={props({props:e}){return g({defaultValue:[],orientation:"horizontal",rovingFocus:!0,loopFocus:!0,deselectable:!0},e)},initialState(){return"idle"},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var i;(i=e("onValueChange"))==null||i({value:n})}})),focusedId:t(()=>({defaultValue:null})),isTabbingBackward:t(()=>({defaultValue:!1})),isClickFocus:t(()=>({defaultValue:!1})),isWithinToolbar:t(()=>({defaultValue:!1}))}},computed:{currentLoopFocus:({context:e,prop:t})=>t("loopFocus")&&!e.get("isWithinToolbar")},entry:["checkIfWithinToolbar"],on:{"VALUE.SET":{actions:["setValue"]},"TOGGLE.CLICK":{actions:["setValue"]},"ROOT.MOUSE_DOWN":{actions:["setClickFocus"]}},states:{idle:{on:{"ROOT.FOCUS":{target:"focused",guard:If(LV("isClickFocus","isTabbingBackward")),actions:["focusFirstToggle","clearClickFocus"]},"TOGGLE.FOCUS":{target:"focused",actions:["setFocusedId"]}}},focused:{on:{"ROOT.BLUR":{target:"idle",actions:["clearIsTabbingBackward","clearFocusedId","clearClickFocus"]},"TOGGLE.FOCUS":{actions:["setFocusedId"]},"TOGGLE.FOCUS_NEXT":{actions:["focusNextToggle"]},"TOGGLE.FOCUS_PREV":{actions:["focusPrevToggle"]},"TOGGLE.FOCUS_FIRST":{actions:["focusFirstToggle"]},"TOGGLE.FOCUS_LAST":{actions:["focusLastToggle"]},"TOGGLE.SHIFT_TAB":[{guard:If("isFirstToggleFocused"),target:"idle",actions:["setIsTabbingBackward"]},{actions:["setIsTabbingBackward"]}]}}},implementations:{guards:{isClickFocus:({context:e})=>e.get("isClickFocus"),isTabbingBackward:({context:e})=>e.get("isTabbingBackward"),isFirstToggleFocused:({context:e,scope:t})=>{var n;return e.get("focusedId")===((n=Ef(t))==null?void 0:n.id)}},actions:{setIsTabbingBackward({context:e}){e.set("isTabbingBackward",!0)},clearIsTabbingBackward({context:e}){e.set("isTabbingBackward",!1)},setClickFocus({context:e}){e.set("isClickFocus",!0)},clearClickFocus({context:e}){e.set("isClickFocus",!1)},checkIfWithinToolbar({context:e,scope:t}){var i;let n=(i=Pf(t))==null?void 0:i.closest("[role=toolbar]");e.set("isWithinToolbar",!!n)},setFocusedId({context:e,event:t}){e.set("focusedId",t.id)},clearFocusedId({context:e}){e.set("focusedId",null)},setValue({context:e,event:t,prop:n}){yn(t,["value"]);let i=e.get("value");pn(t.value)?i=t.value:n("multiple")?i=yt(i,t.value):i=fe(i,[t.value])&&n("deselectable")?[]:[t.value],e.set("value",i)},focusNextToggle({context:e,scope:t,prop:n}){H(()=>{var r;let i=e.get("focusedId");i&&((r=NV(t,i,n("loopFocus")))==null||r.focus({preventScroll:!0}))})},focusPrevToggle({context:e,scope:t,prop:n}){H(()=>{var r;let i=e.get("focusedId");i&&((r=RV(t,i,n("loopFocus")))==null||r.focus({preventScroll:!0}))})},focusFirstToggle({scope:e}){H(()=>{var t;(t=Ef(e))==null||t.focus({preventScroll:!0})})},focusLastToggle({scope:e}){H(()=>{var t;(t=kV(e))==null||t.focus({preventScroll:!0})})}}}},FV=_()(["dir","disabled","getRootNode","id","ids","loopFocus","multiple","onValueChange","orientation","rovingFocus","value","defaultValue","deselectable"]),Ek=B(FV),$V=_()(["value","disabled"]),Ik=B($V),HV=class extends K{initMachine(e){return new W(MV,e)}initApi(){return DV(this.machine.service,q)}render(){let e=this.el.querySelector('[data-scope="toggle-group"][data-part="root"]');if(!e)return;this.spreadProps(e,this.api.getRootProps());let t=this.el.querySelectorAll('[data-scope="toggle-group"][data-part="item"]');for(let n=0;n{let s=w(e,"onValueChange");s&&!this.liveSocket.main.isDead&&this.liveSocket.main.isConnected()&&t(s,{value:r.value,id:e.id});let a=w(e,"onValueChangeClient");a&&e.dispatchEvent(new CustomEvent(a,{bubbles:!0,detail:{value:r.value,id:e.id}}))}}),i=new HV(e,n);i.init(),this.toggleGroup=i,this.onSetValue=r=>{let{value:s}=r.detail;i.api.setValue(s)},e.addEventListener("phx:toggle-group:set-value",this.onSetValue),this.handlers=[],this.handlers.push(this.handleEvent("toggle-group_set_value",r=>{let s=r.id;s&&s!==e.id||i.api.setValue(r.value)})),this.handlers.push(this.handleEvent("toggle-group:value",()=>{this.pushEvent("toggle-group:value_response",{value:i.api.value})}))},updated(){var e;(e=this.toggleGroup)==null||e.updateProps(y(g({},C(this.el,"controlled")?{value:Z(this.el,"value")}:{defaultValue:Z(this.el,"defaultValue")}),{deselectable:C(this.el,"deselectable"),loopFocus:C(this.el,"loopFocus"),rovingFocus:C(this.el,"rovingFocus"),disabled:C(this.el,"disabled"),multiple:C(this.el,"multiple"),orientation:w(this.el,"orientation",["horizontal","vertical"]),dir:w(this.el,"dir",["ltr","rtl"])}))},destroyed(){var e;if(this.onSetValue&&this.el.removeEventListener("phx:toggle-group:set-value",this.onSetValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.toggleGroup)==null||e.destroy()}}});var xf={};he(xf,{TreeView:()=>ZV});function Vf(e,t,n){let i=e.getNodeValue(t);if(!e.isBranchNode(t))return n.includes(i);let r=e.getDescendantValues(i),s=r.every(o=>n.includes(o)),a=r.some(o=>n.includes(o));return s?!0:a?"indeterminate":!1}function UV(e,t,n){let i=e.getDescendantValues(t),r=i.every(s=>n.includes(s));return vt(r?ct(n,...i):Ze(n,...i))}function qV(e,t){let n=new Map;return e.visit({onEnter:i=>{let r=e.getNodeValue(i),s=e.isBranchNode(i),a=Vf(e,i,t);n.set(r,{type:s?"branch":"leaf",checked:a})}}),n}function WV(e,t){let{context:n,scope:i,computed:r,prop:s,send:a}=e,o=s("collection"),l=Array.from(n.get("expandedValue")),c=Array.from(n.get("selectedValue")),d=Array.from(n.get("checkedValue")),h=r("isTypingAhead"),m=n.get("focusedValue"),u=n.get("loadingStatus"),p=n.get("renamingValue"),v=({indexPath:b})=>o.getValuePath(b).slice(0,-1).some(S=>!l.includes(S)),I=o.getFirstNode(void 0,{skip:v}),T=I?o.getNodeValue(I):null;function O(b){let{node:f,indexPath:S}=b,P=o.getNodeValue(f);return{id:nc(i,P),value:P,indexPath:S,valuePath:o.getValuePath(S),disabled:!!f.disabled,focused:m==null?T===P:m===P,selected:c.includes(P),expanded:l.includes(P),loading:u[P]==="loading",depth:S.length,isBranch:o.isBranchNode(f),renaming:p===P,get checked(){return Vf(o,f,d)}}}return{collection:o,expandedValue:l,selectedValue:c,checkedValue:d,toggleChecked(b,f){a({type:"CHECKED.TOGGLE",value:b,isBranch:f})},setChecked(b){a({type:"CHECKED.SET",value:b})},clearChecked(){a({type:"CHECKED.CLEAR"})},getCheckedMap(){return qV(o,d)},expand(b){a({type:b?"BRANCH.EXPAND":"EXPANDED.ALL",value:b})},collapse(b){a({type:b?"BRANCH.COLLAPSE":"EXPANDED.CLEAR",value:b})},deselect(b){a({type:b?"NODE.DESELECT":"SELECTED.CLEAR",value:b})},select(b){a({type:b?"NODE.SELECT":"SELECTED.ALL",value:b,isTrusted:!1})},getVisibleNodes(){return r("visibleNodes")},focus(b){ke(i,b)},selectParent(b){let f=o.getParentNode(b);if(!f)return;let S=Ze(c,o.getNodeValue(f));a({type:"SELECTED.SET",value:S,src:"select.parent"})},expandParent(b){let f=o.getParentNode(b);if(!f)return;let S=Ze(l,o.getNodeValue(f));a({type:"EXPANDED.SET",value:S,src:"expand.parent"})},setExpandedValue(b){let f=vt(b);a({type:"EXPANDED.SET",value:f})},setSelectedValue(b){let f=vt(b);a({type:"SELECTED.SET",value:f})},startRenaming(b){a({type:"NODE.RENAME",value:b})},submitRenaming(b,f){a({type:"RENAME.SUBMIT",value:b,label:f})},cancelRenaming(){a({type:"RENAME.CANCEL"})},getRootProps(){return t.element(y(g({},Ge.root.attrs),{id:GV(i),dir:s("dir")}))},getLabelProps(){return t.element(y(g({},Ge.label.attrs),{id:Tf(i),dir:s("dir")}))},getTreeProps(){return t.element(y(g({},Ge.tree.attrs),{id:ec(i),dir:s("dir"),role:"tree","aria-label":"Tree View","aria-labelledby":Tf(i),"aria-multiselectable":s("selectionMode")==="multiple"||void 0,tabIndex:-1,onKeyDown(b){if(b.defaultPrevented||Re(b))return;let f=j(b);if(Ot(f))return;let S=f==null?void 0:f.closest("[data-part=branch-control], [data-part=item]");if(!S)return;let P=S.dataset.value;if(P==null){console.warn("[zag-js/tree-view] Node id not found for node",S);return}let V=S.matches("[data-part=branch-control]"),A={ArrowDown(N){xe(N)||(N.preventDefault(),a({type:"NODE.ARROW_DOWN",id:P,shiftKey:N.shiftKey}))},ArrowUp(N){xe(N)||(N.preventDefault(),a({type:"NODE.ARROW_UP",id:P,shiftKey:N.shiftKey}))},ArrowLeft(N){xe(N)||S.dataset.disabled||(N.preventDefault(),a({type:V?"BRANCH_NODE.ARROW_LEFT":"NODE.ARROW_LEFT",id:P}))},ArrowRight(N){!V||S.dataset.disabled||(N.preventDefault(),a({type:"BRANCH_NODE.ARROW_RIGHT",id:P}))},Home(N){xe(N)||(N.preventDefault(),a({type:"NODE.HOME",id:P,shiftKey:N.shiftKey}))},End(N){xe(N)||(N.preventDefault(),a({type:"NODE.END",id:P,shiftKey:N.shiftKey}))},Space(N){var D;S.dataset.disabled||(h?a({type:"TREE.TYPEAHEAD",key:N.key}):(D=A.Enter)==null||D.call(A,N))},Enter(N){S.dataset.disabled||st(f)&&xe(N)||(a({type:V?"BRANCH_NODE.CLICK":"NODE.CLICK",id:P,src:"keyboard"}),st(f)||N.preventDefault())},"*"(N){S.dataset.disabled||(N.preventDefault(),a({type:"SIBLINGS.EXPAND",id:P}))},a(N){!N.metaKey||S.dataset.disabled||(N.preventDefault(),a({type:"SELECTED.ALL",moveFocus:!0}))},F2(N){if(S.dataset.disabled)return;let D=s("canRename");if(!D)return;let $=o.getIndexPath(P);if($){let te=o.at($);if(te&&!D(te,$))return}N.preventDefault(),a({type:"NODE.RENAME",value:P})}},x=ge(b,{dir:s("dir")}),k=A[x];if(k){k(b);return}Ue.isValidEvent(b)&&(a({type:"TREE.TYPEAHEAD",key:b.key,id:P}),b.preventDefault())}}))},getNodeState:O,getItemProps(b){let f=O(b);return t.element(y(g({},Ge.item.attrs),{id:f.id,dir:s("dir"),"data-ownedby":ec(i),"data-path":b.indexPath.join("/"),"data-value":f.value,tabIndex:f.focused?0:-1,"data-focus":E(f.focused),role:"treeitem","aria-current":f.selected?"true":void 0,"aria-selected":f.disabled?void 0:f.selected,"data-selected":E(f.selected),"aria-disabled":X(f.disabled),"data-disabled":E(f.disabled),"data-renaming":E(f.renaming),"aria-level":f.depth,"data-depth":f.depth,style:{"--depth":f.depth},onFocus(S){S.stopPropagation(),a({type:"NODE.FOCUS",id:f.value})},onClick(S){if(f.disabled||!pe(S)||st(S.currentTarget)&&xe(S))return;let P=S.metaKey||S.ctrlKey;a({type:"NODE.CLICK",id:f.value,shiftKey:S.shiftKey,ctrlKey:P}),S.stopPropagation(),st(S.currentTarget)||S.preventDefault()}}))},getItemTextProps(b){let f=O(b);return t.element(y(g({},Ge.itemText.attrs),{"data-disabled":E(f.disabled),"data-selected":E(f.selected),"data-focus":E(f.focused)}))},getItemIndicatorProps(b){let f=O(b);return t.element(y(g({},Ge.itemIndicator.attrs),{"aria-hidden":!0,"data-disabled":E(f.disabled),"data-selected":E(f.selected),"data-focus":E(f.focused),hidden:!f.selected}))},getBranchProps(b){let f=O(b);return t.element(y(g({},Ge.branch.attrs),{"data-depth":f.depth,dir:s("dir"),"data-branch":f.value,role:"treeitem","data-ownedby":ec(i),"data-value":f.value,"aria-level":f.depth,"aria-selected":f.disabled?void 0:f.selected,"data-path":b.indexPath.join("/"),"data-selected":E(f.selected),"aria-expanded":f.expanded,"data-state":f.expanded?"open":"closed","aria-disabled":X(f.disabled),"data-disabled":E(f.disabled),"data-loading":E(f.loading),"aria-busy":X(f.loading),style:{"--depth":f.depth}}))},getBranchIndicatorProps(b){let f=O(b);return t.element(y(g({},Ge.branchIndicator.attrs),{"aria-hidden":!0,"data-state":f.expanded?"open":"closed","data-disabled":E(f.disabled),"data-selected":E(f.selected),"data-focus":E(f.focused),"data-loading":E(f.loading)}))},getBranchTriggerProps(b){let f=O(b);return t.element(y(g({},Ge.branchTrigger.attrs),{role:"button",dir:s("dir"),"data-disabled":E(f.disabled),"data-state":f.expanded?"open":"closed","data-value":f.value,"data-loading":E(f.loading),disabled:f.loading,onClick(S){f.disabled||f.loading||(a({type:"BRANCH_TOGGLE.CLICK",id:f.value}),S.stopPropagation())}}))},getBranchControlProps(b){let f=O(b);return t.element(y(g({},Ge.branchControl.attrs),{role:"button",id:f.id,dir:s("dir"),tabIndex:f.focused?0:-1,"data-path":b.indexPath.join("/"),"data-state":f.expanded?"open":"closed","data-disabled":E(f.disabled),"data-selected":E(f.selected),"data-focus":E(f.focused),"data-renaming":E(f.renaming),"data-value":f.value,"data-depth":f.depth,"data-loading":E(f.loading),"aria-busy":X(f.loading),onFocus(S){a({type:"NODE.FOCUS",id:f.value}),S.stopPropagation()},onClick(S){if(f.disabled||f.loading||!pe(S)||st(S.currentTarget)&&xe(S))return;let P=S.metaKey||S.ctrlKey;a({type:"BRANCH_NODE.CLICK",id:f.value,shiftKey:S.shiftKey,ctrlKey:P}),S.stopPropagation()}}))},getBranchTextProps(b){let f=O(b);return t.element(y(g({},Ge.branchText.attrs),{dir:s("dir"),"data-disabled":E(f.disabled),"data-state":f.expanded?"open":"closed","data-loading":E(f.loading)}))},getBranchContentProps(b){let f=O(b);return t.element(y(g({},Ge.branchContent.attrs),{role:"group",dir:s("dir"),"data-state":f.expanded?"open":"closed","data-depth":f.depth,"data-path":b.indexPath.join("/"),"data-value":f.value,hidden:!f.expanded}))},getBranchIndentGuideProps(b){let f=O(b);return t.element(y(g({},Ge.branchIndentGuide.attrs),{"data-depth":f.depth}))},getNodeCheckboxProps(b){let f=O(b),S=f.checked;return t.element(y(g({},Ge.nodeCheckbox.attrs),{tabIndex:-1,role:"checkbox","data-state":S===!0?"checked":S===!1?"unchecked":"indeterminate","aria-checked":S===!0?"true":S===!1?"false":"mixed","data-disabled":E(f.disabled),onClick(P){if(P.defaultPrevented||f.disabled||!pe(P))return;a({type:"CHECKED.TOGGLE",value:f.value,isBranch:f.isBranch}),P.stopPropagation();let V=P.currentTarget.closest("[role=treeitem]");V==null||V.focus({preventScroll:!0})}}))},getNodeRenameInputProps(b){let f=O(b);return t.input(y(g({},Ge.nodeRenameInput.attrs),{id:wf(i,f.value),type:"text","aria-label":"Rename tree item",hidden:!f.renaming,onKeyDown(S){Re(S)||(S.key==="Escape"&&(a({type:"RENAME.CANCEL"}),S.preventDefault()),S.key==="Enter"&&(a({type:"RENAME.SUBMIT",label:S.currentTarget.value}),S.preventDefault()),S.stopPropagation())},onBlur(S){a({type:"RENAME.SUBMIT",label:S.currentTarget.value})}}))}}}function Ra(e,t){let{context:n,prop:i,refs:r}=e;if(!i("loadChildren")){n.set("expandedValue",v=>vt(Ze(v,...t)));return}let s=n.get("loadingStatus"),[a,o]=oo(t,v=>s[v]==="loaded");if(a.length>0&&n.set("expandedValue",v=>vt(Ze(v,...a))),o.length===0)return;let l=i("collection"),[c,d]=oo(o,v=>{let I=l.findNode(v);return l.getNodeChildren(I).length>0});if(c.length>0&&n.set("expandedValue",v=>vt(Ze(v,...c))),d.length===0)return;n.set("loadingStatus",v=>g(g({},v),d.reduce((I,T)=>y(g({},I),{[T]:"loading"}),{})));let h=d.map(v=>{let I=l.getIndexPath(v),T=l.getValuePath(I),O=l.findNode(v);return{id:v,indexPath:I,valuePath:T,node:O}}),m=r.get("pendingAborts"),u=i("loadChildren");vn(u,()=>"[zag-js/tree-view] `loadChildren` is required for async expansion");let p=h.map(({id:v,indexPath:I,valuePath:T,node:O})=>{let b=m.get(v);b&&(b.abort(),m.delete(v));let f=new AbortController;return m.set(v,f),u({valuePath:T,indexPath:I,node:O,signal:f.signal})});Promise.allSettled(p).then(v=>{var f,S;let I=[],T=[],O=n.get("loadingStatus"),b=i("collection");v.forEach((P,V)=>{let{id:A,indexPath:x,node:k,valuePath:N}=h[V];P.status==="fulfilled"?(O[A]="loaded",I.push(A),b=b.replace(x,y(g({},k),{children:P.value}))):(m.delete(A),Reflect.deleteProperty(O,A),T.push({node:k,error:P.reason,indexPath:x,valuePath:N}))}),n.set("loadingStatus",O),I.length&&(n.set("expandedValue",P=>vt(Ze(P,...I))),(f=i("onLoadChildrenComplete"))==null||f({collection:b})),T.length&&((S=i("onLoadChildrenError"))==null||S({nodes:T}))})}function _t(e){let{prop:t,context:n}=e;return function({indexPath:r}){return t("collection").getValuePath(r).slice(0,-1).some(a=>!n.get("expandedValue").includes(a))}}function oi(e,t){let{prop:n,scope:i,computed:r}=e,s=n("scrollToIndexFn");if(!s)return!1;let a=n("collection"),o=r("visibleNodes");for(let l=0;li.getById(nc(i,t))}),!0}return!1}function jV(e){var s;let n=e.querySelectorAll('[data-scope="tree-view"][data-part="branch"], [data-scope="tree-view"][data-part="item"]'),i=[];for(let a of n){let o=a.getAttribute("data-path"),l=a.getAttribute("data-value");if(o==null||l==null)continue;let c=o.split("/").map(m=>parseInt(m,10));if(c.some(Number.isNaN))continue;let d=(s=a.getAttribute("data-name"))!=null?s:l,h=a.getAttribute("data-part")==="branch";i.push({pathArr:c,id:l,name:d,isBranch:h})}i.sort((a,o)=>{let l=Math.min(a.pathArr.length,o.pathArr.length);for(let c=0;c{"use strict";yr();se();_V=U("tree-view").parts("branch","branchContent","branchControl","branchIndentGuide","branchIndicator","branchText","branchTrigger","item","itemIndicator","itemText","label","nodeCheckbox","nodeRenameInput","root","tree"),Ge=_V.build(),tc=e=>new Ao(e);tc.empty=()=>new Ao({rootNode:{children:[]}});GV=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`tree:${e.id}:root`},Tf=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.label)!=null?n:`tree:${e.id}:label`},nc=(e,t)=>{var n,i,r;return(r=(i=(n=e.ids)==null?void 0:n.node)==null?void 0:i.call(n,t))!=null?r:`tree:${e.id}:node:${t}`},ec=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.tree)!=null?n:`tree:${e.id}:tree`},ke=(e,t)=>{var n;t!=null&&((n=e.getById(nc(e,t)))==null||n.focus())},wf=(e,t)=>`tree:${e.id}:rename-input:${t}`,Of=(e,t)=>e.getById(wf(e,t));({and:Gt}=Ee()),KV={props({props:e}){return g({selectionMode:"single",collection:tc.empty(),typeahead:!0,expandOnClick:!0,defaultExpandedValue:[],defaultSelectedValue:[]},e)},initialState(){return"idle"},context({prop:e,bindable:t,getContext:n}){return{expandedValue:t(()=>({defaultValue:e("defaultExpandedValue"),value:e("expandedValue"),isEqual:fe,onChange(i){var a;let s=n().get("focusedValue");(a=e("onExpandedChange"))==null||a({expandedValue:i,focusedValue:s,get expandedNodes(){return e("collection").findNodes(i)}})}})),selectedValue:t(()=>({defaultValue:e("defaultSelectedValue"),value:e("selectedValue"),isEqual:fe,onChange(i){var a;let s=n().get("focusedValue");(a=e("onSelectionChange"))==null||a({selectedValue:i,focusedValue:s,get selectedNodes(){return e("collection").findNodes(i)}})}})),focusedValue:t(()=>({defaultValue:e("defaultFocusedValue")||null,value:e("focusedValue"),onChange(i){var r;(r=e("onFocusChange"))==null||r({focusedValue:i,get focusedNode(){return i?e("collection").findNode(i):null}})}})),loadingStatus:t(()=>({defaultValue:{}})),checkedValue:t(()=>({defaultValue:e("defaultCheckedValue")||[],value:e("checkedValue"),isEqual:fe,onChange(i){var r;(r=e("onCheckedChange"))==null||r({checkedValue:i})}})),renamingValue:t(()=>({sync:!0,defaultValue:null}))}},refs(){return{typeaheadState:g({},Ue.defaultOptions),pendingAborts:new Map}},computed:{isMultipleSelection:({prop:e})=>e("selectionMode")==="multiple",isTypingAhead:({refs:e})=>e.get("typeaheadState").keysSoFar.length>0,visibleNodes:({prop:e,context:t})=>{let n=[];return e("collection").visit({skip:_t({prop:e,context:t}),onEnter:(i,r)=>{n.push({node:i,indexPath:r})}}),n}},on:{"EXPANDED.SET":{actions:["setExpanded"]},"EXPANDED.CLEAR":{actions:["clearExpanded"]},"EXPANDED.ALL":{actions:["expandAllBranches"]},"BRANCH.EXPAND":{actions:["expandBranches"]},"BRANCH.COLLAPSE":{actions:["collapseBranches"]},"SELECTED.SET":{actions:["setSelected"]},"SELECTED.ALL":[{guard:Gt("isMultipleSelection","moveFocus"),actions:["selectAllNodes","focusTreeLastNode"]},{guard:"isMultipleSelection",actions:["selectAllNodes"]}],"SELECTED.CLEAR":{actions:["clearSelected"]},"NODE.SELECT":{actions:["selectNode"]},"NODE.DESELECT":{actions:["deselectNode"]},"CHECKED.TOGGLE":{actions:["toggleChecked"]},"CHECKED.SET":{actions:["setChecked"]},"CHECKED.CLEAR":{actions:["clearChecked"]},"NODE.FOCUS":{actions:["setFocusedNode"]},"NODE.ARROW_DOWN":[{guard:Gt("isShiftKey","isMultipleSelection"),actions:["focusTreeNextNode","extendSelectionToNextNode"]},{actions:["focusTreeNextNode"]}],"NODE.ARROW_UP":[{guard:Gt("isShiftKey","isMultipleSelection"),actions:["focusTreePrevNode","extendSelectionToPrevNode"]},{actions:["focusTreePrevNode"]}],"NODE.ARROW_LEFT":{actions:["focusBranchNode"]},"BRANCH_NODE.ARROW_LEFT":[{guard:"isBranchExpanded",actions:["collapseBranch"]},{actions:["focusBranchNode"]}],"BRANCH_NODE.ARROW_RIGHT":[{guard:Gt("isBranchFocused","isBranchExpanded"),actions:["focusBranchFirstNode"]},{actions:["expandBranch"]}],"SIBLINGS.EXPAND":{actions:["expandSiblingBranches"]},"NODE.HOME":[{guard:Gt("isShiftKey","isMultipleSelection"),actions:["extendSelectionToFirstNode","focusTreeFirstNode"]},{actions:["focusTreeFirstNode"]}],"NODE.END":[{guard:Gt("isShiftKey","isMultipleSelection"),actions:["extendSelectionToLastNode","focusTreeLastNode"]},{actions:["focusTreeLastNode"]}],"NODE.CLICK":[{guard:Gt("isCtrlKey","isMultipleSelection"),actions:["toggleNodeSelection"]},{guard:Gt("isShiftKey","isMultipleSelection"),actions:["extendSelectionToNode"]},{actions:["selectNode"]}],"BRANCH_NODE.CLICK":[{guard:Gt("isCtrlKey","isMultipleSelection"),actions:["toggleNodeSelection"]},{guard:Gt("isShiftKey","isMultipleSelection"),actions:["extendSelectionToNode"]},{guard:"expandOnClick",actions:["selectNode","toggleBranchNode"]},{actions:["selectNode"]}],"BRANCH_TOGGLE.CLICK":{actions:["toggleBranchNode"]},"TREE.TYPEAHEAD":{actions:["focusMatchedNode"]}},exit:["clearPendingAborts"],states:{idle:{on:{"NODE.RENAME":{target:"renaming",actions:["setRenamingValue"]}}},renaming:{entry:["syncRenameInput","focusRenameInput"],on:{"RENAME.SUBMIT":{guard:"isRenameLabelValid",target:"idle",actions:["submitRenaming"]},"RENAME.CANCEL":{target:"idle",actions:["cancelRenaming"]}}}},implementations:{guards:{isBranchFocused:({context:e,event:t})=>e.get("focusedValue")===t.id,isBranchExpanded:({context:e,event:t})=>e.get("expandedValue").includes(t.id),isShiftKey:({event:e})=>e.shiftKey,isCtrlKey:({event:e})=>e.ctrlKey,hasSelectedItems:({context:e})=>e.get("selectedValue").length>0,isMultipleSelection:({prop:e})=>e("selectionMode")==="multiple",moveFocus:({event:e})=>!!e.moveFocus,expandOnClick:({prop:e})=>!!e("expandOnClick"),isRenameLabelValid:({event:e})=>e.label.trim()!==""},actions:{selectNode({context:e,event:t}){let n=t.id||t.value;e.set("selectedValue",i=>n==null?i:!t.isTrusted&&pn(n)?i.concat(...n):[pn(n)?mt(n):n].filter(Boolean))},deselectNode({context:e,event:t}){let n=or(t.id||t.value);e.set("selectedValue",i=>ct(i,...n))},setFocusedNode({context:e,event:t}){e.set("focusedValue",t.id)},clearFocusedNode({context:e}){e.set("focusedValue",null)},clearSelectedItem({context:e}){e.set("selectedValue",[])},toggleBranchNode({context:e,event:t,action:n}){let i=e.get("expandedValue").includes(t.id);n(i?["collapseBranch"]:["expandBranch"])},expandBranch(e){let{event:t}=e;Ra(e,[t.id])},expandBranches(e){let{context:t,event:n}=e,i=or(n.value);Ra(e,fs(i,t.get("expandedValue")))},collapseBranch({context:e,event:t}){e.set("expandedValue",n=>ct(n,t.id))},collapseBranches(e){let{context:t,event:n}=e,i=or(n.value);t.set("expandedValue",r=>ct(r,...i))},setExpanded({context:e,event:t}){pn(t.value)&&e.set("expandedValue",t.value)},clearExpanded({context:e}){e.set("expandedValue",[])},setSelected({context:e,event:t}){pn(t.value)&&e.set("selectedValue",t.value)},clearSelected({context:e}){e.set("selectedValue",[])},focusTreeFirstNode(e){let{prop:t,scope:n}=e,i=t("collection"),r=i.getFirstNode(void 0,{skip:_t(e)});if(!r)return;let s=i.getNodeValue(r);oi(e,s)?H(()=>ke(n,s)):ke(n,s)},focusTreeLastNode(e){let{prop:t,scope:n}=e,i=t("collection"),r=i.getLastNode(void 0,{skip:_t(e)}),s=i.getNodeValue(r);oi(e,s)?H(()=>ke(n,s)):ke(n,s)},focusBranchFirstNode(e){let{event:t,prop:n,scope:i}=e,r=n("collection"),s=r.findNode(t.id),a=r.getFirstNode(s,{skip:_t(e)});if(!a)return;let o=r.getNodeValue(a);oi(e,o)?H(()=>ke(i,o)):ke(i,o)},focusTreeNextNode(e){let{event:t,prop:n,scope:i}=e,r=n("collection"),s=r.getNextNode(t.id,{skip:_t(e)});if(!s)return;let a=r.getNodeValue(s);oi(e,a)?H(()=>ke(i,a)):ke(i,a)},focusTreePrevNode(e){let{event:t,prop:n,scope:i}=e,r=n("collection"),s=r.getPreviousNode(t.id,{skip:_t(e)});if(!s)return;let a=r.getNodeValue(s);oi(e,a)?H(()=>ke(i,a)):ke(i,a)},focusBranchNode(e){let{event:t,prop:n,scope:i}=e,r=n("collection"),s=r.getParentNode(t.id),a=s?r.getNodeValue(s):void 0;if(!a)return;oi(e,a)?H(()=>ke(i,a)):ke(i,a)},selectAllNodes({context:e,prop:t}){e.set("selectedValue",t("collection").getValues())},focusMatchedNode(e){let{context:t,prop:n,refs:i,event:r,scope:s,computed:a}=e,l=a("visibleNodes").map(({node:h})=>({textContent:n("collection").stringifyNode(h),id:n("collection").getNodeValue(h)})),c=Ue(l,{state:i.get("typeaheadState"),activeId:t.get("focusedValue"),key:r.key});if(!(c!=null&&c.id))return;oi(e,c.id)?H(()=>ke(s,c.id)):ke(s,c.id)},toggleNodeSelection({context:e,event:t}){let n=yt(e.get("selectedValue"),t.id);e.set("selectedValue",n)},expandAllBranches(e){let{context:t,prop:n}=e,i=n("collection").getBranchValues(),r=fs(i,t.get("expandedValue"));Ra(e,r)},expandSiblingBranches(e){let{context:t,event:n,prop:i}=e,r=i("collection"),s=r.getIndexPath(n.id);if(!s)return;let o=r.getSiblingNodes(s).map(c=>r.getNodeValue(c)),l=fs(o,t.get("expandedValue"));Ra(e,l)},extendSelectionToNode(e){let{context:t,event:n,prop:i,computed:r}=e,s=i("collection"),a=lt(t.get("selectedValue"))||s.getNodeValue(s.getFirstNode()),o=n.id,l=[a,o],c=0;r("visibleNodes").forEach(({node:h})=>{let m=s.getNodeValue(h);c===1&&l.push(m),(m===a||m===o)&&c++}),t.set("selectedValue",vt(l))},extendSelectionToNextNode(e){let{context:t,event:n,prop:i}=e,r=i("collection"),s=r.getNextNode(n.id,{skip:_t(e)});if(!s)return;let a=new Set(t.get("selectedValue")),o=r.getNodeValue(s);o!=null&&(a.has(n.id)&&a.has(o)?a.delete(n.id):a.has(o)||a.add(o),t.set("selectedValue",Array.from(a)))},extendSelectionToPrevNode(e){let{context:t,event:n,prop:i}=e,r=i("collection"),s=r.getPreviousNode(n.id,{skip:_t(e)});if(!s)return;let a=new Set(t.get("selectedValue")),o=r.getNodeValue(s);o!=null&&(a.has(n.id)&&a.has(o)?a.delete(n.id):a.has(o)||a.add(o),t.set("selectedValue",Array.from(a)))},extendSelectionToFirstNode(e){let{context:t,prop:n}=e,i=n("collection"),r=lt(t.get("selectedValue")),s=[];i.visit({skip:_t(e),onEnter:a=>{let o=i.getNodeValue(a);if(s.push(o),o===r)return"stop"}}),t.set("selectedValue",s)},extendSelectionToLastNode(e){let{context:t,prop:n}=e,i=n("collection"),r=lt(t.get("selectedValue")),s=[],a=!1;i.visit({skip:_t(e),onEnter:o=>{let l=i.getNodeValue(o);l===r&&(a=!0),a&&s.push(l)}}),t.set("selectedValue",s)},clearPendingAborts({refs:e}){let t=e.get("pendingAborts");t.forEach(n=>n.abort()),t.clear()},toggleChecked({context:e,event:t,prop:n}){let i=n("collection");e.set("checkedValue",r=>t.isBranch?UV(i,t.value,r):yt(r,t.value))},setChecked({context:e,event:t}){e.set("checkedValue",t.value)},clearChecked({context:e}){e.set("checkedValue",[])},setRenamingValue({context:e,event:t,prop:n}){e.set("renamingValue",t.value);let i=n("onRenameStart");if(i){let r=n("collection"),s=r.getIndexPath(t.value);if(s){let a=r.at(s);a&&i({value:t.value,node:a,indexPath:s})}}},submitRenaming({context:e,event:t,prop:n,scope:i}){var c;let r=e.get("renamingValue");if(!r)return;let a=n("collection").getIndexPath(r);if(!a)return;let o=t.label.trim(),l=n("onBeforeRename");if(l&&!l({value:r,label:o,indexPath:a})){e.set("renamingValue",null),ke(i,r);return}(c=n("onRenameComplete"))==null||c({value:r,label:o,indexPath:a}),e.set("renamingValue",null),ke(i,r)},cancelRenaming({context:e,scope:t}){let n=e.get("renamingValue");e.set("renamingValue",null),n&&ke(t,n)},syncRenameInput({context:e,scope:t,prop:n}){let i=e.get("renamingValue");if(!i)return;let r=n("collection"),s=r.findNode(i);if(!s)return;let a=r.stringifyNode(s),o=Of(t,i);Me(o,a)},focusRenameInput({context:e,scope:t}){let n=e.get("renamingValue");if(!n)return;let i=Of(t,n);i&&(i.focus(),i.select())}}}};zV=_()(["ids","collection","dir","expandedValue","expandOnClick","defaultFocusedValue","focusedValue","getRootNode","id","onExpandedChange","onFocusChange","onSelectionChange","checkedValue","selectedValue","selectionMode","typeahead","defaultExpandedValue","defaultSelectedValue","defaultCheckedValue","onCheckedChange","onLoadChildrenComplete","onLoadChildrenError","loadChildren","canRename","onRenameStart","onBeforeRename","onRenameComplete","scrollToIndexFn"]),Ok=B(zV),YV=_()(["node","indexPath"]),wk=B(YV);XV=class extends K{constructor(t,n){var s;let i=(s=n.treeData)!=null?s:jV(t),r=tc({nodeToValue:a=>a.id,nodeToString:a=>a.name,rootNode:i});super(t,y(g({},n),{collection:r}));Y(this,"treeCollection");Y(this,"syncTree",()=>{let t=this.el.querySelector('[data-scope="tree-view"][data-part="tree"]');t&&(this.spreadProps(t,this.api.getTreeProps()),this.updateExistingTree(t))});this.treeCollection=r}initMachine(t){return new W(KV,g({},t))}initApi(){return WV(this.machine.service,q)}getNodeAt(t){var i;if(t.length===0)return;let n=this.treeCollection.rootNode;for(let r of t)if(n=(i=n==null?void 0:n.children)==null?void 0:i[r],!n)return;return n}updateExistingTree(t){this.spreadProps(t,this.api.getTreeProps());let n=t.querySelectorAll('[data-scope="tree-view"][data-part="branch"]');for(let r of n){let s=r.getAttribute("data-path");if(s==null)continue;let a=s.split("/").map(p=>parseInt(p,10)),o=this.getNodeAt(a);if(!o)continue;let l={indexPath:a,node:o};this.spreadProps(r,this.api.getBranchProps(l));let c=r.querySelector('[data-scope="tree-view"][data-part="branch-control"]');c&&this.spreadProps(c,this.api.getBranchControlProps(l));let d=r.querySelector('[data-scope="tree-view"][data-part="branch-text"]');d&&this.spreadProps(d,this.api.getBranchTextProps(l));let h=r.querySelector('[data-scope="tree-view"][data-part="branch-indicator"]');h&&this.spreadProps(h,this.api.getBranchIndicatorProps(l));let m=r.querySelector('[data-scope="tree-view"][data-part="branch-content"]');m&&this.spreadProps(m,this.api.getBranchContentProps(l));let u=r.querySelector('[data-scope="tree-view"][data-part="branch-indent-guide"]');u&&this.spreadProps(u,this.api.getBranchIndentGuideProps(l))}let i=t.querySelectorAll('[data-scope="tree-view"][data-part="item"]');for(let r of i){let s=r.getAttribute("data-path");if(s==null)continue;let a=s.split("/").map(c=>parseInt(c,10)),o=this.getNodeAt(a);if(!o)continue;let l={indexPath:a,node:o};this.spreadProps(r,this.api.getItemProps(l))}}render(){var i;let t=(i=this.el.querySelector('[data-scope="tree-view"][data-part="root"]'))!=null?i:this.el;this.spreadProps(t,this.api.getRootProps());let n=this.el.querySelector('[data-scope="tree-view"][data-part="label"]');n&&this.spreadProps(n,this.api.getLabelProps()),this.syncTree()}},ZV={mounted(){var i;let e=this.el,t=this.pushEvent.bind(this),n=new XV(e,y(g({id:e.id},C(e,"controlled")?{expandedValue:Z(e,"expandedValue"),selectedValue:Z(e,"selectedValue")}:{defaultExpandedValue:Z(e,"defaultExpandedValue"),defaultSelectedValue:Z(e,"defaultSelectedValue")}),{selectionMode:(i=w(e,"selectionMode",["single","multiple"]))!=null?i:"single",dir:Oe(e),onSelectionChange:r=>{var u;let s=C(e,"redirect"),a=(u=r.selectedValue)!=null&&u.length?r.selectedValue[0]:void 0,o=[...e.querySelectorAll('[data-scope="tree-view"][data-part="item"], [data-scope="tree-view"][data-part="branch"]')].find(p=>p.getAttribute("data-value")===a),l=(o==null?void 0:o.getAttribute("data-part"))==="item",c=o==null?void 0:o.getAttribute("data-redirect"),d=o==null?void 0:o.hasAttribute("data-new-tab");s&&a&&l&&this.liveSocket.main.isDead&&c!=="false"&&(d?window.open(a,"_blank","noopener,noreferrer"):window.location.href=a);let m=w(e,"onSelectionChange");m&&this.liveSocket.main.isConnected()&&t(m,{id:e.id,value:y(g({},r),{isItem:l!=null?l:!1})})},onExpandedChange:r=>{let s=w(e,"onExpandedChange");s&&this.liveSocket.main.isConnected()&&t(s,{id:e.id,value:r})}}));n.init(),this.treeView=n,this.onSetExpandedValue=r=>{let{value:s}=r.detail;n.api.setExpandedValue(s)},e.addEventListener("phx:tree-view:set-expanded-value",this.onSetExpandedValue),this.onSetSelectedValue=r=>{let{value:s}=r.detail;n.api.setSelectedValue(s)},e.addEventListener("phx:tree-view:set-selected-value",this.onSetSelectedValue),this.handlers=[],this.handlers.push(this.handleEvent("tree_view_set_expanded_value",r=>{let s=r.tree_view_id;s&&e.id!==s&&e.id!==`tree-view:${s}`||n.api.setExpandedValue(r.value)})),this.handlers.push(this.handleEvent("tree_view_set_selected_value",r=>{let s=r.tree_view_id;s&&e.id!==s&&e.id!==`tree-view:${s}`||n.api.setSelectedValue(r.value)})),this.handlers.push(this.handleEvent("tree_view_expanded_value",()=>{t("tree_view_expanded_value_response",{value:n.api.expandedValue})})),this.handlers.push(this.handleEvent("tree_view_selected_value",()=>{t("tree_view_selected_value_response",{value:n.api.selectedValue})}))},updated(){var e;C(this.el,"controlled")&&((e=this.treeView)==null||e.updateProps({expandedValue:Z(this.el,"expandedValue"),selectedValue:Z(this.el,"selectedValue")}))},destroyed(){var e;if(this.onSetExpandedValue&&this.el.removeEventListener("phx:tree-view:set-expanded-value",this.onSetExpandedValue),this.onSetSelectedValue&&this.el.removeEventListener("phx:tree-view:set-selected-value",this.onSetSelectedValue),this.handlers)for(let t of this.handlers)this.removeHandleEvent(t);(e=this.treeView)==null||e.destroy()}}});var e0={};he(e0,{Hooks:()=>Da,default:()=>QV,hooks:()=>JV});function me(e,t){return{mounted(){return Ve(this,null,function*(){let r=(yield e())[t];if(this._realHook=r,r!=null&&r.mounted)return r.mounted.call(this)})},updated(){var i,r;(r=(i=this._realHook)==null?void 0:i.updated)==null||r.call(this)},destroyed(){var i,r;(r=(i=this._realHook)==null?void 0:i.destroyed)==null||r.call(this)},disconnected(){var i,r;(r=(i=this._realHook)==null?void 0:i.disconnected)==null||r.call(this)},reconnected(){var i,r;(r=(i=this._realHook)==null?void 0:i.reconnected)==null||r.call(this)},beforeUpdate(){var i,r;(r=(i=this._realHook)==null?void 0:i.beforeUpdate)==null||r.call(this)}}}var Da={Accordion:me(()=>Promise.resolve().then(()=>(dd(),cd)),"Accordion"),AngleSlider:me(()=>Promise.resolve().then(()=>(Rd(),Nd)),"AngleSlider"),Avatar:me(()=>Promise.resolve().then(()=>(Fd(),Md)),"Avatar"),Carousel:me(()=>Promise.resolve().then(()=>(Wd(),qd)),"Carousel"),Checkbox:me(()=>Promise.resolve().then(()=>(eu(),Qd)),"Checkbox"),Clipboard:me(()=>Promise.resolve().then(()=>(nu(),tu)),"Clipboard"),Collapsible:me(()=>Promise.resolve().then(()=>(ru(),iu)),"Collapsible"),Combobox:me(()=>Promise.resolve().then(()=>(ih(),nh)),"Combobox"),DatePicker:me(()=>Promise.resolve().then(()=>(tg(),eg)),"DatePicker"),Dialog:me(()=>Promise.resolve().then(()=>(ug(),dg)),"Dialog"),Editable:me(()=>Promise.resolve().then(()=>(vg(),mg)),"Editable"),FloatingPanel:me(()=>Promise.resolve().then(()=>(xg(),Vg)),"FloatingPanel"),Listbox:me(()=>Promise.resolve().then(()=>(Lg(),Dg)),"Listbox"),Menu:me(()=>Promise.resolve().then(()=>(qg(),Ug)),"Menu"),NumberInput:me(()=>Promise.resolve().then(()=>(sp(),rp)),"NumberInput"),PasswordInput:me(()=>Promise.resolve().then(()=>(op(),ap)),"PasswordInput"),PinInput:me(()=>Promise.resolve().then(()=>(hp(),up)),"PinInput"),RadioGroup:me(()=>Promise.resolve().then(()=>(yp(),vp)),"RadioGroup"),Select:me(()=>Promise.resolve().then(()=>(Op(),Tp)),"Select"),SignaturePad:me(()=>Promise.resolve().then(()=>(zp(),Kp)),"SignaturePad"),Switch:me(()=>Promise.resolve().then(()=>(Jp(),Zp)),"Switch"),Tabs:me(()=>Promise.resolve().then(()=>(rf(),nf)),"Tabs"),Timer:me(()=>Promise.resolve().then(()=>(lf(),of)),"Timer"),Toast:me(()=>Promise.resolve().then(()=>(yf(),vf)),"Toast"),ToggleGroup:me(()=>Promise.resolve().then(()=>(Sf(),Cf)),"ToggleGroup"),TreeView:me(()=>Promise.resolve().then(()=>(Af(),xf)),"TreeView")};function JV(e){return Object.fromEntries(e.filter(t=>t in Da).map(t=>[t,Da[t]]))}var QV=Da;return Uf(e0);})(); From e4793ed7982bbe8d7e18a480fd16ca8c1c4ae2a1 Mon Sep 17 00:00:00 2001 From: karimsemmoud Date: Thu, 19 Feb 2026 12:01:03 +0700 Subject: [PATCH 3/9] ipdate design --- priv/design/components/accordion.css | 22 +- priv/design/components/angle-slider.css | 255 ++++++++++++++++++++++ priv/design/components/avatar.css | 90 ++++++++ priv/design/components/carousel.css | 200 +++++++++++++++++ priv/design/components/editable.css | 111 ++++++++++ priv/design/components/floating-panel.css | 139 ++++++++++++ priv/design/components/layout.css | 13 +- priv/design/components/listbox.css | 117 ++++++++++ priv/design/components/number-input.css | 68 ++++++ priv/design/components/password-input.css | 54 +++++ priv/design/components/pin-input.css | 41 ++++ priv/design/components/radio-group.css | 107 +++++++++ priv/design/components/timer.css | 88 ++++++++ priv/design/utilities.css | 1 + 14 files changed, 1297 insertions(+), 9 deletions(-) create mode 100644 priv/design/components/angle-slider.css create mode 100644 priv/design/components/avatar.css create mode 100644 priv/design/components/carousel.css create mode 100644 priv/design/components/editable.css create mode 100644 priv/design/components/floating-panel.css create mode 100644 priv/design/components/listbox.css create mode 100644 priv/design/components/number-input.css create mode 100644 priv/design/components/password-input.css create mode 100644 priv/design/components/pin-input.css create mode 100644 priv/design/components/radio-group.css create mode 100644 priv/design/components/timer.css diff --git a/priv/design/components/accordion.css b/priv/design/components/accordion.css index 3ae7645..3f8e3b9 100644 --- a/priv/design/components/accordion.css +++ b/priv/design/components/accordion.css @@ -35,17 +35,25 @@ .accordion [data-scope="accordion"][data-part="item-text"] { width: 100%; + display: flex; + align-items: center; + gap: var(--spacing-ui-gap); } - .accordion [data-scope="accordion"][data-part="item"][data-state="closed"] [data-scope="accordion"][data-part="item-indicator"][data-open], - .accordion [data-scope="accordion"][data-part="item"][data-state="open"] [data-scope="accordion"][data-part="item-indicator"][data-closed] { - display: none; - transform: none; + .accordion [data-scope="accordion"][data-part="item"][data-state="closed"] [data-scope="accordion"][data-part="item-indicator"] .state-open, + .accordion [data-scope="accordion"][data-part="item"][data-state="open"] [data-scope="accordion"][data-part="item-indicator"] .state-closed { + @apply ui-icon; + + display: none!important; + } - .accordion [data-scope="accordion"][data-part="item"][data-state="open"] [data-scope="accordion"][data-part="item-indicator"][data-open], - .accordion [data-scope="accordion"][data-part="item"][data-state="closed"] [data-scope="accordion"][data-part="item-indicator"][data-closed] { - transform: none; + .accordion [data-scope="accordion"][data-part="item"][data-state="open"] [data-scope="accordion"][data-part="item-indicator"] .state-open, + .accordion [data-scope="accordion"][data-part="item"][data-state="closed"] [data-scope="accordion"][data-part="item-indicator"] .state-closed { + @apply ui-icon; + + display: inline-block; + transform: rotate(-90deg)!important; } .accordion [data-scope="accordion"][data-part="item-content"] { diff --git a/priv/design/components/angle-slider.css b/priv/design/components/angle-slider.css new file mode 100644 index 0000000..65b83d4 --- /dev/null +++ b/priv/design/components/angle-slider.css @@ -0,0 +1,255 @@ +@import "../main.css"; + +@layer components { + .angle-slider [data-scope="angle-slider"][data-part="root"] { + @apply ui-root; + + max-width: var(--container-micro); + gap: var(--spacing-ui-gap); + padding: var(--spacing-ui-padding); + background-color: var(--color-root); + color: var(--color-root--text); + border-radius: var(--radius-ui); + border: 1px solid var(--color-root--border); + position: relative; + } + + .angle-slider + [data-scope="angle-slider"][data-part="root"][data-disabled] { + opacity: 0.6; + cursor: not-allowed; + } + + + .angle-slider [data-scope="angle-slider"][data-part="label"] { + @apply ui-label; + } + + .angle-slider [data-scope="angle-slider"][data-part="control"] { + --size: calc(var(--spacing-ui) * 2); + --thumb-size: var(--spacing-ui); + --thumb-indicator-size: min(var(--thumb-size), calc(var(--size) / 2)); + + width: var(--size); + height: var(--size); + border-radius: var(--radius-full); + border: 1px solid var(--color-ui--border); + background-color: var(--color-ui); + margin-inline: auto; + display: flex; + align-items: center; + justify-content: center; + user-select: none; + position: relative; + } + + .angle-slider [data-scope="angle-slider"][data-part="thumb"] { + position: absolute; + inset: 0 0 0 calc(50% - 1px); + pointer-events: none; + width: var(--spacing-micro-sm); + color: var(--color-ui--text); + } + + .angle-slider [data-scope="angle-slider"][data-part="thumb"]:focus-visible { + outline: none; + } + + .angle-slider [data-scope="angle-slider"][data-part="thumb"]::before { + content: ""; + position: absolute; + right: 0; + top: 0; + height: var(--thumb-indicator-size); + width: var(--spacing-micro-sm); + background-color: var(--color-ui--text); + border-radius: var(--radius-ui); + } + + .angle-slider + [data-scope="angle-slider"][data-part="thumb"]:focus-visible::before { + outline: 1px solid var(--color-ui--text); + outline-offset: 2px; + } + + .angle-slider [data-scope="angle-slider"][data-part="marker-group"] { + position: absolute; + inset: 1px; + border-radius: var(--radius-full); + pointer-events: none; + } + + .angle-slider [data-scope="angle-slider"][data-part="marker"] { + width: 2px; + position: absolute; + top: 0; + bottom: 0; + left: calc(50% - 1px); + } + + .angle-slider [data-scope="angle-slider"][data-part="marker"]::before { + content: ""; + position: absolute; + top: calc(var(--thumb-size) / 4); + left: 0.5px; + width: 1px; + height: calc(var(--thumb-size) / 2); + transform: translate(-50%, -50%); + background-color: var(--marker-color); + border-radius: 1px; + } + + .angle-slider + [data-scope="angle-slider"][data-part="marker"][data-state="under-value"] { + --marker-color: var(--color-ui--text); + } + + .angle-slider + [data-scope="angle-slider"][data-part="marker"][data-state="under-value"]::before { + width: 3px; + } + + .angle-slider + [data-scope="angle-slider"][data-part="marker"][data-state="at-value"] { + display: none; + } + + .angle-slider + [data-scope="angle-slider"][data-part="marker"][data-state="over-value"] { + --marker-color: var(--color-ui--muted); + + width: var(--spacing-micro-sm); + } + + .angle-slider [data-scope="angle-slider"][data-part="value-text"] { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + gap: var(--spacing-ui-gap-sm); + width: auto; + } + + .angle-slider + [data-scope="angle-slider"][data-part="value-text"] + [data-part="text"], + .angle-slider + [data-scope="angle-slider"][data-part="value-text"] + [data-part="value"] { + display: flex; + width: auto; + align-items: baseline; + font-size: var(--text-ui); + line-height: var(--text-ui--line-height); + font-weight: var(--font-weight-ui); + color: var(--color-ui--text); + } + + .angle-slider + [data-scope="angle-slider"][data-part="root"][data-invalid] + [data-scope="angle-slider"][data-part="control"] { + border-color: var(--color-root--alert); + } + + .angle-slider + [data-scope="angle-slider"][data-part="root"][data-invalid] + [data-scope="angle-slider"][data-part="value-text"] + [data-part="text"], + .angle-slider + [data-scope="angle-slider"][data-part="root"][data-invalid] + [data-scope="angle-slider"][data-part="value-text"] + [data-part="value"] { + color: var(--color-root--alert); + } + + .angle-slider + [data-scope="angle-slider"][data-part="root"][data-invalid] + [data-scope="angle-slider"][data-part="thumb"]::before { + background-color: var(--color-root--alert); + } + + .angle-slider + [data-scope="angle-slider"][data-part="root"][data-invalid] + [data-scope="angle-slider"][data-part="marker"][data-state="under-value"] { + --marker-color: var(--color-root--alert); + } + + /* .angle-slider + [data-scope="angle-slider"][data-part="root"][data-readonly], + .angle-slider + [data-scope="angle-slider"][data-part="root"][data-read-only] { + padding-inline-end: var(--spacing-ui-padding); + } */ + + .angle-slider + [data-scope="angle-slider"][data-part="root"][data-readonly]::after, + .angle-slider + [data-scope="angle-slider"][data-part="root"][data-read-only]::after { + content: ""; + position: absolute; + bottom: var(--spacing-ui-padding); + right: var(--spacing-ui-padding); + width: 1em; + height: 1em; + background-color: var(--color-ui--muted); + mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M10 1a4.5 4.5 0 0 0-4.5 4.5V9H5a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2h-.5V5.5A4.5 4.5 0 0 0 10 1ZM8.5 5.5V9H14V5.5a3.5 3.5 0 1 0-7 0Z' clip-rule='evenodd'/%3E%3C/svg%3E"); + mask-size: contain; + mask-repeat: no-repeat; + mask-position: center; + } + + .angle-slider [data-scope="angle-slider"][data-part="hidden-input"] { + display: none; + } +} + +@utility angle-slider--* { + [data-scope="angle-slider"][data-part="root"] { + max-width: --value(--container-micro-*, [length]); + gap: --value(--spacing-micro-gap-*, [length]); + padding: --value(--spacing-micro-padding-*, [length]); + } + + [data-scope="angle-slider"][data-part="label"] { + font-size: --value(--text-ui-*, [length]); + line-height: --value(--text-ui-* --line-height, [length]); + } + + [data-scope="angle-slider"][data-part="control"] { + font-size: --value(--text-ui-*, [length]); + line-height: --value(--text-ui-* --line-height, [length]); + min-height: --value(--spacing-ui-*, [length]); + background-color: --value(--color-ui-*, [color]); + color: --value(--color-ui-* --text, [color]); + border-color: --value(--color-ui-* --border, [color]); + + --size: calc(--value(--spacing-ui-*, [length]) * 2); + --thumb-size: --value(--spacing-ui-*, [length]); + } + + [data-scope="angle-slider"][data-part="thumb"]::before { + background-color: --value(--color-ui-* --text, [color]); + } + + [data-scope="angle-slider"][data-part="marker"] { + --marker-color: --value(--color-ui-* --muted, [color]); + } + + [data-scope="angle-slider"][data-part="marker"][data-state="under-value"] { + --marker-color: --value(--color-ui-* --text, [color]); + } + + [data-scope="angle-slider"][data-part="marker"][data-state="over-value"] { + --marker-color: --value(--color-ui-* --muted, [color]); + } + + [data-scope="angle-slider"][data-part="value-text"] [data-part="value"] { + font-size: --value(--text-ui-*, [length]); + line-height: --value(--text-ui-* --line-height, [length]); + } + + [data-scope="angle-slider"][data-part="value-text"] [data-part="text"] { + font-size: --value(--text-ui-*, [length]); + line-height: --value(--text-ui-* --line-height, [length]); + } +} diff --git a/priv/design/components/avatar.css b/priv/design/components/avatar.css new file mode 100644 index 0000000..ff89902 --- /dev/null +++ b/priv/design/components/avatar.css @@ -0,0 +1,90 @@ +@import "../main.css"; + +@layer components { + .avatar [data-scope="avatar"][data-part="root"] { + @apply ui-root; + + max-width: var(--spacing-ui); + } + + .avatar [data-scope="avatar"][data-part="fallback"] { + display: inline-flex; + align-items: center; + justify-content: center; + text-align: start; + width: var(--spacing-ui); + aspect-ratio: 1 / 1; + font-size: var(--text-ui); + line-height: var(--text-ui--line-height); + font-weight: var(--font-weight-ui); + border-radius: var(--radius-full); + border: 1px solid var(--color-ui--border); + gap: var(--spacing-ui-gap); + height: var(--spacing-ui); + color: var(--color-ui--text); + background-color: var(--color-ui); + } + + .avatar [data-scope="avatar"][data-part="image"] { + display: flex; + align-items: center; + justify-content: center; + height: 100%; + } + + .avatar [data-scope="avatar"][data-part="skeleton"] { + display: block; + width: var(--spacing-ui); + aspect-ratio: 1 / 1; + border-radius: var(--radius-full); + background: linear-gradient( + 90deg, + var(--color-ui--muted) 0%, + var(--color-ui--border) 50%, + var(--color-ui--muted) 100% + ); + background-size: 200% 100%; + animation: avatar-skeleton-loading 1.2s ease-in-out infinite; + } + + .avatar [data-scope="avatar"][data-part="skeleton"][data-state="hidden"] { + display: none; + } + + .avatar.avatar--square [data-scope="avatar"][data-part="skeleton"] { + border-radius: var(--radius-ui); + } + + .avatar.avatar--square [data-scope="avatar"][data-part="root"] { + border-radius: var(--radius-ui); + } + + .avatar.avatar--square [data-scope="avatar"][data-part="fallback"] { + border-radius: var(--radius-ui); + } +} + +@keyframes avatar-skeleton-loading { + 0% { + background-position: 200% 0; + } + 100% { + background-position: -200% 0; + } +} + +@utility avatar--* { + [data-scope="avatar"][data-part="root"] { + max-width: --value(--spacing-ui-*, [length]); + } + + [data-scope="avatar"][data-part="fallback"] { + font-size: --value(--text-ui-*, [length]); + line-height: --value(--text-ui-* --line-height, [length]); + width: --value(--spacing-ui-*, [length]); + height: --value(--spacing-ui-*, [length]); + background-color: --value(--color-ui-*, [color]); + color: --value(--color-ui-* --text, [color]); + border-color: --value(--color-ui-* --border, [color]); + } +} diff --git a/priv/design/components/carousel.css b/priv/design/components/carousel.css new file mode 100644 index 0000000..e6ad805 --- /dev/null +++ b/priv/design/components/carousel.css @@ -0,0 +1,200 @@ +@import "../main.css"; + +@layer components { + .carousel [data-scope="carousel"][data-part="root"] { + @apply ui-root; + + max-width: var(--container-ui); + max-height: var(--container-ui); + gap: var(--spacing-ui-gap); + justify-content: center; + position: relative; + } + + .carousel [data-scope="carousel"][data-part="control"] { + display: flex; + position: absolute; + flex-direction: column; + width: auto; + padding: var(--spacing-mini-padding-sm); + max-width: var(--container-mini); + overflow: hidden; + gap: var(--spacing-mini-gap); + justify-content: center; + border-radius: var(--radius-ui); + + &[data-orientation="horizontal"] { + flex-direction: row; + bottom: var(--spacing-mini-padding); + } + + &[data-orientation="vertical"] { + flex-flow: column nowrap; + max-height: var(--container-mini); + right: var(--spacing-mini-padding); + + & [data-scope="carousel"][data-part="prev-trigger"], + & [data-scope="carousel"][data-part="next-trigger"], + & [data-scope="carousel"][data-part="autoplay-trigger"] { + transform: rotate(90deg); + } + } + } + + .carousel [data-scope="carousel"][data-part="prev-trigger"], + .carousel [data-scope="carousel"][data-part="next-trigger"], + .carousel [data-scope="carousel"][data-part="autoplay-trigger"] { + @apply ui-trigger; + + padding: 0; + aspect-ratio: 1/1; + gap: var(--spacing-min-gap); + min-height: var(--spacing-mini); + border: 0; + + &[disabled="true"] { + visibility: hidden; + } + } + + .carousel [data-scope="carousel"][data-part="item-group"] { + overflow: hidden; + align-self: stretch; + border-radius: var(--radius-ui); + scrollbar-width: none; + -webkit-scrollbar-width: none; + -ms-overflow-style: none; + + &::-webkit-scrollbar { + display: none; + } + } + + .carousel [data-scope="carousel"][data-part="item"] { + display: flex; + justify-content: center; + align-items: center; + font-size: 24px; + border: 1px solid var(--color-ui--border); + border-radius: var(--radius-ui); + } + + .carousel [data-scope="carousel"][data-part="item"] img { + margin: 0; + object-fit: cover; + border-radius: var(--radius-ui); + } + + .carousel + [data-scope="carousel"][data-part="item"][data-orientation="horizontal"] + img { + height: 100%; + width: 100%; + } + + .carousel + [data-scope="carousel"][data-part="item"][data-orientation="vertical"] + img { + height: 100%; + width: 100%; + } + + .carousel [data-scope="carousel"][data-part="indicator-group"] { + display: flex; + flex-wrap: wrap; + justify-content: center; + align-items: center; + gap: var(--spacing-mini-gap); + + &[data-orientation="horizontal"] { + flex-direction: row; + height: auto; + } + + &[data-orientation="vertical"] { + flex-direction: column; + height: auto; + } + } + + .carousel [data-scope="carousel"][data-part="indicator"] { + @apply ui-trigger; + + min-height: var(--spacing-micro-xl); + min-width: var(--spacing-micro-xl); + aspect-ratio: 1/1; + border-radius: var(--radius-full); + background-color: var(--color-ui); + padding: 0; + transition: background-color 0.2s ease-in-out; + } + + .carousel [data-scope="carousel"][data-part="indicator"][data-current] { + background-color: var(--color-ui-accent); + } + + .carousel + [data-scope="carousel"][data-part="autoplay-trigger"][data-pressed] + [data-play] { + display: none; + } + + .carousel + [data-scope="carousel"][data-part="autoplay-trigger"]:not([data-pressed]) + [data-pause] { + display: none; + } +} + +@utility carousel--* { + [data-scope="carousel"][data-part="root"] { + max-width: --value(--container-ui-*, [length]); + max-height: --value(--container-ui-*, [length]); + gap: --value(--spacing-ui-gap-*, [length]); + } + + [data-scope="carousel"][data-part="control"] { + max-width: --value(--container-mini-*, [length]); + padding: --value(--spacing-mini-padding-*, [length]); + gap: --value(--spacing-mini-gap-*, [length]); + } + + [data-scope="carousel"][data-part="next-trigger"], + [data-scope="carousel"][data-part="prev-trigger"], + [data-scope="carousel"][data-part="autoplay-trigger"] { + gap: --value(--spacing-mini-gap-*, [length]); + min-height: --value(--spacing-mini-*, [length]); + font-size: --value(--text-ui-*, [length]); + line-height: --value(--text-ui-* --line-height, [length]); + background-color: --value(--color-ui-*, [color]); + color: --value(--color-ui-* --text, [color]); + border-color: --value(--color-ui-* --border, [color]); + } + + [data-scope="carousel"][data-part="next-trigger"]:hover, + [data-scope="carousel"][data-part="prev-trigger"]:hover, + [data-scope="carousel"][data-part="autoplay-trigger"]:hover { + background-color: --value(--color-ui-* -hover, [color]); + } + + [data-scope="carousel"][data-part="next-trigger"]:active, + [data-scope="carousel"][data-part="prev-trigger"]:active, + [data-scope="carousel"][data-part="autoplay-trigger"]:active { + background-color: --value(--color-ui-* -active, [color]); + } + + [data-scope="carousel"][data-part="next-trigger"]:focus-visible, + [data-scope="carousel"][data-part="prev-trigger"]:focus-visible, + [data-scope="carousel"][data-part="autoplay-trigger"]:focus-visible { + outline-color: --value(--color-ui-* --text, [color]); + } + + [data-scope="carousel"][data-part="indicator"] { + min-height: --value(--spacing-micro-*, [length]); + min-width: --value(--spacing-micro-*, [length]); + } + + [data-scope="carousel"][data-part="indicator"][data-current] { + background-color: --value(--color-ui-*, [color]); + } +} diff --git a/priv/design/components/editable.css b/priv/design/components/editable.css new file mode 100644 index 0000000..e569ed1 --- /dev/null +++ b/priv/design/components/editable.css @@ -0,0 +1,111 @@ +@import "../main.css"; + +@layer components { + .editable [data-scope="editable"][data-part="root"] { + @apply ui-root; + + width: 100%; + max-width: var(--container-ui); + } + .editable [data-scope="editable"][data-part="control"] { + display: flex; + flex-direction: row; + gap: var(--spacing-mini-gap); + min-height: var(--spacing-ui); + width: 100%; + align-items: center; + justify-content: start; + max-width: var(--container-mini); + + } + + .editable [data-scope="editable"][data-part="area"] { + display: flex; + min-height: var(--spacing-ui); + flex: 1 1 auto; + align-items: center; + justify-content: start; + max-width: var(--container-mini); + gap: var(--spacing-mini-gap); + } + + .editable [data-scope="editable"][data-part="input"] { + @apply ui-input; + + flex: 1 1 auto; + width: 100%; + max-width: none; + } + + .editable [data-scope="editable"][data-part="preview"] { + @apply ui-input; + + flex: 1 1 auto; + width: 100%; + min-width: 0; + max-width: none; + text-wrap: nowrap; + } + + .editable [data-part="triggers"] { + display: inline-flex; + align-items: center; + min-height: var(--spacing-ui); + flex: 1 1 auto; + gap: var(--spacing-mini-gap); + } + + .editable [data-scope="editable"][data-part="edit-trigger"], + .editable [data-scope="editable"][data-part="cancel-trigger"], + .editable [data-scope="editable"][data-part="submit-trigger"] { + @apply ui-trigger ui-trigger--square; + } + + .editable [data-scope="editable"][data-part="cancel-trigger"] { + @apply ui-trigger--alert; + } + + .editable [data-scope="editable"][data-part="submit-trigger"] { + @apply ui-trigger--success; + } +} + +@utility editable--* { + [data-scope="editable"][data-part="root"] { + max-width: --value(--container-mini-*, [length]); + gap: --value(--spacing-mini-gap-*, [length]); + } + + [data-scope="editable"][data-part="edit-trigger"], + [data-scope="editable"][data-part="cancel-trigger"], + [data-scope="editable"][data-part="submit-trigger"] { + font-size: --value(--text-ui-*, [length]); + line-height: --value(--text-ui-* --line-height, [length]); + min-height: --value(--spacing-ui-*, [length]); + padding-inline: --value(--spacing-ui-padding-*, [length]); + gap: --value(--spacing-ui-gap-*, [length]); + } + + [data-scope="editable"][data-part="edit-trigger"]::placeholder, + [data-scope="editable"][data-part="cancel-trigger"]::placeholder, + [data-scope="editable"][data-part="submit-trigger"]::placeholder { + color: --value(--color-root--*, [color]); + } + + /* [data-scope="editable"][data-part="area"] { + max-height: --value(--spacing-ui-*, [length]); + } */ + + [data-scope="editable"][data-part="preview"] { + font-size: --value(--text-ui-*, [length]); + line-height: --value(--text-ui-* --line-height, [length]); + min-height: --value(--spacing-ui-*, [length]); + max-width: --value(--container-mini-*, [length]); + } + + [data-scope="editable"][data-part="input"] { + font-size: --value(--text-ui-*, [length]); + line-height: --value(--text-ui-* --line-height, [length]); + min-height: --value(--spacing-ui-*, [length]); + } +} diff --git a/priv/design/components/floating-panel.css b/priv/design/components/floating-panel.css new file mode 100644 index 0000000..d0cd582 --- /dev/null +++ b/priv/design/components/floating-panel.css @@ -0,0 +1,139 @@ +@import "../main.css"; +@import "./scrollbar.css"; + +@layer components { + .floating-panel [data-scope="floating-panel"][data-part="trigger"] { + @apply ui-trigger; + } + + .floating-panel + [data-scope="floating-panel"][data-part="trigger"][data-state="open"] + [data-closed] { + display: none; + } + + .floating-panel + [data-scope="floating-panel"][data-part="trigger"][data-state="closed"] + [data-open] { + display: none; + } + + .floating-panel [data-part="title"] { + @apply ui-label; + } + + .floating-panel [data-scope="floating-panel"][data-part="positioner"] { + z-index: 50; + } + + .floating-panel + [data-scope="floating-panel"][data-part="positioner"]:has( + [data-scope="floating-panel"][data-part="content"][data-state="closed"] + ) { + display: none; + } + + .floating-panel + [data-scope="floating-panel"][data-part="positioner"]:has( + [data-scope="floating-panel"][data-part="content"][data-topmost] + ) { + z-index: 999999; + } + + .floating-panel [data-scope="floating-panel"][data-part="content"] { + display: flex; + flex-direction: column; + z-index: var(--z-index); + position: relative; + min-height: var(--spacing-ui); + box-shadow: var(--shadow-ui); + + &[data-topmost] { + z-index: 999999; + } + + &[data-behind] { + opacity: 0.8; + } + + &:focus-visible { + outline: 2px solid var(--color-ui--text); + outline-offset: 0; + border-radius: var(--radius-ui); + } + } + + .floating-panel [data-scope="floating-panel"][data-part="stage-trigger"], + .floating-panel [data-scope="floating-panel"][data-part="close-trigger"] { + @apply ui-trigger ui-trigger--square ui-trigger--sm; + + min-height: var(--spacing-mini); + } + + [data-scope="floating-panel"][data-part="body"] { + @apply scrollbar scrollbar--sm; + + position: relative; + overflow: auto; + flex: 1 1 auto; + min-height: fit-content; + height: var(--height); + padding: var(--spacing-ui-padding); + background-color: var(--color-root); + border-radius: 0 0 var(--radius-ui) var(--radius-ui); + border: 1px solid var(--color-ui--border); + border-block-start: 0; + + & p { + margin-block: 0; + } + } + + [data-scope="floating-panel"][data-part="header"] { + display: flex; + justify-content: space-between; + align-items: center; + flex-wrap: wrap; + padding: var(--spacing-micro-padding); + gap: var(--spacing-mini-gap); + } + + [data-scope="floating-panel"][data-part="drag-trigger"] { + background-color: var(--color-layer); + border: 1px solid var(--color-ui--border); + border-radius: var(--radius-ui) var(--radius-ui) 0 0; + + &:focus-visible { + outline: none; + } + } + + [data-scope="floating-panel"][data-part="control"] { + display: flex; + flex-flow: row nowrap; + align-items: center; + gap: var(--spacing-mini-gap); + } + + [data-scope="floating-panel"][data-part="resize-trigger"] { + &[data-axis="n"], + &[data-axis="s"] { + height: 6px; + max-width: 90%; + } + + &[data-axis="e"], + &[data-axis="w"] { + width: 6px; + max-height: 90%; + } + + &[data-axis="ne"], + &[data-axis="nw"], + &[data-axis="se"], + &[data-axis="sw"] { + width: 10px; + height: 10px; + } + } +} diff --git a/priv/design/components/layout.css b/priv/design/components/layout.css index 0c2d88b..06c5394 100644 --- a/priv/design/components/layout.css +++ b/priv/design/components/layout.css @@ -27,6 +27,11 @@ align-items: center; } + .layout__header--compact { + height: auto; + min-height: var(--spacing-ui); + } + .layout__header__content, .layout__footer__content, .layout__side__content { @@ -53,7 +58,7 @@ display: flex; flex: 1; width: 100%; - justify-content: center; + justify-content: flex-start; margin-inline: auto; background-color: var(--color-root); position: relative; @@ -90,7 +95,9 @@ flex-direction: column; flex: 1; min-width: 0; + min-height: calc(100vh - var(--spacing-ui-lg)); width: 100%; + height: 100%; margin-inline: auto; margin-block-end: var(--container-micro); position: relative; @@ -114,6 +121,8 @@ align-items: center; padding: var(--spacing-ui-padding); gap: var(--spacing-ui-gap); + margin-block-end: var(--container-micro); + } .layout__article { @@ -157,7 +166,7 @@ display: none; } - @media (min-width: theme("breakpoint.md")) { + @media (min-width: theme("breakpoint.lg")) { .layout .layout__side { display: flex; } diff --git a/priv/design/components/listbox.css b/priv/design/components/listbox.css new file mode 100644 index 0000000..5c046b8 --- /dev/null +++ b/priv/design/components/listbox.css @@ -0,0 +1,117 @@ +@import "../main.css"; + +@layer components { + .listbox [data-scope="listbox"][data-part="root"] { + @apply ui-root; + + width: var(--container-mini); + gap: var(--spacing-mini-gap); + } + + .listbox [data-scope="listbox"][data-part="label"] { + @apply ui-label; + } + + .listbox [data-scope="listbox"][data-part="label"][data-disabled] { + color: var(--color-ui--muted); + } + + .listbox [data-scope="listbox"][data-part="item-group-label"] { + font-size: var(--text-ui); + line-height: var(--text-ui--line-height); + text-align: start; + padding-inline: var(--spacing-ui-padding); + padding-block: var(--spacing-mini-padding-sm); + background-color: var(--color-root); + color: var(--color-root--text); + border-bottom: 1px solid var(--color-ui--border); + } + + .listbox + [data-scope="listbox"][data-part="content"][data-layout="list"][data-orientation="vertical"] { + display: flex; + flex-direction: column; + } + + .listbox + [data-scope="listbox"][data-part="content"][data-layout="grid"]:not( + :has([data-part="item-group"]) + ) { + display: grid; + grid-template-columns: repeat(var(--column-count), 1fr); + } + + .listbox + [data-scope="listbox"][data-part="content"][data-layout="grid"] + [data-part="item-group"] { + display: grid; + grid-template-columns: repeat(var(--column-count), 1fr); + } + + .listbox [data-scope="listbox"][data-part="content"]:focus-visible { + outline: none; + } + + .listbox [data-scope="listbox"][data-part="item-group"] { + display: flex; + flex-direction: column; + margin-block: var(--spacing-micro); + } + + .listbox + [data-scope="listbox"][data-part="content"]:not( + :has([data-part="item-group"]) + ), + .listbox [data-scope="listbox"][data-part="item-group"] { + background-color: var(--color-ui--border); + border: 1px solid var(--color-ui--border); + border-radius: var(--radius-ui); + overflow: hidden; + gap: 1px; + } + + .listbox [data-scope="listbox"][data-part="item"] { + @apply ui-item; + } + + .listbox + [data-scope="listbox"][data-part="content"][dir="rtl"] + [data-scope="listbox"][data-part="item"] { + border-radius: 0; + } + + [dir="rtl"] .listbox [data-scope="listbox"][data-part="item-indicator"] { + transform: scaleX(-1); + } +} + +@utility listbox--* { + [data-scope="listbox"][data-part="root"] { + width: --value(--container-mini-*, [length]); + gap: --value(--spacing-mini-gap-*, [length]); + } + + [data-scope="listbox"][data-part="label"] { + font-size: --value(--text-ui-*, [length]); + line-height: --value(--text-ui-* --line-height, [length]); + } + + [data-scope="listbox"][data-part="item"] { + font-size: --value(--text-ui-*, [length]); + line-height: --value(--text-ui-* --line-height, [length]); + min-height: --value(--spacing-ui-*, [length]); + } + + [data-scope="listbox"][data-part="item"][data-selected] { + background-color: --value(--color-ui-*, [color]); + color: --value(--color-ui-* --text, [color]); + } + + [data-scope="listbox"][data-part="item"][data-selected]:hover { + background-color: --value(--color-ui-* -hover, [color]); + } + + [data-scope="listbox"][data-part="item"][data-selected]:active { + background-color: --value(--color-ui-* -active, [color]); + } +} diff --git a/priv/design/components/number-input.css b/priv/design/components/number-input.css new file mode 100644 index 0000000..f12f2f7 --- /dev/null +++ b/priv/design/components/number-input.css @@ -0,0 +1,68 @@ +@import "../main.css"; + +@layer components { + .number-input [data-scope="number-input"][data-part="root"] { + @apply ui-root; + + gap: var(--spacing-ui-gap); + max-width: var(--container-ui); + } + + .number-input [data-scope="number-input"][data-part="label"] { + @apply ui-label; + } + + .number-input [data-scope="number-input"][data-part="control"] { + display: flex; + flex-flow: row nowrap; + align-items: stretch; + position: relative; + margin-inline: auto; + max-width: var(--container-micro); + } + + .number-input [data-scope="number-input"][data-part="scrubber"] svg { + transform: rotate(90deg); + } + + .number-input [data-scope="number-input"][data-part="input"] { + @apply ui-input; + + max-width: var(--container-micro); + flex: 1; + border-inline-end: 0; + border-end-end-radius: 0; + border-start-end-radius: 0; + } + + .number-input [data-part="trigger-group"] { + display: flex; + flex-direction: column; + gap: 0; + } + + .number-input [data-scope="number-input"][data-part="increment-trigger"], + .number-input [data-scope="number-input"][data-part="decrement-trigger"], + .number-input [data-scope="number-input"][data-part="scrubber"] { + @apply ui-trigger ui-trigger--square ui-trigger--sm; + + flex: 1; + min-height: 0; + padding: 0.25rem; + font-size: 0.625rem; + line-height: 1; + border-start-start-radius: 0; + border-end-start-radius: 0; + margin: 0; + } + + .number-input [data-scope="number-input"][data-part="increment-trigger"] { + border-end-end-radius: 0; + border-block-end: 0; + } + + .number-input [data-scope="number-input"][data-part="decrement-trigger"] { + border-start-end-radius: 0; + border-block-start: 0; + } +} diff --git a/priv/design/components/password-input.css b/priv/design/components/password-input.css new file mode 100644 index 0000000..d60554a --- /dev/null +++ b/priv/design/components/password-input.css @@ -0,0 +1,54 @@ +@import "../main.css"; + +@layer components { + .password-input [data-scope="password-input"][data-part="root"] { + @apply ui-root; + + gap: var(--spacing-mini-gap); + max-width: var(--container-ui); + } + + .password-input [data-scope="password-input"][data-part="label"] { + @apply ui-label; + } + + .password-input [data-scope="password-input"][data-part="control"] { + display: flex; + flex-flow: row nowrap; + align-items: stretch; + position: relative; + margin-inline: auto; + max-width: var(--container-mini); + } + + .password-input [data-scope="password-input"][data-part="input"] { + @apply ui-input; + + max-width: var(--container-mini); + flex: 1; + border-inline-end: 0; + border-end-end-radius: 0; + border-start-end-radius: 0; + } + + .password-input + [data-scope="password-input"][data-part="indicator"][data-state="visible"] + [data-hidden] { + display: none; + } + + .password-input + [data-scope="password-input"][data-part="indicator"][data-state="hidden"] + [data-visible] { + display: none; + } + + .password-input + [data-scope="password-input"][data-part="visibility-trigger"] { + @apply ui-trigger ui-trigger--square; + + min-width: var(--spacing-ui); + border-start-start-radius: 0; + border-end-start-radius: 0; + } +} diff --git a/priv/design/components/pin-input.css b/priv/design/components/pin-input.css new file mode 100644 index 0000000..fada473 --- /dev/null +++ b/priv/design/components/pin-input.css @@ -0,0 +1,41 @@ +@import "../main.css"; + +@layer components { + .pin-input [data-scope="pin-input"][data-part="root"] { + @apply ui-root; + + gap: var(--spacing-ui-gap); + max-width: var(--container-ui); + } + + .pin-input [data-scope="pin-input"][data-part="label"] { + @apply ui-label; + } + + .pin-input [data-scope="pin-input"][data-part="control"] { + display: flex; + flex-flow: row nowrap; + gap: var(--spacing-ui-gap); + align-items: center; + margin-inline: auto; + } + + .pin-input [data-scope="pin-input"][data-part="input"] { + @apply ui-input; + + height: var(--spacing-ui); + width: var(--spacing-ui); + flex-shrink: 0; + text-align: center; + + &[data-complete] { + color: var(--color-root--success); + border-color: var(--color-root--success); + } + + &[data-invalid] { + color: var(--color-root--alert); + border-color: var(--color-root--alert); + } + } +} diff --git a/priv/design/components/radio-group.css b/priv/design/components/radio-group.css new file mode 100644 index 0000000..bedc465 --- /dev/null +++ b/priv/design/components/radio-group.css @@ -0,0 +1,107 @@ +@import "../main.css"; + +@layer components { + .radio-group [data-scope="radio-group"][data-part="root"] { + @apply ui-root; + + gap: var(--spacing-ui-gap); + max-width: var(--container-ui); + } + + .radio-group [data-scope="radio-group"][data-part="label"] { + @apply ui-label; + } + + [data-scope="radio-group"][data-part="item"] { + display: inline-flex; + align-items: center; + position: relative; + max-width: var(--container-ui); + width: auto; + gap: var(--spacing-ui-gap); + margin-inline: auto; + cursor: pointer; + } + + [data-scope="radio-group"][data-part="item"][data-disabled] { + cursor: not-allowed; + } + + [data-scope="radio-group"][data-part="item-control"] { + height: var(--spacing-mini); + width: var(--spacing-mini); + background: var(--color-ui); + color: var(--color-ui--text); + font-weight: var(--font-weight-ui); + border-radius: var(--radius-full); + border: 1px solid var(--color-ui--border); + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + padding: var(--spacing-micro-padding-sm); + + &[data-state="checked"] { + background: var(--color-ui--text); + color: var(--color-ui); + border-color: var(--color-ui--text); + } + + &[data-state="unchecked"] { + background: var(--color-ui); + color: var(--color-ui--text); + border-color: var(--color-ui--border); + } + + &:hover { + background-color: var(--color-ui-hover); + } + + &:active { + background-color: var(--color-ui-active); + } + + &[data-state="checked"]:hover { + background-color: var(--color-ui--text); + opacity: 0.9; + } + + &:focus-visible, + &[data-focus] { + outline: 2px solid var(--color-ui--text); + outline-offset: -3px; + } + + &:disabled, + &[data-disabled], + &[data-disabled="true"], + &[disabled="true"] { + color: var(--color-ui--muted); + background-color: --alpha(var(--color-ui) / 60%); + cursor: not-allowed; + } + + &[data-invalid] { + color: var(--color-ui-alert); + border-color: var(--color-ui-alert); + } + + &[data-required] { + color: var(--color-ui-alert); + border-color: var(--color-ui-alert); + } + } + + [data-scope="radio-group"][data-part="item-control"] .data-checked { + display: none !important; + } + + [data-scope="radio-group"][data-part="item-control"][data-state="checked"] + .data-checked { + display: block !important; + @apply ui-icon; + color: var(--color-ui-accent--text); + width: 100%; + height: 100%; + } +} diff --git a/priv/design/components/timer.css b/priv/design/components/timer.css new file mode 100644 index 0000000..af829e8 --- /dev/null +++ b/priv/design/components/timer.css @@ -0,0 +1,88 @@ +@import "../main.css"; + +@layer components { + .timer [data-scope="timer"][data-part="root"] { + @apply ui-root; + + max-width: var(--container-ui); + } + + .timer [data-scope="timer"][data-part="area"] { + display: flex; + width: 100%; + justify-content: center; + align-items: center; + flex-wrap: wrap; + } + + .timer [data-scope="timer"][data-part="item"] { + display: flex; + align-items: center; + justify-content: center; + background: var(--color-ui); + border: 1px solid var(--color-ui--border); + border-radius: var(--radius-ui); + font-size: var(--text-ui); + line-height: var(--text-ui--line-height); + font-weight: var(--font-weight-ui); + color: var(--color-ui--text); + height: 2em; + aspect-ratio: 1/1; + overflow: hidden; + + /* stylelint-disable-next-line declaration-property-value-no-unknown */ + font-variation-settings: "tnum"; + text-align: center; + position: relative; + } + + .timer [data-scope="timer"][data-part="item"]::before { + position: absolute; + left: 0; + right: 0; + content: "00\a 01\a 02\a 03\a 04\a 05\a 06\a 07\a 08\a 09\a 10\a 11\a 12\a 13\a 14\a 15\a 16\a 17\a 18\a 19\a 20\a 21\a 22\a 23\a 24\a 25\a 26\a 27\a 28\a 29\a 30\a 31\a 32\a 33\a 34\a 35\a 36\a 37\a 38\a 39\a 40\a 41\a 42\a 43\a 44\a 45\a 46\a 47\a 48\a 49\a 50\a 51\a 52\a 53\a 54\a 55\a 56\a 57\a 58\a 59\a 60\a 61\a 62\a 63\a 64\a 65\a 66\a 67\a 68\a 69\a 70\a 71\a 72\a 73\a 74\a 75\a 76\a 77\a 78\a 79\a 80\a 81\a 82\a 83\a 84\a 85\a 86\a 87\a 88\a 89\a 90\a 91\a 92\a 93\a 94\a 95\a 96\a 97\a 98\a 99\a"; + white-space: pre; + top: calc(var(--value) * -2em); + font-size: inherit; + line-height: 2; + text-align: center; + transition: top 1s cubic-bezier(1, 0, 0, 1); + pointer-events: none; + z-index: 1; + } + + .timer [data-scope="timer"][data-part="separator"] { + font-size: var(--text-ui); + line-height: var(--text-ui--line-height); + font-weight: var(--font-weight-ui); + padding: var(--spacing-micro-padding); + } + + .timer [data-scope="timer"][data-part="control"] { + display: inline-flex; + width: 100%; + justify-content: center; + gap: var(--spacing-micro-gap); + } + + .timer [data-scope="timer"][data-part="action-trigger"] { + @apply ui-trigger ui-trigger--square ui-trigger--sm; + } +} + +@utility timer--* { + [data-scope="timer"][data-part="root"] { + max-width: --value(--container-ui-*, [length]); + } + + [data-scope="timer"][data-part="item"] { + font-size: --value(--text-ui-*, [length]); + line-height: --value(--text-ui-* --line-height, [length]); + } + + [data-scope="timer"][data-part="action-trigger"] { + font-size: --value(--text-ui-*, [length]); + line-height: --value(--text-ui-* --line-height, [length]); + min-height: --value(--spacing-ui-*, [length]); + } +} diff --git a/priv/design/utilities.css b/priv/design/utilities.css index dcb46f3..5f23a5a 100644 --- a/priv/design/utilities.css +++ b/priv/design/utilities.css @@ -123,6 +123,7 @@ height: 0.9em !important; width: 0.9em !important; color: currentcolor; + flex-shrink: 0; [dir="rtl"] & { transform: scaleX(-1); From eb3273a0de11457c6575c7921932bbf8e148c418 Mon Sep 17 00:00:00 2001 From: karimsemmoud Date: Thu, 19 Feb 2026 12:02:40 +0700 Subject: [PATCH 4/9] design --- priv/design/components/accordion.css | 22 +++++++--------------- priv/design/components/layout.css | 13 ++----------- 2 files changed, 9 insertions(+), 26 deletions(-) diff --git a/priv/design/components/accordion.css b/priv/design/components/accordion.css index 3f8e3b9..3ae7645 100644 --- a/priv/design/components/accordion.css +++ b/priv/design/components/accordion.css @@ -35,25 +35,17 @@ .accordion [data-scope="accordion"][data-part="item-text"] { width: 100%; - display: flex; - align-items: center; - gap: var(--spacing-ui-gap); } - .accordion [data-scope="accordion"][data-part="item"][data-state="closed"] [data-scope="accordion"][data-part="item-indicator"] .state-open, - .accordion [data-scope="accordion"][data-part="item"][data-state="open"] [data-scope="accordion"][data-part="item-indicator"] .state-closed { - @apply ui-icon; - - display: none!important; - + .accordion [data-scope="accordion"][data-part="item"][data-state="closed"] [data-scope="accordion"][data-part="item-indicator"][data-open], + .accordion [data-scope="accordion"][data-part="item"][data-state="open"] [data-scope="accordion"][data-part="item-indicator"][data-closed] { + display: none; + transform: none; } - .accordion [data-scope="accordion"][data-part="item"][data-state="open"] [data-scope="accordion"][data-part="item-indicator"] .state-open, - .accordion [data-scope="accordion"][data-part="item"][data-state="closed"] [data-scope="accordion"][data-part="item-indicator"] .state-closed { - @apply ui-icon; - - display: inline-block; - transform: rotate(-90deg)!important; + .accordion [data-scope="accordion"][data-part="item"][data-state="open"] [data-scope="accordion"][data-part="item-indicator"][data-open], + .accordion [data-scope="accordion"][data-part="item"][data-state="closed"] [data-scope="accordion"][data-part="item-indicator"][data-closed] { + transform: none; } .accordion [data-scope="accordion"][data-part="item-content"] { diff --git a/priv/design/components/layout.css b/priv/design/components/layout.css index 06c5394..0c2d88b 100644 --- a/priv/design/components/layout.css +++ b/priv/design/components/layout.css @@ -27,11 +27,6 @@ align-items: center; } - .layout__header--compact { - height: auto; - min-height: var(--spacing-ui); - } - .layout__header__content, .layout__footer__content, .layout__side__content { @@ -58,7 +53,7 @@ display: flex; flex: 1; width: 100%; - justify-content: flex-start; + justify-content: center; margin-inline: auto; background-color: var(--color-root); position: relative; @@ -95,9 +90,7 @@ flex-direction: column; flex: 1; min-width: 0; - min-height: calc(100vh - var(--spacing-ui-lg)); width: 100%; - height: 100%; margin-inline: auto; margin-block-end: var(--container-micro); position: relative; @@ -121,8 +114,6 @@ align-items: center; padding: var(--spacing-ui-padding); gap: var(--spacing-ui-gap); - margin-block-end: var(--container-micro); - } .layout__article { @@ -166,7 +157,7 @@ display: none; } - @media (min-width: theme("breakpoint.lg")) { + @media (min-width: theme("breakpoint.md")) { .layout .layout__side { display: flex; } From 35e1216bb41e20e7142add366bbc72020bb43ddb Mon Sep 17 00:00:00 2001 From: karimsemmoud Date: Thu, 19 Feb 2026 12:02:44 +0700 Subject: [PATCH 5/9] Update utilities.css --- priv/design/utilities.css | 1 - 1 file changed, 1 deletion(-) diff --git a/priv/design/utilities.css b/priv/design/utilities.css index 5f23a5a..dcb46f3 100644 --- a/priv/design/utilities.css +++ b/priv/design/utilities.css @@ -123,7 +123,6 @@ height: 0.9em !important; width: 0.9em !important; color: currentcolor; - flex-shrink: 0; [dir="rtl"] & { transform: scaleX(-1); From 806e53704f5b30f12bbc0a304dc897c53ad337ed Mon Sep 17 00:00:00 2001 From: karimsemmoud Date: Thu, 19 Feb 2026 12:02:50 +0700 Subject: [PATCH 6/9] up version --- README.md | 2 +- guides/installation.md | 2 +- mix.exs | 2 +- package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 44f3f2c..10c9ecc 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ Add `corex` to your `mix.exs` dependencies: ```elixir def deps do [ - {:corex, "~> 0.1.0-alpha.24"} + {:corex, "~> 0.1.0-alpha.25"} ] end ``` diff --git a/guides/installation.md b/guides/installation.md index ccbf056..af0cfad 100644 --- a/guides/installation.md +++ b/guides/installation.md @@ -44,7 +44,7 @@ Add `corex` to your `mix.exs` dependencies: ```elixir def deps do [ - {:corex, "~> 0.1.0-alpha.24"} + {:corex, "~> 0.1.0-alpha.25"} ] end ``` diff --git a/mix.exs b/mix.exs index 9a1f3e4..1ab1ad6 100644 --- a/mix.exs +++ b/mix.exs @@ -1,7 +1,7 @@ defmodule Corex.MixProject do use Mix.Project - @version "0.1.0-alpha.24" + @version "0.1.0-alpha.25" @elixir_requirement "~> 1.15" def project do diff --git a/package.json b/package.json index 560b85b..db011d2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "corex", - "version": "0.1.0-alpha.24", + "version": "0.1.0-alpha.25", "description": "The official JavaScript client for the Corex Phoenix Hooks.", "license": "MIT", "module": "./priv/static/corex.mjs", From 30300692634f8c116009df0cd7ef5490af2983a8 Mon Sep 17 00:00:00 2001 From: karimsemmoud Date: Thu, 19 Feb 2026 12:07:40 +0700 Subject: [PATCH 7/9] Add Live demo link --- README.md | 2 +- guides/installation.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 10c9ecc..ae97fcc 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Corex bridges the gap between Phoenix and modern JavaScript UI patterns by lever ## Live Demo -To preview the components, a Live Demo is available to showcase some uses of components, language switching, RTL, and Dark Mode and Site Navigation. +To preview the components, a [Live Demo](https://corex.gigalixirapp.com/en) is available to showcase some uses of components, language switching, RTL, and Dark Mode and Site Navigation. This is still in an early stage and will evolve with future stable releases. diff --git a/guides/installation.md b/guides/installation.md index af0cfad..abc48a0 100644 --- a/guides/installation.md +++ b/guides/installation.md @@ -20,7 +20,7 @@ Corex bridges the gap between Phoenix and modern JavaScript UI patterns by lever ## Live Demo -To preview the components, a Live Demo is available to showcase some uses of components, language switching, RTL, and Dark Mode and Site Navigation. +To preview the components, a [Live Demo](https://corex.gigalixirapp.com/en) is available to showcase some uses of components, language switching, RTL, and Dark Mode and Site Navigation. This is still in an early stage and will evolve with future stable releases. From a1c230ab669df93528247fd20e7aa556788ae406 Mon Sep 17 00:00:00 2001 From: karimsemmoud Date: Thu, 19 Feb 2026 12:10:01 +0700 Subject: [PATCH 8/9] clean assets --- ...180x180-480d4b1992079367b6cda44422dcbc96.png | Bin 981 -> 0 bytes .../avatar-bad9d852614f92cdfb9e547ffaede5ae.png | Bin 29586 -> 0 bytes .../beach-53c468d9dab6f884c050d58958e6c3d2.jpg | Bin 45502 -> 0 bytes ...x-ui-og-8952a72b82157d452a54bfc82c001011.jpg | Bin 46089 -> 0 bytes .../fall-5f37212ea29d4300569b148c4b2eb2bc.jpg | Bin 35994 -> 0 bytes ...favicon-7e94605551aa8aa20243bed3756d9343.ico | Bin 526 -> 0 bytes ...512x512-1e9be444ed2d780f521ab103340c3f15.png | Bin 3301 -> 0 bytes ...192x192-d874e80476b7bb8610a27acd76e24c58.png | Bin 1266 -> 0 bytes ...512x512-b05b19fb9e7210bcde2ed7bdfa24bc27.png | Bin 3327 -> 0 bytes ...a-64x64-e3204a9e30605560ebcf76a7280099a0.png | Bin 467 -> 0 bytes .../sand-cb1e068d7c2553040ad21f38a607ef92.jpg | Bin 27925 -> 0 bytes .../star-1981517c7246c2e0e2de660489b98c6d.jpg | Bin 40927 -> 0 bytes .../winter-e3e112f7d35ec9131ea2063c45eef8b9.jpg | Bin 22067 -> 0 bytes 13 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 e2e/priv/static/images/apple-touch-icon-180x180-480d4b1992079367b6cda44422dcbc96.png delete mode 100644 e2e/priv/static/images/avatar-bad9d852614f92cdfb9e547ffaede5ae.png delete mode 100644 e2e/priv/static/images/beach-53c468d9dab6f884c050d58958e6c3d2.jpg delete mode 100644 e2e/priv/static/images/corex-ui-og-8952a72b82157d452a54bfc82c001011.jpg delete mode 100644 e2e/priv/static/images/fall-5f37212ea29d4300569b148c4b2eb2bc.jpg delete mode 100644 e2e/priv/static/images/favicon-7e94605551aa8aa20243bed3756d9343.ico delete mode 100644 e2e/priv/static/images/maskable-icon-512x512-1e9be444ed2d780f521ab103340c3f15.png delete mode 100644 e2e/priv/static/images/pwa-192x192-d874e80476b7bb8610a27acd76e24c58.png delete mode 100644 e2e/priv/static/images/pwa-512x512-b05b19fb9e7210bcde2ed7bdfa24bc27.png delete mode 100644 e2e/priv/static/images/pwa-64x64-e3204a9e30605560ebcf76a7280099a0.png delete mode 100644 e2e/priv/static/images/sand-cb1e068d7c2553040ad21f38a607ef92.jpg delete mode 100644 e2e/priv/static/images/star-1981517c7246c2e0e2de660489b98c6d.jpg delete mode 100644 e2e/priv/static/images/winter-e3e112f7d35ec9131ea2063c45eef8b9.jpg diff --git a/e2e/priv/static/images/apple-touch-icon-180x180-480d4b1992079367b6cda44422dcbc96.png b/e2e/priv/static/images/apple-touch-icon-180x180-480d4b1992079367b6cda44422dcbc96.png deleted file mode 100644 index 13b654c12f068391bcd33dca896b2ac309e7a172..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 981 zcmeAS@N?(olHy`uVBq!ia0vp^TR@nD8Ax&oe*=;X5&=FTuKF%(|NsC0?8Voh@~3;P7pAh@?B;zP z{_}DL|CXlHv(~jwV~dmiGO;kDjpOpv3pW&wWyo%Em|+^ja#kR77t1V#YZZ1SGpzZ8 z4|ATm_LjrlKzijvo;2yLqE%v>JEgwOlTO|(*q3NF=lX{CewAi38FUS98^}oAF3I3( zSDTS9!*h1SAr%p++>dG><0aqgy)c})XH~0H^pzR!PpjT>l4WV~?_2gF;H;Iu0LR{a zo`3igxtibIYV~!x_g;vlH*mW_`y1Des2AtHXP)O(RlFb}xoBejO2xE=rXfC)IbLk| zux9csrUjANBHg|yk|dhJ$iawSieNtYW@?s`+}cm2RwQ8 zd7^L>+qEZ(&fl#R0^92wE?e(-t{?YIGvki^ftRv3#6|aZEG_u+hvELsg?HuMa=q`y zT*xZ6eRV(DqGo@?>7_Rxd8b5WeRVKDT{PjOf9jQ$2ZePeew-(KzTD7Z@k8N7UoW0& zRyVEqw$O4QA3?z2a1ZW@?7iUycLpw?E!FC_BCDmH4Vht9{q4UA}D5S)ceG zm9Bl;-fWTWT(o+M%s$_fcYV#5J}FYOPhT?gWavl1i5ISaxMK1D(xuKRu3875I_y~{ z^J3b@4_X_J_)eR;mdKI;Vst0K)&*T>t<8 diff --git a/e2e/priv/static/images/avatar-bad9d852614f92cdfb9e547ffaede5ae.png b/e2e/priv/static/images/avatar-bad9d852614f92cdfb9e547ffaede5ae.png deleted file mode 100644 index cd084b01fb7ef3f1c2bbaac07ae43706caeb6352..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 29586 zcmYhjby$?o_Xa#0uuHGBbf_S$(z&#PQc{u&hys!dg5)9%5-On}ErLNe3M>eyC{hyA zAtl|g)cfG~^LyXdfAqSXXXeCx?m2Vj%tq`Z&P)$!#@Y zceFZwbdlksFQEm^6N!FI_E{kNJ<3^)#8U4%8vQsrD-xaaI9U2hs15Ul%QACpFW87D zJL2M7TU$RorHumK{fzItTkv;kceK`iw3e4uP*0ww4 z{<=A^ap|MvfW(lac*x6c>N=rURbOgtV5Wc(PlAJW2w~1%yBi;u!)m%{TH2dyoRrKj z5b(AjF{j{{6V79fgrhJz_SwrDLXyNZ+uXDL{B_H5wc^c_S=p(h%xuj6=76S}u!k`c z?@Z+tY*nb|B}Hppiq`7D>?@8^9XG3fdCULxg8KQ0KAoqzv)!v_4cF`LN>l$+1kz`s zn#43yo{lF*i$*}wcQdi88ap4t=o=JFsAp#_PIxo8z)NcGJ-E=QAvX_ibmNi?g{1x` zJZU+&=OVB<&&iPV=Hf%M00E0plG1@2OQShTgU?2vpHt7WAEBR9SLVmuRxbc6h z{iyirk8U>l;GY7uvKZW^CcLD;su1YT4u|zrhld|gKt1*89cRaQst+-y2@MPv? z)@b~Bzm=NPb4mR?pV?lx%VY#Or$Tf(ExlZQJD2g~2Lnl<%Lbih8 z{g$}WUI#VQbyNL`XOPGQHpZG^jTAFO-@VndvsF{0e(1o2$4YvkS-*377}fJ4G-T#! zAIMA8kpHtKr4vjt^82<(Lwc2XSV-Qa&tkB&;I&+5AnVE9wrlIfSjz!#ue6qZ-Q%_;tDN3FmEL94V z2nP`Gdt#W+cQn<0!kPpb=xHGIv{ZsL9ph5{(43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)iSaX< zOoR(6I3!4{$x-E7P|P4k+IqIg#+5`-+#zOEY3i#A)Wk@fmk2#ULsLW32Zbqh>nC z;#*_7fmJ9CK#{c>W-`E1@^}3pO7dy2syO7H@k0O#SAC4HA<))$6)9ZAxZ7ZRNwuWH z*ytnMRlg7vyV$8-H7SeK*5I{^3uBKlHTwb7qk69Y0Q!z6#-XaS zznMnS^W+%GKtVV6mFY0rq|_lk(-jFk$s|oDrOO$3l1SOn5=kTyhh>@BjhQ5huL2Xi z07)d4$PUmMB#c8WjkJN3-B$A?Uq&%1_+a!>pB7q*H zk_AoxsVH2MMun-wwRnBdTGRN6PNhDFF_EMm4T+J8K%B!o_0jO4o#$8#v|e@P^crx0UQ2M~!Q ziC;wooVssfYF$(oyX<6=5M*~y4;&dwekml47`1e0GIae>ef=zYlziOG4$9r+k|o*F z)ZK#-xtHey8yz5aH6)Vb8lit2d5QO_Tb`Buh;oAG~cMn0S&%LRyMF0^8Uk6JDyOmD5A{ z$s}o>)VU|yW`tB@Uwx#KCH(@8h>O#x%hV<|x-DBtBvn|o5CWC|0BJS)$e?<84{=o_ zl9?)SD&hi3yOKyQdICt`%X)FGg_1eqNg{&!0r-gKR!J?nl1RjA(liJdX~xBNJAXMO zl+JrosILc^b{8Wk;ElE;ZX}W@s>_^~vUw&|i9vn*NhF%vAMtbx7wPea+*uXdyvIN* dH+@wkk^LhPUw^cLTvQq}+f diff --git a/e2e/priv/static/images/corex-ui-og-8952a72b82157d452a54bfc82c001011.jpg b/e2e/priv/static/images/corex-ui-og-8952a72b82157d452a54bfc82c001011.jpg deleted file mode 100644 index 2a0dc6ee7950960bb9fc382532f7539216dad062..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 46089 zcmd>lby$?!7Wa@6QW7d9qS7hdNJxjYAT3=YT?3+sfPhHnhzLUuNC{E`f=CQKG$O(P zL&Fe5eedY;+;i?d&-2~;=l6WCFvA;ry=(8i*4n@ITif&T^KT$Z^}A|!K{z-d5DxGU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v2eXK)|HsjMf8N%9~l^8ULQj+Uuo)78e@kCKs^VxkG$WjVXmRnpgKeqATIQc#IUn-+#)Bpeg diff --git a/e2e/priv/static/images/fall-5f37212ea29d4300569b148c4b2eb2bc.jpg b/e2e/priv/static/images/fall-5f37212ea29d4300569b148c4b2eb2bc.jpg deleted file mode 100644 index 1cbbd9838eb0bec466800c57f80cc9ff8e1dc1ac..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 35994 zcmb5VRa9Hw7d0BJRG~mAlprncE$&Hae?W0}D;k{Qg^&QHl%l~YPK&#{7Z0w%p#*mg zA=u@A?-=*xd;0b{Z~N@E*EnO3wdPuL?z@@06~J=^S$SCi9v%RIcmDwH<^dl8&mKK~ z^7!GiCy$?ykUS%$cuh$`PENr_OHcKhmxJ#eF9#2|fVcukKv-6Uo9Df*w5*bfhNcET z$iU1%?X!ZqhU))};E|A!P>@luQc|+23h@Z3{$G!~b^zH!yfgd*0z5_lJ{cYX8QxtN z00;o!6X5;N-T!~!;S&-OJRrWGlzI-p$H&Jbz$YXiCd4DezyA^+KtM?LhKQU`TAhN? z%;g1tzyqca(G?wIlp4SP37ESc9W#G?`Atx>@_sqZz1jc6HUS~ggZnu?vj3U>|Ev=c z{lEL;;gb=(A?G8MreIX(H**Q7AbJt~`-tg-M#r(hzq>iWQv$quzX`|yV8Haw;`y0T zr|wfuM^)m8=_*cb13Nqk32#~$##hz$NT3APV z(N~KEwP$vtoh0s>^>n(YAZvG z>&9Ig(;%O(`aF0g_6tHxL}shP)7ZOr0M5(q9Nu~*nuhRH5z374+&eV&o=ZNVdXOTg zR$8=($1%5%Q2-d+Ti+#09>}j;^5ggIyxy_<{qRFeRm|FYR=S)_&F;tW>cbA!ze=So zY=zq0O2i<_^Gfr-1Jj?Bik1Shs!E=F^gb}`-u0Yv)#H)SEO&p}(Vrs^l(|*vn5aB< z)M{ktQ?f^T7=ESYBR=kVD4@WIp(qYV|0zl5n zFb$idf;BoU?Hxe>u@^2H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z00Za&wR=))000DWNkl)1@asV4V6hAb{16h9G$LLm}8UO02}fId@SVWIey^Xz=iF z!)53s&=w(7()wQ}L5eLt{|lEjpJ8Ssy2T23R}0r4>@G>EF>Lh5r3}@`U)|06~fP6Caz}mPf3t1NSdQl1l#$ zN7h^bn%%&*Y+{8SpkqJt8<0Md!~78W{_{u~Yp4-94QM})%0^Kuk!J4+Pt3|t4{k{|c0$mB9&8~S%_Tn$3fa3-B|2zmIPAQ~BbLzq6B7-X z0t>zP81S{=YY#?Gfkj`yHs`Gvx(5I*@msGB6gi`iBt$C$0Y*VGBmG0TH58QuYWytB zg?Um6%Rnw{vvSai83>w}g%-rGTv~vh2jXjFV@1q8(g9w0$oihB%K#fycx!#dn z&2K{n+71tc%yasHx`$6826P%DpUnb$7Z8E0K->?VoO_ueCV(8?!%hXrKLMAb8U-xl z=5qn|MP-Kw*tLj=dkMN6RURTxj}x$W0ve)X|4zgn9|i;>{fs*hN zx&c^{yngrk#Yu=2-2eoYl>!40PawqA0azgbniT+h0MG&u2Y|BB(>@l!@`1ICe)>kX z8w+I!CCUeLUqSc6>p*kgBc<<9PxAr9U#rlrj0a#zFSg2GEs8TeK(jA*%U`btCpZ|N z;3%JBVmHylpX4*o431QY_?1BgjaP=Jqer#u3JzRA__I$qdkSQ8$?p+C6A){rvzYfuX2 zzmZOOY-+2S)D7Et)o-YFgO+ynn+gtZ>nN+S<|ni^9Rne{Kd#hn?|Xv=%f4(~iWb*5 zXfl3>Ht!A$S+xIKAGNX1NG9#u+MH-g<$q^`4+~8_d($LV{z>% diff --git a/e2e/priv/static/images/pwa-512x512-b05b19fb9e7210bcde2ed7bdfa24bc27.png b/e2e/priv/static/images/pwa-512x512-b05b19fb9e7210bcde2ed7bdfa24bc27.png deleted file mode 100644 index 039fe66c791161243e87734fa302af9ce90c0445..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3327 zcmZuzc|4SB8-Ct*24jw824xDF>|3^@I5=i(q3p+&Bj!li>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jpg b/e2e/priv/static/images/winter-e3e112f7d35ec9131ea2063c45eef8b9.jpg deleted file mode 100644 index 418285798fb1b2a1f8d32e4c3d48d431d7dd2363..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22067 zcmb4qg#-6;|>dh}>i1O!P% zKpK8~e;$wTAMiW(v3qv!+0H%poY(91eAT&KxLpMRHB~iK0R#j900I60+%5x@0hDCq z6y&6o6yy|CcPOc7z_c`X@6xa_f#|{99K1YS99*1ykEKQU1SJGHxkOdPBxL24l$9Pq z)OFMqbfguP2 zdWMlQh!k)trPTj1?44p1<#I^-W_jIRj@iHJ$?O>DIP-T&W% z|F4~ZmXHHNr})r-$o_T-Kt)7=A0!biKpyZnR?JMac*Z;zebmH@33$d8prh)lqyxp4 zi*8t`-eRdA;h90P@;fF0by?*dsFTIE(nh}L>h@RnRFj67Q^WFS15gB5E=V)V}y`6 zM8+6{uAKqI4PO6F2%zzf$3j??JlYtQ3^E2r7Es$07fO=RA|;a)0h6i}ni7#5OdJ%- znfmOJ#GweFIZ-0lGMJ8Of%)GEpO{;E15#wfRIqr?P$7}Q zybX`6alt@`!fIZ=DdD$%_Xm6?dx zRrBT}63y{RT*FW0_R3_M!Cj4lhjg-1S@AP7u?0M@WOOL_#pVL&HJLLS#W>Qz3`AE{ zUNcZ36#~@qV{6L`*ugP=?+YQO#^k^+UrgdnLiy{%?D_ld00{f;V1zjc2(0|V4dsEJ zf~vmeEf(l1BSG}YFx{@W2u9)n$w^-|X7|wzgdMiaiZ$PRfNi5VD`F`f7Cr@8;<U;oW-#C?=SKl)eD^?;u-Z5uM*``a` z;VBZsB`F`$r3_=x(<#6FP}8#9%I^pHP;*c{AZuBS1GhGE2*h1QOXW?OnFb8~5MvJD z!tmKCp(*S<1u5(t6amqN`jNzU2ErHbXU68xiK|FTKU}@k?e8?^|-Ku~MCnAV0eFSnPcTTEtvM6m=jl)b9^3;pX zu|w{~%vxx28haAX+DD~4vjaXNSI{B^(!~+laECoPjx^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$i6Jh?g!bX2o9G$<)oxom; zo17sHGn&jJAcqzC-4}F^I4i<--Au}pO}?_rz51}=>}v($@kdtw!Q&Ndm&(vwX>TP5 z5D(`(}cy##=$T<*H}h7sgqrN5mh~&~SIBi@M;n&6 z%iGZW;*B6(_nJNw-R#VReg3Nx6o#ly9cNA7q3&k)MfU_gQ1zj z$gm)gF_48z#0|qrK_7~Cabw;CB}dJ&x6YFl#Fa=N8jv(?)V@W?o@n^^l$*5&#$-;} zS`5T$2(S`Xi>6DEZMm(scx8$U5RybpKCa)q+j{v|u})P=1dRb}8^_3(-+-^gHGDp^ zfd2Vtn8~4yvAcI2XZde+vcA(0z+>E(xx1+^Pe zlCze*O-@qU1=c%y^{Q;&4EmW&2fFQo?kCS;e-W=YF6eUOV0qio#`eVf#VZb?ZF>yU zF_ZC9OKpUQ(bJ4QPAx5BV>)SN7is?ppTMK7ysQ8RT>YJZ_dSY}%9KnQ&wGyX6MMnT!uC4=FCS&cQK?$WJMeJ>fWsLOzzWLSQen3KtPKFtw#TzB~le?rbudu zUq%n;H-D^&)s44jE<-hUcAN^rZ+pJ*H5Ca4C62`Or52l|ZaOD@2Ni~%&%S>4ZYkAh z%QBz;+wC=We(W)5cWBsr$FAdx;b(=>1Fu2oynmlq#4V~5u{*-a!A8)6)RB*jm1EZ7 zWXE})93zLn1hxi}uWFhzY#6#)#0C4b)_Blv2P3-%B!wkNK>7~ULrf6R`eK9$0&y#o zfFNjB-BX>Ykv`0zW3$)MOu|J(3=>`yq~I_KFYb8tw#43KJcNwE05 zLa&Uh{7h?iz5NqG$*==B6q7V1dlxI8YqKb1x>V1sI5O@Ml%e7L59iuqm@b3x0dL@b zi+#9>9Ww;wMT(U|aNSF{ Date: Thu, 19 Feb 2026 12:12:02 +0700 Subject: [PATCH 9/9] update design --- design/components/accordion.css | 22 ++- design/components/angle-slider.css | 255 +++++++++++++++++++++++++++ design/components/avatar.css | 90 ++++++++++ design/components/carousel.css | 200 +++++++++++++++++++++ design/components/editable.css | 111 ++++++++++++ design/components/floating-panel.css | 139 +++++++++++++++ design/components/layout.css | 13 +- design/components/listbox.css | 117 ++++++++++++ design/components/number-input.css | 68 +++++++ design/components/password-input.css | 54 ++++++ design/components/pin-input.css | 41 +++++ design/components/radio-group.css | 107 +++++++++++ design/components/timer.css | 88 +++++++++ design/utilities.css | 1 + priv/design/components/accordion.css | 22 ++- priv/design/components/layout.css | 13 +- priv/design/utilities.css | 1 + 17 files changed, 1324 insertions(+), 18 deletions(-) create mode 100644 design/components/angle-slider.css create mode 100644 design/components/avatar.css create mode 100644 design/components/carousel.css create mode 100644 design/components/editable.css create mode 100644 design/components/floating-panel.css create mode 100644 design/components/listbox.css create mode 100644 design/components/number-input.css create mode 100644 design/components/password-input.css create mode 100644 design/components/pin-input.css create mode 100644 design/components/radio-group.css create mode 100644 design/components/timer.css diff --git a/design/components/accordion.css b/design/components/accordion.css index 3ae7645..3f8e3b9 100644 --- a/design/components/accordion.css +++ b/design/components/accordion.css @@ -35,17 +35,25 @@ .accordion [data-scope="accordion"][data-part="item-text"] { width: 100%; + display: flex; + align-items: center; + gap: var(--spacing-ui-gap); } - .accordion [data-scope="accordion"][data-part="item"][data-state="closed"] [data-scope="accordion"][data-part="item-indicator"][data-open], - .accordion [data-scope="accordion"][data-part="item"][data-state="open"] [data-scope="accordion"][data-part="item-indicator"][data-closed] { - display: none; - transform: none; + .accordion [data-scope="accordion"][data-part="item"][data-state="closed"] [data-scope="accordion"][data-part="item-indicator"] .state-open, + .accordion [data-scope="accordion"][data-part="item"][data-state="open"] [data-scope="accordion"][data-part="item-indicator"] .state-closed { + @apply ui-icon; + + display: none!important; + } - .accordion [data-scope="accordion"][data-part="item"][data-state="open"] [data-scope="accordion"][data-part="item-indicator"][data-open], - .accordion [data-scope="accordion"][data-part="item"][data-state="closed"] [data-scope="accordion"][data-part="item-indicator"][data-closed] { - transform: none; + .accordion [data-scope="accordion"][data-part="item"][data-state="open"] [data-scope="accordion"][data-part="item-indicator"] .state-open, + .accordion [data-scope="accordion"][data-part="item"][data-state="closed"] [data-scope="accordion"][data-part="item-indicator"] .state-closed { + @apply ui-icon; + + display: inline-block; + transform: rotate(-90deg)!important; } .accordion [data-scope="accordion"][data-part="item-content"] { diff --git a/design/components/angle-slider.css b/design/components/angle-slider.css new file mode 100644 index 0000000..65b83d4 --- /dev/null +++ b/design/components/angle-slider.css @@ -0,0 +1,255 @@ +@import "../main.css"; + +@layer components { + .angle-slider [data-scope="angle-slider"][data-part="root"] { + @apply ui-root; + + max-width: var(--container-micro); + gap: var(--spacing-ui-gap); + padding: var(--spacing-ui-padding); + background-color: var(--color-root); + color: var(--color-root--text); + border-radius: var(--radius-ui); + border: 1px solid var(--color-root--border); + position: relative; + } + + .angle-slider + [data-scope="angle-slider"][data-part="root"][data-disabled] { + opacity: 0.6; + cursor: not-allowed; + } + + + .angle-slider [data-scope="angle-slider"][data-part="label"] { + @apply ui-label; + } + + .angle-slider [data-scope="angle-slider"][data-part="control"] { + --size: calc(var(--spacing-ui) * 2); + --thumb-size: var(--spacing-ui); + --thumb-indicator-size: min(var(--thumb-size), calc(var(--size) / 2)); + + width: var(--size); + height: var(--size); + border-radius: var(--radius-full); + border: 1px solid var(--color-ui--border); + background-color: var(--color-ui); + margin-inline: auto; + display: flex; + align-items: center; + justify-content: center; + user-select: none; + position: relative; + } + + .angle-slider [data-scope="angle-slider"][data-part="thumb"] { + position: absolute; + inset: 0 0 0 calc(50% - 1px); + pointer-events: none; + width: var(--spacing-micro-sm); + color: var(--color-ui--text); + } + + .angle-slider [data-scope="angle-slider"][data-part="thumb"]:focus-visible { + outline: none; + } + + .angle-slider [data-scope="angle-slider"][data-part="thumb"]::before { + content: ""; + position: absolute; + right: 0; + top: 0; + height: var(--thumb-indicator-size); + width: var(--spacing-micro-sm); + background-color: var(--color-ui--text); + border-radius: var(--radius-ui); + } + + .angle-slider + [data-scope="angle-slider"][data-part="thumb"]:focus-visible::before { + outline: 1px solid var(--color-ui--text); + outline-offset: 2px; + } + + .angle-slider [data-scope="angle-slider"][data-part="marker-group"] { + position: absolute; + inset: 1px; + border-radius: var(--radius-full); + pointer-events: none; + } + + .angle-slider [data-scope="angle-slider"][data-part="marker"] { + width: 2px; + position: absolute; + top: 0; + bottom: 0; + left: calc(50% - 1px); + } + + .angle-slider [data-scope="angle-slider"][data-part="marker"]::before { + content: ""; + position: absolute; + top: calc(var(--thumb-size) / 4); + left: 0.5px; + width: 1px; + height: calc(var(--thumb-size) / 2); + transform: translate(-50%, -50%); + background-color: var(--marker-color); + border-radius: 1px; + } + + .angle-slider + [data-scope="angle-slider"][data-part="marker"][data-state="under-value"] { + --marker-color: var(--color-ui--text); + } + + .angle-slider + [data-scope="angle-slider"][data-part="marker"][data-state="under-value"]::before { + width: 3px; + } + + .angle-slider + [data-scope="angle-slider"][data-part="marker"][data-state="at-value"] { + display: none; + } + + .angle-slider + [data-scope="angle-slider"][data-part="marker"][data-state="over-value"] { + --marker-color: var(--color-ui--muted); + + width: var(--spacing-micro-sm); + } + + .angle-slider [data-scope="angle-slider"][data-part="value-text"] { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + gap: var(--spacing-ui-gap-sm); + width: auto; + } + + .angle-slider + [data-scope="angle-slider"][data-part="value-text"] + [data-part="text"], + .angle-slider + [data-scope="angle-slider"][data-part="value-text"] + [data-part="value"] { + display: flex; + width: auto; + align-items: baseline; + font-size: var(--text-ui); + line-height: var(--text-ui--line-height); + font-weight: var(--font-weight-ui); + color: var(--color-ui--text); + } + + .angle-slider + [data-scope="angle-slider"][data-part="root"][data-invalid] + [data-scope="angle-slider"][data-part="control"] { + border-color: var(--color-root--alert); + } + + .angle-slider + [data-scope="angle-slider"][data-part="root"][data-invalid] + [data-scope="angle-slider"][data-part="value-text"] + [data-part="text"], + .angle-slider + [data-scope="angle-slider"][data-part="root"][data-invalid] + [data-scope="angle-slider"][data-part="value-text"] + [data-part="value"] { + color: var(--color-root--alert); + } + + .angle-slider + [data-scope="angle-slider"][data-part="root"][data-invalid] + [data-scope="angle-slider"][data-part="thumb"]::before { + background-color: var(--color-root--alert); + } + + .angle-slider + [data-scope="angle-slider"][data-part="root"][data-invalid] + [data-scope="angle-slider"][data-part="marker"][data-state="under-value"] { + --marker-color: var(--color-root--alert); + } + + /* .angle-slider + [data-scope="angle-slider"][data-part="root"][data-readonly], + .angle-slider + [data-scope="angle-slider"][data-part="root"][data-read-only] { + padding-inline-end: var(--spacing-ui-padding); + } */ + + .angle-slider + [data-scope="angle-slider"][data-part="root"][data-readonly]::after, + .angle-slider + [data-scope="angle-slider"][data-part="root"][data-read-only]::after { + content: ""; + position: absolute; + bottom: var(--spacing-ui-padding); + right: var(--spacing-ui-padding); + width: 1em; + height: 1em; + background-color: var(--color-ui--muted); + mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M10 1a4.5 4.5 0 0 0-4.5 4.5V9H5a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2h-.5V5.5A4.5 4.5 0 0 0 10 1ZM8.5 5.5V9H14V5.5a3.5 3.5 0 1 0-7 0Z' clip-rule='evenodd'/%3E%3C/svg%3E"); + mask-size: contain; + mask-repeat: no-repeat; + mask-position: center; + } + + .angle-slider [data-scope="angle-slider"][data-part="hidden-input"] { + display: none; + } +} + +@utility angle-slider--* { + [data-scope="angle-slider"][data-part="root"] { + max-width: --value(--container-micro-*, [length]); + gap: --value(--spacing-micro-gap-*, [length]); + padding: --value(--spacing-micro-padding-*, [length]); + } + + [data-scope="angle-slider"][data-part="label"] { + font-size: --value(--text-ui-*, [length]); + line-height: --value(--text-ui-* --line-height, [length]); + } + + [data-scope="angle-slider"][data-part="control"] { + font-size: --value(--text-ui-*, [length]); + line-height: --value(--text-ui-* --line-height, [length]); + min-height: --value(--spacing-ui-*, [length]); + background-color: --value(--color-ui-*, [color]); + color: --value(--color-ui-* --text, [color]); + border-color: --value(--color-ui-* --border, [color]); + + --size: calc(--value(--spacing-ui-*, [length]) * 2); + --thumb-size: --value(--spacing-ui-*, [length]); + } + + [data-scope="angle-slider"][data-part="thumb"]::before { + background-color: --value(--color-ui-* --text, [color]); + } + + [data-scope="angle-slider"][data-part="marker"] { + --marker-color: --value(--color-ui-* --muted, [color]); + } + + [data-scope="angle-slider"][data-part="marker"][data-state="under-value"] { + --marker-color: --value(--color-ui-* --text, [color]); + } + + [data-scope="angle-slider"][data-part="marker"][data-state="over-value"] { + --marker-color: --value(--color-ui-* --muted, [color]); + } + + [data-scope="angle-slider"][data-part="value-text"] [data-part="value"] { + font-size: --value(--text-ui-*, [length]); + line-height: --value(--text-ui-* --line-height, [length]); + } + + [data-scope="angle-slider"][data-part="value-text"] [data-part="text"] { + font-size: --value(--text-ui-*, [length]); + line-height: --value(--text-ui-* --line-height, [length]); + } +} diff --git a/design/components/avatar.css b/design/components/avatar.css new file mode 100644 index 0000000..ff89902 --- /dev/null +++ b/design/components/avatar.css @@ -0,0 +1,90 @@ +@import "../main.css"; + +@layer components { + .avatar [data-scope="avatar"][data-part="root"] { + @apply ui-root; + + max-width: var(--spacing-ui); + } + + .avatar [data-scope="avatar"][data-part="fallback"] { + display: inline-flex; + align-items: center; + justify-content: center; + text-align: start; + width: var(--spacing-ui); + aspect-ratio: 1 / 1; + font-size: var(--text-ui); + line-height: var(--text-ui--line-height); + font-weight: var(--font-weight-ui); + border-radius: var(--radius-full); + border: 1px solid var(--color-ui--border); + gap: var(--spacing-ui-gap); + height: var(--spacing-ui); + color: var(--color-ui--text); + background-color: var(--color-ui); + } + + .avatar [data-scope="avatar"][data-part="image"] { + display: flex; + align-items: center; + justify-content: center; + height: 100%; + } + + .avatar [data-scope="avatar"][data-part="skeleton"] { + display: block; + width: var(--spacing-ui); + aspect-ratio: 1 / 1; + border-radius: var(--radius-full); + background: linear-gradient( + 90deg, + var(--color-ui--muted) 0%, + var(--color-ui--border) 50%, + var(--color-ui--muted) 100% + ); + background-size: 200% 100%; + animation: avatar-skeleton-loading 1.2s ease-in-out infinite; + } + + .avatar [data-scope="avatar"][data-part="skeleton"][data-state="hidden"] { + display: none; + } + + .avatar.avatar--square [data-scope="avatar"][data-part="skeleton"] { + border-radius: var(--radius-ui); + } + + .avatar.avatar--square [data-scope="avatar"][data-part="root"] { + border-radius: var(--radius-ui); + } + + .avatar.avatar--square [data-scope="avatar"][data-part="fallback"] { + border-radius: var(--radius-ui); + } +} + +@keyframes avatar-skeleton-loading { + 0% { + background-position: 200% 0; + } + 100% { + background-position: -200% 0; + } +} + +@utility avatar--* { + [data-scope="avatar"][data-part="root"] { + max-width: --value(--spacing-ui-*, [length]); + } + + [data-scope="avatar"][data-part="fallback"] { + font-size: --value(--text-ui-*, [length]); + line-height: --value(--text-ui-* --line-height, [length]); + width: --value(--spacing-ui-*, [length]); + height: --value(--spacing-ui-*, [length]); + background-color: --value(--color-ui-*, [color]); + color: --value(--color-ui-* --text, [color]); + border-color: --value(--color-ui-* --border, [color]); + } +} diff --git a/design/components/carousel.css b/design/components/carousel.css new file mode 100644 index 0000000..e6ad805 --- /dev/null +++ b/design/components/carousel.css @@ -0,0 +1,200 @@ +@import "../main.css"; + +@layer components { + .carousel [data-scope="carousel"][data-part="root"] { + @apply ui-root; + + max-width: var(--container-ui); + max-height: var(--container-ui); + gap: var(--spacing-ui-gap); + justify-content: center; + position: relative; + } + + .carousel [data-scope="carousel"][data-part="control"] { + display: flex; + position: absolute; + flex-direction: column; + width: auto; + padding: var(--spacing-mini-padding-sm); + max-width: var(--container-mini); + overflow: hidden; + gap: var(--spacing-mini-gap); + justify-content: center; + border-radius: var(--radius-ui); + + &[data-orientation="horizontal"] { + flex-direction: row; + bottom: var(--spacing-mini-padding); + } + + &[data-orientation="vertical"] { + flex-flow: column nowrap; + max-height: var(--container-mini); + right: var(--spacing-mini-padding); + + & [data-scope="carousel"][data-part="prev-trigger"], + & [data-scope="carousel"][data-part="next-trigger"], + & [data-scope="carousel"][data-part="autoplay-trigger"] { + transform: rotate(90deg); + } + } + } + + .carousel [data-scope="carousel"][data-part="prev-trigger"], + .carousel [data-scope="carousel"][data-part="next-trigger"], + .carousel [data-scope="carousel"][data-part="autoplay-trigger"] { + @apply ui-trigger; + + padding: 0; + aspect-ratio: 1/1; + gap: var(--spacing-min-gap); + min-height: var(--spacing-mini); + border: 0; + + &[disabled="true"] { + visibility: hidden; + } + } + + .carousel [data-scope="carousel"][data-part="item-group"] { + overflow: hidden; + align-self: stretch; + border-radius: var(--radius-ui); + scrollbar-width: none; + -webkit-scrollbar-width: none; + -ms-overflow-style: none; + + &::-webkit-scrollbar { + display: none; + } + } + + .carousel [data-scope="carousel"][data-part="item"] { + display: flex; + justify-content: center; + align-items: center; + font-size: 24px; + border: 1px solid var(--color-ui--border); + border-radius: var(--radius-ui); + } + + .carousel [data-scope="carousel"][data-part="item"] img { + margin: 0; + object-fit: cover; + border-radius: var(--radius-ui); + } + + .carousel + [data-scope="carousel"][data-part="item"][data-orientation="horizontal"] + img { + height: 100%; + width: 100%; + } + + .carousel + [data-scope="carousel"][data-part="item"][data-orientation="vertical"] + img { + height: 100%; + width: 100%; + } + + .carousel [data-scope="carousel"][data-part="indicator-group"] { + display: flex; + flex-wrap: wrap; + justify-content: center; + align-items: center; + gap: var(--spacing-mini-gap); + + &[data-orientation="horizontal"] { + flex-direction: row; + height: auto; + } + + &[data-orientation="vertical"] { + flex-direction: column; + height: auto; + } + } + + .carousel [data-scope="carousel"][data-part="indicator"] { + @apply ui-trigger; + + min-height: var(--spacing-micro-xl); + min-width: var(--spacing-micro-xl); + aspect-ratio: 1/1; + border-radius: var(--radius-full); + background-color: var(--color-ui); + padding: 0; + transition: background-color 0.2s ease-in-out; + } + + .carousel [data-scope="carousel"][data-part="indicator"][data-current] { + background-color: var(--color-ui-accent); + } + + .carousel + [data-scope="carousel"][data-part="autoplay-trigger"][data-pressed] + [data-play] { + display: none; + } + + .carousel + [data-scope="carousel"][data-part="autoplay-trigger"]:not([data-pressed]) + [data-pause] { + display: none; + } +} + +@utility carousel--* { + [data-scope="carousel"][data-part="root"] { + max-width: --value(--container-ui-*, [length]); + max-height: --value(--container-ui-*, [length]); + gap: --value(--spacing-ui-gap-*, [length]); + } + + [data-scope="carousel"][data-part="control"] { + max-width: --value(--container-mini-*, [length]); + padding: --value(--spacing-mini-padding-*, [length]); + gap: --value(--spacing-mini-gap-*, [length]); + } + + [data-scope="carousel"][data-part="next-trigger"], + [data-scope="carousel"][data-part="prev-trigger"], + [data-scope="carousel"][data-part="autoplay-trigger"] { + gap: --value(--spacing-mini-gap-*, [length]); + min-height: --value(--spacing-mini-*, [length]); + font-size: --value(--text-ui-*, [length]); + line-height: --value(--text-ui-* --line-height, [length]); + background-color: --value(--color-ui-*, [color]); + color: --value(--color-ui-* --text, [color]); + border-color: --value(--color-ui-* --border, [color]); + } + + [data-scope="carousel"][data-part="next-trigger"]:hover, + [data-scope="carousel"][data-part="prev-trigger"]:hover, + [data-scope="carousel"][data-part="autoplay-trigger"]:hover { + background-color: --value(--color-ui-* -hover, [color]); + } + + [data-scope="carousel"][data-part="next-trigger"]:active, + [data-scope="carousel"][data-part="prev-trigger"]:active, + [data-scope="carousel"][data-part="autoplay-trigger"]:active { + background-color: --value(--color-ui-* -active, [color]); + } + + [data-scope="carousel"][data-part="next-trigger"]:focus-visible, + [data-scope="carousel"][data-part="prev-trigger"]:focus-visible, + [data-scope="carousel"][data-part="autoplay-trigger"]:focus-visible { + outline-color: --value(--color-ui-* --text, [color]); + } + + [data-scope="carousel"][data-part="indicator"] { + min-height: --value(--spacing-micro-*, [length]); + min-width: --value(--spacing-micro-*, [length]); + } + + [data-scope="carousel"][data-part="indicator"][data-current] { + background-color: --value(--color-ui-*, [color]); + } +} diff --git a/design/components/editable.css b/design/components/editable.css new file mode 100644 index 0000000..e569ed1 --- /dev/null +++ b/design/components/editable.css @@ -0,0 +1,111 @@ +@import "../main.css"; + +@layer components { + .editable [data-scope="editable"][data-part="root"] { + @apply ui-root; + + width: 100%; + max-width: var(--container-ui); + } + .editable [data-scope="editable"][data-part="control"] { + display: flex; + flex-direction: row; + gap: var(--spacing-mini-gap); + min-height: var(--spacing-ui); + width: 100%; + align-items: center; + justify-content: start; + max-width: var(--container-mini); + + } + + .editable [data-scope="editable"][data-part="area"] { + display: flex; + min-height: var(--spacing-ui); + flex: 1 1 auto; + align-items: center; + justify-content: start; + max-width: var(--container-mini); + gap: var(--spacing-mini-gap); + } + + .editable [data-scope="editable"][data-part="input"] { + @apply ui-input; + + flex: 1 1 auto; + width: 100%; + max-width: none; + } + + .editable [data-scope="editable"][data-part="preview"] { + @apply ui-input; + + flex: 1 1 auto; + width: 100%; + min-width: 0; + max-width: none; + text-wrap: nowrap; + } + + .editable [data-part="triggers"] { + display: inline-flex; + align-items: center; + min-height: var(--spacing-ui); + flex: 1 1 auto; + gap: var(--spacing-mini-gap); + } + + .editable [data-scope="editable"][data-part="edit-trigger"], + .editable [data-scope="editable"][data-part="cancel-trigger"], + .editable [data-scope="editable"][data-part="submit-trigger"] { + @apply ui-trigger ui-trigger--square; + } + + .editable [data-scope="editable"][data-part="cancel-trigger"] { + @apply ui-trigger--alert; + } + + .editable [data-scope="editable"][data-part="submit-trigger"] { + @apply ui-trigger--success; + } +} + +@utility editable--* { + [data-scope="editable"][data-part="root"] { + max-width: --value(--container-mini-*, [length]); + gap: --value(--spacing-mini-gap-*, [length]); + } + + [data-scope="editable"][data-part="edit-trigger"], + [data-scope="editable"][data-part="cancel-trigger"], + [data-scope="editable"][data-part="submit-trigger"] { + font-size: --value(--text-ui-*, [length]); + line-height: --value(--text-ui-* --line-height, [length]); + min-height: --value(--spacing-ui-*, [length]); + padding-inline: --value(--spacing-ui-padding-*, [length]); + gap: --value(--spacing-ui-gap-*, [length]); + } + + [data-scope="editable"][data-part="edit-trigger"]::placeholder, + [data-scope="editable"][data-part="cancel-trigger"]::placeholder, + [data-scope="editable"][data-part="submit-trigger"]::placeholder { + color: --value(--color-root--*, [color]); + } + + /* [data-scope="editable"][data-part="area"] { + max-height: --value(--spacing-ui-*, [length]); + } */ + + [data-scope="editable"][data-part="preview"] { + font-size: --value(--text-ui-*, [length]); + line-height: --value(--text-ui-* --line-height, [length]); + min-height: --value(--spacing-ui-*, [length]); + max-width: --value(--container-mini-*, [length]); + } + + [data-scope="editable"][data-part="input"] { + font-size: --value(--text-ui-*, [length]); + line-height: --value(--text-ui-* --line-height, [length]); + min-height: --value(--spacing-ui-*, [length]); + } +} diff --git a/design/components/floating-panel.css b/design/components/floating-panel.css new file mode 100644 index 0000000..d0cd582 --- /dev/null +++ b/design/components/floating-panel.css @@ -0,0 +1,139 @@ +@import "../main.css"; +@import "./scrollbar.css"; + +@layer components { + .floating-panel [data-scope="floating-panel"][data-part="trigger"] { + @apply ui-trigger; + } + + .floating-panel + [data-scope="floating-panel"][data-part="trigger"][data-state="open"] + [data-closed] { + display: none; + } + + .floating-panel + [data-scope="floating-panel"][data-part="trigger"][data-state="closed"] + [data-open] { + display: none; + } + + .floating-panel [data-part="title"] { + @apply ui-label; + } + + .floating-panel [data-scope="floating-panel"][data-part="positioner"] { + z-index: 50; + } + + .floating-panel + [data-scope="floating-panel"][data-part="positioner"]:has( + [data-scope="floating-panel"][data-part="content"][data-state="closed"] + ) { + display: none; + } + + .floating-panel + [data-scope="floating-panel"][data-part="positioner"]:has( + [data-scope="floating-panel"][data-part="content"][data-topmost] + ) { + z-index: 999999; + } + + .floating-panel [data-scope="floating-panel"][data-part="content"] { + display: flex; + flex-direction: column; + z-index: var(--z-index); + position: relative; + min-height: var(--spacing-ui); + box-shadow: var(--shadow-ui); + + &[data-topmost] { + z-index: 999999; + } + + &[data-behind] { + opacity: 0.8; + } + + &:focus-visible { + outline: 2px solid var(--color-ui--text); + outline-offset: 0; + border-radius: var(--radius-ui); + } + } + + .floating-panel [data-scope="floating-panel"][data-part="stage-trigger"], + .floating-panel [data-scope="floating-panel"][data-part="close-trigger"] { + @apply ui-trigger ui-trigger--square ui-trigger--sm; + + min-height: var(--spacing-mini); + } + + [data-scope="floating-panel"][data-part="body"] { + @apply scrollbar scrollbar--sm; + + position: relative; + overflow: auto; + flex: 1 1 auto; + min-height: fit-content; + height: var(--height); + padding: var(--spacing-ui-padding); + background-color: var(--color-root); + border-radius: 0 0 var(--radius-ui) var(--radius-ui); + border: 1px solid var(--color-ui--border); + border-block-start: 0; + + & p { + margin-block: 0; + } + } + + [data-scope="floating-panel"][data-part="header"] { + display: flex; + justify-content: space-between; + align-items: center; + flex-wrap: wrap; + padding: var(--spacing-micro-padding); + gap: var(--spacing-mini-gap); + } + + [data-scope="floating-panel"][data-part="drag-trigger"] { + background-color: var(--color-layer); + border: 1px solid var(--color-ui--border); + border-radius: var(--radius-ui) var(--radius-ui) 0 0; + + &:focus-visible { + outline: none; + } + } + + [data-scope="floating-panel"][data-part="control"] { + display: flex; + flex-flow: row nowrap; + align-items: center; + gap: var(--spacing-mini-gap); + } + + [data-scope="floating-panel"][data-part="resize-trigger"] { + &[data-axis="n"], + &[data-axis="s"] { + height: 6px; + max-width: 90%; + } + + &[data-axis="e"], + &[data-axis="w"] { + width: 6px; + max-height: 90%; + } + + &[data-axis="ne"], + &[data-axis="nw"], + &[data-axis="se"], + &[data-axis="sw"] { + width: 10px; + height: 10px; + } + } +} diff --git a/design/components/layout.css b/design/components/layout.css index 0c2d88b..06c5394 100644 --- a/design/components/layout.css +++ b/design/components/layout.css @@ -27,6 +27,11 @@ align-items: center; } + .layout__header--compact { + height: auto; + min-height: var(--spacing-ui); + } + .layout__header__content, .layout__footer__content, .layout__side__content { @@ -53,7 +58,7 @@ display: flex; flex: 1; width: 100%; - justify-content: center; + justify-content: flex-start; margin-inline: auto; background-color: var(--color-root); position: relative; @@ -90,7 +95,9 @@ flex-direction: column; flex: 1; min-width: 0; + min-height: calc(100vh - var(--spacing-ui-lg)); width: 100%; + height: 100%; margin-inline: auto; margin-block-end: var(--container-micro); position: relative; @@ -114,6 +121,8 @@ align-items: center; padding: var(--spacing-ui-padding); gap: var(--spacing-ui-gap); + margin-block-end: var(--container-micro); + } .layout__article { @@ -157,7 +166,7 @@ display: none; } - @media (min-width: theme("breakpoint.md")) { + @media (min-width: theme("breakpoint.lg")) { .layout .layout__side { display: flex; } diff --git a/design/components/listbox.css b/design/components/listbox.css new file mode 100644 index 0000000..5c046b8 --- /dev/null +++ b/design/components/listbox.css @@ -0,0 +1,117 @@ +@import "../main.css"; + +@layer components { + .listbox [data-scope="listbox"][data-part="root"] { + @apply ui-root; + + width: var(--container-mini); + gap: var(--spacing-mini-gap); + } + + .listbox [data-scope="listbox"][data-part="label"] { + @apply ui-label; + } + + .listbox [data-scope="listbox"][data-part="label"][data-disabled] { + color: var(--color-ui--muted); + } + + .listbox [data-scope="listbox"][data-part="item-group-label"] { + font-size: var(--text-ui); + line-height: var(--text-ui--line-height); + text-align: start; + padding-inline: var(--spacing-ui-padding); + padding-block: var(--spacing-mini-padding-sm); + background-color: var(--color-root); + color: var(--color-root--text); + border-bottom: 1px solid var(--color-ui--border); + } + + .listbox + [data-scope="listbox"][data-part="content"][data-layout="list"][data-orientation="vertical"] { + display: flex; + flex-direction: column; + } + + .listbox + [data-scope="listbox"][data-part="content"][data-layout="grid"]:not( + :has([data-part="item-group"]) + ) { + display: grid; + grid-template-columns: repeat(var(--column-count), 1fr); + } + + .listbox + [data-scope="listbox"][data-part="content"][data-layout="grid"] + [data-part="item-group"] { + display: grid; + grid-template-columns: repeat(var(--column-count), 1fr); + } + + .listbox [data-scope="listbox"][data-part="content"]:focus-visible { + outline: none; + } + + .listbox [data-scope="listbox"][data-part="item-group"] { + display: flex; + flex-direction: column; + margin-block: var(--spacing-micro); + } + + .listbox + [data-scope="listbox"][data-part="content"]:not( + :has([data-part="item-group"]) + ), + .listbox [data-scope="listbox"][data-part="item-group"] { + background-color: var(--color-ui--border); + border: 1px solid var(--color-ui--border); + border-radius: var(--radius-ui); + overflow: hidden; + gap: 1px; + } + + .listbox [data-scope="listbox"][data-part="item"] { + @apply ui-item; + } + + .listbox + [data-scope="listbox"][data-part="content"][dir="rtl"] + [data-scope="listbox"][data-part="item"] { + border-radius: 0; + } + + [dir="rtl"] .listbox [data-scope="listbox"][data-part="item-indicator"] { + transform: scaleX(-1); + } +} + +@utility listbox--* { + [data-scope="listbox"][data-part="root"] { + width: --value(--container-mini-*, [length]); + gap: --value(--spacing-mini-gap-*, [length]); + } + + [data-scope="listbox"][data-part="label"] { + font-size: --value(--text-ui-*, [length]); + line-height: --value(--text-ui-* --line-height, [length]); + } + + [data-scope="listbox"][data-part="item"] { + font-size: --value(--text-ui-*, [length]); + line-height: --value(--text-ui-* --line-height, [length]); + min-height: --value(--spacing-ui-*, [length]); + } + + [data-scope="listbox"][data-part="item"][data-selected] { + background-color: --value(--color-ui-*, [color]); + color: --value(--color-ui-* --text, [color]); + } + + [data-scope="listbox"][data-part="item"][data-selected]:hover { + background-color: --value(--color-ui-* -hover, [color]); + } + + [data-scope="listbox"][data-part="item"][data-selected]:active { + background-color: --value(--color-ui-* -active, [color]); + } +} diff --git a/design/components/number-input.css b/design/components/number-input.css new file mode 100644 index 0000000..f12f2f7 --- /dev/null +++ b/design/components/number-input.css @@ -0,0 +1,68 @@ +@import "../main.css"; + +@layer components { + .number-input [data-scope="number-input"][data-part="root"] { + @apply ui-root; + + gap: var(--spacing-ui-gap); + max-width: var(--container-ui); + } + + .number-input [data-scope="number-input"][data-part="label"] { + @apply ui-label; + } + + .number-input [data-scope="number-input"][data-part="control"] { + display: flex; + flex-flow: row nowrap; + align-items: stretch; + position: relative; + margin-inline: auto; + max-width: var(--container-micro); + } + + .number-input [data-scope="number-input"][data-part="scrubber"] svg { + transform: rotate(90deg); + } + + .number-input [data-scope="number-input"][data-part="input"] { + @apply ui-input; + + max-width: var(--container-micro); + flex: 1; + border-inline-end: 0; + border-end-end-radius: 0; + border-start-end-radius: 0; + } + + .number-input [data-part="trigger-group"] { + display: flex; + flex-direction: column; + gap: 0; + } + + .number-input [data-scope="number-input"][data-part="increment-trigger"], + .number-input [data-scope="number-input"][data-part="decrement-trigger"], + .number-input [data-scope="number-input"][data-part="scrubber"] { + @apply ui-trigger ui-trigger--square ui-trigger--sm; + + flex: 1; + min-height: 0; + padding: 0.25rem; + font-size: 0.625rem; + line-height: 1; + border-start-start-radius: 0; + border-end-start-radius: 0; + margin: 0; + } + + .number-input [data-scope="number-input"][data-part="increment-trigger"] { + border-end-end-radius: 0; + border-block-end: 0; + } + + .number-input [data-scope="number-input"][data-part="decrement-trigger"] { + border-start-end-radius: 0; + border-block-start: 0; + } +} diff --git a/design/components/password-input.css b/design/components/password-input.css new file mode 100644 index 0000000..d60554a --- /dev/null +++ b/design/components/password-input.css @@ -0,0 +1,54 @@ +@import "../main.css"; + +@layer components { + .password-input [data-scope="password-input"][data-part="root"] { + @apply ui-root; + + gap: var(--spacing-mini-gap); + max-width: var(--container-ui); + } + + .password-input [data-scope="password-input"][data-part="label"] { + @apply ui-label; + } + + .password-input [data-scope="password-input"][data-part="control"] { + display: flex; + flex-flow: row nowrap; + align-items: stretch; + position: relative; + margin-inline: auto; + max-width: var(--container-mini); + } + + .password-input [data-scope="password-input"][data-part="input"] { + @apply ui-input; + + max-width: var(--container-mini); + flex: 1; + border-inline-end: 0; + border-end-end-radius: 0; + border-start-end-radius: 0; + } + + .password-input + [data-scope="password-input"][data-part="indicator"][data-state="visible"] + [data-hidden] { + display: none; + } + + .password-input + [data-scope="password-input"][data-part="indicator"][data-state="hidden"] + [data-visible] { + display: none; + } + + .password-input + [data-scope="password-input"][data-part="visibility-trigger"] { + @apply ui-trigger ui-trigger--square; + + min-width: var(--spacing-ui); + border-start-start-radius: 0; + border-end-start-radius: 0; + } +} diff --git a/design/components/pin-input.css b/design/components/pin-input.css new file mode 100644 index 0000000..fada473 --- /dev/null +++ b/design/components/pin-input.css @@ -0,0 +1,41 @@ +@import "../main.css"; + +@layer components { + .pin-input [data-scope="pin-input"][data-part="root"] { + @apply ui-root; + + gap: var(--spacing-ui-gap); + max-width: var(--container-ui); + } + + .pin-input [data-scope="pin-input"][data-part="label"] { + @apply ui-label; + } + + .pin-input [data-scope="pin-input"][data-part="control"] { + display: flex; + flex-flow: row nowrap; + gap: var(--spacing-ui-gap); + align-items: center; + margin-inline: auto; + } + + .pin-input [data-scope="pin-input"][data-part="input"] { + @apply ui-input; + + height: var(--spacing-ui); + width: var(--spacing-ui); + flex-shrink: 0; + text-align: center; + + &[data-complete] { + color: var(--color-root--success); + border-color: var(--color-root--success); + } + + &[data-invalid] { + color: var(--color-root--alert); + border-color: var(--color-root--alert); + } + } +} diff --git a/design/components/radio-group.css b/design/components/radio-group.css new file mode 100644 index 0000000..bedc465 --- /dev/null +++ b/design/components/radio-group.css @@ -0,0 +1,107 @@ +@import "../main.css"; + +@layer components { + .radio-group [data-scope="radio-group"][data-part="root"] { + @apply ui-root; + + gap: var(--spacing-ui-gap); + max-width: var(--container-ui); + } + + .radio-group [data-scope="radio-group"][data-part="label"] { + @apply ui-label; + } + + [data-scope="radio-group"][data-part="item"] { + display: inline-flex; + align-items: center; + position: relative; + max-width: var(--container-ui); + width: auto; + gap: var(--spacing-ui-gap); + margin-inline: auto; + cursor: pointer; + } + + [data-scope="radio-group"][data-part="item"][data-disabled] { + cursor: not-allowed; + } + + [data-scope="radio-group"][data-part="item-control"] { + height: var(--spacing-mini); + width: var(--spacing-mini); + background: var(--color-ui); + color: var(--color-ui--text); + font-weight: var(--font-weight-ui); + border-radius: var(--radius-full); + border: 1px solid var(--color-ui--border); + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + padding: var(--spacing-micro-padding-sm); + + &[data-state="checked"] { + background: var(--color-ui--text); + color: var(--color-ui); + border-color: var(--color-ui--text); + } + + &[data-state="unchecked"] { + background: var(--color-ui); + color: var(--color-ui--text); + border-color: var(--color-ui--border); + } + + &:hover { + background-color: var(--color-ui-hover); + } + + &:active { + background-color: var(--color-ui-active); + } + + &[data-state="checked"]:hover { + background-color: var(--color-ui--text); + opacity: 0.9; + } + + &:focus-visible, + &[data-focus] { + outline: 2px solid var(--color-ui--text); + outline-offset: -3px; + } + + &:disabled, + &[data-disabled], + &[data-disabled="true"], + &[disabled="true"] { + color: var(--color-ui--muted); + background-color: --alpha(var(--color-ui) / 60%); + cursor: not-allowed; + } + + &[data-invalid] { + color: var(--color-ui-alert); + border-color: var(--color-ui-alert); + } + + &[data-required] { + color: var(--color-ui-alert); + border-color: var(--color-ui-alert); + } + } + + [data-scope="radio-group"][data-part="item-control"] .data-checked { + display: none !important; + } + + [data-scope="radio-group"][data-part="item-control"][data-state="checked"] + .data-checked { + display: block !important; + @apply ui-icon; + color: var(--color-ui-accent--text); + width: 100%; + height: 100%; + } +} diff --git a/design/components/timer.css b/design/components/timer.css new file mode 100644 index 0000000..af829e8 --- /dev/null +++ b/design/components/timer.css @@ -0,0 +1,88 @@ +@import "../main.css"; + +@layer components { + .timer [data-scope="timer"][data-part="root"] { + @apply ui-root; + + max-width: var(--container-ui); + } + + .timer [data-scope="timer"][data-part="area"] { + display: flex; + width: 100%; + justify-content: center; + align-items: center; + flex-wrap: wrap; + } + + .timer [data-scope="timer"][data-part="item"] { + display: flex; + align-items: center; + justify-content: center; + background: var(--color-ui); + border: 1px solid var(--color-ui--border); + border-radius: var(--radius-ui); + font-size: var(--text-ui); + line-height: var(--text-ui--line-height); + font-weight: var(--font-weight-ui); + color: var(--color-ui--text); + height: 2em; + aspect-ratio: 1/1; + overflow: hidden; + + /* stylelint-disable-next-line declaration-property-value-no-unknown */ + font-variation-settings: "tnum"; + text-align: center; + position: relative; + } + + .timer [data-scope="timer"][data-part="item"]::before { + position: absolute; + left: 0; + right: 0; + content: "00\a 01\a 02\a 03\a 04\a 05\a 06\a 07\a 08\a 09\a 10\a 11\a 12\a 13\a 14\a 15\a 16\a 17\a 18\a 19\a 20\a 21\a 22\a 23\a 24\a 25\a 26\a 27\a 28\a 29\a 30\a 31\a 32\a 33\a 34\a 35\a 36\a 37\a 38\a 39\a 40\a 41\a 42\a 43\a 44\a 45\a 46\a 47\a 48\a 49\a 50\a 51\a 52\a 53\a 54\a 55\a 56\a 57\a 58\a 59\a 60\a 61\a 62\a 63\a 64\a 65\a 66\a 67\a 68\a 69\a 70\a 71\a 72\a 73\a 74\a 75\a 76\a 77\a 78\a 79\a 80\a 81\a 82\a 83\a 84\a 85\a 86\a 87\a 88\a 89\a 90\a 91\a 92\a 93\a 94\a 95\a 96\a 97\a 98\a 99\a"; + white-space: pre; + top: calc(var(--value) * -2em); + font-size: inherit; + line-height: 2; + text-align: center; + transition: top 1s cubic-bezier(1, 0, 0, 1); + pointer-events: none; + z-index: 1; + } + + .timer [data-scope="timer"][data-part="separator"] { + font-size: var(--text-ui); + line-height: var(--text-ui--line-height); + font-weight: var(--font-weight-ui); + padding: var(--spacing-micro-padding); + } + + .timer [data-scope="timer"][data-part="control"] { + display: inline-flex; + width: 100%; + justify-content: center; + gap: var(--spacing-micro-gap); + } + + .timer [data-scope="timer"][data-part="action-trigger"] { + @apply ui-trigger ui-trigger--square ui-trigger--sm; + } +} + +@utility timer--* { + [data-scope="timer"][data-part="root"] { + max-width: --value(--container-ui-*, [length]); + } + + [data-scope="timer"][data-part="item"] { + font-size: --value(--text-ui-*, [length]); + line-height: --value(--text-ui-* --line-height, [length]); + } + + [data-scope="timer"][data-part="action-trigger"] { + font-size: --value(--text-ui-*, [length]); + line-height: --value(--text-ui-* --line-height, [length]); + min-height: --value(--spacing-ui-*, [length]); + } +} diff --git a/design/utilities.css b/design/utilities.css index dcb46f3..5f23a5a 100644 --- a/design/utilities.css +++ b/design/utilities.css @@ -123,6 +123,7 @@ height: 0.9em !important; width: 0.9em !important; color: currentcolor; + flex-shrink: 0; [dir="rtl"] & { transform: scaleX(-1); diff --git a/priv/design/components/accordion.css b/priv/design/components/accordion.css index 3ae7645..3f8e3b9 100644 --- a/priv/design/components/accordion.css +++ b/priv/design/components/accordion.css @@ -35,17 +35,25 @@ .accordion [data-scope="accordion"][data-part="item-text"] { width: 100%; + display: flex; + align-items: center; + gap: var(--spacing-ui-gap); } - .accordion [data-scope="accordion"][data-part="item"][data-state="closed"] [data-scope="accordion"][data-part="item-indicator"][data-open], - .accordion [data-scope="accordion"][data-part="item"][data-state="open"] [data-scope="accordion"][data-part="item-indicator"][data-closed] { - display: none; - transform: none; + .accordion [data-scope="accordion"][data-part="item"][data-state="closed"] [data-scope="accordion"][data-part="item-indicator"] .state-open, + .accordion [data-scope="accordion"][data-part="item"][data-state="open"] [data-scope="accordion"][data-part="item-indicator"] .state-closed { + @apply ui-icon; + + display: none!important; + } - .accordion [data-scope="accordion"][data-part="item"][data-state="open"] [data-scope="accordion"][data-part="item-indicator"][data-open], - .accordion [data-scope="accordion"][data-part="item"][data-state="closed"] [data-scope="accordion"][data-part="item-indicator"][data-closed] { - transform: none; + .accordion [data-scope="accordion"][data-part="item"][data-state="open"] [data-scope="accordion"][data-part="item-indicator"] .state-open, + .accordion [data-scope="accordion"][data-part="item"][data-state="closed"] [data-scope="accordion"][data-part="item-indicator"] .state-closed { + @apply ui-icon; + + display: inline-block; + transform: rotate(-90deg)!important; } .accordion [data-scope="accordion"][data-part="item-content"] { diff --git a/priv/design/components/layout.css b/priv/design/components/layout.css index 0c2d88b..06c5394 100644 --- a/priv/design/components/layout.css +++ b/priv/design/components/layout.css @@ -27,6 +27,11 @@ align-items: center; } + .layout__header--compact { + height: auto; + min-height: var(--spacing-ui); + } + .layout__header__content, .layout__footer__content, .layout__side__content { @@ -53,7 +58,7 @@ display: flex; flex: 1; width: 100%; - justify-content: center; + justify-content: flex-start; margin-inline: auto; background-color: var(--color-root); position: relative; @@ -90,7 +95,9 @@ flex-direction: column; flex: 1; min-width: 0; + min-height: calc(100vh - var(--spacing-ui-lg)); width: 100%; + height: 100%; margin-inline: auto; margin-block-end: var(--container-micro); position: relative; @@ -114,6 +121,8 @@ align-items: center; padding: var(--spacing-ui-padding); gap: var(--spacing-ui-gap); + margin-block-end: var(--container-micro); + } .layout__article { @@ -157,7 +166,7 @@ display: none; } - @media (min-width: theme("breakpoint.md")) { + @media (min-width: theme("breakpoint.lg")) { .layout .layout__side { display: flex; } diff --git a/priv/design/utilities.css b/priv/design/utilities.css index dcb46f3..5f23a5a 100644 --- a/priv/design/utilities.css +++ b/priv/design/utilities.css @@ -123,6 +123,7 @@ height: 0.9em !important; width: 0.9em !important; color: currentcolor; + flex-shrink: 0; [dir="rtl"] & { transform: scaleX(-1);