From 957d717ce54401a28591c265d19c53ba620f4c46 Mon Sep 17 00:00:00 2001 From: Reese Levine Date: Tue, 7 Apr 2026 10:30:01 -0700 Subject: [PATCH 01/23] ggml-webgpu: parameterize submission size and add iOS specific limits (#21533) * Work towards removing bitcast * Move rest of existing types over * Add timeout back to wait and remove synchronous set_tensor/memset_tensor * move to unpackf16 for wider compatibility * cleanup * Remove deadlock condition in free_bufs * Start work on removing parameter buffer pools * Simplify and optimize further * simplify profile futures * Fix stride * Try using a single command buffer per batch * formatting * Add parameters for different browsers in-flight submissions * Update handling of batch size too * Throttle ios as much as possible * Increase timeout for llvm-pipe testing --- ggml/src/ggml-webgpu/ggml-webgpu.cpp | 148 ++++++++++++++++++++------- 1 file changed, 113 insertions(+), 35 deletions(-) diff --git a/ggml/src/ggml-webgpu/ggml-webgpu.cpp b/ggml/src/ggml-webgpu/ggml-webgpu.cpp index 5b1183936..3d038924b 100644 --- a/ggml/src/ggml-webgpu/ggml-webgpu.cpp +++ b/ggml/src/ggml-webgpu/ggml-webgpu.cpp @@ -16,7 +16,6 @@ #include #include -#include #include #include #ifdef GGML_WEBGPU_GPU_PROFILE @@ -25,7 +24,6 @@ #if defined(GGML_WEBGPU_DEBUG) || defined(GGML_WEBGPU_CPU_PROFILE) || defined(GGML_WEBGPU_GPU_PROFILE) # include #endif -#include #include #include #include @@ -81,13 +79,13 @@ static inline void compute_2d_workgroups(uint32_t total_wg, uint32_t max_per_dim /* Constants */ -#define WEBGPU_COMMAND_SUBMIT_BATCH_SIZE 32u -#define WEBGPU_NUM_PARAM_SLOTS \ - (WEBGPU_COMMAND_SUBMIT_BATCH_SIZE + 10) // a few extra for safety, since some operations may need multiple slots -#define WEBGPU_WAIT_ANY_TIMEOUT_MS 100 -#define WEBGPU_PARAMS_BUF_SIZE_BYTES 128 // enough for 32 parameters -#define WEBGPU_SET_ROWS_ERROR_BUF_SIZE_BYTES 4 -#define WEBGPU_STORAGE_BUF_BINDING_MULT 4 // a storage buffer binding size must be a multiple of 4 +#define WEBGPU_DEFAULT_COMMAND_SUBMIT_BATCH_SIZE 32u +#define WEBGPU_NUM_PARAM_SLOT_SAFETY_MARGIN 10u +#define WEBGPU_RUNTIME_WAIT_TIMEOUT_MS 30000u +#define WEBGPU_RUNTIME_WAIT_TIMEOUT_NS (WEBGPU_RUNTIME_WAIT_TIMEOUT_MS * 1e6) +#define WEBGPU_PARAMS_BUF_SIZE_BYTES 128 // enough for 32 parameters +#define WEBGPU_SET_ROWS_ERROR_BUF_SIZE_BYTES 4 +#define WEBGPU_STORAGE_BUF_BINDING_MULT 4 // a storage buffer binding size must be a multiple of 4 // For operations which process a row in parallel, this seems like a reasonable // default @@ -252,6 +250,8 @@ struct webgpu_global_context_struct { wgpu::Adapter adapter; wgpu::Device device; wgpu::Queue queue; + uint32_t command_submit_batch_size = WEBGPU_DEFAULT_COMMAND_SUBMIT_BATCH_SIZE; + uint32_t max_inflight_batches = UINT32_MAX; webgpu_capabilities capabilities; // Shared buffer to move data from device to host @@ -417,16 +417,72 @@ static void ggml_backend_webgpu_wait_profile_futures(webgpu_global_context & } #endif +template +static void ggml_backend_webgpu_check_wait_status(wgpu::WaitStatus wait_status, + T callback_status, + T success_status, + const char * wait_name, + const char * failure_name, + const char * callback_message) { + if (wait_status == wgpu::WaitStatus::TimedOut) { + GGML_ABORT("ggml_webgpu: %s timed out after %u ms\n", wait_name, WEBGPU_RUNTIME_WAIT_TIMEOUT_MS); + } + if (wait_status == wgpu::WaitStatus::Error) { + GGML_ABORT("ggml_webgpu: %s failed\n", wait_name); + } + if (callback_status != success_status) { + GGML_ABORT("ggml_webgpu: %s failed with status %d: %s\n", failure_name, static_cast(callback_status), + callback_message); + } +} + +#ifdef __EMSCRIPTEN__ +// iOS browsers seem to have very strict limits on the number of in-flight GPU commands, so we need to throttle to avoid failures. +EM_JS(int, ggml_webgpu_is_ios_browser, (), { + const ua = navigator.userAgent; + return (ua.includes('iPhone') || ua.includes('iPad')) ? 1 : 0; +}); +#endif + +static uint32_t ggml_backend_webgpu_get_max_inflight_batches(const wgpu::AdapterInfo & info) { +#ifdef __EMSCRIPTEN__ + if (ggml_webgpu_is_ios_browser()) { + return 1; + } +#else + GGML_UNUSED(info); +#endif + + return UINT32_MAX; +} + +static uint32_t ggml_backend_webgpu_get_command_submit_batch_size(const wgpu::AdapterInfo & info) { +#ifdef __EMSCRIPTEN__ + if (ggml_webgpu_is_ios_browser()) { + return 16; + } +#else + GGML_UNUSED(info); +#endif + + return WEBGPU_DEFAULT_COMMAND_SUBMIT_BATCH_SIZE; +} + static void ggml_backend_webgpu_wait_queue(webgpu_global_context & ctx) { - ctx->instance.WaitAny( - ctx->queue.OnSubmittedWorkDone(wgpu::CallbackMode::AllowSpontaneous, - [](wgpu::QueueWorkDoneStatus status, wgpu::StringView message) { - if (status != wgpu::QueueWorkDoneStatus::Success) { - GGML_LOG_ERROR("ggml_webgpu: Failed to submit commands: %s\n", - std::string(message).c_str()); - } - }), - UINT64_MAX); + wgpu::QueueWorkDoneStatus callback_status = wgpu::QueueWorkDoneStatus::Error; + std::string callback_message; + + const wgpu::WaitStatus wait_status = ctx->instance.WaitAny( + ctx->queue.OnSubmittedWorkDone( + wgpu::CallbackMode::AllowSpontaneous, + [&callback_status, &callback_message](wgpu::QueueWorkDoneStatus status, wgpu::StringView message) { + callback_status = status; + callback_message = std::string(message); + }), + WEBGPU_RUNTIME_WAIT_TIMEOUT_NS); + + ggml_backend_webgpu_check_wait_status(wait_status, callback_status, wgpu::QueueWorkDoneStatus::Success, + "Queue wait", "Queue work", callback_message.c_str()); } static void ggml_backend_webgpu_map_buffer(webgpu_global_context & ctx, @@ -434,14 +490,31 @@ static void ggml_backend_webgpu_map_buffer(webgpu_global_context & ctx, wgpu::MapMode mode, size_t offset, size_t size) { - ctx->instance.WaitAny(buffer.MapAsync(mode, offset, size, wgpu::CallbackMode::AllowSpontaneous, - [](wgpu::MapAsyncStatus status, wgpu::StringView message) { - if (status != wgpu::MapAsyncStatus::Success) { - GGML_LOG_ERROR("ggml_webgpu: Failed to map buffer: %s\n", - message.data); - } - }), - UINT64_MAX); + wgpu::MapAsyncStatus callback_status = wgpu::MapAsyncStatus::Error; + std::string callback_message; + + const wgpu::WaitStatus wait_status = ctx->instance.WaitAny( + buffer.MapAsync(mode, offset, size, wgpu::CallbackMode::AllowSpontaneous, + [&callback_status, &callback_message](wgpu::MapAsyncStatus status, wgpu::StringView message) { + callback_status = status; + callback_message = std::string(message); + }), + WEBGPU_RUNTIME_WAIT_TIMEOUT_NS); + + ggml_backend_webgpu_check_wait_status(wait_status, callback_status, wgpu::MapAsyncStatus::Success, + "Buffer map wait", "Buffer map", callback_message.c_str()); +} + +static void ggml_backend_webgpu_submit_commands(webgpu_context & ctx, + const wgpu::CommandBuffer commands, + uint32_t & num_inflight_batches) { + if (num_inflight_batches >= ctx->global_ctx->max_inflight_batches) { + ggml_backend_webgpu_wait_queue(ctx->global_ctx); + num_inflight_batches = 0; + } + + ctx->global_ctx->queue.Submit(1, &commands); + num_inflight_batches++; } #ifdef GGML_WEBGPU_DEBUG @@ -2871,9 +2944,10 @@ static ggml_status ggml_backend_webgpu_graph_compute(ggml_backend_t backend, str #ifdef GGML_WEBGPU_GPU_PROFILE std::vector profile_futures; #endif - uint32_t num_batched_kernels = 0; - bool contains_set_rows = false; - wgpu::CommandEncoder batch_encoder = ctx->global_ctx->device.CreateCommandEncoder(); + uint32_t num_batched_kernels = 0; + uint32_t num_inflight_batches = 0; + bool contains_set_rows = false; + wgpu::CommandEncoder batch_encoder = ctx->global_ctx->device.CreateCommandEncoder(); for (int i = 0; i < cgraph->n_nodes; i++) { if (cgraph->nodes[i]->op == GGML_OP_SET_ROWS) { @@ -2884,10 +2958,10 @@ static ggml_status ggml_backend_webgpu_graph_compute(ggml_backend_t backend, str num_batched_kernels += cmd.value().num_kernels; } - if (num_batched_kernels >= WEBGPU_COMMAND_SUBMIT_BATCH_SIZE) { + if (num_batched_kernels >= ctx->global_ctx->command_submit_batch_size) { num_batched_kernels = 0; wgpu::CommandBuffer batch_commands = batch_encoder.Finish(); - ctx->global_ctx->queue.Submit(1, &batch_commands); + ggml_backend_webgpu_submit_commands(ctx, batch_commands, num_inflight_batches); #ifdef GGML_WEBGPU_GPU_PROFILE ggml_backend_webgpu_collect_profile_futures(ctx->global_ctx, commands, profile_futures); #endif @@ -2898,7 +2972,7 @@ static ggml_status ggml_backend_webgpu_graph_compute(ggml_backend_t backend, str } if (!commands.empty()) { wgpu::CommandBuffer batch_commands = batch_encoder.Finish(); - ctx->global_ctx->queue.Submit(1, &batch_commands); + ggml_backend_webgpu_submit_commands(ctx, batch_commands, num_inflight_batches); #ifdef GGML_WEBGPU_GPU_PROFILE ggml_backend_webgpu_collect_profile_futures(ctx->global_ctx, commands, profile_futures); #endif @@ -2912,7 +2986,7 @@ static ggml_status ggml_backend_webgpu_graph_compute(ggml_backend_t backend, str encoder.CopyBufferToBuffer(ctx->set_rows_dev_error_buf, 0, ctx->set_rows_host_error_buf, 0, ctx->set_rows_host_error_buf.GetSize()); wgpu::CommandBuffer set_rows_commands = encoder.Finish(); - ctx->global_ctx->queue.Submit(1, &set_rows_commands); + ggml_backend_webgpu_submit_commands(ctx, set_rows_commands, num_inflight_batches); } ggml_backend_webgpu_wait_queue(ctx->global_ctx); @@ -3363,6 +3437,8 @@ static bool create_webgpu_device(ggml_backend_webgpu_reg_context * ctx) { } #endif ctx->webgpu_global_ctx->adapter.GetInfo(&info); + ctx->webgpu_global_ctx->command_submit_batch_size = ggml_backend_webgpu_get_command_submit_batch_size(info); + ctx->webgpu_global_ctx->max_inflight_batches = ggml_backend_webgpu_get_max_inflight_batches(info); wgpu::SupportedFeatures features; ctx->webgpu_global_ctx->adapter.GetFeatures(&features); // we require f16 support @@ -3483,8 +3559,10 @@ static webgpu_context initialize_webgpu_context(ggml_backend_dev_t dev) { webgpu_context webgpu_ctx = std::make_shared(); webgpu_ctx->global_ctx = dev_ctx->webgpu_global_ctx; webgpu_ctx->shader_lib = std::make_unique(dev_ctx->webgpu_global_ctx->device); - webgpu_ctx->param_arena.init(webgpu_ctx->global_ctx->device, WEBGPU_PARAMS_BUF_SIZE_BYTES, WEBGPU_NUM_PARAM_SLOTS, - webgpu_ctx->global_ctx->capabilities.limits.minUniformBufferOffsetAlignment); + webgpu_ctx->param_arena.init( + webgpu_ctx->global_ctx->device, WEBGPU_PARAMS_BUF_SIZE_BYTES, + webgpu_ctx->global_ctx->command_submit_batch_size + WEBGPU_NUM_PARAM_SLOT_SAFETY_MARGIN, + webgpu_ctx->global_ctx->capabilities.limits.minUniformBufferOffsetAlignment); ggml_webgpu_create_buffer(webgpu_ctx->global_ctx->device, webgpu_ctx->set_rows_dev_error_buf, WEBGPU_SET_ROWS_ERROR_BUF_SIZE_BYTES, wgpu::BufferUsage::Storage | wgpu::BufferUsage::CopySrc, "set_rows_dev_error_buf"); From 4eb19514dd2984662f13aacbb052c559c8fde3b1 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Tue, 7 Apr 2026 20:31:28 +0300 Subject: [PATCH 02/23] kv-cache : support attention rotation for heterogeneous iSWA (#21513) * kv-cache : support attention rotation for heterogeneous iSWA * cont : remove assert --- src/llama-graph.cpp | 40 +++++++++++++++++++++++++++++++--------- src/llama-graph.h | 6 ++++-- src/llama-kv-cache.cpp | 24 ++++++++++++++++++------ src/llama-kv-cache.h | 5 +++++ 4 files changed, 58 insertions(+), 17 deletions(-) diff --git a/src/llama-graph.cpp b/src/llama-graph.cpp index 0e7d96ca1..d6f5c5eab 100644 --- a/src/llama-graph.cpp +++ b/src/llama-graph.cpp @@ -511,6 +511,14 @@ void llm_graph_input_attn_kv_iswa::set_input(const llama_ubatch * ubatch) { if (self_v_rot) { mctx->get_base()->set_input_v_rot(self_v_rot); } + + if (self_k_rot_swa) { + mctx->get_swa()->set_input_k_rot(self_k_rot_swa); + } + + if (self_v_rot_swa) { + mctx->get_swa()->set_input_v_rot(self_v_rot_swa); + } } bool llm_graph_input_attn_kv_iswa::can_reuse(const llm_graph_params & params) { @@ -681,6 +689,14 @@ void llm_graph_input_mem_hybrid_iswa::set_input(const llama_ubatch * ubatch) { attn_ctx->get_base()->set_input_v_rot(inp_attn->self_v_rot); } + if (inp_attn->self_k_rot_swa) { + attn_ctx->get_swa()->set_input_k_rot(inp_attn->self_k_rot_swa); + } + + if (inp_attn->self_v_rot_swa) { + attn_ctx->get_swa()->set_input_v_rot(inp_attn->self_v_rot_swa); + } + const int64_t n_rs = mctx->get_recr()->get_n_rs(); if (inp_rs->s_copy) { @@ -2233,15 +2249,20 @@ ggml_tensor * llm_graph_context::build_attn( ggml_tensor * v_mla, float kq_scale, int il) const { - if (inp->self_k_rot) { - q_cur = ggml_mul_mat_aux(ctx0, q_cur, inp->self_k_rot); + const bool is_swa = hparams.is_swa(il); + + auto * k_rot = is_swa ? inp->self_k_rot_swa : inp->self_k_rot; + auto * v_rot = is_swa ? inp->self_v_rot_swa : inp->self_v_rot; + + if (k_rot) { + q_cur = ggml_mul_mat_aux(ctx0, q_cur, k_rot); if (k_cur) { - k_cur = ggml_mul_mat_aux(ctx0, k_cur, inp->self_k_rot); + k_cur = ggml_mul_mat_aux(ctx0, k_cur, k_rot); } } - if (inp->self_v_rot) { + if (v_rot) { if (v_cur) { - v_cur = ggml_mul_mat_aux(ctx0, v_cur, inp->self_v_rot); + v_cur = ggml_mul_mat_aux(ctx0, v_cur, v_rot); } } @@ -2259,8 +2280,6 @@ ggml_tensor * llm_graph_context::build_attn( const auto * mctx_iswa = inp->mctx; - const bool is_swa = hparams.is_swa(il); - const auto * mctx_cur = is_swa ? mctx_iswa->get_swa() : mctx_iswa->get_base(); // optionally store to KV cache @@ -2285,8 +2304,8 @@ ggml_tensor * llm_graph_context::build_attn( ggml_tensor * cur = build_attn_mha(q, k, v, kq_b, kq_mask, sinks, v_mla, kq_scale, il); cb(cur, "kqv_out", il); - if (inp->self_v_rot) { - cur = ggml_mul_mat_aux(ctx0, cur, inp->self_v_rot); + if (v_rot) { + cur = ggml_mul_mat_aux(ctx0, cur, v_rot); } if (wo) { @@ -2388,6 +2407,9 @@ llm_graph_input_attn_kv_iswa * llm_graph_context::build_attn_inp_kv_iswa() const inp->self_k_rot = mctx_cur->get_base()->build_input_k_rot(ctx0); inp->self_v_rot = mctx_cur->get_base()->build_input_v_rot(ctx0); + inp->self_k_rot_swa = mctx_cur->get_swa()->build_input_k_rot(ctx0); + inp->self_v_rot_swa = mctx_cur->get_swa()->build_input_v_rot(ctx0); + return (llm_graph_input_attn_kv_iswa *) res->add_input(std::move(inp)); } diff --git a/src/llama-graph.h b/src/llama-graph.h index bb0ad7519..29e78451f 100644 --- a/src/llama-graph.h +++ b/src/llama-graph.h @@ -308,7 +308,7 @@ public: ggml_tensor * self_kq_mask = nullptr; // F32 [n_kv, n_batch/n_stream, 1, n_stream] ggml_tensor * self_kq_mask_cnv = nullptr; // [n_kv, n_batch/n_stream, 1, n_stream] - // note: assumes v_rot^ == I + // note: assumes v_rot^2 == I ggml_tensor * self_k_rot = nullptr; ggml_tensor * self_v_rot = nullptr; @@ -388,10 +388,12 @@ public: ggml_tensor * self_kq_mask_swa = nullptr; // F32 [n_kv, n_batch/n_stream, 1, n_stream] ggml_tensor * self_kq_mask_swa_cnv = nullptr; // [n_kv, n_batch/n_stream, 1, n_stream] - // note: using same rotation matrices for both base and swa cache ggml_tensor * self_k_rot = nullptr; ggml_tensor * self_v_rot = nullptr; + ggml_tensor * self_k_rot_swa = nullptr; + ggml_tensor * self_v_rot_swa = nullptr; + const llama_hparams hparams; const llama_cparams cparams; diff --git a/src/llama-kv-cache.cpp b/src/llama-kv-cache.cpp index 3e0fd3107..09102f549 100644 --- a/src/llama-kv-cache.cpp +++ b/src/llama-kv-cache.cpp @@ -169,6 +169,18 @@ llama_kv_cache::llama_kv_cache( continue; } + if (n_embd_head_k_all == 0) { + n_embd_head_k_all = (int32_t) hparams.n_embd_head_k(il); + } else if (n_embd_head_k_all > 0 && n_embd_head_k_all != (int32_t) hparams.n_embd_head_k(il)) { + n_embd_head_k_all = -1; + } + + if (n_embd_head_v_all == 0) { + n_embd_head_v_all = (int32_t) hparams.n_embd_head_v(il); + } else if (n_embd_head_v_all > 0 && n_embd_head_v_all != (int32_t) hparams.n_embd_head_v(il)) { + n_embd_head_v_all = -1; + } + // [TAG_V_CACHE_VARIABLE] const uint32_t n_embd_k_gqa = hparams.n_embd_k_gqa(il); const uint32_t n_embd_v_gqa = !v_trans ? hparams.n_embd_v_gqa(il) : hparams.n_embd_v_gqa_max(); @@ -276,23 +288,23 @@ llama_kv_cache::llama_kv_cache( attn_rot_k = !attn_rot_disable && + n_embd_head_k_all > 0 && ggml_is_quantized(type_k) && - !hparams.is_n_embd_k_gqa_variable() && hparams.n_embd_head_k() % 64 == 0; attn_rot_v = !attn_rot_disable && + n_embd_head_v_all > 0 && ggml_is_quantized(type_v) && - !hparams.is_n_embd_v_gqa_variable() && hparams.n_embd_head_v() % 64 == 0; - LLAMA_LOG_INFO("%s: attn_rot_k = %d\n", __func__, attn_rot_k); - LLAMA_LOG_INFO("%s: attn_rot_v = %d\n", __func__, attn_rot_v); + LLAMA_LOG_INFO("%s: attn_rot_k = %d, n_embd_head_k_all = %d\n", __func__, attn_rot_k, n_embd_head_k_all); + LLAMA_LOG_INFO("%s: attn_rot_v = %d, n_embd_head_k_all = %d\n", __func__, attn_rot_v, n_embd_head_v_all); // pre-compute the haramard matrices and keep them in host memory // TODO: in the future, we can make copies in the backend buffers to avoid host -> device transfers if (attn_rot_k || attn_rot_v) { - for (int64_t n = 64; n <= std::max(hparams.n_embd_head_k(), hparams.n_embd_head_v()); n *= 2) { + for (int64_t n = 64; n <= std::max(n_embd_head_k_all, n_embd_head_v_all); n *= 2) { attn_rot_hadamard[n] = std::vector(n*n); ggml_init_params params = { @@ -1308,7 +1320,7 @@ ggml_tensor * llama_kv_cache::build_input_k_rot(ggml_context * ctx) const { // ref: https://github.com/ggml-org/llama.cpp/pull/21038#issuecomment-4141323088 do { nrot *= 2; - } while (hparams.n_embd_head_k() % nrot == 0); + } while (n_embd_head_k_all % nrot == 0); nrot /= 2; res = ggml_new_tensor_2d(ctx, GGML_TYPE_F32, nrot, nrot); diff --git a/src/llama-kv-cache.h b/src/llama-kv-cache.h index d4569a06f..0b62dc7b2 100644 --- a/src/llama-kv-cache.h +++ b/src/llama-kv-cache.h @@ -239,6 +239,11 @@ private: bool attn_rot_k = false; bool attn_rot_v = false; + // if all layers participating in the cache have constant head size, the value is stored here + // otherwise the value is -1 + int32_t n_embd_head_k_all = 0; + int32_t n_embd_head_v_all = 0; + // pre-computed hadamard martrices std::unordered_map> attn_rot_hadamard; From 93bdc6156333082421d82b52d36f7dacb0542495 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Tue, 7 Apr 2026 21:24:25 +0200 Subject: [PATCH 03/23] gguf-py : fix missing comma after bad merge in tensor-mapping (#21558) This commit adds a missing comma in the vision encoder attention qkv block. The motivation for this change is that without the comma there will be a string concatenation of the Kimi-K2.5 and the Nemotron Nano v2 VL tensor mappings which will be broken. --- gguf-py/gguf/tensor_mapping.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gguf-py/gguf/tensor_mapping.py b/gguf-py/gguf/tensor_mapping.py index 1c324976c..9c713456e 100644 --- a/gguf-py/gguf/tensor_mapping.py +++ b/gguf-py/gguf/tensor_mapping.py @@ -1441,7 +1441,7 @@ class TensorNameMap: "visual.blocks.{bid}.attn.qkv", # qwen3vl "model.vision.transformer.layers.{bid}.attention.query_key_value", # cogvlm "model.vision_model.transformer.layers.{bid}.self_attn.qkv_proj", # Deepseek-OCR CLIP - "vision_tower.encoder.blocks.{bid}.wqkv" # Kimi-K2.5 + "vision_tower.encoder.blocks.{bid}.wqkv", # Kimi-K2.5 "vision_model.radio_model.model.blocks.{bid}.attn.qkv", # Nemotron Nano v2 VL ), From 66c4f9ded01b29d9120255be1ed8d5835bcbb51d Mon Sep 17 00:00:00 2001 From: iacopPBK Date: Tue, 7 Apr 2026 21:47:42 +0200 Subject: [PATCH 04/23] ggml-cuda: ds_read_b128 for q4_0 and q4_1 mmq kernels (#21168) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ds_read_b128 for q4_0 and q4_1 mmq kernels Current for loop generates ds_read_b32 instructions with hip compiler, the new solution generates ds_read_b128 instructions for the same operation, saving some LDS bandwidth. Tested on MI50 and RX6800XT, its faster on both. * Vectorized lds load update: used ggml_cuda_get_max_cpy_bytes and ggml_cuda_memcpy_1 functions for generic implementation * Explicit for loop in mmq, renamed vec into tmp * Fixed max_cpy usage in the loading loop * Fixed typo in q4_1 kernel * Update ggml/src/ggml-cuda/mmq.cuh Co-authored-by: Johannes Gäßler * Update ggml/src/ggml-cuda/mmq.cuh Co-authored-by: Johannes Gäßler * Update ggml/src/ggml-cuda/mmq.cuh Co-authored-by: Johannes Gäßler * Renoved trailing white line 500 * Update mmq.cuh removed other whitelines * Remove trailing whitespaces --------- Co-authored-by: iacopPBK Co-authored-by: Johannes Gäßler Co-authored-by: iacopPBK --- ggml/src/ggml-cuda/mmq.cuh | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/ggml/src/ggml-cuda/mmq.cuh b/ggml/src/ggml-cuda/mmq.cuh index 51e8dad4c..489d3616b 100644 --- a/ggml/src/ggml-cuda/mmq.cuh +++ b/ggml/src/ggml-cuda/mmq.cuh @@ -386,17 +386,25 @@ static __device__ __forceinline__ void vec_dot_q4_0_q8_1_dp4a( #pragma unroll for (int i0 = 0; i0 < mmq_y; i0 += warp_size) { const int i = i0 + threadIdx.x; - const int kyqs = QI8_1 * ((k01/2) / (QI8_1/2)) + (k01/2) % (QI8_1/2); int u[2*VDR_Q4_0_Q8_1_MMQ]; -#pragma unroll - for (int l = 0; l < VDR_Q4_0_Q8_1_MMQ; ++l) { - u[2*l+0] = y_qs[j*MMQ_TILE_Y_K + kyqs + l]; - u[2*l+1] = y_qs[j*MMQ_TILE_Y_K + kyqs + (l + QI4_0)]; + constexpr int max_cpy = ggml_cuda_get_max_cpy_bytes(); + constexpr int mcpy_int = max_cpy / sizeof(int); + static_assert(VDR_Q4_0_Q8_1_MMQ == 4, "bad VDR_Q4_0_Q8_1_MMQ"); + + int tmp0[4], tmp1[4]; + + #pragma unroll + for (int l0 = 0; l0 < 4 / mcpy_int; ++l0) { + ggml_cuda_memcpy_1(tmp0 + l0 * mcpy_int, &y_qs[j*MMQ_TILE_Y_K + kyqs + l0 * mcpy_int] ); + ggml_cuda_memcpy_1(tmp1 + l0 * mcpy_int, &y_qs[j*MMQ_TILE_Y_K + kyqs + QI4_0 + l0 * mcpy_int]); } + u[0]=tmp0[0]; u[2]=tmp0[1]; u[4]=tmp0[2]; u[6]=tmp0[3]; + u[1]=tmp1[0]; u[3]=tmp1[1]; u[5]=tmp1[2]; u[7]=tmp1[3]; + sum[j0/nwarps*mmq_y/warp_size + i0/warp_size] += vec_dot_q4_0_q8_1_impl (&x_qs[i*(MMQ_TILE_NE_K + 1) + k0/QR4_0], u, x_df[i*(MMQ_TILE_NE_K/QI4_0) + i/QI4_0 + k0/(QR4_0*QI4_0)], y_ds[j*MMQ_TILE_Y_K + k01/QI8_1]); @@ -489,17 +497,25 @@ static __device__ __forceinline__ void vec_dot_q4_1_q8_1_dp4a( #pragma unroll for (int i0 = 0; i0 < mmq_y; i0 += warp_size) { const int i = i0 + threadIdx.x; - const int kyqs = QI8_1 * ((k01/2) / (QI8_1/2)) + (k01/2) % (QI8_1/2); int u[2*VDR_Q4_1_Q8_1_MMQ]; -#pragma unroll - for (int l = 0; l < VDR_Q4_1_Q8_1_MMQ; ++l) { - u[2*l+0] = y_qs[j*MMQ_TILE_Y_K + kyqs + l]; - u[2*l+1] = y_qs[j*MMQ_TILE_Y_K + kyqs + (l + QI4_1)]; + constexpr int max_cpy = ggml_cuda_get_max_cpy_bytes(); + constexpr int mcpy_int = max_cpy / sizeof(int); + static_assert(VDR_Q4_0_Q8_1_MMQ == 4, "bad VDR_Q4_0_Q8_1_MMQ"); + + int tmp0[4], tmp1[4]; + + #pragma unroll + for (int l0 = 0; l0 < 4 / mcpy_int; ++l0) { + ggml_cuda_memcpy_1(tmp0 + l0 * mcpy_int, &y_qs[j*MMQ_TILE_Y_K + kyqs + l0 * mcpy_int] ); + ggml_cuda_memcpy_1(tmp1 + l0 * mcpy_int, &y_qs[j*MMQ_TILE_Y_K + kyqs + QI4_1 + l0 * mcpy_int]); } + u[0]=tmp0[0]; u[2]=tmp0[1]; u[4]=tmp0[2]; u[6]=tmp0[3]; + u[1]=tmp1[0]; u[3]=tmp1[1]; u[5]=tmp1[2]; u[7]=tmp1[3]; + sum[j0/nwarps*mmq_y/warp_size + i0/warp_size] += vec_dot_q4_1_q8_1_impl (&x_qs[i*(MMQ_TILE_NE_K + 1) + k0/QR4_1], u, x_dm[i*(MMQ_TILE_NE_K/QI4_1) + i/QI4_1 + k0/(QR4_1*QI4_1)], y_ds[j*MMQ_TILE_Y_K + k01/QI8_1]); @@ -4170,3 +4186,4 @@ void ggml_cuda_op_mul_mat_q( const int64_t src1_padded_row_size, cudaStream_t stream); bool ggml_cuda_should_use_mmq(enum ggml_type type, int cc, int64_t ne11, int64_t n_experts); + From c5ce4bc227592afb2ec87aa4efce2d0ac0482c51 Mon Sep 17 00:00:00 2001 From: Aman Gupta Date: Wed, 8 Apr 2026 09:05:51 +0800 Subject: [PATCH 05/23] CUDA: make cuda graphs props check faster (#21472) * CUDA: compute fast hash instead of expensive props check * use seen node * use memcp --- ggml/src/ggml-cuda/common.cuh | 21 +----- ggml/src/ggml-cuda/ggml-cuda.cu | 113 ++------------------------------ 2 files changed, 6 insertions(+), 128 deletions(-) diff --git a/ggml/src/ggml-cuda/common.cuh b/ggml/src/ggml-cuda/common.cuh index 1c9233b4f..a2960e5ae 100644 --- a/ggml/src/ggml-cuda/common.cuh +++ b/ggml/src/ggml-cuda/common.cuh @@ -1157,19 +1157,6 @@ struct ggml_tensor_extra_gpu { #define USE_CUDA_GRAPH #endif -struct ggml_cuda_graph_node_properties { - void * node_data; - ggml_op node_op; - enum ggml_type node_type; - int32_t flags; - int64_t ne[GGML_MAX_DIMS]; - size_t nb[GGML_MAX_DIMS]; - void * src_data[GGML_MAX_SRC]; - int32_t op_params[GGML_MAX_OP_PARAMS / sizeof(int32_t)]; -}; - -static_assert(std::is_trivial::value, "ggml_cuda_graph_node_properties must be trivial"); - struct ggml_cuda_graph { #ifdef USE_CUDA_GRAPH ~ggml_cuda_graph() { @@ -1186,13 +1173,7 @@ struct ggml_cuda_graph { std::vector nodes; bool disable_due_to_gpu_arch = false; bool warmup_complete = false; - std::vector props; - - // these are extra tensors (inputs) that participate in the ggml graph but are not nodes - // they properties also have to match in order to be able to safely reuse a CUDA graph - // ref: https://github.com/ggml-org/llama.cpp/pull/18583 - // ref: https://github.com/ggml-org/llama.cpp/pull/19165 - std::vector extra; + std::vector nodes_copy; bool is_enabled() const { static const bool disable_cuda_graphs_due_to_env = (getenv("GGML_CUDA_DISABLE_GRAPHS") != nullptr); diff --git a/ggml/src/ggml-cuda/ggml-cuda.cu b/ggml/src/ggml-cuda/ggml-cuda.cu index 25b904b7d..b21196bb4 100644 --- a/ggml/src/ggml-cuda/ggml-cuda.cu +++ b/ggml/src/ggml-cuda/ggml-cuda.cu @@ -82,7 +82,6 @@ #include #include #include -#include static_assert(sizeof(half) == sizeof(ggml_fp16_t), "wrong fp16 size"); @@ -2969,74 +2968,6 @@ static bool ggml_cuda_graph_check_compability(ggml_cgraph * cgraph) { return use_cuda_graph; } -static void ggml_cuda_graph_node_set_properties(ggml_cuda_graph_node_properties * props, ggml_tensor * node) { - memset(props, 0, sizeof(ggml_cuda_graph_node_properties)); - props->node_data = node->data; - props->node_op = node->op; - props->node_type = node->type; - props->flags = node->flags; - for (int i = 0; i < GGML_MAX_DIMS; i++) { - props->ne[i] = node->ne[i]; - props->nb[i] = node->nb[i]; - } - for (int i = 0; i < GGML_MAX_SRC; i++) { - if (!node->src[i]) { - continue; - } - - props->src_data[i] = node->src[i]->data; - } - memcpy(props->op_params, node->op_params, GGML_MAX_OP_PARAMS); -} - -static bool ggml_cuda_graph_node_properties_match(ggml_tensor * node, ggml_cuda_graph_node_properties * props) { - if (node->data != props->node_data && node->op != GGML_OP_VIEW) { - return false; - } - - if (node->op != props->node_op) { - return false; - } - - if (node->type != props->node_type) { - return false; - } - - for (int i = 0; i < GGML_MAX_DIMS; i++) { - if (node->ne[i] != props->ne[i]) { - return false; - } - if (node->nb[i] != props->nb[i]) { - return false; - } - } - - if (node->op != GGML_OP_VIEW) { - for (int i = 0; i < GGML_MAX_SRC; i++) { - if (!node->src[i]) { - if (props->src_data[i] != nullptr) { - return false; - } - continue; - } - - if (node->src[i]->data != props->src_data[i]) { - return false; - } - } - } - - if (memcmp(props->op_params, node->op_params, GGML_MAX_OP_PARAMS) != 0) { - return false; - } - - if ((node->flags & GGML_TENSOR_FLAG_COMPUTE) != (props->flags & GGML_TENSOR_FLAG_COMPUTE)) { - return false; - } - - return true; -} - static const void * ggml_cuda_graph_get_key(ggml_cgraph * cgraph) { return cgraph->nodes[0]; } @@ -3048,52 +2979,18 @@ static bool ggml_cuda_graph_update_required(ggml_backend_cuda_context * cuda_ctx ggml_cuda_graph * graph = cuda_ctx->cuda_graph(graph_key); // Check if the graph size has changed - if (graph->props.size() != (size_t)cgraph->n_nodes) { + if ((int)graph->nodes_copy.size() != cgraph->n_nodes) { res = true; - graph->props.resize(cgraph->n_nodes); + graph->nodes_copy.resize(cgraph->n_nodes); } - // Loop over nodes in GGML graph to determine if CUDA graph update is required - // and store properties to allow this comparison for the next token - std::unordered_set seen_node; - std::vector srcs_extra; for (int i = 0; i < cgraph->n_nodes; i++) { - bool props_match = true; - - seen_node.insert(cgraph->nodes[i]); - if (!res) { - props_match = ggml_cuda_graph_node_properties_match(cgraph->nodes[i], &graph->props[i]); - } - if (!props_match) { - res = true; - } - ggml_cuda_graph_node_set_properties(&graph->props[i], cgraph->nodes[i]); - - for (int src_idx = 0; src_idx < GGML_MAX_SRC; ++src_idx) { - ggml_tensor * src = cgraph->nodes[i]->src[src_idx]; - if (src && seen_node.find(src) == seen_node.end()) { - srcs_extra.push_back(src); + if (memcmp(&graph->nodes_copy[i], cgraph->nodes[i], sizeof(ggml_tensor)) != 0) { + res = true; } } - } - - if (graph->extra.size() != (size_t) srcs_extra.size()) { - res = true; - graph->extra.resize(srcs_extra.size()); - } - - for (size_t i = 0; i < srcs_extra.size(); ++i) { - bool props_match = true; - - if (!res) { - props_match = ggml_cuda_graph_node_properties_match(srcs_extra[i], &graph->extra[i]); - } - - if (!props_match) { - res = true; - } - ggml_cuda_graph_node_set_properties(&graph->extra[i], srcs_extra[i]); + memcpy(&graph->nodes_copy[i], cgraph->nodes[i], sizeof(ggml_tensor)); } return res; From 5c4aae66e15990f87815c9eba1663f728067512b Mon Sep 17 00:00:00 2001 From: Martin Klacer Date: Wed, 8 Apr 2026 06:06:12 +0100 Subject: [PATCH 06/23] devops: kleidiai: provide KleidiAI-Enabled ARM Release Artifact (#21259) * Unified macOS release setup with strategy-matrix block * Added KleidiAI arm64 macOS release definition Change-Id: I05520889ffc646488a178d06817a17f29274465a Signed-off-by: Martin Klacer --- .github/workflows/release.yml | 86 +++++++++++------------------------ 1 file changed, 27 insertions(+), 59 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3b49ead96..8263c55ac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,8 +36,26 @@ env: CMAKE_ARGS: "-DLLAMA_BUILD_EXAMPLES=OFF -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_TOOLS=ON -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON" jobs: - macOS-arm64: - runs-on: macos-14 + macOS-cpu: + strategy: + matrix: + include: + - build: 'arm64' + arch: 'arm64' + os: macos-14 + defines: "-DGGML_METAL_USE_BF16=ON -DGGML_METAL_EMBED_LIBRARY=ON" + - build: 'arm64-kleidiai' + arch: 'arm64' + os: macos-14 + defines: "-DGGML_METAL_USE_BF16=ON -DGGML_METAL_EMBED_LIBRARY=ON -DGGML_CPU_KLEIDIAI=ON" + - build: 'x64' + arch: 'x64' + os: macos-15-intel + # Metal is disabled on x64 due to intermittent failures with Github runners not having a GPU: + # https://github.com/ggml-org/llama.cpp/actions/runs/8635935781/job/23674807267#step:5:2313 + defines: "-DGGML_METAL=OFF -DCMAKE_OSX_DEPLOYMENT_TARGET=13.3" + + runs-on: ${{ matrix.os }} steps: - name: Clone @@ -49,7 +67,7 @@ jobs: - name: ccache uses: ggml-org/ccache-action@v1.2.21 with: - key: macOS-latest-arm64 + key: macOS-latest-${{ matrix.arch }} evict-old-files: 1d - name: Build @@ -57,13 +75,11 @@ jobs: run: | sysctl -a cmake -B build \ + ${{ matrix.defines }} \ -DCMAKE_INSTALL_RPATH='@loader_path' \ -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \ -DLLAMA_FATAL_WARNINGS=ON \ -DLLAMA_BUILD_BORINGSSL=ON \ - -DGGML_METAL_USE_BF16=ON \ - -DGGML_METAL_EMBED_LIBRARY=ON \ - -DGGML_RPC=ON \ ${{ env.CMAKE_ARGS }} cmake --build build --config Release -j $(sysctl -n hw.logicalcpu) @@ -75,61 +91,13 @@ jobs: id: pack_artifacts run: | cp LICENSE ./build/bin/ - tar -czvf llama-${{ steps.tag.outputs.name }}-bin-macos-arm64.tar.gz -s ",./,llama-${{ steps.tag.outputs.name }}/," -C ./build/bin . + tar -czvf llama-${{ steps.tag.outputs.name }}-bin-macos-${{ matrix.build }}.tar.gz -s ",./,llama-${{ steps.tag.outputs.name }}/," -C ./build/bin . - name: Upload artifacts uses: actions/upload-artifact@v6 with: - path: llama-${{ steps.tag.outputs.name }}-bin-macos-arm64.tar.gz - name: llama-bin-macos-arm64.tar.gz - - macOS-x64: - runs-on: macos-15-intel - - steps: - - name: Clone - id: checkout - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - - name: ccache - uses: ggml-org/ccache-action@v1.2.21 - with: - key: macOS-latest-x64 - evict-old-files: 1d - - - name: Build - id: cmake_build - run: | - sysctl -a - # Metal is disabled due to intermittent failures with Github runners not having a GPU: - # https://github.com/ggml-org/llama.cpp/actions/runs/8635935781/job/23674807267#step:5:2313 - cmake -B build \ - -DCMAKE_INSTALL_RPATH='@loader_path' \ - -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \ - -DLLAMA_FATAL_WARNINGS=ON \ - -DLLAMA_BUILD_BORINGSSL=ON \ - -DGGML_METAL=OFF \ - -DGGML_RPC=ON \ - -DCMAKE_OSX_DEPLOYMENT_TARGET=13.3 - cmake --build build --config Release -j $(sysctl -n hw.logicalcpu) - - - name: Determine tag name - id: tag - uses: ./.github/actions/get-tag-name - - - name: Pack artifacts - id: pack_artifacts - run: | - cp LICENSE ./build/bin/ - tar -czvf llama-${{ steps.tag.outputs.name }}-bin-macos-x64.tar.gz -s ",./,llama-${{ steps.tag.outputs.name }}/," -C ./build/bin . - - - name: Upload artifacts - uses: actions/upload-artifact@v6 - with: - path: llama-${{ steps.tag.outputs.name }}-bin-macos-x64.tar.gz - name: llama-bin-macos-x64.tar.gz + path: llama-${{ steps.tag.outputs.name }}-bin-macos-${{ matrix.build }}.tar.gz + name: llama-bin-macos-${{ matrix.build }}.tar.gz ubuntu-cpu: strategy: @@ -1003,8 +971,7 @@ jobs: - ubuntu-cpu - ubuntu-vulkan - ubuntu-24-openvino - - macOS-arm64 - - macOS-x64 + - macOS-cpu - ios-xcode-build - openEuler-cann @@ -1079,6 +1046,7 @@ jobs: **macOS/iOS:** - [macOS Apple Silicon (arm64)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-macos-arm64.tar.gz) + - [macOS Apple Silicon (arm64, KleidiAI enabled)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-macos-arm64-kleidiai.tar.gz) - [macOS Intel (x64)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-macos-x64.tar.gz) - [iOS XCFramework](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-xcframework.zip) From 97508acb17ff933c67edb3a2f0997bc19a6abb98 Mon Sep 17 00:00:00 2001 From: "Hamish M. Blair" Date: Tue, 7 Apr 2026 23:58:08 -0700 Subject: [PATCH 07/23] webui: fix syntax highlighting lost after streaming for non-common languages (#21206) * webui: fix syntax highlighting lost for non-common languages after streaming rehype-highlight uses lowlight internally, which only bundles 37 "common" languages. The streaming code path uses highlight.js directly (192 languages), so languages like Haskell highlight correctly while streaming but lose all color once the code block closes. Pass the full lowlight language set to rehype-highlight so both paths support the same languages. * webui: rebuild static files after rebase --- tools/server/public/bundle.js | 321 +++++++++--------- tools/server/public/index.html | 2 +- .../app/content/MarkdownContent.svelte | 2 + 3 files changed, 166 insertions(+), 159 deletions(-) diff --git a/tools/server/public/bundle.js b/tools/server/public/bundle.js index e0e46622e..10e386443 100644 --- a/tools/server/public/bundle.js +++ b/tools/server/public/bundle.js @@ -1,188 +1,188 @@ -var j6=r=>{throw TypeError(r)};var rS=(r,e,t)=>e.has(r)||j6("Cannot "+t);var ma=(r,e,t)=>(rS(r,e,"read from private field"),t?t.call(r):e.get(r)),ml=(r,e,t)=>e.has(r)?j6("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),gs=(r,e,t,n)=>(rS(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t),gl=(r,e,t)=>(rS(r,e,"access private method"),t);var K6=(r,e,t,n)=>({set _(a){gs(r,e,a,t)},get _(){return ma(r,e,n)}});var zm=Array.isArray,yY=Array.prototype.indexOf,yf=Array.prototype.includes,Qb=Array.from,qA=Object.defineProperty,Cu=Object.getOwnPropertyDescriptor,$L=Object.getOwnPropertyDescriptors,GL=Object.prototype,SY=Array.prototype,Zb=Object.getPrototypeOf,X6=Object.isExtensible;function Ph(r){return typeof r=="function"}const $e=()=>{};function EY(r){return r()}function EC(r){for(var e=0;e{r=n,e=a});return{promise:t,resolve:r,reject:e}}function wY(r,e,t=!1){return r===void 0?t?e():e:r}function HA(r,e){if(Array.isArray(r))return r;if(!(Symbol.iterator in r))return Array.from(r);const t=[];for(const n of r)if(t.push(n),t.length===e)break;return t}const si=2,hm=4,qm=8,VA=1<<24,ql=16,Wc=32,Vu=64,YA=128,Ao=512,qi=1024,Vi=2048,jc=4096,ro=8192,Cc=16384,Hm=32768,Fl=65536,wC=1<<17,WA=1<<18,rh=1<<19,qL=1<<20,Ec=1<<25,Wd=32768,TC=1<<21,jA=1<<22,Au=1<<23,kl=Symbol("$state"),KA=Symbol("legacy props"),TY=Symbol(""),jh=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},CY=1,Jb=3,Kc=8;function HL(r){throw new Error("https://svelte.dev/e/experimental_async_required")}function Vf(r){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function AY(){throw new Error("https://svelte.dev/e/missing_context")}function xY(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function RY(r){throw new Error("https://svelte.dev/e/effect_in_teardown")}function OY(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function NY(r){throw new Error("https://svelte.dev/e/effect_orphan")}function IY(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function kY(){throw new Error("https://svelte.dev/e/fork_discarded")}function MY(){throw new Error("https://svelte.dev/e/fork_timing")}function DY(){throw new Error("https://svelte.dev/e/get_abort_signal_outside_reaction")}function PY(){throw new Error("https://svelte.dev/e/hydration_failed")}function VL(r){throw new Error("https://svelte.dev/e/lifecycle_legacy_only")}function LY(r){throw new Error("https://svelte.dev/e/props_invalid_value")}function FY(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function BY(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function UY(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function $Y(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const GY=1,zY=2,YL=4,qY=8,HY=16,VY=1,YY=2,WY=4,jY=8,KY=16,XY=1,QY=2,ZY=4,JY=1,eW=2,WL="[",ev="[!",XA="]",jd={},pi=Symbol(),tW="http://www.w3.org/1999/xhtml",rW="http://www.w3.org/2000/svg",jL="@attach";function nW(r){console.warn("https://svelte.dev/e/hydratable_missing_but_expected")}function Vm(r){console.warn("https://svelte.dev/e/hydration_mismatch")}function aW(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function iW(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let Or=!1;function ss(r){Or=r}let en;function $a(r){if(r===null)throw Vm(),jd;return en=r}function No(){return $a(oo(en))}function V(r){if(Or){if(oo(en)!==null)throw Vm(),jd;en=r}}function et(r=1){if(Or){for(var e=r,t=en;e--;)t=oo(t);en=t}}function M_(r=!0){for(var e=0,t=en;;){if(t.nodeType===Kc){var n=t.data;if(n===XA){if(e===0)return t;e-=1}else(n===WL||n===ev)&&(e+=1)}var a=oo(t);r&&t.remove(),t=a}}function KL(r){if(!r||r.nodeType!==Kc)throw Vm(),jd;return r.data}function XL(r){return r===this.v}function QA(r,e){return r!=r?e==e:r!==e||r!==null&&typeof r=="object"||typeof r=="function"}function QL(r){return!QA(r,this.v)}let Yf=!1;function sW(){Yf=!0}const oW=[];function rf(r,e=!1,t=!1){return m_(r,new Map,"",oW,null,t)}function m_(r,e,t,n,a=null,i=!1){if(typeof r=="object"&&r!==null){var s=e.get(r);if(s!==void 0)return s;if(r instanceof Map)return new Map(r);if(r instanceof Set)return new Set(r);if(zm(r)){var o=Array(r.length);e.set(r,o),a!==null&&e.set(a,o);for(var l=0;l(tv(r)||AY(),Bl(r)),e=>Yu(r,e)]}function Bl(r){return rv().get(r)}function Yu(r,e){return rv().set(r,e),e}function tv(r){return rv().has(r)}function ZL(){return rv()}function Ee(r,e=!1,t){$n={p:$n,i:!1,c:null,e:null,s:r,x:null,l:Yf&&!e?{s:null,u:null,$:[]}:null}}function we(r){var e=$n,t=e.e;if(t!==null){e.e=null;for(var n of t)bF(n)}return r!==void 0&&(e.x=r),e.i=!0,$n=e.p,r??{}}function Wf(){return!Yf||$n!==null&&$n.l===null}function rv(r){return $n===null&&Vf(),$n.c??=new Map(cW($n)||void 0)}function cW(r){let e=r.p;for(;e!==null;){const t=e.c;if(t!==null)return t;e=e.p}return null}let Pd=[];function JL(){var r=Pd;Pd=[],EC(r)}function xo(r){if(Pd.length===0&&!em){var e=Pd;queueMicrotask(()=>{e===Pd&&JL()})}Pd.push(r)}function uW(){for(;Pd.length>0;)JL()}function eF(r){var e=Pn;if(e===null)return wn.f|=Au,r;if((e.f&Hm)===0){if((e.f&YA)===0)throw r;e.b.error(r)}else Ef(r,e)}function Ef(r,e){for(;e!==null;){if((e.f&YA)!==0)try{e.b.error(r);return}catch(t){r=t}e=e.parent}throw r}const dW=-7169;function Ja(r,e){r.f=r.f&dW|e}function ZA(r){(r.f&Ao)!==0||r.deps===null?Ja(r,qi):Ja(r,jc)}function tF(r){if(r!==null)for(const e of r)(e.f&si)===0||(e.f&Wd)===0||(e.f^=Wd,tF(e.deps))}function rF(r,e,t){(r.f&Vi)!==0?e.add(r):(r.f&jc)!==0&&t.add(r),tF(r.deps),Ja(r,qi)}const Ld=new Set;let Hn=null,CC=null,To=null,Hs=[],nv=null,AC=!1,em=!1;class Zo{committed=!1;current=new Map;previous=new Map;#e=new Set;#t=new Set;#r=0;#n=0;#i=null;#a=new Set;#s=new Set;skipped_effects=new Set;is_fork=!1;#o=!1;is_deferred(){return this.is_fork||this.#n>0}process(e){Hs=[],this.apply();var t=[],n=[];for(const a of e)this.#l(a,t,n);if(this.is_deferred())this.#c(n),this.#c(t);else{for(const a of this.#e)a();this.#e.clear(),this.#r===0&&this.#d(),CC=this,Hn=null,Q6(n),Q6(t),CC=null,this.#i?.resolve()}To=null}#l(e,t,n){e.f^=qi;for(var a=e.first,i=null;a!==null;){var s=a.f,o=(s&(Wc|Vu))!==0,l=o&&(s&qi)!==0,c=l||(s&ro)!==0||this.skipped_effects.has(a);if(!c&&a.fn!==null){o?a.f^=qi:i!==null&&(s&(hm|qm|VA))!==0?i.b.defer_effect(a):(s&hm)!==0?t.push(a):Xm(a)&&((s&ql)!==0&&this.#s.add(a),pm(a));var u=a.first;if(u!==null){a=u;continue}}var d=a.parent;for(a=a.next;a===null&&d!==null;)d===i&&(i=null),a=d.next,d=d.parent}}#c(e){for(var t=0;t0){if(xC(),Hn!==null&&Hn!==this)return}else this.#r===0&&this.process([]);this.deactivate()}discard(){for(const e of this.#t)e(this);this.#t.clear()}#d(){if(Ld.size>1){this.previous.clear();var e=To,t=!0;for(const a of Ld){if(a===this){t=!1;continue}const i=[];for(const[o,l]of this.current){if(a.current.has(o))if(t&&l!==a.current.get(o))a.current.set(o,l);else continue;i.push(o)}if(i.length===0)continue;const s=[...a.current.keys()].filter(o=>!this.current.has(o));if(s.length>0){var n=Hs;Hs=[];const o=new Set,l=new Map;for(const c of i)nF(c,s,o,l);if(Hs.length>0){Hn=a,a.apply();for(const c of Hs)a.#l(c,[],[]);a.deactivate()}Hs=n}}Hn=null,To=e}this.committed=!0,Ld.delete(this)}increment(e){this.#r+=1,e&&(this.#n+=1)}decrement(e){this.#r-=1,e&&(this.#n-=1),!this.#o&&(this.#o=!0,xo(()=>{this.#o=!1,this.is_deferred()?Hs.length>0&&this.flush():this.revive()}))}revive(){for(const e of this.#a)this.#s.delete(e),Ja(e,Vi),kc(e);for(const e of this.#s)Ja(e,jc),kc(e);this.flush()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#t.add(e)}settled(){return(this.#i??=zL()).promise}static ensure(){if(Hn===null){const e=Hn=new Zo;Ld.add(Hn),em||xo(()=>{Hn===e&&e.flush()})}return Hn}apply(){}}function fm(r){var e=em;em=!0;try{var t;for(r&&(Hn!==null&&xC(),t=r());;){if(uW(),Hs.length===0&&(Hn?.flush(),Hs.length===0))return nv=null,t;xC()}}finally{em=e}}function xC(){AC=!0;var r=null;try{for(var e=0;Hs.length>0;){var t=Zo.ensure();if(e++>1e3){var n,a;hW()}t.process(Hs),xu.clear()}}finally{AC=!1,nv=null}}function hW(){try{IY()}catch(r){Ef(r,nv)}}let pc=null;function Q6(r){var e=r.length;if(e!==0){for(var t=0;t0)){xu.clear();for(const a of pc){if((a.f&(Cc|ro))!==0)continue;const i=[a];let s=a.parent;for(;s!==null;)pc.has(s)&&(pc.delete(s),i.push(s)),s=s.parent;for(let o=i.length-1;o>=0;o--){const l=i[o];(l.f&(Cc|ro))===0&&pm(l)}}pc.clear()}}pc=null}}function nF(r,e,t,n){if(!t.has(r)&&(t.add(r),r.reactions!==null))for(const a of r.reactions){const i=a.f;(i&si)!==0?nF(a,e,t,n):(i&(jA|ql))!==0&&(i&Vi)===0&&iF(a,e,n)&&(Ja(a,Vi),kc(a))}}function aF(r,e){if(r.reactions!==null)for(const t of r.reactions){const n=t.f;(n&si)!==0?aF(t,e):(n&wC)!==0&&(Ja(t,Vi),e.add(t))}}function iF(r,e,t){const n=t.get(r);if(n!==void 0)return n;if(r.deps!==null)for(const a of r.deps){if(yf.call(e,a))return!0;if((a.f&si)!==0&&iF(a,e,t))return t.set(a,!0),!0}return t.set(r,!1),!1}function kc(r){for(var e=nv=r;e.parent!==null;){e=e.parent;var t=e.f;if(AC&&e===Pn&&(t&ql)!==0&&(t&WA)===0)return;if((t&(Vu|Wc))!==0){if((t&qi)===0)return;e.f^=qi}}Hs.push(e)}function fW(r){HL(),Hn!==null&&MY();var e=Zo.ensure();e.is_fork=!0,To=new Map;var t=!1,n=e.settled();fm(r);for(var[a,i]of e.previous)a.v=i;for(a of e.current.keys())(a.f&si)!==0&&Ja(a,Vi);return{commit:async()=>{if(t){await n;return}Ld.has(e)||kY(),t=!0,e.is_fork=!1;for(var[s,o]of e.current)s.v=o,s.wv=i5();fm(()=>{var l=new Set;for(var c of e.current.keys())aF(c,l);yW(l),cF()}),e.revive(),await n},discard:()=>{!t&&Ld.has(e)&&(Ld.delete(e),e.discard())}}}function Wu(r){let e=0,t=Mc(0),n;return()=>{n5()&&(f(t),Km(()=>(e===0&&(n=Rn(()=>r(()=>Qs(t)))),e+=1,()=>{xo(()=>{e-=1,e===0&&(n?.(),n=void 0,Qs(t))})})))}}var pW=Fl|rh|YA;function mW(r,e,t){new gW(r,e,t)}class gW{parent;is_pending=!1;#e;#t=Or?en:null;#r;#n;#i;#a=null;#s=null;#o=null;#l=null;#c=null;#d=0;#u=0;#p=!1;#m=!1;#f=new Set;#h=new Set;#g=null;#v=Wu(()=>(this.#g=Mc(this.#d),()=>{this.#g=null}));constructor(e,t,n){this.#e=e,this.#r=t,this.#n=n,this.parent=Pn.b,this.is_pending=!!this.#r.pending,this.#i=ju(()=>{if(Pn.b=this,Or){const i=this.#t;No(),i.nodeType===Kc&&i.data===ev?this.#y():(this.#_(),this.#u===0&&(this.is_pending=!1))}else{var a=this.#S();try{this.#a=As(()=>n(a))}catch(i){this.error(i)}this.#u>0?this.#w():this.is_pending=!1}return()=>{this.#c?.remove()}},pW),Or&&(this.#e=en)}#_(){try{this.#a=As(()=>this.#n(this.#e))}catch(e){this.error(e)}}#y(){const e=this.#r.pending;e&&(this.#s=As(()=>e(this.#e)),xo(()=>{var t=this.#S();this.#a=this.#b(()=>(Zo.ensure(),As(()=>this.#n(t)))),this.#u>0?this.#w():(Vd(this.#s,()=>{this.#s=null}),this.is_pending=!1)}))}#S(){var e=this.#e;return this.is_pending&&(this.#c=Hi(),this.#e.before(this.#c),e=this.#c),e}defer_effect(e){rF(e,this.#f,this.#h)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#r.pending}#b(e){var t=Pn,n=wn,a=$n;Ul(this.#i),Ns(this.#i),Sf(this.#i.ctx);try{return e()}catch(i){return eF(i),null}finally{Ul(t),Ns(n),Sf(a)}}#w(){const e=this.#r.pending;this.#a!==null&&(this.#l=document.createDocumentFragment(),this.#l.append(this.#c),xF(this.#a,this.#l)),this.#s===null&&(this.#s=As(()=>e(this.#e)))}#T(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#T(e);return}if(this.#u+=e,this.#u===0){this.is_pending=!1;for(const t of this.#f)Ja(t,Vi),kc(t);for(const t of this.#h)Ja(t,jc),kc(t);this.#f.clear(),this.#h.clear(),this.#s&&Vd(this.#s,()=>{this.#s=null}),this.#l&&(this.#e.before(this.#l),this.#l=null)}}update_pending_count(e){this.#T(e),this.#d+=e,!(!this.#g||this.#p)&&(this.#p=!0,xo(()=>{this.#p=!1,this.#g&&wf(this.#g,this.#d)}))}get_effect_pending(){return this.#v(),f(this.#g)}error(e){var t=this.#r.onerror;let n=this.#r.failed;if(this.#m||!t&&!n)throw e;this.#a&&(_i(this.#a),this.#a=null),this.#s&&(_i(this.#s),this.#s=null),this.#o&&(_i(this.#o),this.#o=null),Or&&($a(this.#t),et(),$a(M_()));var a=!1,i=!1;const s=()=>{if(a){iW();return}a=!0,i&&$Y(),Zo.ensure(),this.#d=0,this.#o!==null&&Vd(this.#o,()=>{this.#o=null}),this.is_pending=this.has_pending_snippet(),this.#a=this.#b(()=>(this.#m=!1,As(()=>this.#n(this.#e)))),this.#u>0?this.#w():this.is_pending=!1};var o=wn;try{Ns(null),i=!0,t?.(e,s),i=!1}catch(l){Ef(l,this.#i&&this.#i.parent)}finally{Ns(o)}n&&xo(()=>{this.#o=this.#b(()=>{Zo.ensure(),this.#m=!0;try{return As(()=>{n(this.#e,()=>e,()=>s)})}catch(l){return Ef(l,this.#i.parent),null}finally{this.#m=!1}})})}}function JA(r,e,t,n){const a=Wf()?Ym:av;var i=r.filter(h=>!h.settled);if(t.length===0&&i.length===0){n(e.map(a));return}var s=Hn,o=Pn,l=_W(),c=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(h=>h.promise)):null;function u(h){l();try{n(h)}catch(p){(o.f&Cc)===0&&Ef(p,o)}s?.deactivate(),RC()}if(t.length===0){c.then(()=>u(e.map(a)));return}function d(){l(),Promise.all(t.map(h=>bW(h))).then(h=>u([...e.map(a),...h])).catch(h=>Ef(h,o))}c?c.then(d):d()}function _W(){var r=Pn,e=wn,t=$n,n=Hn;return function(i=!0){Ul(r),Ns(e),Sf(t),i&&n?.activate()}}function RC(){Ul(null),Ns(null),Sf(null)}function Ym(r){var e=si|Vi,t=wn!==null&&(wn.f&si)!==0?wn:null;return Pn!==null&&(Pn.f|=rh),{ctx:$n,deps:null,effects:null,equals:XL,f:e,fn:r,reactions:null,rv:0,v:pi,wv:0,parent:t??Pn,ac:null}}function bW(r,e,t){let n=Pn;n===null&&xY();var a=n.b,i=void 0,s=Mc(pi),o=!wn,l=new Map;return AW(()=>{var c=zL();i=c.promise;try{Promise.resolve(r()).then(c.resolve,c.reject).then(()=>{u===Hn&&u.committed&&u.deactivate(),RC()})}catch(p){c.reject(p),RC()}var u=Hn;if(o){var d=a.is_rendered();a.update_pending_count(1),u.increment(d),l.get(u)?.reject(jh),l.delete(u),l.set(u,c)}const h=(p,m=void 0)=>{if(u.activate(),m)m!==jh&&(s.f|=Au,wf(s,m));else{(s.f&Au)!==0&&(s.f^=Au),wf(s,p);for(const[g,b]of l){if(l.delete(g),g===u)break;b.reject(jh)}}o&&(a.update_pending_count(-1),u.decrement(d))};c.promise.then(h,p=>h(null,p||"unknown"))}),ah(()=>{for(const c of l.values())c.reject(jh)}),new Promise(c=>{function u(d){function h(){d===i?c(s):u(i)}d.then(h,h)}u(i)})}function F(r){const e=Ym(r);return RF(e),e}function av(r){const e=Ym(r);return e.equals=QL,e}function sF(r){var e=r.effects;if(e!==null){r.effects=null;for(var t=0;t0&&!lF&&cF()}return e}function cF(){lF=!1;for(const r of D_)(r.f&qi)!==0&&Ja(r,jc),Xm(r)&&pm(r);D_.clear()}function g_(r,e=1){var t=f(r),n=e===1?t++:t--;return M(r,t),n}function Qs(r){M(r,r.v+1)}function uF(r,e){var t=r.reactions;if(t!==null)for(var n=Wf(),a=t.length,i=0;i{if(Jo===i)return o();var l=wn,c=Jo;Ns(null),tR(i);var u=o();return Ns(l),tR(c),u};return n&&t.set("length",_e(r.length)),new Proxy(r,{defineProperty(o,l,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&FY();var u=t.get(l);return u===void 0?u=s(()=>{var d=_e(c.value);return t.set(l,d),d}):M(u,c.value,!0),!0},deleteProperty(o,l){var c=t.get(l);if(c===void 0){if(l in o){const u=s(()=>_e(pi));t.set(l,u),Qs(a)}}else M(c,pi),Qs(a);return!0},get(o,l,c){if(l===kl)return r;var u=t.get(l),d=l in o;if(u===void 0&&(!d||Cu(o,l)?.writable)&&(u=s(()=>{var p=Sr(d?o[l]:pi),m=_e(p);return m}),t.set(l,u)),u!==void 0){var h=f(u);return h===pi?void 0:h}return Reflect.get(o,l,c)},getOwnPropertyDescriptor(o,l){var c=Reflect.getOwnPropertyDescriptor(o,l);if(c&&"value"in c){var u=t.get(l);u&&(c.value=f(u))}else if(c===void 0){var d=t.get(l),h=d?.v;if(d!==void 0&&h!==pi)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return c},has(o,l){if(l===kl)return!0;var c=t.get(l),u=c!==void 0&&c.v!==pi||Reflect.has(o,l);if(c!==void 0||Pn!==null&&(!u||Cu(o,l)?.writable)){c===void 0&&(c=s(()=>{var h=u?Sr(o[l]):pi,p=_e(h);return p}),t.set(l,c));var d=f(c);if(d===pi)return!1}return u},set(o,l,c,u){var d=t.get(l),h=l in o;if(n&&l==="length")for(var p=c;p_e(pi)),t.set(p+"",m))}if(d===void 0)(!h||Cu(o,l)?.writable)&&(d=s(()=>_e(void 0)),M(d,Sr(c)),t.set(l,d));else{h=d.v!==pi;var g=s(()=>Sr(c));M(d,g)}var b=Reflect.getOwnPropertyDescriptor(o,l);if(b?.set&&b.set.call(u,c),!h){if(n&&typeof l=="string"){var _=t.get("length"),v=Number(l);Number.isInteger(v)&&v>=_.v&&M(_,v+1)}Qs(a)}return!0},ownKeys(o){f(a);var l=Reflect.ownKeys(o).filter(d=>{var h=t.get(d);return h===void 0||h.v!==pi});for(var[c,u]of t)u.v!==pi&&!(c in o)&&l.push(c);return l},setPrototypeOf(){BY()}})}function Z6(r){try{if(r!==null&&typeof r=="object"&&kl in r)return r[kl]}catch{}return r}function SW(r,e){return Object.is(Z6(r),Z6(e))}var Tf,iv,dF,hF,fF;function OC(){if(Tf===void 0){Tf=window,iv=document,dF=/Firefox/.test(navigator.userAgent);var r=Element.prototype,e=Node.prototype,t=Text.prototype;hF=Cu(e,"firstChild").get,fF=Cu(e,"nextSibling").get,X6(r)&&(r.__click=void 0,r.__className=void 0,r.__attributes=null,r.__style=void 0,r.__e=void 0),X6(t)&&(t.__t=void 0)}}function Hi(r=""){return document.createTextNode(r)}function Ni(r){return hF.call(r)}function oo(r){return fF.call(r)}function j(r,e){if(!Or)return Ni(r);var t=Ni(en);if(t===null)t=en.appendChild(Hi());else if(e&&t.nodeType!==Jb){var n=Hi();return t?.before(n),$a(n),n}return $a(t),t}function L(r,e=!1){if(!Or){var t=Ni(r);return t instanceof Comment&&t.data===""?oo(t):t}if(e&&en?.nodeType!==Jb){var n=Hi();return en?.before(n),$a(n),n}return en}function ee(r,e=1,t=!1){let n=Or?en:r;for(var a;e--;)a=n,n=oo(n);if(!Or)return n;if(t&&n?.nodeType!==Jb){var i=Hi();return n===null?a?.after(i):n.before(i),$a(i),i}return $a(n),n}function r5(r){r.textContent=""}function pF(){return!1}function EW(r,e){if(e){const t=document.body;r.autofocus=!0,xo(()=>{document.activeElement===t&&r.focus()})}}function Wm(r){Or&&Ni(r)!==null&&r5(r)}let J6=!1;function mF(){J6||(J6=!0,document.addEventListener("reset",r=>{Promise.resolve().then(()=>{if(!r.defaultPrevented)for(const e of r.target.elements)e.__on_r?.()})},{capture:!0}))}function wW(r,e,t,n=!0){n&&t();for(var a of e)r.addEventListener(a,t);ah(()=>{for(var i of e)r.removeEventListener(i,t)})}function nh(r){var e=wn,t=Pn;Ns(null),Ul(null);try{return r()}finally{Ns(e),Ul(t)}}function gF(r,e,t,n=t){r.addEventListener(e,()=>nh(t));const a=r.__on_r;a?r.__on_r=()=>{a(),n(!0)}:r.__on_r=()=>n(!0),mF()}function _F(r){Pn===null&&(wn===null&&NY(),OY()),Iu&&RY()}function TW(r,e){var t=e.last;t===null?e.last=e.first=r:(t.next=r,r.prev=t,e.last=r)}function co(r,e,t){var n=Pn;n!==null&&(n.f&ro)!==0&&(r|=ro);var a={ctx:$n,deps:null,nodes:null,f:r|Vi|Ao,first:null,fn:e,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};if(t)try{pm(a),a.f|=Hm}catch(o){throw _i(a),o}else e!==null&&kc(a);var i=a;if(t&&i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&rh)===0&&(i=i.first,(r&ql)!==0&&(r&Fl)!==0&&i!==null&&(i.f|=Fl)),i!==null&&(i.parent=n,n!==null&&TW(i,n),wn!==null&&(wn.f&si)!==0&&(r&Vu)===0)){var s=wn;(s.effects??=[]).push(i)}return a}function n5(){return wn!==null&&!Xo}function ah(r){const e=co(qm,null,!1);return Ja(e,qi),e.teardown=r,e}function Nt(r){_F();var e=Pn.f,t=!wn&&(e&Wc)!==0&&(e&Hm)===0;if(t){var n=$n;(n.e??=[]).push(r)}else return bF(r)}function bF(r){return co(hm|qL,r,!1)}function Gi(r){return _F(),co(qm|qL,r,!0)}function jm(r){Zo.ensure();const e=co(Vu|rh,r,!0);return()=>{_i(e)}}function CW(r){Zo.ensure();const e=co(Vu|rh,r,!0);return(t={})=>new Promise(n=>{t.outro?Vd(e,()=>{_i(e),n(void 0)}):(_i(e),n(void 0))})}function jf(r){return co(hm,r,!1)}function AW(r){return co(jA|rh,r,!0)}function Km(r,e=0){return co(qm|e,r,!0)}function Ce(r,e=[],t=[],n=[]){JA(n,e,t,a=>{co(qm,()=>r(...a.map(f)),!0)})}function vF(r,e=[],t=[],n=[]){var a=Hn,i=t.length>0||n.length>0;i&&a.increment(!0),JA(n,e,t,s=>{co(hm,()=>r(...s.map(f)),!1),i&&a.decrement(!0)})}function ju(r,e=0){var t=co(ql|e,r,!0);return t}function yF(r,e=0){var t=co(VA|e,r,!0);return t}function As(r){return co(Wc|rh,r,!0)}function SF(r){var e=r.teardown;if(e!==null){const t=Iu,n=wn;eR(!0),Ns(null);try{e.call(null)}finally{eR(t),Ns(n)}}}function EF(r,e=!1){var t=r.first;for(r.first=r.last=null;t!==null;){const a=t.ac;a!==null&&nh(()=>{a.abort(jh)});var n=t.next;(t.f&Vu)!==0?t.parent=null:_i(t,e),t=n}}function xW(r){for(var e=r.first;e!==null;){var t=e.next;(e.f&Wc)===0&&_i(e),e=t}}function _i(r,e=!0){var t=!1;(e||(r.f&WA)!==0)&&r.nodes!==null&&r.nodes.end!==null&&(wF(r.nodes.start,r.nodes.end),t=!0),EF(r,e&&!t),P_(r,0),Ja(r,Cc);var n=r.nodes&&r.nodes.t;if(n!==null)for(const i of n)i.stop();SF(r);var a=r.parent;a!==null&&a.first!==null&&TF(r),r.next=r.prev=r.teardown=r.ctx=r.deps=r.fn=r.nodes=r.ac=null}function wF(r,e){for(;r!==null;){var t=r===e?null:oo(r);r.remove(),r=t}}function TF(r){var e=r.parent,t=r.prev,n=r.next;t!==null&&(t.next=n),n!==null&&(n.prev=t),e!==null&&(e.first===r&&(e.first=n),e.last===r&&(e.last=t))}function Vd(r,e,t=!0){var n=[];CF(r,n,!0);var a=()=>{t&&_i(r),e&&e()},i=n.length;if(i>0){var s=()=>--i||a();for(var o of n)o.out(s)}else a()}function CF(r,e,t){if((r.f&ro)===0){r.f^=ro;var n=r.nodes&&r.nodes.t;if(n!==null)for(const o of n)(o.is_global||t)&&e.push(o);for(var a=r.first;a!==null;){var i=a.next,s=(a.f&Fl)!==0||(a.f&Wc)!==0&&(r.f&ql)!==0;CF(a,e,s?t:!1),a=i}}}function a5(r){AF(r,!0)}function AF(r,e){if((r.f&ro)!==0){r.f^=ro,(r.f&qi)===0&&(Ja(r,Vi),kc(r));for(var t=r.first;t!==null;){var n=t.next,a=(t.f&Fl)!==0||(t.f&Wc)!==0;AF(t,a?e:!1),t=n}var i=r.nodes&&r.nodes.t;if(i!==null)for(const s of i)(s.is_global||e)&&s.in()}}function xF(r,e){if(r.nodes)for(var t=r.nodes.start,n=r.nodes.end;t!==null;){var a=t===n?null:oo(t);e.append(t),t=a}}let __=!1,Iu=!1;function eR(r){Iu=r}let wn=null,Xo=!1;function Ns(r){wn=r}let Pn=null;function Ul(r){Pn=r}let Ro=null;function RF(r){wn!==null&&(Ro===null?Ro=[r]:Ro.push(r))}let Ts=null,Gs=0,So=null;function RW(r){So=r}let OF=1,Fd=0,Jo=Fd;function tR(r){Jo=r}function i5(){return++OF}function Xm(r){var e=r.f;if((e&Vi)!==0)return!0;if(e&si&&(r.f&=~Wd),(e&jc)!==0){for(var t=r.deps,n=t.length,a=0;ar.wv)return!0}(e&Ao)!==0&&To===null&&Ja(r,qi)}return!1}function NF(r,e,t=!0){var n=r.reactions;if(n!==null&&!(Ro!==null&&yf.call(Ro,r)))for(var a=0;a{r.ac.abort(jh)}),r.ac=null);try{r.f|=TC;var u=r.fn,d=u(),h=r.deps;if(Ts!==null){var p;if(P_(r,Gs),h!==null&&Gs>0)for(h.length=Gs+Ts.length,p=0;p{r.isConnected&&r.dispatchEvent(e)}))}function s5(r,e,t,n={}){function a(i){if(n.capture||Up.call(e,i),!i.cancelBubble)return nh(()=>t?.call(this,i))}return r.startsWith("pointer")||r.startsWith("touch")||r==="wheel"?xo(()=>{e.addEventListener(r,a,n)}):e.addEventListener(r,a,n),a}function jr(r,e,t,n={}){var a=s5(e,r,t,n);return()=>{r.removeEventListener(e,a,n)}}function hn(r,e,t,n,a){var i={capture:n,passive:a},s=s5(r,e,t,i);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&ah(()=>{e.removeEventListener(r,s,i)})}function Ln(r){for(var e=0;e{throw b});throw h}}finally{r.__root=e,delete r.currentTarget,Ns(u),Ul(d)}}}function sv(r){var e=document.createElement("template");return e.innerHTML=r.replaceAll("",""),e.content}function Is(r,e){var t=Pn;t.nodes===null&&(t.nodes={start:r,end:e,a:null,t:null})}function G(r,e){var t=(e&JY)!==0,n=(e&eW)!==0,a,i=!r.startsWith("");return()=>{if(Or)return Is(en,null),en;a===void 0&&(a=sv(i?r:""+r),t||(a=Ni(a)));var s=n||dF?document.importNode(a,!0):a.cloneNode(!0);if(t){var o=Ni(s),l=s.lastChild;Is(o,l)}else Is(s,s);return s}}function $W(r,e,t="svg"){var n=!r.startsWith(""),a=`<${t}>${n?r:""+r}`,i;return()=>{if(Or)return Is(en,null),en;if(!i){var s=sv(a),o=Ni(s);i=Ni(o)}var l=i.cloneNode(!0);return Is(l,l),l}}function Ku(r,e){return $W(r,e,"svg")}function Ot(r=""){if(!Or){var e=Hi(r+"");return Is(e,e),e}var t=en;return t.nodeType!==Jb&&(t.before(t=Hi()),$a(t)),Is(t,t),t}function se(){if(Or)return Is(en,null),en;var r=document.createDocumentFragment(),e=document.createComment(""),t=Hi();return r.append(e,t),Is(e,t),r}function T(r,e){if(Or){var t=Pn;((t.f&Hm)===0||t.nodes.end===null)&&(t.nodes.end=en),No();return}r!==null&&r.before(e)}function On(){if(Or&&en&&en.nodeType===Kc&&en.textContent?.startsWith("$")){const r=en.textContent.substring(1);return No(),r}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}let L_=!0;function jg(r){L_=r}function Ge(r,e){var t=e==null?"":typeof e=="object"?e+"":e;t!==(r.__t??=r.nodeValue)&&(r.__t=t,r.nodeValue=t+"")}function ov(r,e){return BF(r,e)}function FF(r,e){OC(),e.intro=e.intro??!1;const t=e.target,n=Or,a=en;try{for(var i=Ni(t);i&&(i.nodeType!==Kc||i.data!==WL);)i=oo(i);if(!i)throw jd;ss(!0),$a(i);const s=BF(r,{...e,anchor:i});return ss(!1),s}catch(s){if(s instanceof Error&&s.message.split(` -`).some(o=>o.startsWith("https://svelte.dev/e/")))throw s;return s!==jd&&console.warn("Failed to hydrate: ",s),e.recover===!1&&PY(),OC(),r5(t),ss(!1),ov(r,e)}finally{ss(n),$a(a)}}const wh=new Map;function BF(r,{target:e,anchor:t,props:n={},events:a,context:i,intro:s=!0}){OC();var o=new Set,l=d=>{for(var h=0;h{var d=t??e.appendChild(Hi());return mW(d,{pending:()=>{}},h=>{if(i){Ee({});var p=$n;p.c=i}if(a&&(n.$$events=a),Or&&Is(h,null),L_=s,c=r(h,n)||{},L_=!0,Or&&(Pn.nodes.end=en,en===null||en.nodeType!==Kc||en.data!==XA))throw Vm(),jd;i&&we()}),()=>{for(var h of o){e.removeEventListener(h,Up);var p=wh.get(h);--p===0?(document.removeEventListener(h,Up),wh.delete(h)):wh.set(h,p)}IC.delete(l),d!==t&&d.parentNode?.removeChild(d)}});return kC.set(c,u),c}let kC=new WeakMap;function o5(r,e){const t=kC.get(r);return t?(kC.delete(r),t(e)):Promise.resolve()}class Qm{anchor;#e=new Map;#t=new Map;#r=new Map;#n=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=()=>{var e=Hn;if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)a5(n),this.#n.delete(t);else{var a=this.#r.get(t);a&&(this.#t.set(t,a.effect),this.#r.delete(t),a.fragment.lastChild.remove(),this.anchor.before(a.fragment),n=a.effect)}for(const[i,s]of this.#e){if(this.#e.delete(i),i===e)break;const o=this.#r.get(s);o&&(_i(o.effect),this.#r.delete(s))}for(const[i,s]of this.#t){if(i===t||this.#n.has(i))continue;const o=()=>{if(Array.from(this.#e.values()).includes(i)){var c=document.createDocumentFragment();xF(s,c),c.append(Hi()),this.#r.set(i,{effect:s,fragment:c})}else _i(s);this.#n.delete(i),this.#t.delete(i)};this.#i||!n?(this.#n.add(i),Vd(s,o,!1)):o()}}};#s=e=>{this.#e.delete(e);const t=Array.from(this.#e.values());for(const[n,a]of this.#r)t.includes(n)||(_i(a.effect),this.#r.delete(n))};ensure(e,t){var n=Hn,a=pF();if(t&&!this.#t.has(e)&&!this.#r.has(e))if(a){var i=document.createDocumentFragment(),s=Hi();i.append(s),this.#r.set(e,{effect:As(()=>t(s)),fragment:i})}else this.#t.set(e,As(()=>t(this.anchor)));if(this.#e.set(n,e),a){for(const[o,l]of this.#t)o===e?n.skipped_effects.delete(l):n.skipped_effects.add(l);for(const[o,l]of this.#r)o===e?n.skipped_effects.delete(l.effect):n.skipped_effects.add(l.effect);n.oncommit(this.#a),n.ondiscard(this.#s)}else Or&&(this.anchor=en),this.#a()}}function le(r,e,t=!1){Or&&No();var n=new Qm(r),a=t?Fl:0;function i(s,o){if(Or){const c=KL(r)===ev;if(s===c){var l=M_();$a(l),n.anchor=l,ss(!1),n.ensure(s,o),ss(!0);return}}n.ensure(s,o)}ju(()=>{var s=!1;e((o,l=!0)=>{s=!0,i(l,o)}),s||i(!1,null)},a)}function GW(r,e,t){Or&&No();var n=new Qm(r),a=!Wf();ju(()=>{var i=e();a&&i!==null&&typeof i=="object"&&(i={}),n.ensure(i,t)})}function Ru(r,e){return e}function zW(r,e,t){for(var n=[],a=e.length,i,s=e.length,o=0;o{if(i){if(i.pending.delete(d),i.done.add(d),i.pending.size===0){var h=r.outrogroups;MC(Qb(i.done)),h.delete(i),h.size===0&&(r.outrogroups=null)}}else s-=1},!1)}if(s===0){var l=n.length===0&&t!==null;if(l){var c=t,u=c.parentNode;r5(u),u.append(c),r.items.clear()}MC(e,!l)}else i={pending:new Set(e),done:new Set},(r.outrogroups??=new Set).add(i)}function MC(r,e=!0){for(var t=0;t{var _=t();return zm(_)?_:_==null?[]:Qb(_)}),h,p=!0;function m(){b.fallback=u,qW(b,h,s,e,n),u!==null&&(h.length===0?(u.f&Ec)===0?a5(u):(u.f^=Ec,$p(u,null,s)):Vd(u,()=>{u=null}))}var g=ju(()=>{h=f(d);var _=h.length;let v=!1;if(Or){var y=KL(s)===ev;y!==(_===0)&&(s=M_(),$a(s),ss(!1),v=!0)}for(var E=new Set,S=Hn,w=pF(),C=0;C<_;C+=1){Or&&en.nodeType===Kc&&en.data===XA&&(s=en,v=!0,ss(!1));var x=h[C],N=n(x,C),I=p?null:o.get(N);I?(I.v&&wf(I.v,x),I.i&&wf(I.i,C),w&&S.skipped_effects.delete(I.e)):(I=HW(o,p?s:nR??=Hi(),x,N,C,a,e,t),p||(I.e.f|=Ec),o.set(N,I)),E.add(N)}if(_===0&&i&&!u&&(p?u=As(()=>i(s)):(u=As(()=>i(nR??=Hi())),u.f|=Ec)),Or&&_>0&&$a(M_()),!p)if(w){for(const[D,H]of o)E.has(D)||S.skipped_effects.add(H.e);S.oncommit(m),S.ondiscard(()=>{})}else m();v&&ss(!0),f(d)}),b={effect:g,items:o,outrogroups:null,fallback:u};p=!1,Or&&(s=en)}function qW(r,e,t,n,a){var i=(n&qY)!==0,s=e.length,o=r.items,l=r.effect.first,c,u=null,d,h=[],p=[],m,g,b,_;if(i)for(_=0;_0){var N=(n&YL)!==0&&s===0?t:null;if(i){for(_=0;_{if(d!==void 0)for(b of d)b.nodes?.a?.apply()})}function HW(r,e,t,n,a,i,s,o){var l=(s&GY)!==0?(s&HY)===0?t5(t,!1,!1):Mc(t):null,c=(s&zY)!==0?Mc(a):null;return{v:l,i:c,e:As(()=>(i(e,l??t,c??a,o),()=>{r.delete(n)}))}}function $p(r,e,t){if(r.nodes)for(var n=r.nodes.start,a=r.nodes.end,i=e&&(e.f&Ec)===0?e.nodes.start:t;n!==null;){var s=oo(n);if(i.before(n),n===a)return;n=s}}function ou(r,e,t){e===null?r.effect.first=t:e.next=t,t===null?r.effect.last=e:t.prev=e}function nf(r,e,t=!1,n=!1,a=!1){var i=r,s="";Ce(()=>{var o=Pn;if(s===(s=e()??"")){Or&&No();return}if(o.nodes!==null&&(wF(o.nodes.start,o.nodes.end),o.nodes=null),s!==""){if(Or){en.data;for(var l=No(),c=l;l!==null&&(l.nodeType!==Kc||l.data!=="");)c=l,l=oo(l);if(l===null)throw Vm(),jd;Is(en,c),i=$a(l);return}var u=s+"";t?u=`${u}`:n&&(u=`${u}`);var d=sv(u);if((t||n)&&(d=Ni(d)),Is(Ni(d),d.lastChild),t||n)for(;Ni(d);)i.before(Ni(d));else i.before(d)}})}function ke(r,e,...t){var n=new Qm(r);ju(()=>{const a=e()??null;n.ensure(a,a&&(i=>a(i,...t)))},Fl)}function VW(r){return(e,...t)=>{var n=r(...t),a;if(Or)a=en,No();else{var i=n.render().trim(),s=sv(i);a=Ni(s),e.before(a)}const o=n.setup?.(a);Is(a,a),typeof o=="function"&&ah(o)}}function me(r,e,t){Or&&No();var n=new Qm(r);ju(()=>{var a=e()??null;n.ensure(a,a&&(i=>t(i,a)))},Fl)}const YW=()=>performance.now(),yc={tick:r=>requestAnimationFrame(r),now:()=>YW(),tasks:new Set};function UF(){const r=yc.now();yc.tasks.forEach(e=>{e.c(r)||(yc.tasks.delete(e),e.f())}),yc.tasks.size!==0&&yc.tick(UF)}function WW(r){let e;return yc.tasks.size===0&&yc.tick(UF),{promise:new Promise(t=>{yc.tasks.add(e={c:r,f:t})}),abort(){yc.tasks.delete(e)}}}function Kg(r,e){nh(()=>{r.dispatchEvent(new CustomEvent(e))})}function jW(r){if(r==="float")return"cssFloat";if(r==="offset")return"cssOffset";if(r.startsWith("--"))return r;const e=r.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(t=>t[0].toUpperCase()+t.slice(1)).join("")}function aR(r){const e={},t=r.split(";");for(const n of t){const[a,i]=n.split(":");if(!a||i===void 0)break;const s=jW(a.trim());e[s]=i.trim()}return e}const KW=r=>r;function ai(r,e,t,n){var a=(r&XY)!==0,i=(r&QY)!==0,s=a&&i,o=(r&ZY)!==0,l=s?"both":a?"in":"out",c,u=e.inert,d=e.style.overflow,h,p;function m(){return nh(()=>c??=t()(e,n?.()??{},{direction:l}))}var g={is_global:o,in(){if(e.inert=u,!a){p?.abort(),p?.reset?.();return}i||h?.abort(),Kg(e,"introstart"),h=DC(e,m(),p,1,()=>{Kg(e,"introend"),h?.abort(),h=c=void 0,e.style.overflow=d})},out(y){if(!i){y?.(),c=void 0;return}e.inert=!0,Kg(e,"outrostart"),p=DC(e,m(),h,0,()=>{Kg(e,"outroend"),y?.()})},stop:()=>{h?.abort(),p?.abort()}},b=Pn;if((b.nodes.t??=[]).push(g),a&&L_){var _=o;if(!_){for(var v=b.parent;v&&(v.f&Fl)!==0;)for(;(v=v.parent)&&(v.f&ql)===0;);_=!v||(v.f&Hm)!==0}_&&jf(()=>{Rn(()=>g.in())})}}function DC(r,e,t,n,a){var i=n===1;if(Ph(e)){var s,o=!1;return xo(()=>{if(!o){var b=e({direction:i?"in":"out"});s=DC(r,b,t,n,a)}}),{abort:()=>{o=!0,s?.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(t?.deactivate(),!e?.duration)return a(),{abort:$e,deactivate:$e,reset:$e,t:()=>n};const{delay:l=0,css:c,tick:u,easing:d=KW}=e;var h=[];if(i&&t===void 0&&(u&&u(0,1),c)){var p=aR(c(0,1));h.push(p,p)}var m=()=>1-n,g=r.animate(h,{duration:l,fill:"forwards"});return g.onfinish=()=>{g.cancel();var b=t?.t()??1-n;t?.abort();var _=n-b,v=e.duration*Math.abs(_),y=[];if(v>0){var E=!1;if(c)for(var S=Math.ceil(v/16.666666666666668),w=0;w<=S;w+=1){var C=b+_*d(w/S),x=aR(c(C,1-C));y.push(x),E||=x.overflow==="hidden"}E&&(r.style.overflow="hidden"),m=()=>{var N=g.currentTime;return b+_*d(N/v)},u&&WW(()=>{if(g.playState!=="running")return!1;var N=m();return u(N,1-N),!0})}g=r.animate(y,{duration:v,fill:"forwards"}),g.onfinish=()=>{m=()=>n,u?.(n,1-n),a()}},{abort:()=>{g&&(g.cancel(),g.effect=null,g.onfinish=$e)},deactivate:()=>{a=$e},reset:()=>{n===0&&u?.(1,0)},t:()=>m()}}function $F(r,e,t,n,a,i){let s=Or;Or&&No();var o=null;Or&&en.nodeType===CY&&(o=en,No());var l=Or?en:r,c=new Qm(l,!1);ju(()=>{const u=e()||null;var d=t||u==="svg"?rW:null;if(u===null){c.ensure(null,null),jg(!0);return}return c.ensure(u,h=>{if(u){if(o=Or?o:d?document.createElementNS(d,u):document.createElement(u),Is(o,o),n){Or&&UW(u)&&o.append(document.createComment(""));var p=Or?Ni(o):o.appendChild(Hi());Or&&(p===null?ss(!1):$a(p)),n(o,p)}Pn.nodes.end=o,h.before(o)}Or&&$a(h)}),jg(!0),()=>{u&&jg(!1)}},Fl),ah(()=>{jg(!0)}),s&&(ss(!0),$a(l))}function lv(r,e){let t=null,n=Or;var a;if(Or){t=en;for(var i=Ni(document.head);i!==null&&(i.nodeType!==Kc||i.data!==r);)i=oo(i);if(i===null)ss(!1);else{var s=oo(i);i.remove(),$a(s)}}Or||(a=document.head.appendChild(Hi()));try{ju(()=>e(a),WA)}finally{n&&(ss(!0),$a(t))}}function l5(r,e,t){jf(()=>{var n=Rn(()=>e(r,t?.())||{});if(t&&n?.update){var a=!1,i={};Km(()=>{var s=t();PF(s),a&&QA(i,s)&&(i=s,n.update(s))}),a=!0}if(n?.destroy)return()=>n.destroy()})}function XW(r,e){var t=void 0,n;yF(()=>{t!==(t=e())&&(n&&(_i(n),n=null),t&&(n=As(()=>{jf(()=>t(r))})))})}function GF(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r)){var a=r.length;for(e=0;e=0;){var o=s+i;(s===0||iR.includes(n[s-1]))&&(o===n.length||iR.includes(n[o]))?n=(s===0?"":n.substring(0,s))+n.substring(o+1):s=o}}return n===""?null:n}function sR(r,e=!1){var t=e?" !important;":";",n="";for(var a in r){var i=r[a];i!=null&&i!==""&&(n+=" "+a+": "+i+t)}return n}function nS(r){return r[0]!=="-"||r[1]!=="-"?r.toLowerCase():r}function ZW(r,e){if(e){var t="",n,a;if(Array.isArray(e)?(n=e[0],a=e[1]):n=e,r){r=String(r).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,s=0,o=!1,l=[];n&&l.push(...Object.keys(n).map(nS)),a&&l.push(...Object.keys(a).map(nS));var c=0,u=-1;const g=r.length;for(var d=0;d{PC(r,r.__value)});e.observe(r,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),ah(()=>{e.disconnect()})}function oR(r){return"__value"in r?r.__value:r.value}const _p=Symbol("class"),Lh=Symbol("style"),zF=Symbol("is custom element"),qF=Symbol("is html");function ej(r){if(Or){var e=!1,t=()=>{if(!e){if(e=!0,r.hasAttribute("value")){var n=r.value;er(r,"value",null),r.value=n}if(r.hasAttribute("checked")){var a=r.checked;er(r,"checked",null),r.checked=a}}};r.__on_r=t,xo(t),mF()}}function c5(r,e){var t=u5(r);t.value===(t.value=e??void 0)||r.value===e&&(e!==0||r.nodeName!=="PROGRESS")||(r.value=e??"")}function tj(r,e){e?r.hasAttribute("selected")||r.setAttribute("selected",""):r.removeAttribute("selected")}function er(r,e,t,n){var a=u5(r);Or&&(a[e]=r.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&r.nodeName==="LINK")||a[e]!==(a[e]=t)&&(e==="loading"&&(r[TY]=t),t==null?r.removeAttribute(e):typeof t!="string"&&HF(r).includes(e)?r[e]=t:r.setAttribute(e,t))}function rj(r,e,t,n,a=!1,i=!1){if(Or&&a&&r.tagName==="INPUT"){var s=r,o=s.type==="checkbox"?"defaultChecked":"defaultValue";o in t||ej(s)}var l=u5(r),c=l[zF],u=!l[qF];let d=Or&&c;d&&ss(!1);var h=e||{},p=r.tagName==="OPTION";for(var m in e)m in t||(t[m]=null);t.class?t.class=qr(t.class):(n||t[_p])&&(t.class=null),t[Lh]&&(t.style??=null);var g=HF(r);for(const w in t){let C=t[w];if(p&&w==="value"&&C==null){r.value=r.__value="",h[w]=C;continue}if(w==="class"){var b=r.namespaceURI==="http://www.w3.org/1999/xhtml";yt(r,b,C,n,e?.[_p],t[_p]),h[w]=C,h[_p]=t[_p];continue}if(w==="style"){ds(r,C,e?.[Lh],t[Lh]),h[w]=C,h[Lh]=t[Lh];continue}var _=h[w];if(!(C===_&&!(C===void 0&&r.hasAttribute(w)))){h[w]=C;var v=w[0]+w[1];if(v!=="$$")if(v==="on"){const x={},N="$$"+w;let I=w.slice(2);var y=MW(I);if(IW(I)&&(I=I.slice(0,-7),x.capture=!0),!y&&_){if(C!=null)continue;r.removeEventListener(I,h[N],x),h[N]=null}if(C!=null)if(y)r[`__${I}`]=C,Ln([I]);else{let D=function(H){h[w].call(this,H)};h[N]=s5(I,r,D,x)}else y&&(r[`__${I}`]=void 0)}else if(w==="style")er(r,w,C);else if(w==="autofocus")EW(r,!!C);else if(!c&&(w==="__value"||w==="value"&&C!=null))r.value=r.__value=C;else if(w==="selected"&&p)tj(r,C);else{var E=w;u||(E=PW(E));var S=E==="defaultValue"||E==="defaultChecked";if(C==null&&!c&&!S)if(l[w]=null,E==="value"||E==="checked"){let x=r;const N=e===void 0;if(E==="value"){let I=x.defaultValue;x.removeAttribute(E),x.defaultValue=I,x.value=x.__value=N?I:null}else{let I=x.defaultChecked;x.removeAttribute(E),x.defaultChecked=I,x.checked=N?I:!1}}else r.removeAttribute(w);else S||g.includes(E)&&(c||typeof C!="string")?(r[E]=C,E in l&&(l[E]=pi)):typeof C!="function"&&er(r,E,C)}}}return d&&ss(!0),h}function zt(r,e,t=[],n=[],a=[],i,s=!1,o=!1){JA(a,t,n,l=>{var c=void 0,u={},d=r.nodeName==="SELECT",h=!1;if(yF(()=>{var m=e(...l.map(f)),g=rj(r,c,m,i,s,o);h&&d&&"value"in m&&PC(r,m.value);for(let _ of Object.getOwnPropertySymbols(u))m[_]||_i(u[_]);for(let _ of Object.getOwnPropertySymbols(m)){var b=m[_];_.description===jL&&(!c||b!==c[_])&&(u[_]&&_i(u[_]),u[_]=As(()=>XW(r,()=>b))),g[_]=b}c=g}),d){var p=r;jf(()=>{PC(p,c.value,!0),JW(p)})}h=!0})}function u5(r){return r.__attributes??={[zF]:r.nodeName.includes("-"),[qF]:r.namespaceURI===tW}}var lR=new Map;function HF(r){var e=r.getAttribute("is")||r.nodeName,t=lR.get(e);if(t)return t;lR.set(e,t=[]);for(var n,a=r,i=Element.prototype;i!==a;){n=$L(a);for(var s in n)n[s].set&&t.push(s);a=Zb(a)}return t}function mm(r,e,t=e){var n=new WeakSet;gF(r,"input",async a=>{var i=a?r.defaultValue:r.value;if(i=iS(r)?sS(i):i,t(i),Hn!==null&&n.add(Hn),await nl(),i!==(i=e())){var s=r.selectionStart,o=r.selectionEnd,l=r.value.length;if(r.value=i??"",o!==null){var c=r.value.length;s===o&&o===l&&c>l?(r.selectionStart=c,r.selectionEnd=c):(r.selectionStart=s,r.selectionEnd=Math.min(o,c))}}}),(Or&&r.defaultValue!==r.value||Rn(e)==null&&r.value)&&(t(iS(r)?sS(r.value):r.value),Hn!==null&&n.add(Hn)),Km(()=>{var a=e();if(r===document.activeElement){var i=CC??Hn;if(n.has(i))return}iS(r)&&a===sS(r.value)||r.type==="date"&&!a&&!r.value||a!==r.value&&(r.value=a??"")})}function iS(r){var e=r.type;return e==="number"||e==="range"}function sS(r){return r===""?null:+r}function nj(r,e,t=e){gF(r,"change",()=>{t(r.files)}),Or&&r.files&&t(r.files),Km(()=>{r.files=e()})}function cR(r,e){return r===e||r?.[kl]===e}function pr(r={},e,t,n){return jf(()=>{var a,i;return Km(()=>{a=i,i=[],Rn(()=>{r!==t(...i)&&(e(r,...i),a&&cR(t(...a),r)&&e(null,...a))})}),()=>{xo(()=>{i&&cR(t(...i),r)&&e(null,...i)})}}),r}function aj(r,e){wW(window,["resize"],()=>nh(()=>e(window[r])))}function d5(r=!1){const e=$n,t=e.l.u;if(!t)return;let n=()=>PF(e.s);if(r){let a=0,i={};const s=Ym(()=>{let o=!1;const l=e.s;for(const c in l)l[c]!==i[c]&&(i[c]=l[c],o=!0);return o&&a++,a});n=()=>f(s)}t.b.length&&Gi(()=>{uR(e,n),EC(t.b)}),Nt(()=>{const a=Rn(()=>t.m.map(EY));return()=>{for(const i of a)typeof i=="function"&&i()}}),t.a.length&&Nt(()=>{uR(e,n),EC(t.a)})}function uR(r,e){if(r.l.s)for(const t of r.l.s)f(t);e()}function VF(r,e,t){if(r==null)return e(void 0),$e;const n=Rn(()=>r.subscribe(e,t));return n.unsubscribe?()=>n.unsubscribe():n}const Th=[];function h5(r,e=$e){let t=null;const n=new Set;function a(o){if(QA(r,o)&&(r=o,t)){const l=!Th.length;for(const c of n)c[1](),Th.push(c,r);if(l){for(let c=0;c{n.delete(c),n.size===0&&t&&(t(),t=null)}}return{set:a,update:i,subscribe:s}}function ij(r){let e;return VF(r,t=>e=t)(),e}let Xg=!1,LC=Symbol();function sj(r,e,t){const n=t[e]??={store:null,source:t5(void 0),unsubscribe:$e};if(n.store!==r&&!(LC in t))if(n.unsubscribe(),n.store=r??null,r==null)n.source.v=void 0,n.unsubscribe=$e;else{var a=!0;n.unsubscribe=VF(r,i=>{a?n.source.v=i:M(n.source,i)}),a=!1}return r&&LC in t?ij(r):f(n.source)}function oj(){const r={};function e(){ah(()=>{for(var t in r)r[t].unsubscribe();qA(r,LC,{enumerable:!1,value:!0})})}return[r,e]}function lj(r){var e=Xg;try{return Xg=!1,[r(),Xg]}finally{Xg=e}}const cj={get(r,e){if(!r.exclude.includes(e))return r.props[e]},set(r,e){return!1},getOwnPropertyDescriptor(r,e){if(!r.exclude.includes(e)&&e in r.props)return{enumerable:!0,configurable:!0,value:r.props[e]}},has(r,e){return r.exclude.includes(e)?!1:e in r.props},ownKeys(r){return Reflect.ownKeys(r.props).filter(e=>!r.exclude.includes(e))}};function Ye(r,e,t){return new Proxy({props:r,exclude:e},cj)}const uj={get(r,e){let t=r.props.length;for(;t--;){let n=r.props[t];if(Ph(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n)return n[e]}},set(r,e,t){let n=r.props.length;for(;n--;){let a=r.props[n];Ph(a)&&(a=a());const i=Cu(a,e);if(i&&i.set)return i.set(t),!0}return!1},getOwnPropertyDescriptor(r,e){let t=r.props.length;for(;t--;){let n=r.props[t];if(Ph(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n){const a=Cu(n,e);return a&&!a.configurable&&(a.configurable=!0),a}}},has(r,e){if(e===kl||e===KA)return!1;for(let t of r.props)if(Ph(t)&&(t=t()),t!=null&&e in t)return!0;return!1},ownKeys(r){const e=[];for(let t of r.props)if(Ph(t)&&(t=t()),!!t){for(const n in t)e.includes(n)||e.push(n);for(const n of Object.getOwnPropertySymbols(t))e.includes(n)||e.push(n)}return e}};function ot(...r){return new Proxy({props:r},uj)}function Y(r,e,t,n){var a=!Yf||(t&YY)!==0,i=(t&jY)!==0,s=(t&KY)!==0,o=n,l=!0,c=()=>(l&&(l=!1,o=s?Rn(n):n),o),u;if(i){var d=kl in r||KA in r;u=Cu(r,e)?.set??(d&&e in r?y=>r[e]=y:void 0)}var h,p=!1;i?[h,p]=lj(()=>r[e]):h=r[e],h===void 0&&n!==void 0&&(h=c(),u&&(a&&LY(),u(h)));var m;if(a?m=()=>{var y=r[e];return y===void 0?c():(l=!0,y)}:m=()=>{var y=r[e];return y!==void 0&&(o=void 0),y===void 0?o:y},a&&(t&WY)===0)return m;if(u){var g=r.$$legacy;return function(y,E){return arguments.length>0?((!a||!E||g||p)&&u(E?m():y),y):m()}}var b=!1,_=((t&VY)!==0?Ym:av)(()=>(b=!1,m()));i&&f(_);var v=Pn;return function(y,E){if(arguments.length>0){const S=E?f(_):a&&i?Sr(y):y;return M(_,S),b=!0,o!==void 0&&(o=S),y}return Iu&&b||(v.f&Cc)!==0?_.v:f(_)}}function dj(r){return class extends hj{constructor(e){super({component:r,...e})}}}class hj{#e;#t;constructor(e){var t=new Map,n=(i,s)=>{var o=t5(s,!1,!1);return t.set(i,o),o};const a=new Proxy({...e.props||{},$$events:{}},{get(i,s){return f(t.get(s)??n(s,Reflect.get(i,s)))},has(i,s){return s===KA?!0:(f(t.get(s)??n(s,Reflect.get(i,s))),Reflect.has(i,s))},set(i,s,o){return M(t.get(s)??n(s,o),o),Reflect.set(i,s,o)}});this.#t=(e.hydrate?FF:ov)(e.component,{target:e.target,anchor:e.anchor,props:a,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&fm(),this.#e=a.$$events;for(const i of Object.keys(this.#t))i==="$set"||i==="$destroy"||i==="$on"||qA(this,i,{get(){return this.#t[i]},set(s){this.#t[i]=s},enumerable:!0});this.#t.$set=i=>{Object.assign(a,i)},this.#t.$destroy=()=>{o5(this.#t)}}$set(e){this.#t.$set(e)}$on(e,t){this.#e[e]=this.#e[e]||[];const n=(...a)=>t.call(this,...a);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(a=>a!==n)}}$destroy(){this.#t.$destroy()}}function fj(r,e){if(HL(),Or){const t=window.__svelte?.h;if(t?.has(r))return t.get(r);nW()}return e()}function pj(){return wn===null&&DY(),(wn.ac??=new AbortController).signal}function bi(r){$n===null&&Vf(),Yf&&$n.l!==null?p5($n).m.push(r):Nt(()=>{const e=Rn(r);if(typeof e=="function")return e})}function f5(r){$n===null&&Vf(),bi(()=>()=>Rn(r))}function mj(r,e,{bubbles:t=!1,cancelable:n=!1}={}){return new CustomEvent(r,{detail:e,bubbles:t,cancelable:n})}function gj(){const r=$n;return r===null&&Vf(),(e,t,n)=>{const a=r.s.$$events?.[e];if(a){const i=zm(a)?a.slice():[a],s=mj(e,t,n);for(const o of i)o.call(r.x,s);return!s.defaultPrevented}return!0}}function _j(r){$n===null&&Vf(),$n.l===null&&VL(),p5($n).b.push(r)}function bj(r){$n===null&&Vf(),$n.l===null&&VL(),p5($n).a.push(r)}function p5(r){var e=r.l;return e.u??={a:[],b:[],m:[]}}const vj=Object.freeze(Object.defineProperty({__proto__:null,afterUpdate:bj,beforeUpdate:_j,createContext:lW,createEventDispatcher:gj,createRawSnippet:VW,flushSync:fm,fork:fW,getAbortSignal:pj,getAllContexts:ZL,getContext:Bl,hasContext:tv,hydratable:fj,hydrate:FF,mount:ov,onDestroy:f5,onMount:bi,setContext:Yu,settled:kF,tick:nl,unmount:o5,untrack:Rn},Symbol.toStringTag,{value:"Module"}));class cv{constructor(e,t){this.status=e,typeof t=="string"?this.body={message:t}:t?this.body=t:this.body={message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}}class m5{constructor(e,t){this.status=e,this.location=t}}class g5 extends Error{constructor(e,t,n){super(n),this.status=e,this.text=t}}new URL("sveltekit-internal://");function yj(r,e){return r==="/"||e==="ignore"?r:e==="never"?r.endsWith("/")?r.slice(0,-1):r:e==="always"&&!r.endsWith("/")?r+"/":r}function Sj(r){return r.split("%25").map(decodeURI).join("%25")}function Ej(r){for(const e in r)r[e]=decodeURIComponent(r[e]);return r}function oS({href:r}){return r.split("#")[0]}function wj(r,e,t,n=!1){const a=new URL(r);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(s,o){if(o==="get"||o==="getAll"||o==="has")return(c,...u)=>(t(c),s[o](c,...u));e();const l=Reflect.get(s,o);return typeof l=="function"?l.bind(s):l}}),enumerable:!0,configurable:!0});const i=["href","pathname","search","toString","toJSON"];n&&i.push("hash");for(const s of i)Object.defineProperty(a,s,{get(){return e(),r[s]},enumerable:!0,configurable:!0});return a}function Tj(...r){let e=5381;for(const t of r)if(typeof t=="string"){let n=t.length;for(;n;)e=e*33^t.charCodeAt(--n)}else if(ArrayBuffer.isView(t)){const n=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);let a=n.length;for(;a;)e=e*33^n[--a]}else throw new TypeError("value must be a string or TypedArray");return(e>>>0).toString(36)}new TextEncoder;new TextDecoder;function Cj(r){const e=atob(r),t=new Uint8Array(e.length);for(let n=0;n((r instanceof Request?r.method:e?.method||"GET")!=="GET"&&rm.delete(_5(r)),Aj(r,e));const rm=new Map;function xj(r,e){const t=_5(r,e),n=document.querySelector(t);if(n?.textContent){n.remove();let{body:a,...i}=JSON.parse(n.textContent);const s=n.getAttribute("data-ttl");return s&&rm.set(t,{body:a,init:i,ttl:1e3*Number(s)}),n.getAttribute("data-b64")!==null&&(a=Cj(a)),Promise.resolve(new Response(a,i))}return window.fetch(r,e)}function Rj(r,e,t){if(rm.size>0){const n=_5(r,t),a=rm.get(n);if(a){if(performance.now(){const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(n);if(a)return e.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const i=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(n);if(i)return e.push({name:i[1],matcher:i[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!n)return;const s=n.split(/\[(.+?)\](?!\])/);return"/"+s.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return lS(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return lS(String.fromCharCode(...l.slice(2).split("-").map(g=>parseInt(g,16))));const u=Oj.exec(l),[,d,h,p,m]=u;return e.push({name:p,matcher:m,optional:!!d,rest:!!h,chained:h?c===1&&s[0]==="":!1}),h?"([^]*?)":d?"([^/]*)?":"([^/]+?)"}return lS(l)}).join("")}).join("")}/?$`),params:e}}function Ij(r){return r!==""&&!/^\([^)]+\)$/.test(r)}function kj(r){return r.slice(1).split("/").filter(Ij)}function Mj(r,e,t){const n={},a=r.slice(1),i=a.filter(o=>o!==void 0);let s=0;for(let o=0;ou).join("/"),s=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||t[l.matcher](c)){n[l.name]=c;const u=e[o+1],d=a[o+1];u&&!u.rest&&u.optional&&d&&l.chained&&(s=0),!u&&!d&&Object.keys(n).length===i.length&&(s=0);continue}if(l.optional&&l.chained){s++;continue}return}if(!s)return n}function lS(r){return r.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Dj({nodes:r,server_loads:e,dictionary:t,matchers:n}){const a=new Set(e);return Object.entries(t).map(([o,[l,c,u]])=>{const{pattern:d,params:h}=Nj(o),p={id:o,exec:m=>{const g=d.exec(m);if(g)return Mj(g,h,n)},errors:[1,...u||[]].map(m=>r[m]),layouts:[0,...c||[]].map(s),leaf:i(l)};return p.errors.length=p.layouts.length=Math.max(p.errors.length,p.layouts.length),p});function i(o){const l=o<0;return l&&(o=~o),[l,r[o]]}function s(o){return o===void 0?o:[a.has(o),r[o]]}}function YF(r,e=JSON.parse){try{return e(sessionStorage[r])}catch{}}function dR(r,e,t=JSON.stringify){const n=t(e);try{sessionStorage[r]=n}catch{}}const Ga=globalThis.__sveltekit_10avopp?.base??"",Pj=globalThis.__sveltekit_10avopp?.assets??Ga??"",Lj="1775557638699",WF="sveltekit:snapshot",jF="sveltekit:scroll",b5="sveltekit:states",KF="sveltekit:pageurl",Yd="sveltekit:history",Cf="sveltekit:navigation",Id={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},uv=location.origin;function dv(r){if(r instanceof URL)return r;let e=document.baseURI;if(!e){const t=document.getElementsByTagName("base");e=t.length?t[0].href:document.URL}return new URL(r,e)}function hv(){return{x:pageXOffset,y:pageYOffset}}function Ch(r,e){return r.getAttribute(`data-sveltekit-${e}`)}const hR={...Id,"":Id.hover};function XF(r){let e=r.assignedSlot??r.parentNode;return e?.nodeType===11&&(e=e.host),e}function QF(r,e){for(;r&&r!==e;){if(r.nodeName.toUpperCase()==="A"&&r.hasAttribute("href"))return r;r=XF(r)}}function FC(r,e,t){let n;try{if(n=new URL(r instanceof SVGAElement?r.href.baseVal:r.href,document.baseURI),t&&n.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";n.hash=`#${o}${n.hash}`}}catch{}const a=r instanceof SVGAElement?r.target.baseVal:r.target,i=!n||!!a||fv(n,e,t)||(r.getAttribute("rel")||"").split(/\s+/).includes("external"),s=n?.origin===uv&&r.hasAttribute("download");return{url:n,external:i,target:a,download:s}}function F_(r){let e=null,t=null,n=null,a=null,i=null,s=null,o=r;for(;o&&o!==document.documentElement;)n===null&&(n=Ch(o,"preload-code")),a===null&&(a=Ch(o,"preload-data")),e===null&&(e=Ch(o,"keepfocus")),t===null&&(t=Ch(o,"noscroll")),i===null&&(i=Ch(o,"reload")),s===null&&(s=Ch(o,"replacestate")),o=XF(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:hR[n??"off"],preload_data:hR[a??"off"],keepfocus:l(e),noscroll:l(t),reload:l(i),replace_state:l(s)}}function fR(r){const e=h5(r);let t=!0;function n(){t=!0,e.update(s=>s)}function a(s){t=!1,e.set(s)}function i(s){let o;return e.subscribe(l=>{(o===void 0||t&&l!==o)&&s(o=l)})}return{notify:n,set:a,subscribe:i}}const ZF={v:()=>{}};function Fj(){const{set:r,subscribe:e}=h5(!1);let t;async function n(){clearTimeout(t);try{const a=await fetch(`${Pj}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const s=(await a.json()).version!==Lj;return s&&(r(!0),ZF.v(),clearTimeout(t)),s}catch{return!1}}return{subscribe:e,check:n}}function fv(r,e,t){return r.origin!==uv||!r.pathname.startsWith(e)?!0:t?r.pathname!==location.pathname:!1}const JF=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...JF];const Bj=new Set([...JF]);[...Bj];function Uj(r){return r.filter(e=>e!=null)}function v5(r){return r instanceof cv||r instanceof g5?r.status:500}function $j(r){return r instanceof g5?r.text:"Internal Error"}let Ba,gm,cS;const Gj=bi.toString().includes("$$")||/function \w+\(\) \{\}/.test(bi.toString());Gj?(Ba={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},gm={current:null},cS={current:!1}):(Ba=new class{#e=_e({});get data(){return f(this.#e)}set data(e){M(this.#e,e)}#t=_e(null);get form(){return f(this.#t)}set form(e){M(this.#t,e)}#r=_e(null);get error(){return f(this.#r)}set error(e){M(this.#r,e)}#n=_e({});get params(){return f(this.#n)}set params(e){M(this.#n,e)}#i=_e({id:null});get route(){return f(this.#i)}set route(e){M(this.#i,e)}#a=_e({});get state(){return f(this.#a)}set state(e){M(this.#a,e)}#s=_e(-1);get status(){return f(this.#s)}set status(e){M(this.#s,e)}#o=_e(new URL("https://example.com"));get url(){return f(this.#o)}set url(e){M(this.#o,e)}},gm=new class{#e=_e(null);get current(){return f(this.#e)}set current(e){M(this.#e,e)}},cS=new class{#e=_e(!1);get current(){return f(this.#e)}set current(e){M(this.#e,e)}},ZF.v=()=>cS.current=!0);function zj(r){Object.assign(Ba,r)}const pR={spanContext(){return qj},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},qj={traceId:"",spanId:"",traceFlags:0},{onMount:Hj}=vj,Vj=Rn??(r=>r()),Yj=new Set(["icon","shortcut icon","apple-touch-icon"]),Kd=YF(jF)??{},_m=YF(WF)??{},Ml={url:fR({}),page:fR({}),navigating:h5(null),updated:Fj()};function y5(r){Kd[r]=hv()}function Wj(r,e){let t=r+1;for(;Kd[t];)delete Kd[t],t+=1;for(t=e+1;_m[t];)delete _m[t],t+=1}function bm(r,e=!1){return e?location.replace(r.href):location.href=r.href,new Promise(()=>{})}async function eB(){if("serviceWorker"in navigator){const r=await navigator.serviceWorker.getRegistration(Ga||"/");r&&await r.update()}}function mR(){}let S5,BC,B_,Sc,UC,ii;const U_=[],$_=[];let el=null;function $C(){el?.fork?.then(r=>r?.discard()),el=null}const Qg=new Map,tB=new Set,jj=new Set,af=new Set;let ba={branch:[],error:null,url:null},rB=!1,G_=!1,gR=!0,vm=!1,bp=!1,nB=!1,E5=!1,w5,xi,Js,kd;const z_=new Set,_R=new Map;async function Kj(r,e,t){globalThis.__sveltekit_10avopp?.data&&globalThis.__sveltekit_10avopp.data,document.URL!==location.href&&(location.href=location.href),ii=r,await r.hooks.init?.(),S5=Dj(r),Sc=document.documentElement,UC=e,BC=r.nodes[0],B_=r.nodes[1],BC(),B_(),xi=history.state?.[Yd],Js=history.state?.[Cf],xi||(xi=Js=Date.now(),history.replaceState({...history.state,[Yd]:xi,[Cf]:Js},""));const n=Kd[xi];function a(){n&&(history.scrollRestoration="manual",scrollTo(n.x,n.y))}t?(a(),await lK(UC,t)):(await sf({type:"enter",url:dv(ii.hash?dK(new URL(location.href)):location.href),replace_state:!0}),a()),oK()}function Xj(){U_.length=0,E5=!1}function aB(r){$_.some(e=>e?.snapshot)&&(_m[r]=$_.map(e=>e?.snapshot?.capture()))}function iB(r){_m[r]?.forEach((e,t)=>{$_[t]?.snapshot?.restore(e)})}function bR(){y5(xi),dR(jF,Kd),aB(Js),dR(WF,_m)}async function sB(r,e,t,n){let a;e.invalidateAll&&$C(),await sf({type:"goto",url:dv(r),keepfocus:e.keepFocus,noscroll:e.noScroll,replace_state:e.replaceState,state:e.state,redirect_count:t,nav_token:n,accept:()=>{e.invalidateAll&&(E5=!0,a=[..._R.keys()]),e.invalidate&&e.invalidate.forEach(sK)}}),e.invalidateAll&&nl().then(nl).then(()=>{_R.forEach(({resource:i},s)=>{a?.includes(s)&&i.refresh?.()})})}async function Qj(r){if(r.id!==el?.id){$C();const e={};z_.add(e),el={id:r.id,token:e,promise:cB({...r,preload:e}).then(t=>(z_.delete(e),t.type==="loaded"&&t.state.error&&$C(),t)),fork:null}}return el.promise}async function uS(r){const e=(await pv(r,!1))?.route;e&&await Promise.all([...e.layouts,e.leaf].map(t=>t?.[1]()))}async function oB(r,e,t){ba=r.state;const n=document.querySelector("style[data-sveltekit]");if(n&&n.remove(),Object.assign(Ba,r.props.page),w5=new ii.root({target:e,props:{...r.props,stores:Ml,components:$_},hydrate:t,sync:!1}),await Promise.resolve(),iB(Js),t){const a={from:null,to:{params:ba.params,route:{id:ba.route?.id??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};af.forEach(i=>i(a))}G_=!0}function q_({url:r,params:e,branch:t,status:n,error:a,route:i,form:s}){let o="never";if(Ga&&(r.pathname===Ga||r.pathname===Ga+"/"))o="always";else for(const p of t)p?.slash!==void 0&&(o=p.slash);r.pathname=yj(r.pathname,o),r.search=r.search;const l={type:"loaded",state:{url:r,params:e,branch:t,error:a,route:i},props:{constructors:Uj(t).map(p=>p.node.component),page:mv(Ba)}};s!==void 0&&(l.props.form=s);let c={},u=!Ba,d=0;for(let p=0;p(o&&(l.route=!0),h[p])}),params:new Proxy(n,{get:(h,p)=>(o&&l.params.add(p),h[p])}),data:i?.data??null,url:wj(t,()=>{o&&(l.url=!0)},h=>{o&&l.search_params.add(h)},ii.hash),async fetch(h,p){h instanceof Request&&(p={body:h.method==="GET"||h.method==="HEAD"?void 0:await h.blob(),cache:h.cache,credentials:h.credentials,headers:[...h.headers].length>0?h?.headers:void 0,integrity:h.integrity,keepalive:h.keepalive,method:h.method,mode:h.mode,redirect:h.redirect,referrer:h.referrer,referrerPolicy:h.referrerPolicy,signal:h.signal,...p});const{resolved:m,promise:g}=lB(h,p,t);return o&&u(m.href),g},setHeaders:()=>{},depends:u,parent(){return o&&(l.parent=!0),e()},untrack(h){o=!1;try{return h()}finally{o=!0}}};s=await c.universal.load.call(null,d)??null}return{node:c,loader:r,server:i,universal:c.universal?.load?{type:"data",data:s,uses:l}:null,data:s??i?.data??null,slash:c.universal?.trailingSlash??i?.slash}}function lB(r,e,t){let n=r instanceof Request?r.url:r;const a=new URL(n,t);a.origin===t.origin&&(n=a.href.slice(t.origin.length));const i=G_?Rj(n,a.href,e):xj(n,e);return{resolved:a,promise:i}}function Zj(r,e,t,n,a,i){if(E5)return!0;if(!a)return!1;if(a.parent&&r||a.route&&e||a.url&&t)return!0;for(const s of a.search_params)if(n.has(s))return!0;for(const s of a.params)if(i[s]!==ba.params[s])return!0;for(const s of a.dependencies)if(U_.some(o=>o(new URL(s))))return!0;return!1}function C5(r,e){return r?.type==="data"?r:r?.type==="skip"?e??null:null}function Jj(r,e){if(!r)return new Set(e.searchParams.keys());const t=new Set([...r.searchParams.keys(),...e.searchParams.keys()]);for(const n of t){const a=r.searchParams.getAll(n),i=e.searchParams.getAll(n);a.every(s=>i.includes(s))&&i.every(s=>a.includes(s))&&t.delete(n)}return t}function eK({error:r,url:e,route:t,params:n}){return{type:"loaded",state:{error:r,url:e,route:t,params:n,branch:[]},props:{page:mv(Ba),constructors:[]}}}async function cB({id:r,invalidating:e,url:t,params:n,route:a,preload:i}){if(el?.id===r)return z_.delete(el.token),el.promise;const{errors:s,layouts:o,leaf:l}=a,c=[...o,l];s.forEach(b=>b?.().catch(()=>{})),c.forEach(b=>b?.[1]().catch(()=>{}));const u=ba.url?r!==H_(ba.url):!1,d=ba.route?a.id!==ba.route.id:!1,h=Jj(ba.url,t);let p=!1;const m=c.map(async(b,_)=>{if(!b)return;const v=ba.branch[_];return b[1]===v?.loader&&!Zj(p,d,u,h,v.universal?.uses,n)?v:(p=!0,T5({loader:b[1],url:t,params:n,route:a,parent:async()=>{const E={};for(let S=0;S<_;S+=1)Object.assign(E,(await m[S])?.data);return E},server_data_node:C5(b[0]?{type:"skip"}:null,b[0]?v?.server:void 0)}))});for(const b of m)b.catch(()=>{});const g=[];for(let b=0;bPromise.resolve({}),server_data_node:C5(i)}),o={node:await B_(),loader:B_,universal:null,server:null,data:null};return q_({url:t,params:a,branch:[s,o],status:r,error:e,route:null})}catch(s){if(s instanceof m5)return sB(new URL(s.location,location.href),{},0);throw s}}async function rK(r){const e=r.href;if(Qg.has(e))return Qg.get(e);let t;try{const n=(async()=>{let a=await ii.hooks.reroute({url:new URL(r),fetch:async(i,s)=>lB(i,s,r).promise})??r;if(typeof a=="string"){const i=new URL(r);ii.hash?i.hash=a:i.pathname=a,a=i}return a})();Qg.set(e,n),t=await n}catch{Qg.delete(e);return}return t}async function pv(r,e){if(r&&!fv(r,Ga,ii.hash)){const t=await rK(r);if(!t)return;const n=nK(t);for(const a of S5){const i=a.exec(n);if(i)return{id:H_(r),invalidating:e,route:a,params:Ej(i),url:r}}}}function nK(r){return Sj(ii.hash?r.hash.replace(/^#/,"").replace(/[?#].+/,""):r.pathname.slice(Ga.length))||"/"}function H_(r){return(ii.hash?r.hash.replace(/^#/,""):r.pathname)+r.search}function uB({url:r,type:e,intent:t,delta:n,event:a}){let i=!1;const s=R5(ba,t,r,e);n!==void 0&&(s.navigation.delta=n),a!==void 0&&(s.navigation.event=a);const o={...s.navigation,cancel:()=>{i=!0,s.reject(new Error("navigation cancelled"))}};return vm||tB.forEach(l=>l(o)),i?null:s}async function sf({type:r,url:e,popped:t,keepfocus:n,noscroll:a,replace_state:i,state:s={},redirect_count:o=0,nav_token:l={},accept:c=mR,block:u=mR,event:d}){const h=kd;kd=l;const p=await pv(e,!1),m=r==="enter"?R5(ba,p,e,r):uB({url:e,type:r,delta:t?.delta,intent:p,event:d});if(!m){u(),kd===l&&(kd=h);return}const g=xi,b=Js;c(),vm=!0,G_&&m.navigation.type!=="enter"&&Ml.navigating.set(gm.current=m.navigation);let _=p&&await cB(p);if(!_){if(fv(e,Ga,ii.hash))return await bm(e,i);_=await dB(e,{id:null},await ym(new g5(404,"Not Found",`Not found: ${e.pathname}`),{url:e,params:{},route:{id:null}}),404,i)}if(e=p?.url||e,kd!==l)return m.reject(new Error("navigation aborted")),!1;if(_.type==="redirect"){if(o<20){await sf({type:r,url:new URL(_.location,e),popped:t,keepfocus:n,noscroll:a,replace_state:i,state:s,redirect_count:o+1,nav_token:l}),m.fulfil(void 0);return}_=await A5({status:500,error:await ym(new Error("Redirect loop"),{url:e,params:{},route:{id:null}}),url:e,route:{id:null}})}else _.props.page.status>=400&&await Ml.updated.check()&&(await eB(),await bm(e,i));if(Xj(),y5(g),aB(b),_.props.page.url.pathname!==e.pathname&&(e.pathname=_.props.page.url.pathname),s=t?t.state:s,!t){const C=i?0:1,x={[Yd]:xi+=C,[Cf]:Js+=C,[b5]:s};(i?history.replaceState:history.pushState).call(history,x,"",e),i||Wj(xi,Js)}const v=p&&el?.id===p.id?el.fork:null;el=null,_.props.page.state=s;let y;if(G_){const C=(await Promise.all(Array.from(jj,N=>N(m.navigation)))).filter(N=>typeof N=="function");if(C.length>0){let N=function(){C.forEach(I=>{af.delete(I)})};C.push(N),C.forEach(I=>{af.add(I)})}ba=_.state,_.props.page&&(_.props.page.url=e);const x=v&&await v;x?y=x.commit():(w5.$set(_.props),zj(_.props.page),y=kF?.()),nB=!0}else await oB(_,UC,!1);const{activeElement:E}=document;await y,await nl(),await nl();let S=t?t.scroll:a?hv():null;if(gR){const C=e.hash&&document.getElementById(fB(e));if(S)scrollTo(S.x,S.y);else if(C){C.scrollIntoView();const{top:x,left:N}=C.getBoundingClientRect();S={x:pageXOffset+N,y:pageYOffset+x}}else scrollTo(0,0)}const w=document.activeElement!==E&&document.activeElement!==document.body;!n&&!w&&uK(e,S),gR=!0,_.props.page&&Object.assign(Ba,_.props.page),vm=!1,r==="popstate"&&iB(Js),m.fulfil(void 0),af.forEach(C=>C(m.navigation)),Ml.navigating.set(gm.current=null)}async function dB(r,e,t,n,a){return r.origin===uv&&r.pathname===location.pathname&&!rB?await A5({status:n,error:t,url:r,route:e}):await bm(r,a)}function aK(){let r,e={element:void 0,href:void 0},t;Sc.addEventListener("mousemove",o=>{const l=o.target;clearTimeout(r),r=setTimeout(()=>{i(l,Id.hover)},20)});function n(o){o.defaultPrevented||i(o.composedPath()[0],Id.tap)}Sc.addEventListener("mousedown",n),Sc.addEventListener("touchstart",n,{passive:!0});const a=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(uS(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function i(o,l){const c=QF(o,Sc),u=c===e.element&&c?.href===e.href&&l>=t;if(!c||u)return;const{url:d,external:h,download:p}=FC(c,Ga,ii.hash);if(h||p)return;const m=F_(c),g=d&&H_(ba.url)===H_(d);if(!(m.reload||g))if(l<=m.preload_data){e={element:c,href:c.href},t=Id.tap;const b=await pv(d,!1);if(!b)return;Qj(b)}else l<=m.preload_code&&(e={element:c,href:c.href},t=l,uS(d))}function s(){a.disconnect();for(const o of Sc.querySelectorAll("a")){const{url:l,external:c,download:u}=FC(o,Ga,ii.hash);if(c||u)continue;const d=F_(o);d.reload||(d.preload_code===Id.viewport&&a.observe(o),d.preload_code===Id.eager&&uS(l))}}af.add(s),s()}function ym(r,e){if(r instanceof cv)return r.body;const t=v5(r),n=$j(r);return ii.hooks.handleError({error:r,event:e,status:t,message:n})??{message:n}}function iK(r,e){Hj(()=>(r.add(e),()=>{r.delete(e)}))}function x5(r){iK(af,r)}function as(r,e={}){return r=new URL(dv(r)),r.origin!==uv?Promise.reject(new Error("goto: invalid URL")):sB(r,e,0)}function sK(r){if(typeof r=="function")U_.push(r);else{const{href:e}=new URL(r,location.href);U_.push(t=>t.href===e)}}function hB(r,e){const t={[Yd]:xi,[Cf]:Js,[KF]:Ba.url.href,[b5]:e};history.replaceState(t,"",dv(r)),Ba.state=e,w5.$set({page:Vj(()=>mv(Ba))})}function oK(){history.scrollRestoration="manual",addEventListener("beforeunload",e=>{let t=!1;if(bR(),!vm){const n=R5(ba,void 0,null,"leave"),a={...n.navigation,cancel:()=>{t=!0,n.reject(new Error("navigation cancelled"))}};tB.forEach(i=>i(a))}t?(e.preventDefault(),e.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&bR()}),navigator.connection?.saveData||aK(),Sc.addEventListener("click",async e=>{if(e.button||e.which!==1||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.defaultPrevented)return;const t=QF(e.composedPath()[0],Sc);if(!t)return;const{url:n,external:a,target:i,download:s}=FC(t,Ga,ii.hash);if(!n)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const o=F_(t);if(!(t instanceof SVGAElement)&&n.protocol!==location.protocol&&!(n.protocol==="https:"||n.protocol==="http:")||s)return;const[c,u]=(ii.hash?n.hash.replace(/^#/,""):n.href).split("#"),d=c===oS(location);if(a||o.reload&&(!d||!u)){uB({url:n,type:"link",event:e})?vm=!0:e.preventDefault();return}if(u!==void 0&&d){const[,h]=ba.url.href.split("#");if(h===u){if(e.preventDefault(),u===""||u==="top"&&t.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const p=t.ownerDocument.getElementById(decodeURIComponent(u));p&&(p.scrollIntoView(),p.focus())}return}if(bp=!0,y5(xi),r(n),!o.replace_state)return;bp=!1}e.preventDefault(),await new Promise(h=>{requestAnimationFrame(()=>{setTimeout(h,0)}),setTimeout(h,100)}),await sf({type:"link",url:n,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??n.href===location.href,event:e})}),Sc.addEventListener("submit",e=>{if(e.defaultPrevented)return;const t=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if((n?.formTarget||t.target)==="_blank"||(n?.formMethod||t.method)!=="get")return;const s=new URL(n?.hasAttribute("formaction")&&n?.formAction||t.action);if(fv(s,Ga,!1))return;const o=e.target,l=F_(o);if(l.reload)return;e.preventDefault(),e.stopPropagation();const c=new FormData(o,n);s.search=new URLSearchParams(c).toString(),sf({type:"form",url:s,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??s.href===location.href,event:e})}),addEventListener("popstate",async e=>{if(!GC){if(e.state?.[Yd]){const t=e.state[Yd];if(kd={},t===xi)return;const n=Kd[t],a=e.state[b5]??{},i=new URL(e.state[KF]??location.href),s=e.state[Cf],o=ba.url?oS(location)===oS(ba.url):!1;if(s===Js&&(nB||o)){a!==Ba.state&&(Ba.state=a),r(i),Kd[xi]=hv(),n&&scrollTo(n.x,n.y),xi=t;return}const c=t-xi;await sf({type:"popstate",url:i,popped:{state:a,scroll:n,delta:c},accept:()=>{xi=t,Js=s},block:()=>{history.go(-c)},nav_token:kd,event:e})}else if(!bp){const t=new URL(location.href);r(t),ii.hash&&location.reload()}}}),addEventListener("hashchange",()=>{bp&&(bp=!1,history.replaceState({...history.state,[Yd]:++xi,[Cf]:Js},"",location.href))});for(const e of document.querySelectorAll("link"))Yj.has(e.rel)&&(e.href=e.href);addEventListener("pageshow",e=>{e.persisted&&Ml.navigating.set(gm.current=null)});function r(e){ba.url=Ba.url=e,Ml.page.set(mv(Ba)),Ml.page.notify()}}async function lK(r,{status:e=200,error:t,node_ids:n,params:a,route:i,server_route:s,data:o,form:l}){rB=!0;const c=new URL(location.href);let u;({params:a={},route:i={id:null}}=await pv(c,!1)||{}),u=S5.find(({id:p})=>p===i.id);let d,h=!0;try{const p=n.map(async(g,b)=>{const _=o[b];return _?.uses&&(_.uses=cK(_.uses)),T5({loader:ii.nodes[g],url:c,params:a,route:i,parent:async()=>{const v={};for(let y=0;y{const o=history.state;GC=!0,location.replace(`#${n}`),ii.hash&&location.replace(r.hash),history.replaceState(o,"",r.hash),scrollTo(i,s),GC=!1})}else{const i=document.body,s=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),s!==null?i.setAttribute("tabindex",s):i.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const i=[];for(let s=0;s{if(a.rangeCount===i.length){for(let s=0;s{a=l,i=c});return s.catch(()=>{}),{navigation:{from:{params:r.params,route:{id:r.route?.id??null},url:r.url},to:t&&{params:e?.params??null,route:{id:e?.route?.id??null},url:t},willUnload:!e,type:n,complete:s},fulfil:a,reject:i}}function mv(r){return{data:r.data,error:r.error,form:r.form,params:r.params,route:r.route,state:r.state,status:r.status,url:r.url}}function dK(r){const e=new URL(r);return e.hash=decodeURIComponent(r.hash),e}function fB(r){let e;if(ii.hash){const[,,t]=r.hash.split("#",3);e=t??""}else e=r.hash.slice(1);return decodeURIComponent(e)}const hK="modulepreload",fK=function(r,e){return new URL(r,e).href},vR={},Gp=function(e,t,n){let a=Promise.resolve();if(t&&t.length>0){let c=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};const s=document.getElementsByTagName("link"),o=document.querySelector("meta[property=csp-nonce]"),l=o?.nonce||o?.getAttribute("nonce");a=c(t.map(u=>{if(u=fK(u,n),u in vR)return;vR[u]=!0;const d=u.endsWith(".css"),h=d?'[rel="stylesheet"]':"";if(n)for(let m=s.length-1;m>=0;m--){const g=s[m];if(g.href===u&&(!d||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${h}`))return;const p=document.createElement("link");if(p.rel=d?"stylesheet":hK,d||(p.as="script"),p.crossOrigin="",p.href=u,l&&p.setAttribute("nonce",l),document.head.appendChild(p),d)return new Promise((m,g)=>{p.addEventListener("load",m),p.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(s){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s}return a.then(s=>{for(const o of s||[])o.status==="rejected"&&i(o.reason);return e().catch(i)})},pK={},mK="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(mK);var gK=G('
'),_K=G(" ",1);function bK(r,e){Ee(e,!0);let t=Y(e,"components",23,()=>[]),n=Y(e,"data_0",3,null),a=Y(e,"data_1",3,null);Gi(()=>e.stores.page.set(e.page)),Nt(()=>{e.stores,e.page,e.constructors,t(),e.form,n(),a(),e.stores.page.notify()});let i=_e(!1),s=_e(!1),o=_e(null);bi(()=>{const g=e.stores.page.subscribe(()=>{f(i)&&(M(s,!0),nl().then(()=>{M(o,document.title||"untitled page",!0)}))});return M(i,!0),g});const l=F(()=>e.constructors[1]);var c=_K(),u=L(c);{var d=g=>{const b=F(()=>e.constructors[0]);var _=se(),v=L(_);me(v,()=>f(b),(y,E)=>{pr(E(y,{get data(){return n()},get form(){return e.form},get params(){return e.page.params},children:(S,w)=>{var C=se(),x=L(C);me(x,()=>f(l),(N,I)=>{pr(I(N,{get data(){return a()},get form(){return e.form},get params(){return e.page.params}}),D=>t()[1]=D,()=>t()?.[1])}),T(S,C)},$$slots:{default:!0}}),S=>t()[0]=S,()=>t()?.[0])}),T(g,_)},h=g=>{const b=F(()=>e.constructors[0]);var _=se(),v=L(_);me(v,()=>f(b),(y,E)=>{pr(E(y,{get data(){return n()},get form(){return e.form},get params(){return e.page.params}}),S=>t()[0]=S,()=>t()?.[0])}),T(g,_)};le(u,g=>{e.constructors[1]?g(d):g(h,!1)})}var p=ee(u,2);{var m=g=>{var b=gK(),_=j(b);{var v=y=>{var E=Ot();Ce(()=>Ge(E,f(o))),T(y,E)};le(_,y=>{f(s)&&y(v)})}V(b),T(g,b)};le(p,g=>{f(i)&&g(m)})}T(r,c),we()}const vK=dj(bK),yK=[()=>Gp(()=>Promise.resolve().then(()=>bBe),void 0,import.meta.url),()=>Gp(()=>Promise.resolve().then(()=>wBe),void 0,import.meta.url),()=>Gp(()=>Promise.resolve().then(()=>RBe),void 0,import.meta.url),()=>Gp(()=>Promise.resolve().then(()=>MBe),void 0,import.meta.url)],SK=[],EK={"/":[2],"/chat/[id]":[3]},O5={handleError:({error:r})=>{console.error(r)},reroute:()=>{},transport:{}},pB=Object.fromEntries(Object.entries(O5.transport).map(([r,e])=>[r,e.decode])),wK=Object.fromEntries(Object.entries(O5.transport).map(([r,e])=>[r,e.encode])),TK=!0,CK=(r,e)=>pB[r](e),AK=Object.freeze(Object.defineProperty({__proto__:null,decode:CK,decoders:pB,dictionary:EK,encoders:wK,hash:TK,hooks:O5,matchers:pK,nodes:yK,root:vK,server_loads:SK},Symbol.toStringTag,{value:"Module"}));function GBe(r,e){Kj(AK,r,e)}const xK={get params(){return Ba.params},get route(){return Ba.route},get status(){return Ba.status},get url(){return Ba.url}};Ml.updated.check;const gi=xK,N5="-",RK=r=>{const e=NK(r),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=r;return{getClassGroupId:s=>{const o=s.split(N5);return o[0]===""&&o.length!==1&&o.shift(),mB(o,e)||OK(s)},getConflictingClassGroupIds:(s,o)=>{const l=t[s]||[];return o&&n[s]?[...l,...n[s]]:l}}},mB=(r,e)=>{if(r.length===0)return e.classGroupId;const t=r[0],n=e.nextPart.get(t),a=n?mB(r.slice(1),n):void 0;if(a)return a;if(e.validators.length===0)return;const i=r.join(N5);return e.validators.find(({validator:s})=>s(i))?.classGroupId},yR=/^\[(.+)\]$/,OK=r=>{if(yR.test(r)){const e=yR.exec(r)[1],t=e?.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},NK=r=>{const{theme:e,classGroups:t}=r,n={nextPart:new Map,validators:[]};for(const a in t)zC(t[a],n,a,e);return n},zC=(r,e,t,n)=>{r.forEach(a=>{if(typeof a=="string"){const i=a===""?e:SR(e,a);i.classGroupId=t;return}if(typeof a=="function"){if(IK(a)){zC(a(n),e,t,n);return}e.validators.push({validator:a,classGroupId:t});return}Object.entries(a).forEach(([i,s])=>{zC(s,SR(e,i),t,n)})})},SR=(r,e)=>{let t=r;return e.split(N5).forEach(n=>{t.nextPart.has(n)||t.nextPart.set(n,{nextPart:new Map,validators:[]}),t=t.nextPart.get(n)}),t},IK=r=>r.isThemeGetter,kK=r=>{if(r<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,n=new Map;const a=(i,s)=>{t.set(i,s),e++,e>r&&(e=0,n=t,t=new Map)};return{get(i){let s=t.get(i);if(s!==void 0)return s;if((s=n.get(i))!==void 0)return a(i,s),s},set(i,s){t.has(i)?t.set(i,s):a(i,s)}}},qC="!",HC=":",MK=HC.length,DK=r=>{const{prefix:e,experimentalParseClassName:t}=r;let n=a=>{const i=[];let s=0,o=0,l=0,c;for(let m=0;ml?c-l:void 0;return{modifiers:i,hasImportantModifier:h,baseClassName:d,maybePostfixModifierPosition:p}};if(e){const a=e+HC,i=n;n=s=>s.startsWith(a)?i(s.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(t){const a=n;n=i=>t({className:i,parseClassName:a})}return n},PK=r=>r.endsWith(qC)?r.substring(0,r.length-1):r.startsWith(qC)?r.substring(1):r,LK=r=>{const e=Object.fromEntries(r.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const a=[];let i=[];return n.forEach(s=>{s[0]==="["||e[s]?(a.push(...i.sort(),s),i=[]):i.push(s)}),a.push(...i.sort()),a}},FK=r=>({cache:kK(r.cacheSize),parseClassName:DK(r),sortModifiers:LK(r),...RK(r)}),BK=/\s+/,UK=(r,e)=>{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:i}=e,s=[],o=r.trim().split(BK);let l="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{isExternal:d,modifiers:h,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:g}=t(u);if(d){l=u+(l.length>0?" "+l:l);continue}let b=!!g,_=n(b?m.substring(0,g):m);if(!_){if(!b){l=u+(l.length>0?" "+l:l);continue}if(_=n(m),!_){l=u+(l.length>0?" "+l:l);continue}b=!1}const v=i(h).join(":"),y=p?v+qC:v,E=y+_;if(s.includes(E))continue;s.push(E);const S=a(_,b);for(let w=0;w0?" "+l:l)}return l};function $K(){let r=0,e,t,n="";for(;r{if(typeof r=="string")return r;let e,t="";for(let n=0;nd(u),r());return t=FK(c),n=t.cache.get,a=t.cache.set,i=o,o(l)}function o(l){const c=n(l);if(c)return c;const u=UK(l,t);return a(l,u),u}return function(){return i($K.apply(null,arguments))}}const ti=r=>{const e=t=>t[r]||[];return e.isThemeGetter=!0,e},_B=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,bB=/^\((?:(\w[\w-]*):)?(.+)\)$/i,GK=/^\d+\/\d+$/,zK=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qK=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,HK=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,VK=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,YK=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ah=r=>GK.test(r),dn=r=>!!r&&!Number.isNaN(Number(r)),lu=r=>!!r&&Number.isInteger(Number(r)),dS=r=>r.endsWith("%")&&dn(r.slice(0,-1)),tc=r=>zK.test(r),WK=()=>!0,jK=r=>qK.test(r)&&!HK.test(r),vB=()=>!1,KK=r=>VK.test(r),XK=r=>YK.test(r),QK=r=>!wr(r)&&!Tr(r),ZK=r=>Kf(r,EB,vB),wr=r=>_B.test(r),pd=r=>Kf(r,wB,jK),hS=r=>Kf(r,nX,dn),ER=r=>Kf(r,yB,vB),JK=r=>Kf(r,SB,XK),Zg=r=>Kf(r,TB,KK),Tr=r=>bB.test(r),vp=r=>Xf(r,wB),eX=r=>Xf(r,aX),wR=r=>Xf(r,yB),tX=r=>Xf(r,EB),rX=r=>Xf(r,SB),Jg=r=>Xf(r,TB,!0),Kf=(r,e,t)=>{const n=_B.exec(r);return n?n[1]?e(n[1]):t(n[2]):!1},Xf=(r,e,t=!1)=>{const n=bB.exec(r);return n?n[1]?e(n[1]):t:!1},yB=r=>r==="position"||r==="percentage",SB=r=>r==="image"||r==="url",EB=r=>r==="length"||r==="size"||r==="bg-size",wB=r=>r==="length",nX=r=>r==="number",aX=r=>r==="family-name",TB=r=>r==="shadow",YC=()=>{const r=ti("color"),e=ti("font"),t=ti("text"),n=ti("font-weight"),a=ti("tracking"),i=ti("leading"),s=ti("breakpoint"),o=ti("container"),l=ti("spacing"),c=ti("radius"),u=ti("shadow"),d=ti("inset-shadow"),h=ti("text-shadow"),p=ti("drop-shadow"),m=ti("blur"),g=ti("perspective"),b=ti("aspect"),_=ti("ease"),v=ti("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...E(),Tr,wr],w=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto","contain","none"],x=()=>[Tr,wr,l],N=()=>[Ah,"full","auto",...x()],I=()=>[lu,"none","subgrid",Tr,wr],D=()=>["auto",{span:["full",lu,Tr,wr]},lu,Tr,wr],H=()=>[lu,"auto",Tr,wr],q=()=>["auto","min","max","fr",Tr,wr],$=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...x()],re=()=>[Ah,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],W=()=>[r,Tr,wr],ie=()=>[...E(),wR,ER,{position:[Tr,wr]}],k=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",tX,ZK,{size:[Tr,wr]}],te=()=>[dS,vp,pd],O=()=>["","none","full",c,Tr,wr],R=()=>["",dn,vp,pd],U=()=>["solid","dashed","dotted","double"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ne=()=>[dn,dS,wR,ER],ue=()=>["","none",m,Tr,wr],he=()=>["none",dn,Tr,wr],be=()=>["none",dn,Tr,wr],Z=()=>[dn,Tr,wr],ae=()=>[Ah,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[tc],breakpoint:[tc],color:[WK],container:[tc],"drop-shadow":[tc],ease:["in","out","in-out"],font:[QK],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[tc],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[tc],shadow:[tc],spacing:["px",dn],text:[tc],"text-shadow":[tc],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ah,wr,Tr,b]}],container:["container"],columns:[{columns:[dn,wr,Tr,o]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:w()}],"overflow-x":[{"overflow-x":w()}],"overflow-y":[{"overflow-y":w()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{start:N()}],end:[{end:N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[lu,"auto",Tr,wr]}],basis:[{basis:[Ah,"full","auto",o,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[dn,Ah,"auto","initial","none",wr]}],grow:[{grow:["",dn,Tr,wr]}],shrink:[{shrink:["",dn,Tr,wr]}],order:[{order:[lu,"first","last","none",Tr,wr]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":q()}],"auto-rows":[{"auto-rows":q()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:[...$(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...$()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":$()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:re()}],w:[{w:[o,"screen",...re()]}],"min-w":[{"min-w":[o,"screen","none",...re()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[s]},...re()]}],h:[{h:["screen","lh",...re()]}],"min-h":[{"min-h":["screen","lh","none",...re()]}],"max-h":[{"max-h":["screen","lh",...re()]}],"font-size":[{text:["base",t,vp,pd]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Tr,hS]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",dS,wr]}],"font-family":[{font:[eX,wr,e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,Tr,wr]}],"line-clamp":[{"line-clamp":[dn,"none",Tr,hS]}],leading:[{leading:[i,...x()]}],"list-image":[{"list-image":["none",Tr,wr]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Tr,wr]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:[dn,"from-font","auto",Tr,pd]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[dn,"auto",Tr,wr]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Tr,wr]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Tr,wr]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ie()}],"bg-repeat":[{bg:k()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},lu,Tr,wr],radial:["",Tr,wr],conic:[lu,Tr,wr]},rX,JK]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:te()}],"gradient-via-pos":[{via:te()}],"gradient-to-pos":[{to:te()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:O()}],"rounded-s":[{"rounded-s":O()}],"rounded-e":[{"rounded-e":O()}],"rounded-t":[{"rounded-t":O()}],"rounded-r":[{"rounded-r":O()}],"rounded-b":[{"rounded-b":O()}],"rounded-l":[{"rounded-l":O()}],"rounded-ss":[{"rounded-ss":O()}],"rounded-se":[{"rounded-se":O()}],"rounded-ee":[{"rounded-ee":O()}],"rounded-es":[{"rounded-es":O()}],"rounded-tl":[{"rounded-tl":O()}],"rounded-tr":[{"rounded-tr":O()}],"rounded-br":[{"rounded-br":O()}],"rounded-bl":[{"rounded-bl":O()}],"border-w":[{border:R()}],"border-w-x":[{"border-x":R()}],"border-w-y":[{"border-y":R()}],"border-w-s":[{"border-s":R()}],"border-w-e":[{"border-e":R()}],"border-w-t":[{"border-t":R()}],"border-w-r":[{"border-r":R()}],"border-w-b":[{"border-b":R()}],"border-w-l":[{"border-l":R()}],"divide-x":[{"divide-x":R()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":R()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...U(),"hidden","none"]}],"divide-style":[{divide:[...U(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...U(),"none","hidden"]}],"outline-offset":[{"outline-offset":[dn,Tr,wr]}],"outline-w":[{outline:["",dn,vp,pd]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",u,Jg,Zg]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",d,Jg,Zg]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:R()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[dn,pd]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":R()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",h,Jg,Zg]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[dn,Tr,wr]}],"mix-blend":[{"mix-blend":[...Q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Q()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[dn]}],"mask-image-linear-from-pos":[{"mask-linear-from":ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":ne()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":ne()}],"mask-image-t-to-pos":[{"mask-t-to":ne()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":ne()}],"mask-image-r-to-pos":[{"mask-r-to":ne()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":ne()}],"mask-image-b-to-pos":[{"mask-b-to":ne()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":ne()}],"mask-image-l-to-pos":[{"mask-l-to":ne()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":ne()}],"mask-image-x-to-pos":[{"mask-x-to":ne()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":ne()}],"mask-image-y-to-pos":[{"mask-y-to":ne()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[Tr,wr]}],"mask-image-radial-from-pos":[{"mask-radial-from":ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":ne()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":E()}],"mask-image-conic-pos":[{"mask-conic":[dn]}],"mask-image-conic-from-pos":[{"mask-conic-from":ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":ne()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ie()}],"mask-repeat":[{mask:k()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Tr,wr]}],filter:[{filter:["","none",Tr,wr]}],blur:[{blur:ue()}],brightness:[{brightness:[dn,Tr,wr]}],contrast:[{contrast:[dn,Tr,wr]}],"drop-shadow":[{"drop-shadow":["","none",p,Jg,Zg]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",dn,Tr,wr]}],"hue-rotate":[{"hue-rotate":[dn,Tr,wr]}],invert:[{invert:["",dn,Tr,wr]}],saturate:[{saturate:[dn,Tr,wr]}],sepia:[{sepia:["",dn,Tr,wr]}],"backdrop-filter":[{"backdrop-filter":["","none",Tr,wr]}],"backdrop-blur":[{"backdrop-blur":ue()}],"backdrop-brightness":[{"backdrop-brightness":[dn,Tr,wr]}],"backdrop-contrast":[{"backdrop-contrast":[dn,Tr,wr]}],"backdrop-grayscale":[{"backdrop-grayscale":["",dn,Tr,wr]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[dn,Tr,wr]}],"backdrop-invert":[{"backdrop-invert":["",dn,Tr,wr]}],"backdrop-opacity":[{"backdrop-opacity":[dn,Tr,wr]}],"backdrop-saturate":[{"backdrop-saturate":[dn,Tr,wr]}],"backdrop-sepia":[{"backdrop-sepia":["",dn,Tr,wr]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Tr,wr]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[dn,"initial",Tr,wr]}],ease:[{ease:["linear","initial",_,Tr,wr]}],delay:[{delay:[dn,Tr,wr]}],animate:[{animate:["none",v,Tr,wr]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,Tr,wr]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:he()}],"rotate-x":[{"rotate-x":he()}],"rotate-y":[{"rotate-y":he()}],"rotate-z":[{"rotate-z":he()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":["scale-3d"],skew:[{skew:Z()}],"skew-x":[{"skew-x":Z()}],"skew-y":[{"skew-y":Z()}],transform:[{transform:[Tr,wr,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ae()}],"translate-x":[{"translate-x":ae()}],"translate-y":[{"translate-y":ae()}],"translate-z":[{"translate-z":ae()}],"translate-none":["translate-none"],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Tr,wr]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Tr,wr]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[dn,vp,pd,hS]}],stroke:[{stroke:["none",...W()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},iX=(r,{cacheSize:e,prefix:t,experimentalParseClassName:n,extend:a={},override:i={}})=>(zp(r,"cacheSize",e),zp(r,"prefix",t),zp(r,"experimentalParseClassName",n),e0(r.theme,i.theme),e0(r.classGroups,i.classGroups),e0(r.conflictingClassGroups,i.conflictingClassGroups),e0(r.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),zp(r,"orderSensitiveModifiers",i.orderSensitiveModifiers),t0(r.theme,a.theme),t0(r.classGroups,a.classGroups),t0(r.conflictingClassGroups,a.conflictingClassGroups),t0(r.conflictingClassGroupModifiers,a.conflictingClassGroupModifiers),CB(r,a,"orderSensitiveModifiers"),r),zp=(r,e,t)=>{t!==void 0&&(r[e]=t)},e0=(r,e)=>{if(e)for(const t in e)zp(r,t,e[t])},t0=(r,e)=>{if(e)for(const t in e)CB(r,e,t)},CB=(r,e,t)=>{const n=e[t];n!==void 0&&(r[t]=r[t]?r[t].concat(n):n)},sX=(r,...e)=>typeof r=="function"?VC(YC,r,...e):VC(()=>iX(YC(),r),...e),AB=VC(YC);function Kt(...r){return AB(tm(r))}var oX=/\s+/g,lX=r=>typeof r!="string"||!r?r:r.replace(oX," ").trim(),V_=(...r)=>{const e=[],t=n=>{if(!n&&n!==0&&n!==0n)return;if(Array.isArray(n)){for(let i=0,s=n.length;i0?lX(e.join(" ")):void 0},TR=r=>r===!1?"false":r===!0?"true":r===0?"0":r,bs=r=>{if(!r||typeof r!="object")return!0;for(const e in r)return!1;return!0},cX=(r,e)=>{if(r===e)return!0;if(!r||!e)return!1;const t=Object.keys(r),n=Object.keys(e);if(t.length!==n.length)return!1;for(let a=0;a{for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];t in r?r[t]=V_(r[t],n):r[t]=n}return r},xB=(r,e)=>{for(let t=0;t{const e=[];xB(r,e);const t=[];for(let n=0;n{const t={};for(const n in r){const a=r[n];if(n in e){const i=e[n];Array.isArray(a)||Array.isArray(i)?t[n]=RB(i,a):typeof a=="object"&&typeof i=="object"&&a&&i?t[n]=WC(a,i):t[n]=i+" "+a}else t[n]=a}for(const n in e)n in r||(t[n]=e[n]);return t},dX={twMerge:!0,twMergeConfig:{}};function hX(){let r=null,e={},t=!1;return{get cachedTwMerge(){return r},set cachedTwMerge(n){r=n},get cachedTwMergeConfig(){return e},set cachedTwMergeConfig(n){e=n},get didTwMergeConfigChange(){return t},set didTwMergeConfigChange(n){t=n},reset(){r=null,e={},t=!1}}}var gc=hX(),fX=r=>{const e=(n,a)=>{const{extend:i=null,slots:s={},variants:o={},compoundVariants:l=[],compoundSlots:c=[],defaultVariants:u={}}=n,d={...dX,...a},h=i?.base?V_(i.base,n?.base):n?.base,p=i?.variants&&!bs(i.variants)?WC(o,i.variants):o,m=i?.defaultVariants&&!bs(i.defaultVariants)?{...i.defaultVariants,...u}:u;!bs(d.twMergeConfig)&&!cX(d.twMergeConfig,gc.cachedTwMergeConfig)&&(gc.didTwMergeConfigChange=!0,gc.cachedTwMergeConfig=d.twMergeConfig);const g=bs(i?.slots),b=bs(s)?{}:{base:V_(n?.base,g&&i?.base),...s},_=g?b:uX({...i?.slots},bs(b)?{base:n?.base}:b),v=bs(i?.compoundVariants)?l:RB(i?.compoundVariants,l),y=S=>{if(bs(p)&&bs(s)&&g)return r(h,S?.class,S?.className)(d);if(v&&!Array.isArray(v))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof v}`);if(c&&!Array.isArray(c))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof c}`);const w=($,K=p,z=null,re=null)=>{const W=K[$];if(!W||bs(W))return null;const ie=re?.[$]??S?.[$];if(ie===null)return null;const k=TR(ie);if(typeof k=="object")return null;const B=m?.[$],te=k??TR(B);return W[te||"false"]},C=()=>{if(!p)return null;const $=Object.keys(p),K=[];for(let z=0;z<$.length;z++){const re=w($[z],p);re&&K.push(re)}return K},x=($,K)=>{if(!p||typeof p!="object")return null;const z=[];for(const re in p){const W=w(re,p,$,K),ie=$==="base"&&typeof W=="string"?W:W&&W[$];ie&&z.push(ie)}return z},N={};for(const $ in S){const K=S[$];K!==void 0&&(N[$]=K)}const I=($,K)=>{const z=typeof S?.[$]=="object"?{[$]:S[$]?.initial}:{};return{...m,...N,...z,...K}},D=($=[],K)=>{const z=[],re=$.length;for(let W=0;W{const K=D(v,$);if(!Array.isArray(K))return K;const z={},re=r;for(let W=0;W{if(c.length<1)return null;const K={},z=I(null,$);for(let re=0;re{const W=H(re),ie=q(re);return K(_[z],x(z,re),W?W[z]:void 0,ie?ie[z]:void 0,re?.class,re?.className)(d)}}return $}return r(h,C(),D(v),S?.class,S?.className)(d)},E=()=>{if(!(!p||typeof p!="object"))return Object.keys(p)};return y.variantKeys=E(),y.extend=i,y.base=h,y.slots=_,y.variants=p,y.defaultVariants=m,y.compoundSlots=c,y.compoundVariants=v,y};return{tv:e,createTV:n=>(a,i)=>e(a,i?WC(n,i):n)}},pX=r=>bs(r)?AB:sX({...r,extend:{theme:r.theme,classGroups:r.classGroups,conflictingClassGroupModifiers:r.conflictingClassGroupModifiers,conflictingClassGroups:r.conflictingClassGroups,...r.extend}}),mX=(r,e)=>{const t=V_(r);return!t||!(e?.twMerge??!0)?t:((!gc.cachedTwMerge||gc.didTwMergeConfigChange)&&(gc.didTwMergeConfigChange=!1,gc.cachedTwMerge=pX(gc.cachedTwMergeConfig)),gc.cachedTwMerge(t)||void 0)},gX=(...r)=>e=>mX(r,e),{tv:Zm}=fX(gX);const Sm=Zm({base:"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium outline-none transition-all focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 text-white",outline:"bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 border",secondary:"dark:bg-secondary dark:text-secondary-foreground bg-background shadow-sm text-foreground hover:bg-muted-foreground/20",ghost:"hover:text-accent-foreground hover:bg-muted-foreground/10 backdrop-blur-sm",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4","icon-lg":"size-10",icon:"size-9","icon-sm":"size-5 rounded-sm"}},defaultVariants:{variant:"default",size:"default"}});var _X=G(""),bX=G("");function kr(r,e){Ee(e,!0);let t=Y(e,"variant",3,"default"),n=Y(e,"size",3,"default"),a=Y(e,"ref",15,null),i=Y(e,"href",3,void 0),s=Y(e,"type",3,"button"),o=Ye(e,["$$slots","$$events","$$legacy","class","variant","size","ref","href","type","disabled","children"]);var l=se(),c=L(l);{var u=h=>{var p=_X();zt(p,g=>({"data-slot":"button",class:g,href:e.disabled?void 0:i(),"aria-disabled":e.disabled,role:e.disabled?"link":void 0,tabindex:e.disabled?-1:void 0,...o}),[()=>Kt(Sm({variant:t(),size:n()}),e.class)],void 0,void 0,"svelte-1q39rn8");var m=j(p);ke(m,()=>e.children??$e),V(p),pr(p,g=>a(g),()=>a()),T(h,p)},d=h=>{var p=bX();zt(p,g=>({"data-slot":"button",class:g,type:s(),disabled:e.disabled,...o}),[()=>Kt(Sm({variant:t(),size:n()}),e.class)],void 0,void 0,"svelte-1q39rn8");var m=j(p);ke(m,()=>e.children??$e),V(p),pr(p,g=>a(g),()=>a()),T(h,p)};le(c,h=>{i()?h(u):h(d,!1)})}T(r,l),we()}function vX(r){return typeof r=="function"}function Jm(r){return r!==null&&typeof r=="object"}const yX=["string","number","bigint","boolean"];function jC(r){return r==null||yX.includes(typeof r)?!0:Array.isArray(r)?r.every(e=>jC(e)):typeof r=="object"?Object.getPrototypeOf(r)===Object.prototype:!1}const Af=Symbol("box"),gv=Symbol("is-writable");function Pe(r,e){const t=F(r);return e?{[Af]:!0,[gv]:!0,get current(){return f(t)},set current(n){e(n)}}:{[Af]:!0,get current(){return r()}}}function eg(r){return Jm(r)&&Af in r}function I5(r){return eg(r)&&gv in r}function OB(r){return eg(r)?r:vX(r)?Pe(r):os(r)}function SX(r){return Object.entries(r).reduce((e,[t,n])=>eg(n)?(I5(n)?Object.defineProperty(e,t,{get(){return n.current},set(a){n.current=a}}):Object.defineProperty(e,t,{get(){return n.current}}),e):Object.assign(e,{[t]:n}),{})}function EX(r){return I5(r)?{[Af]:!0,get current(){return r.current}}:r}function os(r){let e=_e(Sr(r));return{[Af]:!0,[gv]:!0,get current(){return f(e)},set current(t){M(e,t,!0)}}}function ih(r){let e=_e(Sr(r));return{[Af]:!0,[gv]:!0,get current(){return f(e)},set current(t){M(e,t,!0)}}}ih.from=OB;ih.with=Pe;ih.flatten=SX;ih.readonly=EX;ih.isBox=eg;ih.isWritableBox=I5;function NB(...r){return function(e){for(const t of r)if(t){if(e.defaultPrevented)return;typeof t=="function"?t.call(this,e):t.current?.call(this,e)}}}var wX=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sh(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var xh={},fS,CR;function TX(){if(CR)return fS;CR=1;var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,t=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,o=/^\s+|\s+$/g,l=` -`,c="/",u="*",d="",h="comment",p="declaration";fS=function(g,b){if(typeof g!="string")throw new TypeError("First argument must be a string");if(!g)return[];b=b||{};var _=1,v=1;function y(q){var $=q.match(e);$&&(_+=$.length);var K=q.lastIndexOf(l);v=~K?q.length-K:v+q.length}function E(){var q={line:_,column:v};return function($){return $.position=new S(q),x(),$}}function S(q){this.start=q,this.end={line:_,column:v},this.source=b.source}S.prototype.content=g;function w(q){var $=new Error(b.source+":"+_+":"+v+": "+q);if($.reason=q,$.filename=b.source,$.line=_,$.column=v,$.source=g,!b.silent)throw $}function C(q){var $=q.exec(g);if($){var K=$[0];return y(K),g=g.slice(K.length),$}}function x(){C(t)}function N(q){var $;for(q=q||[];$=I();)$!==!1&&q.push($);return q}function I(){var q=E();if(!(c!=g.charAt(0)||u!=g.charAt(1))){for(var $=2;d!=g.charAt($)&&(u!=g.charAt($)||c!=g.charAt($+1));)++$;if($+=2,d===g.charAt($-1))return w("End of comment missing");var K=g.slice(2,$-2);return v+=2,y(K),g=g.slice($),v+=2,q({type:h,comment:K})}}function D(){var q=E(),$=C(n);if($){if(I(),!C(a))return w("property missing ':'");var K=C(i),z=q({type:p,property:m($[0].replace(r,d)),value:K?m(K[0].replace(r,d)):d});return C(s),z}}function H(){var q=[];N(q);for(var $;$=D();)$!==!1&&(q.push($),N(q));return q}return x(),H()};function m(g){return g?g.replace(o,d):d}return fS}var AR;function CX(){if(AR)return xh;AR=1;var r=xh&&xh.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(xh,"__esModule",{value:!0}),xh.default=t;var e=r(TX());function t(n,a){var i=null;if(!n||typeof n!="string")return i;var s=(0,e.default)(n),o=typeof a=="function";return s.forEach(function(l){if(l.type==="declaration"){var c=l.property,u=l.value;o?a(c,u,l):u&&(i=i||{},i[c]=u)}}),i}return xh}var AX=CX();const xR=sh(AX),xX=xR.default||xR,RX=/\d/,OX=["-","_","/","."];function NX(r=""){if(!RX.test(r))return r!==r.toLowerCase()}function IX(r){const e=[];let t="",n,a;for(const i of r){const s=OX.includes(i);if(s===!0){e.push(t),t="",n=void 0;continue}const o=NX(i);if(a===!1){if(n===!1&&o===!0){e.push(t),t=i,n=o;continue}if(n===!0&&o===!1&&t.length>1){const l=t.at(-1);e.push(t.slice(0,Math.max(0,t.length-1))),t=l+i,n=o;continue}}t+=i,n=o,a=s}return e.push(t),e}function IB(r){return r?IX(r).map(e=>MX(e)).join(""):""}function kX(r){return DX(IB(r||""))}function MX(r){return r?r[0].toUpperCase()+r.slice(1):""}function DX(r){return r?r[0].toLowerCase()+r.slice(1):""}function qp(r){if(!r)return{};const e={};function t(n,a){if(n.startsWith("-moz-")||n.startsWith("-webkit-")||n.startsWith("-ms-")||n.startsWith("-o-")){e[IB(n)]=a;return}if(n.startsWith("--")){e[n]=a;return}e[kX(n)]=a}return xX(r,t),e}function Ac(...r){return(...e)=>{for(const t of r)typeof t=="function"&&t(...e)}}function PX(r,e){const t=RegExp(r,"g");return n=>{if(typeof n!="string")throw new TypeError(`expected an argument of type string, but got ${typeof n}`);return n.match(t)?n.replace(t,e):n}}const LX=PX(/[A-Z]/,r=>`-${r.toLowerCase()}`);function FX(r){if(!r||typeof r!="object"||Array.isArray(r))throw new TypeError(`expected an argument of type object, but got ${typeof r}`);return Object.keys(r).map(e=>`${LX(e)}: ${r[e]};`).join(` -`)}function k5(r={}){return FX(r).replace(` -`," ")}const BX=["onabort","onanimationcancel","onanimationend","onanimationiteration","onanimationstart","onauxclick","onbeforeinput","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncompositionend","oncompositionstart","oncompositionupdate","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onfocusin","onfocusout","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onselectionchange","onselectstart","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitioncancel","ontransitionend","ontransitionrun","ontransitionstart","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel"],UX=new Set(BX);function $X(r){return UX.has(r)}function vr(...r){const e={...r[0]};for(let t=1;tl.has(u));c&&Qs(o)}return s}delete(e){var t=this.#e,n=t.get(e),a=super.delete(e);return n!==void 0&&(t.delete(e),M(this.#r,super.size),M(n,-1),Qs(this.#t)),a}clear(){if(super.size!==0){super.clear();var e=this.#e;M(this.#r,0);for(var t of e.values())M(t,-1);Qs(this.#t),e.clear()}}#a(){f(this.#t);var e=this.#e;if(this.#r.v!==e.size){for(var t of super.keys())if(!e.has(t)){var n=this.#i(0);e.set(t,n)}}for([,n]of this.#e)f(n)}keys(){return f(this.#t),super.keys()}values(){return this.#a(),super.values()}entries(){return this.#a(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return f(this.#r),super.size}}class YX{#e;#t;constructor(e,t){this.#e=e,this.#t=Wu(t)}get current(){return this.#t(),this.#e()}}const WX=/\(.+\)/,jX=new Set(["all","print","screen","and","or","not","only"]);class MB extends YX{constructor(e,t){let n=WX.test(e)||e.split(/[\s,]+/).some(i=>jX.has(i.trim()))?e:`(${e})`;const a=window.matchMedia(n);super(()=>a.matches,i=>jr(a,"change",i))}}let KX=class{#e;#t;constructor(e={}){const{window:t=kB,document:n=t?.document}=e;t!==void 0&&(this.#e=n,this.#t=Wu(a=>{const i=jr(t,"focusin",a),s=jr(t,"focusout",a);return()=>{i(),s()}}))}get current(){return this.#t?.(),this.#e?qX(this.#e):null}};new KX;function DB(r){return typeof r=="function"}function XX(r,e){if(DB(r)){const n=r();return n===void 0?e:n}return r===void 0?e:r}let ka=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return tv(this.#t)}get(){const e=Bl(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const t=Bl(this.#t);return t===void 0?e:t}set(e){return Yu(this.#t,e)}};function _v(r,e){let t=_e(null);const n=F(()=>XX(e,250));function a(...i){if(f(t))f(t).timeout&&clearTimeout(f(t).timeout);else{let s,o;const l=new Promise((c,u)=>{s=c,o=u});M(t,{timeout:null,runner:null,promise:l,resolve:s,reject:o},!0)}return f(t).runner=async()=>{if(!f(t))return;const s=f(t);M(t,null);try{s.resolve(await r.apply(this,i))}catch(o){s.reject(o)}},f(t).timeout=setTimeout(f(t).runner,f(n)),f(t).promise}return a.cancel=async()=>{(!f(t)||f(t).timeout===null)&&(await new Promise(i=>setTimeout(i,0)),!f(t)||f(t).timeout===null)||(clearTimeout(f(t).timeout),f(t).reject("Cancelled"),M(t,null))},a.runScheduledNow=async()=>{(!f(t)||!f(t).timeout)&&(await new Promise(i=>setTimeout(i,0)),!f(t)||!f(t).timeout)||(clearTimeout(f(t).timeout),f(t).timeout=null,await f(t).runner?.())},Object.defineProperty(a,"pending",{enumerable:!0,get(){return!!f(t)?.timeout}}),a}function QX(r,e){switch(r){case"post":Nt(e);break;case"pre":Gi(e);break}}function PB(r,e,t,n={}){const{lazy:a=!1}=n;let i=!a,s=Array.isArray(r)?[]:void 0;QX(e,()=>{const o=Array.isArray(r)?r.map(c=>c()):r();if(!i){i=!0,s=o;return}const l=Rn(()=>t(o,s));return s=o,l})}function nn(r,e,t){PB(r,"post",e,t)}function ZX(r,e,t){PB(r,"pre",e,t)}nn.pre=ZX;function OR(r){return DB(r)?r():r}class JX{#e={width:0,height:0};#t=!1;#r;#n;#i;#a=F(()=>(f(this.#o)?.(),this.getSize().width));#s=F(()=>(f(this.#o)?.(),this.getSize().height));#o=F(()=>{const e=OR(this.#n);if(e)return Wu(t=>{if(!this.#i)return;const n=new this.#i.ResizeObserver(a=>{this.#t=!0;for(const i of a){const s=this.#r.box==="content-box"?i.contentBoxSize:i.borderBoxSize,o=Array.isArray(s)?s:[s];this.#e.width=o.reduce((l,c)=>Math.max(l,c.inlineSize),0),this.#e.height=o.reduce((l,c)=>Math.max(l,c.blockSize),0)}t()});return n.observe(e),()=>{this.#t=!1,n.disconnect()}})});constructor(e,t={box:"border-box"}){this.#i=t.window??kB,this.#r=t,this.#n=e,this.#e={width:0,height:0}}calculateSize(){const e=OR(this.#n);if(!e||!this.#i)return;const t=e.offsetWidth,n=e.offsetHeight;if(this.#r.box==="border-box")return{width:t,height:n};const a=this.#i.getComputedStyle(e),i=parseFloat(a.paddingLeft)+parseFloat(a.paddingRight),s=parseFloat(a.paddingTop)+parseFloat(a.paddingBottom),o=parseFloat(a.borderLeftWidth)+parseFloat(a.borderRightWidth),l=parseFloat(a.borderTopWidth)+parseFloat(a.borderBottomWidth),c=t-i-o,u=n-s-l;return{width:c,height:u}}getSize(){return this.#t?this.#e:this.calculateSize()??this.#e}get current(){return f(this.#o)?.(),this.getSize()}get width(){return f(this.#a)}get height(){return f(this.#s)}}class M5{#e=_e(!1);constructor(){Nt(()=>(Rn(()=>M(this.#e,!0)),()=>{M(this.#e,!1)}))}get current(){return f(this.#e)}}class LB{#e=()=>{};#t=F(()=>this.#e());constructor(e,t){let n;t!==void 0&&(n=t),this.#e=()=>{try{return n}finally{n=e()}}}get current(){return f(this.#t)}}function Qc(r){Nt(()=>()=>{r()})}function FB(r){Nt(()=>Rn(()=>r()))}function D5(r,e){return setTimeout(e,r)}function eo(r){nl().then(r)}const eQ=1,tQ=9,rQ=11;function KC(r){return Jm(r)&&r.nodeType===eQ&&typeof r.nodeName=="string"}function BB(r){return Jm(r)&&r.nodeType===tQ}function nQ(r){return Jm(r)&&r.constructor?.name==="VisualViewport"}function aQ(r){return Jm(r)&&r.nodeType!==void 0}function UB(r){return aQ(r)&&r.nodeType===rQ&&"host"in r}function iQ(r,e){if(!r||!e||!KC(r)||!KC(e))return!1;const t=e.getRootNode?.();if(r===e||r.contains(e))return!0;if(t&&UB(t)){let n=e;for(;n;){if(r===n)return!0;n=n.parentNode||n.host}}return!1}function Qf(r){return BB(r)?r:nQ(r)?r.document:r?.ownerDocument??document}function bv(r){return UB(r)?bv(r.host):BB(r)?r.defaultView??window:KC(r)?r.ownerDocument?.defaultView??window:window}function sQ(r){let e=r.activeElement;for(;e?.shadowRoot;){const t=e.shadowRoot.activeElement;if(t===e)break;e=t}return e}class Zc{element;#e=F(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return f(this.#e)}set root(e){M(this.#e,e)}constructor(e){typeof e=="function"?this.element=Pe(e):this.element=e}getDocument=()=>Qf(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>sQ(this.root);isActiveElement=e=>e===this.getActiveElement();getElementById(e){return this.root.getElementById(e)}querySelector=e=>this.root?this.root.querySelector(e):null;querySelectorAll=e=>this.root?this.root.querySelectorAll(e):[];setTimeout=(e,t)=>this.getWindow().setTimeout(e,t);clearTimeout=e=>this.getWindow().clearTimeout(e)}function yn(r,e){return{[NW()]:t=>eg(r)?(r.current=t,Rn(()=>e?.(t)),()=>{"isConnected"in t&&t.isConnected||(r.current=null,e?.(null))}):(r(t),Rn(()=>e?.(t)),()=>{"isConnected"in t&&t.isConnected||(r(null),e?.(null))})}}function Dc(r){return r?"true":"false"}function oQ(r){return r?"true":void 0}function Di(r){return r?"":void 0}function XC(r){return r?!0:void 0}function sl(r){return r?"open":"closed"}function lQ(r){return r?"checked":"unchecked"}function $B(r,e){return e?"mixed":r?"true":"false"}class cQ{#e;#t;attrs;constructor(e){this.#e=e.getVariant?e.getVariant():null,this.#t=this.#e?`data-${this.#e}-`:`data-${e.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(t=>[t,this.getAttr(t)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${this.#t}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}}function Hl(r){const e=new cQ(r);return{...e.attrs,selector:e.selector,getAttr:e.getAttr}}const Rl="ArrowDown",tg="ArrowLeft",rg="ArrowRight",xl="ArrowUp",vv="End",$l="Enter",uQ="Escape",yv="Home",P5="PageDown",L5="PageUp",no=" ",QC="Tab";function dQ(r){return window.getComputedStyle(r).getPropertyValue("direction")}function hQ(r="ltr",e="horizontal"){return{horizontal:r==="rtl"?tg:rg,vertical:Rl}[e]}function fQ(r="ltr",e="horizontal"){return{horizontal:r==="rtl"?rg:tg,vertical:xl}[e]}function pQ(r="ltr",e="horizontal"){return["ltr","rtl"].includes(r)||(r="ltr"),["horizontal","vertical"].includes(e)||(e="horizontal"),{nextKey:hQ(r,e),prevKey:fQ(r,e)}}const GB=typeof document<"u",ZC=mQ();function mQ(){return GB&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Io(r){return r instanceof HTMLElement}function xc(r){return r instanceof Element}function zB(r){return r instanceof Element||r instanceof SVGElement}function Y_(r){return r.pointerType==="touch"}function gQ(r){return r.matches(":focus-visible")}function _Q(r){return r!==null}function bQ(r){return r instanceof HTMLInputElement&&"select"in r}class vQ{#e;#t=ih(null);constructor(e){this.#e=e}getCandidateNodes(){return this.#e.rootNode.current?this.#e.candidateSelector?Array.from(this.#e.rootNode.current.querySelectorAll(this.#e.candidateSelector)):this.#e.candidateAttr?Array.from(this.#e.rootNode.current.querySelectorAll(`[${this.#e.candidateAttr}]:not([data-disabled])`)):[]:[]}focusFirstCandidate(){const e=this.getCandidateNodes();e.length&&e[0]?.focus()}handleKeydown(e,t,n=!1){const a=this.#e.rootNode.current;if(!a||!e)return;const i=this.getCandidateNodes();if(!i.length)return;const s=i.indexOf(e),o=dQ(a),{nextKey:l,prevKey:c}=pQ(o,this.#e.orientation.current),u=this.#e.loop.current,d={[l]:s+1,[c]:s-1,[yv]:0,[vv]:i.length-1};if(n){const m=l===Rl?rg:Rl,g=c===xl?tg:xl;d[m]=s+1,d[g]=s-1}let h=d[t.key];if(h===void 0)return;t.preventDefault(),h<0&&u?h=i.length-1:h===i.length&&u&&(h=0);const p=i[h];if(p)return p.focus(),this.#t.current=p.id,this.#e.onCandidateFocus?.(p),p}getTabIndex(e){const t=this.getCandidateNodes(),n=this.#t.current!==null;return e&&!n&&t[0]===e?(this.#t.current=e.id,0):e?.id===this.#t.current?0:-1}setCurrentTabStopId(e){this.#t.current=e}focusCurrentTabStop(){const e=this.#t.current;if(!e)return;const t=this.#e.rootNode.current?.querySelector(`#${e}`);!t||!Io(t)||t.focus()}}class yQ{#e;#t=null;constructor(e){this.#e=e,Qc(()=>this.#r())}#r(){this.#t&&(window.cancelAnimationFrame(this.#t),this.#t=null)}run(e){this.#r();const t=this.#e.ref.current;if(t){if(typeof t.getAnimations!="function"){this.#n(e);return}this.#t=window.requestAnimationFrame(()=>{const n=t.getAnimations();if(n.length===0){this.#n(e);return}Promise.allSettled(n.map(a=>a.finished)).then(()=>{this.#n(e)})})}}#n(e){const t=()=>{e()};this.#e.afterTick?eo(t):t()}}class ku{#e;#t;#r;#n=_e(!1);constructor(e){this.#e=e,M(this.#n,e.open.current,!0),this.#t=e.enabled??!0,this.#r=new yQ({ref:this.#e.ref,afterTick:this.#e.open}),nn(()=>this.#e.open.current,t=>{t&&M(this.#n,!0),this.#t&&this.#r.run(()=>{t===this.#e.open.current&&(this.#e.open.current||M(this.#n,!1),this.#e.onComplete?.())})})}get shouldRender(){return f(this.#n)}}function xr(){}function Nn(r,e){return`bits-${r}`}const SQ=Hl({component:"dialog",parts:["content","trigger","overlay","title","description","close","cancel","action"]}),Pc=new ka("Dialog.Root | AlertDialog.Root");class Sv{static create(e){const t=Pc.getOr(null);return Pc.set(new Sv(e,t))}opts;#e=_e(null);get triggerNode(){return f(this.#e)}set triggerNode(e){M(this.#e,e,!0)}#t=_e(null);get contentNode(){return f(this.#t)}set contentNode(e){M(this.#t,e,!0)}#r=_e(null);get overlayNode(){return f(this.#r)}set overlayNode(e){M(this.#r,e,!0)}#n=_e(null);get descriptionNode(){return f(this.#n)}set descriptionNode(e){M(this.#n,e,!0)}#i=_e(void 0);get contentId(){return f(this.#i)}set contentId(e){M(this.#i,e,!0)}#a=_e(void 0);get titleId(){return f(this.#a)}set titleId(e){M(this.#a,e,!0)}#s=_e(void 0);get triggerId(){return f(this.#s)}set triggerId(e){M(this.#s,e,!0)}#o=_e(void 0);get descriptionId(){return f(this.#o)}set descriptionId(e){M(this.#o,e,!0)}#l=_e(null);get cancelNode(){return f(this.#l)}set cancelNode(e){M(this.#l,e,!0)}#c=_e(0);get nestedOpenCount(){return f(this.#c)}set nestedOpenCount(e){M(this.#c,e,!0)}depth;parent;contentPresence;overlayPresence;constructor(e,t){this.opts=e,this.parent=t,this.depth=t?t.depth+1:0,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.contentPresence=new ku({ref:Pe(()=>this.contentNode),open:this.opts.open,enabled:!0,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new ku({ref:Pe(()=>this.overlayNode),open:this.opts.open,enabled:!0}),nn(()=>this.opts.open.current,n=>{this.parent&&(n?this.parent.incrementNested():this.parent.decrementNested())},{lazy:!0}),Qc(()=>{this.opts.open.current&&this.parent?.decrementNested()})}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}getBitsAttr=e=>SQ.getAttr(e,this.opts.variant.current);incrementNested(){this.nestedOpenCount++,this.parent?.incrementNested()}decrementNested(){this.nestedOpenCount!==0&&(this.nestedOpenCount--,this.parent?.decrementNested())}#d=F(()=>({"data-state":sl(this.opts.open.current)}));get sharedProps(){return f(this.#d)}set sharedProps(e){M(this.#d,e)}}class F5{static create(e){return new F5(e,Pc.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=yn(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){this.opts.disabled.current||e.button>0||this.root.handleClose()}onkeydown(e){this.opts.disabled.current||(e.key===no||e.key===$l)&&(e.preventDefault(),this.root.handleClose())}#e=F(()=>({id:this.opts.id.current,[this.root.getBitsAttr(this.opts.variant.current)]:"",onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return f(this.#e)}set props(e){M(this.#e,e)}}class B5{static create(e){return new B5(e,Pc.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=yn(this.opts.ref)}#e=F(()=>({id:this.opts.id.current,[this.root.getBitsAttr("action")]:"",...this.root.sharedProps,...this.attachment}));get props(){return f(this.#e)}set props(e){M(this.#e,e)}}class U5{static create(e){return new U5(e,Pc.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.root.titleId=this.opts.id.current,this.attachment=yn(this.opts.ref),nn.pre(()=>this.opts.id.current,n=>{this.root.titleId=n})}#e=F(()=>({id:this.opts.id.current,role:"heading","aria-level":this.opts.level.current,[this.root.getBitsAttr("title")]:"",...this.root.sharedProps,...this.attachment}));get props(){return f(this.#e)}set props(e){M(this.#e,e)}}class $5{static create(e){return new $5(e,Pc.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.root.descriptionId=this.opts.id.current,this.attachment=yn(this.opts.ref,n=>{this.root.descriptionNode=n}),nn.pre(()=>this.opts.id.current,n=>{this.root.descriptionId=n})}#e=F(()=>({id:this.opts.id.current,[this.root.getBitsAttr("description")]:"",...this.root.sharedProps,...this.attachment}));get props(){return f(this.#e)}set props(e){M(this.#e,e)}}class Ev{static create(e){return new Ev(e,Pc.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=yn(this.opts.ref,n=>{this.root.contentNode=n,this.root.contentId=n?.id})}#e=F(()=>({open:this.root.opts.open.current}));get snippetProps(){return f(this.#e)}set snippetProps(e){M(this.#e,e)}#t=F(()=>({id:this.opts.id.current,role:this.root.opts.variant.current==="alert-dialog"?"alertdialog":"dialog","aria-modal":"true","aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.getBitsAttr("content")]:"",style:{pointerEvents:"auto",outline:this.root.opts.variant.current==="alert-dialog"?"none":void 0,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount,contain:"layout style paint"},tabindex:this.root.opts.variant.current==="alert-dialog"?-1:void 0,"data-nested-open":Di(this.root.nestedOpenCount>0),"data-nested":Di(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return f(this.#t)}set props(e){M(this.#t,e)}get shouldRender(){return this.root.contentPresence.shouldRender}}class G5{static create(e){return new G5(e,Pc.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=yn(this.opts.ref,n=>this.root.overlayNode=n)}#e=F(()=>({open:this.root.opts.open.current}));get snippetProps(){return f(this.#e)}set snippetProps(e){M(this.#e,e)}#t=F(()=>({id:this.opts.id.current,[this.root.getBitsAttr("overlay")]:"",style:{pointerEvents:"auto","--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount},"data-nested-open":Di(this.root.nestedOpenCount>0),"data-nested":Di(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return f(this.#t)}set props(e){M(this.#t,e)}get shouldRender(){return this.root.overlayPresence.shouldRender}}class z5{static create(e){return new z5(e,Pc.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=yn(this.opts.ref,n=>this.root.cancelNode=n),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){this.opts.disabled.current||e.button>0||this.root.handleClose()}onkeydown(e){this.opts.disabled.current||(e.key===no||e.key===$l)&&(e.preventDefault(),this.root.handleClose())}#e=F(()=>({id:this.opts.id.current,[this.root.getBitsAttr("cancel")]:"",onclick:this.onclick,onkeydown:this.onkeydown,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return f(this.#e)}set props(e){M(this.#e,e)}}function EQ(r,e){Ee(e,!0);let t=Y(e,"open",15,!1),n=Y(e,"onOpenChange",3,xr),a=Y(e,"onOpenChangeComplete",3,xr);Sv.create({variant:Pe(()=>"alert-dialog"),open:Pe(()=>t(),o=>{t(o),n()(o)}),onOpenChangeComplete:Pe(()=>a())});var i=se(),s=L(i);ke(s,()=>e.children??$e),T(r,i),we()}var wQ=G("
");function q5(r,e){const t=On();Ee(e,!0);let n=Y(e,"id",19,()=>Nn(t)),a=Y(e,"ref",15,null),i=Y(e,"level",3,2),s=Ye(e,["$$slots","$$events","$$legacy","id","ref","child","children","level"]);const o=U5.create({id:Pe(()=>n()),level:Pe(()=>i()),ref:Pe(()=>a(),p=>a(p))}),l=F(()=>vr(s,o.props));var c=se(),u=L(c);{var d=p=>{var m=se(),g=L(m);ke(g,()=>e.child,()=>({props:f(l)})),T(p,m)},h=p=>{var m=wQ();zt(m,()=>({...f(l)}));var g=j(m);ke(g,()=>e.children??$e),V(m),T(p,m)};le(u,p=>{e.child?p(d):p(h,!1)})}T(r,c),we()}var TQ=G("");function CQ(r,e){const t=On();Ee(e,!0);let n=Y(e,"id",19,()=>Nn(t)),a=Y(e,"ref",15,null),i=Ye(e,["$$slots","$$events","$$legacy","children","child","id","ref"]);const s=B5.create({id:Pe(()=>n()),ref:Pe(()=>a(),h=>a(h))}),o=F(()=>vr(i,s.props));var l=se(),c=L(l);{var u=h=>{var p=se(),m=L(p);ke(m,()=>e.child,()=>({props:f(o)})),T(h,p)},d=h=>{var p=TQ();zt(p,()=>({...f(o)}));var m=j(p);ke(m,()=>e.children??$e),V(p),T(h,p)};le(c,h=>{e.child?h(u):h(d,!1)})}T(r,l),we()}var AQ=G("");function xQ(r,e){const t=On();Ee(e,!0);let n=Y(e,"id",19,()=>Nn(t)),a=Y(e,"ref",15,null),i=Y(e,"disabled",3,!1),s=Ye(e,["$$slots","$$events","$$legacy","id","ref","children","child","disabled"]);const o=z5.create({id:Pe(()=>n()),ref:Pe(()=>a(),p=>a(p)),disabled:Pe(()=>!!i())}),l=F(()=>vr(s,o.props));var c=se(),u=L(c);{var d=p=>{var m=se(),g=L(m);ke(g,()=>e.child,()=>({props:f(l)})),T(p,m)},h=p=>{var m=AQ();zt(m,()=>({...f(l)}));var g=j(m);ke(g,()=>e.children??$e),V(m),T(p,m)};le(u,p=>{e.child?p(d):p(h,!1)})}T(r,c),we()}function RQ(r,e){var t=se(),n=L(t);GW(n,()=>e.children,a=>{var i=se(),s=L(i);ke(s,()=>e.children??$e),T(a,i)}),T(r,t)}const OQ=new ka("BitsConfig");function NQ(){const r=new IQ(null,{});return OQ.getOr(r).opts}class IQ{opts;constructor(e,t){const n=kQ(e,t);this.opts={defaultPortalTo:n(a=>a.defaultPortalTo),defaultLocale:n(a=>a.defaultLocale)}}}function kQ(r,e){return t=>Pe(()=>{const a=t(e)?.current;if(a!==void 0)return a;if(r!==null)return t(r.opts)?.current})}function MQ(r,e){return t=>{const n=NQ();return Pe(()=>{const a=t();if(a!==void 0)return a;const i=r(n).current;return i!==void 0?i:e})}}const DQ=MQ(r=>r.defaultPortalTo,"body");function Jc(r,e){Ee(e,!0);const t=DQ(()=>e.to),n=ZL();let a=F(i);function i(){if(!GB||e.disabled)return null;let d=null;return typeof t.current=="string"?d=document.querySelector(t.current):d=t.current,d}let s;function o(){s&&(o5(s),s=null)}nn([()=>f(a),()=>e.disabled],([d,h])=>{if(!d||h){o();return}return s=ov(RQ,{target:d,props:{children:e.children},context:n}),()=>{o()}});var l=se(),c=L(l);{var u=d=>{var h=se(),p=L(h);ke(p,()=>e.children??$e),T(d,h)};le(c,d=>{e.disabled&&d(u)})}T(r,l),we()}class PQ{eventName;options;constructor(e,t={bubbles:!0,cancelable:!0}){this.eventName=e,this.options=t}createEvent(e){return new CustomEvent(this.eventName,{...this.options,detail:e})}dispatch(e,t){const n=this.createEvent(t);return e.dispatchEvent(n),n}listen(e,t,n){const a=i=>{t(i)};return jr(e,this.eventName,a,n)}}function NR(r,e=500){let t=null;const n=(...a)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{r(...a)},e)};return n.destroy=()=>{t!==null&&(clearTimeout(t),t=null)},n}function qB(r,e){return r===e||r.contains(e)}function HB(r){return r?.ownerDocument??document}function LQ(r,e){const{clientX:t,clientY:n}=r,a=e.getBoundingClientRect();return ta.right||na.bottom}const JC=[$l,no],FQ=[Rl,L5,yv],VB=[xl,P5,vv],BQ=[...FQ,...VB],UQ={ltr:[...JC,rg],rtl:[...JC,tg]},$Q={ltr:[tg],rtl:[rg]};function W_(r){return r.pointerType==="mouse"}function GQ(r,{select:e=!1}={}){if(!r||!r.focus)return;const t=Qf(r);if(t.activeElement===r)return;const n=t.activeElement;r.focus({preventScroll:!0}),r!==n&&bQ(r)&&e&&r.select()}function zQ(r,{select:e=!1}={},t){const n=t();for(const a of r)if(GQ(a,{select:e}),t()!==n)return!0}let yp=_e(!1);class _u{static _refs=0;static _cleanup;constructor(){Nt(()=>(_u._refs===0&&(_u._cleanup=jm(()=>{const e=[],t=a=>{M(yp,!1)},n=a=>{M(yp,!0)};return e.push(jr(document,"pointerdown",t,{capture:!0}),jr(document,"pointermove",t,{capture:!0}),jr(document,"keydown",n,{capture:!0})),Ac(...e)})),_u._refs++,()=>{_u._refs--,_u._refs===0&&(M(yp,!1),_u._cleanup?.())}))}get current(){return f(yp)}set current(e){M(yp,e,!0)}}var YB=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],j_=YB.join(","),WB=typeof Element>"u",Xd=WB?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,K_=!WB&&Element.prototype.getRootNode?function(r){var e;return r==null||(e=r.getRootNode)===null||e===void 0?void 0:e.call(r)}:function(r){return r?.ownerDocument},X_=function r(e,t){var n;t===void 0&&(t=!0);var a=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),i=a===""||a==="true",s=i||t&&e&&r(e.parentNode);return s},qQ=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},jB=function(e,t,n){if(X_(e))return[];var a=Array.prototype.slice.apply(e.querySelectorAll(j_));return t&&Xd.call(e,j_)&&a.unshift(e),a=a.filter(n),a},KB=function r(e,t,n){for(var a=[],i=Array.from(e);i.length;){var s=i.shift();if(!X_(s,!1))if(s.tagName==="SLOT"){var o=s.assignedElements(),l=o.length?o:s.children,c=r(l,!0,n);n.flatten?a.push.apply(a,c):a.push({scopeParent:s,candidates:c})}else{var u=Xd.call(s,j_);u&&n.filter(s)&&(t||!e.includes(s))&&a.push(s);var d=s.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(s),h=!X_(d,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(s));if(d&&h){var p=r(d===!0?s.children:d.children,!0,n);n.flatten?a.push.apply(a,p):a.push({scopeParent:s,candidates:p})}else i.unshift.apply(i,s.children)}}return a},XB=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},QB=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||qQ(e))&&!XB(e)?0:e.tabIndex},HQ=function(e,t){var n=QB(e);return n<0&&t&&!XB(e)?0:n},VQ=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},ZB=function(e){return e.tagName==="INPUT"},YQ=function(e){return ZB(e)&&e.type==="hidden"},WQ=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},jQ=function(e,t){for(var n=0;nsummary:first-of-type"),s=i?e.parentElement:e;if(Xd.call(s,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof a=="function"){for(var o=e;e;){var l=e.parentElement,c=K_(e);if(l&&!l.shadowRoot&&a(l)===!0)return IR(e);e.assignedSlot?e=e.assignedSlot:!l&&c!==e.ownerDocument?e=c.host:e=l}e=o}if(ZQ(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return IR(e);return!1},eZ=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var n=0;n=0)},rZ=function r(e){var t=[],n=[];return e.forEach(function(a,i){var s=!!a.scopeParent,o=s?a.scopeParent:a,l=HQ(o,s),c=s?r(a.candidates):o;l===0?s?t.push.apply(t,c):t.push(o):n.push({documentOrder:i,tabIndex:l,item:a,isScope:s,content:c})}),n.sort(VQ).reduce(function(a,i){return i.isScope?a.push.apply(a,i.content):a.push(i.content),a},[]).concat(t)},JB=function(e,t){t=t||{};var n;return t.getShadowRoot?n=KB([e],t.includeContainer,{filter:e3.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:tZ}):n=jB(e,t.includeContainer,e3.bind(null,t)),rZ(n)},eU=function(e,t){t=t||{};var n;return t.getShadowRoot?n=KB([e],t.includeContainer,{filter:Q_.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):n=jB(e,t.includeContainer,Q_.bind(null,t)),n},wv=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return Xd.call(e,j_)===!1?!1:e3(t,e)},nZ=YB.concat("iframe").join(","),tU=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return Xd.call(e,nZ)===!1?!1:Q_(t,e)};function nm(){return{getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"}}function aZ(r,e){if(!wv(r,nm()))return iZ(r,e);const t=Qf(r),n=JB(t.body,nm());e==="prev"&&n.reverse();const a=n.indexOf(r);return a===-1?t.body:n.slice(a+1)[0]}function iZ(r,e){const t=Qf(r);if(!tU(r,nm()))return t.body;const n=eU(t.body,nm());e==="prev"&&n.reverse();const a=n.indexOf(r);return a===-1?t.body:n.slice(a+1).find(s=>wv(s,nm()))??t.body}function sZ(r,e,t=!0){if(!(r.length===0||e<0||e>=r.length))return r.length===1&&e===0?r[0]:e===r.length-1?t?r[0]:void 0:r[e+1]}function oZ(r,e,t=!0){if(!(r.length===0||e<0||e>=r.length))return r.length===1&&e===0?r[0]:e===0?t?r[r.length-1]:void 0:r[e-1]}function lZ(r,e,t,n=!0){if(r.length===0||e<0||e>=r.length)return;let a=e+t;return n?a=(a%r.length+r.length)%r.length:a=Math.max(0,Math.min(a,r.length-1)),r[a]}function cZ(r,e,t,n=!0){if(r.length===0||e<0||e>=r.length)return;let a=e-t;return n?a=(a%r.length+r.length)%r.length:a=Math.max(0,Math.min(a,r.length-1)),r[a]}function H5(r,e,t){const n=e.toLowerCase();if(n.endsWith(" ")){const d=n.slice(0,-1);if(r.filter(g=>g.toLowerCase().startsWith(d)).length<=1)return H5(r,d,t);const p=t?.toLowerCase();if(p&&p.startsWith(d)&&p.charAt(d.length)===" "&&e.trim()===d)return t;const m=r.filter(g=>g.toLowerCase().startsWith(n));if(m.length>0){const g=t?r.indexOf(t):-1;return kR(m,Math.max(g,0)).find(v=>v!==t)||t}}const i=e.length>1&&Array.from(e).every(d=>d===e[0])?e[0]:e,s=i.toLowerCase(),o=t?r.indexOf(t):-1;let l=kR(r,Math.max(o,0));i.length===1&&(l=l.filter(d=>d!==t));const u=l.find(d=>d?.toLowerCase().startsWith(s));return u!==t?u:void 0}function kR(r,e){return r.map((t,n)=>r[(e+n)%r.length])}const uZ={afterMs:1e4,onChange:xr};function V5(r,e){const{afterMs:t,onChange:n,getWindow:a}={...uZ,...e};let i=null,s=_e(Sr(r));function o(){return a().setTimeout(()=>{M(s,r,!0),n?.(r)},t)}return Nt(()=>()=>{i&&a().clearTimeout(i)}),Pe(()=>f(s),l=>{M(s,l,!0),n?.(l),i&&a().clearTimeout(i),i=o()})}class rU{#e;#t;#r=F(()=>this.#e.onMatch?this.#e.onMatch:e=>e.focus());#n=F(()=>this.#e.getCurrentItem?this.#e.getCurrentItem:this.#e.getActiveElement);constructor(e){this.#e=e,this.#t=V5("",{afterMs:1e3,getWindow:e.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(e,t){if(!t.length)return;this.#t.current=this.#t.current+e;const n=f(this.#n)(),a=t.find(l=>l===n)?.textContent?.trim()??"",i=t.map(l=>l.textContent?.trim()??""),s=H5(i,this.#t.current,a),o=t.find(l=>l.textContent?.trim()===s);return o&&f(this.#r)(o),o}resetTypeahead(){this.#t.current=""}get search(){return this.#t.current}}class dZ{#e;#t;#r;#n=_e(null);constructor(e){this.#e=e,this.#t=F(()=>this.#e.enabled()),this.#r=V5(!1,{afterMs:e.transitTimeout??300,onChange:t=>{f(this.#t)&&this.#e.setIsPointerInTransit?.(t)},getWindow:()=>bv(this.#e.triggerNode())}),nn([e.triggerNode,e.contentNode,e.enabled],([t,n,a])=>{if(!t||!n||!a)return;const i=o=>{this.#a(o,n)},s=o=>{this.#a(o,t)};return Ac(jr(t,"pointerleave",i),jr(n,"pointerleave",s))}),nn(()=>f(this.#n),()=>{const t=a=>{if(!f(this.#n))return;const i=a.target;if(!xc(i))return;const s={x:a.clientX,y:a.clientY},o=e.triggerNode()?.contains(i)||e.contentNode()?.contains(i),l=!mZ(s,f(this.#n));o?this.#i():l&&(this.#i(),e.onPointerExit())},n=Qf(e.triggerNode()??e.contentNode());if(n)return jr(n,"pointermove",t)})}#i(){M(this.#n,null),this.#r.current=!1}#a(e,t){const n=e.currentTarget;if(!Io(n))return;const a={x:e.clientX,y:e.clientY},i=hZ(a,n.getBoundingClientRect()),s=fZ(a,i),o=pZ(t.getBoundingClientRect()),l=gZ([...s,...o]);M(this.#n,l,!0),this.#r.current=!0}}function hZ(r,e){const t=Math.abs(e.top-r.y),n=Math.abs(e.bottom-r.y),a=Math.abs(e.right-r.x),i=Math.abs(e.left-r.x);switch(Math.min(t,n,a,i)){case i:return"left";case a:return"right";case t:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function fZ(r,e,t=5){const n=t*1.5;switch(e){case"top":return[{x:r.x-t,y:r.y+t},{x:r.x,y:r.y-n},{x:r.x+t,y:r.y+t}];case"bottom":return[{x:r.x-t,y:r.y-t},{x:r.x,y:r.y+n},{x:r.x+t,y:r.y-t}];case"left":return[{x:r.x+t,y:r.y-t},{x:r.x-n,y:r.y},{x:r.x+t,y:r.y+t}];case"right":return[{x:r.x-t,y:r.y-t},{x:r.x+n,y:r.y},{x:r.x-t,y:r.y+t}]}}function pZ(r){const{top:e,right:t,bottom:n,left:a}=r;return[{x:a,y:e},{x:t,y:e},{x:t,y:n},{x:a,y:n}]}function mZ(r,e){const{x:t,y:n}=r;let a=!1;for(let i=0,s=e.length-1;in!=u>n&&t<(c-o)*(n-l)/(u-l)+o&&(a=!a)}return a}function gZ(r){const e=r.slice();return e.sort((t,n)=>t.xn.x?1:t.yn.y?1:0),_Z(e)}function _Z(r){if(r.length<=1)return r.slice();const e=[];for(let n=0;n=2;){const i=e[e.length-1],s=e[e.length-2];if((i.x-s.x)*(a.y-s.y)>=(i.y-s.y)*(a.x-s.x))e.pop();else break}e.push(a)}e.pop();const t=[];for(let n=r.length-1;n>=0;n--){const a=r[n];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(a.y-s.y)>=(i.y-s.y)*(a.x-s.x))t.pop();else break}t.push(a)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}const bZ="data-context-menu-trigger",vZ="data-context-menu-content",nU=new ka("Menu.Root"),xf=new ka("Menu.Root | Menu.Sub"),Y5=new ka("Menu.Content"),W5=new PQ("bitsmenuopen",{bubbles:!1,cancelable:!0}),yZ=Hl({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]});class j5{static create(e){const t=new j5(e);return nU.set(t)}opts;isUsingKeyboard=new _u;#e=_e(!1);get ignoreCloseAutoFocus(){return f(this.#e)}set ignoreCloseAutoFocus(e){M(this.#e,e,!0)}#t=_e(!1);get isPointerInTransit(){return f(this.#t)}set isPointerInTransit(e){M(this.#t,e,!0)}constructor(e){this.opts=e}getBitsAttr=e=>yZ.getAttr(e,this.opts.variant.current)}class Tv{static create(e,t){return xf.set(new Tv(e,t,null))}opts;root;parentMenu;contentId=Pe(()=>"");#e=_e(null);get contentNode(){return f(this.#e)}set contentNode(e){M(this.#e,e,!0)}contentPresence;#t=_e(null);get triggerNode(){return f(this.#t)}set triggerNode(e){M(this.#t,e,!0)}constructor(e,t,n){this.opts=e,this.root=t,this.parentMenu=n,this.contentPresence=new ku({ref:Pe(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),n&&nn(()=>n.opts.open.current,()=>{n.opts.open.current||(this.opts.open.current=!1)})}toggleOpen(){this.opts.open.current=!this.opts.open.current}onOpen(){this.opts.open.current=!0}onClose(){this.opts.open.current=!1}}class Cv{static create(e){return Y5.set(new Cv(e,xf.get()))}opts;parentMenu;rovingFocusGroup;domContext;attachment;#e=_e("");get search(){return f(this.#e)}set search(e){M(this.#e,e,!0)}#t=0;#r;#n=_e(!1);get mounted(){return f(this.#n)}set mounted(e){M(this.#n,e,!0)}#i;constructor(e,t){this.opts=e,this.parentMenu=t,this.domContext=new Zc(e.ref),this.attachment=yn(this.opts.ref,n=>{this.parentMenu.contentNode!==n&&(this.parentMenu.contentNode=n)}),t.contentId=e.id,this.#i=e.isSub??!1,this.onkeydown=this.onkeydown.bind(this),this.onblur=this.onblur.bind(this),this.onfocus=this.onfocus.bind(this),this.handleInteractOutside=this.handleInteractOutside.bind(this),new dZ({contentNode:()=>this.parentMenu.contentNode,triggerNode:()=>this.parentMenu.triggerNode,enabled:()=>this.parentMenu.opts.open.current&&!!this.parentMenu.triggerNode?.hasAttribute(this.parentMenu.root.getBitsAttr("sub-trigger")),onPointerExit:()=>{this.parentMenu.opts.open.current=!1},setIsPointerInTransit:n=>{this.parentMenu.root.isPointerInTransit=n}}),this.#r=new rU({getActiveElement:()=>this.domContext.getActiveElement(),getWindow:()=>this.domContext.getWindow()}).handleTypeaheadSearch,this.rovingFocusGroup=new vQ({rootNode:Pe(()=>this.parentMenu.contentNode),candidateAttr:this.parentMenu.root.getBitsAttr("item"),loop:this.opts.loop,orientation:Pe(()=>"vertical")}),nn(()=>this.parentMenu.contentNode,n=>{if(!n)return;const a=()=>{eo(()=>{this.parentMenu.root.isUsingKeyboard.current&&this.rovingFocusGroup.focusFirstCandidate()})};return W5.listen(n,a)}),Nt(()=>{this.parentMenu.opts.open.current||this.domContext.getWindow().clearTimeout(this.#t)})}#a(){const e=this.parentMenu.contentNode;return e?Array.from(e.querySelectorAll(`[${this.parentMenu.root.getBitsAttr("item")}]:not([data-disabled])`)):[]}#s(){return this.parentMenu.root.isPointerInTransit}onCloseAutoFocus=e=>{this.opts.onCloseAutoFocus.current?.(e),!(e.defaultPrevented||this.#i)&&this.parentMenu.triggerNode&&wv(this.parentMenu.triggerNode)&&(e.preventDefault(),this.parentMenu.triggerNode.focus())};handleTabKeyDown(e){let t=this.parentMenu;for(;t.parentMenu!==null;)t=t.parentMenu;if(!t.triggerNode)return;e.preventDefault();const n=aZ(t.triggerNode,e.shiftKey?"prev":"next");n?(this.parentMenu.root.ignoreCloseAutoFocus=!0,t.onClose(),eo(()=>{n.focus(),eo(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})})):this.domContext.getDocument().body.focus()}onkeydown(e){if(e.defaultPrevented)return;if(e.key===QC){this.handleTabKeyDown(e);return}const t=e.target,n=e.currentTarget;if(!Io(t)||!Io(n))return;const a=t.closest(`[${this.parentMenu.root.getBitsAttr("content")}]`)?.id===this.parentMenu.contentId.current,i=e.ctrlKey||e.altKey||e.metaKey,s=e.key.length===1;if(this.rovingFocusGroup.handleKeydown(t,e)||e.code==="Space")return;const l=this.#a();a&&!i&&s&&this.#r(e.key,l),e.target?.id===this.parentMenu.contentId.current&&BQ.includes(e.key)&&(e.preventDefault(),VB.includes(e.key)&&l.reverse(),zQ(l,{select:!1},()=>this.domContext.getActiveElement()))}onblur(e){xc(e.currentTarget)&&xc(e.target)&&(e.currentTarget.contains?.(e.target)||(this.domContext.getWindow().clearTimeout(this.#t),this.search=""))}onfocus(e){this.parentMenu.root.isUsingKeyboard.current&&eo(()=>this.rovingFocusGroup.focusFirstCandidate())}onItemEnter(){return this.#s()}onItemLeave(e){if(e.currentTarget.hasAttribute(this.parentMenu.root.getBitsAttr("sub-trigger"))||this.#s()||this.parentMenu.root.isUsingKeyboard.current)return;this.parentMenu.contentNode?.focus(),this.rovingFocusGroup.setCurrentTabStopId("")}onTriggerLeave(){return!!this.#s()}handleInteractOutside(e){if(!zB(e.target))return;const t=this.parentMenu.triggerNode?.id;if(e.target.id===t){e.preventDefault();return}e.target.closest(`#${t}`)&&e.preventDefault()}get shouldRender(){return this.parentMenu.contentPresence.shouldRender}#o=F(()=>({open:this.parentMenu.opts.open.current}));get snippetProps(){return f(this.#o)}set snippetProps(e){M(this.#o,e)}#l=F(()=>({id:this.opts.id.current,role:"menu","aria-orientation":"vertical",[this.parentMenu.root.getBitsAttr("content")]:"","data-state":sl(this.parentMenu.opts.open.current),onkeydown:this.onkeydown,onblur:this.onblur,onfocus:this.onfocus,dir:this.parentMenu.root.opts.dir.current,style:{pointerEvents:"auto",contain:"layout style paint"},...this.attachment}));get props(){return f(this.#l)}set props(e){M(this.#l,e)}popperProps={onCloseAutoFocus:e=>this.onCloseAutoFocus(e)}}class aU{opts;content;attachment;#e=_e(!1);constructor(e,t){this.opts=e,this.content=t,this.attachment=yn(this.opts.ref),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this),this.onfocus=this.onfocus.bind(this),this.onblur=this.onblur.bind(this)}onpointermove(e){if(!e.defaultPrevented&&W_(e))if(this.opts.disabled.current)this.content.onItemLeave(e);else{if(this.content.onItemEnter())return;const n=e.currentTarget;if(!Io(n))return;n.focus()}}onpointerleave(e){e.defaultPrevented||W_(e)&&this.content.onItemLeave(e)}onfocus(e){eo(()=>{e.defaultPrevented||this.opts.disabled.current||M(this.#e,!0)})}onblur(e){eo(()=>{e.defaultPrevented||M(this.#e,!1)})}#t=F(()=>({id:this.opts.id.current,tabindex:-1,role:"menuitem","aria-disabled":Dc(this.opts.disabled.current),"data-disabled":Di(this.opts.disabled.current),"data-highlighted":f(this.#e)?"":void 0,[this.content.parentMenu.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,onfocus:this.onfocus,onblur:this.onblur,...this.attachment}));get props(){return f(this.#t)}set props(e){M(this.#t,e)}}class K5{static create(e){const t=new aU(e,Y5.get());return new K5(e,t)}opts;item;root;#e=!1;constructor(e,t){this.opts=e,this.item=t,this.root=t.content.parentMenu.root,this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this)}#t(){if(this.item.opts.disabled.current)return;const e=new CustomEvent("menuitemselect",{bubbles:!0,cancelable:!0});if(this.opts.onSelect.current(e),e.defaultPrevented){this.item.content.parentMenu.root.isUsingKeyboard.current=!1;return}this.opts.closeOnSelect.current&&this.item.content.parentMenu.root.opts.onClose()}onkeydown(e){const t=this.item.content.search!=="";if(!(this.item.opts.disabled.current||t&&e.key===no)&&JC.includes(e.key)){if(!Io(e.currentTarget))return;e.currentTarget.click(),e.preventDefault()}}onclick(e){this.item.opts.disabled.current||this.#t()}onpointerup(e){if(!e.defaultPrevented&&!this.#e){if(!Io(e.currentTarget))return;e.currentTarget?.click()}}onpointerdown(e){this.#e=!0}#r=F(()=>vr(this.item.props,{onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown}));get props(){return f(this.#r)}set props(e){M(this.#r,e)}}class X5{static create(e){const t=Y5.get(),n=new aU(e,t),a=xf.get();return new X5(e,n,t,a)}opts;item;content;submenu;attachment;#e=null;constructor(e,t,n,a){this.opts=e,this.item=t,this.content=n,this.submenu=a,this.attachment=yn(this.opts.ref,i=>this.submenu.triggerNode=i),this.onpointerleave=this.onpointerleave.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),Qc(()=>{this.#t()})}#t(){this.#e!==null&&(this.content.domContext.getWindow().clearTimeout(this.#e),this.#e=null)}onpointermove(e){W_(e)&&!this.item.opts.disabled.current&&!this.submenu.opts.open.current&&!this.#e&&!this.content.parentMenu.root.isPointerInTransit&&(this.#e=this.content.domContext.setTimeout(()=>{this.submenu.onOpen(),this.#t()},this.opts.openDelay.current))}onpointerleave(e){W_(e)&&this.#t()}onkeydown(e){const t=this.content.search!=="";this.item.opts.disabled.current||t&&e.key===no||UQ[this.submenu.root.opts.dir.current].includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}onclick(e){if(this.item.opts.disabled.current||!Io(e.currentTarget))return;e.currentTarget.focus();const t=new CustomEvent("menusubtriggerselect",{bubbles:!0,cancelable:!0});this.opts.onSelect.current(t),this.submenu.opts.open.current||(this.submenu.onOpen(),eo(()=>{const n=this.submenu.contentNode;n&&W5.dispatch(n)}))}#r=F(()=>vr({"aria-haspopup":"menu","aria-expanded":Dc(this.submenu.opts.open.current),"data-state":sl(this.submenu.opts.open.current),"aria-controls":this.submenu.opts.open.current?this.submenu.contentId.current:void 0,[this.submenu.root.getBitsAttr("sub-trigger")]:"",onclick:this.onclick,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,onkeydown:this.onkeydown,...this.attachment},this.item.props));get props(){return f(this.#r)}set props(e){M(this.#r,e)}}class Q5{static create(e){return new Q5(e,nU.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=yn(this.opts.ref)}#e=F(()=>({id:this.opts.id.current,role:"group",[this.root.getBitsAttr("separator")]:"",...this.attachment}));get props(){return f(this.#e)}set props(e){M(this.#e,e)}}class Z5{static create(e){return new Z5(e,xf.get())}opts;parentMenu;attachment;constructor(e,t){this.opts=e,this.parentMenu=t,this.attachment=yn(this.opts.ref,n=>this.parentMenu.triggerNode=n)}onclick=e=>{this.opts.disabled.current||e.detail!==0||(this.parentMenu.toggleOpen(),e.preventDefault())};onpointerdown=e=>{if(!this.opts.disabled.current){if(e.pointerType==="touch")return e.preventDefault();e.button===0&&e.ctrlKey===!1&&(this.parentMenu.toggleOpen(),this.parentMenu.opts.open.current||e.preventDefault())}};onpointerup=e=>{this.opts.disabled.current||e.pointerType==="touch"&&(e.preventDefault(),this.parentMenu.toggleOpen())};onkeydown=e=>{if(!this.opts.disabled.current){if(e.key===no||e.key===$l){this.parentMenu.toggleOpen(),e.preventDefault();return}e.key===Rl&&(this.parentMenu.onOpen(),e.preventDefault())}};#e=F(()=>{if(this.parentMenu.opts.open.current&&this.parentMenu.contentId.current)return this.parentMenu.contentId.current});#t=F(()=>({id:this.opts.id.current,disabled:this.opts.disabled.current,"aria-haspopup":"menu","aria-expanded":Dc(this.parentMenu.opts.open.current),"aria-controls":f(this.#e),"data-disabled":Di(this.opts.disabled.current),"data-state":sl(this.parentMenu.opts.open.current),[this.parentMenu.root.getBitsAttr("trigger")]:"",onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown,...this.attachment}));get props(){return f(this.#t)}set props(e){M(this.#t,e)}}class SZ{static create(e){const t=xf.get();return xf.set(new Tv(e,t.root,t))}}globalThis.bitsDismissableLayers??=new Map;class J5{static create(e){return new J5(e)}opts;#e;#t;#r={pointerdown:!1};#n=!1;#i=!1;#a=void 0;#s;#o=xr;constructor(e){this.opts=e,this.#t=e.interactOutsideBehavior,this.#e=e.onInteractOutside,this.#s=e.onFocusOutside,Nt(()=>{this.#a=HB(this.opts.ref.current)});let t=xr;const n=()=>{this.#g(),globalThis.bitsDismissableLayers.delete(this),this.#u.destroy(),t()};nn([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return D5(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),t(),t=this.#c())}),n}),Qc(()=>{this.#g.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#u.destroy(),this.#o(),t()})}#l=e=>{e.defaultPrevented||this.opts.ref.current&&eo(()=>{!this.opts.ref.current||this.#h(e.target)||e.target&&!this.#i&&this.#s.current?.(e)})};#c(){return Ac(jr(this.#a,"pointerdown",Ac(this.#p,this.#f),{capture:!0}),jr(this.#a,"pointerdown",Ac(this.#m,this.#u)),jr(this.#a,"focusin",this.#l))}#d=e=>{let t=e;t.defaultPrevented&&(t=MR(e)),this.#e.current(e)};#u=NR(e=>{if(!this.opts.ref.current){this.#o();return}const t=this.opts.isValidEvent.current(e,this.opts.ref.current)||TZ(e,this.opts.ref.current);if(!this.#n||this.#v()||!t){this.#o();return}let n=e;if(n.defaultPrevented&&(n=MR(n)),this.#t.current!=="close"&&this.#t.current!=="defer-otherwise-close"){this.#o();return}e.pointerType==="touch"?(this.#o(),this.#o=jr(this.#a,"click",this.#d,{once:!0})):this.#e.current(n)},10);#p=e=>{this.#r[e.type]=!0};#m=e=>{this.#r[e.type]=!1};#f=()=>{this.opts.ref.current&&(this.#n=wZ(this.opts.ref.current))};#h=e=>this.opts.ref.current?qB(this.opts.ref.current,e):!1;#g=NR(()=>{for(const e in this.#r)this.#r[e]=!1;this.#n=!1},20);#v(){return Object.values(this.#r).some(Boolean)}#_=()=>{this.#i=!0};#y=()=>{this.#i=!1};props={onfocuscapture:this.#_,onblurcapture:this.#y}}function EZ(r=[...globalThis.bitsDismissableLayers]){return r.findLast(([e,{current:t}])=>t==="close"||t==="ignore")}function wZ(r){const e=[...globalThis.bitsDismissableLayers],t=EZ(e);if(t)return t[0].opts.ref.current===r;const[n]=e[0];return n.opts.ref.current===r}function TZ(r,e){const t=r.target;if(!zB(t))return!1;const n=!!t.closest(`[${bZ}]`);if("button"in r&&r.button>0&&!n)return!1;if("button"in r&&r.button===0&&n)return!0;const a=!!e.closest(`[${vZ}]`);return n&&a?!1:HB(t).documentElement.contains(t)&&!qB(e,t)&&LQ(r,e)}function MR(r){const e=r.currentTarget,t=r.target;let n;r instanceof PointerEvent?n=new PointerEvent(r.type,r):n=new PointerEvent("pointerdown",r);let a=!1;return new Proxy(n,{get:(s,o)=>o==="currentTarget"?e:o==="target"?t:o==="preventDefault"?()=>{a=!0,typeof s.preventDefault=="function"&&s.preventDefault()}:o==="defaultPrevented"?a:o in s?s[o]:r[o]})}function e9(r,e){Ee(e,!0);let t=Y(e,"interactOutsideBehavior",3,"close"),n=Y(e,"onInteractOutside",3,xr),a=Y(e,"onFocusOutside",3,xr),i=Y(e,"isValidEvent",3,()=>!1);const s=J5.create({id:Pe(()=>e.id),interactOutsideBehavior:Pe(()=>t()),onInteractOutside:Pe(()=>n()),enabled:Pe(()=>e.enabled),onFocusOutside:Pe(()=>a()),isValidEvent:Pe(()=>i()),ref:e.ref});var o=se(),l=L(o);ke(l,()=>e.children??$e,()=>({props:s.props})),T(r,o),we()}globalThis.bitsEscapeLayers??=new Map;class t9{static create(e){return new t9(e)}opts;domContext;constructor(e){this.opts=e,this.domContext=new Zc(this.opts.ref);let t=xr;nn(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),t=this.#e()),()=>{t(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>jr(this.domContext.getDocument(),"keydown",this.#t,{passive:!1});#t=e=>{if(e.key!==uQ||!CZ(this))return;const t=new KeyboardEvent(e.type,e);e.preventDefault();const n=this.opts.escapeKeydownBehavior.current;n!=="close"&&n!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(t)}}function CZ(r){const e=[...globalThis.bitsEscapeLayers],t=e.findLast(([a,{current:i}])=>i==="close"||i==="ignore");if(t)return t[0]===r;const[n]=e[0];return n===r}function r9(r,e){Ee(e,!0);let t=Y(e,"escapeKeydownBehavior",3,"close"),n=Y(e,"onEscapeKeydown",3,xr);t9.create({escapeKeydownBehavior:Pe(()=>t()),onEscapeKeydown:Pe(()=>n()),enabled:Pe(()=>e.enabled),ref:e.ref});var a=se(),i=L(a);ke(i,()=>e.children??$e),T(r,a),we()}class n9{static instance;#e=os([]);#t=new WeakMap;#r=new WeakMap;static getInstance(){return this.instance||(this.instance=new n9),this.instance}register(e){const t=this.getActive();t&&t!==e&&t.pause();const n=document.activeElement;n&&n!==document.body&&this.#r.set(e,n),this.#e.current=this.#e.current.filter(a=>a!==e),this.#e.current.unshift(e)}unregister(e){this.#e.current=this.#e.current.filter(n=>n!==e);const t=this.getActive();t&&t.resume()}getActive(){return this.#e.current[0]}setFocusMemory(e,t){this.#t.set(e,t)}getFocusMemory(e){return this.#t.get(e)}isActiveScope(e){return this.getActive()===e}setPreFocusMemory(e,t){this.#r.set(e,t)}getPreFocusMemory(e){return this.#r.get(e)}clearPreFocusMemory(e){this.#r.delete(e)}}class a9{#e=!1;#t=null;#r=n9.getInstance();#n=[];#i;constructor(e){this.#i=e}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#a(){for(const e of this.#n)e();this.#n=[]}mount(e){this.#t&&this.unmount(),this.#t=e,this.#r.register(this),this.#l(),this.#s()}unmount(){this.#t&&(this.#a(),this.#o(),this.#r.unregister(this),this.#r.clearPreFocusMemory(this),this.#t=null)}#s(){if(!this.#t)return;const e=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(e),e.defaultPrevented||requestAnimationFrame(()=>{if(!this.#t)return;const t=this.#d();t?(t.focus(),this.#r.setFocusMemory(this,t)):this.#t.focus()})}#o(){const e=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(e),!e.defaultPrevented){const t=this.#r.getPreFocusMemory(this);if(t&&document.contains(t))try{t.focus()}catch{document.body.focus()}}}#l(){if(!this.#t||!this.#i.trap.current)return;const e=this.#t,t=e.ownerDocument,n=s=>{if(this.#e||!this.#r.isActiveScope(this))return;const o=s.target;if(!o)return;if(e.contains(o))this.#r.setFocusMemory(this,o);else{const c=this.#r.getFocusMemory(this);if(c&&e.contains(c)&&tU(c))s.preventDefault(),c.focus();else{const u=this.#d(),d=this.#u()[0];(u||d||e).focus()}}},a=s=>{if(!this.#i.loop||this.#e||s.key!=="Tab"||!this.#r.isActiveScope(this))return;const o=this.#c();if(o.length===0)return;const l=o[0],c=o[o.length-1];!s.shiftKey&&t.activeElement===c?(s.preventDefault(),l.focus()):s.shiftKey&&t.activeElement===l&&(s.preventDefault(),c.focus())};this.#n.push(jr(t,"focusin",n,{capture:!0}),jr(e,"keydown",a));const i=new MutationObserver(()=>{const s=this.#r.getFocusMemory(this);if(s&&!e.contains(s)){const o=this.#d(),l=this.#u()[0],c=o||l;c?(c.focus(),this.#r.setFocusMemory(this,c)):e.focus()}});i.observe(e,{childList:!0,subtree:!0}),this.#n.push(()=>i.disconnect())}#c(){return this.#t?JB(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#d(){return this.#c()[0]||null}#u(){return this.#t?eU(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(e){let t=null;return nn([()=>e.ref.current,()=>e.enabled.current],([n,a])=>{n&&a?(t||(t=new a9(e)),t.mount(n)):t&&(t.unmount(),t=null)}),Qc(()=>{t?.unmount()}),{get props(){return{tabindex:-1}}}}}function i9(r,e){Ee(e,!0);let t=Y(e,"enabled",3,!1),n=Y(e,"trapFocus",3,!1),a=Y(e,"loop",3,!1),i=Y(e,"onCloseAutoFocus",3,xr),s=Y(e,"onOpenAutoFocus",3,xr);const o=a9.use({enabled:Pe(()=>t()),trap:Pe(()=>n()),loop:a(),onCloseAutoFocus:Pe(()=>i()),onOpenAutoFocus:Pe(()=>s()),ref:e.ref});var l=se(),c=L(l);ke(c,()=>e.focusScope??$e,()=>({props:o.props})),T(r,l),we()}globalThis.bitsTextSelectionLayers??=new Map;class s9{static create(e){return new s9(e)}opts;domContext;#e=xr;constructor(e){this.opts=e,this.domContext=new Zc(e.ref);let t=xr;nn(()=>this.opts.enabled.current,n=>(n&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),t(),t=this.#t()),()=>{t(),this.#n(),globalThis.bitsTextSelectionLayers.delete(this)}))}#t(){return Ac(jr(this.domContext.getDocument(),"pointerdown",this.#r),jr(this.domContext.getDocument(),"pointerup",NB(this.#n,this.opts.onPointerUp.current)))}#r=e=>{const t=this.opts.ref.current,n=e.target;!Io(t)||!Io(n)||!this.opts.enabled.current||!xZ(this)||!iQ(t,n)||(this.opts.onPointerDown.current(e),!e.defaultPrevented&&(this.#e=AZ(t,this.domContext.getDocument().body)))};#n=()=>{this.#e(),this.#e=xr}}const DR=r=>r.style.userSelect||r.style.webkitUserSelect;function AZ(r,e){const t=DR(e),n=DR(r);return r0(e,"none"),r0(r,"text"),()=>{r0(e,t),r0(r,n)}}function r0(r,e){r.style.userSelect=e,r.style.webkitUserSelect=e}function xZ(r){const e=[...globalThis.bitsTextSelectionLayers];if(!e.length)return!1;const t=e.at(-1);return t?t[0]===r:!1}function o9(r,e){Ee(e,!0);let t=Y(e,"preventOverflowTextSelection",3,!0),n=Y(e,"onPointerDown",3,xr),a=Y(e,"onPointerUp",3,xr);s9.create({id:Pe(()=>e.id),onPointerDown:Pe(()=>n()),onPointerUp:Pe(()=>a()),enabled:Pe(()=>e.enabled&&t()),ref:e.ref});var i=se(),s=L(i);ke(s,()=>e.children??$e),T(r,i),we()}globalThis.bitsIdCounter??={current:0};function Zf(r="bits"){return globalThis.bitsIdCounter.current++,`${r}-${globalThis.bitsIdCounter.current}`}class RZ{#e;#t=0;#r=_e();#n;constructor(e){this.#e=e}#i(){this.#t-=1,this.#n&&this.#t<=0&&(this.#n(),M(this.#r,void 0),this.#n=void 0)}get(...e){return this.#t+=1,f(this.#r)===void 0&&(this.#n=jm(()=>{M(this.#r,this.#e(...e),!0)})),Nt(()=>()=>{this.#i()}),f(this.#r)}}const b_=new Oi;let n0=_e(null),pS=null,Sp=null,Ep=!1;const PR=Pe(()=>{for(const r of b_.values())if(r)return!0;return!1});let mS=null;const OZ=new RZ(()=>{function r(){document.body.setAttribute("style",f(n0)??""),document.body.style.removeProperty("--scrollbar-width"),ZC&&pS?.(),M(n0,null)}function e(){Sp!==null&&(window.clearTimeout(Sp),Sp=null)}function t(a,i){e(),Ep=!0,mS=Date.now();const s=mS,o=()=>{Sp=null,mS===s&&(iU(b_)?Ep=!1:(Ep=!1,i()))},l=a===null?24:a;Sp=window.setTimeout(o,l)}function n(){f(n0)===null&&b_.size===0&&!Ep&&M(n0,document.body.getAttribute("style"),!0)}return nn(()=>PR.current,()=>{if(!PR.current)return;n(),Ep=!1;const a=getComputedStyle(document.documentElement),i=getComputedStyle(document.body),s=a.scrollbarGutter?.includes("stable")||i.scrollbarGutter?.includes("stable"),o=window.innerWidth-document.documentElement.clientWidth,c={padding:Number.parseInt(i.paddingRight??"0",10)+o,margin:Number.parseInt(i.marginRight??"0",10)};o>0&&!s&&(document.body.style.paddingRight=`${c.padding}px`,document.body.style.marginRight=`${c.margin}px`,document.body.style.setProperty("--scrollbar-width",`${o}px`)),document.body.style.overflow="hidden",ZC&&(pS=jr(document,"touchmove",u=>{u.target===document.documentElement&&(u.touches.length>1||u.preventDefault())},{passive:!1})),eo(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),Qc(()=>()=>{pS?.()}),{get lockMap(){return b_},resetBodyStyle:r,scheduleCleanupIfNoNewLocks:t,cancelPendingCleanup:e,ensureInitialStyleCaptured:n}});class NZ{#e=Zf();#t;#r=()=>null;#n;locked;constructor(e,t=()=>null){this.#t=e,this.#r=t,this.#n=OZ.get(),this.#n&&(this.#n.cancelPendingCleanup(),this.#n.ensureInitialStyleCaptured(),this.#n.lockMap.set(this.#e,this.#t??!1),this.locked=Pe(()=>this.#n.lockMap.get(this.#e)??!1,n=>this.#n.lockMap.set(this.#e,n)),Qc(()=>{if(this.#n.lockMap.delete(this.#e),iU(this.#n.lockMap))return;const n=this.#r();this.#n.scheduleCleanupIfNoNewLocks(n,()=>{this.#n.resetBodyStyle()})}))}}function iU(r){for(const[e,t]of r)if(t)return!0;return!1}function Rf(r,e){Ee(e,!0);let t=Y(e,"preventScroll",3,!0),n=Y(e,"restoreScrollDelay",3,null);t()&&new NZ(t(),()=>n()),we()}var IZ=G(" ",1),kZ=G("
",1);function MZ(r,e){const t=On();Ee(e,!0);let n=Y(e,"id",19,()=>Nn(t)),a=Y(e,"ref",15,null),i=Y(e,"forceMount",3,!1),s=Y(e,"interactOutsideBehavior",3,"ignore"),o=Y(e,"onCloseAutoFocus",3,xr),l=Y(e,"onEscapeKeydown",3,xr),c=Y(e,"onOpenAutoFocus",3,xr),u=Y(e,"onInteractOutside",3,xr),d=Y(e,"preventScroll",3,!0),h=Y(e,"trapFocus",3,!0),p=Y(e,"restoreScrollDelay",3,null),m=Ye(e,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","interactOutsideBehavior","onCloseAutoFocus","onEscapeKeydown","onOpenAutoFocus","onInteractOutside","preventScroll","trapFocus","restoreScrollDelay"]);const g=Ev.create({id:Pe(()=>n()),ref:Pe(()=>a(),E=>a(E))}),b=F(()=>vr(m,g.props));var _=se(),v=L(_);{var y=E=>{i9(E,{get ref(){return g.opts.ref},loop:!0,get trapFocus(){return h()},get enabled(){return g.root.opts.open.current},get onCloseAutoFocus(){return o()},onOpenAutoFocus:w=>{c()(w),!w.defaultPrevented&&(w.preventDefault(),D5(0,()=>g.opts.ref.current?.focus()))},focusScope:(w,C)=>{let x=()=>C?.().props;r9(w,ot(()=>f(b),{get enabled(){return g.root.opts.open.current},get ref(){return g.opts.ref},onEscapeKeydown:N=>{l()(N),!N.defaultPrevented&&g.root.handleClose()},children:(N,I)=>{e9(N,ot(()=>f(b),{get ref(){return g.opts.ref},get enabled(){return g.root.opts.open.current},get interactOutsideBehavior(){return s()},onInteractOutside:D=>{u()(D),!D.defaultPrevented&&g.root.handleClose()},children:(D,H)=>{o9(D,ot(()=>f(b),{get ref(){return g.opts.ref},get enabled(){return g.root.opts.open.current},children:(q,$)=>{var K=se(),z=L(K);{var re=ie=>{var k=IZ(),B=L(k);{var te=R=>{Rf(R,{get preventScroll(){return d()},get restoreScrollDelay(){return p()}})};le(B,R=>{g.root.opts.open.current&&R(te)})}var O=ee(B,2);{let R=F(()=>({props:vr(f(b),x()),...g.snippetProps}));ke(O,()=>e.child,()=>f(R))}T(ie,k)},W=ie=>{var k=kZ(),B=L(k);Rf(B,{get preventScroll(){return d()}});var te=ee(B,2);zt(te,R=>({...R}),[()=>vr(f(b),x())]);var O=j(te);ke(O,()=>e.children??$e),V(te),T(ie,k)};le(z,ie=>{e.child?ie(re):ie(W,!1)})}T(q,K)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};le(v,E=>{(g.shouldRender||i())&&E(y)})}T(r,_),we()}var DZ=G("
");function Av(r,e){const t=On();Ee(e,!0);let n=Y(e,"id",19,()=>Nn(t)),a=Y(e,"forceMount",3,!1),i=Y(e,"ref",15,null),s=Ye(e,["$$slots","$$events","$$legacy","id","forceMount","child","children","ref"]);const o=G5.create({id:Pe(()=>n()),ref:Pe(()=>i(),h=>i(h))}),l=F(()=>vr(s,o.props));var c=se(),u=L(c);{var d=h=>{var p=se(),m=L(p);{var g=_=>{var v=se(),y=L(v);{let E=F(()=>({props:vr(f(l)),...o.snippetProps}));ke(y,()=>e.child,()=>f(E))}T(_,v)},b=_=>{var v=DZ();zt(v,E=>({...E}),[()=>vr(f(l))]);var y=j(v);ke(y,()=>e.children??$e,()=>o.snippetProps),V(v),T(_,v)};le(m,_=>{e.child?_(g):_(b,!1)})}T(h,p)};le(u,h=>{(o.shouldRender||a())&&h(d)})}T(r,c),we()}var PZ=G("
");function l9(r,e){const t=On();Ee(e,!0);let n=Y(e,"id",19,()=>Nn(t)),a=Y(e,"ref",15,null),i=Ye(e,["$$slots","$$events","$$legacy","id","children","child","ref"]);const s=$5.create({id:Pe(()=>n()),ref:Pe(()=>a(),h=>a(h))}),o=F(()=>vr(i,s.props));var l=se(),c=L(l);{var u=h=>{var p=se(),m=L(p);ke(m,()=>e.child,()=>({props:f(o)})),T(h,p)},d=h=>{var p=PZ();zt(p,()=>({...f(o)}));var m=j(p);ke(m,()=>e.children??$e),V(p),T(h,p)};le(c,h=>{e.child?h(u):h(d,!1)})}T(r,l),we()}const LZ=Hl({component:"checkbox",parts:["root","group","group-label","input"]}),FZ=new ka("Checkbox.Group"),sU=new ka("Checkbox.Root");class c9{static create(e,t=null){return sU.set(new c9(e,t))}opts;group;#e=F(()=>this.group&&this.group.opts.name.current?this.group.opts.name.current:this.opts.name.current);get trueName(){return f(this.#e)}set trueName(e){M(this.#e,e)}#t=F(()=>this.group&&this.group.opts.required.current?!0:this.opts.required.current);get trueRequired(){return f(this.#t)}set trueRequired(e){M(this.#t,e)}#r=F(()=>this.group&&this.group.opts.disabled.current?!0:this.opts.disabled.current);get trueDisabled(){return f(this.#r)}set trueDisabled(e){M(this.#r,e)}#n=F(()=>this.group&&this.group.opts.readonly.current?!0:this.opts.readonly.current);get trueReadonly(){return f(this.#n)}set trueReadonly(e){M(this.#n,e)}attachment;constructor(e,t){this.opts=e,this.group=t,this.attachment=yn(this.opts.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),nn.pre([()=>rf(this.group?.opts.value.current),()=>this.opts.value.current],([n,a])=>{!n||!a||(this.opts.checked.current=n.includes(a))}),nn.pre(()=>this.opts.checked.current,n=>{this.group&&(n?this.group?.addValue(this.opts.value.current):this.group?.removeValue(this.opts.value.current))})}onkeydown(e){if(!(this.trueDisabled||this.trueReadonly)){if(e.key===$l){e.preventDefault(),this.opts.type.current==="submit"&&e.currentTarget.closest("form")?.requestSubmit();return}e.key===no&&(e.preventDefault(),this.#i())}}#i(){this.opts.indeterminate.current?(this.opts.indeterminate.current=!1,this.opts.checked.current=!0):this.opts.checked.current=!this.opts.checked.current}onclick(e){if(!(this.trueDisabled||this.trueReadonly)){if(this.opts.type.current==="submit"){this.#i();return}e.preventDefault(),this.#i()}}#a=F(()=>({checked:this.opts.checked.current,indeterminate:this.opts.indeterminate.current}));get snippetProps(){return f(this.#a)}set snippetProps(e){M(this.#a,e)}#s=F(()=>({id:this.opts.id.current,role:"checkbox",type:this.opts.type.current,disabled:this.trueDisabled,"aria-checked":$B(this.opts.checked.current,this.opts.indeterminate.current),"aria-required":Dc(this.trueRequired),"aria-readonly":Dc(this.trueReadonly),"data-disabled":Di(this.trueDisabled),"data-readonly":Di(this.trueReadonly),"data-state":BZ(this.opts.checked.current,this.opts.indeterminate.current),[LZ.root]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return f(this.#s)}set props(e){M(this.#s,e)}}class u9{static create(){return new u9(sU.get())}root;#e=F(()=>this.root.group?!!(this.root.opts.value.current!==void 0&&this.root.group.opts.value.current.includes(this.root.opts.value.current)):this.root.opts.checked.current);get trueChecked(){return f(this.#e)}set trueChecked(e){M(this.#e,e)}#t=F(()=>!!this.root.trueName);get shouldRender(){return f(this.#t)}set shouldRender(e){M(this.#t,e)}constructor(e){this.root=e,this.onfocus=this.onfocus.bind(this)}onfocus(e){Io(this.root.opts.ref.current)&&this.root.opts.ref.current.focus()}#r=F(()=>({type:"checkbox",checked:this.root.opts.checked.current===!0,disabled:this.root.trueDisabled,required:this.root.trueRequired,name:this.root.trueName,value:this.root.opts.value.current,readonly:this.root.trueReadonly,onfocus:this.onfocus}));get props(){return f(this.#r)}set props(e){M(this.#r,e)}}function BZ(r,e){return e?"indeterminate":r?"checked":"unchecked"}sW();var UZ=G(""),$Z=G("");function d9(r,e){Ee(e,!0);let t=Y(e,"value",15),n=Ye(e,["$$slots","$$events","$$legacy","value"]);const a=F(()=>vr(n,{"aria-hidden":"true",tabindex:-1,style:zX}));var i=se(),s=L(i);{var o=c=>{var u=UZ();zt(u,()=>({...f(a),value:t()}),void 0,void 0,void 0,void 0,!0),T(c,u)},l=c=>{var u=$Z();zt(u,()=>({...f(a)}),void 0,void 0,void 0,void 0,!0),mm(u,t),T(c,u)};le(s,c=>{f(a).type==="checkbox"?c(o):c(l,!1)})}T(r,i),we()}function GZ(r,e){Ee(e,!1);const t=u9.create();d5();var n=se(),a=L(n);{var i=s=>{d9(s,ot(()=>t.props))};le(a,s=>{t.shouldRender&&s(i)})}T(r,n),we()}var zZ=G(""),qZ=G(" ",1);function HZ(r,e){const t=On();Ee(e,!0);let n=Y(e,"checked",15,!1),a=Y(e,"ref",15,null),i=Y(e,"disabled",3,!1),s=Y(e,"required",3,!1),o=Y(e,"name",3,void 0),l=Y(e,"value",3,"on"),c=Y(e,"id",19,()=>Nn(t)),u=Y(e,"indeterminate",15,!1),d=Y(e,"type",3,"button"),h=Ye(e,["$$slots","$$events","$$legacy","checked","ref","onCheckedChange","children","disabled","required","name","value","id","indeterminate","onIndeterminateChange","child","type","readonly"]);const p=FZ.getOr(null);p&&l()&&(p.opts.value.current.includes(l())?n(!0):n(!1)),nn.pre(()=>l(),()=>{p&&l()&&(p.opts.value.current.includes(l())?n(!0):n(!1))});const m=c9.create({checked:Pe(()=>n(),S=>{n(S),e.onCheckedChange?.(S)}),disabled:Pe(()=>i()??!1),required:Pe(()=>s()),name:Pe(()=>o()),value:Pe(()=>l()),id:Pe(()=>c()),ref:Pe(()=>a(),S=>a(S)),indeterminate:Pe(()=>u(),S=>{u(S),e.onIndeterminateChange?.(S)}),type:Pe(()=>d()),readonly:Pe(()=>!!e.readonly)},p),g=F(()=>vr({...h},m.props));var b=qZ(),_=L(b);{var v=S=>{var w=se(),C=L(w);{let x=F(()=>({props:f(g),...m.snippetProps}));ke(C,()=>e.child,()=>f(x))}T(S,w)},y=S=>{var w=zZ();zt(w,()=>({...f(g)}));var C=j(w);ke(C,()=>e.children??$e,()=>m.snippetProps),V(w),T(S,w)};le(_,S=>{e.child?S(v):S(y,!1)})}var E=ee(_,2);GZ(E,{}),T(r,b),we()}const h9=Hl({component:"collapsible",parts:["root","content","trigger"]}),f9=new ka("Collapsible.Root");class p9{static create(e){return f9.set(new p9(e))}opts;attachment;#e=_e(null);get contentNode(){return f(this.#e)}set contentNode(e){M(this.#e,e,!0)}contentPresence;#t=_e(void 0);get contentId(){return f(this.#t)}set contentId(e){M(this.#t,e,!0)}constructor(e){this.opts=e,this.toggleOpen=this.toggleOpen.bind(this),this.attachment=yn(this.opts.ref),this.contentPresence=new ku({ref:Pe(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}})}toggleOpen(){this.opts.open.current=!this.opts.open.current}#r=F(()=>({id:this.opts.id.current,"data-state":sl(this.opts.open.current),"data-disabled":Di(this.opts.disabled.current),[h9.root]:"",...this.attachment}));get props(){return f(this.#r)}set props(e){M(this.#r,e)}}class m9{static create(e){return new m9(e,f9.get())}opts;root;attachment;#e=F(()=>this.opts.hiddenUntilFound.current?this.root.opts.open.current:this.opts.forceMount.current||this.root.opts.open.current);get present(){return f(this.#e)}set present(e){M(this.#e,e)}#t;#r=_e(!1);#n=_e(0);#i=_e(0);constructor(e,t){this.opts=e,this.root=t,M(this.#r,t.opts.open.current,!0),this.root.contentId=this.opts.id.current,this.attachment=yn(this.opts.ref,n=>this.root.contentNode=n),nn.pre(()=>this.opts.id.current,n=>{this.root.contentId=n}),Gi(()=>{const n=requestAnimationFrame(()=>{M(this.#r,!1)});return()=>{cancelAnimationFrame(n)}}),nn.pre([()=>this.opts.ref.current,()=>this.opts.hiddenUntilFound.current],([n,a])=>!n||!a?void 0:jr(n,"beforematch",()=>{this.root.opts.open.current||requestAnimationFrame(()=>{this.root.opts.open.current=!0})})),nn([()=>this.opts.ref.current,()=>this.present],([n])=>{n&&eo(()=>{if(!this.opts.ref.current)return;this.#t=this.#t||{transitionDuration:n.style.transitionDuration,animationName:n.style.animationName},n.style.transitionDuration="0s",n.style.animationName="none";const a=n.getBoundingClientRect();if(M(this.#i,a.height,!0),M(this.#n,a.width,!0),!f(this.#r)){const{animationName:i,transitionDuration:s}=this.#t;n.style.transitionDuration=s,n.style.animationName=i}})})}get shouldRender(){return this.root.contentPresence.shouldRender}#a=F(()=>({open:this.root.opts.open.current}));get snippetProps(){return f(this.#a)}set snippetProps(e){M(this.#a,e)}#s=F(()=>({id:this.opts.id.current,style:{"--bits-collapsible-content-height":f(this.#i)?`${f(this.#i)}px`:void 0,"--bits-collapsible-content-width":f(this.#n)?`${f(this.#n)}px`:void 0},hidden:this.opts.hiddenUntilFound.current&&!this.root.opts.open.current?"until-found":void 0,"data-state":sl(this.root.opts.open.current),"data-disabled":Di(this.root.opts.disabled.current),[h9.content]:"",...this.opts.hiddenUntilFound.current&&!this.shouldRender?{}:{hidden:this.opts.hiddenUntilFound.current?!this.shouldRender:this.opts.forceMount.current?void 0:!this.shouldRender},...this.attachment}));get props(){return f(this.#s)}set props(e){M(this.#s,e)}}class g9{static create(e){return new g9(e,f9.get())}opts;root;attachment;#e=F(()=>this.opts.disabled.current||this.root.opts.disabled.current);constructor(e,t){this.opts=e,this.root=t,this.attachment=yn(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){if(!f(this.#e)){if(e.button!==0)return e.preventDefault();this.root.toggleOpen()}}onkeydown(e){f(this.#e)||(e.key===no||e.key===$l)&&(e.preventDefault(),this.root.toggleOpen())}#t=F(()=>({id:this.opts.id.current,type:"button",disabled:f(this.#e),"aria-controls":this.root.contentId,"aria-expanded":Dc(this.root.opts.open.current),"data-state":sl(this.root.opts.open.current),"data-disabled":Di(f(this.#e)),[h9.trigger]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return f(this.#t)}set props(e){M(this.#t,e)}}var VZ=G("
");function YZ(r,e){const t=On();Ee(e,!0);let n=Y(e,"id",19,()=>Nn(t)),a=Y(e,"ref",15,null),i=Y(e,"open",15,!1),s=Y(e,"disabled",3,!1),o=Y(e,"onOpenChange",3,xr),l=Y(e,"onOpenChangeComplete",3,xr),c=Ye(e,["$$slots","$$events","$$legacy","children","child","id","ref","open","disabled","onOpenChange","onOpenChangeComplete"]);const u=p9.create({open:Pe(()=>i(),b=>{i(b),o()(b)}),disabled:Pe(()=>s()),id:Pe(()=>n()),ref:Pe(()=>a(),b=>a(b)),onOpenChangeComplete:Pe(()=>l())}),d=F(()=>vr(c,u.props));var h=se(),p=L(h);{var m=b=>{var _=se(),v=L(_);ke(v,()=>e.child,()=>({props:f(d)})),T(b,_)},g=b=>{var _=VZ();zt(_,()=>({...f(d)}));var v=j(_);ke(v,()=>e.children??$e),V(_),T(b,_)};le(p,b=>{e.child?b(m):b(g,!1)})}T(r,h),we()}var WZ=G("
");function jZ(r,e){const t=On();Ee(e,!0);let n=Y(e,"ref",15,null),a=Y(e,"forceMount",3,!1),i=Y(e,"hiddenUntilFound",3,!1),s=Y(e,"id",19,()=>Nn(t)),o=Ye(e,["$$slots","$$events","$$legacy","child","ref","forceMount","hiddenUntilFound","children","id"]);const l=m9.create({id:Pe(()=>s()),forceMount:Pe(()=>a()),hiddenUntilFound:Pe(()=>i()),ref:Pe(()=>n(),m=>n(m))}),c=F(()=>vr(o,l.props));var u=se(),d=L(u);{var h=m=>{var g=se(),b=L(g);{let _=F(()=>({...l.snippetProps,props:f(c)}));ke(b,()=>e.child,()=>f(_))}T(m,g)},p=m=>{var g=WZ();zt(g,()=>({...f(c)}));var b=j(g);ke(b,()=>e.children??$e),V(g),T(m,g)};le(d,m=>{e.child?m(h):m(p,!1)})}T(r,u),we()}var KZ=G("");function XZ(r,e){const t=On();Ee(e,!0);let n=Y(e,"ref",15,null),a=Y(e,"id",19,()=>Nn(t)),i=Y(e,"disabled",3,!1),s=Ye(e,["$$slots","$$events","$$legacy","children","child","ref","id","disabled"]);const o=g9.create({id:Pe(()=>a()),ref:Pe(()=>n(),p=>n(p)),disabled:Pe(()=>i())}),l=F(()=>vr(s,o.props));var c=se(),u=L(c);{var d=p=>{var m=se(),g=L(m);ke(g,()=>e.child,()=>({props:f(l)})),T(p,m)},h=p=>{var m=KZ();zt(m,()=>({...f(l)}));var g=j(m);ke(g,()=>e.children??$e),V(m),T(p,m)};le(u,p=>{e.child?p(d):p(h,!1)})}T(r,c),we()}const QZ=["top","right","bottom","left"],Mu=Math.min,js=Math.max,Z_=Math.round,a0=Math.floor,Dl=r=>({x:r,y:r}),ZZ={left:"right",right:"left",bottom:"top",top:"bottom"},JZ={start:"end",end:"start"};function t3(r,e,t){return js(r,Mu(e,t))}function Lc(r,e){return typeof r=="function"?r(e):r}function Fc(r){return r.split("-")[0]}function Jf(r){return r.split("-")[1]}function _9(r){return r==="x"?"y":"x"}function b9(r){return r==="y"?"height":"width"}const eJ=new Set(["top","bottom"]);function Ol(r){return eJ.has(Fc(r))?"y":"x"}function v9(r){return _9(Ol(r))}function tJ(r,e,t){t===void 0&&(t=!1);const n=Jf(r),a=v9(r),i=b9(a);let s=a==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=J_(s)),[s,J_(s)]}function rJ(r){const e=J_(r);return[r3(r),e,r3(e)]}function r3(r){return r.replace(/start|end/g,e=>JZ[e])}const LR=["left","right"],FR=["right","left"],nJ=["top","bottom"],aJ=["bottom","top"];function iJ(r,e,t){switch(r){case"top":case"bottom":return t?e?FR:LR:e?LR:FR;case"left":case"right":return e?nJ:aJ;default:return[]}}function sJ(r,e,t,n){const a=Jf(r);let i=iJ(Fc(r),t==="start",n);return a&&(i=i.map(s=>s+"-"+a),e&&(i=i.concat(i.map(r3)))),i}function J_(r){return r.replace(/left|right|bottom|top/g,e=>ZZ[e])}function oJ(r){return{top:0,right:0,bottom:0,left:0,...r}}function oU(r){return typeof r!="number"?oJ(r):{top:r,right:r,bottom:r,left:r}}function eb(r){const{x:e,y:t,width:n,height:a}=r;return{width:n,height:a,top:t,left:e,right:e+n,bottom:t+a,x:e,y:t}}function BR(r,e,t){let{reference:n,floating:a}=r;const i=Ol(e),s=v9(e),o=b9(s),l=Fc(e),c=i==="y",u=n.x+n.width/2-a.width/2,d=n.y+n.height/2-a.height/2,h=n[o]/2-a[o]/2;let p;switch(l){case"top":p={x:u,y:n.y-a.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-a.width,y:d};break;default:p={x:n.x,y:n.y}}switch(Jf(e)){case"start":p[s]-=h*(t&&c?-1:1);break;case"end":p[s]+=h*(t&&c?-1:1);break}return p}const lJ=async(r,e,t)=>{const{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=t,o=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let c=await s.getElementRects({reference:r,floating:e,strategy:a}),{x:u,y:d}=BR(c,n,l),h=n,p={},m=0;for(let g=0;g({name:"arrow",options:r,async fn(e){const{x:t,y:n,placement:a,rects:i,platform:s,elements:o,middlewareData:l}=e,{element:c,padding:u=0}=Lc(r,e)||{};if(c==null)return{};const d=oU(u),h={x:t,y:n},p=v9(a),m=b9(p),g=await s.getDimensions(c),b=p==="y",_=b?"top":"left",v=b?"bottom":"right",y=b?"clientHeight":"clientWidth",E=i.reference[m]+i.reference[p]-h[p]-i.floating[m],S=h[p]-i.reference[p],w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let C=w?w[y]:0;(!C||!await(s.isElement==null?void 0:s.isElement(w)))&&(C=o.floating[y]||i.floating[m]);const x=E/2-S/2,N=C/2-g[m]/2-1,I=Mu(d[_],N),D=Mu(d[v],N),H=I,q=C-g[m]-D,$=C/2-g[m]/2+x,K=t3(H,$,q),z=!l.arrow&&Jf(a)!=null&&$!==K&&i.reference[m]/2-($$<=0)){var D,H;const $=(((D=i.flip)==null?void 0:D.index)||0)+1,K=C[$];if(K&&(!(d==="alignment"?v!==Ol(K):!1)||I.every(W=>W.overflows[0]>0&&Ol(W.placement)===v)))return{data:{index:$,overflows:I},reset:{placement:K}};let z=(H=I.filter(re=>re.overflows[0]<=0).sort((re,W)=>re.overflows[1]-W.overflows[1])[0])==null?void 0:H.placement;if(!z)switch(p){case"bestFit":{var q;const re=(q=I.filter(W=>{if(w){const ie=Ol(W.placement);return ie===v||ie==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(ie=>ie>0).reduce((ie,k)=>ie+k,0)]).sort((W,ie)=>W[1]-ie[1])[0])==null?void 0:q[0];re&&(z=re);break}case"initialPlacement":z=o;break}if(a!==z)return{reset:{placement:z}}}return{}}}};function UR(r,e){return{top:r.top-e.height,right:r.right-e.width,bottom:r.bottom-e.height,left:r.left-e.width}}function $R(r){return QZ.some(e=>r[e]>=0)}const dJ=function(r){return r===void 0&&(r={}),{name:"hide",options:r,async fn(e){const{rects:t}=e,{strategy:n="referenceHidden",...a}=Lc(r,e);switch(n){case"referenceHidden":{const i=await Em(e,{...a,elementContext:"reference"}),s=UR(i,t.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:$R(s)}}}case"escaped":{const i=await Em(e,{...a,altBoundary:!0}),s=UR(i,t.floating);return{data:{escapedOffsets:s,escaped:$R(s)}}}default:return{}}}}},lU=new Set(["left","top"]);async function hJ(r,e){const{placement:t,platform:n,elements:a}=r,i=await(n.isRTL==null?void 0:n.isRTL(a.floating)),s=Fc(t),o=Jf(t),l=Ol(t)==="y",c=lU.has(s)?-1:1,u=i&&l?-1:1,d=Lc(e,r);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return o&&typeof m=="number"&&(p=o==="end"?m*-1:m),l?{x:p*u,y:h*c}:{x:h*c,y:p*u}}const fJ=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(e){var t,n;const{x:a,y:i,placement:s,middlewareData:o}=e,l=await hJ(e,r);return s===((t=o.offset)==null?void 0:t.placement)&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:a+l.x,y:i+l.y,data:{...l,placement:s}}}}},pJ=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(e){const{x:t,y:n,placement:a}=e,{mainAxis:i=!0,crossAxis:s=!1,limiter:o={fn:b=>{let{x:_,y:v}=b;return{x:_,y:v}}},...l}=Lc(r,e),c={x:t,y:n},u=await Em(e,l),d=Ol(Fc(a)),h=_9(d);let p=c[h],m=c[d];if(i){const b=h==="y"?"top":"left",_=h==="y"?"bottom":"right",v=p+u[b],y=p-u[_];p=t3(v,p,y)}if(s){const b=d==="y"?"top":"left",_=d==="y"?"bottom":"right",v=m+u[b],y=m-u[_];m=t3(v,m,y)}const g=o.fn({...e,[h]:p,[d]:m});return{...g,data:{x:g.x-t,y:g.y-n,enabled:{[h]:i,[d]:s}}}}}},mJ=function(r){return r===void 0&&(r={}),{options:r,fn(e){const{x:t,y:n,placement:a,rects:i,middlewareData:s}=e,{offset:o=0,mainAxis:l=!0,crossAxis:c=!0}=Lc(r,e),u={x:t,y:n},d=Ol(a),h=_9(d);let p=u[h],m=u[d];const g=Lc(o,e),b=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const y=h==="y"?"height":"width",E=i.reference[h]-i.floating[y]+b.mainAxis,S=i.reference[h]+i.reference[y]-b.mainAxis;pS&&(p=S)}if(c){var _,v;const y=h==="y"?"width":"height",E=lU.has(Fc(a)),S=i.reference[d]-i.floating[y]+(E&&((_=s.offset)==null?void 0:_[d])||0)+(E?0:b.crossAxis),w=i.reference[d]+i.reference[y]+(E?0:((v=s.offset)==null?void 0:v[d])||0)-(E?b.crossAxis:0);mw&&(m=w)}return{[h]:p,[d]:m}}}},gJ=function(r){return r===void 0&&(r={}),{name:"size",options:r,async fn(e){var t,n;const{placement:a,rects:i,platform:s,elements:o}=e,{apply:l=()=>{},...c}=Lc(r,e),u=await Em(e,c),d=Fc(a),h=Jf(a),p=Ol(a)==="y",{width:m,height:g}=i.floating;let b,_;d==="top"||d==="bottom"?(b=d,_=h===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(_=d,b=h==="end"?"top":"bottom");const v=g-u.top-u.bottom,y=m-u.left-u.right,E=Mu(g-u[b],v),S=Mu(m-u[_],y),w=!e.middlewareData.shift;let C=E,x=S;if((t=e.middlewareData.shift)!=null&&t.enabled.x&&(x=y),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(C=v),w&&!h){const I=js(u.left,0),D=js(u.right,0),H=js(u.top,0),q=js(u.bottom,0);p?x=m-2*(I!==0||D!==0?I+D:js(u.left,u.right)):C=g-2*(H!==0||q!==0?H+q:js(u.top,u.bottom))}await l({...e,availableWidth:x,availableHeight:C});const N=await s.getDimensions(o.floating);return m!==N.width||g!==N.height?{reset:{rects:!0}}:{}}}};function xv(){return typeof window<"u"}function ep(r){return cU(r)?(r.nodeName||"").toLowerCase():"#document"}function ao(r){var e;return(r==null||(e=r.ownerDocument)==null?void 0:e.defaultView)||window}function Vl(r){var e;return(e=(cU(r)?r.ownerDocument:r.document)||window.document)==null?void 0:e.documentElement}function cU(r){return xv()?r instanceof Node||r instanceof ao(r).Node:!1}function al(r){return xv()?r instanceof Element||r instanceof ao(r).Element:!1}function Gl(r){return xv()?r instanceof HTMLElement||r instanceof ao(r).HTMLElement:!1}function GR(r){return!xv()||typeof ShadowRoot>"u"?!1:r instanceof ShadowRoot||r instanceof ao(r).ShadowRoot}const _J=new Set(["inline","contents"]);function ng(r){const{overflow:e,overflowX:t,overflowY:n,display:a}=il(r);return/auto|scroll|overlay|hidden|clip/.test(e+n+t)&&!_J.has(a)}const bJ=new Set(["table","td","th"]);function vJ(r){return bJ.has(ep(r))}const yJ=[":popover-open",":modal"];function Rv(r){return yJ.some(e=>{try{return r.matches(e)}catch{return!1}})}const SJ=["transform","translate","scale","rotate","perspective"],EJ=["transform","translate","scale","rotate","perspective","filter"],wJ=["paint","layout","strict","content"];function y9(r){const e=S9(),t=al(r)?il(r):r;return SJ.some(n=>t[n]?t[n]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||EJ.some(n=>(t.willChange||"").includes(n))||wJ.some(n=>(t.contain||"").includes(n))}function TJ(r){let e=Du(r);for(;Gl(e)&&!Of(e);){if(y9(e))return e;if(Rv(e))return null;e=Du(e)}return null}function S9(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const CJ=new Set(["html","body","#document"]);function Of(r){return CJ.has(ep(r))}function il(r){return ao(r).getComputedStyle(r)}function Ov(r){return al(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.scrollX,scrollTop:r.scrollY}}function Du(r){if(ep(r)==="html")return r;const e=r.assignedSlot||r.parentNode||GR(r)&&r.host||Vl(r);return GR(e)?e.host:e}function uU(r){const e=Du(r);return Of(e)?r.ownerDocument?r.ownerDocument.body:r.body:Gl(e)&&ng(e)?e:uU(e)}function wm(r,e,t){var n;e===void 0&&(e=[]),t===void 0&&(t=!0);const a=uU(r),i=a===((n=r.ownerDocument)==null?void 0:n.body),s=ao(a);if(i){const o=n3(s);return e.concat(s,s.visualViewport||[],ng(a)?a:[],o&&t?wm(o):[])}return e.concat(a,wm(a,[],t))}function n3(r){return r.parent&&Object.getPrototypeOf(r.parent)?r.frameElement:null}function dU(r){const e=il(r);let t=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const a=Gl(r),i=a?r.offsetWidth:t,s=a?r.offsetHeight:n,o=Z_(t)!==i||Z_(n)!==s;return o&&(t=i,n=s),{width:t,height:n,$:o}}function E9(r){return al(r)?r:r.contextElement}function of(r){const e=E9(r);if(!Gl(e))return Dl(1);const t=e.getBoundingClientRect(),{width:n,height:a,$:i}=dU(e);let s=(i?Z_(t.width):t.width)/n,o=(i?Z_(t.height):t.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!o||!Number.isFinite(o))&&(o=1),{x:s,y:o}}const AJ=Dl(0);function hU(r){const e=ao(r);return!S9()||!e.visualViewport?AJ:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function xJ(r,e,t){return e===void 0&&(e=!1),!t||e&&t!==ao(r)?!1:e}function Qd(r,e,t,n){e===void 0&&(e=!1),t===void 0&&(t=!1);const a=r.getBoundingClientRect(),i=E9(r);let s=Dl(1);e&&(n?al(n)&&(s=of(n)):s=of(r));const o=xJ(i,t,n)?hU(i):Dl(0);let l=(a.left+o.x)/s.x,c=(a.top+o.y)/s.y,u=a.width/s.x,d=a.height/s.y;if(i){const h=ao(i),p=n&&al(n)?ao(n):n;let m=h,g=n3(m);for(;g&&n&&p!==m;){const b=of(g),_=g.getBoundingClientRect(),v=il(g),y=_.left+(g.clientLeft+parseFloat(v.paddingLeft))*b.x,E=_.top+(g.clientTop+parseFloat(v.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,d*=b.y,l+=y,c+=E,m=ao(g),g=n3(m)}}return eb({width:u,height:d,x:l,y:c})}function w9(r,e){const t=Ov(r).scrollLeft;return e?e.left+t:Qd(Vl(r)).left+t}function fU(r,e,t){t===void 0&&(t=!1);const n=r.getBoundingClientRect(),a=n.left+e.scrollLeft-(t?0:w9(r,n)),i=n.top+e.scrollTop;return{x:a,y:i}}function RJ(r){let{elements:e,rect:t,offsetParent:n,strategy:a}=r;const i=a==="fixed",s=Vl(n),o=e?Rv(e.floating):!1;if(n===s||o&&i)return t;let l={scrollLeft:0,scrollTop:0},c=Dl(1);const u=Dl(0),d=Gl(n);if((d||!d&&!i)&&((ep(n)!=="body"||ng(s))&&(l=Ov(n)),Gl(n))){const p=Qd(n);c=of(n),u.x=p.x+n.clientLeft,u.y=p.y+n.clientTop}const h=s&&!d&&!i?fU(s,l,!0):Dl(0);return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:t.y*c.y-l.scrollTop*c.y+u.y+h.y}}function OJ(r){return Array.from(r.getClientRects())}function NJ(r){const e=Vl(r),t=Ov(r),n=r.ownerDocument.body,a=js(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=js(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-t.scrollLeft+w9(r);const o=-t.scrollTop;return il(n).direction==="rtl"&&(s+=js(e.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:o}}function IJ(r,e){const t=ao(r),n=Vl(r),a=t.visualViewport;let i=n.clientWidth,s=n.clientHeight,o=0,l=0;if(a){i=a.width,s=a.height;const c=S9();(!c||c&&e==="fixed")&&(o=a.offsetLeft,l=a.offsetTop)}return{width:i,height:s,x:o,y:l}}const kJ=new Set(["absolute","fixed"]);function MJ(r,e){const t=Qd(r,!0,e==="fixed"),n=t.top+r.clientTop,a=t.left+r.clientLeft,i=Gl(r)?of(r):Dl(1),s=r.clientWidth*i.x,o=r.clientHeight*i.y,l=a*i.x,c=n*i.y;return{width:s,height:o,x:l,y:c}}function zR(r,e,t){let n;if(e==="viewport")n=IJ(r,t);else if(e==="document")n=NJ(Vl(r));else if(al(e))n=MJ(e,t);else{const a=hU(r);n={x:e.x-a.x,y:e.y-a.y,width:e.width,height:e.height}}return eb(n)}function pU(r,e){const t=Du(r);return t===e||!al(t)||Of(t)?!1:il(t).position==="fixed"||pU(t,e)}function DJ(r,e){const t=e.get(r);if(t)return t;let n=wm(r,[],!1).filter(o=>al(o)&&ep(o)!=="body"),a=null;const i=il(r).position==="fixed";let s=i?Du(r):r;for(;al(s)&&!Of(s);){const o=il(s),l=y9(s);!l&&o.position==="fixed"&&(a=null),(i?!l&&!a:!l&&o.position==="static"&&!!a&&kJ.has(a.position)||ng(s)&&!l&&pU(r,s))?n=n.filter(u=>u!==s):a=o,s=Du(s)}return e.set(r,n),n}function PJ(r){let{element:e,boundary:t,rootBoundary:n,strategy:a}=r;const s=[...t==="clippingAncestors"?Rv(e)?[]:DJ(e,this._c):[].concat(t),n],o=s[0],l=s.reduce((c,u)=>{const d=zR(e,u,a);return c.top=js(d.top,c.top),c.right=Mu(d.right,c.right),c.bottom=Mu(d.bottom,c.bottom),c.left=js(d.left,c.left),c},zR(e,o,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function LJ(r){const{width:e,height:t}=dU(r);return{width:e,height:t}}function FJ(r,e,t){const n=Gl(e),a=Vl(e),i=t==="fixed",s=Qd(r,!0,i,e);let o={scrollLeft:0,scrollTop:0};const l=Dl(0);function c(){l.x=w9(a)}if(n||!n&&!i)if((ep(e)!=="body"||ng(a))&&(o=Ov(e)),n){const p=Qd(e,!0,i,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}else a&&c();i&&!n&&a&&c();const u=a&&!n&&!i?fU(a,o):Dl(0),d=s.left+o.scrollLeft-l.x-u.x,h=s.top+o.scrollTop-l.y-u.y;return{x:d,y:h,width:s.width,height:s.height}}function gS(r){return il(r).position==="static"}function qR(r,e){if(!Gl(r)||il(r).position==="fixed")return null;if(e)return e(r);let t=r.offsetParent;return Vl(r)===t&&(t=t.ownerDocument.body),t}function mU(r,e){const t=ao(r);if(Rv(r))return t;if(!Gl(r)){let a=Du(r);for(;a&&!Of(a);){if(al(a)&&!gS(a))return a;a=Du(a)}return t}let n=qR(r,e);for(;n&&vJ(n)&&gS(n);)n=qR(n,e);return n&&Of(n)&&gS(n)&&!y9(n)?t:n||TJ(r)||t}const BJ=async function(r){const e=this.getOffsetParent||mU,t=this.getDimensions,n=await t(r.floating);return{reference:FJ(r.reference,await e(r.floating),r.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function UJ(r){return il(r).direction==="rtl"}const $J={convertOffsetParentRelativeRectToViewportRelativeRect:RJ,getDocumentElement:Vl,getClippingRect:PJ,getOffsetParent:mU,getElementRects:BJ,getClientRects:OJ,getDimensions:LJ,getScale:of,isElement:al,isRTL:UJ};function gU(r,e){return r.x===e.x&&r.y===e.y&&r.width===e.width&&r.height===e.height}function GJ(r,e){let t=null,n;const a=Vl(r);function i(){var o;clearTimeout(n),(o=t)==null||o.disconnect(),t=null}function s(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),i();const c=r.getBoundingClientRect(),{left:u,top:d,width:h,height:p}=c;if(o||e(),!h||!p)return;const m=a0(d),g=a0(a.clientWidth-(u+h)),b=a0(a.clientHeight-(d+p)),_=a0(u),y={rootMargin:-m+"px "+-g+"px "+-b+"px "+-_+"px",threshold:js(0,Mu(1,l))||1};let E=!0;function S(w){const C=w[0].intersectionRatio;if(C!==l){if(!E)return s();C?s(!1,C):n=setTimeout(()=>{s(!1,1e-7)},1e3)}C===1&&!gU(c,r.getBoundingClientRect())&&s(),E=!1}try{t=new IntersectionObserver(S,{...y,root:a.ownerDocument})}catch{t=new IntersectionObserver(S,y)}t.observe(r)}return s(!0),i}function zJ(r,e,t,n){n===void 0&&(n={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=E9(r),u=a||i?[...c?wm(c):[],...wm(e)]:[];u.forEach(_=>{a&&_.addEventListener("scroll",t,{passive:!0}),i&&_.addEventListener("resize",t)});const d=c&&o?GJ(c,t):null;let h=-1,p=null;s&&(p=new ResizeObserver(_=>{let[v]=_;v&&v.target===c&&p&&(p.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=p)==null||y.observe(e)})),t()}),c&&!l&&p.observe(c),p.observe(e));let m,g=l?Qd(r):null;l&&b();function b(){const _=Qd(r);g&&!gU(g,_)&&t(),g=_,m=requestAnimationFrame(b)}return t(),()=>{var _;u.forEach(v=>{a&&v.removeEventListener("scroll",t),i&&v.removeEventListener("resize",t)}),d?.(),(_=p)==null||_.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const qJ=fJ,HJ=pJ,VJ=uJ,YJ=gJ,WJ=dJ,jJ=cJ,KJ=mJ,XJ=(r,e,t)=>{const n=new Map,a={platform:$J,...t},i={...a.platform,_c:n};return lJ(r,e,{...a,platform:i})};function md(r){return typeof r=="function"?r():r}function _U(r){return typeof window>"u"?1:(r.ownerDocument.defaultView||window).devicePixelRatio||1}function HR(r,e){const t=_U(r);return Math.round(e*t)/t}function Bc(r){return{[`--bits-${r}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${r}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${r}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${r}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${r}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function QJ(r){const e=r.whileElementsMounted,t=F(()=>md(r.open)??!0),n=F(()=>md(r.middleware)),a=F(()=>md(r.transform)??!0),i=F(()=>md(r.placement)??"bottom"),s=F(()=>md(r.strategy)??"absolute"),o=F(()=>md(r.sideOffset)??0),l=F(()=>md(r.alignOffset)??0),c=r.reference;let u=_e(0),d=_e(0);const h=os(null);let p=_e(Sr(f(s))),m=_e(Sr(f(i))),g=_e(Sr({})),b=_e(!1);const _=F(()=>{const C=h.current?HR(h.current,f(u)):f(u),x=h.current?HR(h.current,f(d)):f(d);return f(a)?{position:f(p),left:"0",top:"0",transform:`translate(${C}px, ${x}px)`,...h.current&&_U(h.current)>=1.5&&{willChange:"transform"}}:{position:f(p),left:`${C}px`,top:`${x}px`}});let v;function y(){c.current===null||h.current===null||XJ(c.current,h.current,{middleware:f(n),placement:f(i),strategy:f(s)}).then(C=>{if(!f(t)&&f(u)!==0&&f(d)!==0){const x=Math.max(Math.abs(f(o)),Math.abs(f(l)),15);if(C.x<=x&&C.y<=x)return}M(u,C.x,!0),M(d,C.y,!0),M(p,C.strategy,!0),M(m,C.placement,!0),M(g,C.middlewareData,!0),M(b,!0)})}function E(){typeof v=="function"&&(v(),v=void 0)}function S(){if(E(),e===void 0){y();return}c.current===null||h.current===null||(v=e(c.current,h.current,y))}function w(){f(t)||M(b,!1)}return Nt(y),Nt(S),Nt(w),Nt(()=>E),{floating:h,reference:c,get strategy(){return f(p)},get placement(){return f(m)},get middlewareData(){return f(g)},get isPositioned(){return f(b)},get floatingStyles(){return f(_)},get update(){return y}}}const ZJ={top:"bottom",right:"left",bottom:"top",left:"right"},T9=new ka("Floating.Root"),a3=new ka("Floating.Content"),C9=new ka("Floating.Root");class tb{static create(e=!1){return e?C9.set(new tb):T9.set(new tb)}anchorNode=os(null);customAnchorNode=os(null);triggerNode=os(null);constructor(){Nt(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}}class rb{static create(e,t=!1){return t?a3.set(new rb(e,C9.get())):a3.set(new rb(e,T9.get()))}opts;root;contentRef=os(null);wrapperRef=os(null);arrowRef=os(null);contentAttachment=yn(this.contentRef);wrapperAttachment=yn(this.wrapperRef);arrowAttachment=yn(this.arrowRef);arrowId=os(Zf());#e=F(()=>{if(typeof this.opts.style=="string")return qp(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#r=new JX(()=>this.arrowRef.current??void 0);#n=F(()=>this.#r?.width??0);#i=F(()=>this.#r?.height??0);#a=F(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#s=F(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#o=F(()=>f(this.#s).length>0);get hasExplicitBoundaries(){return f(this.#o)}set hasExplicitBoundaries(e){M(this.#o,e)}#l=F(()=>({padding:this.opts.collisionPadding.current,boundary:f(this.#s).filter(_Q),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return f(this.#l)}set detectOverflowOptions(e){M(this.#l,e)}#c=_e(void 0);#d=_e(void 0);#u=_e(void 0);#p=_e(void 0);#m=F(()=>[qJ({mainAxis:this.opts.sideOffset.current+f(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&HJ({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?KJ():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&VJ({...this.detectOverflowOptions}),YJ({...this.detectOverflowOptions,apply:({rects:e,availableWidth:t,availableHeight:n})=>{const{width:a,height:i}=e.reference;M(this.#c,t,!0),M(this.#d,n,!0),M(this.#u,a,!0),M(this.#p,i,!0)}}),this.arrowRef.current&&jJ({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),JJ({arrowWidth:f(this.#n),arrowHeight:f(this.#i)}),this.opts.hideWhenDetached.current&&WJ({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return f(this.#m)}set middleware(e){M(this.#m,e)}floating;#f=F(()=>eee(this.floating.placement));get placedSide(){return f(this.#f)}set placedSide(e){M(this.#f,e)}#h=F(()=>tee(this.floating.placement));get placedAlign(){return f(this.#h)}set placedAlign(e){M(this.#h,e)}#g=F(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return f(this.#g)}set arrowX(e){M(this.#g,e)}#v=F(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return f(this.#v)}set arrowY(e){M(this.#v,e)}#_=F(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return f(this.#_)}set cannotCenterArrow(e){M(this.#_,e)}#y=_e();get contentZIndex(){return f(this.#y)}set contentZIndex(e){M(this.#y,e,!0)}#S=F(()=>ZJ[this.placedSide]);get arrowBaseSide(){return f(this.#S)}set arrowBaseSide(e){M(this.#S,e)}#b=F(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${f(this.#c)}px`,"--bits-floating-available-height":`${f(this.#d)}px`,"--bits-floating-anchor-width":`${f(this.#u)}px`,"--bits-floating-anchor-height":`${f(this.#p)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...f(this.#e)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return f(this.#b)}set wrapperProps(e){M(this.#b,e)}#w=F(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:k5({...f(this.#e)}),...this.contentAttachment}));get props(){return f(this.#w)}set props(e){M(this.#w,e)}#T=F(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0}));get arrowStyle(){return f(this.#T)}set arrowStyle(e){M(this.#T,e)}constructor(e,t){this.opts=e,this.root=t,e.customAnchor&&(this.root.customAnchorNode.current=e.customAnchor.current),nn(()=>e.customAnchor.current,n=>{this.root.customAnchorNode.current=n}),this.floating=QJ({strategy:()=>this.opts.strategy.current,placement:()=>f(this.#a),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...n)=>zJ(...n,{animationFrame:this.#t?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),Nt(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),nn(()=>this.contentRef.current,n=>{if(!n)return;const a=bv(n);this.contentZIndex=a.getComputedStyle(n).zIndex}),Nt(()=>{this.floating.floating.current=this.wrapperRef.current})}}class A9{static create(e){return new A9(e,a3.get())}opts;content;constructor(e,t){this.opts=e,this.content=t}#e=F(()=>({id:this.opts.id.current,style:this.content.arrowStyle,"data-side":this.content.placedSide,...this.content.arrowAttachment}));get props(){return f(this.#e)}set props(e){M(this.#e,e)}}class nb{static create(e,t=!1){return t?new nb(e,C9.get()):new nb(e,T9.get())}opts;root;constructor(e,t){this.opts=e,this.root=t,e.virtualEl&&e.virtualEl.current?t.triggerNode=OB(e.virtualEl.current):t.triggerNode=e.ref}}function JJ(r){return{name:"transformOrigin",options:r,fn(e){const{placement:t,rects:n,middlewareData:a}=e,s=a.arrow?.centerOffset!==0,o=s?0:r.arrowWidth,l=s?0:r.arrowHeight,[c,u]=x9(t),d={start:"0%",center:"50%",end:"100%"}[u],h=(a.arrow?.x??0)+o/2,p=(a.arrow?.y??0)+l/2;let m="",g="";return c==="bottom"?(m=s?d:`${h}px`,g=`${-l}px`):c==="top"?(m=s?d:`${h}px`,g=`${n.floating.height+l}px`):c==="right"?(m=`${-l}px`,g=s?d:`${p}px`):c==="left"&&(m=`${n.floating.width+l}px`,g=s?d:`${p}px`),{data:{x:m,y:g}}}}}function x9(r){const[e,t="center"]=r.split("-");return[e,t]}function eee(r){return x9(r)[0]}function tee(r){return x9(r)[1]}function ag(r,e){Ee(e,!0);let t=Y(e,"tooltip",3,!1);tb.create(t());var n=se(),a=L(n);ke(a,()=>e.children??$e),T(r,n),we()}class ree{#e;#t=F(()=>this.#e.candidateValues());#r;constructor(e){this.#e=e,this.#r=V5("",{afterMs:1e3,getWindow:this.#e.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(e){if(!this.#e.enabled()||!f(this.#t).length)return;this.#r.current=this.#r.current+e;const t=this.#e.getCurrentItem(),n=f(this.#t).find(o=>o===t)??"",a=f(this.#t).map(o=>o??""),i=H5(a,this.#r.current,n),s=f(this.#t).find(o=>o===i);return s&&this.#e.onMatch(s),s}resetTypeahead(){this.#r.current=""}}const nee=[Rl,L5,yv],aee=[xl,P5,vv],iee=[...nee,...aee],see=Hl({component:"select",parts:["trigger","content","item","viewport","scroll-up-button","scroll-down-button","group","group-label","separator","arrow","input","content-wrapper","item-text","value"]}),ig=new ka("Select.Root | Combobox.Root"),Nv=new ka("Select.Content | Combobox.Content");class bU{opts;#e=_e(!1);get touchedInput(){return f(this.#e)}set touchedInput(e){M(this.#e,e,!0)}#t=_e(null);get inputNode(){return f(this.#t)}set inputNode(e){M(this.#t,e,!0)}#r=_e(null);get contentNode(){return f(this.#r)}set contentNode(e){M(this.#r,e,!0)}contentPresence;#n=_e(null);get viewportNode(){return f(this.#n)}set viewportNode(e){M(this.#n,e,!0)}#i=_e(null);get triggerNode(){return f(this.#i)}set triggerNode(e){M(this.#i,e,!0)}#a=_e("");get valueId(){return f(this.#a)}set valueId(e){M(this.#a,e,!0)}#s=_e(null);get highlightedNode(){return f(this.#s)}set highlightedNode(e){M(this.#s,e,!0)}#o=F(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-value"):null);get highlightedValue(){return f(this.#o)}set highlightedValue(e){M(this.#o,e)}#l=F(()=>{if(this.highlightedNode)return this.highlightedNode.id});get highlightedId(){return f(this.#l)}set highlightedId(e){M(this.#l,e)}#c=F(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-label"):null);get highlightedLabel(){return f(this.#c)}set highlightedLabel(e){M(this.#c,e)}isUsingKeyboard=!1;isCombobox=!1;domContext=new Zc(()=>null);constructor(e){this.opts=e,this.isCombobox=e.isCombobox,this.contentPresence=new ku({ref:Pe(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),Gi(()=>{this.opts.open.current||this.setHighlightedNode(null)})}setHighlightedNode(e,t=!1){this.highlightedNode=e,e&&(this.isUsingKeyboard||t)&&e.scrollIntoView({block:this.opts.scrollAlignment.current})}getCandidateNodes(){const e=this.contentNode;return e?Array.from(e.querySelectorAll(`[${this.getBitsAttr("item")}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(e=!1){this.setHighlightedNode(null);let t=this.getCandidateNodes();if(t.length){if(this.viewportNode){const n=this.viewportNode.getBoundingClientRect();t=t.filter(a=>{if(!this.viewportNode)return!1;const i=a.getBoundingClientRect();return i.rightn.left&&i.bottomn.top})}this.setHighlightedNode(t[0],e)}}getNodeByValue(e){return this.getCandidateNodes().find(n=>n.dataset.value===e)??null}setOpen(e){this.opts.open.current=e}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode(null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}getBitsAttr=e=>see.getAttr(e,this.isCombobox?"combobox":void 0)}class oee extends bU{opts;isMulti=!1;#e=F(()=>this.opts.value.current!=="");get hasValue(){return f(this.#e)}set hasValue(e){M(this.#e,e)}#t=F(()=>this.opts.items.current.length?this.opts.items.current.find(e=>e.value===this.opts.value.current)?.label??"":"");get currentLabel(){return f(this.#t)}set currentLabel(e){M(this.#t,e)}#r=F(()=>this.opts.items.current.length?this.opts.items.current.filter(t=>!t.disabled).map(t=>t.label):[]);get candidateLabels(){return f(this.#r)}set candidateLabels(e){M(this.#r,e)}#n=F(()=>!(this.isMulti||this.opts.items.current.length===0));get dataTypeaheadEnabled(){return f(this.#n)}set dataTypeaheadEnabled(e){M(this.#n,e)}constructor(e){super(e),this.opts=e,Nt(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),nn(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(e){return this.opts.value.current===e}toggleItem(e,t=e){const n=this.includesItem(e)?"":e;this.opts.value.current=n,n!==""&&(this.opts.inputValue.current=t)}setInitialHighlightedNode(){eo(()=>{if(!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current!==""){const e=this.getNodeByValue(this.opts.value.current);if(e){this.setHighlightedNode(e,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}class lee extends bU{opts;isMulti=!0;#e=F(()=>this.opts.value.current.length>0);get hasValue(){return f(this.#e)}set hasValue(e){M(this.#e,e)}constructor(e){super(e),this.opts=e,Nt(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),nn(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(e){return this.opts.value.current.includes(e)}toggleItem(e,t=e){this.includesItem(e)?this.opts.value.current=this.opts.value.current.filter(n=>n!==e):this.opts.value.current=[...this.opts.value.current,e],this.opts.inputValue.current=t}setInitialHighlightedNode(){eo(()=>{if(this.domContext&&!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current.length&&this.opts.value.current[0]!==""){const e=this.getNodeByValue(this.opts.value.current[0]);if(e){this.setHighlightedNode(e,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}class cee{static create(e){const{type:t,...n}=e,a=t==="single"?new oee(n):new lee(n);return ig.set(a)}}class R9{static create(e){return new R9(e,ig.get())}opts;root;attachment;#e;#t;constructor(e,t){this.opts=e,this.root=t,this.attachment=yn(e.ref,n=>this.root.triggerNode=n),this.root.domContext=new Zc(e.ref),this.#e=new rU({getCurrentItem:()=>this.root.highlightedNode,onMatch:n=>{this.root.setHighlightedNode(n)},getActiveElement:()=>this.root.domContext.getActiveElement(),getWindow:()=>this.root.domContext.getWindow()}),this.#t=new ree({getCurrentItem:()=>this.root.isMulti?"":this.root.currentLabel,onMatch:n=>{if(this.root.isMulti||!this.root.opts.items.current)return;const a=this.root.opts.items.current.find(i=>i.label===n);a&&(this.root.opts.value.current=a.value)},enabled:()=>!this.root.isMulti&&this.root.dataTypeaheadEnabled,candidateValues:()=>this.root.isMulti?[]:this.root.candidateLabels,getWindow:()=>this.root.domContext.getWindow()}),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onclick=this.onclick.bind(this)}#r(){this.root.opts.open.current=!0,this.#t.resetTypeahead(),this.#e.resetTypeahead()}#n(e){this.#r()}#i(){const e=this.root.highlightedValue===this.root.opts.value.current;return!this.root.opts.allowDeselect.current&&e&&!this.root.isMulti?(this.root.handleClose(),!0):(this.root.highlightedValue!==null&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!e?(this.root.handleClose(),!0):!1)}onkeydown(e){if(this.root.isUsingKeyboard=!0,(e.key===xl||e.key===Rl)&&e.preventDefault(),!this.root.opts.open.current){if(e.key===$l||e.key===no||e.key===Rl||e.key===xl)e.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){this.#t.handleTypeaheadSearch(e.key);return}if(this.root.hasValue)return;const s=this.root.getCandidateNodes();if(!s.length)return;if(e.key===Rl){const o=s[0];this.root.setHighlightedNode(o)}else if(e.key===xl){const o=s[s.length-1];this.root.setHighlightedNode(o)}return}if(e.key===QC){this.root.handleClose();return}if((e.key===$l||e.key===no&&this.#e.search==="")&&!e.isComposing&&(e.preventDefault(),this.#i()))return;if(e.key===xl&&e.altKey&&this.root.handleClose(),iee.includes(e.key)){e.preventDefault();const s=this.root.getCandidateNodes(),o=this.root.highlightedNode,l=o?s.indexOf(o):-1,c=this.root.opts.loop.current;let u;if(e.key===Rl?u=sZ(s,l,c):e.key===xl?u=oZ(s,l,c):e.key===P5?u=lZ(s,l,10,c):e.key===L5?u=cZ(s,l,10,c):e.key===yv?u=s[0]:e.key===vv&&(u=s[s.length-1]),!u)return;this.root.setHighlightedNode(u);return}const t=e.ctrlKey||e.altKey||e.metaKey,n=e.key.length===1,a=e.key===no,i=this.root.getCandidateNodes();if(e.key!==QC){if(!t&&(n||a)){!this.#e.handleTypeaheadSearch(e.key,i)&&a&&(e.preventDefault(),this.#i());return}this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}onclick(e){e.currentTarget.focus()}onpointerdown(e){if(this.root.opts.disabled.current)return;if(e.pointerType==="touch")return e.preventDefault();const t=e.target;t?.hasPointerCapture(e.pointerId)&&t?.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&(this.root.opts.open.current===!1?this.#n(e):this.root.handleClose())}onpointerup(e){this.root.opts.disabled.current||(e.preventDefault(),e.pointerType==="touch"&&(this.root.opts.open.current===!1?this.#n(e):this.root.handleClose()))}#a=F(()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":"listbox","aria-expanded":Dc(this.root.opts.open.current),"aria-activedescendant":this.root.highlightedId,"data-state":sl(this.root.opts.open.current),"data-disabled":Di(this.root.opts.disabled.current),"data-placeholder":this.root.hasValue?void 0:"",[this.root.getBitsAttr("trigger")]:"",onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,onclick:this.onclick,onpointerup:this.onpointerup,...this.attachment}));get props(){return f(this.#a)}set props(e){M(this.#a,e)}}class O9{static create(e){return Nv.set(new O9(e,ig.get()))}opts;root;attachment;#e=_e(!1);get isPositioned(){return f(this.#e)}set isPositioned(e){M(this.#e,e,!0)}domContext;constructor(e,t){this.opts=e,this.root=t,this.attachment=yn(e.ref,n=>this.root.contentNode=n),this.domContext=new Zc(this.opts.ref),this.root.domContext===null&&(this.root.domContext=this.domContext),Qc(()=>{this.root.contentNode=null,this.isPositioned=!1}),nn(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.isPositioned=!1)}),this.onpointermove=this.onpointermove.bind(this)}onpointermove(e){this.root.isUsingKeyboard=!1}#t=F(()=>Bc(this.root.isCombobox?"combobox":"select"));onInteractOutside=e=>{if(e.target===this.root.triggerNode||e.target===this.root.inputNode){e.preventDefault();return}this.opts.onInteractOutside.current(e),!e.defaultPrevented&&this.root.handleClose()};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()};onOpenAutoFocus=e=>{e.preventDefault()};onCloseAutoFocus=e=>{e.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#r=F(()=>({open:this.root.opts.open.current}));get snippetProps(){return f(this.#r)}set snippetProps(e){M(this.#r,e)}#n=F(()=>({id:this.opts.id.current,role:"listbox","aria-multiselectable":this.root.isMulti?"true":void 0,"data-state":sl(this.root.opts.open.current),[this.root.getBitsAttr("content")]:"",style:{display:"flex",flexDirection:"column",outline:"none",boxSizing:"border-box",pointerEvents:"auto",...f(this.#t)},onpointermove:this.onpointermove,...this.attachment}));get props(){return f(this.#n)}set props(e){M(this.#n,e)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.isPositioned=!0)}}}class N9{static create(e){return new N9(e,ig.get())}opts;root;attachment;#e=F(()=>this.root.includesItem(this.opts.value.current));get isSelected(){return f(this.#e)}set isSelected(e){M(this.#e,e)}#t=F(()=>this.root.highlightedValue===this.opts.value.current);get isHighlighted(){return f(this.#t)}set isHighlighted(e){M(this.#t,e)}prevHighlighted=new LB(()=>this.isHighlighted);#r=_e(!1);get mounted(){return f(this.#r)}set mounted(e){M(this.#r,e,!0)}constructor(e,t){this.opts=e,this.root=t,this.attachment=yn(e.ref),nn([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),nn(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove.bind(this)}handleSelect(){if(this.opts.disabled.current)return;const e=this.opts.value.current===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&e&&!this.root.isMulti){this.root.handleClose();return}this.root.toggleItem(this.opts.value.current,this.opts.label.current),!this.root.isMulti&&!e&&this.root.handleClose()}#n=F(()=>({selected:this.isSelected,highlighted:this.isHighlighted}));get snippetProps(){return f(this.#n)}set snippetProps(e){M(this.#n,e)}onpointerdown(e){e.preventDefault()}onpointerup(e){if(!(e.defaultPrevented||!this.opts.ref.current)){if(e.pointerType==="touch"&&!ZC){jr(this.opts.ref.current,"click",()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0});return}e.preventDefault(),this.handleSelect(),e.pointerType==="touch"&&this.root.setHighlightedNode(this.opts.ref.current)}}onpointermove(e){e.pointerType!=="touch"&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}#i=F(()=>({id:this.opts.id.current,role:"option","aria-selected":this.root.includesItem(this.opts.value.current)?"true":void 0,"data-value":this.opts.value.current,"data-disabled":Di(this.opts.disabled.current),"data-highlighted":this.root.highlightedValue===this.opts.value.current&&!this.opts.disabled.current?"":void 0,"data-selected":this.root.includesItem(this.opts.value.current)?"":void 0,"data-label":this.opts.label.current,[this.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,...this.attachment}));get props(){return f(this.#i)}set props(e){M(this.#i,e)}}class I9{static create(e){return new I9(e,ig.get())}opts;root;#e=F(()=>this.root.opts.name.current!=="");get shouldRender(){return f(this.#e)}set shouldRender(e){M(this.#e,e)}constructor(e,t){this.opts=e,this.root=t,this.onfocus=this.onfocus.bind(this)}onfocus(e){e.preventDefault(),this.root.isCombobox?this.root.inputNode?.focus():this.root.triggerNode?.focus()}#t=F(()=>({disabled:XC(this.root.opts.disabled.current),required:XC(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus}));get props(){return f(this.#t)}set props(e){M(this.#t,e)}}class k9{static create(e){return new k9(e,Nv.get())}opts;content;root;attachment;#e=_e(0);get prevScrollTop(){return f(this.#e)}set prevScrollTop(e){M(this.#e,e,!0)}constructor(e,t){this.opts=e,this.content=t,this.root=t.root,this.attachment=yn(e.ref,n=>{this.root.viewportNode=n})}#t=F(()=>({id:this.opts.id.current,role:"presentation",[this.root.getBitsAttr("viewport")]:"",style:{position:"relative",flex:1,overflow:"auto"},...this.attachment}));get props(){return f(this.#t)}set props(e){M(this.#t,e)}}class vU{opts;content;root;attachment;autoScrollTimer=null;userScrollTimer=-1;isUserScrolling=!1;onAutoScroll=xr;#e=_e(!1);get mounted(){return f(this.#e)}set mounted(e){M(this.#e,e,!0)}constructor(e,t){this.opts=e,this.content=t,this.root=t.root,this.attachment=yn(e.ref),nn([()=>this.mounted],()=>{if(!this.mounted){this.isUserScrolling=!1;return}this.isUserScrolling}),Nt(()=>{this.mounted||this.clearAutoScrollInterval()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this)}handleUserScroll(){this.content.domContext.clearTimeout(this.userScrollTimer),this.isUserScrolling=!0,this.userScrollTimer=this.content.domContext.setTimeout(()=>{this.isUserScrolling=!1},200)}clearAutoScrollInterval(){this.autoScrollTimer!==null&&(this.content.domContext.clearTimeout(this.autoScrollTimer),this.autoScrollTimer=null)}onpointerdown(e){if(this.autoScrollTimer!==null)return;const t=n=>{this.onAutoScroll(),this.autoScrollTimer=this.content.domContext.setTimeout(()=>t(n+1),this.opts.delay.current(n))};this.autoScrollTimer=this.content.domContext.setTimeout(()=>t(1),this.opts.delay.current(0))}onpointermove(e){this.onpointerdown(e)}onpointerleave(e){this.clearAutoScrollInterval()}#t=F(()=>({id:this.opts.id.current,"aria-hidden":oQ(!0),style:{flexShrink:0},onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return f(this.#t)}set props(e){M(this.#t,e)}}class M9{static create(e){return new M9(new vU(e,Nv.get()))}scrollButtonState;content;root;#e=_e(!1);get canScrollDown(){return f(this.#e)}set canScrollDown(e){M(this.#e,e,!0)}scrollIntoViewTimer=null;constructor(e){this.scrollButtonState=e,this.content=e.content,this.root=e.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,nn([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.root.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),jr(this.root.viewportNode,"scroll",()=>this.handleScroll())}),nn([()=>this.root.opts.inputValue.current,()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{!this.root.viewportNode||!this.content.isPositioned||this.handleScroll(!0)}),nn(()=>this.scrollButtonState.mounted,()=>{this.scrollButtonState.mounted&&(this.scrollIntoViewTimer&&clearTimeout(this.scrollIntoViewTimer),this.scrollIntoViewTimer=D5(5,()=>{this.root.highlightedNode?.scrollIntoView({block:this.root.opts.scrollAlignment.current})}))})}handleScroll=(e=!1)=>{if(e||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;const t=this.root.viewportNode.scrollHeight-this.root.viewportNode.clientHeight,n=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollDown=Math.ceil(this.root.viewportNode.scrollTop){const e=this.root.viewportNode,t=this.root.highlightedNode;!e||!t||(e.scrollTop=e.scrollTop+t.offsetHeight)};#t=F(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr("scroll-down-button")]:""}));get props(){return f(this.#t)}set props(e){M(this.#t,e)}}class D9{static create(e){return new D9(new vU(e,Nv.get()))}scrollButtonState;content;root;#e=_e(!1);get canScrollUp(){return f(this.#e)}set canScrollUp(e){M(this.#e,e,!0)}constructor(e){this.scrollButtonState=e,this.content=e.content,this.root=e.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,nn([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.root.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),jr(this.root.viewportNode,"scroll",()=>this.handleScroll())})}handleScroll=(e=!1)=>{if(e||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;const t=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollUp=this.root.viewportNode.scrollTop-t>.1};handleAutoScroll=()=>{!this.root.viewportNode||!this.root.highlightedNode||(this.root.viewportNode.scrollTop=this.root.viewportNode.scrollTop-this.root.highlightedNode.offsetHeight)};#t=F(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr("scroll-up-button")]:""}));get props(){return f(this.#t)}set props(e){M(this.#t,e)}}function _S(r,e){Ee(e,!0);let t=Y(e,"value",15);const n=I9.create({value:Pe(()=>t())});var a=se(),i=L(a);{var s=o=>{d9(o,ot(()=>n.props,{get autocomplete(){return e.autocomplete},get value(){return t()},set value(l){t(l)}}))};le(i,o=>{n.shouldRender&&o(s)})}T(r,a),we()}function sg(r,e){Ee(e,!0);let t=Y(e,"tooltip",3,!1);nb.create({id:Pe(()=>e.id),virtualEl:Pe(()=>e.virtualEl),ref:e.ref},t());var n=se(),a=L(n);ke(a,()=>e.children??$e),T(r,n),we()}var uee=Ku(''),dee=G("");function hee(r,e){Ee(e,!0);let t=Y(e,"id",19,Zf),n=Y(e,"width",3,10),a=Y(e,"height",3,5),i=Ye(e,["$$slots","$$events","$$legacy","id","children","child","width","height"]);const s=F(()=>vr(i,{id:t()}));var o=se(),l=L(o);{var c=d=>{var h=se(),p=L(h);ke(p,()=>e.child,()=>({props:f(s)})),T(d,h)},u=d=>{var h=dee();zt(h,()=>({...f(s)}));var p=j(h);{var m=b=>{var _=se(),v=L(_);ke(v,()=>e.children??$e),T(b,_)},g=b=>{var _=uee();Ce(()=>{er(_,"width",n()),er(_,"height",a())}),T(b,_)};le(p,b=>{e.children?b(m):b(g,!1)})}V(h),T(d,h)};le(l,d=>{e.child?d(c):d(u,!1)})}T(r,o),we()}function fee(r,e){Ee(e,!0);let t=Y(e,"id",19,Zf),n=Y(e,"ref",15,null),a=Ye(e,["$$slots","$$events","$$legacy","id","ref"]);const i=A9.create({id:Pe(()=>t()),ref:Pe(()=>n(),o=>n(o))}),s=F(()=>vr(a,i.props));hee(r,ot(()=>f(s))),we()}function pee(r,e){Ee(e,!0);let t=Y(e,"side",3,"bottom"),n=Y(e,"sideOffset",3,0),a=Y(e,"align",3,"center"),i=Y(e,"alignOffset",3,0),s=Y(e,"arrowPadding",3,0),o=Y(e,"avoidCollisions",3,!0),l=Y(e,"collisionBoundary",19,()=>[]),c=Y(e,"collisionPadding",3,0),u=Y(e,"hideWhenDetached",3,!1),d=Y(e,"onPlaced",3,()=>{}),h=Y(e,"sticky",3,"partial"),p=Y(e,"updatePositionStrategy",3,"optimized"),m=Y(e,"strategy",3,"fixed"),g=Y(e,"dir",3,"ltr"),b=Y(e,"style",19,()=>({})),_=Y(e,"wrapperId",19,Zf),v=Y(e,"customAnchor",3,null),y=Y(e,"tooltip",3,!1);const E=rb.create({side:Pe(()=>t()),sideOffset:Pe(()=>n()),align:Pe(()=>a()),alignOffset:Pe(()=>i()),id:Pe(()=>e.id),arrowPadding:Pe(()=>s()),avoidCollisions:Pe(()=>o()),collisionBoundary:Pe(()=>l()),collisionPadding:Pe(()=>c()),hideWhenDetached:Pe(()=>u()),onPlaced:Pe(()=>d()),sticky:Pe(()=>h()),updatePositionStrategy:Pe(()=>p()),strategy:Pe(()=>m()),dir:Pe(()=>g()),style:Pe(()=>b()),enabled:Pe(()=>e.enabled),wrapperId:Pe(()=>_()),customAnchor:Pe(()=>v())},y()),S=F(()=>vr(E.wrapperProps,{style:{pointerEvents:"auto"}}));var w=se(),C=L(w);ke(C,()=>e.content??$e,()=>({props:E.props,wrapperProps:f(S)})),T(r,w),we()}function mee(r,e){Ee(e,!0),bi(()=>{e.onPlaced?.()});var t=se(),n=L(t);ke(n,()=>e.content??$e,()=>({props:{},wrapperProps:{}})),T(r,t),we()}function gee(r,e){let t=Y(e,"isStatic",3,!1),n=Ye(e,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var a=se(),i=L(a);{var s=l=>{mee(l,{get content(){return e.content},get onPlaced(){return e.onPlaced}})},o=l=>{pee(l,ot({get content(){return e.content},get onPlaced(){return e.onPlaced}},()=>n))};le(i,l=>{t()?l(s):l(o,!1)})}T(r,a)}var _ee=G(" ",1);function yU(r,e){Ee(e,!0);let t=Y(e,"interactOutsideBehavior",3,"close"),n=Y(e,"trapFocus",3,!0),a=Y(e,"isValidEvent",3,()=>!1),i=Y(e,"customAnchor",3,null),s=Y(e,"isStatic",3,!1),o=Y(e,"tooltip",3,!1),l=Y(e,"contentPointerEvents",3,"auto"),c=Ye(e,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled","ref","tooltip","contentPointerEvents"]);gee(r,{get isStatic(){return s()},get id(){return e.id},get side(){return e.side},get sideOffset(){return e.sideOffset},get align(){return e.align},get alignOffset(){return e.alignOffset},get arrowPadding(){return e.arrowPadding},get avoidCollisions(){return e.avoidCollisions},get collisionBoundary(){return e.collisionBoundary},get collisionPadding(){return e.collisionPadding},get sticky(){return e.sticky},get hideWhenDetached(){return e.hideWhenDetached},get updatePositionStrategy(){return e.updatePositionStrategy},get strategy(){return e.strategy},get dir(){return e.dir},get wrapperId(){return e.wrapperId},get style(){return e.style},get onPlaced(){return e.onPlaced},get customAnchor(){return i()},get enabled(){return e.enabled},get tooltip(){return o()},content:(d,h)=>{let p=()=>h?.().props,m=()=>h?.().wrapperProps;var g=_ee(),b=L(g);{var _=E=>{Rf(E,{get preventScroll(){return e.preventScroll}})},v=E=>{var S=se(),w=L(S);{var C=x=>{Rf(x,{get preventScroll(){return e.preventScroll}})};le(w,x=>{e.forceMount||x(C)},!0)}T(E,S)};le(b,E=>{e.forceMount&&e.enabled?E(_):E(v,!1)})}var y=ee(b,2);i9(y,{get onOpenAutoFocus(){return e.onOpenAutoFocus},get onCloseAutoFocus(){return e.onCloseAutoFocus},get loop(){return e.loop},get enabled(){return e.enabled},get trapFocus(){return n()},get forceMount(){return e.forceMount},get ref(){return e.ref},focusScope:(S,w)=>{let C=()=>w?.().props;r9(S,{get onEscapeKeydown(){return e.onEscapeKeydown},get escapeKeydownBehavior(){return e.escapeKeydownBehavior},get enabled(){return e.enabled},get ref(){return e.ref},children:(x,N)=>{e9(x,{get id(){return e.id},get onInteractOutside(){return e.onInteractOutside},get onFocusOutside(){return e.onFocusOutside},get interactOutsideBehavior(){return t()},get isValidEvent(){return a()},get enabled(){return e.enabled},get ref(){return e.ref},children:(D,H)=>{let q=()=>H?.().props;o9(D,{get id(){return e.id},get preventOverflowTextSelection(){return e.preventOverflowTextSelection},get onPointerDown(){return e.onPointerDown},get onPointerUp(){return e.onPointerUp},get enabled(){return e.enabled},get ref(){return e.ref},children:($,K)=>{var z=se(),re=L(z);{let W=F(()=>({props:vr(c,p(),q(),C(),{style:{pointerEvents:l()}}),wrapperProps:m()}));ke(re,()=>e.popper??$e,()=>f(W))}T($,z)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),T(d,g)},$$slots:{content:!0}}),we()}function og(r,e){let t=Y(e,"interactOutsideBehavior",3,"close"),n=Y(e,"trapFocus",3,!0),a=Y(e,"isValidEvent",3,()=>!1),i=Y(e,"customAnchor",3,null),s=Y(e,"isStatic",3,!1),o=Ye(e,["$$slots","$$events","$$legacy","popper","open","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","ref","shouldRender"]);var l=se(),c=L(l);{var u=d=>{yU(d,ot({get popper(){return e.popper},get onEscapeKeydown(){return e.onEscapeKeydown},get escapeKeydownBehavior(){return e.escapeKeydownBehavior},get preventOverflowTextSelection(){return e.preventOverflowTextSelection},get id(){return e.id},get onPointerDown(){return e.onPointerDown},get onPointerUp(){return e.onPointerUp},get side(){return e.side},get sideOffset(){return e.sideOffset},get align(){return e.align},get alignOffset(){return e.alignOffset},get arrowPadding(){return e.arrowPadding},get avoidCollisions(){return e.avoidCollisions},get collisionBoundary(){return e.collisionBoundary},get collisionPadding(){return e.collisionPadding},get sticky(){return e.sticky},get hideWhenDetached(){return e.hideWhenDetached},get updatePositionStrategy(){return e.updatePositionStrategy},get strategy(){return e.strategy},get dir(){return e.dir},get preventScroll(){return e.preventScroll},get wrapperId(){return e.wrapperId},get style(){return e.style},get onPlaced(){return e.onPlaced},get customAnchor(){return i()},get isStatic(){return s()},get enabled(){return e.open},get onInteractOutside(){return e.onInteractOutside},get onCloseAutoFocus(){return e.onCloseAutoFocus},get onOpenAutoFocus(){return e.onOpenAutoFocus},get interactOutsideBehavior(){return t()},get loop(){return e.loop},get trapFocus(){return n()},get isValidEvent(){return a()},get onFocusOutside(){return e.onFocusOutside},forceMount:!1,get ref(){return e.ref}},()=>o))};le(c,d=>{e.shouldRender&&d(u)})}T(r,l)}function lg(r,e){let t=Y(e,"interactOutsideBehavior",3,"close"),n=Y(e,"trapFocus",3,!0),a=Y(e,"isValidEvent",3,()=>!1),i=Y(e,"customAnchor",3,null),s=Y(e,"isStatic",3,!1),o=Ye(e,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);yU(r,ot({get popper(){return e.popper},get onEscapeKeydown(){return e.onEscapeKeydown},get escapeKeydownBehavior(){return e.escapeKeydownBehavior},get preventOverflowTextSelection(){return e.preventOverflowTextSelection},get id(){return e.id},get onPointerDown(){return e.onPointerDown},get onPointerUp(){return e.onPointerUp},get side(){return e.side},get sideOffset(){return e.sideOffset},get align(){return e.align},get alignOffset(){return e.alignOffset},get arrowPadding(){return e.arrowPadding},get avoidCollisions(){return e.avoidCollisions},get collisionBoundary(){return e.collisionBoundary},get collisionPadding(){return e.collisionPadding},get sticky(){return e.sticky},get hideWhenDetached(){return e.hideWhenDetached},get updatePositionStrategy(){return e.updatePositionStrategy},get strategy(){return e.strategy},get dir(){return e.dir},get preventScroll(){return e.preventScroll},get wrapperId(){return e.wrapperId},get style(){return e.style},get onPlaced(){return e.onPlaced},get customAnchor(){return i()},get isStatic(){return s()},get enabled(){return e.enabled},get onInteractOutside(){return e.onInteractOutside},get onCloseAutoFocus(){return e.onCloseAutoFocus},get onOpenAutoFocus(){return e.onOpenAutoFocus},get interactOutsideBehavior(){return t()},get loop(){return e.loop},get trapFocus(){return n()},get isValidEvent(){return a()},get onFocusOutside(){return e.onFocusOutside}},()=>o,{forceMount:!0}))}var bee=G("
"),vee=G("
");function yee(r,e){const t=On();Ee(e,!0);let n=Y(e,"id",19,()=>Nn(t)),a=Y(e,"ref",15,null),i=Y(e,"forceMount",3,!1),s=Y(e,"side",3,"bottom"),o=Y(e,"onInteractOutside",3,xr),l=Y(e,"onEscapeKeydown",3,xr),c=Y(e,"preventScroll",3,!1),u=Ye(e,["$$slots","$$events","$$legacy","id","ref","forceMount","side","onInteractOutside","onEscapeKeydown","children","child","preventScroll","style"]);const d=O9.create({id:Pe(()=>n()),ref:Pe(()=>a(),_=>a(_)),onInteractOutside:Pe(()=>o()),onEscapeKeydown:Pe(()=>l())}),h=F(()=>vr(u,d.props));var p=se(),m=L(p);{var g=_=>{lg(_,ot(()=>f(h),()=>d.popperProps,{get ref(){return d.opts.ref},get side(){return s()},get enabled(){return d.root.opts.open.current},get id(){return n()},get preventScroll(){return c()},forceMount:!0,get shouldRender(){return d.shouldRender},popper:(y,E)=>{let S=()=>E?.().props,w=()=>E?.().wrapperProps;const C=F(()=>vr(S(),{style:d.props.style},{style:e.style}));var x=se(),N=L(x);{var I=H=>{var q=se(),$=L(q);{let K=F(()=>({props:f(C),wrapperProps:w(),...d.snippetProps}));ke($,()=>e.child,()=>f(K))}T(H,q)},D=H=>{var q=bee();zt(q,()=>({...w()}));var $=j(q);zt($,()=>({...f(C)}));var K=j($);ke(K,()=>e.children??$e),V($),V(q),T(H,q)};le(N,H=>{e.child?H(I):H(D,!1)})}T(y,x)},$$slots:{popper:!0}}))},b=_=>{var v=se(),y=L(v);{var E=S=>{og(S,ot(()=>f(h),()=>d.popperProps,{get ref(){return d.opts.ref},get side(){return s()},get open(){return d.root.opts.open.current},get id(){return n()},get preventScroll(){return c()},forceMount:!1,get shouldRender(){return d.shouldRender},popper:(C,x)=>{let N=()=>x?.().props,I=()=>x?.().wrapperProps;const D=F(()=>vr(N(),{style:d.props.style},{style:e.style}));var H=se(),q=L(H);{var $=z=>{var re=se(),W=L(re);{let ie=F(()=>({props:f(D),wrapperProps:I(),...d.snippetProps}));ke(W,()=>e.child,()=>f(ie))}T(z,re)},K=z=>{var re=vee();zt(re,()=>({...I()}));var W=j(re);zt(W,()=>({...f(D)}));var ie=j(W);ke(ie,()=>e.children??$e),V(W),V(re),T(z,re)};le(q,z=>{e.child?z($):z(K,!1)})}T(C,H)},$$slots:{popper:!0}}))};le(y,S=>{i()||S(E)},!0)}T(_,v)};le(m,_=>{i()?_(g):_(b,!1)})}T(r,p),we()}function P9(r,e){Ee(e,!0);let t=Y(e,"mounted",15,!1),n=Y(e,"onMountedChange",3,xr);FB(()=>(t(!0),n()(!0),()=>{t(!1),n()(!1)})),we()}var See=G("
"),Eee=G(" ",1);function wee(r,e){const t=On();Ee(e,!0);let n=Y(e,"id",19,()=>Nn(t)),a=Y(e,"ref",15,null),i=Y(e,"label",19,()=>e.value),s=Y(e,"disabled",3,!1),o=Y(e,"onHighlight",3,xr),l=Y(e,"onUnhighlight",3,xr),c=Ye(e,["$$slots","$$events","$$legacy","id","ref","value","label","disabled","children","child","onHighlight","onUnhighlight"]);const u=N9.create({id:Pe(()=>n()),ref:Pe(()=>a(),_=>a(_)),value:Pe(()=>e.value),disabled:Pe(()=>s()),label:Pe(()=>i()),onHighlight:Pe(()=>o()),onUnhighlight:Pe(()=>l())}),d=F(()=>vr(c,u.props));var h=Eee(),p=L(h);{var m=_=>{var v=se(),y=L(v);{let E=F(()=>({props:f(d),...u.snippetProps}));ke(y,()=>e.child,()=>f(E))}T(_,v)},g=_=>{var v=See();zt(v,()=>({...f(d)}));var y=j(v);ke(y,()=>e.children??$e,()=>u.snippetProps),V(v),T(_,v)};le(p,_=>{e.child?_(m):_(g,!1)})}var b=ee(p,2);P9(b,{get mounted(){return u.mounted},set mounted(_){u.mounted=_}}),T(r,h),we()}var Tee=G("
");function Cee(r,e){const t=On();Ee(e,!0);let n=Y(e,"id",19,()=>Nn(t)),a=Y(e,"ref",15,null),i=Ye(e,["$$slots","$$events","$$legacy","id","ref","children","child"]);const s=k9.create({id:Pe(()=>n()),ref:Pe(()=>a(),h=>a(h))}),o=F(()=>vr(i,s.props));var l=se(),c=L(l);{var u=h=>{var p=se(),m=L(p);ke(m,()=>e.child,()=>({props:f(o)})),T(h,p)},d=h=>{var p=Tee();zt(p,()=>({...f(o)}));var m=j(p);ke(m,()=>e.children??$e),V(p),T(h,p)};le(c,h=>{e.child?h(u):h(d,!1)})}T(r,l),we()}var Aee=G("
"),xee=G(" ",1);function Ree(r,e){const t=On();Ee(e,!0);let n=Y(e,"id",19,()=>Nn(t)),a=Y(e,"ref",15,null),i=Y(e,"delay",3,()=>50),s=Ye(e,["$$slots","$$events","$$legacy","id","ref","delay","child","children"]);const o=M9.create({id:Pe(()=>n()),ref:Pe(()=>a(),h=>a(h)),delay:Pe(()=>i())}),l=F(()=>vr(s,o.props));var c=se(),u=L(c);{var d=h=>{var p=xee(),m=L(p);P9(m,{get mounted(){return o.scrollButtonState.mounted},set mounted(v){o.scrollButtonState.mounted=v}});var g=ee(m,2);{var b=v=>{var y=se(),E=L(y);ke(E,()=>e.child,()=>({props:s})),T(v,y)},_=v=>{var y=Aee();zt(y,()=>({...f(l)}));var E=j(y);ke(E,()=>e.children??$e),V(y),T(v,y)};le(g,v=>{e.child?v(b):v(_,!1)})}T(h,p)};le(u,h=>{o.canScrollDown&&h(d)})}T(r,c),we()}var Oee=G("
"),Nee=G(" ",1);function Iee(r,e){const t=On();Ee(e,!0);let n=Y(e,"id",19,()=>Nn(t)),a=Y(e,"ref",15,null),i=Y(e,"delay",3,()=>50),s=Ye(e,["$$slots","$$events","$$legacy","id","ref","delay","child","children"]);const o=D9.create({id:Pe(()=>n()),ref:Pe(()=>a(),h=>a(h)),delay:Pe(()=>i())}),l=F(()=>vr(s,o.props));var c=se(),u=L(c);{var d=h=>{var p=Nee(),m=L(p);P9(m,{get mounted(){return o.scrollButtonState.mounted},set mounted(v){o.scrollButtonState.mounted=v}});var g=ee(m,2);{var b=v=>{var y=se(),E=L(y);ke(E,()=>e.child,()=>({props:s})),T(v,y)},_=v=>{var y=Oee();zt(y,()=>({...f(l)}));var E=j(y);ke(E,()=>e.children??$e),V(y),T(v,y)};le(g,v=>{e.child?v(b):v(_,!1)})}T(h,p)};le(u,h=>{o.canScrollUp&&h(d)})}T(r,c),we()}function kee(r,e){Ee(e,!0);let t=Y(e,"open",15,!1),n=Y(e,"onOpenChange",3,xr),a=Y(e,"onOpenChangeComplete",3,xr);SZ.create({open:Pe(()=>t(),i=>{t(i),n()?.(i)}),onOpenChangeComplete:Pe(()=>a())}),ag(r,{children:(i,s)=>{var o=se(),l=L(o);ke(l,()=>e.children??$e),T(i,o)},$$slots:{default:!0}}),we()}var Mee=G("
");function Dee(r,e){const t=On();Ee(e,!0);let n=Y(e,"ref",15,null),a=Y(e,"id",19,()=>Nn(t)),i=Y(e,"disabled",3,!1),s=Y(e,"onSelect",3,xr),o=Y(e,"closeOnSelect",3,!0),l=Ye(e,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","onSelect","closeOnSelect"]);const c=K5.create({id:Pe(()=>a()),disabled:Pe(()=>i()),onSelect:Pe(()=>s()),ref:Pe(()=>n(),g=>n(g)),closeOnSelect:Pe(()=>o())}),u=F(()=>vr(l,c.props));var d=se(),h=L(d);{var p=g=>{var b=se(),_=L(b);ke(_,()=>e.child,()=>({props:f(u)})),T(g,b)},m=g=>{var b=Mee();zt(b,()=>({...f(u)}));var _=j(b);ke(_,()=>e.children??$e),V(b),T(g,b)};le(h,g=>{e.child?g(p):g(m,!1)})}T(r,d),we()}var Pee=G("
");function Lee(r,e){const t=On();Ee(e,!0);let n=Y(e,"ref",15,null),a=Y(e,"id",19,()=>Nn(t)),i=Ye(e,["$$slots","$$events","$$legacy","ref","id","child","children"]);const s=Q5.create({id:Pe(()=>a()),ref:Pe(()=>n(),h=>n(h))}),o=F(()=>vr(i,s.props));var l=se(),c=L(l);{var u=h=>{var p=se(),m=L(p);ke(m,()=>e.child,()=>({props:f(o)})),T(h,p)},d=h=>{var p=Pee();zt(p,()=>({...f(o)}));var m=j(p);ke(m,()=>e.children??$e),V(p),T(h,p)};le(c,h=>{e.child?h(u):h(d,!1)})}T(r,l),we()}var Fee=G("
"),Bee=G("
");function Uee(r,e){const t=On();Ee(e,!0);let n=Y(e,"id",19,()=>Nn(t)),a=Y(e,"ref",15,null),i=Y(e,"loop",3,!0),s=Y(e,"onInteractOutside",3,xr),o=Y(e,"forceMount",3,!1),l=Y(e,"onEscapeKeydown",3,xr),c=Y(e,"interactOutsideBehavior",3,"defer-otherwise-close"),u=Y(e,"escapeKeydownBehavior",3,"defer-otherwise-close"),d=Y(e,"onOpenAutoFocus",3,xr),h=Y(e,"onCloseAutoFocus",3,xr),p=Y(e,"onFocusOutside",3,xr),m=Y(e,"side",3,"right"),g=Y(e,"trapFocus",3,!1),b=Ye(e,["$$slots","$$events","$$legacy","id","ref","children","child","loop","onInteractOutside","forceMount","onEscapeKeydown","interactOutsideBehavior","escapeKeydownBehavior","onOpenAutoFocus","onCloseAutoFocus","onFocusOutside","side","trapFocus","style"]);const _=Cv.create({id:Pe(()=>n()),loop:Pe(()=>i()),ref:Pe(()=>a(),$=>a($)),isSub:!0,onCloseAutoFocus:Pe(()=>w)});function v($){const K=$.currentTarget.contains($.target),z=$Q[_.parentMenu.root.opts.dir.current].includes($.key);K&&z&&(_.parentMenu.onClose(),_.parentMenu.triggerNode?.focus(),$.preventDefault())}const y=F(()=>_.parentMenu.root.getBitsAttr("sub-content")),E=F(()=>vr(b,_.props,{side:m(),onkeydown:v,[f(y)]:""}));function S($){d()($),!$.defaultPrevented&&($.preventDefault(),_.parentMenu.root.isUsingKeyboard&&_.parentMenu.contentNode&&W5.dispatch(_.parentMenu.contentNode))}function w($){h()($),!$.defaultPrevented&&$.preventDefault()}function C($){s()($),!$.defaultPrevented&&_.parentMenu.onClose()}function x($){l()($),!$.defaultPrevented&&_.parentMenu.onClose()}function N($){p()($),!$.defaultPrevented&&Io($.target)&&$.target.id!==_.parentMenu.triggerNode?.id&&_.parentMenu.onClose()}var I=se(),D=L(I);{var H=$=>{lg($,ot(()=>f(E),{get ref(){return _.opts.ref},get interactOutsideBehavior(){return c()},get escapeKeydownBehavior(){return u()},onOpenAutoFocus:S,get enabled(){return _.parentMenu.opts.open.current},onInteractOutside:C,onEscapeKeydown:x,onFocusOutside:N,preventScroll:!1,get loop(){return i()},get trapFocus(){return g()},get shouldRender(){return _.shouldRender},popper:(z,re)=>{let W=()=>re?.().props,ie=()=>re?.().wrapperProps;const k=F(()=>vr(W(),f(E),{style:Bc("menu")},{style:e.style}));var B=se(),te=L(B);{var O=U=>{var Q=se(),ne=L(Q);{let ue=F(()=>({props:f(k),wrapperProps:ie(),..._.snippetProps}));ke(ne,()=>e.child,()=>f(ue))}T(U,Q)},R=U=>{var Q=Fee();zt(Q,()=>({...ie()}));var ne=j(Q);zt(ne,()=>({...f(k)}));var ue=j(ne);ke(ue,()=>e.children??$e),V(ne),V(Q),T(U,Q)};le(te,U=>{e.child?U(O):U(R,!1)})}T(z,B)},$$slots:{popper:!0}}))},q=$=>{var K=se(),z=L(K);{var re=W=>{og(W,ot(()=>f(E),{get ref(){return _.opts.ref},get interactOutsideBehavior(){return c()},get escapeKeydownBehavior(){return u()},onCloseAutoFocus:w,onOpenAutoFocus:S,get open(){return _.parentMenu.opts.open.current},onInteractOutside:C,onEscapeKeydown:x,onFocusOutside:N,preventScroll:!1,get loop(){return i()},get trapFocus(){return g()},get shouldRender(){return _.shouldRender},popper:(k,B)=>{let te=()=>B?.().props,O=()=>B?.().wrapperProps;const R=F(()=>vr(te(),f(E),{style:Bc("menu")},{style:e.style}));var U=se(),Q=L(U);{var ne=he=>{var be=se(),Z=L(be);{let ae=F(()=>({props:f(R),wrapperProps:O(),..._.snippetProps}));ke(Z,()=>e.child,()=>f(ae))}T(he,be)},ue=he=>{var be=Bee();zt(be,()=>({...O()}));var Z=j(be);zt(Z,()=>({...f(R)}));var ae=j(Z);ke(ae,()=>e.children??$e),V(Z),V(be),T(he,be)};le(Q,he=>{e.child?he(ne):he(ue,!1)})}T(k,U)},$$slots:{popper:!0}}))};le(z,W=>{o()||W(re)},!0)}T($,K)};le(D,$=>{o()?$(H):$(q,!1)})}T(r,I),we()}var $ee=G("
");function Gee(r,e){const t=On();Ee(e,!0);let n=Y(e,"id",19,()=>Nn(t)),a=Y(e,"disabled",3,!1),i=Y(e,"ref",15,null),s=Y(e,"onSelect",3,xr),o=Y(e,"openDelay",3,100),l=Ye(e,["$$slots","$$events","$$legacy","id","disabled","ref","children","child","onSelect","openDelay"]);const c=X5.create({disabled:Pe(()=>a()),onSelect:Pe(()=>s()),id:Pe(()=>n()),ref:Pe(()=>i(),d=>i(d)),openDelay:Pe(()=>o())}),u=F(()=>vr(l,c.props));sg(r,{get id(){return n()},get ref(){return c.opts.ref},children:(d,h)=>{var p=se(),m=L(p);{var g=_=>{var v=se(),y=L(v);ke(y,()=>e.child,()=>({props:f(u)})),T(_,v)},b=_=>{var v=$ee();zt(v,()=>({...f(u)}));var y=j(v);ke(y,()=>e.children??$e),V(v),T(_,v)};le(m,_=>{e.child?_(g):_(b,!1)})}T(d,p)},$$slots:{default:!0}}),we()}function VR(r,e){const[t,n]=r;let a=!1;const i=e.length;for(let s=0,o=i-1;s=n!=d>=n&&t<=(u-l)*(n-c)/(d-c)+l&&(a=!a)}return a}function YR(r,e){return r[0]>=e.left&&r[0]<=e.right&&r[1]>=e.top&&r[1]<=e.bottom}function zee(r,e){const t=r.left+r.width/2,n=r.top+r.height/2,a=e.left+e.width/2,i=e.top+e.height/2,s=a-t,o=i-n;return Math.abs(s)>Math.abs(o)?s>0?"right":"left":o>0?"bottom":"top"}class SU{#e;#t;#r=null;#n=null;constructor(e){this.#e=e,this.#t=e.buffer??1,nn([e.triggerNode,e.contentNode,e.enabled],([t,n,a])=>{if(!t||!n||!a){this.#r=null,this.#n=null;return}const i=Qf(t),s=d=>{this.#i(d,t,n)},o=d=>{const h=d.relatedTarget;xc(h)&&n.contains(h)||(this.#r=[d.clientX,d.clientY],this.#n="content")},l=()=>{this.#r=null,this.#n=null},c=()=>{this.#r=null,this.#n=null},u=d=>{const h=d.relatedTarget;xc(h)&&t.contains(h)||(this.#r=[d.clientX,d.clientY],this.#n="trigger")};return[jr(i,"pointermove",s),jr(t,"pointerleave",o),jr(t,"pointerenter",l),jr(n,"pointerenter",c),jr(n,"pointerleave",u)].reduce((d,h)=>()=>{d(),h()},()=>{})})}#i(e,t,n){if(!this.#r||!this.#n)return;const a=[e.clientX,e.clientY],i=t.getBoundingClientRect(),s=n.getBoundingClientRect();if(this.#n==="content"&&YR(a,s)){this.#r=null,this.#n=null;return}if(this.#n==="trigger"&&YR(a,i)){this.#r=null,this.#n=null;return}const o=zee(i,s),l=this.#a(i,s,o);if(l&&VR(a,l))return;const c=this.#n==="content"?s:i,u=this.#s(this.#r,c,o,this.#n);VR(a,u)||(this.#r=null,this.#n=null,this.#e.onPointerExit())}#a(e,t,n){const a=this.#t;switch(n){case"top":return[[Math.min(e.left,t.left)-a,e.top],[Math.min(e.left,t.left)-a,t.bottom],[Math.max(e.right,t.right)+a,t.bottom],[Math.max(e.right,t.right)+a,e.top]];case"bottom":return[[Math.min(e.left,t.left)-a,e.bottom],[Math.min(e.left,t.left)-a,t.top],[Math.max(e.right,t.right)+a,t.top],[Math.max(e.right,t.right)+a,e.bottom]];case"left":return[[e.left,Math.min(e.top,t.top)-a],[t.right,Math.min(e.top,t.top)-a],[t.right,Math.max(e.bottom,t.bottom)+a],[e.left,Math.max(e.bottom,t.bottom)+a]];case"right":return[[e.right,Math.min(e.top,t.top)-a],[t.left,Math.min(e.top,t.top)-a],[t.left,Math.max(e.bottom,t.bottom)+a],[e.right,Math.max(e.bottom,t.bottom)+a]]}}#s(e,t,n,a){const i=this.#t*4,[s,o]=e;switch(a==="trigger"?this.#o(n):n){case"top":return[[s-i,o+i],[s+i,o+i],[t.right+i,t.bottom],[t.right+i,t.top],[t.left-i,t.top],[t.left-i,t.bottom]];case"bottom":return[[s-i,o-i],[s+i,o-i],[t.right+i,t.top],[t.right+i,t.bottom],[t.left-i,t.bottom],[t.left-i,t.top]];case"left":return[[s+i,o-i],[s+i,o+i],[t.right,t.bottom+i],[t.left,t.bottom+i],[t.left,t.top-i],[t.right,t.top-i]];case"right":return[[s-i,o-i],[s-i,o+i],[t.left,t.bottom+i],[t.right,t.bottom+i],[t.right,t.top-i],[t.left,t.top-i]]}}#o(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}}const i3=Hl({component:"popover",parts:["root","trigger","content","close","overlay"]}),L9=new ka("Popover.Root");class F9{static create(e){return L9.set(new F9(e))}opts;#e=_e(null);get contentNode(){return f(this.#e)}set contentNode(e){M(this.#e,e,!0)}contentPresence;#t=_e(null);get triggerNode(){return f(this.#t)}set triggerNode(e){M(this.#t,e,!0)}#r=_e(null);get overlayNode(){return f(this.#r)}set overlayNode(e){M(this.#r,e,!0)}overlayPresence;#n=_e(!1);get openedViaHover(){return f(this.#n)}set openedViaHover(e){M(this.#n,e,!0)}#i=_e(!1);get hasInteractedWithContent(){return f(this.#i)}set hasInteractedWithContent(e){M(this.#i,e,!0)}#a=_e(!1);get hoverCooldown(){return f(this.#a)}set hoverCooldown(e){M(this.#a,e,!0)}#s=_e(0);get closeDelay(){return f(this.#s)}set closeDelay(e){M(this.#s,e,!0)}#o=null;#l=null;constructor(e){this.opts=e,this.contentPresence=new ku({ref:Pe(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new ku({ref:Pe(()=>this.overlayNode),open:this.opts.open}),nn(()=>this.opts.open.current,t=>{t||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#c())})}setDomContext(e){this.#l=e}#c(){this.#o!==null&&this.#l&&(this.#l.clearTimeout(this.#o),this.#o=null)}toggleOpen(){this.#c(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#c(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#c(),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#c(),this.closeDelay<=0?this.opts.open.current=!1:this.#l&&(this.#o=this.#l.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#o=null},this.closeDelay))))}cancelDelayedClose(){this.#c()}markInteraction(){this.hasInteractedWithContent=!0,this.#c()}}class B9{static create(e){return new B9(e,L9.get())}opts;root;attachment;domContext;#e=null;#t=null;#r=_e(!1);constructor(e,t){this.opts=e,this.root=t,this.attachment=yn(this.opts.ref,n=>this.root.triggerNode=n),this.domContext=new Zc(e.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),nn(()=>this.opts.closeDelay.current,n=>{this.root.closeDelay=n})}#n(){this.#e!==null&&(this.domContext.clearTimeout(this.#e),this.#e=null)}#i(){this.#t!==null&&(this.domContext.clearTimeout(this.#t),this.#t=null)}#a(){this.#n(),this.#i()}onpointerenter(e){if(this.opts.disabled.current||!this.opts.openOnHover.current||Y_(e)||(M(this.#r,!0),this.#i(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;const t=this.opts.openDelay.current;t<=0?this.root.handleHoverOpen():this.#e=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#e=null},t)}onpointerleave(e){this.opts.disabled.current||this.opts.openOnHover.current&&(Y_(e)||(M(this.#r,!1),this.#n(),this.root.hoverCooldown=!1))}onclick(e){if(!this.opts.disabled.current&&e.button===0){if(this.#a(),f(this.#r)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}f(this.#r)&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(e){this.opts.disabled.current||(e.key===$l||e.key===no)&&(e.preventDefault(),this.#a(),this.root.toggleOpen())}#s(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#o=F(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":Dc(this.root.opts.open.current),"data-state":sl(this.root.opts.open.current),"aria-controls":this.#s(),[i3.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return f(this.#o)}set props(e){M(this.#o,e)}}class U9{static create(e){return new U9(e,L9.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=yn(this.opts.ref,n=>this.root.contentNode=n),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new SU({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(e){this.root.markInteraction()}onfocusin(e){const t=e.target;xc(t)&&wv(t)&&this.root.markInteraction()}onpointerenter(e){Y_(e)||this.root.cancelDelayedClose()}onpointerleave(e){Y_(e)}onInteractOutside=e=>{if(this.opts.onInteractOutside.current(e),e.defaultPrevented||!xc(e.target))return;const t=e.target.closest(i3.selector("trigger"));if(!(t&&t===this.root.triggerNode)){if(this.opts.customAnchor.current){if(xc(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(e.target))return}else if(typeof this.opts.customAnchor.current=="string"){const n=document.querySelector(this.opts.customAnchor.current);if(n&&n.contains(e.target))return}}this.root.handleClose()}};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#e=F(()=>({open:this.root.opts.open.current}));get snippetProps(){return f(this.#e)}set snippetProps(e){M(this.#e,e)}#t=F(()=>({id:this.opts.id.current,tabindex:-1,"data-state":sl(this.root.opts.open.current),[i3.content]:"",style:{pointerEvents:"auto",contain:"layout style paint"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return f(this.#t)}set props(e){M(this.#t,e)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}}var qee=G("
"),Hee=G("
");function Vee(r,e){const t=On();Ee(e,!0);let n=Y(e,"ref",15,null),a=Y(e,"id",19,()=>Nn(t)),i=Y(e,"forceMount",3,!1),s=Y(e,"onOpenAutoFocus",3,xr),o=Y(e,"onCloseAutoFocus",3,xr),l=Y(e,"onEscapeKeydown",3,xr),c=Y(e,"onInteractOutside",3,xr),u=Y(e,"trapFocus",3,!0),d=Y(e,"preventScroll",3,!1),h=Y(e,"customAnchor",3,null),p=Ye(e,["$$slots","$$events","$$legacy","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]);const m=U9.create({id:Pe(()=>a()),ref:Pe(()=>n(),w=>n(w)),onInteractOutside:Pe(()=>c()),onEscapeKeydown:Pe(()=>l()),customAnchor:Pe(()=>h())}),g=F(()=>vr(p,m.props)),b=F(()=>u()&&m.shouldTrapFocus);function _(w){m.shouldTrapFocus||w.preventDefault(),s()(w)}var v=se(),y=L(v);{var E=w=>{lg(w,ot(()=>f(g),()=>m.popperProps,{get ref(){return m.opts.ref},get enabled(){return m.root.opts.open.current},get id(){return a()},get trapFocus(){return f(b)},get preventScroll(){return d()},loop:!0,forceMount:!0,get customAnchor(){return h()},onOpenAutoFocus:_,get onCloseAutoFocus(){return o()},get shouldRender(){return m.shouldRender},popper:(x,N)=>{let I=()=>N?.().props,D=()=>N?.().wrapperProps;const H=F(()=>vr(I(),{style:Bc("popover")},{style:e.style}));var q=se(),$=L(q);{var K=re=>{var W=se(),ie=L(W);{let k=F(()=>({props:f(H),wrapperProps:D(),...m.snippetProps}));ke(ie,()=>e.child,()=>f(k))}T(re,W)},z=re=>{var W=qee();zt(W,()=>({...D()}));var ie=j(W);zt(ie,()=>({...f(H)}));var k=j(ie);ke(k,()=>e.children??$e),V(ie),V(W),T(re,W)};le($,re=>{e.child?re(K):re(z,!1)})}T(x,q)},$$slots:{popper:!0}}))},S=w=>{var C=se(),x=L(C);{var N=I=>{og(I,ot(()=>f(g),()=>m.popperProps,{get ref(){return m.opts.ref},get open(){return m.root.opts.open.current},get id(){return a()},get trapFocus(){return f(b)},get preventScroll(){return d()},loop:!0,forceMount:!1,get customAnchor(){return h()},onOpenAutoFocus:_,get onCloseAutoFocus(){return o()},get shouldRender(){return m.shouldRender},popper:(H,q)=>{let $=()=>q?.().props,K=()=>q?.().wrapperProps;const z=F(()=>vr($(),{style:Bc("popover")},{style:e.style}));var re=se(),W=L(re);{var ie=B=>{var te=se(),O=L(te);{let R=F(()=>({props:f(z),wrapperProps:K(),...m.snippetProps}));ke(O,()=>e.child,()=>f(R))}T(B,te)},k=B=>{var te=Hee();zt(te,()=>({...K()}));var O=j(te);zt(O,()=>({...f(z)}));var R=j(O);ke(R,()=>e.children??$e),V(O),V(te),T(B,te)};le(W,B=>{e.child?B(ie):B(k,!1)})}T(H,re)},$$slots:{popper:!0}}))};le(x,I=>{i()||I(N)},!0)}T(w,C)};le(y,w=>{i()?w(E):w(S,!1)})}T(r,v),we()}var Yee=G("");function Wee(r,e){const t=On();Ee(e,!0);let n=Y(e,"id",19,()=>Nn(t)),a=Y(e,"ref",15,null),i=Y(e,"type",3,"button"),s=Y(e,"disabled",3,!1),o=Y(e,"openOnHover",3,!1),l=Y(e,"openDelay",3,700),c=Y(e,"closeDelay",3,300),u=Ye(e,["$$slots","$$events","$$legacy","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]);const d=B9.create({id:Pe(()=>n()),ref:Pe(()=>a(),p=>a(p)),disabled:Pe(()=>!!s()),openOnHover:Pe(()=>o()),openDelay:Pe(()=>l()),closeDelay:Pe(()=>c())}),h=F(()=>vr(u,d.props,{type:i()}));sg(r,{get id(){return n()},get ref(){return d.opts.ref},children:(p,m)=>{var g=se(),b=L(g);{var _=y=>{var E=se(),S=L(E);ke(S,()=>e.child,()=>({props:f(h)})),T(y,E)},v=y=>{var E=Yee();zt(E,()=>({...f(h)}));var S=j(E);ke(S,()=>e.children??$e),V(E),T(y,E)};le(b,y=>{e.child?y(_):y(v,!1)})}T(p,g)},$$slots:{default:!0}}),we()}function $9(r,e){Ee(e,!0);let t=Y(e,"open",15,!1),n=Y(e,"onOpenChange",3,xr),a=Y(e,"onOpenChangeComplete",3,xr);Sv.create({variant:Pe(()=>"dialog"),open:Pe(()=>t(),o=>{t(o),n()(o)}),onOpenChangeComplete:Pe(()=>a())});var i=se(),s=L(i);ke(s,()=>e.children??$e),T(r,i),we()}var jee=G("");function G9(r,e){const t=On();Ee(e,!0);let n=Y(e,"id",19,()=>Nn(t)),a=Y(e,"ref",15,null),i=Y(e,"disabled",3,!1),s=Ye(e,["$$slots","$$events","$$legacy","children","child","id","ref","disabled"]);const o=F5.create({variant:Pe(()=>"close"),id:Pe(()=>n()),ref:Pe(()=>a(),p=>a(p)),disabled:Pe(()=>!!i())}),l=F(()=>vr(s,o.props));var c=se(),u=L(c);{var d=p=>{var m=se(),g=L(m);ke(g,()=>e.child,()=>({props:f(l)})),T(p,m)},h=p=>{var m=jee();zt(m,()=>({...f(l)}));var g=j(m);ke(g,()=>e.children??$e),V(m),T(p,m)};le(u,p=>{e.child?p(d):p(h,!1)})}T(r,c),we()}var Kee=G(" ",1),Xee=G("
",1);function z9(r,e){const t=On();Ee(e,!0);let n=Y(e,"id",19,()=>Nn(t)),a=Y(e,"ref",15,null),i=Y(e,"forceMount",3,!1),s=Y(e,"onCloseAutoFocus",3,xr),o=Y(e,"onOpenAutoFocus",3,xr),l=Y(e,"onEscapeKeydown",3,xr),c=Y(e,"onInteractOutside",3,xr),u=Y(e,"trapFocus",3,!0),d=Y(e,"preventScroll",3,!0),h=Y(e,"restoreScrollDelay",3,null),p=Ye(e,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const m=Ev.create({id:Pe(()=>n()),ref:Pe(()=>a(),y=>a(y))}),g=F(()=>vr(p,m.props));var b=se(),_=L(b);{var v=y=>{i9(y,{get ref(){return m.opts.ref},loop:!0,get trapFocus(){return u()},get enabled(){return m.root.opts.open.current},get onOpenAutoFocus(){return o()},get onCloseAutoFocus(){return s()},focusScope:(S,w)=>{let C=()=>w?.().props;r9(S,ot(()=>f(g),{get enabled(){return m.root.opts.open.current},get ref(){return m.opts.ref},onEscapeKeydown:x=>{l()(x),!x.defaultPrevented&&m.root.handleClose()},children:(x,N)=>{e9(x,ot(()=>f(g),{get ref(){return m.opts.ref},get enabled(){return m.root.opts.open.current},onInteractOutside:I=>{c()(I),!I.defaultPrevented&&m.root.handleClose()},children:(I,D)=>{o9(I,ot(()=>f(g),{get ref(){return m.opts.ref},get enabled(){return m.root.opts.open.current},children:(H,q)=>{var $=se(),K=L($);{var z=W=>{var ie=Kee(),k=L(ie);{var B=O=>{Rf(O,{get preventScroll(){return d()},get restoreScrollDelay(){return h()}})};le(k,O=>{m.root.opts.open.current&&O(B)})}var te=ee(k,2);{let O=F(()=>({props:vr(f(g),C()),...m.snippetProps}));ke(te,()=>e.child,()=>f(O))}T(W,ie)},re=W=>{var ie=Xee(),k=L(ie);Rf(k,{get preventScroll(){return d()}});var B=ee(k,2);zt(B,O=>({...O}),[()=>vr(f(g),C())]);var te=j(B);ke(te,()=>e.children??$e),V(B),T(W,ie)};le(K,W=>{e.child?W(z):W(re,!1)})}T(H,$)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};le(_,y=>{(m.shouldRender||i())&&y(v)})}T(r,b),we()}function Qee(r,e){Ee(e,!0);let t=Y(e,"open",15,!1),n=Y(e,"dir",3,"ltr"),a=Y(e,"onOpenChange",3,xr),i=Y(e,"onOpenChangeComplete",3,xr),s=Y(e,"_internal_variant",3,"dropdown-menu");const o=j5.create({variant:Pe(()=>s()),dir:Pe(()=>n()),onClose:()=>{t(!1),a()(!1)}});Tv.create({open:Pe(()=>t(),l=>{t(l),a()(l)}),onOpenChangeComplete:Pe(()=>i())},o),ag(r,{children:(l,c)=>{var u=se(),d=L(u);ke(d,()=>e.children??$e),T(l,u)},$$slots:{default:!0}}),we()}var Zee=G("
"),Jee=G("
");function ete(r,e){const t=On();Ee(e,!0);let n=Y(e,"id",19,()=>Nn(t)),a=Y(e,"ref",15,null),i=Y(e,"loop",3,!0),s=Y(e,"onInteractOutside",3,xr),o=Y(e,"onEscapeKeydown",3,xr),l=Y(e,"onCloseAutoFocus",3,xr),c=Y(e,"forceMount",3,!1),u=Y(e,"trapFocus",3,!1),d=Ye(e,["$$slots","$$events","$$legacy","id","child","children","ref","loop","onInteractOutside","onEscapeKeydown","onCloseAutoFocus","forceMount","trapFocus","style"]);const h=Cv.create({id:Pe(()=>n()),loop:Pe(()=>i()),ref:Pe(()=>a(),E=>a(E)),onCloseAutoFocus:Pe(()=>l())}),p=F(()=>vr(d,h.props));function m(E){if(h.handleInteractOutside(E),!E.defaultPrevented&&(s()(E),!E.defaultPrevented)){if(E.target&&E.target instanceof Element){const S=`[${h.parentMenu.root.getBitsAttr("sub-content")}]`;if(E.target.closest(S))return}h.parentMenu.onClose()}}function g(E){o()(E),!E.defaultPrevented&&h.parentMenu.onClose()}var b=se(),_=L(b);{var v=E=>{lg(E,ot(()=>f(p),()=>h.popperProps,{get ref(){return h.opts.ref},get enabled(){return h.parentMenu.opts.open.current},onInteractOutside:m,onEscapeKeydown:g,get trapFocus(){return u()},get loop(){return i()},forceMount:!0,get id(){return n()},get shouldRender(){return h.shouldRender},popper:(w,C)=>{let x=()=>C?.().props,N=()=>C?.().wrapperProps;const I=F(()=>vr(x(),{style:Bc("dropdown-menu")},{style:e.style}));var D=se(),H=L(D);{var q=K=>{var z=se(),re=L(z);{let W=F(()=>({props:f(I),wrapperProps:N(),...h.snippetProps}));ke(re,()=>e.child,()=>f(W))}T(K,z)},$=K=>{var z=Zee();zt(z,()=>({...N()}));var re=j(z);zt(re,()=>({...f(I)}));var W=j(re);ke(W,()=>e.children??$e),V(re),V(z),T(K,z)};le(H,K=>{e.child?K(q):K($,!1)})}T(w,D)},$$slots:{popper:!0}}))},y=E=>{var S=se(),w=L(S);{var C=x=>{og(x,ot(()=>f(p),()=>h.popperProps,{get ref(){return h.opts.ref},get open(){return h.parentMenu.opts.open.current},onInteractOutside:m,onEscapeKeydown:g,get trapFocus(){return u()},get loop(){return i()},forceMount:!1,get id(){return n()},get shouldRender(){return h.shouldRender},popper:(I,D)=>{let H=()=>D?.().props,q=()=>D?.().wrapperProps;const $=F(()=>vr(H(),{style:Bc("dropdown-menu")},{style:e.style}));var K=se(),z=L(K);{var re=ie=>{var k=se(),B=L(k);{let te=F(()=>({props:f($),wrapperProps:q(),...h.snippetProps}));ke(B,()=>e.child,()=>f(te))}T(ie,k)},W=ie=>{var k=Jee();zt(k,()=>({...q()}));var B=j(k);zt(B,()=>({...f($)}));var te=j(B);ke(te,()=>e.children??$e),V(B),V(k),T(ie,k)};le(z,ie=>{e.child?ie(re):ie(W,!1)})}T(I,K)},$$slots:{popper:!0}}))};le(w,x=>{c()||x(C)},!0)}T(E,S)};le(_,E=>{c()?E(v):E(y,!1)})}T(r,b),we()}var tte=G("");function rte(r,e){const t=On();Ee(e,!0);let n=Y(e,"id",19,()=>Nn(t)),a=Y(e,"ref",15,null),i=Y(e,"disabled",3,!1),s=Y(e,"type",3,"button"),o=Ye(e,["$$slots","$$events","$$legacy","id","ref","child","children","disabled","type"]);const l=Z5.create({id:Pe(()=>n()),disabled:Pe(()=>i()??!1),ref:Pe(()=>a(),u=>a(u))}),c=F(()=>vr(o,l.props,{type:s()}));sg(r,{get id(){return n()},get ref(){return l.opts.ref},children:(u,d)=>{var h=se(),p=L(h);{var m=b=>{var _=se(),v=L(_);ke(v,()=>e.child,()=>({props:f(c)})),T(b,_)},g=b=>{var _=tte();zt(_,()=>({...f(c)}));var v=j(_);ke(v,()=>e.children??$e),V(_),T(b,_)};le(p,b=>{e.child?b(m):b(g,!1)})}T(u,h)},$$slots:{default:!0}}),we()}const nte=Hl({component:"label",parts:["root"]});class q9{static create(e){return new q9(e)}opts;attachment;constructor(e){this.opts=e,this.attachment=yn(this.opts.ref),this.onmousedown=this.onmousedown.bind(this)}onmousedown(e){e.detail>1&&e.preventDefault()}#e=F(()=>({id:this.opts.id.current,[nte.root]:"",onmousedown:this.onmousedown,...this.attachment}));get props(){return f(this.#e)}set props(e){M(this.#e,e)}}var ate=G("");function ite(r,e){const t=On();Ee(e,!0);let n=Y(e,"id",19,()=>Nn(t)),a=Y(e,"ref",15,null),i=Ye(e,["$$slots","$$events","$$legacy","children","child","id","ref","for"]);const s=q9.create({id:Pe(()=>n()),ref:Pe(()=>a(),h=>a(h))}),o=F(()=>vr(i,s.props,{for:e.for}));var l=se(),c=L(l);{var u=h=>{var p=se(),m=L(p);ke(m,()=>e.child,()=>({props:f(o)})),T(h,p)},d=h=>{var p=ate();zt(p,()=>({...f(o),for:e.for}));var m=j(p);ke(m,()=>e.children??$e),V(p),T(h,p)};le(c,h=>{e.child?h(u):h(d,!1)})}T(r,l),we()}class Nf{#e;#t;constructor(e,t){this.#e=e,this.#t=t,this.handler=this.handler.bind(this),Nt(this.handler)}handler(){let e=0;const t=this.#e();if(!t)return;const n=new ResizeObserver(()=>{cancelAnimationFrame(e),e=window.requestAnimationFrame(this.#t)});return n.observe(t),()=>{window.cancelAnimationFrame(e),n.unobserve(t)}}}class EU{state;#e;constructor(e,t){this.state=os(e),this.#e=t,this.dispatch=this.dispatch.bind(this)}#t(e){return this.#e[this.state.current][e]??this.state.current}dispatch(e){this.state.current=this.#t(e)}}const WR=new WeakMap,ste=16,ote={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}};class lte{opts;#e=_e("none");get prevAnimationNameState(){return f(this.#e)}set prevAnimationNameState(e){M(this.#e,e,!0)}#t=_e(Sr({display:"",animationName:"none"}));get styles(){return f(this.#t)}set styles(e){M(this.#t,e,!0)}initialStatus;previousPresent;machine;present;constructor(e){this.opts=e,this.present=this.opts.open,this.initialStatus=e.open.current?"mounted":"unmounted",this.previousPresent=new LB(()=>this.present.current),this.machine=new EU(this.initialStatus,ote),this.handleAnimationEnd=this.handleAnimationEnd.bind(this),this.handleAnimationStart=this.handleAnimationStart.bind(this),cte(this),ute(this),dte(this)}handleAnimationEnd(e){if(!this.opts.ref.current)return;const t=this.styles.animationName||ab(this.opts.ref.current),n=t.includes(e.animationName)||t==="none";e.target===this.opts.ref.current&&n&&this.machine.dispatch("ANIMATION_END")}handleAnimationStart(e){if(this.opts.ref.current&&e.target===this.opts.ref.current){const t=ab(this.opts.ref.current,!0);this.prevAnimationNameState=t,this.styles.animationName=t}}#r=F(()=>["mounted","unmountSuspended"].includes(this.machine.state.current));get isPresent(){return f(this.#r)}set isPresent(e){M(this.#r,e)}}function cte(r){nn(()=>r.present.current,()=>{if(!r.opts.ref.current||!(r.present.current!==r.previousPresent.current))return;const t=r.prevAnimationNameState,n=ab(r.opts.ref.current,!0);if(r.styles.animationName=n,r.present.current)r.machine.dispatch("MOUNT");else if(n==="none"||r.styles.display==="none")r.machine.dispatch("UNMOUNT");else{const a=t!==n;r.previousPresent.current&&a?r.machine.dispatch("ANIMATION_OUT"):r.machine.dispatch("UNMOUNT")}})}function ute(r){nn(()=>r.machine.state.current,()=>{if(!r.opts.ref.current)return;const e=r.machine.state.current==="mounted"?ab(r.opts.ref.current,!0):"none";r.prevAnimationNameState=e,r.styles.animationName=e})}function dte(r){nn(()=>r.opts.ref.current,()=>{if(!r.opts.ref.current)return;const e=getComputedStyle(r.opts.ref.current);return r.styles={display:e.display,animationName:e.animationName||"none"},Ac(jr(r.opts.ref.current,"animationstart",r.handleAnimationStart),jr(r.opts.ref.current,"animationcancel",r.handleAnimationEnd),jr(r.opts.ref.current,"animationend",r.handleAnimationEnd))})}function ab(r,e=!1){if(!r)return"none";const t=performance.now(),n=WR.get(r);if(!e&&n&&t-n.timestampe.open),ref:e.ref});var n=se(),a=L(n);{var i=s=>{var o=se(),l=L(o);ke(l,()=>e.presence??$e,()=>({present:t.isPresent})),T(s,o)};le(a,s=>{(e.forceMount||e.open||t.isPresent)&&s(i)})}T(r,n),we()}function hte(r,e){Ee(e,!0);let t=Y(e,"open",15,!1),n=Y(e,"onOpenChange",3,xr),a=Y(e,"onOpenChangeComplete",3,xr);F9.create({open:Pe(()=>t(),i=>{t(i),n()(i)}),onOpenChangeComplete:Pe(()=>a())}),ag(r,{children:(i,s)=>{var o=se(),l=L(o);ke(l,()=>e.children??$e),T(i,o)},$$slots:{default:!0}}),we()}function fte(r,e,t){return Math.min(t,Math.max(e,r))}const cg=Hl({component:"scroll-area",parts:["root","viewport","corner","thumb","scrollbar"]}),ug=new ka("ScrollArea.Root"),dg=new ka("ScrollArea.Scrollbar"),kv=new ka("ScrollArea.ScrollbarVisible"),H9=new ka("ScrollArea.ScrollbarAxis"),wU=new ka("ScrollArea.ScrollbarShared");class V9{static create(e){return ug.set(new V9(e))}opts;attachment;#e=_e(null);get scrollAreaNode(){return f(this.#e)}set scrollAreaNode(e){M(this.#e,e,!0)}#t=_e(null);get viewportNode(){return f(this.#t)}set viewportNode(e){M(this.#t,e,!0)}#r=_e(null);get contentNode(){return f(this.#r)}set contentNode(e){M(this.#r,e,!0)}#n=_e(null);get scrollbarXNode(){return f(this.#n)}set scrollbarXNode(e){M(this.#n,e,!0)}#i=_e(null);get scrollbarYNode(){return f(this.#i)}set scrollbarYNode(e){M(this.#i,e,!0)}#a=_e(0);get cornerWidth(){return f(this.#a)}set cornerWidth(e){M(this.#a,e,!0)}#s=_e(0);get cornerHeight(){return f(this.#s)}set cornerHeight(e){M(this.#s,e,!0)}#o=_e(!1);get scrollbarXEnabled(){return f(this.#o)}set scrollbarXEnabled(e){M(this.#o,e,!0)}#l=_e(!1);get scrollbarYEnabled(){return f(this.#l)}set scrollbarYEnabled(e){M(this.#l,e,!0)}domContext;constructor(e){this.opts=e,this.attachment=yn(e.ref,t=>this.scrollAreaNode=t),this.domContext=new Zc(e.ref)}#c=F(()=>({id:this.opts.id.current,dir:this.opts.dir.current,style:{position:"relative","--bits-scroll-area-corner-height":`${this.cornerHeight}px`,"--bits-scroll-area-corner-width":`${this.cornerWidth}px`},[cg.root]:"",...this.attachment}));get props(){return f(this.#c)}set props(e){M(this.#c,e)}}class Y9{static create(e){return new Y9(e,ug.get())}opts;root;attachment;#e=os(Zf());#t=os(null);contentAttachment=yn(this.#t,e=>this.root.contentNode=e);constructor(e,t){this.opts=e,this.root=t,this.attachment=yn(e.ref,n=>this.root.viewportNode=n)}#r=F(()=>({id:this.opts.id.current,style:{overflowX:this.root.scrollbarXEnabled?"scroll":"hidden",overflowY:this.root.scrollbarYEnabled?"scroll":"hidden"},[cg.viewport]:"",...this.attachment}));get props(){return f(this.#r)}set props(e){M(this.#r,e)}#n=F(()=>({id:this.#e.current,"data-scroll-area-content":"",style:{minWidth:this.root.scrollbarXEnabled?"fit-content":void 0},...this.contentAttachment}));get contentProps(){return f(this.#n)}set contentProps(e){M(this.#n,e)}}class W9{static create(e){return dg.set(new W9(e,ug.get()))}opts;root;#e=F(()=>this.opts.orientation.current==="horizontal");get isHorizontal(){return f(this.#e)}set isHorizontal(e){M(this.#e,e)}#t=_e(!1);get hasThumb(){return f(this.#t)}set hasThumb(e){M(this.#t,e,!0)}constructor(e,t){this.opts=e,this.root=t,nn(()=>this.isHorizontal,n=>n?(this.root.scrollbarXEnabled=!0,()=>{this.root.scrollbarXEnabled=!1}):(this.root.scrollbarYEnabled=!0,()=>{this.root.scrollbarYEnabled=!1}))}}class j9{static create(){return new j9(dg.get())}scrollbar;root;#e=_e(!1);get isVisible(){return f(this.#e)}set isVisible(e){M(this.#e,e,!0)}constructor(e){this.scrollbar=e,this.root=e.root,Nt(()=>{const t=this.root.scrollAreaNode,n=this.root.opts.scrollHideDelay.current;let a=0;if(!t)return;const i=()=>{this.root.domContext.clearTimeout(a),Rn(()=>this.isVisible=!0)},s=()=>{a&&this.root.domContext.clearTimeout(a),a=this.root.domContext.setTimeout(()=>{Rn(()=>{this.scrollbar.hasThumb=!1,this.isVisible=!1})},n)},o=Ac(jr(t,"pointerenter",i),jr(t,"pointerleave",s));return()=>{this.root.domContext.getWindow().clearTimeout(a),o()}})}#t=F(()=>({"data-state":this.isVisible?"visible":"hidden"}));get props(){return f(this.#t)}set props(e){M(this.#t,e)}}class K9{static create(){return new K9(dg.get())}scrollbar;root;machine=new EU("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});#e=F(()=>this.machine.state.current==="hidden");get isHidden(){return f(this.#e)}set isHidden(e){M(this.#e,e)}constructor(e){this.scrollbar=e,this.root=e.root;const t=_v(()=>this.machine.dispatch("SCROLL_END"),100);Nt(()=>{const n=this.machine.state.current,a=this.root.opts.scrollHideDelay.current;if(n==="idle"){const i=this.root.domContext.setTimeout(()=>this.machine.dispatch("HIDE"),a);return()=>this.root.domContext.clearTimeout(i)}}),Nt(()=>{const n=this.root.viewportNode;if(!n)return;const a=this.scrollbar.isHorizontal?"scrollLeft":"scrollTop";let i=n[a];return jr(n,"scroll",()=>{const l=n[a];i!==l&&(this.machine.dispatch("SCROLL"),t()),i=l})}),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this)}onpointerenter(e){this.machine.dispatch("POINTER_ENTER")}onpointerleave(e){this.machine.dispatch("POINTER_LEAVE")}#t=F(()=>({"data-state":this.machine.state.current==="hidden"?"hidden":"visible",onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave}));get props(){return f(this.#t)}set props(e){M(this.#t,e)}}class Mv{static create(){return new Mv(dg.get())}scrollbar;root;#e=_e(!1);get isVisible(){return f(this.#e)}set isVisible(e){M(this.#e,e,!0)}constructor(e){this.scrollbar=e,this.root=e.root;const t=_v(()=>{const n=this.root.viewportNode;if(!n)return;const a=n.offsetWidththis.root.viewportNode,t),new Nf(()=>this.root.contentNode,t)}#t=F(()=>({"data-state":this.isVisible?"visible":"hidden"}));get props(){return f(this.#t)}set props(e){M(this.#t,e)}}class X9{static create(){return kv.set(new X9(dg.get()))}scrollbar;root;#e=_e(null);get thumbNode(){return f(this.#e)}set thumbNode(e){M(this.#e,e,!0)}#t=_e(0);get pointerOffset(){return f(this.#t)}set pointerOffset(e){M(this.#t,e,!0)}#r=_e({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}});get sizes(){return f(this.#r)}set sizes(e){M(this.#r,e)}#n=F(()=>TU(this.sizes.viewport,this.sizes.content));get thumbRatio(){return f(this.#n)}set thumbRatio(e){M(this.#n,e)}#i=F(()=>this.thumbRatio>0&&this.thumbRatio<1);get hasThumb(){return f(this.#i)}set hasThumb(e){M(this.#i,e)}#a=_e("");get prevTransformStyle(){return f(this.#a)}set prevTransformStyle(e){M(this.#a,e,!0)}constructor(e){this.scrollbar=e,this.root=e.root,Nt(()=>{this.scrollbar.hasThumb=this.hasThumb}),Nt(()=>{!this.scrollbar.hasThumb&&this.thumbNode&&(this.prevTransformStyle=this.thumbNode.style.transform)})}setSizes(e){this.sizes=e}getScrollPosition(e,t){return pte({pointerPos:e,pointerOffset:this.pointerOffset,sizes:this.sizes,dir:t})}onThumbPointerUp(){this.pointerOffset=0}onThumbPointerDown(e){this.pointerOffset=e}xOnThumbPositionChange(){if(!(this.root.viewportNode&&this.thumbNode))return;const e=this.root.viewportNode.scrollLeft,n=`translate3d(${jR({scrollPos:e,sizes:this.sizes,dir:this.root.opts.dir.current})}px, 0, 0)`;this.thumbNode.style.transform=n,this.prevTransformStyle=n}xOnWheelScroll(e){this.root.viewportNode&&(this.root.viewportNode.scrollLeft=e)}xOnDragScroll(e){this.root.viewportNode&&(this.root.viewportNode.scrollLeft=this.getScrollPosition(e,this.root.opts.dir.current))}yOnThumbPositionChange(){if(!(this.root.viewportNode&&this.thumbNode))return;const e=this.root.viewportNode.scrollTop,n=`translate3d(0, ${jR({scrollPos:e,sizes:this.sizes})}px, 0)`;this.thumbNode.style.transform=n,this.prevTransformStyle=n}yOnWheelScroll(e){this.root.viewportNode&&(this.root.viewportNode.scrollTop=e)}yOnDragScroll(e){this.root.viewportNode&&(this.root.viewportNode.scrollTop=this.getScrollPosition(e,this.root.opts.dir.current))}}class Q9{static create(e){return H9.set(new Q9(e,kv.get()))}opts;scrollbarVis;root;scrollbar;attachment;#e=_e();get computedStyle(){return f(this.#e)}set computedStyle(e){M(this.#e,e,!0)}constructor(e,t){this.opts=e,this.scrollbarVis=t,this.root=t.root,this.scrollbar=t.scrollbar,this.attachment=yn(this.scrollbar.opts.ref,n=>this.root.scrollbarXNode=n),Nt(()=>{this.scrollbar.opts.ref.current&&this.opts.mounted.current&&(this.computedStyle=getComputedStyle(this.scrollbar.opts.ref.current))}),Nt(()=>{this.onResize()})}onThumbPointerDown=e=>{this.scrollbarVis.onThumbPointerDown(e.x)};onDragScroll=e=>{this.scrollbarVis.xOnDragScroll(e.x)};onThumbPointerUp=()=>{this.scrollbarVis.onThumbPointerUp()};onThumbPositionChange=()=>{this.scrollbarVis.xOnThumbPositionChange()};onWheelScroll=(e,t)=>{if(!this.root.viewportNode)return;const n=this.root.viewportNode.scrollLeft+e.deltaX;this.scrollbarVis.xOnWheelScroll(n),AU(n,t)&&e.preventDefault()};onResize=()=>{this.scrollbar.opts.ref.current&&this.root.viewportNode&&this.computedStyle&&this.scrollbarVis.setSizes({content:this.root.viewportNode.scrollWidth,viewport:this.root.viewportNode.offsetWidth,scrollbar:{size:this.scrollbar.opts.ref.current.clientWidth,paddingStart:ib(this.computedStyle.paddingLeft),paddingEnd:ib(this.computedStyle.paddingRight)}})};#t=F(()=>Dv(this.scrollbarVis.sizes));get thumbSize(){return f(this.#t)}set thumbSize(e){M(this.#t,e)}#r=F(()=>({id:this.scrollbar.opts.id.current,"data-orientation":"horizontal",style:{bottom:0,left:this.root.opts.dir.current==="rtl"?"var(--bits-scroll-area-corner-width)":0,right:this.root.opts.dir.current==="ltr"?"var(--bits-scroll-area-corner-width)":0,"--bits-scroll-area-thumb-width":`${this.thumbSize}px`},...this.attachment}));get props(){return f(this.#r)}set props(e){M(this.#r,e)}}class Z9{static create(e){return H9.set(new Z9(e,kv.get()))}opts;scrollbarVis;root;scrollbar;attachment;#e=_e();get computedStyle(){return f(this.#e)}set computedStyle(e){M(this.#e,e,!0)}constructor(e,t){this.opts=e,this.scrollbarVis=t,this.root=t.root,this.scrollbar=t.scrollbar,this.attachment=yn(this.scrollbar.opts.ref,n=>this.root.scrollbarYNode=n),Nt(()=>{this.scrollbar.opts.ref.current&&this.opts.mounted.current&&(this.computedStyle=getComputedStyle(this.scrollbar.opts.ref.current))}),Nt(()=>{this.onResize()}),this.onThumbPointerDown=this.onThumbPointerDown.bind(this),this.onDragScroll=this.onDragScroll.bind(this),this.onThumbPointerUp=this.onThumbPointerUp.bind(this),this.onThumbPositionChange=this.onThumbPositionChange.bind(this),this.onWheelScroll=this.onWheelScroll.bind(this),this.onResize=this.onResize.bind(this)}onThumbPointerDown(e){this.scrollbarVis.onThumbPointerDown(e.y)}onDragScroll(e){this.scrollbarVis.yOnDragScroll(e.y)}onThumbPointerUp(){this.scrollbarVis.onThumbPointerUp()}onThumbPositionChange(){this.scrollbarVis.yOnThumbPositionChange()}onWheelScroll(e,t){if(!this.root.viewportNode)return;const n=this.root.viewportNode.scrollTop+e.deltaY;this.scrollbarVis.yOnWheelScroll(n),AU(n,t)&&e.preventDefault()}onResize(){this.scrollbar.opts.ref.current&&this.root.viewportNode&&this.computedStyle&&this.scrollbarVis.setSizes({content:this.root.viewportNode.scrollHeight,viewport:this.root.viewportNode.offsetHeight,scrollbar:{size:this.scrollbar.opts.ref.current.clientHeight,paddingStart:ib(this.computedStyle.paddingTop),paddingEnd:ib(this.computedStyle.paddingBottom)}})}#t=F(()=>Dv(this.scrollbarVis.sizes));get thumbSize(){return f(this.#t)}set thumbSize(e){M(this.#t,e)}#r=F(()=>({id:this.scrollbar.opts.id.current,"data-orientation":"vertical",style:{top:0,right:this.root.opts.dir.current==="ltr"?0:void 0,left:this.root.opts.dir.current==="rtl"?0:void 0,bottom:"var(--bits-scroll-area-corner-height)","--bits-scroll-area-thumb-height":`${this.thumbSize}px`},...this.attachment}));get props(){return f(this.#r)}set props(e){M(this.#r,e)}}class J9{static create(){return wU.set(new J9(H9.get()))}scrollbarState;root;scrollbarVis;scrollbar;#e=_e(null);get rect(){return f(this.#e)}set rect(e){M(this.#e,e)}#t=_e("");get prevWebkitUserSelect(){return f(this.#t)}set prevWebkitUserSelect(e){M(this.#t,e,!0)}handleResize;handleThumbPositionChange;handleWheelScroll;handleThumbPointerDown;handleThumbPointerUp;#r=F(()=>this.scrollbarVis.sizes.content-this.scrollbarVis.sizes.viewport);get maxScrollPos(){return f(this.#r)}set maxScrollPos(e){M(this.#r,e)}constructor(e){this.scrollbarState=e,this.root=e.root,this.scrollbarVis=e.scrollbarVis,this.scrollbar=e.scrollbarVis.scrollbar,this.handleResize=_v(()=>this.scrollbarState.onResize(),10),this.handleThumbPositionChange=this.scrollbarState.onThumbPositionChange,this.handleWheelScroll=this.scrollbarState.onWheelScroll,this.handleThumbPointerDown=this.scrollbarState.onThumbPointerDown,this.handleThumbPointerUp=this.scrollbarState.onThumbPointerUp,Nt(()=>{const t=this.maxScrollPos,n=this.scrollbar.opts.ref.current;this.root.viewportNode;const a=s=>{const o=s.target;n?.contains(o)&&this.handleWheelScroll(s,t)};return jr(this.root.domContext.getDocument(),"wheel",a,{passive:!1})}),Gi(()=>{this.scrollbarVis.sizes,Rn(()=>this.handleThumbPositionChange())}),new Nf(()=>this.scrollbar.opts.ref.current,this.handleResize),new Nf(()=>this.root.contentNode,this.handleResize),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onlostpointercapture=this.onlostpointercapture.bind(this)}handleDragScroll(e){if(!this.rect)return;const t=e.clientX-this.rect.left,n=e.clientY-this.rect.top;this.scrollbarState.onDragScroll({x:t,y:n})}#n(){this.rect!==null&&(this.root.domContext.getDocument().body.style.webkitUserSelect=this.prevWebkitUserSelect,this.root.viewportNode&&(this.root.viewportNode.style.scrollBehavior=""),this.rect=null)}onpointerdown(e){if(e.button!==0)return;e.target.setPointerCapture(e.pointerId),this.rect=this.scrollbar.opts.ref.current?.getBoundingClientRect()??null,this.prevWebkitUserSelect=this.root.domContext.getDocument().body.style.webkitUserSelect,this.root.domContext.getDocument().body.style.webkitUserSelect="none",this.root.viewportNode&&(this.root.viewportNode.style.scrollBehavior="auto"),this.handleDragScroll(e)}onpointermove(e){this.handleDragScroll(e)}onpointerup(e){const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),this.#n()}onlostpointercapture(e){this.#n()}#i=F(()=>vr({...this.scrollbarState.props,style:{position:"absolute",...this.scrollbarState.props.style},[cg.scrollbar]:"",onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerup:this.onpointerup,onlostpointercapture:this.onlostpointercapture}));get props(){return f(this.#i)}set props(e){M(this.#i,e)}}class e4{static create(e){return new e4(e,wU.get())}opts;scrollbarState;attachment;#e;#t=_e();#r=_v(()=>{f(this.#t)&&(f(this.#t)(),M(this.#t,void 0))},100);constructor(e,t){this.opts=e,this.scrollbarState=t,this.#e=t.root,this.attachment=yn(this.opts.ref,n=>this.scrollbarState.scrollbarVis.thumbNode=n),Nt(()=>{const n=this.#e.viewportNode;if(!n)return;const a=()=>{if(this.#r(),!f(this.#t)){const s=mte(n,this.scrollbarState.handleThumbPositionChange);M(this.#t,s,!0),this.scrollbarState.handleThumbPositionChange()}};return Rn(()=>this.scrollbarState.handleThumbPositionChange()),jr(n,"scroll",a)}),this.onpointerdowncapture=this.onpointerdowncapture.bind(this),this.onpointerup=this.onpointerup.bind(this)}onpointerdowncapture(e){const t=e.target;if(!t)return;const n=t.getBoundingClientRect(),a=e.clientX-n.left,i=e.clientY-n.top;this.scrollbarState.handleThumbPointerDown({x:a,y:i})}onpointerup(e){this.scrollbarState.handleThumbPointerUp()}#n=F(()=>({id:this.opts.id.current,"data-state":this.scrollbarState.scrollbarVis.hasThumb?"visible":"hidden",style:{width:"var(--bits-scroll-area-thumb-width)",height:"var(--bits-scroll-area-thumb-height)",transform:this.scrollbarState.scrollbarVis.prevTransformStyle},onpointerdowncapture:this.onpointerdowncapture,onpointerup:this.onpointerup,[cg.thumb]:"",...this.attachment}));get props(){return f(this.#n)}set props(e){M(this.#n,e)}}class t4{static create(e){return new t4(e,ug.get())}opts;root;attachment;#e=_e(0);#t=_e(0);#r=F(()=>!!(f(this.#e)&&f(this.#t)));get hasSize(){return f(this.#r)}set hasSize(e){M(this.#r,e)}constructor(e,t){this.opts=e,this.root=t,this.attachment=yn(this.opts.ref),new Nf(()=>this.root.scrollbarXNode,()=>{const n=this.root.scrollbarXNode?.offsetHeight||0;this.root.cornerHeight=n,M(this.#t,n,!0)}),new Nf(()=>this.root.scrollbarYNode,()=>{const n=this.root.scrollbarYNode?.offsetWidth||0;this.root.cornerWidth=n,M(this.#e,n,!0)})}#n=F(()=>({id:this.opts.id.current,style:{width:f(this.#e),height:f(this.#t),position:"absolute",right:this.root.opts.dir.current==="ltr"?0:void 0,left:this.root.opts.dir.current==="rtl"?0:void 0,bottom:0},[cg.corner]:"",...this.attachment}));get props(){return f(this.#n)}set props(e){M(this.#n,e)}}function ib(r){return r?Number.parseInt(r,10):0}function TU(r,e){const t=r/e;return Number.isNaN(t)?0:t}function Dv(r){const e=TU(r.viewport,r.content),t=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,n=(r.scrollbar.size-t)*e;return Math.max(n,18)}function pte({pointerPos:r,pointerOffset:e,sizes:t,dir:n="ltr"}){const a=Dv(t),i=a/2,s=e||i,o=a-s,l=t.scrollbar.paddingStart+s,c=t.scrollbar.size-t.scrollbar.paddingEnd-o,u=t.content-t.viewport,d=n==="ltr"?[0,u]:[u*-1,0];return CU([l,c],d)(r)}function jR({scrollPos:r,sizes:e,dir:t="ltr"}){const n=Dv(e),a=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=e.scrollbar.size-a,s=e.content-e.viewport,o=i-n,l=t==="ltr"?[0,s]:[s*-1,0],c=fte(r,l[0],l[1]);return CU([0,s],[0,o])(c)}function CU(r,e){return t=>{if(r[0]===r[1]||e[0]===e[1])return e[0];const n=(e[1]-e[0])/(r[1]-r[0]);return e[0]+n*(t-r[0])}}function AU(r,e){return r>0&&ra.cancelAnimationFrame(n)}var gte=G("
");function _te(r,e){const t=On();Ee(e,!0);let n=Y(e,"ref",15,null),a=Y(e,"id",19,()=>Nn(t)),i=Y(e,"type",3,"hover"),s=Y(e,"dir",3,"ltr"),o=Y(e,"scrollHideDelay",3,600),l=Ye(e,["$$slots","$$events","$$legacy","ref","id","type","dir","scrollHideDelay","children","child"]);const c=V9.create({type:Pe(()=>i()),dir:Pe(()=>s()),scrollHideDelay:Pe(()=>o()),id:Pe(()=>a()),ref:Pe(()=>n(),g=>n(g))}),u=F(()=>vr(l,c.props));var d=se(),h=L(d);{var p=g=>{var b=se(),_=L(b);ke(_,()=>e.child,()=>({props:f(u)})),T(g,b)},m=g=>{var b=gte();zt(b,()=>({...f(u)}));var _=j(b);ke(_,()=>e.children??$e),V(b),T(g,b)};le(h,g=>{e.child?g(p):g(m,!1)})}T(r,d),we()}var bte=G("
");function vte(r,e){const t=On();Ee(e,!0);let n=Y(e,"ref",15,null),a=Y(e,"id",19,()=>Nn(t)),i=Ye(e,["$$slots","$$events","$$legacy","ref","id","children"]);const s=Y9.create({id:Pe(()=>a()),ref:Pe(()=>n(),h=>n(h))}),o=F(()=>vr(i,s.props)),l=F(()=>vr({},s.contentProps));var c=bte();zt(c,()=>({...f(o)}));var u=j(c);zt(u,()=>({...f(l)}));var d=j(u);ke(d,()=>e.children??$e),V(u),V(c),T(r,c),we()}var yte=G("
");function xU(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy","child","children"]);const n=J9.create(),a=F(()=>vr(t,n.props));var i=se(),s=L(i);{var o=c=>{var u=se(),d=L(u);ke(d,()=>e.child,()=>({props:f(a)})),T(c,u)},l=c=>{var u=yte();zt(u,()=>({...f(a)}));var d=j(u);ke(d,()=>e.children??$e),V(u),T(c,u)};le(s,c=>{e.child?c(o):c(l,!1)})}T(r,i),we()}function Ste(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=new M5,a=Q9.create({mounted:Pe(()=>n.current)}),i=F(()=>vr(t,a.props));xU(r,ot(()=>f(i))),we()}function Ete(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=new M5,a=Z9.create({mounted:Pe(()=>n.current)}),i=F(()=>vr(t,a.props));xU(r,ot(()=>f(i))),we()}function Pv(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=X9.create();var a=se(),i=L(a);{var s=l=>{Ste(l,ot(()=>t))},o=l=>{Ete(l,ot(()=>t))};le(i,l=>{n.scrollbar.opts.orientation.current==="horizontal"?l(s):l(o,!1)})}T(r,a),we()}function wte(r,e){Ee(e,!0);let t=Y(e,"forceMount",3,!1),n=Ye(e,["$$slots","$$events","$$legacy","forceMount"]);const a=Mv.create(),i=F(()=>vr(n,a.props));{const s=l=>{Pv(l,ot(()=>f(i)))};let o=F(()=>t()||a.isVisible);Iv(r,{get open(){return f(o)},get ref(){return a.scrollbar.opts.ref},presence:s,$$slots:{presence:!0}})}we()}function Tte(r,e){Ee(e,!0);let t=Y(e,"forceMount",3,!1),n=Ye(e,["$$slots","$$events","$$legacy","forceMount"]);const a=K9.create(),i=F(()=>vr(n,a.props));{const s=l=>{Pv(l,ot(()=>f(i)))};let o=F(()=>t()||!a.isHidden);Iv(r,ot(()=>f(i),{get open(){return f(o)},get ref(){return a.scrollbar.opts.ref},presence:s,$$slots:{presence:!0}}))}we()}function Cte(r,e){Ee(e,!0);let t=Y(e,"forceMount",3,!1),n=Ye(e,["$$slots","$$events","$$legacy","forceMount"]);const a=j9.create(),i=Mv.create(),s=F(()=>vr(n,a.props,i.props,{"data-state":a.isVisible?"visible":"hidden"})),o=F(()=>t()||a.isVisible&&i.isVisible);Iv(r,{get open(){return f(o)},get ref(){return i.scrollbar.opts.ref},presence:c=>{Pv(c,ot(()=>f(s)))},$$slots:{presence:!0}}),we()}function Ate(r,e){const t=On();Ee(e,!0);let n=Y(e,"ref",15,null),a=Y(e,"id",19,()=>Nn(t)),i=Ye(e,["$$slots","$$events","$$legacy","ref","id","orientation"]);const s=W9.create({orientation:Pe(()=>e.orientation),id:Pe(()=>a()),ref:Pe(()=>n(),h=>n(h))}),o=F(()=>s.root.opts.type.current);var l=se(),c=L(l);{var u=h=>{Cte(h,ot(()=>i,{get id(){return a()}}))},d=h=>{var p=se(),m=L(p);{var g=_=>{Tte(_,ot(()=>i,{get id(){return a()}}))},b=_=>{var v=se(),y=L(v);{var E=w=>{wte(w,ot(()=>i,{get id(){return a()}}))},S=w=>{var C=se(),x=L(C);{var N=I=>{Pv(I,ot(()=>i,{get id(){return a()}}))};le(x,I=>{f(o)==="always"&&I(N)},!0)}T(w,C)};le(y,w=>{f(o)==="auto"?w(E):w(S,!1)},!0)}T(_,v)};le(m,_=>{f(o)==="scroll"?_(g):_(b,!1)},!0)}T(h,p)};le(c,h=>{f(o)==="hover"?h(u):h(d,!1)})}T(r,l),we()}var xte=G("
");function Rte(r,e){Ee(e,!0);let t=Y(e,"ref",15,null),n=Ye(e,["$$slots","$$events","$$legacy","ref","id","child","children","present"]);const a=new M5,i=e4.create({id:Pe(()=>e.id),ref:Pe(()=>t(),d=>t(d)),mounted:Pe(()=>a.current)}),s=F(()=>vr(n,i.props,{style:{hidden:!e.present}}));var o=se(),l=L(o);{var c=d=>{var h=se(),p=L(h);ke(p,()=>e.child,()=>({props:f(s)})),T(d,h)},u=d=>{var h=xte();zt(h,()=>({...f(s)}));var p=j(h);ke(p,()=>e.children??$e),V(h),T(d,h)};le(l,d=>{e.child?d(c):d(u,!1)})}T(r,o),we()}function Ote(r,e){const t=On();Ee(e,!0);let n=Y(e,"id",19,()=>Nn(t)),a=Y(e,"ref",15,null),i=Y(e,"forceMount",3,!1),s=Ye(e,["$$slots","$$events","$$legacy","id","ref","forceMount"]);const o=kv.get();{const l=(u,d)=>{let h=()=>d?.().present;Rte(u,ot(()=>s,{get id(){return n()},get present(){return h()},get ref(){return a()},set ref(p){a(p)}}))};let c=F(()=>i()||o.hasThumb);Iv(r,{get open(){return f(c)},get ref(){return o.scrollbar.opts.ref},presence:l,$$slots:{presence:!0}})}we()}var Nte=G("
");function Ite(r,e){Ee(e,!0);let t=Y(e,"ref",15,null),n=Ye(e,["$$slots","$$events","$$legacy","ref","id","children","child"]);const a=t4.create({id:Pe(()=>e.id),ref:Pe(()=>t(),u=>t(u))}),i=F(()=>vr(n,a.props));var s=se(),o=L(s);{var l=u=>{var d=se(),h=L(d);ke(h,()=>e.child,()=>({props:f(i)})),T(u,d)},c=u=>{var d=Nte();zt(d,()=>({...f(i)}));var h=j(d);ke(h,()=>e.children??$e),V(d),T(u,d)};le(o,u=>{e.child?u(l):u(c,!1)})}T(r,s),we()}function kte(r,e){const t=On();Ee(e,!0);let n=Y(e,"ref",15,null),a=Y(e,"id",19,()=>Nn(t)),i=Ye(e,["$$slots","$$events","$$legacy","ref","id"]);const s=ug.get(),o=F(()=>!!(s.scrollbarXNode&&s.scrollbarYNode)),l=F(()=>s.opts.type.current!=="scroll"&&f(o));var c=se(),u=L(c);{var d=h=>{Ite(h,ot(()=>i,{get id(){return a()},get ref(){return n()},set ref(p){n(p)}}))};le(u,h=>{f(l)&&h(d)})}T(r,c),we()}var Mte=G(" ",1);function Dte(r,e){Ee(e,!0);let t=Y(e,"value",15),n=Y(e,"onValueChange",3,xr),a=Y(e,"name",3,""),i=Y(e,"disabled",3,!1),s=Y(e,"open",15,!1),o=Y(e,"onOpenChange",3,xr),l=Y(e,"onOpenChangeComplete",3,xr),c=Y(e,"loop",3,!1),u=Y(e,"scrollAlignment",3,"nearest"),d=Y(e,"required",3,!1),h=Y(e,"items",19,()=>[]),p=Y(e,"allowDeselect",3,!1);function m(){t()===void 0&&t(e.type==="single"?"":[])}m(),nn.pre(()=>t(),()=>{m()});let g=_e("");const b=cee.create({type:e.type,value:Pe(()=>t(),w=>{t(w),n()(w)}),disabled:Pe(()=>i()),required:Pe(()=>d()),open:Pe(()=>s(),w=>{s(w),o()(w)}),loop:Pe(()=>c()),scrollAlignment:Pe(()=>u()),name:Pe(()=>a()),isCombobox:!1,items:Pe(()=>h()),allowDeselect:Pe(()=>p()),inputValue:Pe(()=>f(g),w=>M(g,w,!0)),onOpenChangeComplete:Pe(()=>l())});var _=Mte(),v=L(_);ag(v,{children:(w,C)=>{var x=se(),N=L(x);ke(N,()=>e.children??$e),T(w,x)},$$slots:{default:!0}});var y=ee(v,2);{var E=w=>{var C=se(),x=L(C);{var N=D=>{_S(D,{get autocomplete(){return e.autocomplete}})},I=D=>{var H=se(),q=L(H);Ir(q,16,()=>b.opts.value.current,$=>$,($,K)=>{_S($,{get value(){return K},get autocomplete(){return e.autocomplete}})}),T(D,H)};le(x,D=>{b.opts.value.current.length===0?D(N):D(I,!1)})}T(w,C)},S=w=>{_S(w,{get autocomplete(){return e.autocomplete},get value(){return b.opts.value.current},set value(C){b.opts.value.current=C}})};le(y,w=>{Array.isArray(b.opts.value.current)?w(E):w(S,!1)})}T(r,_),we()}var Pte=G("");function Lte(r,e){const t=On();Ee(e,!0);let n=Y(e,"id",19,()=>Nn(t)),a=Y(e,"ref",15,null),i=Y(e,"type",3,"button"),s=Ye(e,["$$slots","$$events","$$legacy","id","ref","child","children","type"]);const o=R9.create({id:Pe(()=>n()),ref:Pe(()=>a(),d=>a(d))}),l=F(()=>vr(s,o.props,{type:i()}));var c=se(),u=L(c);me(u,()=>sg,(d,h)=>{h(d,{get id(){return n()},get ref(){return o.opts.ref},children:(p,m)=>{var g=se(),b=L(g);{var _=y=>{var E=se(),S=L(E);ke(S,()=>e.child,()=>({props:f(l)})),T(y,E)},v=y=>{var E=Pte();zt(E,()=>({...f(l)}));var S=j(E);ke(S,()=>e.children??$e),V(E),T(y,E)};le(b,y=>{e.child?y(_):y(v,!1)})}T(p,g)},$$slots:{default:!0}})}),T(r,c),we()}const RU=Hl({component:"switch",parts:["root","thumb"]}),r4=new ka("Switch.Root");class n4{static create(e){return r4.set(new n4(e))}opts;attachment;constructor(e){this.opts=e,this.attachment=yn(e.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this)}#e(){this.opts.checked.current=!this.opts.checked.current}onkeydown(e){!(e.key===$l||e.key===no)||this.opts.disabled.current||(e.preventDefault(),this.#e())}onclick(e){this.opts.disabled.current||this.#e()}#t=F(()=>({"data-disabled":Di(this.opts.disabled.current),"data-state":lQ(this.opts.checked.current),"data-required":Di(this.opts.required.current)}));get sharedProps(){return f(this.#t)}set sharedProps(e){M(this.#t,e)}#r=F(()=>({checked:this.opts.checked.current}));get snippetProps(){return f(this.#r)}set snippetProps(e){M(this.#r,e)}#n=F(()=>({...this.sharedProps,id:this.opts.id.current,role:"switch",disabled:XC(this.opts.disabled.current),"aria-checked":$B(this.opts.checked.current,!1),"aria-required":Dc(this.opts.required.current),[RU.root]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return f(this.#n)}set props(e){M(this.#n,e)}}class a4{static create(){return new a4(r4.get())}root;#e=F(()=>this.root.opts.name.current!==void 0);get shouldRender(){return f(this.#e)}set shouldRender(e){M(this.#e,e)}constructor(e){this.root=e}#t=F(()=>({type:"checkbox",name:this.root.opts.name.current,value:this.root.opts.value.current,checked:this.root.opts.checked.current,disabled:this.root.opts.disabled.current,required:this.root.opts.required.current}));get props(){return f(this.#t)}set props(e){M(this.#t,e)}}class i4{static create(e){return new i4(e,r4.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=yn(e.ref)}#e=F(()=>({checked:this.root.opts.checked.current}));get snippetProps(){return f(this.#e)}set snippetProps(e){M(this.#e,e)}#t=F(()=>({...this.root.sharedProps,id:this.opts.id.current,[RU.thumb]:"",...this.attachment}));get props(){return f(this.#t)}set props(e){M(this.#t,e)}}function Fte(r,e){Ee(e,!1);const t=a4.create();d5();var n=se(),a=L(n);{var i=s=>{d9(s,ot(()=>t.props))};le(a,s=>{t.shouldRender&&s(i)})}T(r,n),we()}var Bte=G(""),Ute=G(" ",1);function $te(r,e){const t=On();Ee(e,!0);let n=Y(e,"ref",15,null),a=Y(e,"id",19,()=>Nn(t)),i=Y(e,"disabled",3,!1),s=Y(e,"required",3,!1),o=Y(e,"checked",15,!1),l=Y(e,"value",3,"on"),c=Y(e,"name",3,void 0),u=Y(e,"type",3,"button"),d=Y(e,"onCheckedChange",3,xr),h=Ye(e,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","required","checked","value","name","type","onCheckedChange"]);const p=n4.create({checked:Pe(()=>o(),E=>{o(E),d()?.(E)}),disabled:Pe(()=>i()??!1),required:Pe(()=>s()),value:Pe(()=>l()),name:Pe(()=>c()),id:Pe(()=>a()),ref:Pe(()=>n(),E=>n(E))}),m=F(()=>vr(h,p.props,{type:u()}));var g=Ute(),b=L(g);{var _=E=>{var S=se(),w=L(S);{let C=F(()=>({props:f(m),...p.snippetProps}));ke(w,()=>e.child,()=>f(C))}T(E,S)},v=E=>{var S=Bte();zt(S,()=>({...f(m)}));var w=j(S);ke(w,()=>e.children??$e,()=>p.snippetProps),V(S),T(E,S)};le(b,E=>{e.child?E(_):E(v,!1)})}var y=ee(b,2);Fte(y,{}),T(r,g),we()}var Gte=G("");function zte(r,e){const t=On();Ee(e,!0);let n=Y(e,"ref",15,null),a=Y(e,"id",19,()=>Nn(t)),i=Ye(e,["$$slots","$$events","$$legacy","child","children","ref","id"]);const s=i4.create({id:Pe(()=>a()),ref:Pe(()=>n(),h=>n(h))}),o=F(()=>vr(i,s.props));var l=se(),c=L(l);{var u=h=>{var p=se(),m=L(p);{let g=F(()=>({props:f(o),...s.snippetProps}));ke(m,()=>e.child,()=>f(g))}T(h,p)},d=h=>{var p=Gte();zt(p,()=>({...f(o)}));var m=j(p);ke(m,()=>e.children??$e,()=>s.snippetProps),V(p),T(h,p)};le(c,h=>{e.child?h(u):h(d,!1)})}T(r,l),we()}class s3{#e;#t;#r=null;constructor(e,t){this.#t=e,this.#e=t,this.stop=this.stop.bind(this),this.start=this.start.bind(this),Qc(this.stop)}#n(){this.#r!==null&&(window.clearTimeout(this.#r),this.#r=null)}stop(){this.#n()}start(...e){this.#n(),this.#r=window.setTimeout(()=>{this.#r=null,this.#t(...e)},this.#e)}}const OU=Hl({component:"tooltip",parts:["content","trigger"]}),NU=new ka("Tooltip.Provider"),s4=new ka("Tooltip.Root");class o4{static create(e){return NU.set(new o4(e))}opts;#e=_e(!0);get isOpenDelayed(){return f(this.#e)}set isOpenDelayed(e){M(this.#e,e,!0)}isPointerInTransit=os(!1);#t;#r=_e(null);constructor(e){this.opts=e,this.#t=new s3(()=>{this.isOpenDelayed=!0},this.opts.skipDelayDuration.current)}#n=()=>{this.opts.skipDelayDuration.current!==0&&this.#t.start()};#i=()=>{this.#t.stop()};onOpen=e=>{f(this.#r)&&f(this.#r)!==e&&f(this.#r).handleClose(),this.#i(),this.isOpenDelayed=!1,M(this.#r,e,!0)};onClose=e=>{f(this.#r)===e&&M(this.#r,null),this.#n()};isTooltipOpen=e=>f(this.#r)===e}class l4{static create(e){return s4.set(new l4(e,NU.get()))}opts;provider;#e=F(()=>this.opts.delayDuration.current??this.provider.opts.delayDuration.current);get delayDuration(){return f(this.#e)}set delayDuration(e){M(this.#e,e)}#t=F(()=>this.opts.disableHoverableContent.current??this.provider.opts.disableHoverableContent.current);get disableHoverableContent(){return f(this.#t)}set disableHoverableContent(e){M(this.#t,e)}#r=F(()=>this.opts.disableCloseOnTriggerClick.current??this.provider.opts.disableCloseOnTriggerClick.current);get disableCloseOnTriggerClick(){return f(this.#r)}set disableCloseOnTriggerClick(e){M(this.#r,e)}#n=F(()=>this.opts.disabled.current??this.provider.opts.disabled.current);get disabled(){return f(this.#n)}set disabled(e){M(this.#n,e)}#i=F(()=>this.opts.ignoreNonKeyboardFocus.current??this.provider.opts.ignoreNonKeyboardFocus.current);get ignoreNonKeyboardFocus(){return f(this.#i)}set ignoreNonKeyboardFocus(e){M(this.#i,e)}#a=_e(null);get contentNode(){return f(this.#a)}set contentNode(e){M(this.#a,e,!0)}contentPresence;#s=_e(null);get triggerNode(){return f(this.#s)}set triggerNode(e){M(this.#s,e,!0)}#o=_e(!1);#l;#c=F(()=>this.opts.open.current?f(this.#o)?"delayed-open":"instant-open":"closed");get stateAttr(){return f(this.#c)}set stateAttr(e){M(this.#c,e)}constructor(e,t){this.opts=e,this.provider=t,this.#l=new s3(()=>{M(this.#o,!0),this.opts.open.current=!0},this.delayDuration??0),this.contentPresence=new ku({open:this.opts.open,ref:Pe(()=>this.contentNode),onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),nn(()=>this.delayDuration,()=>{this.delayDuration!==void 0&&(this.#l=new s3(()=>{M(this.#o,!0),this.opts.open.current=!0},this.delayDuration))}),nn(()=>this.opts.open.current,n=>{n?this.provider.onOpen(this):this.provider.onClose(this)},{lazy:!0})}handleOpen=()=>{this.#l.stop(),M(this.#o,!1),this.opts.open.current=!0};handleClose=()=>{this.#l.stop(),this.opts.open.current=!1};#d=()=>{this.#l.stop();const e=!this.provider.isOpenDelayed,t=this.delayDuration??0;e||t===0?(M(this.#o,t>0&&e,!0),this.opts.open.current=!0):this.#l.start()};onTriggerEnter=()=>{this.#d()};onTriggerLeave=()=>{this.disableHoverableContent?this.handleClose():this.#l.stop()}}class c4{static create(e){return new c4(e,s4.get())}opts;root;attachment;#e=os(!1);#t=_e(!1);#r=F(()=>this.opts.disabled.current||this.root.disabled);domContext;#n=null;constructor(e,t){this.opts=e,this.root=t,this.domContext=new Zc(e.ref),this.attachment=yn(this.opts.ref,n=>this.root.triggerNode=n)}#i=()=>{this.#n!==null&&(clearTimeout(this.#n),this.#n=null)};handlePointerUp=()=>{this.#e.current=!1};#a=()=>{f(this.#r)||(this.#e.current=!1)};#s=()=>{f(this.#r)||(this.#e.current=!0,this.domContext.getDocument().addEventListener("pointerup",()=>{this.handlePointerUp()},{once:!0}))};#o=e=>{if(!f(this.#r)&&e.pointerType!=="touch"){if(this.root.provider.isPointerInTransit.current){this.#i(),this.#n=window.setTimeout(()=>{this.root.provider.isPointerInTransit.current&&(this.root.provider.isPointerInTransit.current=!1,this.root.onTriggerEnter(),M(this.#t,!0))},250);return}this.root.onTriggerEnter(),M(this.#t,!0)}};#l=e=>{f(this.#r)||e.pointerType!=="touch"&&(f(this.#t)||(this.#i(),this.root.provider.isPointerInTransit.current=!1,this.root.onTriggerEnter(),M(this.#t,!0)))};#c=()=>{f(this.#r)||(this.#i(),this.root.onTriggerLeave(),M(this.#t,!1))};#d=e=>{this.#e.current||f(this.#r)||this.root.ignoreNonKeyboardFocus&&!gQ(e.currentTarget)||this.root.handleOpen()};#u=()=>{f(this.#r)||this.root.handleClose()};#p=()=>{this.root.disableCloseOnTriggerClick||f(this.#r)||this.root.handleClose()};#m=F(()=>({id:this.opts.id.current,"aria-describedby":this.root.opts.open.current?this.root.contentNode?.id:void 0,"data-state":this.root.stateAttr,"data-disabled":Di(f(this.#r)),"data-delay-duration":`${this.root.delayDuration}`,[OU.trigger]:"",tabindex:f(this.#r)?void 0:this.opts.tabindex.current,disabled:this.opts.disabled.current,onpointerup:this.#a,onpointerdown:this.#s,onpointerenter:this.#o,onpointermove:this.#l,onpointerleave:this.#c,onfocus:this.#d,onblur:this.#u,onclick:this.#p,...this.attachment}));get props(){return f(this.#m)}set props(e){M(this.#m,e)}}class u4{static create(e){return new u4(e,s4.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=yn(this.opts.ref,n=>this.root.contentNode=n),new SU({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&!this.root.disableHoverableContent,onPointerExit:()=>{this.root.provider.isTooltipOpen(this.root)&&this.root.handleClose()}}),FB(()=>jr(window,"scroll",n=>{const a=n.target;a&&a.contains(this.root.triggerNode)&&this.root.handleClose()}))}onInteractOutside=e=>{if(xc(e.target)&&this.root.triggerNode?.contains(e.target)&&this.root.disableCloseOnTriggerClick){e.preventDefault();return}this.opts.onInteractOutside.current(e),!e.defaultPrevented&&this.root.handleClose()};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current?.(e),!e.defaultPrevented&&this.root.handleClose()};onOpenAutoFocus=e=>{e.preventDefault()};onCloseAutoFocus=e=>{e.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#e=F(()=>({open:this.root.opts.open.current}));get snippetProps(){return f(this.#e)}set snippetProps(e){M(this.#e,e)}#t=F(()=>({id:this.opts.id.current,"data-state":this.root.stateAttr,"data-disabled":Di(this.root.disabled),style:{outline:"none"},[OU.content]:"",...this.attachment}));get props(){return f(this.#t)}set props(e){M(this.#t,e)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus}}function qte(r,e){Ee(e,!0);let t=Y(e,"open",15,!1),n=Y(e,"onOpenChange",3,xr),a=Y(e,"onOpenChangeComplete",3,xr);l4.create({open:Pe(()=>t(),i=>{t(i),n()(i)}),delayDuration:Pe(()=>e.delayDuration),disableCloseOnTriggerClick:Pe(()=>e.disableCloseOnTriggerClick),disableHoverableContent:Pe(()=>e.disableHoverableContent),ignoreNonKeyboardFocus:Pe(()=>e.ignoreNonKeyboardFocus),disabled:Pe(()=>e.disabled),onOpenChangeComplete:Pe(()=>a())}),ag(r,{tooltip:!0,children:(i,s)=>{var o=se(),l=L(o);ke(l,()=>e.children??$e),T(i,o)},$$slots:{default:!0}}),we()}var Hte=G("
"),Vte=G("
");function Yte(r,e){const t=On();Ee(e,!0);let n=Y(e,"id",19,()=>Nn(t)),a=Y(e,"ref",15,null),i=Y(e,"side",3,"top"),s=Y(e,"sideOffset",3,0),o=Y(e,"align",3,"center"),l=Y(e,"avoidCollisions",3,!0),c=Y(e,"arrowPadding",3,0),u=Y(e,"sticky",3,"partial"),d=Y(e,"hideWhenDetached",3,!1),h=Y(e,"collisionPadding",3,0),p=Y(e,"onInteractOutside",3,xr),m=Y(e,"onEscapeKeydown",3,xr),g=Y(e,"forceMount",3,!1),b=Ye(e,["$$slots","$$events","$$legacy","children","child","id","ref","side","sideOffset","align","avoidCollisions","arrowPadding","sticky","strategy","hideWhenDetached","collisionPadding","onInteractOutside","onEscapeKeydown","forceMount","style"]);const _=u4.create({id:Pe(()=>n()),ref:Pe(()=>a(),x=>a(x)),onInteractOutside:Pe(()=>p()),onEscapeKeydown:Pe(()=>m())}),v=F(()=>({side:i(),sideOffset:s(),align:o(),avoidCollisions:l(),arrowPadding:c(),sticky:u(),hideWhenDetached:d(),collisionPadding:h(),strategy:e.strategy})),y=F(()=>vr(b,f(v),_.props));var E=se(),S=L(E);{var w=x=>{{const N=(D,H)=>{let q=()=>H?.().props,$=()=>H?.().wrapperProps;const K=F(()=>vr(q(),{style:Bc("tooltip")},{style:e.style}));var z=se(),re=L(z);{var W=k=>{var B=se(),te=L(B);{let O=F(()=>({props:f(K),wrapperProps:$(),..._.snippetProps}));ke(te,()=>e.child,()=>f(O))}T(k,B)},ie=k=>{var B=Hte();zt(B,()=>({...$()}));var te=j(B);zt(te,()=>({...f(K)}));var O=j(te);ke(O,()=>e.children??$e),V(te),V(B),T(k,B)};le(re,k=>{e.child?k(W):k(ie,!1)})}T(D,z)};let I=F(()=>_.root.disableHoverableContent?"none":"auto");lg(x,ot(()=>f(y),()=>_.popperProps,{get enabled(){return _.root.opts.open.current},get id(){return n()},trapFocus:!1,loop:!1,preventScroll:!1,forceMount:!0,get ref(){return _.opts.ref},tooltip:!0,get shouldRender(){return _.shouldRender},get contentPointerEvents(){return f(I)},popper:N,$$slots:{popper:!0}}))}},C=x=>{var N=se(),I=L(N);{var D=H=>{{const q=(K,z)=>{let re=()=>z?.().props,W=()=>z?.().wrapperProps;const ie=F(()=>vr(re(),{style:Bc("tooltip")},{style:e.style}));var k=se(),B=L(k);{var te=R=>{var U=se(),Q=L(U);{let ne=F(()=>({props:f(ie),wrapperProps:W(),..._.snippetProps}));ke(Q,()=>e.child,()=>f(ne))}T(R,U)},O=R=>{var U=Vte();zt(U,()=>({...W()}));var Q=j(U);zt(Q,()=>({...f(ie)}));var ne=j(Q);ke(ne,()=>e.children??$e),V(Q),V(U),T(R,U)};le(B,R=>{e.child?R(te):R(O,!1)})}T(K,k)};let $=F(()=>_.root.disableHoverableContent?"none":"auto");og(H,ot(()=>f(y),()=>_.popperProps,{get open(){return _.root.opts.open.current},get id(){return n()},trapFocus:!1,loop:!1,preventScroll:!1,forceMount:!1,get ref(){return _.opts.ref},tooltip:!0,get shouldRender(){return _.shouldRender},get contentPointerEvents(){return f($)},popper:q,$$slots:{popper:!0}}))}};le(I,H=>{g()||H(D)},!0)}T(x,N)};le(S,x=>{g()?x(w):x(C,!1)})}T(r,E),we()}var Wte=G("");function jte(r,e){const t=On();Ee(e,!0);let n=Y(e,"id",19,()=>Nn(t)),a=Y(e,"disabled",3,!1),i=Y(e,"type",3,"button"),s=Y(e,"tabindex",3,0),o=Y(e,"ref",15,null),l=Ye(e,["$$slots","$$events","$$legacy","children","child","id","disabled","type","tabindex","ref"]);const c=c4.create({id:Pe(()=>n()),disabled:Pe(()=>a()??!1),tabindex:Pe(()=>s()??0),ref:Pe(()=>o(),d=>o(d))}),u=F(()=>vr(l,c.props,{type:i()}));sg(r,{get id(){return n()},get ref(){return c.opts.ref},tooltip:!0,children:(d,h)=>{var p=se(),m=L(p);{var g=_=>{var v=se(),y=L(v);ke(y,()=>e.child,()=>({props:f(u)})),T(_,v)},b=_=>{var v=Wte();zt(v,()=>({...f(u)}));var y=j(v);ke(y,()=>e.children??$e),V(v),T(_,v)};le(m,_=>{e.child?_(g):_(b,!1)})}T(d,p)},$$slots:{default:!0}}),we()}function Kte(r,e){Ee(e,!0);let t=Y(e,"ref",15,null),n=Ye(e,["$$slots","$$events","$$legacy","ref"]);fee(r,ot(()=>n,{get ref(){return t()},set ref(a){t(a)}})),we()}function Xte(r,e){Ee(e,!0);let t=Y(e,"delayDuration",3,700),n=Y(e,"disableCloseOnTriggerClick",3,!1),a=Y(e,"disableHoverableContent",3,!1),i=Y(e,"disabled",3,!1),s=Y(e,"ignoreNonKeyboardFocus",3,!1),o=Y(e,"skipDelayDuration",3,300);o4.create({delayDuration:Pe(()=>t()),disableCloseOnTriggerClick:Pe(()=>n()),disableHoverableContent:Pe(()=>a()),disabled:Pe(()=>i()),ignoreNonKeyboardFocus:Pe(()=>s()),skipDelayDuration:Pe(()=>o())});var l=se(),c=L(l);ke(c,()=>e.children??$e),T(r,l),we()}function ca(r,e){Ee(e,!0);let t=Y(e,"ref",15,null),n=Ye(e,["$$slots","$$events","$$legacy","ref"]);var a=se(),i=L(a);me(i,()=>jte,(s,o)=>{o(s,ot({"data-slot":"tooltip-trigger"},()=>n,{get ref(){return t()},set ref(l){t(l)}}))}),T(r,a),we()}var Qte=G("
"),Zte=G(" ",1);function ua(r,e){Ee(e,!0);const t=p=>{var m=se(),g=L(m);me(g,()=>Yte,(b,_)=>{_(b,ot({"data-slot":"tooltip-content",get sideOffset(){return a()},get side(){return i()},get class(){return f(l)}},()=>o,{get ref(){return n()},set ref(v){n(v)},children:(v,y)=>{var E=Zte(),S=L(E);ke(S,()=>e.children??$e);var w=ee(S,2);{const C=(x,N)=>{let I=()=>N?.().props;var D=Qte();zt(D,H=>({class:H,...I()}),[()=>Kt("z-50 size-2.5 rotate-45 rounded-[2px] bg-primary","data-[side=top]:translate-x-1/2 data-[side=top]:translate-y-[calc(-50%_+_2px)]","data-[side=bottom]:-translate-x-1/2 data-[side=bottom]:-translate-y-[calc(-50%_+_1px)]","data-[side=right]:translate-x-[calc(50%_+_2px)] data-[side=right]:translate-y-1/2","data-[side=left]:-translate-y-[calc(50%_-_3px)]",e.arrowClasses)]),T(x,D)};me(w,()=>Kte,(x,N)=>{N(x,{child:C,$$slots:{child:!0}})})}T(v,E)},$$slots:{default:!0}}))}),T(p,m)};let n=Y(e,"ref",15,null),a=Y(e,"sideOffset",3,0),i=Y(e,"side",3,"top"),s=Y(e,"noPortal",3,!1),o=Ye(e,["$$slots","$$events","$$legacy","ref","class","sideOffset","side","children","arrowClasses","noPortal"]);const l=F(()=>Kt("z-50 w-fit origin-(--bits-tooltip-content-transform-origin) animate-in rounded-md bg-primary px-3 py-1.5 text-xs text-balance text-primary-foreground fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",e.class));var c=se(),u=L(c);{var d=p=>{t(p)},h=p=>{var m=se(),g=L(m);me(g,()=>Jc,(b,_)=>{_(b,{children:(v,y)=>{t(v)},$$slots:{default:!0}})}),T(p,m)};le(u,p=>{s()?p(d):p(h,!1)})}T(r,c),we()}const da=qte,Jte=Xte;var ere=G("

"),tre=G(" ",1);function Vs(r,e){let t=Y(e,"variant",3,"ghost"),n=Y(e,"size",3,"sm"),a=Y(e,"class",3,""),i=Y(e,"disabled",3,!1),s=Y(e,"iconSize",3,"h-3 w-3");var o=se(),l=L(o);me(l,()=>da,(c,u)=>{u(c,{children:(d,h)=>{var p=tre(),m=L(p);me(m,()=>ca,(b,_)=>{_(b,{children:(v,y)=>{{let E=F(()=>e["aria-label"]||e.tooltip);kr(v,{get variant(){return t()},get size(){return n()},get disabled(){return i()},get onclick(){return e.onclick},get class(){return`h-6 w-6 p-0 ${a()??""} flex`},get"aria-label"(){return f(E)},children:(S,w)=>{const C=F(()=>e.icon);var x=se(),N=L(x);me(N,()=>f(C),(I,D)=>{D(I,{get class(){return s()}})}),T(S,x)},$$slots:{default:!0}})}},$$slots:{default:!0}})});var g=ee(m,2);me(g,()=>ua,(b,_)=>{_(b,{children:(v,y)=>{var E=ere(),S=j(E,!0);V(E),Ce(()=>Ge(S,e.tooltip)),T(v,E)},$$slots:{default:!0}})}),T(d,p)},$$slots:{default:!0}})}),T(r,o)}const rre={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var nre=Ku("");function hr(r,e){Ee(e,!0);const t=Y(e,"color",3,"currentColor"),n=Y(e,"size",3,24),a=Y(e,"strokeWidth",3,2),i=Y(e,"absoluteStrokeWidth",3,!1),s=Y(e,"iconNode",19,()=>[]),o=Ye(e,["$$slots","$$events","$$legacy","name","color","size","strokeWidth","absoluteStrokeWidth","iconNode","children"]);var l=nre();zt(l,d=>({...rre,...o,width:n(),height:n(),stroke:t(),"stroke-width":d,class:["lucide-icon lucide",e.name&&`lucide-${e.name}`,e.class]}),[()=>i()?Number(a())*24/Number(n()):a()]);var c=j(l);Ir(c,17,s,Ru,(d,h)=>{var p=F(()=>HA(f(h),2));let m=()=>f(p)[0],g=()=>f(p)[1];var b=se(),_=L(b);$F(_,m,!0,(v,y)=>{zt(v,()=>({...g()}))}),T(d,b)});var u=ee(c);ke(u,()=>e.children??$e),V(l),T(r,l),we()}function are(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M9 18v-6H5l7-7 7 7h-4v6H9z"}]];hr(r,ot({name:"arrow-big-up"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function IU(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M5 12h14"}],["path",{d:"m12 5 7 7-7 7"}]];hr(r,ot({name:"arrow-right"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function ire(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m5 12 7-7 7 7"}],["path",{d:"M12 19V5"}]];hr(r,ot({name:"arrow-up"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function sre(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M12 7v14"}],["path",{d:"M16 12h2"}],["path",{d:"M16 8h2"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z"}],["path",{d:"M6 12h2"}],["path",{d:"M6 8h2"}]];hr(r,ot({name:"book-open-text"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function kU(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1"}]];hr(r,ot({name:"braces"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function KR(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18"}]];hr(r,ot({name:"brain"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function ore(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M17 21v-2a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1"}],["path",{d:"M19 15V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V9"}],["path",{d:"M21 21v-2h-4"}],["path",{d:"M3 5h4V3"}],["path",{d:"M7 5a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1V3"}]];hr(r,ot({name:"cable"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function Lv(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M20 6 9 17l-5-5"}]];hr(r,ot({name:"check"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function Uc(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m6 9 6 6 6-6"}]];hr(r,ot({name:"chevron-down"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function d4(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m15 18-6-6 6-6"}]];hr(r,ot({name:"chevron-left"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function lre(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m18 15-6-6-6 6"}]];hr(r,ot({name:"chevron-up"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function $c(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m9 18 6-6-6-6"}]];hr(r,ot({name:"chevron-right"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function cre(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m7 15 5 5 5-5"}],["path",{d:"m7 9 5-5 5 5"}]];hr(r,ot({name:"chevrons-up-down"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function h4(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"10"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16"}]];hr(r,ot({name:"circle-alert"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function ure(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335"}],["path",{d:"m9 11 3 3L22 4"}]];hr(r,ot({name:"circle-check-big"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function MU(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m15 9-6 6"}],["path",{d:"m9 9 6 6"}]];hr(r,ot({name:"circle-x"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function i0(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"10"}],["polyline",{points:"12 6 12 12 16 14"}]];hr(r,ot({name:"clock"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function DU(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m16 18 6-6-6-6"}],["path",{d:"m8 6-6 6 6 6"}]];hr(r,ot({name:"code"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function PU(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]];hr(r,ot({name:"copy"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function f4(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5"}],["path",{d:"M3 12A9 3 0 0 0 21 12"}]];hr(r,ot({name:"database"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function Fv(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M12 15V3"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["path",{d:"m7 10 5 5 5-5"}]];hr(r,ot({name:"download"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function dre(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]];hr(r,ot({name:"ellipsis"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function hre(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M15 3h6v6"}],["path",{d:"M10 14 21 3"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}]];hr(r,ot({name:"external-link"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function p4(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}],["circle",{cx:"12",cy:"12",r:"3"}]];hr(r,ot({name:"eye"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function wc(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}],["path",{d:"M10 9H8"}],["path",{d:"M16 13H8"}],["path",{d:"M16 17H8"}]];hr(r,ot({name:"file-text"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function fre(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}],["path",{d:"m14.5 12.5-5 5"}],["path",{d:"m9.5 12.5 5 5"}]];hr(r,ot({name:"file-x"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function m4(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}]];hr(r,ot({name:"file"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function s0(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2"}],["path",{d:"M6.453 15h11.094"}],["path",{d:"M8.5 2h7"}]];hr(r,ot({name:"flask-conical"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function hg(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"}]];hr(r,ot({name:"folder-open"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function pre(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z"}]];hr(r,ot({name:"funnel"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function bS(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m12 14 4-4"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0"}]];hr(r,ot({name:"gauge"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function o3(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["line",{x1:"6",x2:"6",y1:"3",y2:"15"}],["circle",{cx:"18",cy:"6",r:"3"}],["circle",{cx:"6",cy:"18",r:"3"}],["path",{d:"M18 9a9 9 0 0 1-9 9"}]];hr(r,ot({name:"git-branch"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function mre(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"}],["path",{d:"M2 12h20"}]];hr(r,ot({name:"globe"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function gre(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["line",{x1:"2",y1:"2",x2:"22",y2:"22"}],["path",{d:"M16.5 16.5 12 21l-7-7c-1.5-1.45-3-3.2-3-5.5a5.5 5.5 0 0 1 2.14-4.35"}],["path",{d:"M8.76 3.1c1.15.22 2.13.78 3.24 1.9 1.5-1.5 2.74-2 4.5-2A5.5 5.5 0 0 1 22 8.5c0 2.12-1.3 3.78-2.67 5.17"}]];hr(r,ot({name:"heart-off"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function _re(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"}]];hr(r,ot({name:"heart"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function g4(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}],["circle",{cx:"9",cy:"9",r:"2"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"}]];hr(r,ot({name:"image"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function _4(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];hr(r,ot({name:"info"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function bre(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4"}],["path",{d:"m21 2-9.6 9.6"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5"}]];hr(r,ot({name:"key"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function XR(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17"}]];hr(r,ot({name:"layers"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function vre(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m3 17 2 2 4-4"}],["path",{d:"m3 7 2 2 4-4"}],["path",{d:"M13 6h8"}],["path",{d:"M13 12h8"}],["path",{d:"M13 18h8"}]];hr(r,ot({name:"list-checks"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function Xa(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];hr(r,ot({name:"loader-circle"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function b4(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"}]];hr(r,ot({name:"message-square"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function v4(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22"}]];hr(r,ot({name:"mic"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function yre(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M5 12h14"}]];hr(r,ot({name:"minus"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function LU(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21"}]];hr(r,ot({name:"monitor"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function Sre(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"}]];hr(r,ot({name:"moon"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function QR(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M9 18V5l12-2v13"}],["circle",{cx:"6",cy:"18",r:"3"}],["circle",{cx:"18",cy:"16",r:"3"}]];hr(r,ot({name:"music"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function lf(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z"}],["path",{d:"M12 22V12"}],["polyline",{points:"3.29 7 12 12 20.71 7"}],["path",{d:"m7.5 4.27 9 5.15"}]];hr(r,ot({name:"package"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function Ere(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}]];hr(r,ot({name:"panel-left"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function y4(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];hr(r,ot({name:"pencil"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function If(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]];hr(r,ot({name:"plus"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function ZR(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68"}],["path",{d:"M12 2v4"}],["path",{d:"m2 2 20 20"}]];hr(r,ot({name:"power-off"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function wre(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M12 2v10"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04"}]];hr(r,ot({name:"power"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function Tre(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5"}],["circle",{cx:"12",cy:"12",r:"2"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19"}]];hr(r,ot({name:"radio"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function Tc(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}],["path",{d:"M8 16H3v5"}]];hr(r,ot({name:"refresh-cw"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function l3(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}]];hr(r,ot({name:"rotate-ccw"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function Cre(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}]];hr(r,ot({name:"rotate-cw"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function sb(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m21 21-4.34-4.34"}],["circle",{cx:"11",cy:"11",r:"8"}]];hr(r,ot({name:"search"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function FU(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18"}]];hr(r,ot({name:"server"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function Bv(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}],["circle",{cx:"12",cy:"12",r:"3"}]];hr(r,ot({name:"settings"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function BU(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"}],["path",{d:"M20 3v4"}],["path",{d:"M22 5h-4"}],["path",{d:"M4 17v2"}],["path",{d:"M5 18H3"}]];hr(r,ot({name:"sparkles"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function UU(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z"}]];hr(r,ot({name:"square-pen"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function S4(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}]];hr(r,ot({name:"square"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function Are(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"4"}],["path",{d:"M12 2v2"}],["path",{d:"M12 20v2"}],["path",{d:"m4.93 4.93 1.41 1.41"}],["path",{d:"m17.66 17.66 1.41 1.41"}],["path",{d:"M2 12h2"}],["path",{d:"M20 12h2"}],["path",{d:"m6.34 17.66-1.41 1.41"}],["path",{d:"m19.07 4.93-1.41 1.41"}]];hr(r,ot({name:"sun"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function xre(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M10 2h4"}],["path",{d:"M4.6 11a8 8 0 0 0 1.7 8.7 8 8 0 0 0 8.7 1.7"}],["path",{d:"M7.4 7.4a8 8 0 0 1 10.3 1 8 8 0 0 1 .9 10.2"}],["path",{d:"m2 2 20 20"}],["path",{d:"M12 12v-2"}]];hr(r,ot({name:"timer-off"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function Gc(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M3 6h18"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17"}]];hr(r,ot({name:"trash-2"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function zc(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{d:"M12 9v4"}],["path",{d:"M12 17h.01"}]];hr(r,ot({name:"triangle-alert"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function $U(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M12 3v12"}],["path",{d:"m17 8-5-5-5 5"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}]];hr(r,ot({name:"upload"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function vS(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"7",cy:"12",r:"3"}],["path",{d:"M10 9v6"}],["circle",{cx:"17",cy:"12",r:"3"}],["path",{d:"M14 7v8"}],["path",{d:"M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1"}]];hr(r,ot({name:"whole-word"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function Tm(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"}]];hr(r,ot({name:"wrench"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function Yl(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];hr(r,ot({name:"x"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}function E4(r,e){Ee(e,!0);let t=Ye(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z"}]];hr(r,ot({name:"zap"},()=>t,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);ke(o,()=>e.children??$e),T(a,s)},$$slots:{default:!0}})),we()}var Kr=(r=>(r.AUDIO="AUDIO",r.IMAGE="IMAGE",r.MCP_PROMPT="MCP_PROMPT",r.MCP_RESOURCE="MCP_RESOURCE",r.PDF="PDF",r.TEXT="TEXT",r.LEGACY_CONTEXT="context",r))(Kr||{}),Uv=(r=>(r.FUNCTION="function",r))(Uv||{}),Wa=(r=>(r.TEXT="text",r.TOOL_CALL="tool_call",r.TOOL_CALL_PENDING="tool_call_pending",r.TOOL_CALL_STREAMING="tool_call_streaming",r.REASONING="reasoning",r.REASONING_PENDING="reasoning_pending",r))(Wa||{}),fi=(r=>(r.GENERATION="generation",r.READING="reading",r.TOOLS="tools",r.SUMMARY="summary",r))(fi||{}),c3=(r=>(r.NONE="none",r.AUTO="auto",r))(c3||{}),Jt=(r=>(r.USER="user",r.ASSISTANT="assistant",r.SYSTEM="system",r.TOOL="tool",r))(Jt||{}),Tl=(r=>(r.ROOT="root",r.TEXT="text",r.THINK="think",r.SYSTEM="system",r))(Tl||{}),Zi=(r=>(r.TEXT="text",r.IMAGE_URL="image_url",r.INPUT_AUDIO="input_audio",r))(Zi||{}),_c=(r=>(r.TIMEOUT="timeout",r.SERVER="server",r))(_c||{}),Dn=(r=>(r.IMAGE="image",r.AUDIO="audio",r.PDF="pdf",r.TEXT="text",r))(Dn||{}),Cm=(r=>(r.MCP_PROMPT="mcp-prompt",r))(Cm||{}),Fh=(r=>(r.JPEG="jpeg",r.PNG="png",r.GIF="gif",r.WEBP="webp",r.SVG="svg",r))(Fh||{}),u3=(r=>(r.MP3="mp3",r.WAV="wav",r.WEBM="webm",r))(u3||{}),GU=(r=>(r.PDF="pdf",r))(GU||{}),Xr=(r=>(r.PLAIN_TEXT="plainText",r.MARKDOWN="md",r.ASCIIDOC="asciidoc",r.JAVASCRIPT="js",r.TYPESCRIPT="ts",r.JSX="jsx",r.TSX="tsx",r.CSS="css",r.HTML="html",r.JSON="json",r.XML="xml",r.YAML="yaml",r.CSV="csv",r.LOG="log",r.PYTHON="python",r.JAVA="java",r.CPP="cpp",r.PHP="php",r.RUBY="ruby",r.GO="go",r.RUST="rust",r.SHELL="shell",r.SQL="sql",r.R="r",r.SCALA="scala",r.KOTLIN="kotlin",r.SWIFT="swift",r.DART="dart",r.VUE="vue",r.SVELTE="svelte",r.LATEX="latex",r.BIBTEX="bibtex",r.CUDA="cuda",r.VULKAN="vulkan",r.HASKELL="haskell",r.CSHARP="csharp",r.PROPERTIES="properties",r))(Xr||{}),Ks=(r=>(r.JPG=".jpg",r.JPEG=".jpeg",r.PNG=".png",r.GIF=".gif",r.WEBP=".webp",r.SVG=".svg",r))(Ks||{}),Am=(r=>(r.MP3=".mp3",r.WAV=".wav",r))(Am||{}),w4=(r=>(r.PDF=".pdf",r))(w4||{}),Wt=(r=>(r.TXT=".txt",r.MD=".md",r.ADOC=".adoc",r.JS=".js",r.TS=".ts",r.JSX=".jsx",r.TSX=".tsx",r.CSS=".css",r.HTML=".html",r.HTM=".htm",r.JSON=".json",r.XML=".xml",r.YAML=".yaml",r.YML=".yml",r.CSV=".csv",r.LOG=".log",r.PY=".py",r.JAVA=".java",r.CPP=".cpp",r.C=".c",r.H=".h",r.PHP=".php",r.RB=".rb",r.GO=".go",r.RS=".rs",r.SH=".sh",r.BAT=".bat",r.SQL=".sql",r.R=".r",r.SCALA=".scala",r.KT=".kt",r.SWIFT=".swift",r.DART=".dart",r.VUE=".vue",r.SVELTE=".svelte",r.TEX=".tex",r.BIB=".bib",r.CU=".cu",r.CUH=".cuh",r.COMP=".comp",r.HPP=".hpp",r.HS=".hs",r.PROPERTIES=".properties",r.CS=".cs",r))(Wt||{}),kf=(r=>(r.IMAGE="image/",r.TEXT="text",r))(kf||{}),Xs=(r=>(r.JSON="json",r.JAVASCRIPT="javascript",r.TYPESCRIPT="typescript",r))(Xs||{}),d3=(r=>(r.DATABASE_KEYWORD="database",r.DATABASE_SCHEME="db://",r))(d3||{}),xm=(r=>(r.PDF="application/pdf",r.OCTET_STREAM="application/octet-stream",r))(xm||{}),ja=(r=>(r.MP3_MPEG="audio/mpeg",r.MP3="audio/mp3",r.MP4="audio/mp4",r.WAV="audio/wav",r.WEBM="audio/webm",r.WEBM_OPUS="audio/webm;codecs=opus",r))(ja||{}),ea=(r=>(r.JPEG="image/jpeg",r.JPG="image/jpg",r.PNG="image/png",r.GIF="image/gif",r.WEBP="image/webp",r.SVG="image/svg+xml",r))(ea||{}),Pt=(r=>(r.PLAIN="text/plain",r.MARKDOWN="text/markdown",r.ASCIIDOC="text/asciidoc",r.JAVASCRIPT="text/javascript",r.JAVASCRIPT_APP="application/javascript",r.TYPESCRIPT="text/typescript",r.JSX="text/jsx",r.TSX="text/tsx",r.CSS="text/css",r.HTML="text/html",r.JSON="application/json",r.XML_TEXT="text/xml",r.XML_APP="application/xml",r.YAML_TEXT="text/yaml",r.YAML_APP="application/yaml",r.CSV="text/csv",r.PYTHON="text/x-python",r.JAVA="text/x-java-source",r.CPP_HDR="text/x-c++hdr",r.CPP_SRC="text/x-c++src",r.CSHARP="text/x-csharp",r.HASKELL="text/x-haskell",r.C_SRC="text/x-csrc",r.C_HDR="text/x-chdr",r.PHP="text/x-php",r.RUBY="text/x-ruby",r.GO="text/x-go",r.RUST="text/x-rust",r.SHELL="text/x-shellscript",r.BAT="application/x-bat",r.SQL="text/x-sql",r.R="text/x-r",r.SCALA="text/x-scala",r.KOTLIN="text/x-kotlin",r.SWIFT="text/x-swift",r.DART="text/x-dart",r.VUE="text/x-vue",r.SVELTE="text/x-svelte",r.TEX="text/x-tex",r.TEX_APP="application/x-tex",r.LATEX="application/x-latex",r.BIBTEX="text/x-bibtex",r.CUDA="text/x-cuda",r.PROPERTIES="text/properties",r))(Pt||{}),Na=(r=>(r.IDLE="idle",r.TRANSPORT_CREATING="transport_creating",r.TRANSPORT_READY="transport_ready",r.INITIALIZING="initializing",r.CAPABILITIES_EXCHANGED="capabilities_exchanged",r.LISTING_TOOLS="listing_tools",r.CONNECTED="connected",r.ERROR="error",r.DISCONNECTED="disconnected",r))(Na||{}),Pu=(r=>(r.INFO="info",r.WARN="warn",r.ERROR="error",r))(Pu||{}),Os=(r=>(r.WEBSOCKET="websocket",r.STREAMABLE_HTTP="streamable_http",r.SSE="sse",r))(Os||{}),kn=(r=>(r.IDLE="idle",r.CONNECTING="connecting",r.SUCCESS="success",r.ERROR="error",r))(kn||{}),v_=(r=>(r.TEXT="text",r.IMAGE="image",r.RESOURCE="resource",r))(v_||{}),zU=(r=>(r.OBJECT="object",r))(zU||{}),h3=(r=>(r.PROMPT="ref/prompt",r.RESOURCE="ref/resource",r))(h3||{}),qc=(r=>(r.TEXT="TEXT",r.AUDIO="AUDIO",r.VISION="VISION",r))(qc||{}),Rd=(r=>(r.MODEL="model",r.ROUTER="router",r))(Rd||{}),mi=(r=>(r.UNLOADED="unloaded",r.LOADING="loading",r.LOADED="loaded",r.SLEEPING="sleeping",r.FAILED="failed",r))(mi||{}),f3=(r=>(r.DEFAULT="default",r.CUSTOM="custom",r))(f3||{}),Vr=(r=>(r.NUMBER="number",r.STRING="string",r.BOOLEAN="boolean",r))(Vr||{}),$r=(r=>(r.INPUT="input",r.TEXTAREA="textarea",r.CHECKBOX="checkbox",r.SELECT="select",r))($r||{}),Pl=(r=>(r.LIGHT="light",r.DARK="dark",r.SYSTEM="system",r))(Pl||{}),Rm=(r=>(r.MESSAGE="message",r.ATTACHMENT="attachment",r))(Rm||{}),lo=(r=>(r.DATA="data:",r.HTTP="http://",r.HTTPS="https://",r.WEBSOCKET="ws://",r.WEBSOCKET_SECURE="wss://",r))(lo||{}),Tn=(r=>(r.ENTER="Enter",r.ESCAPE="Escape",r.ARROW_UP="ArrowUp",r.ARROW_DOWN="ArrowDown",r.TAB="Tab",r.D_LOWER="d",r.D_UPPER="D",r.E_UPPER="E",r.K_LOWER="k",r.O_UPPER="O",r.SPACE=" ",r))(Tn||{}),Rre=G(''),Ore=G('
');function Nre(r,e){Ee(e,!0);let t=Y(e,"disabled",3,!1);const n=F(()=>e.language?.toLowerCase()===Xr.HTML);function a(){t()||e.onPreview?.(e.code,e.language)}var i=Ore(),s=j(i);let o;var l=j(s);{let d=F(()=>!t()),h=F(()=>t()?"Code incomplete":"Copy code");Df(l,{get text(){return e.code},get canCopy(){return f(d)},get ariaLabel(){return f(h)}})}V(s);var c=ee(s,2);{var u=d=>{var h=Rre();let p;h.__click=a;var m=j(h);p4(m,{size:16}),V(h),Ce(()=>{p=yt(h,1,"preview-code-btn",null,p,{"opacity-50":t(),"!cursor-not-allowed":t()}),er(h,"title",t()?"Code incomplete":"Preview code"),er(h,"aria-disabled",t())}),T(d,h)};le(c,d=>{f(n)&&d(u)})}V(i),Ce(()=>o=yt(s,1,"copy-code-btn",null,o,{"opacity-50":t(),"!cursor-not-allowed":t()})),T(r,i),we()}Ln(["click"]);const Ire=/\[Attachment saved: ([^\]]+)\]/,ob=` -`,JR="\n\n```\nTurn limit reached\n```\n",eO=` +var Z3=t=>{throw TypeError(t)};var iv=(t,e,r)=>e.has(t)||Z3("Cannot "+r);var ba=(t,e,r)=>(iv(t,e,"read from private field"),r?r.call(t):e.get(t)),El=(t,e,r)=>e.has(t)?Z3("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),_s=(t,e,r,n)=>(iv(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),vl=(t,e,r)=>(iv(t,e,"access private method"),r);var J3=(t,e,r,n)=>({set _(a){_s(t,e,a,r)},get _(){return ba(t,e,n)}});var Yf=Array.isArray,AV=Array.prototype.indexOf,Tp=Array.prototype.includes,eS=Array.from,W2=Object.defineProperty,xu=Object.getOwnPropertyDescriptor,H8=Object.getOwnPropertyDescriptors,Y8=Object.prototype,RV=Array.prototype,tS=Object.getPrototypeOf,eD=Object.isExtensible;function Uh(t){return typeof t=="function"}const Ge=()=>{};function OV(t){return t()}function AA(t){for(var e=0;e{t=n,e=a});return{promise:r,resolve:t,reject:e}}function NV(t,e,r=!1){return t===void 0?r?e():e:t}function K2(t,e){if(Array.isArray(t))return t;if(!(Symbol.iterator in t))return Array.from(t);const r=[];for(const n of t)if(r.push(n),r.length===e)break;return r}const ui=2,ff=4,Vf=8,j2=1<<24,Kl=16,Jc=32,Xu=64,Q2=128,xo=512,Yi=1024,Wi=2048,eu=4096,io=8192,xc=16384,Wf=32768,zl=65536,RA=1<<17,X2=1<<18,ch=1<<19,W8=1<<20,Oc=1<<25,eh=32768,OA=1<<21,Z2=1<<22,Du=1<<23,Fl=Symbol("$state"),J2=Symbol("legacy props"),IV=Symbol(""),Zh=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},xV=1,rS=3,tu=8;function K8(t){throw new Error("https://svelte.dev/e/experimental_async_required")}function Kp(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function DV(){throw new Error("https://svelte.dev/e/missing_context")}function MV(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function kV(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function PV(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function LV(t){throw new Error("https://svelte.dev/e/effect_orphan")}function FV(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function BV(){throw new Error("https://svelte.dev/e/fork_discarded")}function UV(){throw new Error("https://svelte.dev/e/fork_timing")}function GV(){throw new Error("https://svelte.dev/e/get_abort_signal_outside_reaction")}function qV(){throw new Error("https://svelte.dev/e/hydration_failed")}function j8(t){throw new Error("https://svelte.dev/e/lifecycle_legacy_only")}function zV(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function $V(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function HV(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function YV(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function VV(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const WV=1,KV=2,Q8=4,jV=8,QV=16,XV=1,ZV=2,JV=4,eW=8,tW=16,rW=1,nW=2,aW=4,iW=1,sW=2,X8="[",nS="[!",eO="]",th={},_i=Symbol(),oW="http://www.w3.org/1999/xhtml",lW="http://www.w3.org/2000/svg",Z8="@attach";function cW(t){console.warn("https://svelte.dev/e/hydratable_missing_but_expected")}function Kf(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function uW(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function dW(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let Nr=!1;function cs(t){Nr=t}let tn;function Ga(t){if(t===null)throw Kf(),th;return tn=t}function Po(){return Ga(uo(tn))}function Y(t){if(Nr){if(uo(tn)!==null)throw Kf(),th;tn=t}}function et(t=1){if(Nr){for(var e=t,r=tn;e--;)r=uo(r);tn=r}}function L1(t=!0){for(var e=0,r=tn;;){if(r.nodeType===tu){var n=r.data;if(n===eO){if(e===0)return r;e-=1}else(n===X8||n===nS)&&(e+=1)}var a=uo(r);t&&r.remove(),r=a}}function J8(t){if(!t||t.nodeType!==tu)throw Kf(),th;return t.data}function eF(t){return t===this.v}function tO(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function tF(t){return!tO(t,this.v)}let jp=!1;function hW(){jp=!0}const pW=[];function sp(t,e=!1,r=!1){return b1(t,new Map,"",pW,null,r)}function b1(t,e,r,n,a=null,i=!1){if(typeof t=="object"&&t!==null){var s=e.get(t);if(s!==void 0)return s;if(t instanceof Map)return new Map(t);if(t instanceof Set)return new Set(t);if(Yf(t)){var o=Array(t.length);e.set(t,o),a!==null&&e.set(a,o);for(var l=0;l(aS(t)||DV(),$l(t)),e=>Zu(t,e)]}function $l(t){return iS().get(t)}function Zu(t,e){return iS().set(t,e),e}function aS(t){return iS().has(t)}function rF(){return iS()}function ye(t,e=!1,r){qn={p:qn,i:!1,c:null,e:null,s:t,x:null,l:jp&&!e?{s:null,u:null,$:[]}:null}}function Te(t){var e=qn,r=e.e;if(r!==null){e.e=null;for(var n of r)yF(n)}return t!==void 0&&(e.x=t),e.i=!0,qn=e.p,t??{}}function Qp(){return!jp||qn!==null&&qn.l===null}function iS(t){return qn===null&&Kp(),qn.c??=new Map(fW(qn)||void 0)}function fW(t){let e=t.p;for(;e!==null;){const r=e.c;if(r!==null)return r;e=e.p}return null}let zd=[];function nF(){var t=zd;zd=[],AA(t)}function Do(t){if(zd.length===0&&!rf){var e=zd;queueMicrotask(()=>{e===zd&&nF()})}zd.push(t)}function gW(){for(;zd.length>0;)nF()}function aF(t){var e=Pn;if(e===null)return Tn.f|=Du,t;if((e.f&Wf)===0){if((e.f&Q2)===0)throw t;e.b.error(t)}else wp(t,e)}function wp(t,e){for(;e!==null;){if((e.f&Q2)!==0)try{e.b.error(t);return}catch(r){t=r}e=e.parent}throw t}const _W=-7169;function ei(t,e){t.f=t.f&_W|e}function rO(t){(t.f&xo)!==0||t.deps===null?ei(t,Yi):ei(t,eu)}function iF(t){if(t!==null)for(const e of t)(e.f&ui)===0||(e.f&eh)===0||(e.f^=eh,iF(e.deps))}function sF(t,e,r){(t.f&Wi)!==0?e.add(t):(t.f&eu)!==0&&r.add(t),iF(t.deps),ei(t,Yi)}const $d=new Set;let Hn=null,NA=null,No=null,Ws=[],sS=null,IA=!1,rf=!1;class nl{committed=!1;current=new Map;previous=new Map;#e=new Set;#t=new Set;#r=0;#n=0;#i=null;#a=new Set;#s=new Set;skipped_effects=new Set;is_fork=!1;#o=!1;is_deferred(){return this.is_fork||this.#n>0}process(e){Ws=[],this.apply();var r=[],n=[];for(const a of e)this.#l(a,r,n);if(this.is_deferred())this.#c(n),this.#c(r);else{for(const a of this.#e)a();this.#e.clear(),this.#r===0&&this.#d(),NA=this,Hn=null,tD(n),tD(r),NA=null,this.#i?.resolve()}No=null}#l(e,r,n){e.f^=Yi;for(var a=e.first,i=null;a!==null;){var s=a.f,o=(s&(Jc|Xu))!==0,l=o&&(s&Yi)!==0,c=l||(s&io)!==0||this.skipped_effects.has(a);if(!c&&a.fn!==null){o?a.f^=Yi:i!==null&&(s&(ff|Vf|j2))!==0?i.b.defer_effect(a):(s&ff)!==0?r.push(a):Jf(a)&&((s&Kl)!==0&&this.#s.add(a),_f(a));var u=a.first;if(u!==null){a=u;continue}}var d=a.parent;for(a=a.next;a===null&&d!==null;)d===i&&(i=null),a=d.next,d=d.parent}}#c(e){for(var r=0;r0){if(xA(),Hn!==null&&Hn!==this)return}else this.#r===0&&this.process([]);this.deactivate()}discard(){for(const e of this.#t)e(this);this.#t.clear()}#d(){if($d.size>1){this.previous.clear();var e=No,r=!0;for(const a of $d){if(a===this){r=!1;continue}const i=[];for(const[o,l]of this.current){if(a.current.has(o))if(r&&l!==a.current.get(o))a.current.set(o,l);else continue;i.push(o)}if(i.length===0)continue;const s=[...a.current.keys()].filter(o=>!this.current.has(o));if(s.length>0){var n=Ws;Ws=[];const o=new Set,l=new Map;for(const c of i)oF(c,s,o,l);if(Ws.length>0){Hn=a,a.apply();for(const c of Ws)a.#l(c,[],[]);a.deactivate()}Ws=n}}Hn=null,No=e}this.committed=!0,$d.delete(this)}increment(e){this.#r+=1,e&&(this.#n+=1)}decrement(e){this.#r-=1,e&&(this.#n-=1),!this.#o&&(this.#o=!0,Do(()=>{this.#o=!1,this.is_deferred()?Ws.length>0&&this.flush():this.revive()}))}revive(){for(const e of this.#a)this.#s.delete(e),ei(e,Wi),Bc(e);for(const e of this.#s)ei(e,eu),Bc(e);this.flush()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#t.add(e)}settled(){return(this.#i??=V8()).promise}static ensure(){if(Hn===null){const e=Hn=new nl;$d.add(Hn),rf||Do(()=>{Hn===e&&e.flush()})}return Hn}apply(){}}function gf(t){var e=rf;rf=!0;try{var r;for(t&&(Hn!==null&&xA(),r=t());;){if(gW(),Ws.length===0&&(Hn?.flush(),Ws.length===0))return sS=null,r;xA()}}finally{rf=e}}function xA(){IA=!0;var t=null;try{for(var e=0;Ws.length>0;){var r=nl.ensure();if(e++>1e3){var n,a;bW()}r.process(Ws),Mu.clear()}}finally{IA=!1,sS=null}}function bW(){try{FV()}catch(t){wp(t,sS)}}let Ec=null;function tD(t){var e=t.length;if(e!==0){for(var r=0;r0)){Mu.clear();for(const a of Ec){if((a.f&(xc|io))!==0)continue;const i=[a];let s=a.parent;for(;s!==null;)Ec.has(s)&&(Ec.delete(s),i.push(s)),s=s.parent;for(let o=i.length-1;o>=0;o--){const l=i[o];(l.f&(xc|io))===0&&_f(l)}}Ec.clear()}}Ec=null}}function oF(t,e,r,n){if(!r.has(t)&&(r.add(t),t.reactions!==null))for(const a of t.reactions){const i=a.f;(i&ui)!==0?oF(a,e,r,n):(i&(Z2|Kl))!==0&&(i&Wi)===0&&cF(a,e,n)&&(ei(a,Wi),Bc(a))}}function lF(t,e){if(t.reactions!==null)for(const r of t.reactions){const n=r.f;(n&ui)!==0?lF(r,e):(n&RA)!==0&&(ei(r,Wi),e.add(r))}}function cF(t,e,r){const n=r.get(t);if(n!==void 0)return n;if(t.deps!==null)for(const a of t.deps){if(Tp.call(e,a))return!0;if((a.f&ui)!==0&&cF(a,e,r))return r.set(a,!0),!0}return r.set(t,!1),!1}function Bc(t){for(var e=sS=t;e.parent!==null;){e=e.parent;var r=e.f;if(IA&&e===Pn&&(r&Kl)!==0&&(r&X2)===0)return;if((r&(Xu|Jc))!==0){if((r&Yi)===0)return;e.f^=Yi}}Ws.push(e)}function SW(t){K8(),Hn!==null&&UV();var e=nl.ensure();e.is_fork=!0,No=new Map;var r=!1,n=e.settled();gf(t);for(var[a,i]of e.previous)a.v=i;for(a of e.current.keys())(a.f&ui)!==0&&ei(a,Wi);return{commit:async()=>{if(r){await n;return}$d.has(e)||BV(),r=!0,e.is_fork=!1;for(var[s,o]of e.current)s.v=o,s.wv=cO();gf(()=>{var l=new Set;for(var c of e.current.keys())lF(c,l);AW(l),pF()}),e.revive(),await n},discard:()=>{!r&&$d.has(e)&&($d.delete(e),e.discard())}}}function Ju(t){let e=0,r=Uc(0),n;return()=>{oO()&&(p(r),Zf(()=>(e===0&&(n=Nn(()=>t(()=>eo(r)))),e+=1,()=>{Do(()=>{e-=1,e===0&&(n?.(),n=void 0,eo(r))})})))}}var EW=zl|ch|Q2;function vW(t,e,r){new yW(t,e,r)}class yW{parent;is_pending=!1;#e;#t=Nr?tn:null;#r;#n;#i;#a=null;#s=null;#o=null;#l=null;#c=null;#d=0;#u=0;#m=!1;#f=!1;#p=new Set;#h=new Set;#g=null;#S=Ju(()=>(this.#g=Uc(this.#d),()=>{this.#g=null}));constructor(e,r,n){this.#e=e,this.#r=r,this.#n=n,this.parent=Pn.b,this.is_pending=!!this.#r.pending,this.#i=ed(()=>{if(Pn.b=this,Nr){const i=this.#t;Po(),i.nodeType===tu&&i.data===nS?this.#E():(this.#_(),this.#u===0&&(this.is_pending=!1))}else{var a=this.#v();try{this.#a=Rs(()=>n(a))}catch(i){this.error(i)}this.#u>0?this.#T():this.is_pending=!1}return()=>{this.#c?.remove()}},EW),Nr&&(this.#e=tn)}#_(){try{this.#a=Rs(()=>this.#n(this.#e))}catch(e){this.error(e)}}#E(){const e=this.#r.pending;e&&(this.#s=Rs(()=>e(this.#e)),Do(()=>{var r=this.#v();this.#a=this.#b(()=>(nl.ensure(),Rs(()=>this.#n(r)))),this.#u>0?this.#T():(Zd(this.#s,()=>{this.#s=null}),this.is_pending=!1)}))}#v(){var e=this.#e;return this.is_pending&&(this.#c=Vi(),this.#e.before(this.#c),e=this.#c),e}defer_effect(e){sF(e,this.#p,this.#h)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#r.pending}#b(e){var r=Pn,n=Tn,a=qn;Hl(this.#i),xs(this.#i),Cp(this.#i.ctx);try{return e()}catch(i){return aF(i),null}finally{Hl(r),xs(n),Cp(a)}}#T(){const e=this.#r.pending;this.#a!==null&&(this.#l=document.createDocumentFragment(),this.#l.append(this.#c),xF(this.#a,this.#l)),this.#s===null&&(this.#s=Rs(()=>e(this.#e)))}#C(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#C(e);return}if(this.#u+=e,this.#u===0){this.is_pending=!1;for(const r of this.#p)ei(r,Wi),Bc(r);for(const r of this.#h)ei(r,eu),Bc(r);this.#p.clear(),this.#h.clear(),this.#s&&Zd(this.#s,()=>{this.#s=null}),this.#l&&(this.#e.before(this.#l),this.#l=null)}}update_pending_count(e){this.#C(e),this.#d+=e,!(!this.#g||this.#m)&&(this.#m=!0,Do(()=>{this.#m=!1,this.#g&&Ap(this.#g,this.#d)}))}get_effect_pending(){return this.#S(),p(this.#g)}error(e){var r=this.#r.onerror;let n=this.#r.failed;if(this.#f||!r&&!n)throw e;this.#a&&(Ei(this.#a),this.#a=null),this.#s&&(Ei(this.#s),this.#s=null),this.#o&&(Ei(this.#o),this.#o=null),Nr&&(Ga(this.#t),et(),Ga(L1()));var a=!1,i=!1;const s=()=>{if(a){dW();return}a=!0,i&&VV(),nl.ensure(),this.#d=0,this.#o!==null&&Zd(this.#o,()=>{this.#o=null}),this.is_pending=this.has_pending_snippet(),this.#a=this.#b(()=>(this.#f=!1,Rs(()=>this.#n(this.#e)))),this.#u>0?this.#T():this.is_pending=!1};var o=Tn;try{xs(null),i=!0,r?.(e,s),i=!1}catch(l){wp(l,this.#i&&this.#i.parent)}finally{xs(o)}n&&Do(()=>{this.#o=this.#b(()=>{nl.ensure(),this.#f=!0;try{return Rs(()=>{n(this.#e,()=>e,()=>s)})}catch(l){return wp(l,this.#i.parent),null}finally{this.#f=!1}})})}}function nO(t,e,r,n){const a=Qp()?jf:oS;var i=t.filter(h=>!h.settled);if(r.length===0&&i.length===0){n(e.map(a));return}var s=Hn,o=Pn,l=TW(),c=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(h=>h.promise)):null;function u(h){l();try{n(h)}catch(m){(o.f&xc)===0&&wp(m,o)}s?.deactivate(),DA()}if(r.length===0){c.then(()=>u(e.map(a)));return}function d(){l(),Promise.all(r.map(h=>CW(h))).then(h=>u([...e.map(a),...h])).catch(h=>wp(h,o))}c?c.then(d):d()}function TW(){var t=Pn,e=Tn,r=qn,n=Hn;return function(i=!0){Hl(t),xs(e),Cp(r),i&&n?.activate()}}function DA(){Hl(null),xs(null),Cp(null)}function jf(t){var e=ui|Wi,r=Tn!==null&&(Tn.f&ui)!==0?Tn:null;return Pn!==null&&(Pn.f|=ch),{ctx:qn,deps:null,effects:null,equals:eF,f:e,fn:t,reactions:null,rv:0,v:_i,wv:0,parent:r??Pn,ac:null}}function CW(t,e,r){let n=Pn;n===null&&MV();var a=n.b,i=void 0,s=Uc(_i),o=!Tn,l=new Map;return DW(()=>{var c=V8();i=c.promise;try{Promise.resolve(t()).then(c.resolve,c.reject).then(()=>{u===Hn&&u.committed&&u.deactivate(),DA()})}catch(m){c.reject(m),DA()}var u=Hn;if(o){var d=a.is_rendered();a.update_pending_count(1),u.increment(d),l.get(u)?.reject(Zh),l.delete(u),l.set(u,c)}const h=(m,f=void 0)=>{if(u.activate(),f)f!==Zh&&(s.f|=Du,Ap(s,f));else{(s.f&Du)!==0&&(s.f^=Du),Ap(s,m);for(const[g,b]of l){if(l.delete(g),g===u)break;b.reject(Zh)}}o&&(a.update_pending_count(-1),u.decrement(d))};c.promise.then(h,m=>h(null,m||"unknown"))}),dh(()=>{for(const c of l.values())c.reject(Zh)}),new Promise(c=>{function u(d){function h(){d===i?c(s):u(i)}d.then(h,h)}u(i)})}function F(t){const e=jf(t);return DF(e),e}function oS(t){const e=jf(t);return e.equals=tF,e}function uF(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r0&&!hF&&pF()}return e}function pF(){hF=!1;for(const t of F1)(t.f&Yi)!==0&&ei(t,eu),Jf(t)&&_f(t);F1.clear()}function S1(t,e=1){var r=p(t),n=e===1?r++:r--;return k(t,r),n}function eo(t){k(t,t.v+1)}function mF(t,e){var r=t.reactions;if(r!==null)for(var n=Qp(),a=r.length,i=0;i{if(al===i)return o();var l=Tn,c=al;xs(null),iD(i);var u=o();return xs(l),iD(c),u};return n&&r.set("length",_e(t.length)),new Proxy(t,{defineProperty(o,l,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&$V();var u=r.get(l);return u===void 0?u=s(()=>{var d=_e(c.value);return r.set(l,d),d}):k(u,c.value,!0),!0},deleteProperty(o,l){var c=r.get(l);if(c===void 0){if(l in o){const u=s(()=>_e(_i));r.set(l,u),eo(a)}}else k(c,_i),eo(a);return!0},get(o,l,c){if(l===Fl)return t;var u=r.get(l),d=l in o;if(u===void 0&&(!d||xu(o,l)?.writable)&&(u=s(()=>{var m=Tr(d?o[l]:_i),f=_e(m);return f}),r.set(l,u)),u!==void 0){var h=p(u);return h===_i?void 0:h}return Reflect.get(o,l,c)},getOwnPropertyDescriptor(o,l){var c=Reflect.getOwnPropertyDescriptor(o,l);if(c&&"value"in c){var u=r.get(l);u&&(c.value=p(u))}else if(c===void 0){var d=r.get(l),h=d?.v;if(d!==void 0&&h!==_i)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return c},has(o,l){if(l===Fl)return!0;var c=r.get(l),u=c!==void 0&&c.v!==_i||Reflect.has(o,l);if(c!==void 0||Pn!==null&&(!u||xu(o,l)?.writable)){c===void 0&&(c=s(()=>{var h=u?Tr(o[l]):_i,m=_e(h);return m}),r.set(l,c));var d=p(c);if(d===_i)return!1}return u},set(o,l,c,u){var d=r.get(l),h=l in o;if(n&&l==="length")for(var m=c;m_e(_i)),r.set(m+"",f))}if(d===void 0)(!h||xu(o,l)?.writable)&&(d=s(()=>_e(void 0)),k(d,Tr(c)),r.set(l,d));else{h=d.v!==_i;var g=s(()=>Tr(c));k(d,g)}var b=Reflect.getOwnPropertyDescriptor(o,l);if(b?.set&&b.set.call(u,c),!h){if(n&&typeof l=="string"){var _=r.get("length"),S=Number(l);Number.isInteger(S)&&S>=_.v&&k(_,S+1)}eo(a)}return!0},ownKeys(o){p(a);var l=Reflect.ownKeys(o).filter(d=>{var h=r.get(d);return h===void 0||h.v!==_i});for(var[c,u]of r)u.v!==_i&&!(c in o)&&l.push(c);return l},setPrototypeOf(){HV()}})}function rD(t){try{if(t!==null&&typeof t=="object"&&Fl in t)return t[Fl]}catch{}return t}function RW(t,e){return Object.is(rD(t),rD(e))}var Rp,lS,fF,gF,_F;function MA(){if(Rp===void 0){Rp=window,lS=document,fF=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;gF=xu(e,"firstChild").get,_F=xu(e,"nextSibling").get,eD(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),eD(r)&&(r.__t=void 0)}}function Vi(t=""){return document.createTextNode(t)}function xi(t){return gF.call(t)}function uo(t){return _F.call(t)}function j(t,e){if(!Nr)return xi(t);var r=xi(tn);if(r===null)r=tn.appendChild(Vi());else if(e&&r.nodeType!==rS){var n=Vi();return r?.before(n),Ga(n),n}return Ga(r),r}function L(t,e=!1){if(!Nr){var r=xi(t);return r instanceof Comment&&r.data===""?uo(r):r}if(e&&tn?.nodeType!==rS){var n=Vi();return tn?.before(n),Ga(n),n}return tn}function te(t,e=1,r=!1){let n=Nr?tn:t;for(var a;e--;)a=n,n=uo(n);if(!Nr)return n;if(r&&n?.nodeType!==rS){var i=Vi();return n===null?a?.after(i):n.before(i),Ga(i),i}return Ga(n),n}function sO(t){t.textContent=""}function bF(){return!1}function OW(t,e){if(e){const r=document.body;t.autofocus=!0,Do(()=>{document.activeElement===r&&t.focus()})}}function Qf(t){Nr&&xi(t)!==null&&sO(t)}let nD=!1;function SF(){nD||(nD=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e.__on_r?.()})},{capture:!0}))}function NW(t,e,r,n=!0){n&&r();for(var a of e)t.addEventListener(a,r);dh(()=>{for(var i of e)t.removeEventListener(i,r)})}function uh(t){var e=Tn,r=Pn;xs(null),Hl(null);try{return t()}finally{xs(e),Hl(r)}}function EF(t,e,r,n=r){t.addEventListener(e,()=>uh(r));const a=t.__on_r;a?t.__on_r=()=>{a(),n(!0)}:t.__on_r=()=>n(!0),SF()}function vF(t){Pn===null&&(Tn===null&&LV(),PV()),Fu&&kV()}function IW(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function po(t,e,r){var n=Pn;n!==null&&(n.f&io)!==0&&(t|=io);var a={ctx:qn,deps:null,nodes:null,f:t|Wi|xo,first:null,fn:e,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};if(r)try{_f(a),a.f|=Wf}catch(o){throw Ei(a),o}else e!==null&&Bc(a);var i=a;if(r&&i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&ch)===0&&(i=i.first,(t&Kl)!==0&&(t&zl)!==0&&i!==null&&(i.f|=zl)),i!==null&&(i.parent=n,n!==null&&IW(i,n),Tn!==null&&(Tn.f&ui)!==0&&(t&Xu)===0)){var s=Tn;(s.effects??=[]).push(i)}return a}function oO(){return Tn!==null&&!tl}function dh(t){const e=po(Vf,null,!1);return ei(e,Yi),e.teardown=t,e}function It(t){vF();var e=Pn.f,r=!Tn&&(e&Jc)!==0&&(e&Wf)===0;if(r){var n=qn;(n.e??=[]).push(t)}else return yF(t)}function yF(t){return po(ff|W8,t,!1)}function $i(t){return vF(),po(Vf|W8,t,!0)}function Xf(t){nl.ensure();const e=po(Xu|ch,t,!0);return()=>{Ei(e)}}function xW(t){nl.ensure();const e=po(Xu|ch,t,!0);return(r={})=>new Promise(n=>{r.outro?Zd(e,()=>{Ei(e),n(void 0)}):(Ei(e),n(void 0))})}function Xp(t){return po(ff,t,!1)}function DW(t){return po(Z2|ch,t,!0)}function Zf(t,e=0){return po(Vf|e,t,!0)}function we(t,e=[],r=[],n=[]){nO(n,e,r,a=>{po(Vf,()=>t(...a.map(p)),!0)})}function TF(t,e=[],r=[],n=[]){var a=Hn,i=r.length>0||n.length>0;i&&a.increment(!0),nO(n,e,r,s=>{po(ff,()=>t(...s.map(p)),!1),i&&a.decrement(!0)})}function ed(t,e=0){var r=po(Kl|e,t,!0);return r}function CF(t,e=0){var r=po(j2|e,t,!0);return r}function Rs(t){return po(Jc|ch,t,!0)}function wF(t){var e=t.teardown;if(e!==null){const r=Fu,n=Tn;aD(!0),xs(null);try{e.call(null)}finally{aD(r),xs(n)}}}function AF(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){const a=r.ac;a!==null&&uh(()=>{a.abort(Zh)});var n=r.next;(r.f&Xu)!==0?r.parent=null:Ei(r,e),r=n}}function MW(t){for(var e=t.first;e!==null;){var r=e.next;(e.f&Jc)===0&&Ei(e),e=r}}function Ei(t,e=!0){var r=!1;(e||(t.f&X2)!==0)&&t.nodes!==null&&t.nodes.end!==null&&(RF(t.nodes.start,t.nodes.end),r=!0),AF(t,e&&!r),B1(t,0),ei(t,xc);var n=t.nodes&&t.nodes.t;if(n!==null)for(const i of n)i.stop();wF(t);var a=t.parent;a!==null&&a.first!==null&&OF(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=null}function RF(t,e){for(;t!==null;){var r=t===e?null:uo(t);t.remove(),t=r}}function OF(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function Zd(t,e,r=!0){var n=[];NF(t,n,!0);var a=()=>{r&&Ei(t),e&&e()},i=n.length;if(i>0){var s=()=>--i||a();for(var o of n)o.out(s)}else a()}function NF(t,e,r){if((t.f&io)===0){t.f^=io;var n=t.nodes&&t.nodes.t;if(n!==null)for(const o of n)(o.is_global||r)&&e.push(o);for(var a=t.first;a!==null;){var i=a.next,s=(a.f&zl)!==0||(a.f&Jc)!==0&&(t.f&Kl)!==0;NF(a,e,s?r:!1),a=i}}}function lO(t){IF(t,!0)}function IF(t,e){if((t.f&io)!==0){t.f^=io,(t.f&Yi)===0&&(ei(t,Wi),Bc(t));for(var r=t.first;r!==null;){var n=r.next,a=(r.f&zl)!==0||(r.f&Jc)!==0;IF(r,a?e:!1),r=n}var i=t.nodes&&t.nodes.t;if(i!==null)for(const s of i)(s.is_global||e)&&s.in()}}function xF(t,e){if(t.nodes)for(var r=t.nodes.start,n=t.nodes.end;r!==null;){var a=r===n?null:uo(r);e.append(r),r=a}}let E1=!1,Fu=!1;function aD(t){Fu=t}let Tn=null,tl=!1;function xs(t){Tn=t}let Pn=null;function Hl(t){Pn=t}let Mo=null;function DF(t){Tn!==null&&(Mo===null?Mo=[t]:Mo.push(t))}let ws=null,Hs=0,Ao=null;function kW(t){Ao=t}let MF=1,Hd=0,al=Hd;function iD(t){al=t}function cO(){return++MF}function Jf(t){var e=t.f;if((e&Wi)!==0)return!0;if(e&ui&&(t.f&=~eh),(e&eu)!==0){for(var r=t.deps,n=r.length,a=0;at.wv)return!0}(e&xo)!==0&&No===null&&ei(t,Yi)}return!1}function kF(t,e,r=!0){var n=t.reactions;if(n!==null&&!(Mo!==null&&Tp.call(Mo,t)))for(var a=0;a{t.ac.abort(Zh)}),t.ac=null);try{t.f|=OA;var u=t.fn,d=u(),h=t.deps;if(ws!==null){var m;if(B1(t,Hs),h!==null&&Hs>0)for(h.length=Hs+ws.length,m=0;m{t.isConnected&&t.dispatchEvent(e)}))}function uO(t,e,r,n={}){function a(i){if(n.capture||qm.call(e,i),!i.cancelBubble)return uh(()=>r?.call(this,i))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Do(()=>{e.addEventListener(t,a,n)}):e.addEventListener(t,a,n),a}function Kr(t,e,r,n={}){var a=uO(e,t,r,n);return()=>{t.removeEventListener(e,a,n)}}function hn(t,e,r,n,a){var i={capture:n,passive:a},s=uO(t,e,r,i);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&dh(()=>{e.removeEventListener(t,s,i)})}function Bn(t){for(var e=0;e{throw b});throw h}}finally{t.__root=e,delete t.currentTarget,xs(u),Hl(d)}}}function cS(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("",""),e.content}function Ds(t,e){var r=Pn;r.nodes===null&&(r.nodes={start:t,end:e,a:null,t:null})}function q(t,e){var r=(e&iW)!==0,n=(e&sW)!==0,a,i=!t.startsWith("");return()=>{if(Nr)return Ds(tn,null),tn;a===void 0&&(a=cS(i?t:""+t),r||(a=xi(a)));var s=n||fF?document.importNode(a,!0):a.cloneNode(!0);if(r){var o=xi(s),l=s.lastChild;Ds(o,l)}else Ds(s,s);return s}}function VW(t,e,r="svg"){var n=!t.startsWith(""),a=`<${r}>${n?t:""+t}`,i;return()=>{if(Nr)return Ds(tn,null),tn;if(!i){var s=cS(a),o=xi(s);i=xi(o)}var l=i.cloneNode(!0);return Ds(l,l),l}}function td(t,e){return VW(t,e,"svg")}function Nt(t=""){if(!Nr){var e=Vi(t+"");return Ds(e,e),e}var r=tn;return r.nodeType!==rS&&(r.before(r=Vi()),Ga(r)),Ds(r,r),r}function se(){if(Nr)return Ds(tn,null),tn;var t=document.createDocumentFragment(),e=document.createComment(""),r=Vi();return t.append(e,r),Ds(e,r),t}function C(t,e){if(Nr){var r=Pn;((r.f&Wf)===0||r.nodes.end===null)&&(r.nodes.end=tn),Po();return}t!==null&&t.before(e)}function In(){if(Nr&&tn&&tn.nodeType===tu&&tn.textContent?.startsWith("$")){const t=tn.textContent.substring(1);return Po(),t}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}let U1=!0;function Xg(t){U1=t}function qe(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??=t.nodeValue)&&(t.__t=r,t.nodeValue=r+"")}function uS(t,e){return zF(t,e)}function qF(t,e){MA(),e.intro=e.intro??!1;const r=e.target,n=Nr,a=tn;try{for(var i=xi(r);i&&(i.nodeType!==tu||i.data!==X8);)i=uo(i);if(!i)throw th;cs(!0),Ga(i);const s=zF(t,{...e,anchor:i});return cs(!1),s}catch(s){if(s instanceof Error&&s.message.split(` +`).some(o=>o.startsWith("https://svelte.dev/e/")))throw s;return s!==th&&console.warn("Failed to hydrate: ",s),e.recover===!1&&qV(),MA(),sO(r),cs(!1),uS(t,e)}finally{cs(n),Ga(a)}}const Rh=new Map;function zF(t,{target:e,anchor:r,props:n={},events:a,context:i,intro:s=!0}){MA();var o=new Set,l=d=>{for(var h=0;h{var d=r??e.appendChild(Vi());return vW(d,{pending:()=>{}},h=>{if(i){ye({});var m=qn;m.c=i}if(a&&(n.$$events=a),Nr&&Ds(h,null),U1=s,c=t(h,n)||{},U1=!0,Nr&&(Pn.nodes.end=tn,tn===null||tn.nodeType!==tu||tn.data!==eO))throw Kf(),th;i&&Te()}),()=>{for(var h of o){e.removeEventListener(h,qm);var m=Rh.get(h);--m===0?(document.removeEventListener(h,qm),Rh.delete(h)):Rh.set(h,m)}PA.delete(l),d!==r&&d.parentNode?.removeChild(d)}});return LA.set(c,u),c}let LA=new WeakMap;function dO(t,e){const r=LA.get(t);return r?(LA.delete(t),r(e)):Promise.resolve()}class eg{anchor;#e=new Map;#t=new Map;#r=new Map;#n=new Set;#i=!0;constructor(e,r=!0){this.anchor=e,this.#i=r}#a=()=>{var e=Hn;if(this.#e.has(e)){var r=this.#e.get(e),n=this.#t.get(r);if(n)lO(n),this.#n.delete(r);else{var a=this.#r.get(r);a&&(this.#t.set(r,a.effect),this.#r.delete(r),a.fragment.lastChild.remove(),this.anchor.before(a.fragment),n=a.effect)}for(const[i,s]of this.#e){if(this.#e.delete(i),i===e)break;const o=this.#r.get(s);o&&(Ei(o.effect),this.#r.delete(s))}for(const[i,s]of this.#t){if(i===r||this.#n.has(i))continue;const o=()=>{if(Array.from(this.#e.values()).includes(i)){var c=document.createDocumentFragment();xF(s,c),c.append(Vi()),this.#r.set(i,{effect:s,fragment:c})}else Ei(s);this.#n.delete(i),this.#t.delete(i)};this.#i||!n?(this.#n.add(i),Zd(s,o,!1)):o()}}};#s=e=>{this.#e.delete(e);const r=Array.from(this.#e.values());for(const[n,a]of this.#r)r.includes(n)||(Ei(a.effect),this.#r.delete(n))};ensure(e,r){var n=Hn,a=bF();if(r&&!this.#t.has(e)&&!this.#r.has(e))if(a){var i=document.createDocumentFragment(),s=Vi();i.append(s),this.#r.set(e,{effect:Rs(()=>r(s)),fragment:i})}else this.#t.set(e,Rs(()=>r(this.anchor)));if(this.#e.set(n,e),a){for(const[o,l]of this.#t)o===e?n.skipped_effects.delete(l):n.skipped_effects.add(l);for(const[o,l]of this.#r)o===e?n.skipped_effects.delete(l.effect):n.skipped_effects.add(l.effect);n.oncommit(this.#a),n.ondiscard(this.#s)}else Nr&&(this.anchor=tn),this.#a()}}function le(t,e,r=!1){Nr&&Po();var n=new eg(t),a=r?zl:0;function i(s,o){if(Nr){const c=J8(t)===nS;if(s===c){var l=L1();Ga(l),n.anchor=l,cs(!1),n.ensure(s,o),cs(!0);return}}n.ensure(s,o)}ed(()=>{var s=!1;e((o,l=!0)=>{s=!0,i(l,o)}),s||i(!1,null)},a)}function WW(t,e,r){Nr&&Po();var n=new eg(t),a=!Qp();ed(()=>{var i=e();a&&i!==null&&typeof i=="object"&&(i={}),n.ensure(i,r)})}function ku(t,e){return e}function KW(t,e,r){for(var n=[],a=e.length,i,s=e.length,o=0;o{if(i){if(i.pending.delete(d),i.done.add(d),i.pending.size===0){var h=t.outrogroups;FA(eS(i.done)),h.delete(i),h.size===0&&(t.outrogroups=null)}}else s-=1},!1)}if(s===0){var l=n.length===0&&r!==null;if(l){var c=r,u=c.parentNode;sO(u),u.append(c),t.items.clear()}FA(e,!l)}else i={pending:new Set(e),done:new Set},(t.outrogroups??=new Set).add(i)}function FA(t,e=!0){for(var r=0;r{var _=r();return Yf(_)?_:_==null?[]:eS(_)}),h,m=!0;function f(){b.fallback=u,jW(b,h,s,e,n),u!==null&&(h.length===0?(u.f&Oc)===0?lO(u):(u.f^=Oc,zm(u,null,s)):Zd(u,()=>{u=null}))}var g=ed(()=>{h=p(d);var _=h.length;let S=!1;if(Nr){var E=J8(s)===nS;E!==(_===0)&&(s=L1(),Ga(s),cs(!1),S=!0)}for(var y=new Set,v=Hn,T=bF(),w=0;w<_;w+=1){Nr&&tn.nodeType===tu&&tn.data===eO&&(s=tn,S=!0,cs(!1));var A=h[w],I=n(A,w),x=m?null:o.get(I);x?(x.v&&Ap(x.v,A),x.i&&Ap(x.i,w),T&&v.skipped_effects.delete(x.e)):(x=QW(o,m?s:oD??=Vi(),A,I,w,a,e,r),m||(x.e.f|=Oc),o.set(I,x)),y.add(I)}if(_===0&&i&&!u&&(m?u=Rs(()=>i(s)):(u=Rs(()=>i(oD??=Vi())),u.f|=Oc)),Nr&&_>0&&Ga(L1()),!m)if(T){for(const[D,$]of o)y.has(D)||v.skipped_effects.add($.e);v.oncommit(f),v.ondiscard(()=>{})}else f();S&&cs(!0),p(d)}),b={effect:g,items:o,outrogroups:null,fallback:u};m=!1,Nr&&(s=tn)}function jW(t,e,r,n,a){var i=(n&jV)!==0,s=e.length,o=t.items,l=t.effect.first,c,u=null,d,h=[],m=[],f,g,b,_;if(i)for(_=0;_0){var I=(n&Q8)!==0&&s===0?r:null;if(i){for(_=0;_{if(d!==void 0)for(b of d)b.nodes?.a?.apply()})}function QW(t,e,r,n,a,i,s,o){var l=(s&WV)!==0?(s&QV)===0?iO(r,!1,!1):Uc(r):null,c=(s&KV)!==0?Uc(a):null;return{v:l,i:c,e:Rs(()=>(i(e,l??r,c??a,o),()=>{t.delete(n)}))}}function zm(t,e,r){if(t.nodes)for(var n=t.nodes.start,a=t.nodes.end,i=e&&(e.f&Oc)===0?e.nodes.start:r;n!==null;){var s=uo(n);if(i.before(n),n===a)return;n=s}}function pu(t,e,r){e===null?t.effect.first=r:e.next=r,r===null?t.effect.last=e:r.prev=e}function op(t,e,r=!1,n=!1,a=!1){var i=t,s="";we(()=>{var o=Pn;if(s===(s=e()??"")){Nr&&Po();return}if(o.nodes!==null&&(RF(o.nodes.start,o.nodes.end),o.nodes=null),s!==""){if(Nr){tn.data;for(var l=Po(),c=l;l!==null&&(l.nodeType!==tu||l.data!=="");)c=l,l=uo(l);if(l===null)throw Kf(),th;Ds(tn,c),i=Ga(l);return}var u=s+"";r?u=`${u}`:n&&(u=`${u}`);var d=cS(u);if((r||n)&&(d=xi(d)),Ds(xi(d),d.lastChild),r||n)for(;xi(d);)i.before(xi(d));else i.before(d)}})}function De(t,e,...r){var n=new eg(t);ed(()=>{const a=e()??null;n.ensure(a,a&&(i=>a(i,...r)))},zl)}function XW(t){return(e,...r)=>{var n=t(...r),a;if(Nr)a=tn,Po();else{var i=n.render().trim(),s=cS(i);a=xi(s),e.before(a)}const o=n.setup?.(a);Ds(a,a),typeof o=="function"&&dh(o)}}function fe(t,e,r){Nr&&Po();var n=new eg(t);ed(()=>{var a=e()??null;n.ensure(a,a&&(i=>r(i,a)))},zl)}const ZW=()=>performance.now(),Ac={tick:t=>requestAnimationFrame(t),now:()=>ZW(),tasks:new Set};function $F(){const t=Ac.now();Ac.tasks.forEach(e=>{e.c(t)||(Ac.tasks.delete(e),e.f())}),Ac.tasks.size!==0&&Ac.tick($F)}function JW(t){let e;return Ac.tasks.size===0&&Ac.tick($F),{promise:new Promise(r=>{Ac.tasks.add(e={c:t,f:r})}),abort(){Ac.tasks.delete(e)}}}function Zg(t,e){uh(()=>{t.dispatchEvent(new CustomEvent(e))})}function eK(t){if(t==="float")return"cssFloat";if(t==="offset")return"cssOffset";if(t.startsWith("--"))return t;const e=t.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("")}function lD(t){const e={},r=t.split(";");for(const n of r){const[a,i]=n.split(":");if(!a||i===void 0)break;const s=eK(a.trim());e[s]=i.trim()}return e}const tK=t=>t;function li(t,e,r,n){var a=(t&rW)!==0,i=(t&nW)!==0,s=a&&i,o=(t&aW)!==0,l=s?"both":a?"in":"out",c,u=e.inert,d=e.style.overflow,h,m;function f(){return uh(()=>c??=r()(e,n?.()??{},{direction:l}))}var g={is_global:o,in(){if(e.inert=u,!a){m?.abort(),m?.reset?.();return}i||h?.abort(),Zg(e,"introstart"),h=BA(e,f(),m,1,()=>{Zg(e,"introend"),h?.abort(),h=c=void 0,e.style.overflow=d})},out(E){if(!i){E?.(),c=void 0;return}e.inert=!0,Zg(e,"outrostart"),m=BA(e,f(),h,0,()=>{Zg(e,"outroend"),E?.()})},stop:()=>{h?.abort(),m?.abort()}},b=Pn;if((b.nodes.t??=[]).push(g),a&&U1){var _=o;if(!_){for(var S=b.parent;S&&(S.f&zl)!==0;)for(;(S=S.parent)&&(S.f&Kl)===0;);_=!S||(S.f&Wf)!==0}_&&Xp(()=>{Nn(()=>g.in())})}}function BA(t,e,r,n,a){var i=n===1;if(Uh(e)){var s,o=!1;return Do(()=>{if(!o){var b=e({direction:i?"in":"out"});s=BA(t,b,r,n,a)}}),{abort:()=>{o=!0,s?.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(r?.deactivate(),!e?.duration)return a(),{abort:Ge,deactivate:Ge,reset:Ge,t:()=>n};const{delay:l=0,css:c,tick:u,easing:d=tK}=e;var h=[];if(i&&r===void 0&&(u&&u(0,1),c)){var m=lD(c(0,1));h.push(m,m)}var f=()=>1-n,g=t.animate(h,{duration:l,fill:"forwards"});return g.onfinish=()=>{g.cancel();var b=r?.t()??1-n;r?.abort();var _=n-b,S=e.duration*Math.abs(_),E=[];if(S>0){var y=!1;if(c)for(var v=Math.ceil(S/16.666666666666668),T=0;T<=v;T+=1){var w=b+_*d(T/v),A=lD(c(w,1-w));E.push(A),y||=A.overflow==="hidden"}y&&(t.style.overflow="hidden"),f=()=>{var I=g.currentTime;return b+_*d(I/S)},u&&JW(()=>{if(g.playState!=="running")return!1;var I=f();return u(I,1-I),!0})}g=t.animate(E,{duration:S,fill:"forwards"}),g.onfinish=()=>{f=()=>n,u?.(n,1-n),a()}},{abort:()=>{g&&(g.cancel(),g.effect=null,g.onfinish=Ge)},deactivate:()=>{a=Ge},reset:()=>{n===0&&u?.(1,0)},t:()=>f()}}function HF(t,e,r,n,a,i){let s=Nr;Nr&&Po();var o=null;Nr&&tn.nodeType===xV&&(o=tn,Po());var l=Nr?tn:t,c=new eg(l,!1);ed(()=>{const u=e()||null;var d=r||u==="svg"?lW:null;if(u===null){c.ensure(null,null),Xg(!0);return}return c.ensure(u,h=>{if(u){if(o=Nr?o:d?document.createElementNS(d,u):document.createElement(u),Ds(o,o),n){Nr&&YW(u)&&o.append(document.createComment(""));var m=Nr?xi(o):o.appendChild(Vi());Nr&&(m===null?cs(!1):Ga(m)),n(o,m)}Pn.nodes.end=o,h.before(o)}Nr&&Ga(h)}),Xg(!0),()=>{u&&Xg(!1)}},zl),dh(()=>{Xg(!0)}),s&&(cs(!0),Ga(l))}function dS(t,e){let r=null,n=Nr;var a;if(Nr){r=tn;for(var i=xi(document.head);i!==null&&(i.nodeType!==tu||i.data!==t);)i=uo(i);if(i===null)cs(!1);else{var s=uo(i);i.remove(),Ga(s)}}Nr||(a=document.head.appendChild(Vi()));try{ed(()=>e(a),X2)}finally{n&&(cs(!0),Ga(r))}}function hO(t,e,r){Xp(()=>{var n=Nn(()=>e(t,r?.())||{});if(r&&n?.update){var a=!1,i={};Zf(()=>{var s=r();UF(s),a&&tO(i,s)&&(i=s,n.update(s))}),a=!0}if(n?.destroy)return()=>n.destroy()})}function rK(t,e){var r=void 0,n;CF(()=>{r!==(r=e())&&(n&&(Ei(n),n=null),r&&(n=Rs(()=>{Xp(()=>r(t))})))})}function YF(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e=0;){var o=s+i;(s===0||cD.includes(n[s-1]))&&(o===n.length||cD.includes(n[o]))?n=(s===0?"":n.substring(0,s))+n.substring(o+1):s=o}}return n===""?null:n}function uD(t,e=!1){var r=e?" !important;":";",n="";for(var a in t){var i=t[a];i!=null&&i!==""&&(n+=" "+a+": "+i+r)}return n}function sv(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function aK(t,e){if(e){var r="",n,a;if(Array.isArray(e)?(n=e[0],a=e[1]):n=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,s=0,o=!1,l=[];n&&l.push(...Object.keys(n).map(sv)),a&&l.push(...Object.keys(a).map(sv));var c=0,u=-1;const g=t.length;for(var d=0;d{UA(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),dh(()=>{e.disconnect()})}function dD(t){return"__value"in t?t.__value:t.value}const bm=Symbol("class"),Gh=Symbol("style"),VF=Symbol("is custom element"),WF=Symbol("is html");function sK(t){if(Nr){var e=!1,r=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var n=t.value;rr(t,"value",null),t.value=n}if(t.hasAttribute("checked")){var a=t.checked;rr(t,"checked",null),t.checked=a}}};t.__on_r=r,Do(r),SF()}}function pO(t,e){var r=mO(t);r.value===(r.value=e??void 0)||t.value===e&&(e!==0||t.nodeName!=="PROGRESS")||(t.value=e??"")}function oK(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function rr(t,e,r,n){var a=mO(t);Nr&&(a[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||a[e]!==(a[e]=r)&&(e==="loading"&&(t[IV]=r),r==null?t.removeAttribute(e):typeof r!="string"&&KF(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function lK(t,e,r,n,a=!1,i=!1){if(Nr&&a&&t.tagName==="INPUT"){var s=t,o=s.type==="checkbox"?"defaultChecked":"defaultValue";o in r||sK(s)}var l=mO(t),c=l[VF],u=!l[WF];let d=Nr&&c;d&&cs(!1);var h=e||{},m=t.tagName==="OPTION";for(var f in e)f in r||(r[f]=null);r.class?r.class=$r(r.class):(n||r[bm])&&(r.class=null),r[Gh]&&(r.style??=null);var g=KF(t);for(const T in r){let w=r[T];if(m&&T==="value"&&w==null){t.value=t.__value="",h[T]=w;continue}if(T==="class"){var b=t.namespaceURI==="http://www.w3.org/1999/xhtml";Et(t,b,w,n,e?.[bm],r[bm]),h[T]=w,h[bm]=r[bm];continue}if(T==="style"){ms(t,w,e?.[Gh],r[Gh]),h[T]=w,h[Gh]=r[Gh];continue}var _=h[T];if(!(w===_&&!(w===void 0&&t.hasAttribute(T)))){h[T]=w;var S=T[0]+T[1];if(S!=="$$")if(S==="on"){const A={},I="$$"+T;let x=T.slice(2);var E=UW(x);if(FW(x)&&(x=x.slice(0,-7),A.capture=!0),!E&&_){if(w!=null)continue;t.removeEventListener(x,h[I],A),h[I]=null}if(w!=null)if(E)t[`__${x}`]=w,Bn([x]);else{let D=function($){h[T].call(this,$)};h[I]=uO(x,t,D,A)}else E&&(t[`__${x}`]=void 0)}else if(T==="style")rr(t,T,w);else if(T==="autofocus")OW(t,!!w);else if(!c&&(T==="__value"||T==="value"&&w!=null))t.value=t.__value=w;else if(T==="selected"&&m)oK(t,w);else{var y=T;u||(y=qW(y));var v=y==="defaultValue"||y==="defaultChecked";if(w==null&&!c&&!v)if(l[T]=null,y==="value"||y==="checked"){let A=t;const I=e===void 0;if(y==="value"){let x=A.defaultValue;A.removeAttribute(y),A.defaultValue=x,A.value=A.__value=I?x:null}else{let x=A.defaultChecked;A.removeAttribute(y),A.defaultChecked=x,A.checked=I?x:!1}}else t.removeAttribute(T);else v||g.includes(y)&&(c||typeof w!="string")?(t[y]=w,y in l&&(l[y]=_i)):typeof w!="function"&&rr(t,y,w)}}}return d&&cs(!0),h}function $t(t,e,r=[],n=[],a=[],i,s=!1,o=!1){nO(a,r,n,l=>{var c=void 0,u={},d=t.nodeName==="SELECT",h=!1;if(CF(()=>{var f=e(...l.map(p)),g=lK(t,c,f,i,s,o);h&&d&&"value"in f&&UA(t,f.value);for(let _ of Object.getOwnPropertySymbols(u))f[_]||Ei(u[_]);for(let _ of Object.getOwnPropertySymbols(f)){var b=f[_];_.description===Z8&&(!c||b!==c[_])&&(u[_]&&Ei(u[_]),u[_]=Rs(()=>rK(t,()=>b))),g[_]=b}c=g}),d){var m=t;Xp(()=>{UA(m,c.value,!0),iK(m)})}h=!0})}function mO(t){return t.__attributes??={[VF]:t.nodeName.includes("-"),[WF]:t.namespaceURI===oW}}var hD=new Map;function KF(t){var e=t.getAttribute("is")||t.nodeName,r=hD.get(e);if(r)return r;hD.set(e,r=[]);for(var n,a=t,i=Element.prototype;i!==a;){n=H8(a);for(var s in n)n[s].set&&r.push(s);a=tS(a)}return r}function bf(t,e,r=e){var n=new WeakSet;EF(t,"input",async a=>{var i=a?t.defaultValue:t.value;if(i=lv(t)?cv(i):i,r(i),Hn!==null&&n.add(Hn),await ll(),i!==(i=e())){var s=t.selectionStart,o=t.selectionEnd,l=t.value.length;if(t.value=i??"",o!==null){var c=t.value.length;s===o&&o===l&&c>l?(t.selectionStart=c,t.selectionEnd=c):(t.selectionStart=s,t.selectionEnd=Math.min(o,c))}}}),(Nr&&t.defaultValue!==t.value||Nn(e)==null&&t.value)&&(r(lv(t)?cv(t.value):t.value),Hn!==null&&n.add(Hn)),Zf(()=>{var a=e();if(t===document.activeElement){var i=NA??Hn;if(n.has(i))return}lv(t)&&a===cv(t.value)||t.type==="date"&&!a&&!t.value||a!==t.value&&(t.value=a??"")})}function lv(t){var e=t.type;return e==="number"||e==="range"}function cv(t){return t===""?null:+t}function cK(t,e,r=e){EF(t,"change",()=>{r(t.files)}),Nr&&t.files&&r(t.files),Zf(()=>{t.files=e()})}function pD(t,e){return t===e||t?.[Fl]===e}function mr(t={},e,r,n){return Xp(()=>{var a,i;return Zf(()=>{a=i,i=[],Nn(()=>{t!==r(...i)&&(e(t,...i),a&&pD(r(...a),t)&&e(null,...a))})}),()=>{Do(()=>{i&&pD(r(...i),t)&&e(null,...i)})}}),t}function uK(t,e){NW(window,["resize"],()=>uh(()=>e(window[t])))}function fO(t=!1){const e=qn,r=e.l.u;if(!r)return;let n=()=>UF(e.s);if(t){let a=0,i={};const s=jf(()=>{let o=!1;const l=e.s;for(const c in l)l[c]!==i[c]&&(i[c]=l[c],o=!0);return o&&a++,a});n=()=>p(s)}r.b.length&&$i(()=>{mD(e,n),AA(r.b)}),It(()=>{const a=Nn(()=>r.m.map(OV));return()=>{for(const i of a)typeof i=="function"&&i()}}),r.a.length&&It(()=>{mD(e,n),AA(r.a)})}function mD(t,e){if(t.l.s)for(const r of t.l.s)p(r);e()}function jF(t,e,r){if(t==null)return e(void 0),Ge;const n=Nn(()=>t.subscribe(e,r));return n.unsubscribe?()=>n.unsubscribe():n}const Oh=[];function gO(t,e=Ge){let r=null;const n=new Set;function a(o){if(tO(t,o)&&(t=o,r)){const l=!Oh.length;for(const c of n)c[1](),Oh.push(c,t);if(l){for(let c=0;c{n.delete(c),n.size===0&&r&&(r(),r=null)}}return{set:a,update:i,subscribe:s}}function dK(t){let e;return jF(t,r=>e=r)(),e}let Jg=!1,GA=Symbol();function hK(t,e,r){const n=r[e]??={store:null,source:iO(void 0),unsubscribe:Ge};if(n.store!==t&&!(GA in r))if(n.unsubscribe(),n.store=t??null,t==null)n.source.v=void 0,n.unsubscribe=Ge;else{var a=!0;n.unsubscribe=jF(t,i=>{a?n.source.v=i:k(n.source,i)}),a=!1}return t&&GA in r?dK(t):p(n.source)}function pK(){const t={};function e(){dh(()=>{for(var r in t)t[r].unsubscribe();W2(t,GA,{enumerable:!1,value:!0})})}return[t,e]}function mK(t){var e=Jg;try{return Jg=!1,[t(),Jg]}finally{Jg=e}}const fK={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function Ve(t,e,r){return new Proxy({props:t,exclude:e},fK)}const gK={get(t,e){let r=t.props.length;for(;r--;){let n=t.props[r];if(Uh(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n)return n[e]}},set(t,e,r){let n=t.props.length;for(;n--;){let a=t.props[n];Uh(a)&&(a=a());const i=xu(a,e);if(i&&i.set)return i.set(r),!0}return!1},getOwnPropertyDescriptor(t,e){let r=t.props.length;for(;r--;){let n=t.props[r];if(Uh(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n){const a=xu(n,e);return a&&!a.configurable&&(a.configurable=!0),a}}},has(t,e){if(e===Fl||e===J2)return!1;for(let r of t.props)if(Uh(r)&&(r=r()),r!=null&&e in r)return!0;return!1},ownKeys(t){const e=[];for(let r of t.props)if(Uh(r)&&(r=r()),!!r){for(const n in r)e.includes(n)||e.push(n);for(const n of Object.getOwnPropertySymbols(r))e.includes(n)||e.push(n)}return e}};function ot(...t){return new Proxy({props:t},gK)}function V(t,e,r,n){var a=!jp||(r&ZV)!==0,i=(r&eW)!==0,s=(r&tW)!==0,o=n,l=!0,c=()=>(l&&(l=!1,o=s?Nn(n):n),o),u;if(i){var d=Fl in t||J2 in t;u=xu(t,e)?.set??(d&&e in t?E=>t[e]=E:void 0)}var h,m=!1;i?[h,m]=mK(()=>t[e]):h=t[e],h===void 0&&n!==void 0&&(h=c(),u&&(a&&zV(),u(h)));var f;if(a?f=()=>{var E=t[e];return E===void 0?c():(l=!0,E)}:f=()=>{var E=t[e];return E!==void 0&&(o=void 0),E===void 0?o:E},a&&(r&JV)===0)return f;if(u){var g=t.$$legacy;return function(E,y){return arguments.length>0?((!a||!y||g||m)&&u(y?f():E),E):f()}}var b=!1,_=((r&XV)!==0?jf:oS)(()=>(b=!1,f()));i&&p(_);var S=Pn;return function(E,y){if(arguments.length>0){const v=y?p(_):a&&i?Tr(E):E;return k(_,v),b=!0,o!==void 0&&(o=v),E}return Fu&&b||(S.f&xc)!==0?_.v:p(_)}}function _K(t){return class extends bK{constructor(e){super({component:t,...e})}}}class bK{#e;#t;constructor(e){var r=new Map,n=(i,s)=>{var o=iO(s,!1,!1);return r.set(i,o),o};const a=new Proxy({...e.props||{},$$events:{}},{get(i,s){return p(r.get(s)??n(s,Reflect.get(i,s)))},has(i,s){return s===J2?!0:(p(r.get(s)??n(s,Reflect.get(i,s))),Reflect.has(i,s))},set(i,s,o){return k(r.get(s)??n(s,o),o),Reflect.set(i,s,o)}});this.#t=(e.hydrate?qF:uS)(e.component,{target:e.target,anchor:e.anchor,props:a,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&gf(),this.#e=a.$$events;for(const i of Object.keys(this.#t))i==="$set"||i==="$destroy"||i==="$on"||W2(this,i,{get(){return this.#t[i]},set(s){this.#t[i]=s},enumerable:!0});this.#t.$set=i=>{Object.assign(a,i)},this.#t.$destroy=()=>{dO(this.#t)}}$set(e){this.#t.$set(e)}$on(e,r){this.#e[e]=this.#e[e]||[];const n=(...a)=>r.call(this,...a);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(a=>a!==n)}}$destroy(){this.#t.$destroy()}}function SK(t,e){if(K8(),Nr){const r=window.__svelte?.h;if(r?.has(t))return r.get(t);cW()}return e()}function EK(){return Tn===null&&GV(),(Tn.ac??=new AbortController).signal}function vi(t){qn===null&&Kp(),jp&&qn.l!==null?bO(qn).m.push(t):It(()=>{const e=Nn(t);if(typeof e=="function")return e})}function _O(t){qn===null&&Kp(),vi(()=>()=>Nn(t))}function vK(t,e,{bubbles:r=!1,cancelable:n=!1}={}){return new CustomEvent(t,{detail:e,bubbles:r,cancelable:n})}function yK(){const t=qn;return t===null&&Kp(),(e,r,n)=>{const a=t.s.$$events?.[e];if(a){const i=Yf(a)?a.slice():[a],s=vK(e,r,n);for(const o of i)o.call(t.x,s);return!s.defaultPrevented}return!0}}function TK(t){qn===null&&Kp(),qn.l===null&&j8(),bO(qn).b.push(t)}function CK(t){qn===null&&Kp(),qn.l===null&&j8(),bO(qn).a.push(t)}function bO(t){var e=t.l;return e.u??={a:[],b:[],m:[]}}const wK=Object.freeze(Object.defineProperty({__proto__:null,afterUpdate:CK,beforeUpdate:TK,createContext:mW,createEventDispatcher:yK,createRawSnippet:XW,flushSync:gf,fork:SW,getAbortSignal:EK,getAllContexts:rF,getContext:$l,hasContext:aS,hydratable:SK,hydrate:qF,mount:uS,onDestroy:_O,onMount:vi,setContext:Zu,settled:LF,tick:ll,unmount:dO,untrack:Nn},Symbol.toStringTag,{value:"Module"}));class hS{constructor(e,r){this.status=e,typeof r=="string"?this.body={message:r}:r?this.body=r:this.body={message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}}class SO{constructor(e,r){this.status=e,this.location=r}}class EO extends Error{constructor(e,r,n){super(n),this.status=e,this.text=r}}new URL("sveltekit-internal://");function AK(t,e){return t==="/"||e==="ignore"?t:e==="never"?t.endsWith("/")?t.slice(0,-1):t:e==="always"&&!t.endsWith("/")?t+"/":t}function RK(t){return t.split("%25").map(decodeURI).join("%25")}function OK(t){for(const e in t)t[e]=decodeURIComponent(t[e]);return t}function uv({href:t}){return t.split("#")[0]}function NK(t,e,r,n=!1){const a=new URL(t);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(s,o){if(o==="get"||o==="getAll"||o==="has")return(c,...u)=>(r(c),s[o](c,...u));e();const l=Reflect.get(s,o);return typeof l=="function"?l.bind(s):l}}),enumerable:!0,configurable:!0});const i=["href","pathname","search","toString","toJSON"];n&&i.push("hash");for(const s of i)Object.defineProperty(a,s,{get(){return e(),t[s]},enumerable:!0,configurable:!0});return a}function IK(...t){let e=5381;for(const r of t)if(typeof r=="string"){let n=r.length;for(;n;)e=e*33^r.charCodeAt(--n)}else if(ArrayBuffer.isView(r)){const n=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);let a=n.length;for(;a;)e=e*33^n[--a]}else throw new TypeError("value must be a string or TypedArray");return(e>>>0).toString(36)}new TextEncoder;new TextDecoder;function xK(t){const e=atob(t),r=new Uint8Array(e.length);for(let n=0;n((t instanceof Request?t.method:e?.method||"GET")!=="GET"&&af.delete(vO(t)),DK(t,e));const af=new Map;function MK(t,e){const r=vO(t,e),n=document.querySelector(r);if(n?.textContent){n.remove();let{body:a,...i}=JSON.parse(n.textContent);const s=n.getAttribute("data-ttl");return s&&af.set(r,{body:a,init:i,ttl:1e3*Number(s)}),n.getAttribute("data-b64")!==null&&(a=xK(a)),Promise.resolve(new Response(a,i))}return window.fetch(t,e)}function kK(t,e,r){if(af.size>0){const n=vO(t,r),a=af.get(n);if(a){if(performance.now(){const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(n);if(a)return e.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const i=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(n);if(i)return e.push({name:i[1],matcher:i[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!n)return;const s=n.split(/\[(.+?)\](?!\])/);return"/"+s.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return dv(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return dv(String.fromCharCode(...l.slice(2).split("-").map(g=>parseInt(g,16))));const u=PK.exec(l),[,d,h,m,f]=u;return e.push({name:m,matcher:f,optional:!!d,rest:!!h,chained:h?c===1&&s[0]==="":!1}),h?"([^]*?)":d?"([^/]*)?":"([^/]+?)"}return dv(l)}).join("")}).join("")}/?$`),params:e}}function FK(t){return t!==""&&!/^\([^)]+\)$/.test(t)}function BK(t){return t.slice(1).split("/").filter(FK)}function UK(t,e,r){const n={},a=t.slice(1),i=a.filter(o=>o!==void 0);let s=0;for(let o=0;ou).join("/"),s=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||r[l.matcher](c)){n[l.name]=c;const u=e[o+1],d=a[o+1];u&&!u.rest&&u.optional&&d&&l.chained&&(s=0),!u&&!d&&Object.keys(n).length===i.length&&(s=0);continue}if(l.optional&&l.chained){s++;continue}return}if(!s)return n}function dv(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function GK({nodes:t,server_loads:e,dictionary:r,matchers:n}){const a=new Set(e);return Object.entries(r).map(([o,[l,c,u]])=>{const{pattern:d,params:h}=LK(o),m={id:o,exec:f=>{const g=d.exec(f);if(g)return UK(g,h,n)},errors:[1,...u||[]].map(f=>t[f]),layouts:[0,...c||[]].map(s),leaf:i(l)};return m.errors.length=m.layouts.length=Math.max(m.errors.length,m.layouts.length),m});function i(o){const l=o<0;return l&&(o=~o),[l,t[o]]}function s(o){return o===void 0?o:[a.has(o),t[o]]}}function QF(t,e=JSON.parse){try{return e(sessionStorage[t])}catch{}}function fD(t,e,r=JSON.stringify){const n=r(e);try{sessionStorage[t]=n}catch{}}const qa=globalThis.__sveltekit_1ppa22i?.base??"",qK=globalThis.__sveltekit_1ppa22i?.assets??qa??"",zK="1775616511483",XF="sveltekit:snapshot",ZF="sveltekit:scroll",yO="sveltekit:states",JF="sveltekit:pageurl",Jd="sveltekit:history",Op="sveltekit:navigation",Bd={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},pS=location.origin;function mS(t){if(t instanceof URL)return t;let e=document.baseURI;if(!e){const r=document.getElementsByTagName("base");e=r.length?r[0].href:document.URL}return new URL(t,e)}function fS(){return{x:pageXOffset,y:pageYOffset}}function Nh(t,e){return t.getAttribute(`data-sveltekit-${e}`)}const gD={...Bd,"":Bd.hover};function eB(t){let e=t.assignedSlot??t.parentNode;return e?.nodeType===11&&(e=e.host),e}function tB(t,e){for(;t&&t!==e;){if(t.nodeName.toUpperCase()==="A"&&t.hasAttribute("href"))return t;t=eB(t)}}function qA(t,e,r){let n;try{if(n=new URL(t instanceof SVGAElement?t.href.baseVal:t.href,document.baseURI),r&&n.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";n.hash=`#${o}${n.hash}`}}catch{}const a=t instanceof SVGAElement?t.target.baseVal:t.target,i=!n||!!a||gS(n,e,r)||(t.getAttribute("rel")||"").split(/\s+/).includes("external"),s=n?.origin===pS&&t.hasAttribute("download");return{url:n,external:i,target:a,download:s}}function G1(t){let e=null,r=null,n=null,a=null,i=null,s=null,o=t;for(;o&&o!==document.documentElement;)n===null&&(n=Nh(o,"preload-code")),a===null&&(a=Nh(o,"preload-data")),e===null&&(e=Nh(o,"keepfocus")),r===null&&(r=Nh(o,"noscroll")),i===null&&(i=Nh(o,"reload")),s===null&&(s=Nh(o,"replacestate")),o=eB(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:gD[n??"off"],preload_data:gD[a??"off"],keepfocus:l(e),noscroll:l(r),reload:l(i),replace_state:l(s)}}function _D(t){const e=gO(t);let r=!0;function n(){r=!0,e.update(s=>s)}function a(s){r=!1,e.set(s)}function i(s){let o;return e.subscribe(l=>{(o===void 0||r&&l!==o)&&s(o=l)})}return{notify:n,set:a,subscribe:i}}const rB={v:()=>{}};function $K(){const{set:t,subscribe:e}=gO(!1);let r;async function n(){clearTimeout(r);try{const a=await fetch(`${qK}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const s=(await a.json()).version!==zK;return s&&(t(!0),rB.v(),clearTimeout(r)),s}catch{return!1}}return{subscribe:e,check:n}}function gS(t,e,r){return t.origin!==pS||!t.pathname.startsWith(e)?!0:r?t.pathname!==location.pathname:!1}const nB=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...nB];const HK=new Set([...nB]);[...HK];function YK(t){return t.filter(e=>e!=null)}function TO(t){return t instanceof hS||t instanceof EO?t.status:500}function VK(t){return t instanceof EO?t.text:"Internal Error"}let Ba,Sf,hv;const WK=vi.toString().includes("$$")||/function \w+\(\) \{\}/.test(vi.toString());WK?(Ba={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},Sf={current:null},hv={current:!1}):(Ba=new class{#e=_e({});get data(){return p(this.#e)}set data(e){k(this.#e,e)}#t=_e(null);get form(){return p(this.#t)}set form(e){k(this.#t,e)}#r=_e(null);get error(){return p(this.#r)}set error(e){k(this.#r,e)}#n=_e({});get params(){return p(this.#n)}set params(e){k(this.#n,e)}#i=_e({id:null});get route(){return p(this.#i)}set route(e){k(this.#i,e)}#a=_e({});get state(){return p(this.#a)}set state(e){k(this.#a,e)}#s=_e(-1);get status(){return p(this.#s)}set status(e){k(this.#s,e)}#o=_e(new URL("https://example.com"));get url(){return p(this.#o)}set url(e){k(this.#o,e)}},Sf=new class{#e=_e(null);get current(){return p(this.#e)}set current(e){k(this.#e,e)}},hv=new class{#e=_e(!1);get current(){return p(this.#e)}set current(e){k(this.#e,e)}},rB.v=()=>hv.current=!0);function KK(t){Object.assign(Ba,t)}const bD={spanContext(){return jK},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},jK={traceId:"",spanId:"",traceFlags:0},{onMount:QK}=wK,XK=Nn??(t=>t()),ZK=new Set(["icon","shortcut icon","apple-touch-icon"]),rh=QF(ZF)??{},Ef=QF(XF)??{},Bl={url:_D({}),page:_D({}),navigating:gO(null),updated:$K()};function CO(t){rh[t]=fS()}function JK(t,e){let r=t+1;for(;rh[r];)delete rh[r],r+=1;for(r=e+1;Ef[r];)delete Ef[r],r+=1}function vf(t,e=!1){return e?location.replace(t.href):location.href=t.href,new Promise(()=>{})}async function aB(){if("serviceWorker"in navigator){const t=await navigator.serviceWorker.getRegistration(qa||"/");t&&await t.update()}}function SD(){}let wO,zA,q1,Rc,$A,ci;const z1=[],$1=[];let il=null;function HA(){il?.fork?.then(t=>t?.discard()),il=null}const e_=new Map,iB=new Set,ej=new Set,lp=new Set;let va={branch:[],error:null,url:null},sB=!1,H1=!1,ED=!0,yf=!1,Sm=!1,oB=!1,AO=!1,RO,Oi,ro,Ud;const Y1=new Set,vD=new Map;async function tj(t,e,r){globalThis.__sveltekit_1ppa22i?.data&&globalThis.__sveltekit_1ppa22i.data,document.URL!==location.href&&(location.href=location.href),ci=t,await t.hooks.init?.(),wO=GK(t),Rc=document.documentElement,$A=e,zA=t.nodes[0],q1=t.nodes[1],zA(),q1(),Oi=history.state?.[Jd],ro=history.state?.[Op],Oi||(Oi=ro=Date.now(),history.replaceState({...history.state,[Jd]:Oi,[Op]:ro},""));const n=rh[Oi];function a(){n&&(history.scrollRestoration="manual",scrollTo(n.x,n.y))}r?(a(),await mj($A,r)):(await cp({type:"enter",url:mS(ci.hash?_j(new URL(location.href)):location.href),replace_state:!0}),a()),pj()}function rj(){z1.length=0,AO=!1}function lB(t){$1.some(e=>e?.snapshot)&&(Ef[t]=$1.map(e=>e?.snapshot?.capture()))}function cB(t){Ef[t]?.forEach((e,r)=>{$1[r]?.snapshot?.restore(e)})}function yD(){CO(Oi),fD(ZF,rh),lB(ro),fD(XF,Ef)}async function uB(t,e,r,n){let a;e.invalidateAll&&HA(),await cp({type:"goto",url:mS(t),keepfocus:e.keepFocus,noscroll:e.noScroll,replace_state:e.replaceState,state:e.state,redirect_count:r,nav_token:n,accept:()=>{e.invalidateAll&&(AO=!0,a=[...vD.keys()]),e.invalidate&&e.invalidate.forEach(hj)}}),e.invalidateAll&&ll().then(ll).then(()=>{vD.forEach(({resource:i},s)=>{a?.includes(s)&&i.refresh?.()})})}async function nj(t){if(t.id!==il?.id){HA();const e={};Y1.add(e),il={id:t.id,token:e,promise:pB({...t,preload:e}).then(r=>(Y1.delete(e),r.type==="loaded"&&r.state.error&&HA(),r)),fork:null}}return il.promise}async function pv(t){const e=(await _S(t,!1))?.route;e&&await Promise.all([...e.layouts,e.leaf].map(r=>r?.[1]()))}async function dB(t,e,r){va=t.state;const n=document.querySelector("style[data-sveltekit]");if(n&&n.remove(),Object.assign(Ba,t.props.page),RO=new ci.root({target:e,props:{...t.props,stores:Bl,components:$1},hydrate:r,sync:!1}),await Promise.resolve(),cB(ro),r){const a={from:null,to:{params:va.params,route:{id:va.route?.id??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};lp.forEach(i=>i(a))}H1=!0}function V1({url:t,params:e,branch:r,status:n,error:a,route:i,form:s}){let o="never";if(qa&&(t.pathname===qa||t.pathname===qa+"/"))o="always";else for(const m of r)m?.slash!==void 0&&(o=m.slash);t.pathname=AK(t.pathname,o),t.search=t.search;const l={type:"loaded",state:{url:t,params:e,branch:r,error:a,route:i},props:{constructors:YK(r).map(m=>m.node.component),page:bS(Ba)}};s!==void 0&&(l.props.form=s);let c={},u=!Ba,d=0;for(let m=0;m(o&&(l.route=!0),h[m])}),params:new Proxy(n,{get:(h,m)=>(o&&l.params.add(m),h[m])}),data:i?.data??null,url:NK(r,()=>{o&&(l.url=!0)},h=>{o&&l.search_params.add(h)},ci.hash),async fetch(h,m){h instanceof Request&&(m={body:h.method==="GET"||h.method==="HEAD"?void 0:await h.blob(),cache:h.cache,credentials:h.credentials,headers:[...h.headers].length>0?h?.headers:void 0,integrity:h.integrity,keepalive:h.keepalive,method:h.method,mode:h.mode,redirect:h.redirect,referrer:h.referrer,referrerPolicy:h.referrerPolicy,signal:h.signal,...m});const{resolved:f,promise:g}=hB(h,m,r);return o&&u(f.href),g},setHeaders:()=>{},depends:u,parent(){return o&&(l.parent=!0),e()},untrack(h){o=!1;try{return h()}finally{o=!0}}};s=await c.universal.load.call(null,d)??null}return{node:c,loader:t,server:i,universal:c.universal?.load?{type:"data",data:s,uses:l}:null,data:s??i?.data??null,slash:c.universal?.trailingSlash??i?.slash}}function hB(t,e,r){let n=t instanceof Request?t.url:t;const a=new URL(n,r);a.origin===r.origin&&(n=a.href.slice(r.origin.length));const i=H1?kK(n,a.href,e):MK(n,e);return{resolved:a,promise:i}}function aj(t,e,r,n,a,i){if(AO)return!0;if(!a)return!1;if(a.parent&&t||a.route&&e||a.url&&r)return!0;for(const s of a.search_params)if(n.has(s))return!0;for(const s of a.params)if(i[s]!==va.params[s])return!0;for(const s of a.dependencies)if(z1.some(o=>o(new URL(s))))return!0;return!1}function NO(t,e){return t?.type==="data"?t:t?.type==="skip"?e??null:null}function ij(t,e){if(!t)return new Set(e.searchParams.keys());const r=new Set([...t.searchParams.keys(),...e.searchParams.keys()]);for(const n of r){const a=t.searchParams.getAll(n),i=e.searchParams.getAll(n);a.every(s=>i.includes(s))&&i.every(s=>a.includes(s))&&r.delete(n)}return r}function sj({error:t,url:e,route:r,params:n}){return{type:"loaded",state:{error:t,url:e,route:r,params:n,branch:[]},props:{page:bS(Ba),constructors:[]}}}async function pB({id:t,invalidating:e,url:r,params:n,route:a,preload:i}){if(il?.id===t)return Y1.delete(il.token),il.promise;const{errors:s,layouts:o,leaf:l}=a,c=[...o,l];s.forEach(b=>b?.().catch(()=>{})),c.forEach(b=>b?.[1]().catch(()=>{}));const u=va.url?t!==W1(va.url):!1,d=va.route?a.id!==va.route.id:!1,h=ij(va.url,r);let m=!1;const f=c.map(async(b,_)=>{if(!b)return;const S=va.branch[_];return b[1]===S?.loader&&!aj(m,d,u,h,S.universal?.uses,n)?S:(m=!0,OO({loader:b[1],url:r,params:n,route:a,parent:async()=>{const y={};for(let v=0;v<_;v+=1)Object.assign(y,(await f[v])?.data);return y},server_data_node:NO(b[0]?{type:"skip"}:null,b[0]?S?.server:void 0)}))});for(const b of f)b.catch(()=>{});const g=[];for(let b=0;bPromise.resolve({}),server_data_node:NO(i)}),o={node:await q1(),loader:q1,universal:null,server:null,data:null};return V1({url:r,params:a,branch:[s,o],status:t,error:e,route:null})}catch(s){if(s instanceof SO)return uB(new URL(s.location,location.href),{},0);throw s}}async function lj(t){const e=t.href;if(e_.has(e))return e_.get(e);let r;try{const n=(async()=>{let a=await ci.hooks.reroute({url:new URL(t),fetch:async(i,s)=>hB(i,s,t).promise})??t;if(typeof a=="string"){const i=new URL(t);ci.hash?i.hash=a:i.pathname=a,a=i}return a})();e_.set(e,n),r=await n}catch{e_.delete(e);return}return r}async function _S(t,e){if(t&&!gS(t,qa,ci.hash)){const r=await lj(t);if(!r)return;const n=cj(r);for(const a of wO){const i=a.exec(n);if(i)return{id:W1(t),invalidating:e,route:a,params:OK(i),url:t}}}}function cj(t){return RK(ci.hash?t.hash.replace(/^#/,"").replace(/[?#].+/,""):t.pathname.slice(qa.length))||"/"}function W1(t){return(ci.hash?t.hash.replace(/^#/,""):t.pathname)+t.search}function mB({url:t,type:e,intent:r,delta:n,event:a}){let i=!1;const s=DO(va,r,t,e);n!==void 0&&(s.navigation.delta=n),a!==void 0&&(s.navigation.event=a);const o={...s.navigation,cancel:()=>{i=!0,s.reject(new Error("navigation cancelled"))}};return yf||iB.forEach(l=>l(o)),i?null:s}async function cp({type:t,url:e,popped:r,keepfocus:n,noscroll:a,replace_state:i,state:s={},redirect_count:o=0,nav_token:l={},accept:c=SD,block:u=SD,event:d}){const h=Ud;Ud=l;const m=await _S(e,!1),f=t==="enter"?DO(va,m,e,t):mB({url:e,type:t,delta:r?.delta,intent:m,event:d});if(!f){u(),Ud===l&&(Ud=h);return}const g=Oi,b=ro;c(),yf=!0,H1&&f.navigation.type!=="enter"&&Bl.navigating.set(Sf.current=f.navigation);let _=m&&await pB(m);if(!_){if(gS(e,qa,ci.hash))return await vf(e,i);_=await fB(e,{id:null},await Tf(new EO(404,"Not Found",`Not found: ${e.pathname}`),{url:e,params:{},route:{id:null}}),404,i)}if(e=m?.url||e,Ud!==l)return f.reject(new Error("navigation aborted")),!1;if(_.type==="redirect"){if(o<20){await cp({type:t,url:new URL(_.location,e),popped:r,keepfocus:n,noscroll:a,replace_state:i,state:s,redirect_count:o+1,nav_token:l}),f.fulfil(void 0);return}_=await IO({status:500,error:await Tf(new Error("Redirect loop"),{url:e,params:{},route:{id:null}}),url:e,route:{id:null}})}else _.props.page.status>=400&&await Bl.updated.check()&&(await aB(),await vf(e,i));if(rj(),CO(g),lB(b),_.props.page.url.pathname!==e.pathname&&(e.pathname=_.props.page.url.pathname),s=r?r.state:s,!r){const w=i?0:1,A={[Jd]:Oi+=w,[Op]:ro+=w,[yO]:s};(i?history.replaceState:history.pushState).call(history,A,"",e),i||JK(Oi,ro)}const S=m&&il?.id===m.id?il.fork:null;il=null,_.props.page.state=s;let E;if(H1){const w=(await Promise.all(Array.from(ej,I=>I(f.navigation)))).filter(I=>typeof I=="function");if(w.length>0){let I=function(){w.forEach(x=>{lp.delete(x)})};w.push(I),w.forEach(x=>{lp.add(x)})}va=_.state,_.props.page&&(_.props.page.url=e);const A=S&&await S;A?E=A.commit():(RO.$set(_.props),KK(_.props.page),E=LF?.()),oB=!0}else await dB(_,$A,!1);const{activeElement:y}=document;await E,await ll(),await ll();let v=r?r.scroll:a?fS():null;if(ED){const w=e.hash&&document.getElementById(_B(e));if(v)scrollTo(v.x,v.y);else if(w){w.scrollIntoView();const{top:A,left:I}=w.getBoundingClientRect();v={x:pageXOffset+I,y:pageYOffset+A}}else scrollTo(0,0)}const T=document.activeElement!==y&&document.activeElement!==document.body;!n&&!T&&gj(e,v),ED=!0,_.props.page&&Object.assign(Ba,_.props.page),yf=!1,t==="popstate"&&cB(ro),f.fulfil(void 0),lp.forEach(w=>w(f.navigation)),Bl.navigating.set(Sf.current=null)}async function fB(t,e,r,n,a){return t.origin===pS&&t.pathname===location.pathname&&!sB?await IO({status:n,error:r,url:t,route:e}):await vf(t,a)}function uj(){let t,e={element:void 0,href:void 0},r;Rc.addEventListener("mousemove",o=>{const l=o.target;clearTimeout(t),t=setTimeout(()=>{i(l,Bd.hover)},20)});function n(o){o.defaultPrevented||i(o.composedPath()[0],Bd.tap)}Rc.addEventListener("mousedown",n),Rc.addEventListener("touchstart",n,{passive:!0});const a=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(pv(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function i(o,l){const c=tB(o,Rc),u=c===e.element&&c?.href===e.href&&l>=r;if(!c||u)return;const{url:d,external:h,download:m}=qA(c,qa,ci.hash);if(h||m)return;const f=G1(c),g=d&&W1(va.url)===W1(d);if(!(f.reload||g))if(l<=f.preload_data){e={element:c,href:c.href},r=Bd.tap;const b=await _S(d,!1);if(!b)return;nj(b)}else l<=f.preload_code&&(e={element:c,href:c.href},r=l,pv(d))}function s(){a.disconnect();for(const o of Rc.querySelectorAll("a")){const{url:l,external:c,download:u}=qA(o,qa,ci.hash);if(c||u)continue;const d=G1(o);d.reload||(d.preload_code===Bd.viewport&&a.observe(o),d.preload_code===Bd.eager&&pv(l))}}lp.add(s),s()}function Tf(t,e){if(t instanceof hS)return t.body;const r=TO(t),n=VK(t);return ci.hooks.handleError({error:t,event:e,status:r,message:n})??{message:n}}function dj(t,e){QK(()=>(t.add(e),()=>{t.delete(e)}))}function xO(t){dj(lp,t)}function os(t,e={}){return t=new URL(mS(t)),t.origin!==pS?Promise.reject(new Error("goto: invalid URL")):uB(t,e,0)}function hj(t){if(typeof t=="function")z1.push(t);else{const{href:e}=new URL(t,location.href);z1.push(r=>r.href===e)}}function gB(t,e){const r={[Jd]:Oi,[Op]:ro,[JF]:Ba.url.href,[yO]:e};history.replaceState(r,"",mS(t)),Ba.state=e,RO.$set({page:XK(()=>bS(Ba))})}function pj(){history.scrollRestoration="manual",addEventListener("beforeunload",e=>{let r=!1;if(yD(),!yf){const n=DO(va,void 0,null,"leave"),a={...n.navigation,cancel:()=>{r=!0,n.reject(new Error("navigation cancelled"))}};iB.forEach(i=>i(a))}r?(e.preventDefault(),e.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&yD()}),navigator.connection?.saveData||uj(),Rc.addEventListener("click",async e=>{if(e.button||e.which!==1||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.defaultPrevented)return;const r=tB(e.composedPath()[0],Rc);if(!r)return;const{url:n,external:a,target:i,download:s}=qA(r,qa,ci.hash);if(!n)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const o=G1(r);if(!(r instanceof SVGAElement)&&n.protocol!==location.protocol&&!(n.protocol==="https:"||n.protocol==="http:")||s)return;const[c,u]=(ci.hash?n.hash.replace(/^#/,""):n.href).split("#"),d=c===uv(location);if(a||o.reload&&(!d||!u)){mB({url:n,type:"link",event:e})?yf=!0:e.preventDefault();return}if(u!==void 0&&d){const[,h]=va.url.href.split("#");if(h===u){if(e.preventDefault(),u===""||u==="top"&&r.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const m=r.ownerDocument.getElementById(decodeURIComponent(u));m&&(m.scrollIntoView(),m.focus())}return}if(Sm=!0,CO(Oi),t(n),!o.replace_state)return;Sm=!1}e.preventDefault(),await new Promise(h=>{requestAnimationFrame(()=>{setTimeout(h,0)}),setTimeout(h,100)}),await cp({type:"link",url:n,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??n.href===location.href,event:e})}),Rc.addEventListener("submit",e=>{if(e.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if((n?.formTarget||r.target)==="_blank"||(n?.formMethod||r.method)!=="get")return;const s=new URL(n?.hasAttribute("formaction")&&n?.formAction||r.action);if(gS(s,qa,!1))return;const o=e.target,l=G1(o);if(l.reload)return;e.preventDefault(),e.stopPropagation();const c=new FormData(o,n);s.search=new URLSearchParams(c).toString(),cp({type:"form",url:s,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??s.href===location.href,event:e})}),addEventListener("popstate",async e=>{if(!YA){if(e.state?.[Jd]){const r=e.state[Jd];if(Ud={},r===Oi)return;const n=rh[r],a=e.state[yO]??{},i=new URL(e.state[JF]??location.href),s=e.state[Op],o=va.url?uv(location)===uv(va.url):!1;if(s===ro&&(oB||o)){a!==Ba.state&&(Ba.state=a),t(i),rh[Oi]=fS(),n&&scrollTo(n.x,n.y),Oi=r;return}const c=r-Oi;await cp({type:"popstate",url:i,popped:{state:a,scroll:n,delta:c},accept:()=>{Oi=r,ro=s},block:()=>{history.go(-c)},nav_token:Ud,event:e})}else if(!Sm){const r=new URL(location.href);t(r),ci.hash&&location.reload()}}}),addEventListener("hashchange",()=>{Sm&&(Sm=!1,history.replaceState({...history.state,[Jd]:++Oi,[Op]:ro},"",location.href))});for(const e of document.querySelectorAll("link"))ZK.has(e.rel)&&(e.href=e.href);addEventListener("pageshow",e=>{e.persisted&&Bl.navigating.set(Sf.current=null)});function t(e){va.url=Ba.url=e,Bl.page.set(bS(Ba)),Bl.page.notify()}}async function mj(t,{status:e=200,error:r,node_ids:n,params:a,route:i,server_route:s,data:o,form:l}){sB=!0;const c=new URL(location.href);let u;({params:a={},route:i={id:null}}=await _S(c,!1)||{}),u=wO.find(({id:m})=>m===i.id);let d,h=!0;try{const m=n.map(async(g,b)=>{const _=o[b];return _?.uses&&(_.uses=fj(_.uses)),OO({loader:ci.nodes[g],url:c,params:a,route:i,parent:async()=>{const S={};for(let E=0;E{const o=history.state;YA=!0,location.replace(`#${n}`),ci.hash&&location.replace(t.hash),history.replaceState(o,"",t.hash),scrollTo(i,s),YA=!1})}else{const i=document.body,s=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),s!==null?i.setAttribute("tabindex",s):i.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const i=[];for(let s=0;s{if(a.rangeCount===i.length){for(let s=0;s{a=l,i=c});return s.catch(()=>{}),{navigation:{from:{params:t.params,route:{id:t.route?.id??null},url:t.url},to:r&&{params:e?.params??null,route:{id:e?.route?.id??null},url:r},willUnload:!e,type:n,complete:s},fulfil:a,reject:i}}function bS(t){return{data:t.data,error:t.error,form:t.form,params:t.params,route:t.route,state:t.state,status:t.status,url:t.url}}function _j(t){const e=new URL(t);return e.hash=decodeURIComponent(t.hash),e}function _B(t){let e;if(ci.hash){const[,,r]=t.hash.split("#",3);e=r??""}else e=t.hash.slice(1);return decodeURIComponent(e)}const bj="modulepreload",Sj=function(t,e){return new URL(t,e).href},TD={},$m=function(e,r,n){let a=Promise.resolve();if(r&&r.length>0){let c=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};const s=document.getElementsByTagName("link"),o=document.querySelector("meta[property=csp-nonce]"),l=o?.nonce||o?.getAttribute("nonce");a=c(r.map(u=>{if(u=Sj(u,n),u in TD)return;TD[u]=!0;const d=u.endsWith(".css"),h=d?'[rel="stylesheet"]':"";if(n)for(let f=s.length-1;f>=0;f--){const g=s[f];if(g.href===u&&(!d||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${h}`))return;const m=document.createElement("link");if(m.rel=d?"stylesheet":bj,d||(m.as="script"),m.crossOrigin="",m.href=u,l&&m.setAttribute("nonce",l),document.head.appendChild(m),d)return new Promise((f,g)=>{m.addEventListener("load",f),m.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(s){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s}return a.then(s=>{for(const o of s||[])o.status==="rejected"&&i(o.reason);return e().catch(i)})},Ej={},vj="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(vj);var yj=q('
'),Tj=q(" ",1);function Cj(t,e){ye(e,!0);let r=V(e,"components",23,()=>[]),n=V(e,"data_0",3,null),a=V(e,"data_1",3,null);$i(()=>e.stores.page.set(e.page)),It(()=>{e.stores,e.page,e.constructors,r(),e.form,n(),a(),e.stores.page.notify()});let i=_e(!1),s=_e(!1),o=_e(null);vi(()=>{const g=e.stores.page.subscribe(()=>{p(i)&&(k(s,!0),ll().then(()=>{k(o,document.title||"untitled page",!0)}))});return k(i,!0),g});const l=F(()=>e.constructors[1]);var c=Tj(),u=L(c);{var d=g=>{const b=F(()=>e.constructors[0]);var _=se(),S=L(_);fe(S,()=>p(b),(E,y)=>{mr(y(E,{get data(){return n()},get form(){return e.form},get params(){return e.page.params},children:(v,T)=>{var w=se(),A=L(w);fe(A,()=>p(l),(I,x)=>{mr(x(I,{get data(){return a()},get form(){return e.form},get params(){return e.page.params}}),D=>r()[1]=D,()=>r()?.[1])}),C(v,w)},$$slots:{default:!0}}),v=>r()[0]=v,()=>r()?.[0])}),C(g,_)},h=g=>{const b=F(()=>e.constructors[0]);var _=se(),S=L(_);fe(S,()=>p(b),(E,y)=>{mr(y(E,{get data(){return n()},get form(){return e.form},get params(){return e.page.params}}),v=>r()[0]=v,()=>r()?.[0])}),C(g,_)};le(u,g=>{e.constructors[1]?g(d):g(h,!1)})}var m=te(u,2);{var f=g=>{var b=yj(),_=j(b);{var S=E=>{var y=Nt();we(()=>qe(y,p(o))),C(E,y)};le(_,E=>{p(s)&&E(S)})}Y(b),C(g,b)};le(m,g=>{p(i)&&g(f)})}C(t,c),Te()}const wj=_K(Cj),Aj=[()=>$m(()=>Promise.resolve().then(()=>Gqe),void 0,import.meta.url),()=>$m(()=>Promise.resolve().then(()=>Yqe),void 0,import.meta.url),()=>$m(()=>Promise.resolve().then(()=>Qqe),void 0,import.meta.url),()=>$m(()=>Promise.resolve().then(()=>tze),void 0,import.meta.url)],Rj=[],Oj={"/":[2],"/chat/[id]":[3]},MO={handleError:({error:t})=>{console.error(t)},reroute:()=>{},transport:{}},bB=Object.fromEntries(Object.entries(MO.transport).map(([t,e])=>[t,e.decode])),Nj=Object.fromEntries(Object.entries(MO.transport).map(([t,e])=>[t,e.encode])),Ij=!0,xj=(t,e)=>bB[t](e),Dj=Object.freeze(Object.defineProperty({__proto__:null,decode:xj,decoders:bB,dictionary:Oj,encoders:Nj,hash:Ij,hooks:MO,matchers:Ej,nodes:Aj,root:wj,server_loads:Rj},Symbol.toStringTag,{value:"Module"}));function cze(t,e){tj(Dj,t,e)}const Mj={get params(){return Ba.params},get route(){return Ba.route},get status(){return Ba.status},get url(){return Ba.url}};Bl.updated.check;const Si=Mj,kO="-",kj=t=>{const e=Lj(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:s=>{const o=s.split(kO);return o[0]===""&&o.length!==1&&o.shift(),SB(o,e)||Pj(s)},getConflictingClassGroupIds:(s,o)=>{const l=r[s]||[];return o&&n[s]?[...l,...n[s]]:l}}},SB=(t,e)=>{if(t.length===0)return e.classGroupId;const r=t[0],n=e.nextPart.get(r),a=n?SB(t.slice(1),n):void 0;if(a)return a;if(e.validators.length===0)return;const i=t.join(kO);return e.validators.find(({validator:s})=>s(i))?.classGroupId},CD=/^\[(.+)\]$/,Pj=t=>{if(CD.test(t)){const e=CD.exec(t)[1],r=e?.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},Lj=t=>{const{theme:e,classGroups:r}=t,n={nextPart:new Map,validators:[]};for(const a in r)VA(r[a],n,a,e);return n},VA=(t,e,r,n)=>{t.forEach(a=>{if(typeof a=="string"){const i=a===""?e:wD(e,a);i.classGroupId=r;return}if(typeof a=="function"){if(Fj(a)){VA(a(n),e,r,n);return}e.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([i,s])=>{VA(s,wD(e,i),r,n)})})},wD=(t,e)=>{let r=t;return e.split(kO).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Fj=t=>t.isThemeGetter,Bj=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,n=new Map;const a=(i,s)=>{r.set(i,s),e++,e>t&&(e=0,n=r,r=new Map)};return{get(i){let s=r.get(i);if(s!==void 0)return s;if((s=n.get(i))!==void 0)return a(i,s),s},set(i,s){r.has(i)?r.set(i,s):a(i,s)}}},WA="!",KA=":",Uj=KA.length,Gj=t=>{const{prefix:e,experimentalParseClassName:r}=t;let n=a=>{const i=[];let s=0,o=0,l=0,c;for(let f=0;fl?c-l:void 0;return{modifiers:i,hasImportantModifier:h,baseClassName:d,maybePostfixModifierPosition:m}};if(e){const a=e+KA,i=n;n=s=>s.startsWith(a)?i(s.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(r){const a=n;n=i=>r({className:i,parseClassName:a})}return n},qj=t=>t.endsWith(WA)?t.substring(0,t.length-1):t.startsWith(WA)?t.substring(1):t,zj=t=>{const e=Object.fromEntries(t.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const a=[];let i=[];return n.forEach(s=>{s[0]==="["||e[s]?(a.push(...i.sort(),s),i=[]):i.push(s)}),a.push(...i.sort()),a}},$j=t=>({cache:Bj(t.cacheSize),parseClassName:Gj(t),sortModifiers:zj(t),...kj(t)}),Hj=/\s+/,Yj=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:i}=e,s=[],o=t.trim().split(Hj);let l="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{isExternal:d,modifiers:h,hasImportantModifier:m,baseClassName:f,maybePostfixModifierPosition:g}=r(u);if(d){l=u+(l.length>0?" "+l:l);continue}let b=!!g,_=n(b?f.substring(0,g):f);if(!_){if(!b){l=u+(l.length>0?" "+l:l);continue}if(_=n(f),!_){l=u+(l.length>0?" "+l:l);continue}b=!1}const S=i(h).join(":"),E=m?S+WA:S,y=E+_;if(s.includes(y))continue;s.push(y);const v=a(_,b);for(let T=0;T0?" "+l:l)}return l};function Vj(){let t=0,e,r,n="";for(;t{if(typeof t=="string")return t;let e,r="";for(let n=0;nd(u),t());return r=$j(c),n=r.cache.get,a=r.cache.set,i=o,o(l)}function o(l){const c=n(l);if(c)return c;const u=Yj(l,r);return a(l,u),u}return function(){return i(Vj.apply(null,arguments))}}const ii=t=>{const e=r=>r[t]||[];return e.isThemeGetter=!0,e},vB=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,yB=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Wj=/^\d+\/\d+$/,Kj=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,jj=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Qj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Xj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Zj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ih=t=>Wj.test(t),dn=t=>!!t&&!Number.isNaN(Number(t)),mu=t=>!!t&&Number.isInteger(Number(t)),mv=t=>t.endsWith("%")&&dn(t.slice(0,-1)),oc=t=>Kj.test(t),Jj=()=>!0,eQ=t=>jj.test(t)&&!Qj.test(t),TB=()=>!1,tQ=t=>Xj.test(t),rQ=t=>Zj.test(t),nQ=t=>!wr(t)&&!Ar(t),aQ=t=>Zp(t,AB,TB),wr=t=>vB.test(t),Ed=t=>Zp(t,RB,eQ),fv=t=>Zp(t,cQ,dn),AD=t=>Zp(t,CB,TB),iQ=t=>Zp(t,wB,rQ),t_=t=>Zp(t,OB,tQ),Ar=t=>yB.test(t),Em=t=>Jp(t,RB),sQ=t=>Jp(t,uQ),RD=t=>Jp(t,CB),oQ=t=>Jp(t,AB),lQ=t=>Jp(t,wB),r_=t=>Jp(t,OB,!0),Zp=(t,e,r)=>{const n=vB.exec(t);return n?n[1]?e(n[1]):r(n[2]):!1},Jp=(t,e,r=!1)=>{const n=yB.exec(t);return n?n[1]?e(n[1]):r:!1},CB=t=>t==="position"||t==="percentage",wB=t=>t==="image"||t==="url",AB=t=>t==="length"||t==="size"||t==="bg-size",RB=t=>t==="length",cQ=t=>t==="number",uQ=t=>t==="family-name",OB=t=>t==="shadow",QA=()=>{const t=ii("color"),e=ii("font"),r=ii("text"),n=ii("font-weight"),a=ii("tracking"),i=ii("leading"),s=ii("breakpoint"),o=ii("container"),l=ii("spacing"),c=ii("radius"),u=ii("shadow"),d=ii("inset-shadow"),h=ii("text-shadow"),m=ii("drop-shadow"),f=ii("blur"),g=ii("perspective"),b=ii("aspect"),_=ii("ease"),S=ii("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],v=()=>[...y(),Ar,wr],T=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],A=()=>[Ar,wr,l],I=()=>[Ih,"full","auto",...A()],x=()=>[mu,"none","subgrid",Ar,wr],D=()=>["auto",{span:["full",mu,Ar,wr]},mu,Ar,wr],$=()=>[mu,"auto",Ar,wr],H=()=>["auto","min","max","fr",Ar,wr],G=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...A()],re=()=>[Ih,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...A()],W=()=>[t,Ar,wr],ie=()=>[...y(),RD,AD,{position:[Ar,wr]}],M=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",oQ,aQ,{size:[Ar,wr]}],J=()=>[mv,Em,Ed],N=()=>["","none","full",c,Ar,wr],O=()=>["",dn,Em,Ed],U=()=>["solid","dashed","dotted","double"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ne=()=>[dn,mv,RD,AD],ue=()=>["","none",f,Ar,wr],he=()=>["none",dn,Ar,wr],be=()=>["none",dn,Ar,wr],Z=()=>[dn,Ar,wr],ae=()=>[Ih,"full",...A()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[oc],breakpoint:[oc],color:[Jj],container:[oc],"drop-shadow":[oc],ease:["in","out","in-out"],font:[nQ],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[oc],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[oc],shadow:[oc],spacing:["px",dn],text:[oc],"text-shadow":[oc],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ih,wr,Ar,b]}],container:["container"],columns:[{columns:[dn,wr,Ar,o]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[mu,"auto",Ar,wr]}],basis:[{basis:[Ih,"full","auto",o,...A()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[dn,Ih,"auto","initial","none",wr]}],grow:[{grow:["",dn,Ar,wr]}],shrink:[{shrink:["",dn,Ar,wr]}],order:[{order:[mu,"first","last","none",Ar,wr]}],"grid-cols":[{"grid-cols":x()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":x()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:A()}],"gap-x":[{"gap-x":A()}],"gap-y":[{"gap-y":A()}],"justify-content":[{justify:[...G(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...G()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":G()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:A()}],px:[{px:A()}],py:[{py:A()}],ps:[{ps:A()}],pe:[{pe:A()}],pt:[{pt:A()}],pr:[{pr:A()}],pb:[{pb:A()}],pl:[{pl:A()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":A()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":A()}],"space-y-reverse":["space-y-reverse"],size:[{size:re()}],w:[{w:[o,"screen",...re()]}],"min-w":[{"min-w":[o,"screen","none",...re()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[s]},...re()]}],h:[{h:["screen","lh",...re()]}],"min-h":[{"min-h":["screen","lh","none",...re()]}],"max-h":[{"max-h":["screen","lh",...re()]}],"font-size":[{text:["base",r,Em,Ed]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Ar,fv]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",mv,wr]}],"font-family":[{font:[sQ,wr,e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,Ar,wr]}],"line-clamp":[{"line-clamp":[dn,"none",Ar,fv]}],leading:[{leading:[i,...A()]}],"list-image":[{"list-image":["none",Ar,wr]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ar,wr]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:[dn,"from-font","auto",Ar,Ed]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[dn,"auto",Ar,wr]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ar,wr]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ar,wr]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ie()}],"bg-repeat":[{bg:M()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},mu,Ar,wr],radial:["",Ar,wr],conic:[mu,Ar,wr]},lQ,iQ]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:J()}],"gradient-via-pos":[{via:J()}],"gradient-to-pos":[{to:J()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:N()}],"rounded-s":[{"rounded-s":N()}],"rounded-e":[{"rounded-e":N()}],"rounded-t":[{"rounded-t":N()}],"rounded-r":[{"rounded-r":N()}],"rounded-b":[{"rounded-b":N()}],"rounded-l":[{"rounded-l":N()}],"rounded-ss":[{"rounded-ss":N()}],"rounded-se":[{"rounded-se":N()}],"rounded-ee":[{"rounded-ee":N()}],"rounded-es":[{"rounded-es":N()}],"rounded-tl":[{"rounded-tl":N()}],"rounded-tr":[{"rounded-tr":N()}],"rounded-br":[{"rounded-br":N()}],"rounded-bl":[{"rounded-bl":N()}],"border-w":[{border:O()}],"border-w-x":[{"border-x":O()}],"border-w-y":[{"border-y":O()}],"border-w-s":[{"border-s":O()}],"border-w-e":[{"border-e":O()}],"border-w-t":[{"border-t":O()}],"border-w-r":[{"border-r":O()}],"border-w-b":[{"border-b":O()}],"border-w-l":[{"border-l":O()}],"divide-x":[{"divide-x":O()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":O()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...U(),"hidden","none"]}],"divide-style":[{divide:[...U(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...U(),"none","hidden"]}],"outline-offset":[{"outline-offset":[dn,Ar,wr]}],"outline-w":[{outline:["",dn,Em,Ed]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",u,r_,t_]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",d,r_,t_]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[dn,Ed]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":O()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",h,r_,t_]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[dn,Ar,wr]}],"mix-blend":[{"mix-blend":[...X(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":X()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[dn]}],"mask-image-linear-from-pos":[{"mask-linear-from":ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":ne()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":ne()}],"mask-image-t-to-pos":[{"mask-t-to":ne()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":ne()}],"mask-image-r-to-pos":[{"mask-r-to":ne()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":ne()}],"mask-image-b-to-pos":[{"mask-b-to":ne()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":ne()}],"mask-image-l-to-pos":[{"mask-l-to":ne()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":ne()}],"mask-image-x-to-pos":[{"mask-x-to":ne()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":ne()}],"mask-image-y-to-pos":[{"mask-y-to":ne()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[Ar,wr]}],"mask-image-radial-from-pos":[{"mask-radial-from":ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":ne()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":y()}],"mask-image-conic-pos":[{"mask-conic":[dn]}],"mask-image-conic-from-pos":[{"mask-conic-from":ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":ne()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ie()}],"mask-repeat":[{mask:M()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ar,wr]}],filter:[{filter:["","none",Ar,wr]}],blur:[{blur:ue()}],brightness:[{brightness:[dn,Ar,wr]}],contrast:[{contrast:[dn,Ar,wr]}],"drop-shadow":[{"drop-shadow":["","none",m,r_,t_]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",dn,Ar,wr]}],"hue-rotate":[{"hue-rotate":[dn,Ar,wr]}],invert:[{invert:["",dn,Ar,wr]}],saturate:[{saturate:[dn,Ar,wr]}],sepia:[{sepia:["",dn,Ar,wr]}],"backdrop-filter":[{"backdrop-filter":["","none",Ar,wr]}],"backdrop-blur":[{"backdrop-blur":ue()}],"backdrop-brightness":[{"backdrop-brightness":[dn,Ar,wr]}],"backdrop-contrast":[{"backdrop-contrast":[dn,Ar,wr]}],"backdrop-grayscale":[{"backdrop-grayscale":["",dn,Ar,wr]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[dn,Ar,wr]}],"backdrop-invert":[{"backdrop-invert":["",dn,Ar,wr]}],"backdrop-opacity":[{"backdrop-opacity":[dn,Ar,wr]}],"backdrop-saturate":[{"backdrop-saturate":[dn,Ar,wr]}],"backdrop-sepia":[{"backdrop-sepia":["",dn,Ar,wr]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":A()}],"border-spacing-x":[{"border-spacing-x":A()}],"border-spacing-y":[{"border-spacing-y":A()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ar,wr]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[dn,"initial",Ar,wr]}],ease:[{ease:["linear","initial",_,Ar,wr]}],delay:[{delay:[dn,Ar,wr]}],animate:[{animate:["none",S,Ar,wr]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,Ar,wr]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:he()}],"rotate-x":[{"rotate-x":he()}],"rotate-y":[{"rotate-y":he()}],"rotate-z":[{"rotate-z":he()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":["scale-3d"],skew:[{skew:Z()}],"skew-x":[{"skew-x":Z()}],"skew-y":[{"skew-y":Z()}],transform:[{transform:[Ar,wr,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ae()}],"translate-x":[{"translate-x":ae()}],"translate-y":[{"translate-y":ae()}],"translate-z":[{"translate-z":ae()}],"translate-none":["translate-none"],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ar,wr]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ar,wr]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[dn,Em,Ed,fv]}],stroke:[{stroke:["none",...W()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},dQ=(t,{cacheSize:e,prefix:r,experimentalParseClassName:n,extend:a={},override:i={}})=>(Hm(t,"cacheSize",e),Hm(t,"prefix",r),Hm(t,"experimentalParseClassName",n),n_(t.theme,i.theme),n_(t.classGroups,i.classGroups),n_(t.conflictingClassGroups,i.conflictingClassGroups),n_(t.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Hm(t,"orderSensitiveModifiers",i.orderSensitiveModifiers),a_(t.theme,a.theme),a_(t.classGroups,a.classGroups),a_(t.conflictingClassGroups,a.conflictingClassGroups),a_(t.conflictingClassGroupModifiers,a.conflictingClassGroupModifiers),NB(t,a,"orderSensitiveModifiers"),t),Hm=(t,e,r)=>{r!==void 0&&(t[e]=r)},n_=(t,e)=>{if(e)for(const r in e)Hm(t,r,e[r])},a_=(t,e)=>{if(e)for(const r in e)NB(t,e,r)},NB=(t,e,r)=>{const n=e[r];n!==void 0&&(t[r]=t[r]?t[r].concat(n):n)},hQ=(t,...e)=>typeof t=="function"?jA(QA,t,...e):jA(()=>dQ(QA(),t),...e),IB=jA(QA);function jt(...t){return IB(nf(t))}var pQ=/\s+/g,mQ=t=>typeof t!="string"||!t?t:t.replace(pQ," ").trim(),K1=(...t)=>{const e=[],r=n=>{if(!n&&n!==0&&n!==0n)return;if(Array.isArray(n)){for(let i=0,s=n.length;i0?mQ(e.join(" ")):void 0},OD=t=>t===!1?"false":t===!0?"true":t===0?"0":t,Ss=t=>{if(!t||typeof t!="object")return!0;for(const e in t)return!1;return!0},fQ=(t,e)=>{if(t===e)return!0;if(!t||!e)return!1;const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(let a=0;a{for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const n=e[r];r in t?t[r]=K1(t[r],n):t[r]=n}return t},xB=(t,e)=>{for(let r=0;r{const e=[];xB(t,e);const r=[];for(let n=0;n{const r={};for(const n in t){const a=t[n];if(n in e){const i=e[n];Array.isArray(a)||Array.isArray(i)?r[n]=DB(i,a):typeof a=="object"&&typeof i=="object"&&a&&i?r[n]=XA(a,i):r[n]=i+" "+a}else r[n]=a}for(const n in e)n in t||(r[n]=e[n]);return r},_Q={twMerge:!0,twMergeConfig:{}};function bQ(){let t=null,e={},r=!1;return{get cachedTwMerge(){return t},set cachedTwMerge(n){t=n},get cachedTwMergeConfig(){return e},set cachedTwMergeConfig(n){e=n},get didTwMergeConfigChange(){return r},set didTwMergeConfigChange(n){r=n},reset(){t=null,e={},r=!1}}}var yc=bQ(),SQ=t=>{const e=(n,a)=>{const{extend:i=null,slots:s={},variants:o={},compoundVariants:l=[],compoundSlots:c=[],defaultVariants:u={}}=n,d={..._Q,...a},h=i?.base?K1(i.base,n?.base):n?.base,m=i?.variants&&!Ss(i.variants)?XA(o,i.variants):o,f=i?.defaultVariants&&!Ss(i.defaultVariants)?{...i.defaultVariants,...u}:u;!Ss(d.twMergeConfig)&&!fQ(d.twMergeConfig,yc.cachedTwMergeConfig)&&(yc.didTwMergeConfigChange=!0,yc.cachedTwMergeConfig=d.twMergeConfig);const g=Ss(i?.slots),b=Ss(s)?{}:{base:K1(n?.base,g&&i?.base),...s},_=g?b:gQ({...i?.slots},Ss(b)?{base:n?.base}:b),S=Ss(i?.compoundVariants)?l:DB(i?.compoundVariants,l),E=v=>{if(Ss(m)&&Ss(s)&&g)return t(h,v?.class,v?.className)(d);if(S&&!Array.isArray(S))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof S}`);if(c&&!Array.isArray(c))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof c}`);const T=(G,K=m,z=null,re=null)=>{const W=K[G];if(!W||Ss(W))return null;const ie=re?.[G]??v?.[G];if(ie===null)return null;const M=OD(ie);if(typeof M=="object")return null;const B=f?.[G],J=M??OD(B);return W[J||"false"]},w=()=>{if(!m)return null;const G=Object.keys(m),K=[];for(let z=0;z{if(!m||typeof m!="object")return null;const z=[];for(const re in m){const W=T(re,m,G,K),ie=G==="base"&&typeof W=="string"?W:W&&W[G];ie&&z.push(ie)}return z},I={};for(const G in v){const K=v[G];K!==void 0&&(I[G]=K)}const x=(G,K)=>{const z=typeof v?.[G]=="object"?{[G]:v[G]?.initial}:{};return{...f,...I,...z,...K}},D=(G=[],K)=>{const z=[],re=G.length;for(let W=0;W{const K=D(S,G);if(!Array.isArray(K))return K;const z={},re=t;for(let W=0;W{if(c.length<1)return null;const K={},z=x(null,G);for(let re=0;re{const W=$(re),ie=H(re);return K(_[z],A(z,re),W?W[z]:void 0,ie?ie[z]:void 0,re?.class,re?.className)(d)}}return G}return t(h,w(),D(S),v?.class,v?.className)(d)},y=()=>{if(!(!m||typeof m!="object"))return Object.keys(m)};return E.variantKeys=y(),E.extend=i,E.base=h,E.slots=_,E.variants=m,E.defaultVariants=f,E.compoundSlots=c,E.compoundVariants=S,E};return{tv:e,createTV:n=>(a,i)=>e(a,i?XA(n,i):n)}},EQ=t=>Ss(t)?IB:hQ({...t,extend:{theme:t.theme,classGroups:t.classGroups,conflictingClassGroupModifiers:t.conflictingClassGroupModifiers,conflictingClassGroups:t.conflictingClassGroups,...t.extend}}),vQ=(t,e)=>{const r=K1(t);return!r||!(e?.twMerge??!0)?r:((!yc.cachedTwMerge||yc.didTwMergeConfigChange)&&(yc.didTwMergeConfigChange=!1,yc.cachedTwMerge=EQ(yc.cachedTwMergeConfig)),yc.cachedTwMerge(r)||void 0)},yQ=(...t)=>e=>vQ(t,e),{tv:tg}=SQ(yQ);const Cf=tg({base:"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium outline-none transition-all focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 text-white",outline:"bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 border",secondary:"dark:bg-secondary dark:text-secondary-foreground bg-background shadow-sm text-foreground hover:bg-muted-foreground/20",ghost:"hover:text-accent-foreground hover:bg-muted-foreground/10 backdrop-blur-sm",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4","icon-lg":"size-10",icon:"size-9","icon-sm":"size-5 rounded-sm"}},defaultVariants:{variant:"default",size:"default"}});var TQ=q(""),CQ=q("");function Dr(t,e){ye(e,!0);let r=V(e,"variant",3,"default"),n=V(e,"size",3,"default"),a=V(e,"ref",15,null),i=V(e,"href",3,void 0),s=V(e,"type",3,"button"),o=Ve(e,["$$slots","$$events","$$legacy","class","variant","size","ref","href","type","disabled","children"]);var l=se(),c=L(l);{var u=h=>{var m=TQ();$t(m,g=>({"data-slot":"button",class:g,href:e.disabled?void 0:i(),"aria-disabled":e.disabled,role:e.disabled?"link":void 0,tabindex:e.disabled?-1:void 0,...o}),[()=>jt(Cf({variant:r(),size:n()}),e.class)],void 0,void 0,"svelte-1q39rn8");var f=j(m);De(f,()=>e.children??Ge),Y(m),mr(m,g=>a(g),()=>a()),C(h,m)},d=h=>{var m=CQ();$t(m,g=>({"data-slot":"button",class:g,type:s(),disabled:e.disabled,...o}),[()=>jt(Cf({variant:r(),size:n()}),e.class)],void 0,void 0,"svelte-1q39rn8");var f=j(m);De(f,()=>e.children??Ge),Y(m),mr(m,g=>a(g),()=>a()),C(h,m)};le(c,h=>{i()?h(u):h(d,!1)})}C(t,l),Te()}function wQ(t){return typeof t=="function"}function rg(t){return t!==null&&typeof t=="object"}const AQ=["string","number","bigint","boolean"];function ZA(t){return t==null||AQ.includes(typeof t)?!0:Array.isArray(t)?t.every(e=>ZA(e)):typeof t=="object"?Object.getPrototypeOf(t)===Object.prototype:!1}const Np=Symbol("box"),SS=Symbol("is-writable");function Pe(t,e){const r=F(t);return e?{[Np]:!0,[SS]:!0,get current(){return p(r)},set current(n){e(n)}}:{[Np]:!0,get current(){return t()}}}function ng(t){return rg(t)&&Np in t}function PO(t){return ng(t)&&SS in t}function MB(t){return ng(t)?t:wQ(t)?Pe(t):us(t)}function RQ(t){return Object.entries(t).reduce((e,[r,n])=>ng(n)?(PO(n)?Object.defineProperty(e,r,{get(){return n.current},set(a){n.current=a}}):Object.defineProperty(e,r,{get(){return n.current}}),e):Object.assign(e,{[r]:n}),{})}function OQ(t){return PO(t)?{[Np]:!0,get current(){return t.current}}:t}function us(t){let e=_e(Tr(t));return{[Np]:!0,[SS]:!0,get current(){return p(e)},set current(r){k(e,r,!0)}}}function hh(t){let e=_e(Tr(t));return{[Np]:!0,[SS]:!0,get current(){return p(e)},set current(r){k(e,r,!0)}}}hh.from=MB;hh.with=Pe;hh.flatten=RQ;hh.readonly=OQ;hh.isBox=ng;hh.isWritableBox=PO;function kB(...t){return function(e){for(const r of t)if(r){if(e.defaultPrevented)return;typeof r=="function"?r.call(this,e):r.current?.call(this,e)}}}var NQ=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ph(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xh={},gv,ND;function IQ(){if(ND)return gv;ND=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,r=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,o=/^\s+|\s+$/g,l=` +`,c="/",u="*",d="",h="comment",m="declaration";gv=function(g,b){if(typeof g!="string")throw new TypeError("First argument must be a string");if(!g)return[];b=b||{};var _=1,S=1;function E(H){var G=H.match(e);G&&(_+=G.length);var K=H.lastIndexOf(l);S=~K?H.length-K:S+H.length}function y(){var H={line:_,column:S};return function(G){return G.position=new v(H),A(),G}}function v(H){this.start=H,this.end={line:_,column:S},this.source=b.source}v.prototype.content=g;function T(H){var G=new Error(b.source+":"+_+":"+S+": "+H);if(G.reason=H,G.filename=b.source,G.line=_,G.column=S,G.source=g,!b.silent)throw G}function w(H){var G=H.exec(g);if(G){var K=G[0];return E(K),g=g.slice(K.length),G}}function A(){w(r)}function I(H){var G;for(H=H||[];G=x();)G!==!1&&H.push(G);return H}function x(){var H=y();if(!(c!=g.charAt(0)||u!=g.charAt(1))){for(var G=2;d!=g.charAt(G)&&(u!=g.charAt(G)||c!=g.charAt(G+1));)++G;if(G+=2,d===g.charAt(G-1))return T("End of comment missing");var K=g.slice(2,G-2);return S+=2,E(K),g=g.slice(G),S+=2,H({type:h,comment:K})}}function D(){var H=y(),G=w(n);if(G){if(x(),!w(a))return T("property missing ':'");var K=w(i),z=H({type:m,property:f(G[0].replace(t,d)),value:K?f(K[0].replace(t,d)):d});return w(s),z}}function $(){var H=[];I(H);for(var G;G=D();)G!==!1&&(H.push(G),I(H));return H}return A(),$()};function f(g){return g?g.replace(o,d):d}return gv}var ID;function xQ(){if(ID)return xh;ID=1;var t=xh&&xh.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(xh,"__esModule",{value:!0}),xh.default=r;var e=t(IQ());function r(n,a){var i=null;if(!n||typeof n!="string")return i;var s=(0,e.default)(n),o=typeof a=="function";return s.forEach(function(l){if(l.type==="declaration"){var c=l.property,u=l.value;o?a(c,u,l):u&&(i=i||{},i[c]=u)}}),i}return xh}var DQ=xQ();const xD=ph(DQ),MQ=xD.default||xD,kQ=/\d/,PQ=["-","_","/","."];function LQ(t=""){if(!kQ.test(t))return t!==t.toLowerCase()}function FQ(t){const e=[];let r="",n,a;for(const i of t){const s=PQ.includes(i);if(s===!0){e.push(r),r="",n=void 0;continue}const o=LQ(i);if(a===!1){if(n===!1&&o===!0){e.push(r),r=i,n=o;continue}if(n===!0&&o===!1&&r.length>1){const l=r.at(-1);e.push(r.slice(0,Math.max(0,r.length-1))),r=l+i,n=o;continue}}r+=i,n=o,a=s}return e.push(r),e}function PB(t){return t?FQ(t).map(e=>UQ(e)).join(""):""}function BQ(t){return GQ(PB(t||""))}function UQ(t){return t?t[0].toUpperCase()+t.slice(1):""}function GQ(t){return t?t[0].toLowerCase()+t.slice(1):""}function Ym(t){if(!t)return{};const e={};function r(n,a){if(n.startsWith("-moz-")||n.startsWith("-webkit-")||n.startsWith("-ms-")||n.startsWith("-o-")){e[PB(n)]=a;return}if(n.startsWith("--")){e[n]=a;return}e[BQ(n)]=a}return MQ(t,r),e}function Dc(...t){return(...e)=>{for(const r of t)typeof r=="function"&&r(...e)}}function qQ(t,e){const r=RegExp(t,"g");return n=>{if(typeof n!="string")throw new TypeError(`expected an argument of type string, but got ${typeof n}`);return n.match(r)?n.replace(r,e):n}}const zQ=qQ(/[A-Z]/,t=>`-${t.toLowerCase()}`);function $Q(t){if(!t||typeof t!="object"||Array.isArray(t))throw new TypeError(`expected an argument of type object, but got ${typeof t}`);return Object.keys(t).map(e=>`${zQ(e)}: ${t[e]};`).join(` +`)}function LO(t={}){return $Q(t).replace(` +`," ")}const HQ=["onabort","onanimationcancel","onanimationend","onanimationiteration","onanimationstart","onauxclick","onbeforeinput","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncompositionend","oncompositionstart","oncompositionupdate","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onfocusin","onfocusout","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onselectionchange","onselectstart","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitioncancel","ontransitionend","ontransitionrun","ontransitionstart","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel"],YQ=new Set(HQ);function VQ(t){return YQ.has(t)}function Er(...t){const e={...t[0]};for(let r=1;rl.has(u));c&&eo(o)}return s}delete(e){var r=this.#e,n=r.get(e),a=super.delete(e);return n!==void 0&&(r.delete(e),k(this.#r,super.size),k(n,-1),eo(this.#t)),a}clear(){if(super.size!==0){super.clear();var e=this.#e;k(this.#r,0);for(var r of e.values())k(r,-1);eo(this.#t),e.clear()}}#a(){p(this.#t);var e=this.#e;if(this.#r.v!==e.size){for(var r of super.keys())if(!e.has(r)){var n=this.#i(0);e.set(r,n)}}for([,n]of this.#e)p(n)}keys(){return p(this.#t),super.keys()}values(){return this.#a(),super.values()}entries(){return this.#a(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return p(this.#r),super.size}}class ZQ{#e;#t;constructor(e,r){this.#e=e,this.#t=Ju(r)}get current(){return this.#t(),this.#e()}}const JQ=/\(.+\)/,eX=new Set(["all","print","screen","and","or","not","only"]);class FB extends ZQ{constructor(e,r){let n=JQ.test(e)||e.split(/[\s,]+/).some(i=>eX.has(i.trim()))?e:`(${e})`;const a=window.matchMedia(n);super(()=>a.matches,i=>Kr(a,"change",i))}}let tX=class{#e;#t;constructor(e={}){const{window:r=LB,document:n=r?.document}=e;r!==void 0&&(this.#e=n,this.#t=Ju(a=>{const i=Kr(r,"focusin",a),s=Kr(r,"focusout",a);return()=>{i(),s()}}))}get current(){return this.#t?.(),this.#e?jQ(this.#e):null}};new tX;function BB(t){return typeof t=="function"}function rX(t,e){if(BB(t)){const n=t();return n===void 0?e:n}return t===void 0?e:t}let ka=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return aS(this.#t)}get(){const e=$l(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const r=$l(this.#t);return r===void 0?e:r}set(e){return Zu(this.#t,e)}};function ES(t,e){let r=_e(null);const n=F(()=>rX(e,250));function a(...i){if(p(r))p(r).timeout&&clearTimeout(p(r).timeout);else{let s,o;const l=new Promise((c,u)=>{s=c,o=u});k(r,{timeout:null,runner:null,promise:l,resolve:s,reject:o},!0)}return p(r).runner=async()=>{if(!p(r))return;const s=p(r);k(r,null);try{s.resolve(await t.apply(this,i))}catch(o){s.reject(o)}},p(r).timeout=setTimeout(p(r).runner,p(n)),p(r).promise}return a.cancel=async()=>{(!p(r)||p(r).timeout===null)&&(await new Promise(i=>setTimeout(i,0)),!p(r)||p(r).timeout===null)||(clearTimeout(p(r).timeout),p(r).reject("Cancelled"),k(r,null))},a.runScheduledNow=async()=>{(!p(r)||!p(r).timeout)&&(await new Promise(i=>setTimeout(i,0)),!p(r)||!p(r).timeout)||(clearTimeout(p(r).timeout),p(r).timeout=null,await p(r).runner?.())},Object.defineProperty(a,"pending",{enumerable:!0,get(){return!!p(r)?.timeout}}),a}function nX(t,e){switch(t){case"post":It(e);break;case"pre":$i(e);break}}function UB(t,e,r,n={}){const{lazy:a=!1}=n;let i=!a,s=Array.isArray(t)?[]:void 0;nX(e,()=>{const o=Array.isArray(t)?t.map(c=>c()):t();if(!i){i=!0,s=o;return}const l=Nn(()=>r(o,s));return s=o,l})}function nn(t,e,r){UB(t,"post",e,r)}function aX(t,e,r){UB(t,"pre",e,r)}nn.pre=aX;function MD(t){return BB(t)?t():t}class iX{#e={width:0,height:0};#t=!1;#r;#n;#i;#a=F(()=>(p(this.#o)?.(),this.getSize().width));#s=F(()=>(p(this.#o)?.(),this.getSize().height));#o=F(()=>{const e=MD(this.#n);if(e)return Ju(r=>{if(!this.#i)return;const n=new this.#i.ResizeObserver(a=>{this.#t=!0;for(const i of a){const s=this.#r.box==="content-box"?i.contentBoxSize:i.borderBoxSize,o=Array.isArray(s)?s:[s];this.#e.width=o.reduce((l,c)=>Math.max(l,c.inlineSize),0),this.#e.height=o.reduce((l,c)=>Math.max(l,c.blockSize),0)}r()});return n.observe(e),()=>{this.#t=!1,n.disconnect()}})});constructor(e,r={box:"border-box"}){this.#i=r.window??LB,this.#r=r,this.#n=e,this.#e={width:0,height:0}}calculateSize(){const e=MD(this.#n);if(!e||!this.#i)return;const r=e.offsetWidth,n=e.offsetHeight;if(this.#r.box==="border-box")return{width:r,height:n};const a=this.#i.getComputedStyle(e),i=parseFloat(a.paddingLeft)+parseFloat(a.paddingRight),s=parseFloat(a.paddingTop)+parseFloat(a.paddingBottom),o=parseFloat(a.borderLeftWidth)+parseFloat(a.borderRightWidth),l=parseFloat(a.borderTopWidth)+parseFloat(a.borderBottomWidth),c=r-i-o,u=n-s-l;return{width:c,height:u}}getSize(){return this.#t?this.#e:this.calculateSize()??this.#e}get current(){return p(this.#o)?.(),this.getSize()}get width(){return p(this.#a)}get height(){return p(this.#s)}}class FO{#e=_e(!1);constructor(){It(()=>(Nn(()=>k(this.#e,!0)),()=>{k(this.#e,!1)}))}get current(){return p(this.#e)}}class GB{#e=()=>{};#t=F(()=>this.#e());constructor(e,r){let n;r!==void 0&&(n=r),this.#e=()=>{try{return n}finally{n=e()}}}get current(){return p(this.#t)}}function nu(t){It(()=>()=>{t()})}function qB(t){It(()=>Nn(()=>t()))}function BO(t,e){return setTimeout(e,t)}function no(t){ll().then(t)}const sX=1,oX=9,lX=11;function JA(t){return rg(t)&&t.nodeType===sX&&typeof t.nodeName=="string"}function zB(t){return rg(t)&&t.nodeType===oX}function cX(t){return rg(t)&&t.constructor?.name==="VisualViewport"}function uX(t){return rg(t)&&t.nodeType!==void 0}function $B(t){return uX(t)&&t.nodeType===lX&&"host"in t}function dX(t,e){if(!t||!e||!JA(t)||!JA(e))return!1;const r=e.getRootNode?.();if(t===e||t.contains(e))return!0;if(r&&$B(r)){let n=e;for(;n;){if(t===n)return!0;n=n.parentNode||n.host}}return!1}function em(t){return zB(t)?t:cX(t)?t.document:t?.ownerDocument??document}function vS(t){return $B(t)?vS(t.host):zB(t)?t.defaultView??window:JA(t)?t.ownerDocument?.defaultView??window:window}function hX(t){let e=t.activeElement;for(;e?.shadowRoot;){const r=e.shadowRoot.activeElement;if(r===e)break;e=r}return e}class au{element;#e=F(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return p(this.#e)}set root(e){k(this.#e,e)}constructor(e){typeof e=="function"?this.element=Pe(e):this.element=e}getDocument=()=>em(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>hX(this.root);isActiveElement=e=>e===this.getActiveElement();getElementById(e){return this.root.getElementById(e)}querySelector=e=>this.root?this.root.querySelector(e):null;querySelectorAll=e=>this.root?this.root.querySelectorAll(e):[];setTimeout=(e,r)=>this.getWindow().setTimeout(e,r);clearTimeout=e=>this.getWindow().clearTimeout(e)}function vn(t,e){return{[LW()]:r=>ng(t)?(t.current=r,Nn(()=>e?.(r)),()=>{"isConnected"in r&&r.isConnected||(t.current=null,e?.(null))}):(t(r),Nn(()=>e?.(r)),()=>{"isConnected"in r&&r.isConnected||(t(null),e?.(null))})}}function Gc(t){return t?"true":"false"}function pX(t){return t?"true":void 0}function Pi(t){return t?"":void 0}function eR(t){return t?!0:void 0}function dl(t){return t?"open":"closed"}function mX(t){return t?"checked":"unchecked"}function HB(t,e){return e?"mixed":t?"true":"false"}class fX{#e;#t;attrs;constructor(e){this.#e=e.getVariant?e.getVariant():null,this.#t=this.#e?`data-${this.#e}-`:`data-${e.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(r=>[r,this.getAttr(r)]))}getAttr(e,r){return r?`data-${r}-${e}`:`${this.#t}${e}`}selector(e,r){return`[${this.getAttr(e,r)}]`}}function jl(t){const e=new fX(t);return{...e.attrs,selector:e.selector,getAttr:e.getAttr}}const Ml="ArrowDown",ag="ArrowLeft",ig="ArrowRight",Dl="ArrowUp",yS="End",Yl="Enter",gX="Escape",TS="Home",UO="PageDown",GO="PageUp",so=" ",tR="Tab";function _X(t){return window.getComputedStyle(t).getPropertyValue("direction")}function bX(t="ltr",e="horizontal"){return{horizontal:t==="rtl"?ag:ig,vertical:Ml}[e]}function SX(t="ltr",e="horizontal"){return{horizontal:t==="rtl"?ig:ag,vertical:Dl}[e]}function EX(t="ltr",e="horizontal"){return["ltr","rtl"].includes(t)||(t="ltr"),["horizontal","vertical"].includes(e)||(e="horizontal"),{nextKey:bX(t,e),prevKey:SX(t,e)}}const YB=typeof document<"u",rR=vX();function vX(){return YB&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Lo(t){return t instanceof HTMLElement}function Mc(t){return t instanceof Element}function VB(t){return t instanceof Element||t instanceof SVGElement}function j1(t){return t.pointerType==="touch"}function yX(t){return t.matches(":focus-visible")}function TX(t){return t!==null}function CX(t){return t instanceof HTMLInputElement&&"select"in t}class wX{#e;#t=hh(null);constructor(e){this.#e=e}getCandidateNodes(){return this.#e.rootNode.current?this.#e.candidateSelector?Array.from(this.#e.rootNode.current.querySelectorAll(this.#e.candidateSelector)):this.#e.candidateAttr?Array.from(this.#e.rootNode.current.querySelectorAll(`[${this.#e.candidateAttr}]:not([data-disabled])`)):[]:[]}focusFirstCandidate(){const e=this.getCandidateNodes();e.length&&e[0]?.focus()}handleKeydown(e,r,n=!1){const a=this.#e.rootNode.current;if(!a||!e)return;const i=this.getCandidateNodes();if(!i.length)return;const s=i.indexOf(e),o=_X(a),{nextKey:l,prevKey:c}=EX(o,this.#e.orientation.current),u=this.#e.loop.current,d={[l]:s+1,[c]:s-1,[TS]:0,[yS]:i.length-1};if(n){const f=l===Ml?ig:Ml,g=c===Dl?ag:Dl;d[f]=s+1,d[g]=s-1}let h=d[r.key];if(h===void 0)return;r.preventDefault(),h<0&&u?h=i.length-1:h===i.length&&u&&(h=0);const m=i[h];if(m)return m.focus(),this.#t.current=m.id,this.#e.onCandidateFocus?.(m),m}getTabIndex(e){const r=this.getCandidateNodes(),n=this.#t.current!==null;return e&&!n&&r[0]===e?(this.#t.current=e.id,0):e?.id===this.#t.current?0:-1}setCurrentTabStopId(e){this.#t.current=e}focusCurrentTabStop(){const e=this.#t.current;if(!e)return;const r=this.#e.rootNode.current?.querySelector(`#${e}`);!r||!Lo(r)||r.focus()}}class AX{#e;#t=null;constructor(e){this.#e=e,nu(()=>this.#r())}#r(){this.#t&&(window.cancelAnimationFrame(this.#t),this.#t=null)}run(e){this.#r();const r=this.#e.ref.current;if(r){if(typeof r.getAnimations!="function"){this.#n(e);return}this.#t=window.requestAnimationFrame(()=>{const n=r.getAnimations();if(n.length===0){this.#n(e);return}Promise.allSettled(n.map(a=>a.finished)).then(()=>{this.#n(e)})})}}#n(e){const r=()=>{e()};this.#e.afterTick?no(r):r()}}class Bu{#e;#t;#r;#n=_e(!1);constructor(e){this.#e=e,k(this.#n,e.open.current,!0),this.#t=e.enabled??!0,this.#r=new AX({ref:this.#e.ref,afterTick:this.#e.open}),nn(()=>this.#e.open.current,r=>{r&&k(this.#n,!0),this.#t&&this.#r.run(()=>{r===this.#e.open.current&&(this.#e.open.current||k(this.#n,!1),this.#e.onComplete?.())})})}get shouldRender(){return p(this.#n)}}function Rr(){}function xn(t,e){return`bits-${t}`}const RX=jl({component:"dialog",parts:["content","trigger","overlay","title","description","close","cancel","action"]}),qc=new ka("Dialog.Root | AlertDialog.Root");class CS{static create(e){const r=qc.getOr(null);return qc.set(new CS(e,r))}opts;#e=_e(null);get triggerNode(){return p(this.#e)}set triggerNode(e){k(this.#e,e,!0)}#t=_e(null);get contentNode(){return p(this.#t)}set contentNode(e){k(this.#t,e,!0)}#r=_e(null);get overlayNode(){return p(this.#r)}set overlayNode(e){k(this.#r,e,!0)}#n=_e(null);get descriptionNode(){return p(this.#n)}set descriptionNode(e){k(this.#n,e,!0)}#i=_e(void 0);get contentId(){return p(this.#i)}set contentId(e){k(this.#i,e,!0)}#a=_e(void 0);get titleId(){return p(this.#a)}set titleId(e){k(this.#a,e,!0)}#s=_e(void 0);get triggerId(){return p(this.#s)}set triggerId(e){k(this.#s,e,!0)}#o=_e(void 0);get descriptionId(){return p(this.#o)}set descriptionId(e){k(this.#o,e,!0)}#l=_e(null);get cancelNode(){return p(this.#l)}set cancelNode(e){k(this.#l,e,!0)}#c=_e(0);get nestedOpenCount(){return p(this.#c)}set nestedOpenCount(e){k(this.#c,e,!0)}depth;parent;contentPresence;overlayPresence;constructor(e,r){this.opts=e,this.parent=r,this.depth=r?r.depth+1:0,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.contentPresence=new Bu({ref:Pe(()=>this.contentNode),open:this.opts.open,enabled:!0,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new Bu({ref:Pe(()=>this.overlayNode),open:this.opts.open,enabled:!0}),nn(()=>this.opts.open.current,n=>{this.parent&&(n?this.parent.incrementNested():this.parent.decrementNested())},{lazy:!0}),nu(()=>{this.opts.open.current&&this.parent?.decrementNested()})}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}getBitsAttr=e=>RX.getAttr(e,this.opts.variant.current);incrementNested(){this.nestedOpenCount++,this.parent?.incrementNested()}decrementNested(){this.nestedOpenCount!==0&&(this.nestedOpenCount--,this.parent?.decrementNested())}#d=F(()=>({"data-state":dl(this.opts.open.current)}));get sharedProps(){return p(this.#d)}set sharedProps(e){k(this.#d,e)}}class qO{static create(e){return new qO(e,qc.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=vn(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){this.opts.disabled.current||e.button>0||this.root.handleClose()}onkeydown(e){this.opts.disabled.current||(e.key===so||e.key===Yl)&&(e.preventDefault(),this.root.handleClose())}#e=F(()=>({id:this.opts.id.current,[this.root.getBitsAttr(this.opts.variant.current)]:"",onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return p(this.#e)}set props(e){k(this.#e,e)}}class zO{static create(e){return new zO(e,qc.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=vn(this.opts.ref)}#e=F(()=>({id:this.opts.id.current,[this.root.getBitsAttr("action")]:"",...this.root.sharedProps,...this.attachment}));get props(){return p(this.#e)}set props(e){k(this.#e,e)}}class $O{static create(e){return new $O(e,qc.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.root.titleId=this.opts.id.current,this.attachment=vn(this.opts.ref),nn.pre(()=>this.opts.id.current,n=>{this.root.titleId=n})}#e=F(()=>({id:this.opts.id.current,role:"heading","aria-level":this.opts.level.current,[this.root.getBitsAttr("title")]:"",...this.root.sharedProps,...this.attachment}));get props(){return p(this.#e)}set props(e){k(this.#e,e)}}class HO{static create(e){return new HO(e,qc.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.root.descriptionId=this.opts.id.current,this.attachment=vn(this.opts.ref,n=>{this.root.descriptionNode=n}),nn.pre(()=>this.opts.id.current,n=>{this.root.descriptionId=n})}#e=F(()=>({id:this.opts.id.current,[this.root.getBitsAttr("description")]:"",...this.root.sharedProps,...this.attachment}));get props(){return p(this.#e)}set props(e){k(this.#e,e)}}class wS{static create(e){return new wS(e,qc.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=vn(this.opts.ref,n=>{this.root.contentNode=n,this.root.contentId=n?.id})}#e=F(()=>({open:this.root.opts.open.current}));get snippetProps(){return p(this.#e)}set snippetProps(e){k(this.#e,e)}#t=F(()=>({id:this.opts.id.current,role:this.root.opts.variant.current==="alert-dialog"?"alertdialog":"dialog","aria-modal":"true","aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.getBitsAttr("content")]:"",style:{pointerEvents:"auto",outline:this.root.opts.variant.current==="alert-dialog"?"none":void 0,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount,contain:"layout style paint"},tabindex:this.root.opts.variant.current==="alert-dialog"?-1:void 0,"data-nested-open":Pi(this.root.nestedOpenCount>0),"data-nested":Pi(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return p(this.#t)}set props(e){k(this.#t,e)}get shouldRender(){return this.root.contentPresence.shouldRender}}class YO{static create(e){return new YO(e,qc.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=vn(this.opts.ref,n=>this.root.overlayNode=n)}#e=F(()=>({open:this.root.opts.open.current}));get snippetProps(){return p(this.#e)}set snippetProps(e){k(this.#e,e)}#t=F(()=>({id:this.opts.id.current,[this.root.getBitsAttr("overlay")]:"",style:{pointerEvents:"auto","--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount},"data-nested-open":Pi(this.root.nestedOpenCount>0),"data-nested":Pi(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return p(this.#t)}set props(e){k(this.#t,e)}get shouldRender(){return this.root.overlayPresence.shouldRender}}class VO{static create(e){return new VO(e,qc.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=vn(this.opts.ref,n=>this.root.cancelNode=n),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){this.opts.disabled.current||e.button>0||this.root.handleClose()}onkeydown(e){this.opts.disabled.current||(e.key===so||e.key===Yl)&&(e.preventDefault(),this.root.handleClose())}#e=F(()=>({id:this.opts.id.current,[this.root.getBitsAttr("cancel")]:"",onclick:this.onclick,onkeydown:this.onkeydown,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return p(this.#e)}set props(e){k(this.#e,e)}}function OX(t,e){ye(e,!0);let r=V(e,"open",15,!1),n=V(e,"onOpenChange",3,Rr),a=V(e,"onOpenChangeComplete",3,Rr);CS.create({variant:Pe(()=>"alert-dialog"),open:Pe(()=>r(),o=>{r(o),n()(o)}),onOpenChangeComplete:Pe(()=>a())});var i=se(),s=L(i);De(s,()=>e.children??Ge),C(t,i),Te()}var NX=q("
");function WO(t,e){const r=In();ye(e,!0);let n=V(e,"id",19,()=>xn(r)),a=V(e,"ref",15,null),i=V(e,"level",3,2),s=Ve(e,["$$slots","$$events","$$legacy","id","ref","child","children","level"]);const o=$O.create({id:Pe(()=>n()),level:Pe(()=>i()),ref:Pe(()=>a(),m=>a(m))}),l=F(()=>Er(s,o.props));var c=se(),u=L(c);{var d=m=>{var f=se(),g=L(f);De(g,()=>e.child,()=>({props:p(l)})),C(m,f)},h=m=>{var f=NX();$t(f,()=>({...p(l)}));var g=j(f);De(g,()=>e.children??Ge),Y(f),C(m,f)};le(u,m=>{e.child?m(d):m(h,!1)})}C(t,c),Te()}var IX=q("");function xX(t,e){const r=In();ye(e,!0);let n=V(e,"id",19,()=>xn(r)),a=V(e,"ref",15,null),i=Ve(e,["$$slots","$$events","$$legacy","children","child","id","ref"]);const s=zO.create({id:Pe(()=>n()),ref:Pe(()=>a(),h=>a(h))}),o=F(()=>Er(i,s.props));var l=se(),c=L(l);{var u=h=>{var m=se(),f=L(m);De(f,()=>e.child,()=>({props:p(o)})),C(h,m)},d=h=>{var m=IX();$t(m,()=>({...p(o)}));var f=j(m);De(f,()=>e.children??Ge),Y(m),C(h,m)};le(c,h=>{e.child?h(u):h(d,!1)})}C(t,l),Te()}var DX=q("");function MX(t,e){const r=In();ye(e,!0);let n=V(e,"id",19,()=>xn(r)),a=V(e,"ref",15,null),i=V(e,"disabled",3,!1),s=Ve(e,["$$slots","$$events","$$legacy","id","ref","children","child","disabled"]);const o=VO.create({id:Pe(()=>n()),ref:Pe(()=>a(),m=>a(m)),disabled:Pe(()=>!!i())}),l=F(()=>Er(s,o.props));var c=se(),u=L(c);{var d=m=>{var f=se(),g=L(f);De(g,()=>e.child,()=>({props:p(l)})),C(m,f)},h=m=>{var f=DX();$t(f,()=>({...p(l)}));var g=j(f);De(g,()=>e.children??Ge),Y(f),C(m,f)};le(u,m=>{e.child?m(d):m(h,!1)})}C(t,c),Te()}function kX(t,e){var r=se(),n=L(r);WW(n,()=>e.children,a=>{var i=se(),s=L(i);De(s,()=>e.children??Ge),C(a,i)}),C(t,r)}const PX=new ka("BitsConfig");function LX(){const t=new FX(null,{});return PX.getOr(t).opts}class FX{opts;constructor(e,r){const n=BX(e,r);this.opts={defaultPortalTo:n(a=>a.defaultPortalTo),defaultLocale:n(a=>a.defaultLocale)}}}function BX(t,e){return r=>Pe(()=>{const a=r(e)?.current;if(a!==void 0)return a;if(t!==null)return r(t.opts)?.current})}function UX(t,e){return r=>{const n=LX();return Pe(()=>{const a=r();if(a!==void 0)return a;const i=t(n).current;return i!==void 0?i:e})}}const GX=UX(t=>t.defaultPortalTo,"body");function iu(t,e){ye(e,!0);const r=GX(()=>e.to),n=rF();let a=F(i);function i(){if(!YB||e.disabled)return null;let d=null;return typeof r.current=="string"?d=document.querySelector(r.current):d=r.current,d}let s;function o(){s&&(dO(s),s=null)}nn([()=>p(a),()=>e.disabled],([d,h])=>{if(!d||h){o();return}return s=uS(kX,{target:d,props:{children:e.children},context:n}),()=>{o()}});var l=se(),c=L(l);{var u=d=>{var h=se(),m=L(h);De(m,()=>e.children??Ge),C(d,h)};le(c,d=>{e.disabled&&d(u)})}C(t,l),Te()}class qX{eventName;options;constructor(e,r={bubbles:!0,cancelable:!0}){this.eventName=e,this.options=r}createEvent(e){return new CustomEvent(this.eventName,{...this.options,detail:e})}dispatch(e,r){const n=this.createEvent(r);return e.dispatchEvent(n),n}listen(e,r,n){const a=i=>{r(i)};return Kr(e,this.eventName,a,n)}}function kD(t,e=500){let r=null;const n=(...a)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{t(...a)},e)};return n.destroy=()=>{r!==null&&(clearTimeout(r),r=null)},n}function WB(t,e){return t===e||t.contains(e)}function KB(t){return t?.ownerDocument??document}function zX(t,e){const{clientX:r,clientY:n}=t,a=e.getBoundingClientRect();return ra.right||na.bottom}const nR=[Yl,so],$X=[Ml,GO,TS],jB=[Dl,UO,yS],HX=[...$X,...jB],YX={ltr:[...nR,ig],rtl:[...nR,ag]},VX={ltr:[ag],rtl:[ig]};function Q1(t){return t.pointerType==="mouse"}function WX(t,{select:e=!1}={}){if(!t||!t.focus)return;const r=em(t);if(r.activeElement===t)return;const n=r.activeElement;t.focus({preventScroll:!0}),t!==n&&CX(t)&&e&&t.select()}function KX(t,{select:e=!1}={},r){const n=r();for(const a of t)if(WX(a,{select:e}),r()!==n)return!0}let vm=_e(!1);class Tu{static _refs=0;static _cleanup;constructor(){It(()=>(Tu._refs===0&&(Tu._cleanup=Xf(()=>{const e=[],r=a=>{k(vm,!1)},n=a=>{k(vm,!0)};return e.push(Kr(document,"pointerdown",r,{capture:!0}),Kr(document,"pointermove",r,{capture:!0}),Kr(document,"keydown",n,{capture:!0})),Dc(...e)})),Tu._refs++,()=>{Tu._refs--,Tu._refs===0&&(k(vm,!1),Tu._cleanup?.())}))}get current(){return p(vm)}set current(e){k(vm,e,!0)}}var QB=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],X1=QB.join(","),XB=typeof Element>"u",nh=XB?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Z1=!XB&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t?.ownerDocument},J1=function t(e,r){var n;r===void 0&&(r=!0);var a=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),i=a===""||a==="true",s=i||r&&e&&t(e.parentNode);return s},jX=function(e){var r,n=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"contenteditable");return n===""||n==="true"},ZB=function(e,r,n){if(J1(e))return[];var a=Array.prototype.slice.apply(e.querySelectorAll(X1));return r&&nh.call(e,X1)&&a.unshift(e),a=a.filter(n),a},JB=function t(e,r,n){for(var a=[],i=Array.from(e);i.length;){var s=i.shift();if(!J1(s,!1))if(s.tagName==="SLOT"){var o=s.assignedElements(),l=o.length?o:s.children,c=t(l,!0,n);n.flatten?a.push.apply(a,c):a.push({scopeParent:s,candidates:c})}else{var u=nh.call(s,X1);u&&n.filter(s)&&(r||!e.includes(s))&&a.push(s);var d=s.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(s),h=!J1(d,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(s));if(d&&h){var m=t(d===!0?s.children:d.children,!0,n);n.flatten?a.push.apply(a,m):a.push({scopeParent:s,candidates:m})}else i.unshift.apply(i,s.children)}}return a},eU=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},tU=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||jX(e))&&!eU(e)?0:e.tabIndex},QX=function(e,r){var n=tU(e);return n<0&&r&&!eU(e)?0:n},XX=function(e,r){return e.tabIndex===r.tabIndex?e.documentOrder-r.documentOrder:e.tabIndex-r.tabIndex},rU=function(e){return e.tagName==="INPUT"},ZX=function(e){return rU(e)&&e.type==="hidden"},JX=function(e){var r=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return r},eZ=function(e,r){for(var n=0;nsummary:first-of-type"),s=i?e.parentElement:e;if(nh.call(s,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof a=="function"){for(var o=e;e;){var l=e.parentElement,c=Z1(e);if(l&&!l.shadowRoot&&a(l)===!0)return PD(e);e.assignedSlot?e=e.assignedSlot:!l&&c!==e.ownerDocument?e=c.host:e=l}e=o}if(aZ(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return PD(e);return!1},sZ=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var r=e.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n=0)},lZ=function t(e){var r=[],n=[];return e.forEach(function(a,i){var s=!!a.scopeParent,o=s?a.scopeParent:a,l=QX(o,s),c=s?t(a.candidates):o;l===0?s?r.push.apply(r,c):r.push(o):n.push({documentOrder:i,tabIndex:l,item:a,isScope:s,content:c})}),n.sort(XX).reduce(function(a,i){return i.isScope?a.push.apply(a,i.content):a.push(i.content),a},[]).concat(r)},nU=function(e,r){r=r||{};var n;return r.getShadowRoot?n=JB([e],r.includeContainer,{filter:aR.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:oZ}):n=ZB(e,r.includeContainer,aR.bind(null,r)),lZ(n)},aU=function(e,r){r=r||{};var n;return r.getShadowRoot?n=JB([e],r.includeContainer,{filter:eb.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=ZB(e,r.includeContainer,eb.bind(null,r)),n},AS=function(e,r){if(r=r||{},!e)throw new Error("No node provided");return nh.call(e,X1)===!1?!1:aR(r,e)},cZ=QB.concat("iframe").join(","),iU=function(e,r){if(r=r||{},!e)throw new Error("No node provided");return nh.call(e,cZ)===!1?!1:eb(r,e)};function sf(){return{getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"}}function uZ(t,e){if(!AS(t,sf()))return dZ(t,e);const r=em(t),n=nU(r.body,sf());e==="prev"&&n.reverse();const a=n.indexOf(t);return a===-1?r.body:n.slice(a+1)[0]}function dZ(t,e){const r=em(t);if(!iU(t,sf()))return r.body;const n=aU(r.body,sf());e==="prev"&&n.reverse();const a=n.indexOf(t);return a===-1?r.body:n.slice(a+1).find(s=>AS(s,sf()))??r.body}function hZ(t,e,r=!0){if(!(t.length===0||e<0||e>=t.length))return t.length===1&&e===0?t[0]:e===t.length-1?r?t[0]:void 0:t[e+1]}function pZ(t,e,r=!0){if(!(t.length===0||e<0||e>=t.length))return t.length===1&&e===0?t[0]:e===0?r?t[t.length-1]:void 0:t[e-1]}function mZ(t,e,r,n=!0){if(t.length===0||e<0||e>=t.length)return;let a=e+r;return n?a=(a%t.length+t.length)%t.length:a=Math.max(0,Math.min(a,t.length-1)),t[a]}function fZ(t,e,r,n=!0){if(t.length===0||e<0||e>=t.length)return;let a=e-r;return n?a=(a%t.length+t.length)%t.length:a=Math.max(0,Math.min(a,t.length-1)),t[a]}function KO(t,e,r){const n=e.toLowerCase();if(n.endsWith(" ")){const d=n.slice(0,-1);if(t.filter(g=>g.toLowerCase().startsWith(d)).length<=1)return KO(t,d,r);const m=r?.toLowerCase();if(m&&m.startsWith(d)&&m.charAt(d.length)===" "&&e.trim()===d)return r;const f=t.filter(g=>g.toLowerCase().startsWith(n));if(f.length>0){const g=r?t.indexOf(r):-1;return LD(f,Math.max(g,0)).find(S=>S!==r)||r}}const i=e.length>1&&Array.from(e).every(d=>d===e[0])?e[0]:e,s=i.toLowerCase(),o=r?t.indexOf(r):-1;let l=LD(t,Math.max(o,0));i.length===1&&(l=l.filter(d=>d!==r));const u=l.find(d=>d?.toLowerCase().startsWith(s));return u!==r?u:void 0}function LD(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const gZ={afterMs:1e4,onChange:Rr};function jO(t,e){const{afterMs:r,onChange:n,getWindow:a}={...gZ,...e};let i=null,s=_e(Tr(t));function o(){return a().setTimeout(()=>{k(s,t,!0),n?.(t)},r)}return It(()=>()=>{i&&a().clearTimeout(i)}),Pe(()=>p(s),l=>{k(s,l,!0),n?.(l),i&&a().clearTimeout(i),i=o()})}class sU{#e;#t;#r=F(()=>this.#e.onMatch?this.#e.onMatch:e=>e.focus());#n=F(()=>this.#e.getCurrentItem?this.#e.getCurrentItem:this.#e.getActiveElement);constructor(e){this.#e=e,this.#t=jO("",{afterMs:1e3,getWindow:e.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(e,r){if(!r.length)return;this.#t.current=this.#t.current+e;const n=p(this.#n)(),a=r.find(l=>l===n)?.textContent?.trim()??"",i=r.map(l=>l.textContent?.trim()??""),s=KO(i,this.#t.current,a),o=r.find(l=>l.textContent?.trim()===s);return o&&p(this.#r)(o),o}resetTypeahead(){this.#t.current=""}get search(){return this.#t.current}}class _Z{#e;#t;#r;#n=_e(null);constructor(e){this.#e=e,this.#t=F(()=>this.#e.enabled()),this.#r=jO(!1,{afterMs:e.transitTimeout??300,onChange:r=>{p(this.#t)&&this.#e.setIsPointerInTransit?.(r)},getWindow:()=>vS(this.#e.triggerNode())}),nn([e.triggerNode,e.contentNode,e.enabled],([r,n,a])=>{if(!r||!n||!a)return;const i=o=>{this.#a(o,n)},s=o=>{this.#a(o,r)};return Dc(Kr(r,"pointerleave",i),Kr(n,"pointerleave",s))}),nn(()=>p(this.#n),()=>{const r=a=>{if(!p(this.#n))return;const i=a.target;if(!Mc(i))return;const s={x:a.clientX,y:a.clientY},o=e.triggerNode()?.contains(i)||e.contentNode()?.contains(i),l=!vZ(s,p(this.#n));o?this.#i():l&&(this.#i(),e.onPointerExit())},n=em(e.triggerNode()??e.contentNode());if(n)return Kr(n,"pointermove",r)})}#i(){k(this.#n,null),this.#r.current=!1}#a(e,r){const n=e.currentTarget;if(!Lo(n))return;const a={x:e.clientX,y:e.clientY},i=bZ(a,n.getBoundingClientRect()),s=SZ(a,i),o=EZ(r.getBoundingClientRect()),l=yZ([...s,...o]);k(this.#n,l,!0),this.#r.current=!0}}function bZ(t,e){const r=Math.abs(e.top-t.y),n=Math.abs(e.bottom-t.y),a=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(r,n,a,i)){case i:return"left";case a:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function SZ(t,e,r=5){const n=r*1.5;switch(e){case"top":return[{x:t.x-r,y:t.y+r},{x:t.x,y:t.y-n},{x:t.x+r,y:t.y+r}];case"bottom":return[{x:t.x-r,y:t.y-r},{x:t.x,y:t.y+n},{x:t.x+r,y:t.y-r}];case"left":return[{x:t.x+r,y:t.y-r},{x:t.x-n,y:t.y},{x:t.x+r,y:t.y+r}];case"right":return[{x:t.x-r,y:t.y-r},{x:t.x+n,y:t.y},{x:t.x-r,y:t.y+r}]}}function EZ(t){const{top:e,right:r,bottom:n,left:a}=t;return[{x:a,y:e},{x:r,y:e},{x:r,y:n},{x:a,y:n}]}function vZ(t,e){const{x:r,y:n}=t;let a=!1;for(let i=0,s=e.length-1;in!=u>n&&r<(c-o)*(n-l)/(u-l)+o&&(a=!a)}return a}function yZ(t){const e=t.slice();return e.sort((r,n)=>r.xn.x?1:r.yn.y?1:0),TZ(e)}function TZ(t){if(t.length<=1)return t.slice();const e=[];for(let n=0;n=2;){const i=e[e.length-1],s=e[e.length-2];if((i.x-s.x)*(a.y-s.y)>=(i.y-s.y)*(a.x-s.x))e.pop();else break}e.push(a)}e.pop();const r=[];for(let n=t.length-1;n>=0;n--){const a=t[n];for(;r.length>=2;){const i=r[r.length-1],s=r[r.length-2];if((i.x-s.x)*(a.y-s.y)>=(i.y-s.y)*(a.x-s.x))r.pop();else break}r.push(a)}return r.pop(),e.length===1&&r.length===1&&e[0].x===r[0].x&&e[0].y===r[0].y?e:e.concat(r)}const CZ="data-context-menu-trigger",wZ="data-context-menu-content",oU=new ka("Menu.Root"),Ip=new ka("Menu.Root | Menu.Sub"),QO=new ka("Menu.Content"),XO=new qX("bitsmenuopen",{bubbles:!1,cancelable:!0}),AZ=jl({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]});class ZO{static create(e){const r=new ZO(e);return oU.set(r)}opts;isUsingKeyboard=new Tu;#e=_e(!1);get ignoreCloseAutoFocus(){return p(this.#e)}set ignoreCloseAutoFocus(e){k(this.#e,e,!0)}#t=_e(!1);get isPointerInTransit(){return p(this.#t)}set isPointerInTransit(e){k(this.#t,e,!0)}constructor(e){this.opts=e}getBitsAttr=e=>AZ.getAttr(e,this.opts.variant.current)}class RS{static create(e,r){return Ip.set(new RS(e,r,null))}opts;root;parentMenu;contentId=Pe(()=>"");#e=_e(null);get contentNode(){return p(this.#e)}set contentNode(e){k(this.#e,e,!0)}contentPresence;#t=_e(null);get triggerNode(){return p(this.#t)}set triggerNode(e){k(this.#t,e,!0)}constructor(e,r,n){this.opts=e,this.root=r,this.parentMenu=n,this.contentPresence=new Bu({ref:Pe(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),n&&nn(()=>n.opts.open.current,()=>{n.opts.open.current||(this.opts.open.current=!1)})}toggleOpen(){this.opts.open.current=!this.opts.open.current}onOpen(){this.opts.open.current=!0}onClose(){this.opts.open.current=!1}}class OS{static create(e){return QO.set(new OS(e,Ip.get()))}opts;parentMenu;rovingFocusGroup;domContext;attachment;#e=_e("");get search(){return p(this.#e)}set search(e){k(this.#e,e,!0)}#t=0;#r;#n=_e(!1);get mounted(){return p(this.#n)}set mounted(e){k(this.#n,e,!0)}#i;constructor(e,r){this.opts=e,this.parentMenu=r,this.domContext=new au(e.ref),this.attachment=vn(this.opts.ref,n=>{this.parentMenu.contentNode!==n&&(this.parentMenu.contentNode=n)}),r.contentId=e.id,this.#i=e.isSub??!1,this.onkeydown=this.onkeydown.bind(this),this.onblur=this.onblur.bind(this),this.onfocus=this.onfocus.bind(this),this.handleInteractOutside=this.handleInteractOutside.bind(this),new _Z({contentNode:()=>this.parentMenu.contentNode,triggerNode:()=>this.parentMenu.triggerNode,enabled:()=>this.parentMenu.opts.open.current&&!!this.parentMenu.triggerNode?.hasAttribute(this.parentMenu.root.getBitsAttr("sub-trigger")),onPointerExit:()=>{this.parentMenu.opts.open.current=!1},setIsPointerInTransit:n=>{this.parentMenu.root.isPointerInTransit=n}}),this.#r=new sU({getActiveElement:()=>this.domContext.getActiveElement(),getWindow:()=>this.domContext.getWindow()}).handleTypeaheadSearch,this.rovingFocusGroup=new wX({rootNode:Pe(()=>this.parentMenu.contentNode),candidateAttr:this.parentMenu.root.getBitsAttr("item"),loop:this.opts.loop,orientation:Pe(()=>"vertical")}),nn(()=>this.parentMenu.contentNode,n=>{if(!n)return;const a=()=>{no(()=>{this.parentMenu.root.isUsingKeyboard.current&&this.rovingFocusGroup.focusFirstCandidate()})};return XO.listen(n,a)}),It(()=>{this.parentMenu.opts.open.current||this.domContext.getWindow().clearTimeout(this.#t)})}#a(){const e=this.parentMenu.contentNode;return e?Array.from(e.querySelectorAll(`[${this.parentMenu.root.getBitsAttr("item")}]:not([data-disabled])`)):[]}#s(){return this.parentMenu.root.isPointerInTransit}onCloseAutoFocus=e=>{this.opts.onCloseAutoFocus.current?.(e),!(e.defaultPrevented||this.#i)&&this.parentMenu.triggerNode&&AS(this.parentMenu.triggerNode)&&(e.preventDefault(),this.parentMenu.triggerNode.focus())};handleTabKeyDown(e){let r=this.parentMenu;for(;r.parentMenu!==null;)r=r.parentMenu;if(!r.triggerNode)return;e.preventDefault();const n=uZ(r.triggerNode,e.shiftKey?"prev":"next");n?(this.parentMenu.root.ignoreCloseAutoFocus=!0,r.onClose(),no(()=>{n.focus(),no(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})})):this.domContext.getDocument().body.focus()}onkeydown(e){if(e.defaultPrevented)return;if(e.key===tR){this.handleTabKeyDown(e);return}const r=e.target,n=e.currentTarget;if(!Lo(r)||!Lo(n))return;const a=r.closest(`[${this.parentMenu.root.getBitsAttr("content")}]`)?.id===this.parentMenu.contentId.current,i=e.ctrlKey||e.altKey||e.metaKey,s=e.key.length===1;if(this.rovingFocusGroup.handleKeydown(r,e)||e.code==="Space")return;const l=this.#a();a&&!i&&s&&this.#r(e.key,l),e.target?.id===this.parentMenu.contentId.current&&HX.includes(e.key)&&(e.preventDefault(),jB.includes(e.key)&&l.reverse(),KX(l,{select:!1},()=>this.domContext.getActiveElement()))}onblur(e){Mc(e.currentTarget)&&Mc(e.target)&&(e.currentTarget.contains?.(e.target)||(this.domContext.getWindow().clearTimeout(this.#t),this.search=""))}onfocus(e){this.parentMenu.root.isUsingKeyboard.current&&no(()=>this.rovingFocusGroup.focusFirstCandidate())}onItemEnter(){return this.#s()}onItemLeave(e){if(e.currentTarget.hasAttribute(this.parentMenu.root.getBitsAttr("sub-trigger"))||this.#s()||this.parentMenu.root.isUsingKeyboard.current)return;this.parentMenu.contentNode?.focus(),this.rovingFocusGroup.setCurrentTabStopId("")}onTriggerLeave(){return!!this.#s()}handleInteractOutside(e){if(!VB(e.target))return;const r=this.parentMenu.triggerNode?.id;if(e.target.id===r){e.preventDefault();return}e.target.closest(`#${r}`)&&e.preventDefault()}get shouldRender(){return this.parentMenu.contentPresence.shouldRender}#o=F(()=>({open:this.parentMenu.opts.open.current}));get snippetProps(){return p(this.#o)}set snippetProps(e){k(this.#o,e)}#l=F(()=>({id:this.opts.id.current,role:"menu","aria-orientation":"vertical",[this.parentMenu.root.getBitsAttr("content")]:"","data-state":dl(this.parentMenu.opts.open.current),onkeydown:this.onkeydown,onblur:this.onblur,onfocus:this.onfocus,dir:this.parentMenu.root.opts.dir.current,style:{pointerEvents:"auto",contain:"layout style paint"},...this.attachment}));get props(){return p(this.#l)}set props(e){k(this.#l,e)}popperProps={onCloseAutoFocus:e=>this.onCloseAutoFocus(e)}}class lU{opts;content;attachment;#e=_e(!1);constructor(e,r){this.opts=e,this.content=r,this.attachment=vn(this.opts.ref),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this),this.onfocus=this.onfocus.bind(this),this.onblur=this.onblur.bind(this)}onpointermove(e){if(!e.defaultPrevented&&Q1(e))if(this.opts.disabled.current)this.content.onItemLeave(e);else{if(this.content.onItemEnter())return;const n=e.currentTarget;if(!Lo(n))return;n.focus()}}onpointerleave(e){e.defaultPrevented||Q1(e)&&this.content.onItemLeave(e)}onfocus(e){no(()=>{e.defaultPrevented||this.opts.disabled.current||k(this.#e,!0)})}onblur(e){no(()=>{e.defaultPrevented||k(this.#e,!1)})}#t=F(()=>({id:this.opts.id.current,tabindex:-1,role:"menuitem","aria-disabled":Gc(this.opts.disabled.current),"data-disabled":Pi(this.opts.disabled.current),"data-highlighted":p(this.#e)?"":void 0,[this.content.parentMenu.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,onfocus:this.onfocus,onblur:this.onblur,...this.attachment}));get props(){return p(this.#t)}set props(e){k(this.#t,e)}}class JO{static create(e){const r=new lU(e,QO.get());return new JO(e,r)}opts;item;root;#e=!1;constructor(e,r){this.opts=e,this.item=r,this.root=r.content.parentMenu.root,this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this)}#t(){if(this.item.opts.disabled.current)return;const e=new CustomEvent("menuitemselect",{bubbles:!0,cancelable:!0});if(this.opts.onSelect.current(e),e.defaultPrevented){this.item.content.parentMenu.root.isUsingKeyboard.current=!1;return}this.opts.closeOnSelect.current&&this.item.content.parentMenu.root.opts.onClose()}onkeydown(e){const r=this.item.content.search!=="";if(!(this.item.opts.disabled.current||r&&e.key===so)&&nR.includes(e.key)){if(!Lo(e.currentTarget))return;e.currentTarget.click(),e.preventDefault()}}onclick(e){this.item.opts.disabled.current||this.#t()}onpointerup(e){if(!e.defaultPrevented&&!this.#e){if(!Lo(e.currentTarget))return;e.currentTarget?.click()}}onpointerdown(e){this.#e=!0}#r=F(()=>Er(this.item.props,{onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown}));get props(){return p(this.#r)}set props(e){k(this.#r,e)}}class eN{static create(e){const r=QO.get(),n=new lU(e,r),a=Ip.get();return new eN(e,n,r,a)}opts;item;content;submenu;attachment;#e=null;constructor(e,r,n,a){this.opts=e,this.item=r,this.content=n,this.submenu=a,this.attachment=vn(this.opts.ref,i=>this.submenu.triggerNode=i),this.onpointerleave=this.onpointerleave.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),nu(()=>{this.#t()})}#t(){this.#e!==null&&(this.content.domContext.getWindow().clearTimeout(this.#e),this.#e=null)}onpointermove(e){Q1(e)&&!this.item.opts.disabled.current&&!this.submenu.opts.open.current&&!this.#e&&!this.content.parentMenu.root.isPointerInTransit&&(this.#e=this.content.domContext.setTimeout(()=>{this.submenu.onOpen(),this.#t()},this.opts.openDelay.current))}onpointerleave(e){Q1(e)&&this.#t()}onkeydown(e){const r=this.content.search!=="";this.item.opts.disabled.current||r&&e.key===so||YX[this.submenu.root.opts.dir.current].includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}onclick(e){if(this.item.opts.disabled.current||!Lo(e.currentTarget))return;e.currentTarget.focus();const r=new CustomEvent("menusubtriggerselect",{bubbles:!0,cancelable:!0});this.opts.onSelect.current(r),this.submenu.opts.open.current||(this.submenu.onOpen(),no(()=>{const n=this.submenu.contentNode;n&&XO.dispatch(n)}))}#r=F(()=>Er({"aria-haspopup":"menu","aria-expanded":Gc(this.submenu.opts.open.current),"data-state":dl(this.submenu.opts.open.current),"aria-controls":this.submenu.opts.open.current?this.submenu.contentId.current:void 0,[this.submenu.root.getBitsAttr("sub-trigger")]:"",onclick:this.onclick,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,onkeydown:this.onkeydown,...this.attachment},this.item.props));get props(){return p(this.#r)}set props(e){k(this.#r,e)}}class tN{static create(e){return new tN(e,oU.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=vn(this.opts.ref)}#e=F(()=>({id:this.opts.id.current,role:"group",[this.root.getBitsAttr("separator")]:"",...this.attachment}));get props(){return p(this.#e)}set props(e){k(this.#e,e)}}class rN{static create(e){return new rN(e,Ip.get())}opts;parentMenu;attachment;constructor(e,r){this.opts=e,this.parentMenu=r,this.attachment=vn(this.opts.ref,n=>this.parentMenu.triggerNode=n)}onclick=e=>{this.opts.disabled.current||e.detail!==0||(this.parentMenu.toggleOpen(),e.preventDefault())};onpointerdown=e=>{if(!this.opts.disabled.current){if(e.pointerType==="touch")return e.preventDefault();e.button===0&&e.ctrlKey===!1&&(this.parentMenu.toggleOpen(),this.parentMenu.opts.open.current||e.preventDefault())}};onpointerup=e=>{this.opts.disabled.current||e.pointerType==="touch"&&(e.preventDefault(),this.parentMenu.toggleOpen())};onkeydown=e=>{if(!this.opts.disabled.current){if(e.key===so||e.key===Yl){this.parentMenu.toggleOpen(),e.preventDefault();return}e.key===Ml&&(this.parentMenu.onOpen(),e.preventDefault())}};#e=F(()=>{if(this.parentMenu.opts.open.current&&this.parentMenu.contentId.current)return this.parentMenu.contentId.current});#t=F(()=>({id:this.opts.id.current,disabled:this.opts.disabled.current,"aria-haspopup":"menu","aria-expanded":Gc(this.parentMenu.opts.open.current),"aria-controls":p(this.#e),"data-disabled":Pi(this.opts.disabled.current),"data-state":dl(this.parentMenu.opts.open.current),[this.parentMenu.root.getBitsAttr("trigger")]:"",onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown,...this.attachment}));get props(){return p(this.#t)}set props(e){k(this.#t,e)}}class RZ{static create(e){const r=Ip.get();return Ip.set(new RS(e,r.root,r))}}globalThis.bitsDismissableLayers??=new Map;class nN{static create(e){return new nN(e)}opts;#e;#t;#r={pointerdown:!1};#n=!1;#i=!1;#a=void 0;#s;#o=Rr;constructor(e){this.opts=e,this.#t=e.interactOutsideBehavior,this.#e=e.onInteractOutside,this.#s=e.onFocusOutside,It(()=>{this.#a=KB(this.opts.ref.current)});let r=Rr;const n=()=>{this.#g(),globalThis.bitsDismissableLayers.delete(this),this.#u.destroy(),r()};nn([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return BO(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),r(),r=this.#c())}),n}),nu(()=>{this.#g.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#u.destroy(),this.#o(),r()})}#l=e=>{e.defaultPrevented||this.opts.ref.current&&no(()=>{!this.opts.ref.current||this.#h(e.target)||e.target&&!this.#i&&this.#s.current?.(e)})};#c(){return Dc(Kr(this.#a,"pointerdown",Dc(this.#m,this.#p),{capture:!0}),Kr(this.#a,"pointerdown",Dc(this.#f,this.#u)),Kr(this.#a,"focusin",this.#l))}#d=e=>{let r=e;r.defaultPrevented&&(r=FD(e)),this.#e.current(e)};#u=kD(e=>{if(!this.opts.ref.current){this.#o();return}const r=this.opts.isValidEvent.current(e,this.opts.ref.current)||IZ(e,this.opts.ref.current);if(!this.#n||this.#S()||!r){this.#o();return}let n=e;if(n.defaultPrevented&&(n=FD(n)),this.#t.current!=="close"&&this.#t.current!=="defer-otherwise-close"){this.#o();return}e.pointerType==="touch"?(this.#o(),this.#o=Kr(this.#a,"click",this.#d,{once:!0})):this.#e.current(n)},10);#m=e=>{this.#r[e.type]=!0};#f=e=>{this.#r[e.type]=!1};#p=()=>{this.opts.ref.current&&(this.#n=NZ(this.opts.ref.current))};#h=e=>this.opts.ref.current?WB(this.opts.ref.current,e):!1;#g=kD(()=>{for(const e in this.#r)this.#r[e]=!1;this.#n=!1},20);#S(){return Object.values(this.#r).some(Boolean)}#_=()=>{this.#i=!0};#E=()=>{this.#i=!1};props={onfocuscapture:this.#_,onblurcapture:this.#E}}function OZ(t=[...globalThis.bitsDismissableLayers]){return t.findLast(([e,{current:r}])=>r==="close"||r==="ignore")}function NZ(t){const e=[...globalThis.bitsDismissableLayers],r=OZ(e);if(r)return r[0].opts.ref.current===t;const[n]=e[0];return n.opts.ref.current===t}function IZ(t,e){const r=t.target;if(!VB(r))return!1;const n=!!r.closest(`[${CZ}]`);if("button"in t&&t.button>0&&!n)return!1;if("button"in t&&t.button===0&&n)return!0;const a=!!e.closest(`[${wZ}]`);return n&&a?!1:KB(r).documentElement.contains(r)&&!WB(e,r)&&zX(t,e)}function FD(t){const e=t.currentTarget,r=t.target;let n;t instanceof PointerEvent?n=new PointerEvent(t.type,t):n=new PointerEvent("pointerdown",t);let a=!1;return new Proxy(n,{get:(s,o)=>o==="currentTarget"?e:o==="target"?r:o==="preventDefault"?()=>{a=!0,typeof s.preventDefault=="function"&&s.preventDefault()}:o==="defaultPrevented"?a:o in s?s[o]:t[o]})}function aN(t,e){ye(e,!0);let r=V(e,"interactOutsideBehavior",3,"close"),n=V(e,"onInteractOutside",3,Rr),a=V(e,"onFocusOutside",3,Rr),i=V(e,"isValidEvent",3,()=>!1);const s=nN.create({id:Pe(()=>e.id),interactOutsideBehavior:Pe(()=>r()),onInteractOutside:Pe(()=>n()),enabled:Pe(()=>e.enabled),onFocusOutside:Pe(()=>a()),isValidEvent:Pe(()=>i()),ref:e.ref});var o=se(),l=L(o);De(l,()=>e.children??Ge,()=>({props:s.props})),C(t,o),Te()}globalThis.bitsEscapeLayers??=new Map;class iN{static create(e){return new iN(e)}opts;domContext;constructor(e){this.opts=e,this.domContext=new au(this.opts.ref);let r=Rr;nn(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),r=this.#e()),()=>{r(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>Kr(this.domContext.getDocument(),"keydown",this.#t,{passive:!1});#t=e=>{if(e.key!==gX||!xZ(this))return;const r=new KeyboardEvent(e.type,e);e.preventDefault();const n=this.opts.escapeKeydownBehavior.current;n!=="close"&&n!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(r)}}function xZ(t){const e=[...globalThis.bitsEscapeLayers],r=e.findLast(([a,{current:i}])=>i==="close"||i==="ignore");if(r)return r[0]===t;const[n]=e[0];return n===t}function sN(t,e){ye(e,!0);let r=V(e,"escapeKeydownBehavior",3,"close"),n=V(e,"onEscapeKeydown",3,Rr);iN.create({escapeKeydownBehavior:Pe(()=>r()),onEscapeKeydown:Pe(()=>n()),enabled:Pe(()=>e.enabled),ref:e.ref});var a=se(),i=L(a);De(i,()=>e.children??Ge),C(t,a),Te()}class oN{static instance;#e=us([]);#t=new WeakMap;#r=new WeakMap;static getInstance(){return this.instance||(this.instance=new oN),this.instance}register(e){const r=this.getActive();r&&r!==e&&r.pause();const n=document.activeElement;n&&n!==document.body&&this.#r.set(e,n),this.#e.current=this.#e.current.filter(a=>a!==e),this.#e.current.unshift(e)}unregister(e){this.#e.current=this.#e.current.filter(n=>n!==e);const r=this.getActive();r&&r.resume()}getActive(){return this.#e.current[0]}setFocusMemory(e,r){this.#t.set(e,r)}getFocusMemory(e){return this.#t.get(e)}isActiveScope(e){return this.getActive()===e}setPreFocusMemory(e,r){this.#r.set(e,r)}getPreFocusMemory(e){return this.#r.get(e)}clearPreFocusMemory(e){this.#r.delete(e)}}class lN{#e=!1;#t=null;#r=oN.getInstance();#n=[];#i;constructor(e){this.#i=e}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#a(){for(const e of this.#n)e();this.#n=[]}mount(e){this.#t&&this.unmount(),this.#t=e,this.#r.register(this),this.#l(),this.#s()}unmount(){this.#t&&(this.#a(),this.#o(),this.#r.unregister(this),this.#r.clearPreFocusMemory(this),this.#t=null)}#s(){if(!this.#t)return;const e=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(e),e.defaultPrevented||requestAnimationFrame(()=>{if(!this.#t)return;const r=this.#d();r?(r.focus(),this.#r.setFocusMemory(this,r)):this.#t.focus()})}#o(){const e=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(e),!e.defaultPrevented){const r=this.#r.getPreFocusMemory(this);if(r&&document.contains(r))try{r.focus()}catch{document.body.focus()}}}#l(){if(!this.#t||!this.#i.trap.current)return;const e=this.#t,r=e.ownerDocument,n=s=>{if(this.#e||!this.#r.isActiveScope(this))return;const o=s.target;if(!o)return;if(e.contains(o))this.#r.setFocusMemory(this,o);else{const c=this.#r.getFocusMemory(this);if(c&&e.contains(c)&&iU(c))s.preventDefault(),c.focus();else{const u=this.#d(),d=this.#u()[0];(u||d||e).focus()}}},a=s=>{if(!this.#i.loop||this.#e||s.key!=="Tab"||!this.#r.isActiveScope(this))return;const o=this.#c();if(o.length===0)return;const l=o[0],c=o[o.length-1];!s.shiftKey&&r.activeElement===c?(s.preventDefault(),l.focus()):s.shiftKey&&r.activeElement===l&&(s.preventDefault(),c.focus())};this.#n.push(Kr(r,"focusin",n,{capture:!0}),Kr(e,"keydown",a));const i=new MutationObserver(()=>{const s=this.#r.getFocusMemory(this);if(s&&!e.contains(s)){const o=this.#d(),l=this.#u()[0],c=o||l;c?(c.focus(),this.#r.setFocusMemory(this,c)):e.focus()}});i.observe(e,{childList:!0,subtree:!0}),this.#n.push(()=>i.disconnect())}#c(){return this.#t?nU(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#d(){return this.#c()[0]||null}#u(){return this.#t?aU(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(e){let r=null;return nn([()=>e.ref.current,()=>e.enabled.current],([n,a])=>{n&&a?(r||(r=new lN(e)),r.mount(n)):r&&(r.unmount(),r=null)}),nu(()=>{r?.unmount()}),{get props(){return{tabindex:-1}}}}}function cN(t,e){ye(e,!0);let r=V(e,"enabled",3,!1),n=V(e,"trapFocus",3,!1),a=V(e,"loop",3,!1),i=V(e,"onCloseAutoFocus",3,Rr),s=V(e,"onOpenAutoFocus",3,Rr);const o=lN.use({enabled:Pe(()=>r()),trap:Pe(()=>n()),loop:a(),onCloseAutoFocus:Pe(()=>i()),onOpenAutoFocus:Pe(()=>s()),ref:e.ref});var l=se(),c=L(l);De(c,()=>e.focusScope??Ge,()=>({props:o.props})),C(t,l),Te()}globalThis.bitsTextSelectionLayers??=new Map;class uN{static create(e){return new uN(e)}opts;domContext;#e=Rr;constructor(e){this.opts=e,this.domContext=new au(e.ref);let r=Rr;nn(()=>this.opts.enabled.current,n=>(n&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),r(),r=this.#t()),()=>{r(),this.#n(),globalThis.bitsTextSelectionLayers.delete(this)}))}#t(){return Dc(Kr(this.domContext.getDocument(),"pointerdown",this.#r),Kr(this.domContext.getDocument(),"pointerup",kB(this.#n,this.opts.onPointerUp.current)))}#r=e=>{const r=this.opts.ref.current,n=e.target;!Lo(r)||!Lo(n)||!this.opts.enabled.current||!MZ(this)||!dX(r,n)||(this.opts.onPointerDown.current(e),!e.defaultPrevented&&(this.#e=DZ(r,this.domContext.getDocument().body)))};#n=()=>{this.#e(),this.#e=Rr}}const BD=t=>t.style.userSelect||t.style.webkitUserSelect;function DZ(t,e){const r=BD(e),n=BD(t);return i_(e,"none"),i_(t,"text"),()=>{i_(e,r),i_(t,n)}}function i_(t,e){t.style.userSelect=e,t.style.webkitUserSelect=e}function MZ(t){const e=[...globalThis.bitsTextSelectionLayers];if(!e.length)return!1;const r=e.at(-1);return r?r[0]===t:!1}function dN(t,e){ye(e,!0);let r=V(e,"preventOverflowTextSelection",3,!0),n=V(e,"onPointerDown",3,Rr),a=V(e,"onPointerUp",3,Rr);uN.create({id:Pe(()=>e.id),onPointerDown:Pe(()=>n()),onPointerUp:Pe(()=>a()),enabled:Pe(()=>e.enabled&&r()),ref:e.ref});var i=se(),s=L(i);De(s,()=>e.children??Ge),C(t,i),Te()}globalThis.bitsIdCounter??={current:0};function tm(t="bits"){return globalThis.bitsIdCounter.current++,`${t}-${globalThis.bitsIdCounter.current}`}class kZ{#e;#t=0;#r=_e();#n;constructor(e){this.#e=e}#i(){this.#t-=1,this.#n&&this.#t<=0&&(this.#n(),k(this.#r,void 0),this.#n=void 0)}get(...e){return this.#t+=1,p(this.#r)===void 0&&(this.#n=Xf(()=>{k(this.#r,this.#e(...e),!0)})),It(()=>()=>{this.#i()}),p(this.#r)}}const v1=new Ii;let s_=_e(null),_v=null,ym=null,Tm=!1;const UD=Pe(()=>{for(const t of v1.values())if(t)return!0;return!1});let bv=null;const PZ=new kZ(()=>{function t(){document.body.setAttribute("style",p(s_)??""),document.body.style.removeProperty("--scrollbar-width"),rR&&_v?.(),k(s_,null)}function e(){ym!==null&&(window.clearTimeout(ym),ym=null)}function r(a,i){e(),Tm=!0,bv=Date.now();const s=bv,o=()=>{ym=null,bv===s&&(cU(v1)?Tm=!1:(Tm=!1,i()))},l=a===null?24:a;ym=window.setTimeout(o,l)}function n(){p(s_)===null&&v1.size===0&&!Tm&&k(s_,document.body.getAttribute("style"),!0)}return nn(()=>UD.current,()=>{if(!UD.current)return;n(),Tm=!1;const a=getComputedStyle(document.documentElement),i=getComputedStyle(document.body),s=a.scrollbarGutter?.includes("stable")||i.scrollbarGutter?.includes("stable"),o=window.innerWidth-document.documentElement.clientWidth,c={padding:Number.parseInt(i.paddingRight??"0",10)+o,margin:Number.parseInt(i.marginRight??"0",10)};o>0&&!s&&(document.body.style.paddingRight=`${c.padding}px`,document.body.style.marginRight=`${c.margin}px`,document.body.style.setProperty("--scrollbar-width",`${o}px`)),document.body.style.overflow="hidden",rR&&(_v=Kr(document,"touchmove",u=>{u.target===document.documentElement&&(u.touches.length>1||u.preventDefault())},{passive:!1})),no(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),nu(()=>()=>{_v?.()}),{get lockMap(){return v1},resetBodyStyle:t,scheduleCleanupIfNoNewLocks:r,cancelPendingCleanup:e,ensureInitialStyleCaptured:n}});class LZ{#e=tm();#t;#r=()=>null;#n;locked;constructor(e,r=()=>null){this.#t=e,this.#r=r,this.#n=PZ.get(),this.#n&&(this.#n.cancelPendingCleanup(),this.#n.ensureInitialStyleCaptured(),this.#n.lockMap.set(this.#e,this.#t??!1),this.locked=Pe(()=>this.#n.lockMap.get(this.#e)??!1,n=>this.#n.lockMap.set(this.#e,n)),nu(()=>{if(this.#n.lockMap.delete(this.#e),cU(this.#n.lockMap))return;const n=this.#r();this.#n.scheduleCleanupIfNoNewLocks(n,()=>{this.#n.resetBodyStyle()})}))}}function cU(t){for(const[e,r]of t)if(r)return!0;return!1}function xp(t,e){ye(e,!0);let r=V(e,"preventScroll",3,!0),n=V(e,"restoreScrollDelay",3,null);r()&&new LZ(r(),()=>n()),Te()}var FZ=q(" ",1),BZ=q("
",1);function UZ(t,e){const r=In();ye(e,!0);let n=V(e,"id",19,()=>xn(r)),a=V(e,"ref",15,null),i=V(e,"forceMount",3,!1),s=V(e,"interactOutsideBehavior",3,"ignore"),o=V(e,"onCloseAutoFocus",3,Rr),l=V(e,"onEscapeKeydown",3,Rr),c=V(e,"onOpenAutoFocus",3,Rr),u=V(e,"onInteractOutside",3,Rr),d=V(e,"preventScroll",3,!0),h=V(e,"trapFocus",3,!0),m=V(e,"restoreScrollDelay",3,null),f=Ve(e,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","interactOutsideBehavior","onCloseAutoFocus","onEscapeKeydown","onOpenAutoFocus","onInteractOutside","preventScroll","trapFocus","restoreScrollDelay"]);const g=wS.create({id:Pe(()=>n()),ref:Pe(()=>a(),y=>a(y))}),b=F(()=>Er(f,g.props));var _=se(),S=L(_);{var E=y=>{cN(y,{get ref(){return g.opts.ref},loop:!0,get trapFocus(){return h()},get enabled(){return g.root.opts.open.current},get onCloseAutoFocus(){return o()},onOpenAutoFocus:T=>{c()(T),!T.defaultPrevented&&(T.preventDefault(),BO(0,()=>g.opts.ref.current?.focus()))},focusScope:(T,w)=>{let A=()=>w?.().props;sN(T,ot(()=>p(b),{get enabled(){return g.root.opts.open.current},get ref(){return g.opts.ref},onEscapeKeydown:I=>{l()(I),!I.defaultPrevented&&g.root.handleClose()},children:(I,x)=>{aN(I,ot(()=>p(b),{get ref(){return g.opts.ref},get enabled(){return g.root.opts.open.current},get interactOutsideBehavior(){return s()},onInteractOutside:D=>{u()(D),!D.defaultPrevented&&g.root.handleClose()},children:(D,$)=>{dN(D,ot(()=>p(b),{get ref(){return g.opts.ref},get enabled(){return g.root.opts.open.current},children:(H,G)=>{var K=se(),z=L(K);{var re=ie=>{var M=FZ(),B=L(M);{var J=O=>{xp(O,{get preventScroll(){return d()},get restoreScrollDelay(){return m()}})};le(B,O=>{g.root.opts.open.current&&O(J)})}var N=te(B,2);{let O=F(()=>({props:Er(p(b),A()),...g.snippetProps}));De(N,()=>e.child,()=>p(O))}C(ie,M)},W=ie=>{var M=BZ(),B=L(M);xp(B,{get preventScroll(){return d()}});var J=te(B,2);$t(J,O=>({...O}),[()=>Er(p(b),A())]);var N=j(J);De(N,()=>e.children??Ge),Y(J),C(ie,M)};le(z,ie=>{e.child?ie(re):ie(W,!1)})}C(H,K)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};le(S,y=>{(g.shouldRender||i())&&y(E)})}C(t,_),Te()}var GZ=q("
");function NS(t,e){const r=In();ye(e,!0);let n=V(e,"id",19,()=>xn(r)),a=V(e,"forceMount",3,!1),i=V(e,"ref",15,null),s=Ve(e,["$$slots","$$events","$$legacy","id","forceMount","child","children","ref"]);const o=YO.create({id:Pe(()=>n()),ref:Pe(()=>i(),h=>i(h))}),l=F(()=>Er(s,o.props));var c=se(),u=L(c);{var d=h=>{var m=se(),f=L(m);{var g=_=>{var S=se(),E=L(S);{let y=F(()=>({props:Er(p(l)),...o.snippetProps}));De(E,()=>e.child,()=>p(y))}C(_,S)},b=_=>{var S=GZ();$t(S,y=>({...y}),[()=>Er(p(l))]);var E=j(S);De(E,()=>e.children??Ge,()=>o.snippetProps),Y(S),C(_,S)};le(f,_=>{e.child?_(g):_(b,!1)})}C(h,m)};le(u,h=>{(o.shouldRender||a())&&h(d)})}C(t,c),Te()}var qZ=q("
");function hN(t,e){const r=In();ye(e,!0);let n=V(e,"id",19,()=>xn(r)),a=V(e,"ref",15,null),i=Ve(e,["$$slots","$$events","$$legacy","id","children","child","ref"]);const s=HO.create({id:Pe(()=>n()),ref:Pe(()=>a(),h=>a(h))}),o=F(()=>Er(i,s.props));var l=se(),c=L(l);{var u=h=>{var m=se(),f=L(m);De(f,()=>e.child,()=>({props:p(o)})),C(h,m)},d=h=>{var m=qZ();$t(m,()=>({...p(o)}));var f=j(m);De(f,()=>e.children??Ge),Y(m),C(h,m)};le(c,h=>{e.child?h(u):h(d,!1)})}C(t,l),Te()}const zZ=jl({component:"checkbox",parts:["root","group","group-label","input"]}),$Z=new ka("Checkbox.Group"),uU=new ka("Checkbox.Root");class pN{static create(e,r=null){return uU.set(new pN(e,r))}opts;group;#e=F(()=>this.group&&this.group.opts.name.current?this.group.opts.name.current:this.opts.name.current);get trueName(){return p(this.#e)}set trueName(e){k(this.#e,e)}#t=F(()=>this.group&&this.group.opts.required.current?!0:this.opts.required.current);get trueRequired(){return p(this.#t)}set trueRequired(e){k(this.#t,e)}#r=F(()=>this.group&&this.group.opts.disabled.current?!0:this.opts.disabled.current);get trueDisabled(){return p(this.#r)}set trueDisabled(e){k(this.#r,e)}#n=F(()=>this.group&&this.group.opts.readonly.current?!0:this.opts.readonly.current);get trueReadonly(){return p(this.#n)}set trueReadonly(e){k(this.#n,e)}attachment;constructor(e,r){this.opts=e,this.group=r,this.attachment=vn(this.opts.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),nn.pre([()=>sp(this.group?.opts.value.current),()=>this.opts.value.current],([n,a])=>{!n||!a||(this.opts.checked.current=n.includes(a))}),nn.pre(()=>this.opts.checked.current,n=>{this.group&&(n?this.group?.addValue(this.opts.value.current):this.group?.removeValue(this.opts.value.current))})}onkeydown(e){if(!(this.trueDisabled||this.trueReadonly)){if(e.key===Yl){e.preventDefault(),this.opts.type.current==="submit"&&e.currentTarget.closest("form")?.requestSubmit();return}e.key===so&&(e.preventDefault(),this.#i())}}#i(){this.opts.indeterminate.current?(this.opts.indeterminate.current=!1,this.opts.checked.current=!0):this.opts.checked.current=!this.opts.checked.current}onclick(e){if(!(this.trueDisabled||this.trueReadonly)){if(this.opts.type.current==="submit"){this.#i();return}e.preventDefault(),this.#i()}}#a=F(()=>({checked:this.opts.checked.current,indeterminate:this.opts.indeterminate.current}));get snippetProps(){return p(this.#a)}set snippetProps(e){k(this.#a,e)}#s=F(()=>({id:this.opts.id.current,role:"checkbox",type:this.opts.type.current,disabled:this.trueDisabled,"aria-checked":HB(this.opts.checked.current,this.opts.indeterminate.current),"aria-required":Gc(this.trueRequired),"aria-readonly":Gc(this.trueReadonly),"data-disabled":Pi(this.trueDisabled),"data-readonly":Pi(this.trueReadonly),"data-state":HZ(this.opts.checked.current,this.opts.indeterminate.current),[zZ.root]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return p(this.#s)}set props(e){k(this.#s,e)}}class mN{static create(){return new mN(uU.get())}root;#e=F(()=>this.root.group?!!(this.root.opts.value.current!==void 0&&this.root.group.opts.value.current.includes(this.root.opts.value.current)):this.root.opts.checked.current);get trueChecked(){return p(this.#e)}set trueChecked(e){k(this.#e,e)}#t=F(()=>!!this.root.trueName);get shouldRender(){return p(this.#t)}set shouldRender(e){k(this.#t,e)}constructor(e){this.root=e,this.onfocus=this.onfocus.bind(this)}onfocus(e){Lo(this.root.opts.ref.current)&&this.root.opts.ref.current.focus()}#r=F(()=>({type:"checkbox",checked:this.root.opts.checked.current===!0,disabled:this.root.trueDisabled,required:this.root.trueRequired,name:this.root.trueName,value:this.root.opts.value.current,readonly:this.root.trueReadonly,onfocus:this.onfocus}));get props(){return p(this.#r)}set props(e){k(this.#r,e)}}function HZ(t,e){return e?"indeterminate":t?"checked":"unchecked"}hW();var YZ=q(""),VZ=q("");function fN(t,e){ye(e,!0);let r=V(e,"value",15),n=Ve(e,["$$slots","$$events","$$legacy","value"]);const a=F(()=>Er(n,{"aria-hidden":"true",tabindex:-1,style:KQ}));var i=se(),s=L(i);{var o=c=>{var u=YZ();$t(u,()=>({...p(a),value:r()}),void 0,void 0,void 0,void 0,!0),C(c,u)},l=c=>{var u=VZ();$t(u,()=>({...p(a)}),void 0,void 0,void 0,void 0,!0),bf(u,r),C(c,u)};le(s,c=>{p(a).type==="checkbox"?c(o):c(l,!1)})}C(t,i),Te()}function WZ(t,e){ye(e,!1);const r=mN.create();fO();var n=se(),a=L(n);{var i=s=>{fN(s,ot(()=>r.props))};le(a,s=>{r.shouldRender&&s(i)})}C(t,n),Te()}var KZ=q(""),jZ=q(" ",1);function QZ(t,e){const r=In();ye(e,!0);let n=V(e,"checked",15,!1),a=V(e,"ref",15,null),i=V(e,"disabled",3,!1),s=V(e,"required",3,!1),o=V(e,"name",3,void 0),l=V(e,"value",3,"on"),c=V(e,"id",19,()=>xn(r)),u=V(e,"indeterminate",15,!1),d=V(e,"type",3,"button"),h=Ve(e,["$$slots","$$events","$$legacy","checked","ref","onCheckedChange","children","disabled","required","name","value","id","indeterminate","onIndeterminateChange","child","type","readonly"]);const m=$Z.getOr(null);m&&l()&&(m.opts.value.current.includes(l())?n(!0):n(!1)),nn.pre(()=>l(),()=>{m&&l()&&(m.opts.value.current.includes(l())?n(!0):n(!1))});const f=pN.create({checked:Pe(()=>n(),v=>{n(v),e.onCheckedChange?.(v)}),disabled:Pe(()=>i()??!1),required:Pe(()=>s()),name:Pe(()=>o()),value:Pe(()=>l()),id:Pe(()=>c()),ref:Pe(()=>a(),v=>a(v)),indeterminate:Pe(()=>u(),v=>{u(v),e.onIndeterminateChange?.(v)}),type:Pe(()=>d()),readonly:Pe(()=>!!e.readonly)},m),g=F(()=>Er({...h},f.props));var b=jZ(),_=L(b);{var S=v=>{var T=se(),w=L(T);{let A=F(()=>({props:p(g),...f.snippetProps}));De(w,()=>e.child,()=>p(A))}C(v,T)},E=v=>{var T=KZ();$t(T,()=>({...p(g)}));var w=j(T);De(w,()=>e.children??Ge,()=>f.snippetProps),Y(T),C(v,T)};le(_,v=>{e.child?v(S):v(E,!1)})}var y=te(_,2);WZ(y,{}),C(t,b),Te()}const gN=jl({component:"collapsible",parts:["root","content","trigger"]}),_N=new ka("Collapsible.Root");class bN{static create(e){return _N.set(new bN(e))}opts;attachment;#e=_e(null);get contentNode(){return p(this.#e)}set contentNode(e){k(this.#e,e,!0)}contentPresence;#t=_e(void 0);get contentId(){return p(this.#t)}set contentId(e){k(this.#t,e,!0)}constructor(e){this.opts=e,this.toggleOpen=this.toggleOpen.bind(this),this.attachment=vn(this.opts.ref),this.contentPresence=new Bu({ref:Pe(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}})}toggleOpen(){this.opts.open.current=!this.opts.open.current}#r=F(()=>({id:this.opts.id.current,"data-state":dl(this.opts.open.current),"data-disabled":Pi(this.opts.disabled.current),[gN.root]:"",...this.attachment}));get props(){return p(this.#r)}set props(e){k(this.#r,e)}}class SN{static create(e){return new SN(e,_N.get())}opts;root;attachment;#e=F(()=>this.opts.hiddenUntilFound.current?this.root.opts.open.current:this.opts.forceMount.current||this.root.opts.open.current);get present(){return p(this.#e)}set present(e){k(this.#e,e)}#t;#r=_e(!1);#n=_e(0);#i=_e(0);constructor(e,r){this.opts=e,this.root=r,k(this.#r,r.opts.open.current,!0),this.root.contentId=this.opts.id.current,this.attachment=vn(this.opts.ref,n=>this.root.contentNode=n),nn.pre(()=>this.opts.id.current,n=>{this.root.contentId=n}),$i(()=>{const n=requestAnimationFrame(()=>{k(this.#r,!1)});return()=>{cancelAnimationFrame(n)}}),nn.pre([()=>this.opts.ref.current,()=>this.opts.hiddenUntilFound.current],([n,a])=>!n||!a?void 0:Kr(n,"beforematch",()=>{this.root.opts.open.current||requestAnimationFrame(()=>{this.root.opts.open.current=!0})})),nn([()=>this.opts.ref.current,()=>this.present],([n])=>{n&&no(()=>{if(!this.opts.ref.current)return;this.#t=this.#t||{transitionDuration:n.style.transitionDuration,animationName:n.style.animationName},n.style.transitionDuration="0s",n.style.animationName="none";const a=n.getBoundingClientRect();if(k(this.#i,a.height,!0),k(this.#n,a.width,!0),!p(this.#r)){const{animationName:i,transitionDuration:s}=this.#t;n.style.transitionDuration=s,n.style.animationName=i}})})}get shouldRender(){return this.root.contentPresence.shouldRender}#a=F(()=>({open:this.root.opts.open.current}));get snippetProps(){return p(this.#a)}set snippetProps(e){k(this.#a,e)}#s=F(()=>({id:this.opts.id.current,style:{"--bits-collapsible-content-height":p(this.#i)?`${p(this.#i)}px`:void 0,"--bits-collapsible-content-width":p(this.#n)?`${p(this.#n)}px`:void 0},hidden:this.opts.hiddenUntilFound.current&&!this.root.opts.open.current?"until-found":void 0,"data-state":dl(this.root.opts.open.current),"data-disabled":Pi(this.root.opts.disabled.current),[gN.content]:"",...this.opts.hiddenUntilFound.current&&!this.shouldRender?{}:{hidden:this.opts.hiddenUntilFound.current?!this.shouldRender:this.opts.forceMount.current?void 0:!this.shouldRender},...this.attachment}));get props(){return p(this.#s)}set props(e){k(this.#s,e)}}class EN{static create(e){return new EN(e,_N.get())}opts;root;attachment;#e=F(()=>this.opts.disabled.current||this.root.opts.disabled.current);constructor(e,r){this.opts=e,this.root=r,this.attachment=vn(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){if(!p(this.#e)){if(e.button!==0)return e.preventDefault();this.root.toggleOpen()}}onkeydown(e){p(this.#e)||(e.key===so||e.key===Yl)&&(e.preventDefault(),this.root.toggleOpen())}#t=F(()=>({id:this.opts.id.current,type:"button",disabled:p(this.#e),"aria-controls":this.root.contentId,"aria-expanded":Gc(this.root.opts.open.current),"data-state":dl(this.root.opts.open.current),"data-disabled":Pi(p(this.#e)),[gN.trigger]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return p(this.#t)}set props(e){k(this.#t,e)}}var XZ=q("
");function ZZ(t,e){const r=In();ye(e,!0);let n=V(e,"id",19,()=>xn(r)),a=V(e,"ref",15,null),i=V(e,"open",15,!1),s=V(e,"disabled",3,!1),o=V(e,"onOpenChange",3,Rr),l=V(e,"onOpenChangeComplete",3,Rr),c=Ve(e,["$$slots","$$events","$$legacy","children","child","id","ref","open","disabled","onOpenChange","onOpenChangeComplete"]);const u=bN.create({open:Pe(()=>i(),b=>{i(b),o()(b)}),disabled:Pe(()=>s()),id:Pe(()=>n()),ref:Pe(()=>a(),b=>a(b)),onOpenChangeComplete:Pe(()=>l())}),d=F(()=>Er(c,u.props));var h=se(),m=L(h);{var f=b=>{var _=se(),S=L(_);De(S,()=>e.child,()=>({props:p(d)})),C(b,_)},g=b=>{var _=XZ();$t(_,()=>({...p(d)}));var S=j(_);De(S,()=>e.children??Ge),Y(_),C(b,_)};le(m,b=>{e.child?b(f):b(g,!1)})}C(t,h),Te()}var JZ=q("
");function eJ(t,e){const r=In();ye(e,!0);let n=V(e,"ref",15,null),a=V(e,"forceMount",3,!1),i=V(e,"hiddenUntilFound",3,!1),s=V(e,"id",19,()=>xn(r)),o=Ve(e,["$$slots","$$events","$$legacy","child","ref","forceMount","hiddenUntilFound","children","id"]);const l=SN.create({id:Pe(()=>s()),forceMount:Pe(()=>a()),hiddenUntilFound:Pe(()=>i()),ref:Pe(()=>n(),f=>n(f))}),c=F(()=>Er(o,l.props));var u=se(),d=L(u);{var h=f=>{var g=se(),b=L(g);{let _=F(()=>({...l.snippetProps,props:p(c)}));De(b,()=>e.child,()=>p(_))}C(f,g)},m=f=>{var g=JZ();$t(g,()=>({...p(c)}));var b=j(g);De(b,()=>e.children??Ge),Y(g),C(f,g)};le(d,f=>{e.child?f(h):f(m,!1)})}C(t,u),Te()}var tJ=q("");function rJ(t,e){const r=In();ye(e,!0);let n=V(e,"ref",15,null),a=V(e,"id",19,()=>xn(r)),i=V(e,"disabled",3,!1),s=Ve(e,["$$slots","$$events","$$legacy","children","child","ref","id","disabled"]);const o=EN.create({id:Pe(()=>a()),ref:Pe(()=>n(),m=>n(m)),disabled:Pe(()=>i())}),l=F(()=>Er(s,o.props));var c=se(),u=L(c);{var d=m=>{var f=se(),g=L(f);De(g,()=>e.child,()=>({props:p(l)})),C(m,f)},h=m=>{var f=tJ();$t(f,()=>({...p(l)}));var g=j(f);De(g,()=>e.children??Ge),Y(f),C(m,f)};le(u,m=>{e.child?m(d):m(h,!1)})}C(t,c),Te()}const nJ=["top","right","bottom","left"],Uu=Math.min,Xs=Math.max,tb=Math.round,o_=Math.floor,Ul=t=>({x:t,y:t}),aJ={left:"right",right:"left",bottom:"top",top:"bottom"},iJ={start:"end",end:"start"};function iR(t,e,r){return Xs(t,Uu(e,r))}function zc(t,e){return typeof t=="function"?t(e):t}function $c(t){return t.split("-")[0]}function rm(t){return t.split("-")[1]}function vN(t){return t==="x"?"y":"x"}function yN(t){return t==="y"?"height":"width"}const sJ=new Set(["top","bottom"]);function kl(t){return sJ.has($c(t))?"y":"x"}function TN(t){return vN(kl(t))}function oJ(t,e,r){r===void 0&&(r=!1);const n=rm(t),a=TN(t),i=yN(a);let s=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=rb(s)),[s,rb(s)]}function lJ(t){const e=rb(t);return[sR(t),e,sR(e)]}function sR(t){return t.replace(/start|end/g,e=>iJ[e])}const GD=["left","right"],qD=["right","left"],cJ=["top","bottom"],uJ=["bottom","top"];function dJ(t,e,r){switch(t){case"top":case"bottom":return r?e?qD:GD:e?GD:qD;case"left":case"right":return e?cJ:uJ;default:return[]}}function hJ(t,e,r,n){const a=rm(t);let i=dJ($c(t),r==="start",n);return a&&(i=i.map(s=>s+"-"+a),e&&(i=i.concat(i.map(sR)))),i}function rb(t){return t.replace(/left|right|bottom|top/g,e=>aJ[e])}function pJ(t){return{top:0,right:0,bottom:0,left:0,...t}}function dU(t){return typeof t!="number"?pJ(t):{top:t,right:t,bottom:t,left:t}}function nb(t){const{x:e,y:r,width:n,height:a}=t;return{width:n,height:a,top:r,left:e,right:e+n,bottom:r+a,x:e,y:r}}function zD(t,e,r){let{reference:n,floating:a}=t;const i=kl(e),s=TN(e),o=yN(s),l=$c(e),c=i==="y",u=n.x+n.width/2-a.width/2,d=n.y+n.height/2-a.height/2,h=n[o]/2-a[o]/2;let m;switch(l){case"top":m={x:u,y:n.y-a.height};break;case"bottom":m={x:u,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:d};break;case"left":m={x:n.x-a.width,y:d};break;default:m={x:n.x,y:n.y}}switch(rm(e)){case"start":m[s]-=h*(r&&c?-1:1);break;case"end":m[s]+=h*(r&&c?-1:1);break}return m}const mJ=async(t,e,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=r,o=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:a}),{x:u,y:d}=zD(c,n,l),h=n,m={},f=0;for(let g=0;g({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:a,rects:i,platform:s,elements:o,middlewareData:l}=e,{element:c,padding:u=0}=zc(t,e)||{};if(c==null)return{};const d=dU(u),h={x:r,y:n},m=TN(a),f=yN(m),g=await s.getDimensions(c),b=m==="y",_=b?"top":"left",S=b?"bottom":"right",E=b?"clientHeight":"clientWidth",y=i.reference[f]+i.reference[m]-h[m]-i.floating[f],v=h[m]-i.reference[m],T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let w=T?T[E]:0;(!w||!await(s.isElement==null?void 0:s.isElement(T)))&&(w=o.floating[E]||i.floating[f]);const A=y/2-v/2,I=w/2-g[f]/2-1,x=Uu(d[_],I),D=Uu(d[S],I),$=x,H=w-g[f]-D,G=w/2-g[f]/2+A,K=iR($,G,H),z=!l.arrow&&rm(a)!=null&&G!==K&&i.reference[f]/2-(G<$?x:D)-g[f]/2<0,re=z?G<$?G-$:G-H:0;return{[m]:h[m]+re,data:{[m]:K,centerOffset:G-K-re,...z&&{alignmentOffset:re}},reset:z}}}),gJ=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:a,middlewareData:i,rects:s,initialPlacement:o,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:g=!0,...b}=zc(t,e);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const _=$c(a),S=kl(o),E=$c(o)===o,y=await(l.isRTL==null?void 0:l.isRTL(c.floating)),v=h||(E||!g?[rb(o)]:lJ(o)),T=f!=="none";!h&&T&&v.push(...hJ(o,g,f,y));const w=[o,...v],A=await wf(e,b),I=[];let x=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&I.push(A[_]),d){const G=oJ(a,s,y);I.push(A[G[0]],A[G[1]])}if(x=[...x,{placement:a,overflows:I}],!I.every(G=>G<=0)){var D,$;const G=(((D=i.flip)==null?void 0:D.index)||0)+1,K=w[G];if(K&&(!(d==="alignment"?S!==kl(K):!1)||x.every(W=>W.overflows[0]>0&&kl(W.placement)===S)))return{data:{index:G,overflows:x},reset:{placement:K}};let z=($=x.filter(re=>re.overflows[0]<=0).sort((re,W)=>re.overflows[1]-W.overflows[1])[0])==null?void 0:$.placement;if(!z)switch(m){case"bestFit":{var H;const re=(H=x.filter(W=>{if(T){const ie=kl(W.placement);return ie===S||ie==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(ie=>ie>0).reduce((ie,M)=>ie+M,0)]).sort((W,ie)=>W[1]-ie[1])[0])==null?void 0:H[0];re&&(z=re);break}case"initialPlacement":z=o;break}if(a!==z)return{reset:{placement:z}}}return{}}}};function $D(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function HD(t){return nJ.some(e=>t[e]>=0)}const _J=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...a}=zc(t,e);switch(n){case"referenceHidden":{const i=await wf(e,{...a,elementContext:"reference"}),s=$D(i,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:HD(s)}}}case"escaped":{const i=await wf(e,{...a,altBoundary:!0}),s=$D(i,r.floating);return{data:{escapedOffsets:s,escaped:HD(s)}}}default:return{}}}}},hU=new Set(["left","top"]);async function bJ(t,e){const{placement:r,platform:n,elements:a}=t,i=await(n.isRTL==null?void 0:n.isRTL(a.floating)),s=$c(r),o=rm(r),l=kl(r)==="y",c=hU.has(s)?-1:1,u=i&&l?-1:1,d=zc(e,t);let{mainAxis:h,crossAxis:m,alignmentAxis:f}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return o&&typeof f=="number"&&(m=o==="end"?f*-1:f),l?{x:m*u,y:h*c}:{x:h*c,y:m*u}}const SJ=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:a,y:i,placement:s,middlewareData:o}=e,l=await bJ(e,t);return s===((r=o.offset)==null?void 0:r.placement)&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:a+l.x,y:i+l.y,data:{...l,placement:s}}}}},EJ=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:a}=e,{mainAxis:i=!0,crossAxis:s=!1,limiter:o={fn:b=>{let{x:_,y:S}=b;return{x:_,y:S}}},...l}=zc(t,e),c={x:r,y:n},u=await wf(e,l),d=kl($c(a)),h=vN(d);let m=c[h],f=c[d];if(i){const b=h==="y"?"top":"left",_=h==="y"?"bottom":"right",S=m+u[b],E=m-u[_];m=iR(S,m,E)}if(s){const b=d==="y"?"top":"left",_=d==="y"?"bottom":"right",S=f+u[b],E=f-u[_];f=iR(S,f,E)}const g=o.fn({...e,[h]:m,[d]:f});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[h]:i,[d]:s}}}}}},vJ=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:a,rects:i,middlewareData:s}=e,{offset:o=0,mainAxis:l=!0,crossAxis:c=!0}=zc(t,e),u={x:r,y:n},d=kl(a),h=vN(d);let m=u[h],f=u[d];const g=zc(o,e),b=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const E=h==="y"?"height":"width",y=i.reference[h]-i.floating[E]+b.mainAxis,v=i.reference[h]+i.reference[E]-b.mainAxis;mv&&(m=v)}if(c){var _,S;const E=h==="y"?"width":"height",y=hU.has($c(a)),v=i.reference[d]-i.floating[E]+(y&&((_=s.offset)==null?void 0:_[d])||0)+(y?0:b.crossAxis),T=i.reference[d]+i.reference[E]+(y?0:((S=s.offset)==null?void 0:S[d])||0)-(y?b.crossAxis:0);fT&&(f=T)}return{[h]:m,[d]:f}}}},yJ=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,n;const{placement:a,rects:i,platform:s,elements:o}=e,{apply:l=()=>{},...c}=zc(t,e),u=await wf(e,c),d=$c(a),h=rm(a),m=kl(a)==="y",{width:f,height:g}=i.floating;let b,_;d==="top"||d==="bottom"?(b=d,_=h===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(_=d,b=h==="end"?"top":"bottom");const S=g-u.top-u.bottom,E=f-u.left-u.right,y=Uu(g-u[b],S),v=Uu(f-u[_],E),T=!e.middlewareData.shift;let w=y,A=v;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(A=E),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(w=S),T&&!h){const x=Xs(u.left,0),D=Xs(u.right,0),$=Xs(u.top,0),H=Xs(u.bottom,0);m?A=f-2*(x!==0||D!==0?x+D:Xs(u.left,u.right)):w=g-2*($!==0||H!==0?$+H:Xs(u.top,u.bottom))}await l({...e,availableWidth:A,availableHeight:w});const I=await s.getDimensions(o.floating);return f!==I.width||g!==I.height?{reset:{rects:!0}}:{}}}};function IS(){return typeof window<"u"}function nm(t){return pU(t)?(t.nodeName||"").toLowerCase():"#document"}function oo(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ql(t){var e;return(e=(pU(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function pU(t){return IS()?t instanceof Node||t instanceof oo(t).Node:!1}function cl(t){return IS()?t instanceof Element||t instanceof oo(t).Element:!1}function Vl(t){return IS()?t instanceof HTMLElement||t instanceof oo(t).HTMLElement:!1}function YD(t){return!IS()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof oo(t).ShadowRoot}const TJ=new Set(["inline","contents"]);function sg(t){const{overflow:e,overflowX:r,overflowY:n,display:a}=ul(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!TJ.has(a)}const CJ=new Set(["table","td","th"]);function wJ(t){return CJ.has(nm(t))}const AJ=[":popover-open",":modal"];function xS(t){return AJ.some(e=>{try{return t.matches(e)}catch{return!1}})}const RJ=["transform","translate","scale","rotate","perspective"],OJ=["transform","translate","scale","rotate","perspective","filter"],NJ=["paint","layout","strict","content"];function CN(t){const e=wN(),r=cl(t)?ul(t):t;return RJ.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||OJ.some(n=>(r.willChange||"").includes(n))||NJ.some(n=>(r.contain||"").includes(n))}function IJ(t){let e=Gu(t);for(;Vl(e)&&!Dp(e);){if(CN(e))return e;if(xS(e))return null;e=Gu(e)}return null}function wN(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const xJ=new Set(["html","body","#document"]);function Dp(t){return xJ.has(nm(t))}function ul(t){return oo(t).getComputedStyle(t)}function DS(t){return cl(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Gu(t){if(nm(t)==="html")return t;const e=t.assignedSlot||t.parentNode||YD(t)&&t.host||Ql(t);return YD(e)?e.host:e}function mU(t){const e=Gu(t);return Dp(e)?t.ownerDocument?t.ownerDocument.body:t.body:Vl(e)&&sg(e)?e:mU(e)}function Af(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const a=mU(t),i=a===((n=t.ownerDocument)==null?void 0:n.body),s=oo(a);if(i){const o=oR(s);return e.concat(s,s.visualViewport||[],sg(a)?a:[],o&&r?Af(o):[])}return e.concat(a,Af(a,[],r))}function oR(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function fU(t){const e=ul(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const a=Vl(t),i=a?t.offsetWidth:r,s=a?t.offsetHeight:n,o=tb(r)!==i||tb(n)!==s;return o&&(r=i,n=s),{width:r,height:n,$:o}}function AN(t){return cl(t)?t:t.contextElement}function up(t){const e=AN(t);if(!Vl(e))return Ul(1);const r=e.getBoundingClientRect(),{width:n,height:a,$:i}=fU(e);let s=(i?tb(r.width):r.width)/n,o=(i?tb(r.height):r.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!o||!Number.isFinite(o))&&(o=1),{x:s,y:o}}const DJ=Ul(0);function gU(t){const e=oo(t);return!wN()||!e.visualViewport?DJ:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function MJ(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==oo(t)?!1:e}function ah(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const a=t.getBoundingClientRect(),i=AN(t);let s=Ul(1);e&&(n?cl(n)&&(s=up(n)):s=up(t));const o=MJ(i,r,n)?gU(i):Ul(0);let l=(a.left+o.x)/s.x,c=(a.top+o.y)/s.y,u=a.width/s.x,d=a.height/s.y;if(i){const h=oo(i),m=n&&cl(n)?oo(n):n;let f=h,g=oR(f);for(;g&&n&&m!==f;){const b=up(g),_=g.getBoundingClientRect(),S=ul(g),E=_.left+(g.clientLeft+parseFloat(S.paddingLeft))*b.x,y=_.top+(g.clientTop+parseFloat(S.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,d*=b.y,l+=E,c+=y,f=oo(g),g=oR(f)}}return nb({width:u,height:d,x:l,y:c})}function RN(t,e){const r=DS(t).scrollLeft;return e?e.left+r:ah(Ql(t)).left+r}function _U(t,e,r){r===void 0&&(r=!1);const n=t.getBoundingClientRect(),a=n.left+e.scrollLeft-(r?0:RN(t,n)),i=n.top+e.scrollTop;return{x:a,y:i}}function kJ(t){let{elements:e,rect:r,offsetParent:n,strategy:a}=t;const i=a==="fixed",s=Ql(n),o=e?xS(e.floating):!1;if(n===s||o&&i)return r;let l={scrollLeft:0,scrollTop:0},c=Ul(1);const u=Ul(0),d=Vl(n);if((d||!d&&!i)&&((nm(n)!=="body"||sg(s))&&(l=DS(n)),Vl(n))){const m=ah(n);c=up(n),u.x=m.x+n.clientLeft,u.y=m.y+n.clientTop}const h=s&&!d&&!i?_U(s,l,!0):Ul(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:r.y*c.y-l.scrollTop*c.y+u.y+h.y}}function PJ(t){return Array.from(t.getClientRects())}function LJ(t){const e=Ql(t),r=DS(t),n=t.ownerDocument.body,a=Xs(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Xs(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+RN(t);const o=-r.scrollTop;return ul(n).direction==="rtl"&&(s+=Xs(e.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:o}}function FJ(t,e){const r=oo(t),n=Ql(t),a=r.visualViewport;let i=n.clientWidth,s=n.clientHeight,o=0,l=0;if(a){i=a.width,s=a.height;const c=wN();(!c||c&&e==="fixed")&&(o=a.offsetLeft,l=a.offsetTop)}return{width:i,height:s,x:o,y:l}}const BJ=new Set(["absolute","fixed"]);function UJ(t,e){const r=ah(t,!0,e==="fixed"),n=r.top+t.clientTop,a=r.left+t.clientLeft,i=Vl(t)?up(t):Ul(1),s=t.clientWidth*i.x,o=t.clientHeight*i.y,l=a*i.x,c=n*i.y;return{width:s,height:o,x:l,y:c}}function VD(t,e,r){let n;if(e==="viewport")n=FJ(t,r);else if(e==="document")n=LJ(Ql(t));else if(cl(e))n=UJ(e,r);else{const a=gU(t);n={x:e.x-a.x,y:e.y-a.y,width:e.width,height:e.height}}return nb(n)}function bU(t,e){const r=Gu(t);return r===e||!cl(r)||Dp(r)?!1:ul(r).position==="fixed"||bU(r,e)}function GJ(t,e){const r=e.get(t);if(r)return r;let n=Af(t,[],!1).filter(o=>cl(o)&&nm(o)!=="body"),a=null;const i=ul(t).position==="fixed";let s=i?Gu(t):t;for(;cl(s)&&!Dp(s);){const o=ul(s),l=CN(s);!l&&o.position==="fixed"&&(a=null),(i?!l&&!a:!l&&o.position==="static"&&!!a&&BJ.has(a.position)||sg(s)&&!l&&bU(t,s))?n=n.filter(u=>u!==s):a=o,s=Gu(s)}return e.set(t,n),n}function qJ(t){let{element:e,boundary:r,rootBoundary:n,strategy:a}=t;const s=[...r==="clippingAncestors"?xS(e)?[]:GJ(e,this._c):[].concat(r),n],o=s[0],l=s.reduce((c,u)=>{const d=VD(e,u,a);return c.top=Xs(d.top,c.top),c.right=Uu(d.right,c.right),c.bottom=Uu(d.bottom,c.bottom),c.left=Xs(d.left,c.left),c},VD(e,o,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function zJ(t){const{width:e,height:r}=fU(t);return{width:e,height:r}}function $J(t,e,r){const n=Vl(e),a=Ql(e),i=r==="fixed",s=ah(t,!0,i,e);let o={scrollLeft:0,scrollTop:0};const l=Ul(0);function c(){l.x=RN(a)}if(n||!n&&!i)if((nm(e)!=="body"||sg(a))&&(o=DS(e)),n){const m=ah(e,!0,i,e);l.x=m.x+e.clientLeft,l.y=m.y+e.clientTop}else a&&c();i&&!n&&a&&c();const u=a&&!n&&!i?_U(a,o):Ul(0),d=s.left+o.scrollLeft-l.x-u.x,h=s.top+o.scrollTop-l.y-u.y;return{x:d,y:h,width:s.width,height:s.height}}function Sv(t){return ul(t).position==="static"}function WD(t,e){if(!Vl(t)||ul(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Ql(t)===r&&(r=r.ownerDocument.body),r}function SU(t,e){const r=oo(t);if(xS(t))return r;if(!Vl(t)){let a=Gu(t);for(;a&&!Dp(a);){if(cl(a)&&!Sv(a))return a;a=Gu(a)}return r}let n=WD(t,e);for(;n&&wJ(n)&&Sv(n);)n=WD(n,e);return n&&Dp(n)&&Sv(n)&&!CN(n)?r:n||IJ(t)||r}const HJ=async function(t){const e=this.getOffsetParent||SU,r=this.getDimensions,n=await r(t.floating);return{reference:$J(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function YJ(t){return ul(t).direction==="rtl"}const VJ={convertOffsetParentRelativeRectToViewportRelativeRect:kJ,getDocumentElement:Ql,getClippingRect:qJ,getOffsetParent:SU,getElementRects:HJ,getClientRects:PJ,getDimensions:zJ,getScale:up,isElement:cl,isRTL:YJ};function EU(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function WJ(t,e){let r=null,n;const a=Ql(t);function i(){var o;clearTimeout(n),(o=r)==null||o.disconnect(),r=null}function s(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),i();const c=t.getBoundingClientRect(),{left:u,top:d,width:h,height:m}=c;if(o||e(),!h||!m)return;const f=o_(d),g=o_(a.clientWidth-(u+h)),b=o_(a.clientHeight-(d+m)),_=o_(u),E={rootMargin:-f+"px "+-g+"px "+-b+"px "+-_+"px",threshold:Xs(0,Uu(1,l))||1};let y=!0;function v(T){const w=T[0].intersectionRatio;if(w!==l){if(!y)return s();w?s(!1,w):n=setTimeout(()=>{s(!1,1e-7)},1e3)}w===1&&!EU(c,t.getBoundingClientRect())&&s(),y=!1}try{r=new IntersectionObserver(v,{...E,root:a.ownerDocument})}catch{r=new IntersectionObserver(v,E)}r.observe(t)}return s(!0),i}function KJ(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=AN(t),u=a||i?[...c?Af(c):[],...Af(e)]:[];u.forEach(_=>{a&&_.addEventListener("scroll",r,{passive:!0}),i&&_.addEventListener("resize",r)});const d=c&&o?WJ(c,r):null;let h=-1,m=null;s&&(m=new ResizeObserver(_=>{let[S]=_;S&&S.target===c&&m&&(m.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var E;(E=m)==null||E.observe(e)})),r()}),c&&!l&&m.observe(c),m.observe(e));let f,g=l?ah(t):null;l&&b();function b(){const _=ah(t);g&&!EU(g,_)&&r(),g=_,f=requestAnimationFrame(b)}return r(),()=>{var _;u.forEach(S=>{a&&S.removeEventListener("scroll",r),i&&S.removeEventListener("resize",r)}),d?.(),(_=m)==null||_.disconnect(),m=null,l&&cancelAnimationFrame(f)}}const jJ=SJ,QJ=EJ,XJ=gJ,ZJ=yJ,JJ=_J,eee=fJ,tee=vJ,ree=(t,e,r)=>{const n=new Map,a={platform:VJ,...r},i={...a.platform,_c:n};return mJ(t,e,{...a,platform:i})};function vd(t){return typeof t=="function"?t():t}function vU(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function KD(t,e){const r=vU(t);return Math.round(e*r)/r}function Hc(t){return{[`--bits-${t}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${t}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${t}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${t}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${t}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function nee(t){const e=t.whileElementsMounted,r=F(()=>vd(t.open)??!0),n=F(()=>vd(t.middleware)),a=F(()=>vd(t.transform)??!0),i=F(()=>vd(t.placement)??"bottom"),s=F(()=>vd(t.strategy)??"absolute"),o=F(()=>vd(t.sideOffset)??0),l=F(()=>vd(t.alignOffset)??0),c=t.reference;let u=_e(0),d=_e(0);const h=us(null);let m=_e(Tr(p(s))),f=_e(Tr(p(i))),g=_e(Tr({})),b=_e(!1);const _=F(()=>{const w=h.current?KD(h.current,p(u)):p(u),A=h.current?KD(h.current,p(d)):p(d);return p(a)?{position:p(m),left:"0",top:"0",transform:`translate(${w}px, ${A}px)`,...h.current&&vU(h.current)>=1.5&&{willChange:"transform"}}:{position:p(m),left:`${w}px`,top:`${A}px`}});let S;function E(){c.current===null||h.current===null||ree(c.current,h.current,{middleware:p(n),placement:p(i),strategy:p(s)}).then(w=>{if(!p(r)&&p(u)!==0&&p(d)!==0){const A=Math.max(Math.abs(p(o)),Math.abs(p(l)),15);if(w.x<=A&&w.y<=A)return}k(u,w.x,!0),k(d,w.y,!0),k(m,w.strategy,!0),k(f,w.placement,!0),k(g,w.middlewareData,!0),k(b,!0)})}function y(){typeof S=="function"&&(S(),S=void 0)}function v(){if(y(),e===void 0){E();return}c.current===null||h.current===null||(S=e(c.current,h.current,E))}function T(){p(r)||k(b,!1)}return It(E),It(v),It(T),It(()=>y),{floating:h,reference:c,get strategy(){return p(m)},get placement(){return p(f)},get middlewareData(){return p(g)},get isPositioned(){return p(b)},get floatingStyles(){return p(_)},get update(){return E}}}const aee={top:"bottom",right:"left",bottom:"top",left:"right"},ON=new ka("Floating.Root"),lR=new ka("Floating.Content"),NN=new ka("Floating.Root");class ab{static create(e=!1){return e?NN.set(new ab):ON.set(new ab)}anchorNode=us(null);customAnchorNode=us(null);triggerNode=us(null);constructor(){It(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}}class ib{static create(e,r=!1){return r?lR.set(new ib(e,NN.get())):lR.set(new ib(e,ON.get()))}opts;root;contentRef=us(null);wrapperRef=us(null);arrowRef=us(null);contentAttachment=vn(this.contentRef);wrapperAttachment=vn(this.wrapperRef);arrowAttachment=vn(this.arrowRef);arrowId=us(tm());#e=F(()=>{if(typeof this.opts.style=="string")return Ym(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#r=new iX(()=>this.arrowRef.current??void 0);#n=F(()=>this.#r?.width??0);#i=F(()=>this.#r?.height??0);#a=F(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#s=F(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#o=F(()=>p(this.#s).length>0);get hasExplicitBoundaries(){return p(this.#o)}set hasExplicitBoundaries(e){k(this.#o,e)}#l=F(()=>({padding:this.opts.collisionPadding.current,boundary:p(this.#s).filter(TX),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return p(this.#l)}set detectOverflowOptions(e){k(this.#l,e)}#c=_e(void 0);#d=_e(void 0);#u=_e(void 0);#m=_e(void 0);#f=F(()=>[jJ({mainAxis:this.opts.sideOffset.current+p(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&QJ({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?tee():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&XJ({...this.detectOverflowOptions}),ZJ({...this.detectOverflowOptions,apply:({rects:e,availableWidth:r,availableHeight:n})=>{const{width:a,height:i}=e.reference;k(this.#c,r,!0),k(this.#d,n,!0),k(this.#u,a,!0),k(this.#m,i,!0)}}),this.arrowRef.current&&eee({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),iee({arrowWidth:p(this.#n),arrowHeight:p(this.#i)}),this.opts.hideWhenDetached.current&&JJ({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return p(this.#f)}set middleware(e){k(this.#f,e)}floating;#p=F(()=>see(this.floating.placement));get placedSide(){return p(this.#p)}set placedSide(e){k(this.#p,e)}#h=F(()=>oee(this.floating.placement));get placedAlign(){return p(this.#h)}set placedAlign(e){k(this.#h,e)}#g=F(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return p(this.#g)}set arrowX(e){k(this.#g,e)}#S=F(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return p(this.#S)}set arrowY(e){k(this.#S,e)}#_=F(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return p(this.#_)}set cannotCenterArrow(e){k(this.#_,e)}#E=_e();get contentZIndex(){return p(this.#E)}set contentZIndex(e){k(this.#E,e,!0)}#v=F(()=>aee[this.placedSide]);get arrowBaseSide(){return p(this.#v)}set arrowBaseSide(e){k(this.#v,e)}#b=F(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${p(this.#c)}px`,"--bits-floating-available-height":`${p(this.#d)}px`,"--bits-floating-anchor-width":`${p(this.#u)}px`,"--bits-floating-anchor-height":`${p(this.#m)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...p(this.#e)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return p(this.#b)}set wrapperProps(e){k(this.#b,e)}#T=F(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:LO({...p(this.#e)}),...this.contentAttachment}));get props(){return p(this.#T)}set props(e){k(this.#T,e)}#C=F(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0}));get arrowStyle(){return p(this.#C)}set arrowStyle(e){k(this.#C,e)}constructor(e,r){this.opts=e,this.root=r,e.customAnchor&&(this.root.customAnchorNode.current=e.customAnchor.current),nn(()=>e.customAnchor.current,n=>{this.root.customAnchorNode.current=n}),this.floating=nee({strategy:()=>this.opts.strategy.current,placement:()=>p(this.#a),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...n)=>KJ(...n,{animationFrame:this.#t?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),It(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),nn(()=>this.contentRef.current,n=>{if(!n)return;const a=vS(n);this.contentZIndex=a.getComputedStyle(n).zIndex}),It(()=>{this.floating.floating.current=this.wrapperRef.current})}}class IN{static create(e){return new IN(e,lR.get())}opts;content;constructor(e,r){this.opts=e,this.content=r}#e=F(()=>({id:this.opts.id.current,style:this.content.arrowStyle,"data-side":this.content.placedSide,...this.content.arrowAttachment}));get props(){return p(this.#e)}set props(e){k(this.#e,e)}}class sb{static create(e,r=!1){return r?new sb(e,NN.get()):new sb(e,ON.get())}opts;root;constructor(e,r){this.opts=e,this.root=r,e.virtualEl&&e.virtualEl.current?r.triggerNode=MB(e.virtualEl.current):r.triggerNode=e.ref}}function iee(t){return{name:"transformOrigin",options:t,fn(e){const{placement:r,rects:n,middlewareData:a}=e,s=a.arrow?.centerOffset!==0,o=s?0:t.arrowWidth,l=s?0:t.arrowHeight,[c,u]=xN(r),d={start:"0%",center:"50%",end:"100%"}[u],h=(a.arrow?.x??0)+o/2,m=(a.arrow?.y??0)+l/2;let f="",g="";return c==="bottom"?(f=s?d:`${h}px`,g=`${-l}px`):c==="top"?(f=s?d:`${h}px`,g=`${n.floating.height+l}px`):c==="right"?(f=`${-l}px`,g=s?d:`${m}px`):c==="left"&&(f=`${n.floating.width+l}px`,g=s?d:`${m}px`),{data:{x:f,y:g}}}}}function xN(t){const[e,r="center"]=t.split("-");return[e,r]}function see(t){return xN(t)[0]}function oee(t){return xN(t)[1]}function og(t,e){ye(e,!0);let r=V(e,"tooltip",3,!1);ab.create(r());var n=se(),a=L(n);De(a,()=>e.children??Ge),C(t,n),Te()}class lee{#e;#t=F(()=>this.#e.candidateValues());#r;constructor(e){this.#e=e,this.#r=jO("",{afterMs:1e3,getWindow:this.#e.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(e){if(!this.#e.enabled()||!p(this.#t).length)return;this.#r.current=this.#r.current+e;const r=this.#e.getCurrentItem(),n=p(this.#t).find(o=>o===r)??"",a=p(this.#t).map(o=>o??""),i=KO(a,this.#r.current,n),s=p(this.#t).find(o=>o===i);return s&&this.#e.onMatch(s),s}resetTypeahead(){this.#r.current=""}}const cee=[Ml,GO,TS],uee=[Dl,UO,yS],dee=[...cee,...uee],hee=jl({component:"select",parts:["trigger","content","item","viewport","scroll-up-button","scroll-down-button","group","group-label","separator","arrow","input","content-wrapper","item-text","value"]}),lg=new ka("Select.Root | Combobox.Root"),MS=new ka("Select.Content | Combobox.Content");class yU{opts;#e=_e(!1);get touchedInput(){return p(this.#e)}set touchedInput(e){k(this.#e,e,!0)}#t=_e(null);get inputNode(){return p(this.#t)}set inputNode(e){k(this.#t,e,!0)}#r=_e(null);get contentNode(){return p(this.#r)}set contentNode(e){k(this.#r,e,!0)}contentPresence;#n=_e(null);get viewportNode(){return p(this.#n)}set viewportNode(e){k(this.#n,e,!0)}#i=_e(null);get triggerNode(){return p(this.#i)}set triggerNode(e){k(this.#i,e,!0)}#a=_e("");get valueId(){return p(this.#a)}set valueId(e){k(this.#a,e,!0)}#s=_e(null);get highlightedNode(){return p(this.#s)}set highlightedNode(e){k(this.#s,e,!0)}#o=F(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-value"):null);get highlightedValue(){return p(this.#o)}set highlightedValue(e){k(this.#o,e)}#l=F(()=>{if(this.highlightedNode)return this.highlightedNode.id});get highlightedId(){return p(this.#l)}set highlightedId(e){k(this.#l,e)}#c=F(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-label"):null);get highlightedLabel(){return p(this.#c)}set highlightedLabel(e){k(this.#c,e)}isUsingKeyboard=!1;isCombobox=!1;domContext=new au(()=>null);constructor(e){this.opts=e,this.isCombobox=e.isCombobox,this.contentPresence=new Bu({ref:Pe(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),$i(()=>{this.opts.open.current||this.setHighlightedNode(null)})}setHighlightedNode(e,r=!1){this.highlightedNode=e,e&&(this.isUsingKeyboard||r)&&e.scrollIntoView({block:this.opts.scrollAlignment.current})}getCandidateNodes(){const e=this.contentNode;return e?Array.from(e.querySelectorAll(`[${this.getBitsAttr("item")}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(e=!1){this.setHighlightedNode(null);let r=this.getCandidateNodes();if(r.length){if(this.viewportNode){const n=this.viewportNode.getBoundingClientRect();r=r.filter(a=>{if(!this.viewportNode)return!1;const i=a.getBoundingClientRect();return i.rightn.left&&i.bottomn.top})}this.setHighlightedNode(r[0],e)}}getNodeByValue(e){return this.getCandidateNodes().find(n=>n.dataset.value===e)??null}setOpen(e){this.opts.open.current=e}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode(null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}getBitsAttr=e=>hee.getAttr(e,this.isCombobox?"combobox":void 0)}class pee extends yU{opts;isMulti=!1;#e=F(()=>this.opts.value.current!=="");get hasValue(){return p(this.#e)}set hasValue(e){k(this.#e,e)}#t=F(()=>this.opts.items.current.length?this.opts.items.current.find(e=>e.value===this.opts.value.current)?.label??"":"");get currentLabel(){return p(this.#t)}set currentLabel(e){k(this.#t,e)}#r=F(()=>this.opts.items.current.length?this.opts.items.current.filter(r=>!r.disabled).map(r=>r.label):[]);get candidateLabels(){return p(this.#r)}set candidateLabels(e){k(this.#r,e)}#n=F(()=>!(this.isMulti||this.opts.items.current.length===0));get dataTypeaheadEnabled(){return p(this.#n)}set dataTypeaheadEnabled(e){k(this.#n,e)}constructor(e){super(e),this.opts=e,It(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),nn(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(e){return this.opts.value.current===e}toggleItem(e,r=e){const n=this.includesItem(e)?"":e;this.opts.value.current=n,n!==""&&(this.opts.inputValue.current=r)}setInitialHighlightedNode(){no(()=>{if(!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current!==""){const e=this.getNodeByValue(this.opts.value.current);if(e){this.setHighlightedNode(e,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}class mee extends yU{opts;isMulti=!0;#e=F(()=>this.opts.value.current.length>0);get hasValue(){return p(this.#e)}set hasValue(e){k(this.#e,e)}constructor(e){super(e),this.opts=e,It(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),nn(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(e){return this.opts.value.current.includes(e)}toggleItem(e,r=e){this.includesItem(e)?this.opts.value.current=this.opts.value.current.filter(n=>n!==e):this.opts.value.current=[...this.opts.value.current,e],this.opts.inputValue.current=r}setInitialHighlightedNode(){no(()=>{if(this.domContext&&!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current.length&&this.opts.value.current[0]!==""){const e=this.getNodeByValue(this.opts.value.current[0]);if(e){this.setHighlightedNode(e,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}class fee{static create(e){const{type:r,...n}=e,a=r==="single"?new pee(n):new mee(n);return lg.set(a)}}class DN{static create(e){return new DN(e,lg.get())}opts;root;attachment;#e;#t;constructor(e,r){this.opts=e,this.root=r,this.attachment=vn(e.ref,n=>this.root.triggerNode=n),this.root.domContext=new au(e.ref),this.#e=new sU({getCurrentItem:()=>this.root.highlightedNode,onMatch:n=>{this.root.setHighlightedNode(n)},getActiveElement:()=>this.root.domContext.getActiveElement(),getWindow:()=>this.root.domContext.getWindow()}),this.#t=new lee({getCurrentItem:()=>this.root.isMulti?"":this.root.currentLabel,onMatch:n=>{if(this.root.isMulti||!this.root.opts.items.current)return;const a=this.root.opts.items.current.find(i=>i.label===n);a&&(this.root.opts.value.current=a.value)},enabled:()=>!this.root.isMulti&&this.root.dataTypeaheadEnabled,candidateValues:()=>this.root.isMulti?[]:this.root.candidateLabels,getWindow:()=>this.root.domContext.getWindow()}),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onclick=this.onclick.bind(this)}#r(){this.root.opts.open.current=!0,this.#t.resetTypeahead(),this.#e.resetTypeahead()}#n(e){this.#r()}#i(){const e=this.root.highlightedValue===this.root.opts.value.current;return!this.root.opts.allowDeselect.current&&e&&!this.root.isMulti?(this.root.handleClose(),!0):(this.root.highlightedValue!==null&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!e?(this.root.handleClose(),!0):!1)}onkeydown(e){if(this.root.isUsingKeyboard=!0,(e.key===Dl||e.key===Ml)&&e.preventDefault(),!this.root.opts.open.current){if(e.key===Yl||e.key===so||e.key===Ml||e.key===Dl)e.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){this.#t.handleTypeaheadSearch(e.key);return}if(this.root.hasValue)return;const s=this.root.getCandidateNodes();if(!s.length)return;if(e.key===Ml){const o=s[0];this.root.setHighlightedNode(o)}else if(e.key===Dl){const o=s[s.length-1];this.root.setHighlightedNode(o)}return}if(e.key===tR){this.root.handleClose();return}if((e.key===Yl||e.key===so&&this.#e.search==="")&&!e.isComposing&&(e.preventDefault(),this.#i()))return;if(e.key===Dl&&e.altKey&&this.root.handleClose(),dee.includes(e.key)){e.preventDefault();const s=this.root.getCandidateNodes(),o=this.root.highlightedNode,l=o?s.indexOf(o):-1,c=this.root.opts.loop.current;let u;if(e.key===Ml?u=hZ(s,l,c):e.key===Dl?u=pZ(s,l,c):e.key===UO?u=mZ(s,l,10,c):e.key===GO?u=fZ(s,l,10,c):e.key===TS?u=s[0]:e.key===yS&&(u=s[s.length-1]),!u)return;this.root.setHighlightedNode(u);return}const r=e.ctrlKey||e.altKey||e.metaKey,n=e.key.length===1,a=e.key===so,i=this.root.getCandidateNodes();if(e.key!==tR){if(!r&&(n||a)){!this.#e.handleTypeaheadSearch(e.key,i)&&a&&(e.preventDefault(),this.#i());return}this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}onclick(e){e.currentTarget.focus()}onpointerdown(e){if(this.root.opts.disabled.current)return;if(e.pointerType==="touch")return e.preventDefault();const r=e.target;r?.hasPointerCapture(e.pointerId)&&r?.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&(this.root.opts.open.current===!1?this.#n(e):this.root.handleClose())}onpointerup(e){this.root.opts.disabled.current||(e.preventDefault(),e.pointerType==="touch"&&(this.root.opts.open.current===!1?this.#n(e):this.root.handleClose()))}#a=F(()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":"listbox","aria-expanded":Gc(this.root.opts.open.current),"aria-activedescendant":this.root.highlightedId,"data-state":dl(this.root.opts.open.current),"data-disabled":Pi(this.root.opts.disabled.current),"data-placeholder":this.root.hasValue?void 0:"",[this.root.getBitsAttr("trigger")]:"",onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,onclick:this.onclick,onpointerup:this.onpointerup,...this.attachment}));get props(){return p(this.#a)}set props(e){k(this.#a,e)}}class MN{static create(e){return MS.set(new MN(e,lg.get()))}opts;root;attachment;#e=_e(!1);get isPositioned(){return p(this.#e)}set isPositioned(e){k(this.#e,e,!0)}domContext;constructor(e,r){this.opts=e,this.root=r,this.attachment=vn(e.ref,n=>this.root.contentNode=n),this.domContext=new au(this.opts.ref),this.root.domContext===null&&(this.root.domContext=this.domContext),nu(()=>{this.root.contentNode=null,this.isPositioned=!1}),nn(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.isPositioned=!1)}),this.onpointermove=this.onpointermove.bind(this)}onpointermove(e){this.root.isUsingKeyboard=!1}#t=F(()=>Hc(this.root.isCombobox?"combobox":"select"));onInteractOutside=e=>{if(e.target===this.root.triggerNode||e.target===this.root.inputNode){e.preventDefault();return}this.opts.onInteractOutside.current(e),!e.defaultPrevented&&this.root.handleClose()};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()};onOpenAutoFocus=e=>{e.preventDefault()};onCloseAutoFocus=e=>{e.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#r=F(()=>({open:this.root.opts.open.current}));get snippetProps(){return p(this.#r)}set snippetProps(e){k(this.#r,e)}#n=F(()=>({id:this.opts.id.current,role:"listbox","aria-multiselectable":this.root.isMulti?"true":void 0,"data-state":dl(this.root.opts.open.current),[this.root.getBitsAttr("content")]:"",style:{display:"flex",flexDirection:"column",outline:"none",boxSizing:"border-box",pointerEvents:"auto",...p(this.#t)},onpointermove:this.onpointermove,...this.attachment}));get props(){return p(this.#n)}set props(e){k(this.#n,e)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.isPositioned=!0)}}}class kN{static create(e){return new kN(e,lg.get())}opts;root;attachment;#e=F(()=>this.root.includesItem(this.opts.value.current));get isSelected(){return p(this.#e)}set isSelected(e){k(this.#e,e)}#t=F(()=>this.root.highlightedValue===this.opts.value.current);get isHighlighted(){return p(this.#t)}set isHighlighted(e){k(this.#t,e)}prevHighlighted=new GB(()=>this.isHighlighted);#r=_e(!1);get mounted(){return p(this.#r)}set mounted(e){k(this.#r,e,!0)}constructor(e,r){this.opts=e,this.root=r,this.attachment=vn(e.ref),nn([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),nn(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove.bind(this)}handleSelect(){if(this.opts.disabled.current)return;const e=this.opts.value.current===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&e&&!this.root.isMulti){this.root.handleClose();return}this.root.toggleItem(this.opts.value.current,this.opts.label.current),!this.root.isMulti&&!e&&this.root.handleClose()}#n=F(()=>({selected:this.isSelected,highlighted:this.isHighlighted}));get snippetProps(){return p(this.#n)}set snippetProps(e){k(this.#n,e)}onpointerdown(e){e.preventDefault()}onpointerup(e){if(!(e.defaultPrevented||!this.opts.ref.current)){if(e.pointerType==="touch"&&!rR){Kr(this.opts.ref.current,"click",()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0});return}e.preventDefault(),this.handleSelect(),e.pointerType==="touch"&&this.root.setHighlightedNode(this.opts.ref.current)}}onpointermove(e){e.pointerType!=="touch"&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}#i=F(()=>({id:this.opts.id.current,role:"option","aria-selected":this.root.includesItem(this.opts.value.current)?"true":void 0,"data-value":this.opts.value.current,"data-disabled":Pi(this.opts.disabled.current),"data-highlighted":this.root.highlightedValue===this.opts.value.current&&!this.opts.disabled.current?"":void 0,"data-selected":this.root.includesItem(this.opts.value.current)?"":void 0,"data-label":this.opts.label.current,[this.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,...this.attachment}));get props(){return p(this.#i)}set props(e){k(this.#i,e)}}class PN{static create(e){return new PN(e,lg.get())}opts;root;#e=F(()=>this.root.opts.name.current!=="");get shouldRender(){return p(this.#e)}set shouldRender(e){k(this.#e,e)}constructor(e,r){this.opts=e,this.root=r,this.onfocus=this.onfocus.bind(this)}onfocus(e){e.preventDefault(),this.root.isCombobox?this.root.inputNode?.focus():this.root.triggerNode?.focus()}#t=F(()=>({disabled:eR(this.root.opts.disabled.current),required:eR(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus}));get props(){return p(this.#t)}set props(e){k(this.#t,e)}}class LN{static create(e){return new LN(e,MS.get())}opts;content;root;attachment;#e=_e(0);get prevScrollTop(){return p(this.#e)}set prevScrollTop(e){k(this.#e,e,!0)}constructor(e,r){this.opts=e,this.content=r,this.root=r.root,this.attachment=vn(e.ref,n=>{this.root.viewportNode=n})}#t=F(()=>({id:this.opts.id.current,role:"presentation",[this.root.getBitsAttr("viewport")]:"",style:{position:"relative",flex:1,overflow:"auto"},...this.attachment}));get props(){return p(this.#t)}set props(e){k(this.#t,e)}}class TU{opts;content;root;attachment;autoScrollTimer=null;userScrollTimer=-1;isUserScrolling=!1;onAutoScroll=Rr;#e=_e(!1);get mounted(){return p(this.#e)}set mounted(e){k(this.#e,e,!0)}constructor(e,r){this.opts=e,this.content=r,this.root=r.root,this.attachment=vn(e.ref),nn([()=>this.mounted],()=>{if(!this.mounted){this.isUserScrolling=!1;return}this.isUserScrolling}),It(()=>{this.mounted||this.clearAutoScrollInterval()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this)}handleUserScroll(){this.content.domContext.clearTimeout(this.userScrollTimer),this.isUserScrolling=!0,this.userScrollTimer=this.content.domContext.setTimeout(()=>{this.isUserScrolling=!1},200)}clearAutoScrollInterval(){this.autoScrollTimer!==null&&(this.content.domContext.clearTimeout(this.autoScrollTimer),this.autoScrollTimer=null)}onpointerdown(e){if(this.autoScrollTimer!==null)return;const r=n=>{this.onAutoScroll(),this.autoScrollTimer=this.content.domContext.setTimeout(()=>r(n+1),this.opts.delay.current(n))};this.autoScrollTimer=this.content.domContext.setTimeout(()=>r(1),this.opts.delay.current(0))}onpointermove(e){this.onpointerdown(e)}onpointerleave(e){this.clearAutoScrollInterval()}#t=F(()=>({id:this.opts.id.current,"aria-hidden":pX(!0),style:{flexShrink:0},onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return p(this.#t)}set props(e){k(this.#t,e)}}class FN{static create(e){return new FN(new TU(e,MS.get()))}scrollButtonState;content;root;#e=_e(!1);get canScrollDown(){return p(this.#e)}set canScrollDown(e){k(this.#e,e,!0)}scrollIntoViewTimer=null;constructor(e){this.scrollButtonState=e,this.content=e.content,this.root=e.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,nn([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.root.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),Kr(this.root.viewportNode,"scroll",()=>this.handleScroll())}),nn([()=>this.root.opts.inputValue.current,()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{!this.root.viewportNode||!this.content.isPositioned||this.handleScroll(!0)}),nn(()=>this.scrollButtonState.mounted,()=>{this.scrollButtonState.mounted&&(this.scrollIntoViewTimer&&clearTimeout(this.scrollIntoViewTimer),this.scrollIntoViewTimer=BO(5,()=>{this.root.highlightedNode?.scrollIntoView({block:this.root.opts.scrollAlignment.current})}))})}handleScroll=(e=!1)=>{if(e||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;const r=this.root.viewportNode.scrollHeight-this.root.viewportNode.clientHeight,n=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollDown=Math.ceil(this.root.viewportNode.scrollTop){const e=this.root.viewportNode,r=this.root.highlightedNode;!e||!r||(e.scrollTop=e.scrollTop+r.offsetHeight)};#t=F(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr("scroll-down-button")]:""}));get props(){return p(this.#t)}set props(e){k(this.#t,e)}}class BN{static create(e){return new BN(new TU(e,MS.get()))}scrollButtonState;content;root;#e=_e(!1);get canScrollUp(){return p(this.#e)}set canScrollUp(e){k(this.#e,e,!0)}constructor(e){this.scrollButtonState=e,this.content=e.content,this.root=e.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,nn([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.root.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),Kr(this.root.viewportNode,"scroll",()=>this.handleScroll())})}handleScroll=(e=!1)=>{if(e||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;const r=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollUp=this.root.viewportNode.scrollTop-r>.1};handleAutoScroll=()=>{!this.root.viewportNode||!this.root.highlightedNode||(this.root.viewportNode.scrollTop=this.root.viewportNode.scrollTop-this.root.highlightedNode.offsetHeight)};#t=F(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr("scroll-up-button")]:""}));get props(){return p(this.#t)}set props(e){k(this.#t,e)}}function Ev(t,e){ye(e,!0);let r=V(e,"value",15);const n=PN.create({value:Pe(()=>r())});var a=se(),i=L(a);{var s=o=>{fN(o,ot(()=>n.props,{get autocomplete(){return e.autocomplete},get value(){return r()},set value(l){r(l)}}))};le(i,o=>{n.shouldRender&&o(s)})}C(t,a),Te()}function cg(t,e){ye(e,!0);let r=V(e,"tooltip",3,!1);sb.create({id:Pe(()=>e.id),virtualEl:Pe(()=>e.virtualEl),ref:e.ref},r());var n=se(),a=L(n);De(a,()=>e.children??Ge),C(t,n),Te()}var gee=td(''),_ee=q("");function bee(t,e){ye(e,!0);let r=V(e,"id",19,tm),n=V(e,"width",3,10),a=V(e,"height",3,5),i=Ve(e,["$$slots","$$events","$$legacy","id","children","child","width","height"]);const s=F(()=>Er(i,{id:r()}));var o=se(),l=L(o);{var c=d=>{var h=se(),m=L(h);De(m,()=>e.child,()=>({props:p(s)})),C(d,h)},u=d=>{var h=_ee();$t(h,()=>({...p(s)}));var m=j(h);{var f=b=>{var _=se(),S=L(_);De(S,()=>e.children??Ge),C(b,_)},g=b=>{var _=gee();we(()=>{rr(_,"width",n()),rr(_,"height",a())}),C(b,_)};le(m,b=>{e.children?b(f):b(g,!1)})}Y(h),C(d,h)};le(l,d=>{e.child?d(c):d(u,!1)})}C(t,o),Te()}function See(t,e){ye(e,!0);let r=V(e,"id",19,tm),n=V(e,"ref",15,null),a=Ve(e,["$$slots","$$events","$$legacy","id","ref"]);const i=IN.create({id:Pe(()=>r()),ref:Pe(()=>n(),o=>n(o))}),s=F(()=>Er(a,i.props));bee(t,ot(()=>p(s))),Te()}function Eee(t,e){ye(e,!0);let r=V(e,"side",3,"bottom"),n=V(e,"sideOffset",3,0),a=V(e,"align",3,"center"),i=V(e,"alignOffset",3,0),s=V(e,"arrowPadding",3,0),o=V(e,"avoidCollisions",3,!0),l=V(e,"collisionBoundary",19,()=>[]),c=V(e,"collisionPadding",3,0),u=V(e,"hideWhenDetached",3,!1),d=V(e,"onPlaced",3,()=>{}),h=V(e,"sticky",3,"partial"),m=V(e,"updatePositionStrategy",3,"optimized"),f=V(e,"strategy",3,"fixed"),g=V(e,"dir",3,"ltr"),b=V(e,"style",19,()=>({})),_=V(e,"wrapperId",19,tm),S=V(e,"customAnchor",3,null),E=V(e,"tooltip",3,!1);const y=ib.create({side:Pe(()=>r()),sideOffset:Pe(()=>n()),align:Pe(()=>a()),alignOffset:Pe(()=>i()),id:Pe(()=>e.id),arrowPadding:Pe(()=>s()),avoidCollisions:Pe(()=>o()),collisionBoundary:Pe(()=>l()),collisionPadding:Pe(()=>c()),hideWhenDetached:Pe(()=>u()),onPlaced:Pe(()=>d()),sticky:Pe(()=>h()),updatePositionStrategy:Pe(()=>m()),strategy:Pe(()=>f()),dir:Pe(()=>g()),style:Pe(()=>b()),enabled:Pe(()=>e.enabled),wrapperId:Pe(()=>_()),customAnchor:Pe(()=>S())},E()),v=F(()=>Er(y.wrapperProps,{style:{pointerEvents:"auto"}}));var T=se(),w=L(T);De(w,()=>e.content??Ge,()=>({props:y.props,wrapperProps:p(v)})),C(t,T),Te()}function vee(t,e){ye(e,!0),vi(()=>{e.onPlaced?.()});var r=se(),n=L(r);De(n,()=>e.content??Ge,()=>({props:{},wrapperProps:{}})),C(t,r),Te()}function yee(t,e){let r=V(e,"isStatic",3,!1),n=Ve(e,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var a=se(),i=L(a);{var s=l=>{vee(l,{get content(){return e.content},get onPlaced(){return e.onPlaced}})},o=l=>{Eee(l,ot({get content(){return e.content},get onPlaced(){return e.onPlaced}},()=>n))};le(i,l=>{r()?l(s):l(o,!1)})}C(t,a)}var Tee=q(" ",1);function CU(t,e){ye(e,!0);let r=V(e,"interactOutsideBehavior",3,"close"),n=V(e,"trapFocus",3,!0),a=V(e,"isValidEvent",3,()=>!1),i=V(e,"customAnchor",3,null),s=V(e,"isStatic",3,!1),o=V(e,"tooltip",3,!1),l=V(e,"contentPointerEvents",3,"auto"),c=Ve(e,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled","ref","tooltip","contentPointerEvents"]);yee(t,{get isStatic(){return s()},get id(){return e.id},get side(){return e.side},get sideOffset(){return e.sideOffset},get align(){return e.align},get alignOffset(){return e.alignOffset},get arrowPadding(){return e.arrowPadding},get avoidCollisions(){return e.avoidCollisions},get collisionBoundary(){return e.collisionBoundary},get collisionPadding(){return e.collisionPadding},get sticky(){return e.sticky},get hideWhenDetached(){return e.hideWhenDetached},get updatePositionStrategy(){return e.updatePositionStrategy},get strategy(){return e.strategy},get dir(){return e.dir},get wrapperId(){return e.wrapperId},get style(){return e.style},get onPlaced(){return e.onPlaced},get customAnchor(){return i()},get enabled(){return e.enabled},get tooltip(){return o()},content:(d,h)=>{let m=()=>h?.().props,f=()=>h?.().wrapperProps;var g=Tee(),b=L(g);{var _=y=>{xp(y,{get preventScroll(){return e.preventScroll}})},S=y=>{var v=se(),T=L(v);{var w=A=>{xp(A,{get preventScroll(){return e.preventScroll}})};le(T,A=>{e.forceMount||A(w)},!0)}C(y,v)};le(b,y=>{e.forceMount&&e.enabled?y(_):y(S,!1)})}var E=te(b,2);cN(E,{get onOpenAutoFocus(){return e.onOpenAutoFocus},get onCloseAutoFocus(){return e.onCloseAutoFocus},get loop(){return e.loop},get enabled(){return e.enabled},get trapFocus(){return n()},get forceMount(){return e.forceMount},get ref(){return e.ref},focusScope:(v,T)=>{let w=()=>T?.().props;sN(v,{get onEscapeKeydown(){return e.onEscapeKeydown},get escapeKeydownBehavior(){return e.escapeKeydownBehavior},get enabled(){return e.enabled},get ref(){return e.ref},children:(A,I)=>{aN(A,{get id(){return e.id},get onInteractOutside(){return e.onInteractOutside},get onFocusOutside(){return e.onFocusOutside},get interactOutsideBehavior(){return r()},get isValidEvent(){return a()},get enabled(){return e.enabled},get ref(){return e.ref},children:(D,$)=>{let H=()=>$?.().props;dN(D,{get id(){return e.id},get preventOverflowTextSelection(){return e.preventOverflowTextSelection},get onPointerDown(){return e.onPointerDown},get onPointerUp(){return e.onPointerUp},get enabled(){return e.enabled},get ref(){return e.ref},children:(G,K)=>{var z=se(),re=L(z);{let W=F(()=>({props:Er(c,m(),H(),w(),{style:{pointerEvents:l()}}),wrapperProps:f()}));De(re,()=>e.popper??Ge,()=>p(W))}C(G,z)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),C(d,g)},$$slots:{content:!0}}),Te()}function ug(t,e){let r=V(e,"interactOutsideBehavior",3,"close"),n=V(e,"trapFocus",3,!0),a=V(e,"isValidEvent",3,()=>!1),i=V(e,"customAnchor",3,null),s=V(e,"isStatic",3,!1),o=Ve(e,["$$slots","$$events","$$legacy","popper","open","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","ref","shouldRender"]);var l=se(),c=L(l);{var u=d=>{CU(d,ot({get popper(){return e.popper},get onEscapeKeydown(){return e.onEscapeKeydown},get escapeKeydownBehavior(){return e.escapeKeydownBehavior},get preventOverflowTextSelection(){return e.preventOverflowTextSelection},get id(){return e.id},get onPointerDown(){return e.onPointerDown},get onPointerUp(){return e.onPointerUp},get side(){return e.side},get sideOffset(){return e.sideOffset},get align(){return e.align},get alignOffset(){return e.alignOffset},get arrowPadding(){return e.arrowPadding},get avoidCollisions(){return e.avoidCollisions},get collisionBoundary(){return e.collisionBoundary},get collisionPadding(){return e.collisionPadding},get sticky(){return e.sticky},get hideWhenDetached(){return e.hideWhenDetached},get updatePositionStrategy(){return e.updatePositionStrategy},get strategy(){return e.strategy},get dir(){return e.dir},get preventScroll(){return e.preventScroll},get wrapperId(){return e.wrapperId},get style(){return e.style},get onPlaced(){return e.onPlaced},get customAnchor(){return i()},get isStatic(){return s()},get enabled(){return e.open},get onInteractOutside(){return e.onInteractOutside},get onCloseAutoFocus(){return e.onCloseAutoFocus},get onOpenAutoFocus(){return e.onOpenAutoFocus},get interactOutsideBehavior(){return r()},get loop(){return e.loop},get trapFocus(){return n()},get isValidEvent(){return a()},get onFocusOutside(){return e.onFocusOutside},forceMount:!1,get ref(){return e.ref}},()=>o))};le(c,d=>{e.shouldRender&&d(u)})}C(t,l)}function dg(t,e){let r=V(e,"interactOutsideBehavior",3,"close"),n=V(e,"trapFocus",3,!0),a=V(e,"isValidEvent",3,()=>!1),i=V(e,"customAnchor",3,null),s=V(e,"isStatic",3,!1),o=Ve(e,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);CU(t,ot({get popper(){return e.popper},get onEscapeKeydown(){return e.onEscapeKeydown},get escapeKeydownBehavior(){return e.escapeKeydownBehavior},get preventOverflowTextSelection(){return e.preventOverflowTextSelection},get id(){return e.id},get onPointerDown(){return e.onPointerDown},get onPointerUp(){return e.onPointerUp},get side(){return e.side},get sideOffset(){return e.sideOffset},get align(){return e.align},get alignOffset(){return e.alignOffset},get arrowPadding(){return e.arrowPadding},get avoidCollisions(){return e.avoidCollisions},get collisionBoundary(){return e.collisionBoundary},get collisionPadding(){return e.collisionPadding},get sticky(){return e.sticky},get hideWhenDetached(){return e.hideWhenDetached},get updatePositionStrategy(){return e.updatePositionStrategy},get strategy(){return e.strategy},get dir(){return e.dir},get preventScroll(){return e.preventScroll},get wrapperId(){return e.wrapperId},get style(){return e.style},get onPlaced(){return e.onPlaced},get customAnchor(){return i()},get isStatic(){return s()},get enabled(){return e.enabled},get onInteractOutside(){return e.onInteractOutside},get onCloseAutoFocus(){return e.onCloseAutoFocus},get onOpenAutoFocus(){return e.onOpenAutoFocus},get interactOutsideBehavior(){return r()},get loop(){return e.loop},get trapFocus(){return n()},get isValidEvent(){return a()},get onFocusOutside(){return e.onFocusOutside}},()=>o,{forceMount:!0}))}var Cee=q("
"),wee=q("
");function Aee(t,e){const r=In();ye(e,!0);let n=V(e,"id",19,()=>xn(r)),a=V(e,"ref",15,null),i=V(e,"forceMount",3,!1),s=V(e,"side",3,"bottom"),o=V(e,"onInteractOutside",3,Rr),l=V(e,"onEscapeKeydown",3,Rr),c=V(e,"preventScroll",3,!1),u=Ve(e,["$$slots","$$events","$$legacy","id","ref","forceMount","side","onInteractOutside","onEscapeKeydown","children","child","preventScroll","style"]);const d=MN.create({id:Pe(()=>n()),ref:Pe(()=>a(),_=>a(_)),onInteractOutside:Pe(()=>o()),onEscapeKeydown:Pe(()=>l())}),h=F(()=>Er(u,d.props));var m=se(),f=L(m);{var g=_=>{dg(_,ot(()=>p(h),()=>d.popperProps,{get ref(){return d.opts.ref},get side(){return s()},get enabled(){return d.root.opts.open.current},get id(){return n()},get preventScroll(){return c()},forceMount:!0,get shouldRender(){return d.shouldRender},popper:(E,y)=>{let v=()=>y?.().props,T=()=>y?.().wrapperProps;const w=F(()=>Er(v(),{style:d.props.style},{style:e.style}));var A=se(),I=L(A);{var x=$=>{var H=se(),G=L(H);{let K=F(()=>({props:p(w),wrapperProps:T(),...d.snippetProps}));De(G,()=>e.child,()=>p(K))}C($,H)},D=$=>{var H=Cee();$t(H,()=>({...T()}));var G=j(H);$t(G,()=>({...p(w)}));var K=j(G);De(K,()=>e.children??Ge),Y(G),Y(H),C($,H)};le(I,$=>{e.child?$(x):$(D,!1)})}C(E,A)},$$slots:{popper:!0}}))},b=_=>{var S=se(),E=L(S);{var y=v=>{ug(v,ot(()=>p(h),()=>d.popperProps,{get ref(){return d.opts.ref},get side(){return s()},get open(){return d.root.opts.open.current},get id(){return n()},get preventScroll(){return c()},forceMount:!1,get shouldRender(){return d.shouldRender},popper:(w,A)=>{let I=()=>A?.().props,x=()=>A?.().wrapperProps;const D=F(()=>Er(I(),{style:d.props.style},{style:e.style}));var $=se(),H=L($);{var G=z=>{var re=se(),W=L(re);{let ie=F(()=>({props:p(D),wrapperProps:x(),...d.snippetProps}));De(W,()=>e.child,()=>p(ie))}C(z,re)},K=z=>{var re=wee();$t(re,()=>({...x()}));var W=j(re);$t(W,()=>({...p(D)}));var ie=j(W);De(ie,()=>e.children??Ge),Y(W),Y(re),C(z,re)};le(H,z=>{e.child?z(G):z(K,!1)})}C(w,$)},$$slots:{popper:!0}}))};le(E,v=>{i()||v(y)},!0)}C(_,S)};le(f,_=>{i()?_(g):_(b,!1)})}C(t,m),Te()}function UN(t,e){ye(e,!0);let r=V(e,"mounted",15,!1),n=V(e,"onMountedChange",3,Rr);qB(()=>(r(!0),n()(!0),()=>{r(!1),n()(!1)})),Te()}var Ree=q("
"),Oee=q(" ",1);function Nee(t,e){const r=In();ye(e,!0);let n=V(e,"id",19,()=>xn(r)),a=V(e,"ref",15,null),i=V(e,"label",19,()=>e.value),s=V(e,"disabled",3,!1),o=V(e,"onHighlight",3,Rr),l=V(e,"onUnhighlight",3,Rr),c=Ve(e,["$$slots","$$events","$$legacy","id","ref","value","label","disabled","children","child","onHighlight","onUnhighlight"]);const u=kN.create({id:Pe(()=>n()),ref:Pe(()=>a(),_=>a(_)),value:Pe(()=>e.value),disabled:Pe(()=>s()),label:Pe(()=>i()),onHighlight:Pe(()=>o()),onUnhighlight:Pe(()=>l())}),d=F(()=>Er(c,u.props));var h=Oee(),m=L(h);{var f=_=>{var S=se(),E=L(S);{let y=F(()=>({props:p(d),...u.snippetProps}));De(E,()=>e.child,()=>p(y))}C(_,S)},g=_=>{var S=Ree();$t(S,()=>({...p(d)}));var E=j(S);De(E,()=>e.children??Ge,()=>u.snippetProps),Y(S),C(_,S)};le(m,_=>{e.child?_(f):_(g,!1)})}var b=te(m,2);UN(b,{get mounted(){return u.mounted},set mounted(_){u.mounted=_}}),C(t,h),Te()}var Iee=q("
");function xee(t,e){const r=In();ye(e,!0);let n=V(e,"id",19,()=>xn(r)),a=V(e,"ref",15,null),i=Ve(e,["$$slots","$$events","$$legacy","id","ref","children","child"]);const s=LN.create({id:Pe(()=>n()),ref:Pe(()=>a(),h=>a(h))}),o=F(()=>Er(i,s.props));var l=se(),c=L(l);{var u=h=>{var m=se(),f=L(m);De(f,()=>e.child,()=>({props:p(o)})),C(h,m)},d=h=>{var m=Iee();$t(m,()=>({...p(o)}));var f=j(m);De(f,()=>e.children??Ge),Y(m),C(h,m)};le(c,h=>{e.child?h(u):h(d,!1)})}C(t,l),Te()}var Dee=q("
"),Mee=q(" ",1);function kee(t,e){const r=In();ye(e,!0);let n=V(e,"id",19,()=>xn(r)),a=V(e,"ref",15,null),i=V(e,"delay",3,()=>50),s=Ve(e,["$$slots","$$events","$$legacy","id","ref","delay","child","children"]);const o=FN.create({id:Pe(()=>n()),ref:Pe(()=>a(),h=>a(h)),delay:Pe(()=>i())}),l=F(()=>Er(s,o.props));var c=se(),u=L(c);{var d=h=>{var m=Mee(),f=L(m);UN(f,{get mounted(){return o.scrollButtonState.mounted},set mounted(S){o.scrollButtonState.mounted=S}});var g=te(f,2);{var b=S=>{var E=se(),y=L(E);De(y,()=>e.child,()=>({props:s})),C(S,E)},_=S=>{var E=Dee();$t(E,()=>({...p(l)}));var y=j(E);De(y,()=>e.children??Ge),Y(E),C(S,E)};le(g,S=>{e.child?S(b):S(_,!1)})}C(h,m)};le(u,h=>{o.canScrollDown&&h(d)})}C(t,c),Te()}var Pee=q("
"),Lee=q(" ",1);function Fee(t,e){const r=In();ye(e,!0);let n=V(e,"id",19,()=>xn(r)),a=V(e,"ref",15,null),i=V(e,"delay",3,()=>50),s=Ve(e,["$$slots","$$events","$$legacy","id","ref","delay","child","children"]);const o=BN.create({id:Pe(()=>n()),ref:Pe(()=>a(),h=>a(h)),delay:Pe(()=>i())}),l=F(()=>Er(s,o.props));var c=se(),u=L(c);{var d=h=>{var m=Lee(),f=L(m);UN(f,{get mounted(){return o.scrollButtonState.mounted},set mounted(S){o.scrollButtonState.mounted=S}});var g=te(f,2);{var b=S=>{var E=se(),y=L(E);De(y,()=>e.child,()=>({props:s})),C(S,E)},_=S=>{var E=Pee();$t(E,()=>({...p(l)}));var y=j(E);De(y,()=>e.children??Ge),Y(E),C(S,E)};le(g,S=>{e.child?S(b):S(_,!1)})}C(h,m)};le(u,h=>{o.canScrollUp&&h(d)})}C(t,c),Te()}function Bee(t,e){ye(e,!0);let r=V(e,"open",15,!1),n=V(e,"onOpenChange",3,Rr),a=V(e,"onOpenChangeComplete",3,Rr);RZ.create({open:Pe(()=>r(),i=>{r(i),n()?.(i)}),onOpenChangeComplete:Pe(()=>a())}),og(t,{children:(i,s)=>{var o=se(),l=L(o);De(l,()=>e.children??Ge),C(i,o)},$$slots:{default:!0}}),Te()}var Uee=q("
");function Gee(t,e){const r=In();ye(e,!0);let n=V(e,"ref",15,null),a=V(e,"id",19,()=>xn(r)),i=V(e,"disabled",3,!1),s=V(e,"onSelect",3,Rr),o=V(e,"closeOnSelect",3,!0),l=Ve(e,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","onSelect","closeOnSelect"]);const c=JO.create({id:Pe(()=>a()),disabled:Pe(()=>i()),onSelect:Pe(()=>s()),ref:Pe(()=>n(),g=>n(g)),closeOnSelect:Pe(()=>o())}),u=F(()=>Er(l,c.props));var d=se(),h=L(d);{var m=g=>{var b=se(),_=L(b);De(_,()=>e.child,()=>({props:p(u)})),C(g,b)},f=g=>{var b=Uee();$t(b,()=>({...p(u)}));var _=j(b);De(_,()=>e.children??Ge),Y(b),C(g,b)};le(h,g=>{e.child?g(m):g(f,!1)})}C(t,d),Te()}var qee=q("
");function zee(t,e){const r=In();ye(e,!0);let n=V(e,"ref",15,null),a=V(e,"id",19,()=>xn(r)),i=Ve(e,["$$slots","$$events","$$legacy","ref","id","child","children"]);const s=tN.create({id:Pe(()=>a()),ref:Pe(()=>n(),h=>n(h))}),o=F(()=>Er(i,s.props));var l=se(),c=L(l);{var u=h=>{var m=se(),f=L(m);De(f,()=>e.child,()=>({props:p(o)})),C(h,m)},d=h=>{var m=qee();$t(m,()=>({...p(o)}));var f=j(m);De(f,()=>e.children??Ge),Y(m),C(h,m)};le(c,h=>{e.child?h(u):h(d,!1)})}C(t,l),Te()}var $ee=q("
"),Hee=q("
");function Yee(t,e){const r=In();ye(e,!0);let n=V(e,"id",19,()=>xn(r)),a=V(e,"ref",15,null),i=V(e,"loop",3,!0),s=V(e,"onInteractOutside",3,Rr),o=V(e,"forceMount",3,!1),l=V(e,"onEscapeKeydown",3,Rr),c=V(e,"interactOutsideBehavior",3,"defer-otherwise-close"),u=V(e,"escapeKeydownBehavior",3,"defer-otherwise-close"),d=V(e,"onOpenAutoFocus",3,Rr),h=V(e,"onCloseAutoFocus",3,Rr),m=V(e,"onFocusOutside",3,Rr),f=V(e,"side",3,"right"),g=V(e,"trapFocus",3,!1),b=Ve(e,["$$slots","$$events","$$legacy","id","ref","children","child","loop","onInteractOutside","forceMount","onEscapeKeydown","interactOutsideBehavior","escapeKeydownBehavior","onOpenAutoFocus","onCloseAutoFocus","onFocusOutside","side","trapFocus","style"]);const _=OS.create({id:Pe(()=>n()),loop:Pe(()=>i()),ref:Pe(()=>a(),G=>a(G)),isSub:!0,onCloseAutoFocus:Pe(()=>T)});function S(G){const K=G.currentTarget.contains(G.target),z=VX[_.parentMenu.root.opts.dir.current].includes(G.key);K&&z&&(_.parentMenu.onClose(),_.parentMenu.triggerNode?.focus(),G.preventDefault())}const E=F(()=>_.parentMenu.root.getBitsAttr("sub-content")),y=F(()=>Er(b,_.props,{side:f(),onkeydown:S,[p(E)]:""}));function v(G){d()(G),!G.defaultPrevented&&(G.preventDefault(),_.parentMenu.root.isUsingKeyboard&&_.parentMenu.contentNode&&XO.dispatch(_.parentMenu.contentNode))}function T(G){h()(G),!G.defaultPrevented&&G.preventDefault()}function w(G){s()(G),!G.defaultPrevented&&_.parentMenu.onClose()}function A(G){l()(G),!G.defaultPrevented&&_.parentMenu.onClose()}function I(G){m()(G),!G.defaultPrevented&&Lo(G.target)&&G.target.id!==_.parentMenu.triggerNode?.id&&_.parentMenu.onClose()}var x=se(),D=L(x);{var $=G=>{dg(G,ot(()=>p(y),{get ref(){return _.opts.ref},get interactOutsideBehavior(){return c()},get escapeKeydownBehavior(){return u()},onOpenAutoFocus:v,get enabled(){return _.parentMenu.opts.open.current},onInteractOutside:w,onEscapeKeydown:A,onFocusOutside:I,preventScroll:!1,get loop(){return i()},get trapFocus(){return g()},get shouldRender(){return _.shouldRender},popper:(z,re)=>{let W=()=>re?.().props,ie=()=>re?.().wrapperProps;const M=F(()=>Er(W(),p(y),{style:Hc("menu")},{style:e.style}));var B=se(),J=L(B);{var N=U=>{var X=se(),ne=L(X);{let ue=F(()=>({props:p(M),wrapperProps:ie(),..._.snippetProps}));De(ne,()=>e.child,()=>p(ue))}C(U,X)},O=U=>{var X=$ee();$t(X,()=>({...ie()}));var ne=j(X);$t(ne,()=>({...p(M)}));var ue=j(ne);De(ue,()=>e.children??Ge),Y(ne),Y(X),C(U,X)};le(J,U=>{e.child?U(N):U(O,!1)})}C(z,B)},$$slots:{popper:!0}}))},H=G=>{var K=se(),z=L(K);{var re=W=>{ug(W,ot(()=>p(y),{get ref(){return _.opts.ref},get interactOutsideBehavior(){return c()},get escapeKeydownBehavior(){return u()},onCloseAutoFocus:T,onOpenAutoFocus:v,get open(){return _.parentMenu.opts.open.current},onInteractOutside:w,onEscapeKeydown:A,onFocusOutside:I,preventScroll:!1,get loop(){return i()},get trapFocus(){return g()},get shouldRender(){return _.shouldRender},popper:(M,B)=>{let J=()=>B?.().props,N=()=>B?.().wrapperProps;const O=F(()=>Er(J(),p(y),{style:Hc("menu")},{style:e.style}));var U=se(),X=L(U);{var ne=he=>{var be=se(),Z=L(be);{let ae=F(()=>({props:p(O),wrapperProps:N(),..._.snippetProps}));De(Z,()=>e.child,()=>p(ae))}C(he,be)},ue=he=>{var be=Hee();$t(be,()=>({...N()}));var Z=j(be);$t(Z,()=>({...p(O)}));var ae=j(Z);De(ae,()=>e.children??Ge),Y(Z),Y(be),C(he,be)};le(X,he=>{e.child?he(ne):he(ue,!1)})}C(M,U)},$$slots:{popper:!0}}))};le(z,W=>{o()||W(re)},!0)}C(G,K)};le(D,G=>{o()?G($):G(H,!1)})}C(t,x),Te()}var Vee=q("
");function Wee(t,e){const r=In();ye(e,!0);let n=V(e,"id",19,()=>xn(r)),a=V(e,"disabled",3,!1),i=V(e,"ref",15,null),s=V(e,"onSelect",3,Rr),o=V(e,"openDelay",3,100),l=Ve(e,["$$slots","$$events","$$legacy","id","disabled","ref","children","child","onSelect","openDelay"]);const c=eN.create({disabled:Pe(()=>a()),onSelect:Pe(()=>s()),id:Pe(()=>n()),ref:Pe(()=>i(),d=>i(d)),openDelay:Pe(()=>o())}),u=F(()=>Er(l,c.props));cg(t,{get id(){return n()},get ref(){return c.opts.ref},children:(d,h)=>{var m=se(),f=L(m);{var g=_=>{var S=se(),E=L(S);De(E,()=>e.child,()=>({props:p(u)})),C(_,S)},b=_=>{var S=Vee();$t(S,()=>({...p(u)}));var E=j(S);De(E,()=>e.children??Ge),Y(S),C(_,S)};le(f,_=>{e.child?_(g):_(b,!1)})}C(d,m)},$$slots:{default:!0}}),Te()}function jD(t,e){const[r,n]=t;let a=!1;const i=e.length;for(let s=0,o=i-1;s=n!=d>=n&&r<=(u-l)*(n-c)/(d-c)+l&&(a=!a)}return a}function QD(t,e){return t[0]>=e.left&&t[0]<=e.right&&t[1]>=e.top&&t[1]<=e.bottom}function Kee(t,e){const r=t.left+t.width/2,n=t.top+t.height/2,a=e.left+e.width/2,i=e.top+e.height/2,s=a-r,o=i-n;return Math.abs(s)>Math.abs(o)?s>0?"right":"left":o>0?"bottom":"top"}class wU{#e;#t;#r=null;#n=null;constructor(e){this.#e=e,this.#t=e.buffer??1,nn([e.triggerNode,e.contentNode,e.enabled],([r,n,a])=>{if(!r||!n||!a){this.#r=null,this.#n=null;return}const i=em(r),s=d=>{this.#i(d,r,n)},o=d=>{const h=d.relatedTarget;Mc(h)&&n.contains(h)||(this.#r=[d.clientX,d.clientY],this.#n="content")},l=()=>{this.#r=null,this.#n=null},c=()=>{this.#r=null,this.#n=null},u=d=>{const h=d.relatedTarget;Mc(h)&&r.contains(h)||(this.#r=[d.clientX,d.clientY],this.#n="trigger")};return[Kr(i,"pointermove",s),Kr(r,"pointerleave",o),Kr(r,"pointerenter",l),Kr(n,"pointerenter",c),Kr(n,"pointerleave",u)].reduce((d,h)=>()=>{d(),h()},()=>{})})}#i(e,r,n){if(!this.#r||!this.#n)return;const a=[e.clientX,e.clientY],i=r.getBoundingClientRect(),s=n.getBoundingClientRect();if(this.#n==="content"&&QD(a,s)){this.#r=null,this.#n=null;return}if(this.#n==="trigger"&&QD(a,i)){this.#r=null,this.#n=null;return}const o=Kee(i,s),l=this.#a(i,s,o);if(l&&jD(a,l))return;const c=this.#n==="content"?s:i,u=this.#s(this.#r,c,o,this.#n);jD(a,u)||(this.#r=null,this.#n=null,this.#e.onPointerExit())}#a(e,r,n){const a=this.#t;switch(n){case"top":return[[Math.min(e.left,r.left)-a,e.top],[Math.min(e.left,r.left)-a,r.bottom],[Math.max(e.right,r.right)+a,r.bottom],[Math.max(e.right,r.right)+a,e.top]];case"bottom":return[[Math.min(e.left,r.left)-a,e.bottom],[Math.min(e.left,r.left)-a,r.top],[Math.max(e.right,r.right)+a,r.top],[Math.max(e.right,r.right)+a,e.bottom]];case"left":return[[e.left,Math.min(e.top,r.top)-a],[r.right,Math.min(e.top,r.top)-a],[r.right,Math.max(e.bottom,r.bottom)+a],[e.left,Math.max(e.bottom,r.bottom)+a]];case"right":return[[e.right,Math.min(e.top,r.top)-a],[r.left,Math.min(e.top,r.top)-a],[r.left,Math.max(e.bottom,r.bottom)+a],[e.right,Math.max(e.bottom,r.bottom)+a]]}}#s(e,r,n,a){const i=this.#t*4,[s,o]=e;switch(a==="trigger"?this.#o(n):n){case"top":return[[s-i,o+i],[s+i,o+i],[r.right+i,r.bottom],[r.right+i,r.top],[r.left-i,r.top],[r.left-i,r.bottom]];case"bottom":return[[s-i,o-i],[s+i,o-i],[r.right+i,r.top],[r.right+i,r.bottom],[r.left-i,r.bottom],[r.left-i,r.top]];case"left":return[[s+i,o-i],[s+i,o+i],[r.right,r.bottom+i],[r.left,r.bottom+i],[r.left,r.top-i],[r.right,r.top-i]];case"right":return[[s-i,o-i],[s-i,o+i],[r.left,r.bottom+i],[r.right,r.bottom+i],[r.right,r.top-i],[r.left,r.top-i]]}}#o(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}}const cR=jl({component:"popover",parts:["root","trigger","content","close","overlay"]}),GN=new ka("Popover.Root");class qN{static create(e){return GN.set(new qN(e))}opts;#e=_e(null);get contentNode(){return p(this.#e)}set contentNode(e){k(this.#e,e,!0)}contentPresence;#t=_e(null);get triggerNode(){return p(this.#t)}set triggerNode(e){k(this.#t,e,!0)}#r=_e(null);get overlayNode(){return p(this.#r)}set overlayNode(e){k(this.#r,e,!0)}overlayPresence;#n=_e(!1);get openedViaHover(){return p(this.#n)}set openedViaHover(e){k(this.#n,e,!0)}#i=_e(!1);get hasInteractedWithContent(){return p(this.#i)}set hasInteractedWithContent(e){k(this.#i,e,!0)}#a=_e(!1);get hoverCooldown(){return p(this.#a)}set hoverCooldown(e){k(this.#a,e,!0)}#s=_e(0);get closeDelay(){return p(this.#s)}set closeDelay(e){k(this.#s,e,!0)}#o=null;#l=null;constructor(e){this.opts=e,this.contentPresence=new Bu({ref:Pe(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new Bu({ref:Pe(()=>this.overlayNode),open:this.opts.open}),nn(()=>this.opts.open.current,r=>{r||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#c())})}setDomContext(e){this.#l=e}#c(){this.#o!==null&&this.#l&&(this.#l.clearTimeout(this.#o),this.#o=null)}toggleOpen(){this.#c(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#c(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#c(),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#c(),this.closeDelay<=0?this.opts.open.current=!1:this.#l&&(this.#o=this.#l.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#o=null},this.closeDelay))))}cancelDelayedClose(){this.#c()}markInteraction(){this.hasInteractedWithContent=!0,this.#c()}}class zN{static create(e){return new zN(e,GN.get())}opts;root;attachment;domContext;#e=null;#t=null;#r=_e(!1);constructor(e,r){this.opts=e,this.root=r,this.attachment=vn(this.opts.ref,n=>this.root.triggerNode=n),this.domContext=new au(e.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),nn(()=>this.opts.closeDelay.current,n=>{this.root.closeDelay=n})}#n(){this.#e!==null&&(this.domContext.clearTimeout(this.#e),this.#e=null)}#i(){this.#t!==null&&(this.domContext.clearTimeout(this.#t),this.#t=null)}#a(){this.#n(),this.#i()}onpointerenter(e){if(this.opts.disabled.current||!this.opts.openOnHover.current||j1(e)||(k(this.#r,!0),this.#i(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;const r=this.opts.openDelay.current;r<=0?this.root.handleHoverOpen():this.#e=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#e=null},r)}onpointerleave(e){this.opts.disabled.current||this.opts.openOnHover.current&&(j1(e)||(k(this.#r,!1),this.#n(),this.root.hoverCooldown=!1))}onclick(e){if(!this.opts.disabled.current&&e.button===0){if(this.#a(),p(this.#r)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}p(this.#r)&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(e){this.opts.disabled.current||(e.key===Yl||e.key===so)&&(e.preventDefault(),this.#a(),this.root.toggleOpen())}#s(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#o=F(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":Gc(this.root.opts.open.current),"data-state":dl(this.root.opts.open.current),"aria-controls":this.#s(),[cR.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return p(this.#o)}set props(e){k(this.#o,e)}}class $N{static create(e){return new $N(e,GN.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=vn(this.opts.ref,n=>this.root.contentNode=n),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new wU({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(e){this.root.markInteraction()}onfocusin(e){const r=e.target;Mc(r)&&AS(r)&&this.root.markInteraction()}onpointerenter(e){j1(e)||this.root.cancelDelayedClose()}onpointerleave(e){j1(e)}onInteractOutside=e=>{if(this.opts.onInteractOutside.current(e),e.defaultPrevented||!Mc(e.target))return;const r=e.target.closest(cR.selector("trigger"));if(!(r&&r===this.root.triggerNode)){if(this.opts.customAnchor.current){if(Mc(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(e.target))return}else if(typeof this.opts.customAnchor.current=="string"){const n=document.querySelector(this.opts.customAnchor.current);if(n&&n.contains(e.target))return}}this.root.handleClose()}};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#e=F(()=>({open:this.root.opts.open.current}));get snippetProps(){return p(this.#e)}set snippetProps(e){k(this.#e,e)}#t=F(()=>({id:this.opts.id.current,tabindex:-1,"data-state":dl(this.root.opts.open.current),[cR.content]:"",style:{pointerEvents:"auto",contain:"layout style paint"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return p(this.#t)}set props(e){k(this.#t,e)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}}var jee=q("
"),Qee=q("
");function Xee(t,e){const r=In();ye(e,!0);let n=V(e,"ref",15,null),a=V(e,"id",19,()=>xn(r)),i=V(e,"forceMount",3,!1),s=V(e,"onOpenAutoFocus",3,Rr),o=V(e,"onCloseAutoFocus",3,Rr),l=V(e,"onEscapeKeydown",3,Rr),c=V(e,"onInteractOutside",3,Rr),u=V(e,"trapFocus",3,!0),d=V(e,"preventScroll",3,!1),h=V(e,"customAnchor",3,null),m=Ve(e,["$$slots","$$events","$$legacy","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]);const f=$N.create({id:Pe(()=>a()),ref:Pe(()=>n(),T=>n(T)),onInteractOutside:Pe(()=>c()),onEscapeKeydown:Pe(()=>l()),customAnchor:Pe(()=>h())}),g=F(()=>Er(m,f.props)),b=F(()=>u()&&f.shouldTrapFocus);function _(T){f.shouldTrapFocus||T.preventDefault(),s()(T)}var S=se(),E=L(S);{var y=T=>{dg(T,ot(()=>p(g),()=>f.popperProps,{get ref(){return f.opts.ref},get enabled(){return f.root.opts.open.current},get id(){return a()},get trapFocus(){return p(b)},get preventScroll(){return d()},loop:!0,forceMount:!0,get customAnchor(){return h()},onOpenAutoFocus:_,get onCloseAutoFocus(){return o()},get shouldRender(){return f.shouldRender},popper:(A,I)=>{let x=()=>I?.().props,D=()=>I?.().wrapperProps;const $=F(()=>Er(x(),{style:Hc("popover")},{style:e.style}));var H=se(),G=L(H);{var K=re=>{var W=se(),ie=L(W);{let M=F(()=>({props:p($),wrapperProps:D(),...f.snippetProps}));De(ie,()=>e.child,()=>p(M))}C(re,W)},z=re=>{var W=jee();$t(W,()=>({...D()}));var ie=j(W);$t(ie,()=>({...p($)}));var M=j(ie);De(M,()=>e.children??Ge),Y(ie),Y(W),C(re,W)};le(G,re=>{e.child?re(K):re(z,!1)})}C(A,H)},$$slots:{popper:!0}}))},v=T=>{var w=se(),A=L(w);{var I=x=>{ug(x,ot(()=>p(g),()=>f.popperProps,{get ref(){return f.opts.ref},get open(){return f.root.opts.open.current},get id(){return a()},get trapFocus(){return p(b)},get preventScroll(){return d()},loop:!0,forceMount:!1,get customAnchor(){return h()},onOpenAutoFocus:_,get onCloseAutoFocus(){return o()},get shouldRender(){return f.shouldRender},popper:($,H)=>{let G=()=>H?.().props,K=()=>H?.().wrapperProps;const z=F(()=>Er(G(),{style:Hc("popover")},{style:e.style}));var re=se(),W=L(re);{var ie=B=>{var J=se(),N=L(J);{let O=F(()=>({props:p(z),wrapperProps:K(),...f.snippetProps}));De(N,()=>e.child,()=>p(O))}C(B,J)},M=B=>{var J=Qee();$t(J,()=>({...K()}));var N=j(J);$t(N,()=>({...p(z)}));var O=j(N);De(O,()=>e.children??Ge),Y(N),Y(J),C(B,J)};le(W,B=>{e.child?B(ie):B(M,!1)})}C($,re)},$$slots:{popper:!0}}))};le(A,x=>{i()||x(I)},!0)}C(T,w)};le(E,T=>{i()?T(y):T(v,!1)})}C(t,S),Te()}var Zee=q("");function Jee(t,e){const r=In();ye(e,!0);let n=V(e,"id",19,()=>xn(r)),a=V(e,"ref",15,null),i=V(e,"type",3,"button"),s=V(e,"disabled",3,!1),o=V(e,"openOnHover",3,!1),l=V(e,"openDelay",3,700),c=V(e,"closeDelay",3,300),u=Ve(e,["$$slots","$$events","$$legacy","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]);const d=zN.create({id:Pe(()=>n()),ref:Pe(()=>a(),m=>a(m)),disabled:Pe(()=>!!s()),openOnHover:Pe(()=>o()),openDelay:Pe(()=>l()),closeDelay:Pe(()=>c())}),h=F(()=>Er(u,d.props,{type:i()}));cg(t,{get id(){return n()},get ref(){return d.opts.ref},children:(m,f)=>{var g=se(),b=L(g);{var _=E=>{var y=se(),v=L(y);De(v,()=>e.child,()=>({props:p(h)})),C(E,y)},S=E=>{var y=Zee();$t(y,()=>({...p(h)}));var v=j(y);De(v,()=>e.children??Ge),Y(y),C(E,y)};le(b,E=>{e.child?E(_):E(S,!1)})}C(m,g)},$$slots:{default:!0}}),Te()}function HN(t,e){ye(e,!0);let r=V(e,"open",15,!1),n=V(e,"onOpenChange",3,Rr),a=V(e,"onOpenChangeComplete",3,Rr);CS.create({variant:Pe(()=>"dialog"),open:Pe(()=>r(),o=>{r(o),n()(o)}),onOpenChangeComplete:Pe(()=>a())});var i=se(),s=L(i);De(s,()=>e.children??Ge),C(t,i),Te()}var ete=q("");function YN(t,e){const r=In();ye(e,!0);let n=V(e,"id",19,()=>xn(r)),a=V(e,"ref",15,null),i=V(e,"disabled",3,!1),s=Ve(e,["$$slots","$$events","$$legacy","children","child","id","ref","disabled"]);const o=qO.create({variant:Pe(()=>"close"),id:Pe(()=>n()),ref:Pe(()=>a(),m=>a(m)),disabled:Pe(()=>!!i())}),l=F(()=>Er(s,o.props));var c=se(),u=L(c);{var d=m=>{var f=se(),g=L(f);De(g,()=>e.child,()=>({props:p(l)})),C(m,f)},h=m=>{var f=ete();$t(f,()=>({...p(l)}));var g=j(f);De(g,()=>e.children??Ge),Y(f),C(m,f)};le(u,m=>{e.child?m(d):m(h,!1)})}C(t,c),Te()}var tte=q(" ",1),rte=q("
",1);function VN(t,e){const r=In();ye(e,!0);let n=V(e,"id",19,()=>xn(r)),a=V(e,"ref",15,null),i=V(e,"forceMount",3,!1),s=V(e,"onCloseAutoFocus",3,Rr),o=V(e,"onOpenAutoFocus",3,Rr),l=V(e,"onEscapeKeydown",3,Rr),c=V(e,"onInteractOutside",3,Rr),u=V(e,"trapFocus",3,!0),d=V(e,"preventScroll",3,!0),h=V(e,"restoreScrollDelay",3,null),m=Ve(e,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const f=wS.create({id:Pe(()=>n()),ref:Pe(()=>a(),E=>a(E))}),g=F(()=>Er(m,f.props));var b=se(),_=L(b);{var S=E=>{cN(E,{get ref(){return f.opts.ref},loop:!0,get trapFocus(){return u()},get enabled(){return f.root.opts.open.current},get onOpenAutoFocus(){return o()},get onCloseAutoFocus(){return s()},focusScope:(v,T)=>{let w=()=>T?.().props;sN(v,ot(()=>p(g),{get enabled(){return f.root.opts.open.current},get ref(){return f.opts.ref},onEscapeKeydown:A=>{l()(A),!A.defaultPrevented&&f.root.handleClose()},children:(A,I)=>{aN(A,ot(()=>p(g),{get ref(){return f.opts.ref},get enabled(){return f.root.opts.open.current},onInteractOutside:x=>{c()(x),!x.defaultPrevented&&f.root.handleClose()},children:(x,D)=>{dN(x,ot(()=>p(g),{get ref(){return f.opts.ref},get enabled(){return f.root.opts.open.current},children:($,H)=>{var G=se(),K=L(G);{var z=W=>{var ie=tte(),M=L(ie);{var B=N=>{xp(N,{get preventScroll(){return d()},get restoreScrollDelay(){return h()}})};le(M,N=>{f.root.opts.open.current&&N(B)})}var J=te(M,2);{let N=F(()=>({props:Er(p(g),w()),...f.snippetProps}));De(J,()=>e.child,()=>p(N))}C(W,ie)},re=W=>{var ie=rte(),M=L(ie);xp(M,{get preventScroll(){return d()}});var B=te(M,2);$t(B,N=>({...N}),[()=>Er(p(g),w())]);var J=j(B);De(J,()=>e.children??Ge),Y(B),C(W,ie)};le(K,W=>{e.child?W(z):W(re,!1)})}C($,G)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};le(_,E=>{(f.shouldRender||i())&&E(S)})}C(t,b),Te()}function nte(t,e){ye(e,!0);let r=V(e,"open",15,!1),n=V(e,"dir",3,"ltr"),a=V(e,"onOpenChange",3,Rr),i=V(e,"onOpenChangeComplete",3,Rr),s=V(e,"_internal_variant",3,"dropdown-menu");const o=ZO.create({variant:Pe(()=>s()),dir:Pe(()=>n()),onClose:()=>{r(!1),a()(!1)}});RS.create({open:Pe(()=>r(),l=>{r(l),a()(l)}),onOpenChangeComplete:Pe(()=>i())},o),og(t,{children:(l,c)=>{var u=se(),d=L(u);De(d,()=>e.children??Ge),C(l,u)},$$slots:{default:!0}}),Te()}var ate=q("
"),ite=q("
");function ste(t,e){const r=In();ye(e,!0);let n=V(e,"id",19,()=>xn(r)),a=V(e,"ref",15,null),i=V(e,"loop",3,!0),s=V(e,"onInteractOutside",3,Rr),o=V(e,"onEscapeKeydown",3,Rr),l=V(e,"onCloseAutoFocus",3,Rr),c=V(e,"forceMount",3,!1),u=V(e,"trapFocus",3,!1),d=Ve(e,["$$slots","$$events","$$legacy","id","child","children","ref","loop","onInteractOutside","onEscapeKeydown","onCloseAutoFocus","forceMount","trapFocus","style"]);const h=OS.create({id:Pe(()=>n()),loop:Pe(()=>i()),ref:Pe(()=>a(),y=>a(y)),onCloseAutoFocus:Pe(()=>l())}),m=F(()=>Er(d,h.props));function f(y){if(h.handleInteractOutside(y),!y.defaultPrevented&&(s()(y),!y.defaultPrevented)){if(y.target&&y.target instanceof Element){const v=`[${h.parentMenu.root.getBitsAttr("sub-content")}]`;if(y.target.closest(v))return}h.parentMenu.onClose()}}function g(y){o()(y),!y.defaultPrevented&&h.parentMenu.onClose()}var b=se(),_=L(b);{var S=y=>{dg(y,ot(()=>p(m),()=>h.popperProps,{get ref(){return h.opts.ref},get enabled(){return h.parentMenu.opts.open.current},onInteractOutside:f,onEscapeKeydown:g,get trapFocus(){return u()},get loop(){return i()},forceMount:!0,get id(){return n()},get shouldRender(){return h.shouldRender},popper:(T,w)=>{let A=()=>w?.().props,I=()=>w?.().wrapperProps;const x=F(()=>Er(A(),{style:Hc("dropdown-menu")},{style:e.style}));var D=se(),$=L(D);{var H=K=>{var z=se(),re=L(z);{let W=F(()=>({props:p(x),wrapperProps:I(),...h.snippetProps}));De(re,()=>e.child,()=>p(W))}C(K,z)},G=K=>{var z=ate();$t(z,()=>({...I()}));var re=j(z);$t(re,()=>({...p(x)}));var W=j(re);De(W,()=>e.children??Ge),Y(re),Y(z),C(K,z)};le($,K=>{e.child?K(H):K(G,!1)})}C(T,D)},$$slots:{popper:!0}}))},E=y=>{var v=se(),T=L(v);{var w=A=>{ug(A,ot(()=>p(m),()=>h.popperProps,{get ref(){return h.opts.ref},get open(){return h.parentMenu.opts.open.current},onInteractOutside:f,onEscapeKeydown:g,get trapFocus(){return u()},get loop(){return i()},forceMount:!1,get id(){return n()},get shouldRender(){return h.shouldRender},popper:(x,D)=>{let $=()=>D?.().props,H=()=>D?.().wrapperProps;const G=F(()=>Er($(),{style:Hc("dropdown-menu")},{style:e.style}));var K=se(),z=L(K);{var re=ie=>{var M=se(),B=L(M);{let J=F(()=>({props:p(G),wrapperProps:H(),...h.snippetProps}));De(B,()=>e.child,()=>p(J))}C(ie,M)},W=ie=>{var M=ite();$t(M,()=>({...H()}));var B=j(M);$t(B,()=>({...p(G)}));var J=j(B);De(J,()=>e.children??Ge),Y(B),Y(M),C(ie,M)};le(z,ie=>{e.child?ie(re):ie(W,!1)})}C(x,K)},$$slots:{popper:!0}}))};le(T,A=>{c()||A(w)},!0)}C(y,v)};le(_,y=>{c()?y(S):y(E,!1)})}C(t,b),Te()}var ote=q("");function lte(t,e){const r=In();ye(e,!0);let n=V(e,"id",19,()=>xn(r)),a=V(e,"ref",15,null),i=V(e,"disabled",3,!1),s=V(e,"type",3,"button"),o=Ve(e,["$$slots","$$events","$$legacy","id","ref","child","children","disabled","type"]);const l=rN.create({id:Pe(()=>n()),disabled:Pe(()=>i()??!1),ref:Pe(()=>a(),u=>a(u))}),c=F(()=>Er(o,l.props,{type:s()}));cg(t,{get id(){return n()},get ref(){return l.opts.ref},children:(u,d)=>{var h=se(),m=L(h);{var f=b=>{var _=se(),S=L(_);De(S,()=>e.child,()=>({props:p(c)})),C(b,_)},g=b=>{var _=ote();$t(_,()=>({...p(c)}));var S=j(_);De(S,()=>e.children??Ge),Y(_),C(b,_)};le(m,b=>{e.child?b(f):b(g,!1)})}C(u,h)},$$slots:{default:!0}}),Te()}const cte=jl({component:"label",parts:["root"]});class WN{static create(e){return new WN(e)}opts;attachment;constructor(e){this.opts=e,this.attachment=vn(this.opts.ref),this.onmousedown=this.onmousedown.bind(this)}onmousedown(e){e.detail>1&&e.preventDefault()}#e=F(()=>({id:this.opts.id.current,[cte.root]:"",onmousedown:this.onmousedown,...this.attachment}));get props(){return p(this.#e)}set props(e){k(this.#e,e)}}var ute=q("");function dte(t,e){const r=In();ye(e,!0);let n=V(e,"id",19,()=>xn(r)),a=V(e,"ref",15,null),i=Ve(e,["$$slots","$$events","$$legacy","children","child","id","ref","for"]);const s=WN.create({id:Pe(()=>n()),ref:Pe(()=>a(),h=>a(h))}),o=F(()=>Er(i,s.props,{for:e.for}));var l=se(),c=L(l);{var u=h=>{var m=se(),f=L(m);De(f,()=>e.child,()=>({props:p(o)})),C(h,m)},d=h=>{var m=ute();$t(m,()=>({...p(o),for:e.for}));var f=j(m);De(f,()=>e.children??Ge),Y(m),C(h,m)};le(c,h=>{e.child?h(u):h(d,!1)})}C(t,l),Te()}class Mp{#e;#t;constructor(e,r){this.#e=e,this.#t=r,this.handler=this.handler.bind(this),It(this.handler)}handler(){let e=0;const r=this.#e();if(!r)return;const n=new ResizeObserver(()=>{cancelAnimationFrame(e),e=window.requestAnimationFrame(this.#t)});return n.observe(r),()=>{window.cancelAnimationFrame(e),n.unobserve(r)}}}class AU{state;#e;constructor(e,r){this.state=us(e),this.#e=r,this.dispatch=this.dispatch.bind(this)}#t(e){return this.#e[this.state.current][e]??this.state.current}dispatch(e){this.state.current=this.#t(e)}}const XD=new WeakMap,hte=16,pte={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}};class mte{opts;#e=_e("none");get prevAnimationNameState(){return p(this.#e)}set prevAnimationNameState(e){k(this.#e,e,!0)}#t=_e(Tr({display:"",animationName:"none"}));get styles(){return p(this.#t)}set styles(e){k(this.#t,e,!0)}initialStatus;previousPresent;machine;present;constructor(e){this.opts=e,this.present=this.opts.open,this.initialStatus=e.open.current?"mounted":"unmounted",this.previousPresent=new GB(()=>this.present.current),this.machine=new AU(this.initialStatus,pte),this.handleAnimationEnd=this.handleAnimationEnd.bind(this),this.handleAnimationStart=this.handleAnimationStart.bind(this),fte(this),gte(this),_te(this)}handleAnimationEnd(e){if(!this.opts.ref.current)return;const r=this.styles.animationName||ob(this.opts.ref.current),n=r.includes(e.animationName)||r==="none";e.target===this.opts.ref.current&&n&&this.machine.dispatch("ANIMATION_END")}handleAnimationStart(e){if(this.opts.ref.current&&e.target===this.opts.ref.current){const r=ob(this.opts.ref.current,!0);this.prevAnimationNameState=r,this.styles.animationName=r}}#r=F(()=>["mounted","unmountSuspended"].includes(this.machine.state.current));get isPresent(){return p(this.#r)}set isPresent(e){k(this.#r,e)}}function fte(t){nn(()=>t.present.current,()=>{if(!t.opts.ref.current||!(t.present.current!==t.previousPresent.current))return;const r=t.prevAnimationNameState,n=ob(t.opts.ref.current,!0);if(t.styles.animationName=n,t.present.current)t.machine.dispatch("MOUNT");else if(n==="none"||t.styles.display==="none")t.machine.dispatch("UNMOUNT");else{const a=r!==n;t.previousPresent.current&&a?t.machine.dispatch("ANIMATION_OUT"):t.machine.dispatch("UNMOUNT")}})}function gte(t){nn(()=>t.machine.state.current,()=>{if(!t.opts.ref.current)return;const e=t.machine.state.current==="mounted"?ob(t.opts.ref.current,!0):"none";t.prevAnimationNameState=e,t.styles.animationName=e})}function _te(t){nn(()=>t.opts.ref.current,()=>{if(!t.opts.ref.current)return;const e=getComputedStyle(t.opts.ref.current);return t.styles={display:e.display,animationName:e.animationName||"none"},Dc(Kr(t.opts.ref.current,"animationstart",t.handleAnimationStart),Kr(t.opts.ref.current,"animationcancel",t.handleAnimationEnd),Kr(t.opts.ref.current,"animationend",t.handleAnimationEnd))})}function ob(t,e=!1){if(!t)return"none";const r=performance.now(),n=XD.get(t);if(!e&&n&&r-n.timestampe.open),ref:e.ref});var n=se(),a=L(n);{var i=s=>{var o=se(),l=L(o);De(l,()=>e.presence??Ge,()=>({present:r.isPresent})),C(s,o)};le(a,s=>{(e.forceMount||e.open||r.isPresent)&&s(i)})}C(t,n),Te()}function bte(t,e){ye(e,!0);let r=V(e,"open",15,!1),n=V(e,"onOpenChange",3,Rr),a=V(e,"onOpenChangeComplete",3,Rr);qN.create({open:Pe(()=>r(),i=>{r(i),n()(i)}),onOpenChangeComplete:Pe(()=>a())}),og(t,{children:(i,s)=>{var o=se(),l=L(o);De(l,()=>e.children??Ge),C(i,o)},$$slots:{default:!0}}),Te()}function Ste(t,e,r){return Math.min(r,Math.max(e,t))}const hg=jl({component:"scroll-area",parts:["root","viewport","corner","thumb","scrollbar"]}),pg=new ka("ScrollArea.Root"),mg=new ka("ScrollArea.Scrollbar"),PS=new ka("ScrollArea.ScrollbarVisible"),KN=new ka("ScrollArea.ScrollbarAxis"),RU=new ka("ScrollArea.ScrollbarShared");class jN{static create(e){return pg.set(new jN(e))}opts;attachment;#e=_e(null);get scrollAreaNode(){return p(this.#e)}set scrollAreaNode(e){k(this.#e,e,!0)}#t=_e(null);get viewportNode(){return p(this.#t)}set viewportNode(e){k(this.#t,e,!0)}#r=_e(null);get contentNode(){return p(this.#r)}set contentNode(e){k(this.#r,e,!0)}#n=_e(null);get scrollbarXNode(){return p(this.#n)}set scrollbarXNode(e){k(this.#n,e,!0)}#i=_e(null);get scrollbarYNode(){return p(this.#i)}set scrollbarYNode(e){k(this.#i,e,!0)}#a=_e(0);get cornerWidth(){return p(this.#a)}set cornerWidth(e){k(this.#a,e,!0)}#s=_e(0);get cornerHeight(){return p(this.#s)}set cornerHeight(e){k(this.#s,e,!0)}#o=_e(!1);get scrollbarXEnabled(){return p(this.#o)}set scrollbarXEnabled(e){k(this.#o,e,!0)}#l=_e(!1);get scrollbarYEnabled(){return p(this.#l)}set scrollbarYEnabled(e){k(this.#l,e,!0)}domContext;constructor(e){this.opts=e,this.attachment=vn(e.ref,r=>this.scrollAreaNode=r),this.domContext=new au(e.ref)}#c=F(()=>({id:this.opts.id.current,dir:this.opts.dir.current,style:{position:"relative","--bits-scroll-area-corner-height":`${this.cornerHeight}px`,"--bits-scroll-area-corner-width":`${this.cornerWidth}px`},[hg.root]:"",...this.attachment}));get props(){return p(this.#c)}set props(e){k(this.#c,e)}}class QN{static create(e){return new QN(e,pg.get())}opts;root;attachment;#e=us(tm());#t=us(null);contentAttachment=vn(this.#t,e=>this.root.contentNode=e);constructor(e,r){this.opts=e,this.root=r,this.attachment=vn(e.ref,n=>this.root.viewportNode=n)}#r=F(()=>({id:this.opts.id.current,style:{overflowX:this.root.scrollbarXEnabled?"scroll":"hidden",overflowY:this.root.scrollbarYEnabled?"scroll":"hidden"},[hg.viewport]:"",...this.attachment}));get props(){return p(this.#r)}set props(e){k(this.#r,e)}#n=F(()=>({id:this.#e.current,"data-scroll-area-content":"",style:{minWidth:this.root.scrollbarXEnabled?"fit-content":void 0},...this.contentAttachment}));get contentProps(){return p(this.#n)}set contentProps(e){k(this.#n,e)}}class XN{static create(e){return mg.set(new XN(e,pg.get()))}opts;root;#e=F(()=>this.opts.orientation.current==="horizontal");get isHorizontal(){return p(this.#e)}set isHorizontal(e){k(this.#e,e)}#t=_e(!1);get hasThumb(){return p(this.#t)}set hasThumb(e){k(this.#t,e,!0)}constructor(e,r){this.opts=e,this.root=r,nn(()=>this.isHorizontal,n=>n?(this.root.scrollbarXEnabled=!0,()=>{this.root.scrollbarXEnabled=!1}):(this.root.scrollbarYEnabled=!0,()=>{this.root.scrollbarYEnabled=!1}))}}class ZN{static create(){return new ZN(mg.get())}scrollbar;root;#e=_e(!1);get isVisible(){return p(this.#e)}set isVisible(e){k(this.#e,e,!0)}constructor(e){this.scrollbar=e,this.root=e.root,It(()=>{const r=this.root.scrollAreaNode,n=this.root.opts.scrollHideDelay.current;let a=0;if(!r)return;const i=()=>{this.root.domContext.clearTimeout(a),Nn(()=>this.isVisible=!0)},s=()=>{a&&this.root.domContext.clearTimeout(a),a=this.root.domContext.setTimeout(()=>{Nn(()=>{this.scrollbar.hasThumb=!1,this.isVisible=!1})},n)},o=Dc(Kr(r,"pointerenter",i),Kr(r,"pointerleave",s));return()=>{this.root.domContext.getWindow().clearTimeout(a),o()}})}#t=F(()=>({"data-state":this.isVisible?"visible":"hidden"}));get props(){return p(this.#t)}set props(e){k(this.#t,e)}}class JN{static create(){return new JN(mg.get())}scrollbar;root;machine=new AU("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});#e=F(()=>this.machine.state.current==="hidden");get isHidden(){return p(this.#e)}set isHidden(e){k(this.#e,e)}constructor(e){this.scrollbar=e,this.root=e.root;const r=ES(()=>this.machine.dispatch("SCROLL_END"),100);It(()=>{const n=this.machine.state.current,a=this.root.opts.scrollHideDelay.current;if(n==="idle"){const i=this.root.domContext.setTimeout(()=>this.machine.dispatch("HIDE"),a);return()=>this.root.domContext.clearTimeout(i)}}),It(()=>{const n=this.root.viewportNode;if(!n)return;const a=this.scrollbar.isHorizontal?"scrollLeft":"scrollTop";let i=n[a];return Kr(n,"scroll",()=>{const l=n[a];i!==l&&(this.machine.dispatch("SCROLL"),r()),i=l})}),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this)}onpointerenter(e){this.machine.dispatch("POINTER_ENTER")}onpointerleave(e){this.machine.dispatch("POINTER_LEAVE")}#t=F(()=>({"data-state":this.machine.state.current==="hidden"?"hidden":"visible",onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave}));get props(){return p(this.#t)}set props(e){k(this.#t,e)}}class LS{static create(){return new LS(mg.get())}scrollbar;root;#e=_e(!1);get isVisible(){return p(this.#e)}set isVisible(e){k(this.#e,e,!0)}constructor(e){this.scrollbar=e,this.root=e.root;const r=ES(()=>{const n=this.root.viewportNode;if(!n)return;const a=n.offsetWidththis.root.viewportNode,r),new Mp(()=>this.root.contentNode,r)}#t=F(()=>({"data-state":this.isVisible?"visible":"hidden"}));get props(){return p(this.#t)}set props(e){k(this.#t,e)}}class eI{static create(){return PS.set(new eI(mg.get()))}scrollbar;root;#e=_e(null);get thumbNode(){return p(this.#e)}set thumbNode(e){k(this.#e,e,!0)}#t=_e(0);get pointerOffset(){return p(this.#t)}set pointerOffset(e){k(this.#t,e,!0)}#r=_e({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}});get sizes(){return p(this.#r)}set sizes(e){k(this.#r,e)}#n=F(()=>OU(this.sizes.viewport,this.sizes.content));get thumbRatio(){return p(this.#n)}set thumbRatio(e){k(this.#n,e)}#i=F(()=>this.thumbRatio>0&&this.thumbRatio<1);get hasThumb(){return p(this.#i)}set hasThumb(e){k(this.#i,e)}#a=_e("");get prevTransformStyle(){return p(this.#a)}set prevTransformStyle(e){k(this.#a,e,!0)}constructor(e){this.scrollbar=e,this.root=e.root,It(()=>{this.scrollbar.hasThumb=this.hasThumb}),It(()=>{!this.scrollbar.hasThumb&&this.thumbNode&&(this.prevTransformStyle=this.thumbNode.style.transform)})}setSizes(e){this.sizes=e}getScrollPosition(e,r){return Ete({pointerPos:e,pointerOffset:this.pointerOffset,sizes:this.sizes,dir:r})}onThumbPointerUp(){this.pointerOffset=0}onThumbPointerDown(e){this.pointerOffset=e}xOnThumbPositionChange(){if(!(this.root.viewportNode&&this.thumbNode))return;const e=this.root.viewportNode.scrollLeft,n=`translate3d(${ZD({scrollPos:e,sizes:this.sizes,dir:this.root.opts.dir.current})}px, 0, 0)`;this.thumbNode.style.transform=n,this.prevTransformStyle=n}xOnWheelScroll(e){this.root.viewportNode&&(this.root.viewportNode.scrollLeft=e)}xOnDragScroll(e){this.root.viewportNode&&(this.root.viewportNode.scrollLeft=this.getScrollPosition(e,this.root.opts.dir.current))}yOnThumbPositionChange(){if(!(this.root.viewportNode&&this.thumbNode))return;const e=this.root.viewportNode.scrollTop,n=`translate3d(0, ${ZD({scrollPos:e,sizes:this.sizes})}px, 0)`;this.thumbNode.style.transform=n,this.prevTransformStyle=n}yOnWheelScroll(e){this.root.viewportNode&&(this.root.viewportNode.scrollTop=e)}yOnDragScroll(e){this.root.viewportNode&&(this.root.viewportNode.scrollTop=this.getScrollPosition(e,this.root.opts.dir.current))}}class tI{static create(e){return KN.set(new tI(e,PS.get()))}opts;scrollbarVis;root;scrollbar;attachment;#e=_e();get computedStyle(){return p(this.#e)}set computedStyle(e){k(this.#e,e,!0)}constructor(e,r){this.opts=e,this.scrollbarVis=r,this.root=r.root,this.scrollbar=r.scrollbar,this.attachment=vn(this.scrollbar.opts.ref,n=>this.root.scrollbarXNode=n),It(()=>{this.scrollbar.opts.ref.current&&this.opts.mounted.current&&(this.computedStyle=getComputedStyle(this.scrollbar.opts.ref.current))}),It(()=>{this.onResize()})}onThumbPointerDown=e=>{this.scrollbarVis.onThumbPointerDown(e.x)};onDragScroll=e=>{this.scrollbarVis.xOnDragScroll(e.x)};onThumbPointerUp=()=>{this.scrollbarVis.onThumbPointerUp()};onThumbPositionChange=()=>{this.scrollbarVis.xOnThumbPositionChange()};onWheelScroll=(e,r)=>{if(!this.root.viewportNode)return;const n=this.root.viewportNode.scrollLeft+e.deltaX;this.scrollbarVis.xOnWheelScroll(n),IU(n,r)&&e.preventDefault()};onResize=()=>{this.scrollbar.opts.ref.current&&this.root.viewportNode&&this.computedStyle&&this.scrollbarVis.setSizes({content:this.root.viewportNode.scrollWidth,viewport:this.root.viewportNode.offsetWidth,scrollbar:{size:this.scrollbar.opts.ref.current.clientWidth,paddingStart:lb(this.computedStyle.paddingLeft),paddingEnd:lb(this.computedStyle.paddingRight)}})};#t=F(()=>FS(this.scrollbarVis.sizes));get thumbSize(){return p(this.#t)}set thumbSize(e){k(this.#t,e)}#r=F(()=>({id:this.scrollbar.opts.id.current,"data-orientation":"horizontal",style:{bottom:0,left:this.root.opts.dir.current==="rtl"?"var(--bits-scroll-area-corner-width)":0,right:this.root.opts.dir.current==="ltr"?"var(--bits-scroll-area-corner-width)":0,"--bits-scroll-area-thumb-width":`${this.thumbSize}px`},...this.attachment}));get props(){return p(this.#r)}set props(e){k(this.#r,e)}}class rI{static create(e){return KN.set(new rI(e,PS.get()))}opts;scrollbarVis;root;scrollbar;attachment;#e=_e();get computedStyle(){return p(this.#e)}set computedStyle(e){k(this.#e,e,!0)}constructor(e,r){this.opts=e,this.scrollbarVis=r,this.root=r.root,this.scrollbar=r.scrollbar,this.attachment=vn(this.scrollbar.opts.ref,n=>this.root.scrollbarYNode=n),It(()=>{this.scrollbar.opts.ref.current&&this.opts.mounted.current&&(this.computedStyle=getComputedStyle(this.scrollbar.opts.ref.current))}),It(()=>{this.onResize()}),this.onThumbPointerDown=this.onThumbPointerDown.bind(this),this.onDragScroll=this.onDragScroll.bind(this),this.onThumbPointerUp=this.onThumbPointerUp.bind(this),this.onThumbPositionChange=this.onThumbPositionChange.bind(this),this.onWheelScroll=this.onWheelScroll.bind(this),this.onResize=this.onResize.bind(this)}onThumbPointerDown(e){this.scrollbarVis.onThumbPointerDown(e.y)}onDragScroll(e){this.scrollbarVis.yOnDragScroll(e.y)}onThumbPointerUp(){this.scrollbarVis.onThumbPointerUp()}onThumbPositionChange(){this.scrollbarVis.yOnThumbPositionChange()}onWheelScroll(e,r){if(!this.root.viewportNode)return;const n=this.root.viewportNode.scrollTop+e.deltaY;this.scrollbarVis.yOnWheelScroll(n),IU(n,r)&&e.preventDefault()}onResize(){this.scrollbar.opts.ref.current&&this.root.viewportNode&&this.computedStyle&&this.scrollbarVis.setSizes({content:this.root.viewportNode.scrollHeight,viewport:this.root.viewportNode.offsetHeight,scrollbar:{size:this.scrollbar.opts.ref.current.clientHeight,paddingStart:lb(this.computedStyle.paddingTop),paddingEnd:lb(this.computedStyle.paddingBottom)}})}#t=F(()=>FS(this.scrollbarVis.sizes));get thumbSize(){return p(this.#t)}set thumbSize(e){k(this.#t,e)}#r=F(()=>({id:this.scrollbar.opts.id.current,"data-orientation":"vertical",style:{top:0,right:this.root.opts.dir.current==="ltr"?0:void 0,left:this.root.opts.dir.current==="rtl"?0:void 0,bottom:"var(--bits-scroll-area-corner-height)","--bits-scroll-area-thumb-height":`${this.thumbSize}px`},...this.attachment}));get props(){return p(this.#r)}set props(e){k(this.#r,e)}}class nI{static create(){return RU.set(new nI(KN.get()))}scrollbarState;root;scrollbarVis;scrollbar;#e=_e(null);get rect(){return p(this.#e)}set rect(e){k(this.#e,e)}#t=_e("");get prevWebkitUserSelect(){return p(this.#t)}set prevWebkitUserSelect(e){k(this.#t,e,!0)}handleResize;handleThumbPositionChange;handleWheelScroll;handleThumbPointerDown;handleThumbPointerUp;#r=F(()=>this.scrollbarVis.sizes.content-this.scrollbarVis.sizes.viewport);get maxScrollPos(){return p(this.#r)}set maxScrollPos(e){k(this.#r,e)}constructor(e){this.scrollbarState=e,this.root=e.root,this.scrollbarVis=e.scrollbarVis,this.scrollbar=e.scrollbarVis.scrollbar,this.handleResize=ES(()=>this.scrollbarState.onResize(),10),this.handleThumbPositionChange=this.scrollbarState.onThumbPositionChange,this.handleWheelScroll=this.scrollbarState.onWheelScroll,this.handleThumbPointerDown=this.scrollbarState.onThumbPointerDown,this.handleThumbPointerUp=this.scrollbarState.onThumbPointerUp,It(()=>{const r=this.maxScrollPos,n=this.scrollbar.opts.ref.current;this.root.viewportNode;const a=s=>{const o=s.target;n?.contains(o)&&this.handleWheelScroll(s,r)};return Kr(this.root.domContext.getDocument(),"wheel",a,{passive:!1})}),$i(()=>{this.scrollbarVis.sizes,Nn(()=>this.handleThumbPositionChange())}),new Mp(()=>this.scrollbar.opts.ref.current,this.handleResize),new Mp(()=>this.root.contentNode,this.handleResize),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onlostpointercapture=this.onlostpointercapture.bind(this)}handleDragScroll(e){if(!this.rect)return;const r=e.clientX-this.rect.left,n=e.clientY-this.rect.top;this.scrollbarState.onDragScroll({x:r,y:n})}#n(){this.rect!==null&&(this.root.domContext.getDocument().body.style.webkitUserSelect=this.prevWebkitUserSelect,this.root.viewportNode&&(this.root.viewportNode.style.scrollBehavior=""),this.rect=null)}onpointerdown(e){if(e.button!==0)return;e.target.setPointerCapture(e.pointerId),this.rect=this.scrollbar.opts.ref.current?.getBoundingClientRect()??null,this.prevWebkitUserSelect=this.root.domContext.getDocument().body.style.webkitUserSelect,this.root.domContext.getDocument().body.style.webkitUserSelect="none",this.root.viewportNode&&(this.root.viewportNode.style.scrollBehavior="auto"),this.handleDragScroll(e)}onpointermove(e){this.handleDragScroll(e)}onpointerup(e){const r=e.target;r.hasPointerCapture(e.pointerId)&&r.releasePointerCapture(e.pointerId),this.#n()}onlostpointercapture(e){this.#n()}#i=F(()=>Er({...this.scrollbarState.props,style:{position:"absolute",...this.scrollbarState.props.style},[hg.scrollbar]:"",onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerup:this.onpointerup,onlostpointercapture:this.onlostpointercapture}));get props(){return p(this.#i)}set props(e){k(this.#i,e)}}class aI{static create(e){return new aI(e,RU.get())}opts;scrollbarState;attachment;#e;#t=_e();#r=ES(()=>{p(this.#t)&&(p(this.#t)(),k(this.#t,void 0))},100);constructor(e,r){this.opts=e,this.scrollbarState=r,this.#e=r.root,this.attachment=vn(this.opts.ref,n=>this.scrollbarState.scrollbarVis.thumbNode=n),It(()=>{const n=this.#e.viewportNode;if(!n)return;const a=()=>{if(this.#r(),!p(this.#t)){const s=vte(n,this.scrollbarState.handleThumbPositionChange);k(this.#t,s,!0),this.scrollbarState.handleThumbPositionChange()}};return Nn(()=>this.scrollbarState.handleThumbPositionChange()),Kr(n,"scroll",a)}),this.onpointerdowncapture=this.onpointerdowncapture.bind(this),this.onpointerup=this.onpointerup.bind(this)}onpointerdowncapture(e){const r=e.target;if(!r)return;const n=r.getBoundingClientRect(),a=e.clientX-n.left,i=e.clientY-n.top;this.scrollbarState.handleThumbPointerDown({x:a,y:i})}onpointerup(e){this.scrollbarState.handleThumbPointerUp()}#n=F(()=>({id:this.opts.id.current,"data-state":this.scrollbarState.scrollbarVis.hasThumb?"visible":"hidden",style:{width:"var(--bits-scroll-area-thumb-width)",height:"var(--bits-scroll-area-thumb-height)",transform:this.scrollbarState.scrollbarVis.prevTransformStyle},onpointerdowncapture:this.onpointerdowncapture,onpointerup:this.onpointerup,[hg.thumb]:"",...this.attachment}));get props(){return p(this.#n)}set props(e){k(this.#n,e)}}class iI{static create(e){return new iI(e,pg.get())}opts;root;attachment;#e=_e(0);#t=_e(0);#r=F(()=>!!(p(this.#e)&&p(this.#t)));get hasSize(){return p(this.#r)}set hasSize(e){k(this.#r,e)}constructor(e,r){this.opts=e,this.root=r,this.attachment=vn(this.opts.ref),new Mp(()=>this.root.scrollbarXNode,()=>{const n=this.root.scrollbarXNode?.offsetHeight||0;this.root.cornerHeight=n,k(this.#t,n,!0)}),new Mp(()=>this.root.scrollbarYNode,()=>{const n=this.root.scrollbarYNode?.offsetWidth||0;this.root.cornerWidth=n,k(this.#e,n,!0)})}#n=F(()=>({id:this.opts.id.current,style:{width:p(this.#e),height:p(this.#t),position:"absolute",right:this.root.opts.dir.current==="ltr"?0:void 0,left:this.root.opts.dir.current==="rtl"?0:void 0,bottom:0},[hg.corner]:"",...this.attachment}));get props(){return p(this.#n)}set props(e){k(this.#n,e)}}function lb(t){return t?Number.parseInt(t,10):0}function OU(t,e){const r=t/e;return Number.isNaN(r)?0:r}function FS(t){const e=OU(t.viewport,t.content),r=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,n=(t.scrollbar.size-r)*e;return Math.max(n,18)}function Ete({pointerPos:t,pointerOffset:e,sizes:r,dir:n="ltr"}){const a=FS(r),i=a/2,s=e||i,o=a-s,l=r.scrollbar.paddingStart+s,c=r.scrollbar.size-r.scrollbar.paddingEnd-o,u=r.content-r.viewport,d=n==="ltr"?[0,u]:[u*-1,0];return NU([l,c],d)(t)}function ZD({scrollPos:t,sizes:e,dir:r="ltr"}){const n=FS(e),a=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=e.scrollbar.size-a,s=e.content-e.viewport,o=i-n,l=r==="ltr"?[0,s]:[s*-1,0],c=Ste(t,l[0],l[1]);return NU([0,s],[0,o])(c)}function NU(t,e){return r=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const n=(e[1]-e[0])/(t[1]-t[0]);return e[0]+n*(r-t[0])}}function IU(t,e){return t>0&&ta.cancelAnimationFrame(n)}var yte=q("
");function Tte(t,e){const r=In();ye(e,!0);let n=V(e,"ref",15,null),a=V(e,"id",19,()=>xn(r)),i=V(e,"type",3,"hover"),s=V(e,"dir",3,"ltr"),o=V(e,"scrollHideDelay",3,600),l=Ve(e,["$$slots","$$events","$$legacy","ref","id","type","dir","scrollHideDelay","children","child"]);const c=jN.create({type:Pe(()=>i()),dir:Pe(()=>s()),scrollHideDelay:Pe(()=>o()),id:Pe(()=>a()),ref:Pe(()=>n(),g=>n(g))}),u=F(()=>Er(l,c.props));var d=se(),h=L(d);{var m=g=>{var b=se(),_=L(b);De(_,()=>e.child,()=>({props:p(u)})),C(g,b)},f=g=>{var b=yte();$t(b,()=>({...p(u)}));var _=j(b);De(_,()=>e.children??Ge),Y(b),C(g,b)};le(h,g=>{e.child?g(m):g(f,!1)})}C(t,d),Te()}var Cte=q("
");function wte(t,e){const r=In();ye(e,!0);let n=V(e,"ref",15,null),a=V(e,"id",19,()=>xn(r)),i=Ve(e,["$$slots","$$events","$$legacy","ref","id","children"]);const s=QN.create({id:Pe(()=>a()),ref:Pe(()=>n(),h=>n(h))}),o=F(()=>Er(i,s.props)),l=F(()=>Er({},s.contentProps));var c=Cte();$t(c,()=>({...p(o)}));var u=j(c);$t(u,()=>({...p(l)}));var d=j(u);De(d,()=>e.children??Ge),Y(u),Y(c),C(t,c),Te()}var Ate=q("
");function xU(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy","child","children"]);const n=nI.create(),a=F(()=>Er(r,n.props));var i=se(),s=L(i);{var o=c=>{var u=se(),d=L(u);De(d,()=>e.child,()=>({props:p(a)})),C(c,u)},l=c=>{var u=Ate();$t(u,()=>({...p(a)}));var d=j(u);De(d,()=>e.children??Ge),Y(u),C(c,u)};le(s,c=>{e.child?c(o):c(l,!1)})}C(t,i),Te()}function Rte(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=new FO,a=tI.create({mounted:Pe(()=>n.current)}),i=F(()=>Er(r,a.props));xU(t,ot(()=>p(i))),Te()}function Ote(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=new FO,a=rI.create({mounted:Pe(()=>n.current)}),i=F(()=>Er(r,a.props));xU(t,ot(()=>p(i))),Te()}function BS(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=eI.create();var a=se(),i=L(a);{var s=l=>{Rte(l,ot(()=>r))},o=l=>{Ote(l,ot(()=>r))};le(i,l=>{n.scrollbar.opts.orientation.current==="horizontal"?l(s):l(o,!1)})}C(t,a),Te()}function Nte(t,e){ye(e,!0);let r=V(e,"forceMount",3,!1),n=Ve(e,["$$slots","$$events","$$legacy","forceMount"]);const a=LS.create(),i=F(()=>Er(n,a.props));{const s=l=>{BS(l,ot(()=>p(i)))};let o=F(()=>r()||a.isVisible);kS(t,{get open(){return p(o)},get ref(){return a.scrollbar.opts.ref},presence:s,$$slots:{presence:!0}})}Te()}function Ite(t,e){ye(e,!0);let r=V(e,"forceMount",3,!1),n=Ve(e,["$$slots","$$events","$$legacy","forceMount"]);const a=JN.create(),i=F(()=>Er(n,a.props));{const s=l=>{BS(l,ot(()=>p(i)))};let o=F(()=>r()||!a.isHidden);kS(t,ot(()=>p(i),{get open(){return p(o)},get ref(){return a.scrollbar.opts.ref},presence:s,$$slots:{presence:!0}}))}Te()}function xte(t,e){ye(e,!0);let r=V(e,"forceMount",3,!1),n=Ve(e,["$$slots","$$events","$$legacy","forceMount"]);const a=ZN.create(),i=LS.create(),s=F(()=>Er(n,a.props,i.props,{"data-state":a.isVisible?"visible":"hidden"})),o=F(()=>r()||a.isVisible&&i.isVisible);kS(t,{get open(){return p(o)},get ref(){return i.scrollbar.opts.ref},presence:c=>{BS(c,ot(()=>p(s)))},$$slots:{presence:!0}}),Te()}function Dte(t,e){const r=In();ye(e,!0);let n=V(e,"ref",15,null),a=V(e,"id",19,()=>xn(r)),i=Ve(e,["$$slots","$$events","$$legacy","ref","id","orientation"]);const s=XN.create({orientation:Pe(()=>e.orientation),id:Pe(()=>a()),ref:Pe(()=>n(),h=>n(h))}),o=F(()=>s.root.opts.type.current);var l=se(),c=L(l);{var u=h=>{xte(h,ot(()=>i,{get id(){return a()}}))},d=h=>{var m=se(),f=L(m);{var g=_=>{Ite(_,ot(()=>i,{get id(){return a()}}))},b=_=>{var S=se(),E=L(S);{var y=T=>{Nte(T,ot(()=>i,{get id(){return a()}}))},v=T=>{var w=se(),A=L(w);{var I=x=>{BS(x,ot(()=>i,{get id(){return a()}}))};le(A,x=>{p(o)==="always"&&x(I)},!0)}C(T,w)};le(E,T=>{p(o)==="auto"?T(y):T(v,!1)},!0)}C(_,S)};le(f,_=>{p(o)==="scroll"?_(g):_(b,!1)},!0)}C(h,m)};le(c,h=>{p(o)==="hover"?h(u):h(d,!1)})}C(t,l),Te()}var Mte=q("
");function kte(t,e){ye(e,!0);let r=V(e,"ref",15,null),n=Ve(e,["$$slots","$$events","$$legacy","ref","id","child","children","present"]);const a=new FO,i=aI.create({id:Pe(()=>e.id),ref:Pe(()=>r(),d=>r(d)),mounted:Pe(()=>a.current)}),s=F(()=>Er(n,i.props,{style:{hidden:!e.present}}));var o=se(),l=L(o);{var c=d=>{var h=se(),m=L(h);De(m,()=>e.child,()=>({props:p(s)})),C(d,h)},u=d=>{var h=Mte();$t(h,()=>({...p(s)}));var m=j(h);De(m,()=>e.children??Ge),Y(h),C(d,h)};le(l,d=>{e.child?d(c):d(u,!1)})}C(t,o),Te()}function Pte(t,e){const r=In();ye(e,!0);let n=V(e,"id",19,()=>xn(r)),a=V(e,"ref",15,null),i=V(e,"forceMount",3,!1),s=Ve(e,["$$slots","$$events","$$legacy","id","ref","forceMount"]);const o=PS.get();{const l=(u,d)=>{let h=()=>d?.().present;kte(u,ot(()=>s,{get id(){return n()},get present(){return h()},get ref(){return a()},set ref(m){a(m)}}))};let c=F(()=>i()||o.hasThumb);kS(t,{get open(){return p(c)},get ref(){return o.scrollbar.opts.ref},presence:l,$$slots:{presence:!0}})}Te()}var Lte=q("
");function Fte(t,e){ye(e,!0);let r=V(e,"ref",15,null),n=Ve(e,["$$slots","$$events","$$legacy","ref","id","children","child"]);const a=iI.create({id:Pe(()=>e.id),ref:Pe(()=>r(),u=>r(u))}),i=F(()=>Er(n,a.props));var s=se(),o=L(s);{var l=u=>{var d=se(),h=L(d);De(h,()=>e.child,()=>({props:p(i)})),C(u,d)},c=u=>{var d=Lte();$t(d,()=>({...p(i)}));var h=j(d);De(h,()=>e.children??Ge),Y(d),C(u,d)};le(o,u=>{e.child?u(l):u(c,!1)})}C(t,s),Te()}function Bte(t,e){const r=In();ye(e,!0);let n=V(e,"ref",15,null),a=V(e,"id",19,()=>xn(r)),i=Ve(e,["$$slots","$$events","$$legacy","ref","id"]);const s=pg.get(),o=F(()=>!!(s.scrollbarXNode&&s.scrollbarYNode)),l=F(()=>s.opts.type.current!=="scroll"&&p(o));var c=se(),u=L(c);{var d=h=>{Fte(h,ot(()=>i,{get id(){return a()},get ref(){return n()},set ref(m){n(m)}}))};le(u,h=>{p(l)&&h(d)})}C(t,c),Te()}var Ute=q(" ",1);function Gte(t,e){ye(e,!0);let r=V(e,"value",15),n=V(e,"onValueChange",3,Rr),a=V(e,"name",3,""),i=V(e,"disabled",3,!1),s=V(e,"open",15,!1),o=V(e,"onOpenChange",3,Rr),l=V(e,"onOpenChangeComplete",3,Rr),c=V(e,"loop",3,!1),u=V(e,"scrollAlignment",3,"nearest"),d=V(e,"required",3,!1),h=V(e,"items",19,()=>[]),m=V(e,"allowDeselect",3,!1);function f(){r()===void 0&&r(e.type==="single"?"":[])}f(),nn.pre(()=>r(),()=>{f()});let g=_e("");const b=fee.create({type:e.type,value:Pe(()=>r(),T=>{r(T),n()(T)}),disabled:Pe(()=>i()),required:Pe(()=>d()),open:Pe(()=>s(),T=>{s(T),o()(T)}),loop:Pe(()=>c()),scrollAlignment:Pe(()=>u()),name:Pe(()=>a()),isCombobox:!1,items:Pe(()=>h()),allowDeselect:Pe(()=>m()),inputValue:Pe(()=>p(g),T=>k(g,T,!0)),onOpenChangeComplete:Pe(()=>l())});var _=Ute(),S=L(_);og(S,{children:(T,w)=>{var A=se(),I=L(A);De(I,()=>e.children??Ge),C(T,A)},$$slots:{default:!0}});var E=te(S,2);{var y=T=>{var w=se(),A=L(w);{var I=D=>{Ev(D,{get autocomplete(){return e.autocomplete}})},x=D=>{var $=se(),H=L($);xr(H,16,()=>b.opts.value.current,G=>G,(G,K)=>{Ev(G,{get value(){return K},get autocomplete(){return e.autocomplete}})}),C(D,$)};le(A,D=>{b.opts.value.current.length===0?D(I):D(x,!1)})}C(T,w)},v=T=>{Ev(T,{get autocomplete(){return e.autocomplete},get value(){return b.opts.value.current},set value(w){b.opts.value.current=w}})};le(E,T=>{Array.isArray(b.opts.value.current)?T(y):T(v,!1)})}C(t,_),Te()}var qte=q("");function zte(t,e){const r=In();ye(e,!0);let n=V(e,"id",19,()=>xn(r)),a=V(e,"ref",15,null),i=V(e,"type",3,"button"),s=Ve(e,["$$slots","$$events","$$legacy","id","ref","child","children","type"]);const o=DN.create({id:Pe(()=>n()),ref:Pe(()=>a(),d=>a(d))}),l=F(()=>Er(s,o.props,{type:i()}));var c=se(),u=L(c);fe(u,()=>cg,(d,h)=>{h(d,{get id(){return n()},get ref(){return o.opts.ref},children:(m,f)=>{var g=se(),b=L(g);{var _=E=>{var y=se(),v=L(y);De(v,()=>e.child,()=>({props:p(l)})),C(E,y)},S=E=>{var y=qte();$t(y,()=>({...p(l)}));var v=j(y);De(v,()=>e.children??Ge),Y(y),C(E,y)};le(b,E=>{e.child?E(_):E(S,!1)})}C(m,g)},$$slots:{default:!0}})}),C(t,c),Te()}const DU=jl({component:"switch",parts:["root","thumb"]}),sI=new ka("Switch.Root");class oI{static create(e){return sI.set(new oI(e))}opts;attachment;constructor(e){this.opts=e,this.attachment=vn(e.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this)}#e(){this.opts.checked.current=!this.opts.checked.current}onkeydown(e){!(e.key===Yl||e.key===so)||this.opts.disabled.current||(e.preventDefault(),this.#e())}onclick(e){this.opts.disabled.current||this.#e()}#t=F(()=>({"data-disabled":Pi(this.opts.disabled.current),"data-state":mX(this.opts.checked.current),"data-required":Pi(this.opts.required.current)}));get sharedProps(){return p(this.#t)}set sharedProps(e){k(this.#t,e)}#r=F(()=>({checked:this.opts.checked.current}));get snippetProps(){return p(this.#r)}set snippetProps(e){k(this.#r,e)}#n=F(()=>({...this.sharedProps,id:this.opts.id.current,role:"switch",disabled:eR(this.opts.disabled.current),"aria-checked":HB(this.opts.checked.current,!1),"aria-required":Gc(this.opts.required.current),[DU.root]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return p(this.#n)}set props(e){k(this.#n,e)}}class lI{static create(){return new lI(sI.get())}root;#e=F(()=>this.root.opts.name.current!==void 0);get shouldRender(){return p(this.#e)}set shouldRender(e){k(this.#e,e)}constructor(e){this.root=e}#t=F(()=>({type:"checkbox",name:this.root.opts.name.current,value:this.root.opts.value.current,checked:this.root.opts.checked.current,disabled:this.root.opts.disabled.current,required:this.root.opts.required.current}));get props(){return p(this.#t)}set props(e){k(this.#t,e)}}class cI{static create(e){return new cI(e,sI.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=vn(e.ref)}#e=F(()=>({checked:this.root.opts.checked.current}));get snippetProps(){return p(this.#e)}set snippetProps(e){k(this.#e,e)}#t=F(()=>({...this.root.sharedProps,id:this.opts.id.current,[DU.thumb]:"",...this.attachment}));get props(){return p(this.#t)}set props(e){k(this.#t,e)}}function $te(t,e){ye(e,!1);const r=lI.create();fO();var n=se(),a=L(n);{var i=s=>{fN(s,ot(()=>r.props))};le(a,s=>{r.shouldRender&&s(i)})}C(t,n),Te()}var Hte=q(""),Yte=q(" ",1);function Vte(t,e){const r=In();ye(e,!0);let n=V(e,"ref",15,null),a=V(e,"id",19,()=>xn(r)),i=V(e,"disabled",3,!1),s=V(e,"required",3,!1),o=V(e,"checked",15,!1),l=V(e,"value",3,"on"),c=V(e,"name",3,void 0),u=V(e,"type",3,"button"),d=V(e,"onCheckedChange",3,Rr),h=Ve(e,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","required","checked","value","name","type","onCheckedChange"]);const m=oI.create({checked:Pe(()=>o(),y=>{o(y),d()?.(y)}),disabled:Pe(()=>i()??!1),required:Pe(()=>s()),value:Pe(()=>l()),name:Pe(()=>c()),id:Pe(()=>a()),ref:Pe(()=>n(),y=>n(y))}),f=F(()=>Er(h,m.props,{type:u()}));var g=Yte(),b=L(g);{var _=y=>{var v=se(),T=L(v);{let w=F(()=>({props:p(f),...m.snippetProps}));De(T,()=>e.child,()=>p(w))}C(y,v)},S=y=>{var v=Hte();$t(v,()=>({...p(f)}));var T=j(v);De(T,()=>e.children??Ge,()=>m.snippetProps),Y(v),C(y,v)};le(b,y=>{e.child?y(_):y(S,!1)})}var E=te(b,2);$te(E,{}),C(t,g),Te()}var Wte=q("");function Kte(t,e){const r=In();ye(e,!0);let n=V(e,"ref",15,null),a=V(e,"id",19,()=>xn(r)),i=Ve(e,["$$slots","$$events","$$legacy","child","children","ref","id"]);const s=cI.create({id:Pe(()=>a()),ref:Pe(()=>n(),h=>n(h))}),o=F(()=>Er(i,s.props));var l=se(),c=L(l);{var u=h=>{var m=se(),f=L(m);{let g=F(()=>({props:p(o),...s.snippetProps}));De(f,()=>e.child,()=>p(g))}C(h,m)},d=h=>{var m=Wte();$t(m,()=>({...p(o)}));var f=j(m);De(f,()=>e.children??Ge,()=>s.snippetProps),Y(m),C(h,m)};le(c,h=>{e.child?h(u):h(d,!1)})}C(t,l),Te()}class uR{#e;#t;#r=null;constructor(e,r){this.#t=e,this.#e=r,this.stop=this.stop.bind(this),this.start=this.start.bind(this),nu(this.stop)}#n(){this.#r!==null&&(window.clearTimeout(this.#r),this.#r=null)}stop(){this.#n()}start(...e){this.#n(),this.#r=window.setTimeout(()=>{this.#r=null,this.#t(...e)},this.#e)}}const MU=jl({component:"tooltip",parts:["content","trigger"]}),kU=new ka("Tooltip.Provider"),uI=new ka("Tooltip.Root");class dI{static create(e){return kU.set(new dI(e))}opts;#e=_e(!0);get isOpenDelayed(){return p(this.#e)}set isOpenDelayed(e){k(this.#e,e,!0)}isPointerInTransit=us(!1);#t;#r=_e(null);constructor(e){this.opts=e,this.#t=new uR(()=>{this.isOpenDelayed=!0},this.opts.skipDelayDuration.current)}#n=()=>{this.opts.skipDelayDuration.current!==0&&this.#t.start()};#i=()=>{this.#t.stop()};onOpen=e=>{p(this.#r)&&p(this.#r)!==e&&p(this.#r).handleClose(),this.#i(),this.isOpenDelayed=!1,k(this.#r,e,!0)};onClose=e=>{p(this.#r)===e&&k(this.#r,null),this.#n()};isTooltipOpen=e=>p(this.#r)===e}class hI{static create(e){return uI.set(new hI(e,kU.get()))}opts;provider;#e=F(()=>this.opts.delayDuration.current??this.provider.opts.delayDuration.current);get delayDuration(){return p(this.#e)}set delayDuration(e){k(this.#e,e)}#t=F(()=>this.opts.disableHoverableContent.current??this.provider.opts.disableHoverableContent.current);get disableHoverableContent(){return p(this.#t)}set disableHoverableContent(e){k(this.#t,e)}#r=F(()=>this.opts.disableCloseOnTriggerClick.current??this.provider.opts.disableCloseOnTriggerClick.current);get disableCloseOnTriggerClick(){return p(this.#r)}set disableCloseOnTriggerClick(e){k(this.#r,e)}#n=F(()=>this.opts.disabled.current??this.provider.opts.disabled.current);get disabled(){return p(this.#n)}set disabled(e){k(this.#n,e)}#i=F(()=>this.opts.ignoreNonKeyboardFocus.current??this.provider.opts.ignoreNonKeyboardFocus.current);get ignoreNonKeyboardFocus(){return p(this.#i)}set ignoreNonKeyboardFocus(e){k(this.#i,e)}#a=_e(null);get contentNode(){return p(this.#a)}set contentNode(e){k(this.#a,e,!0)}contentPresence;#s=_e(null);get triggerNode(){return p(this.#s)}set triggerNode(e){k(this.#s,e,!0)}#o=_e(!1);#l;#c=F(()=>this.opts.open.current?p(this.#o)?"delayed-open":"instant-open":"closed");get stateAttr(){return p(this.#c)}set stateAttr(e){k(this.#c,e)}constructor(e,r){this.opts=e,this.provider=r,this.#l=new uR(()=>{k(this.#o,!0),this.opts.open.current=!0},this.delayDuration??0),this.contentPresence=new Bu({open:this.opts.open,ref:Pe(()=>this.contentNode),onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),nn(()=>this.delayDuration,()=>{this.delayDuration!==void 0&&(this.#l=new uR(()=>{k(this.#o,!0),this.opts.open.current=!0},this.delayDuration))}),nn(()=>this.opts.open.current,n=>{n?this.provider.onOpen(this):this.provider.onClose(this)},{lazy:!0})}handleOpen=()=>{this.#l.stop(),k(this.#o,!1),this.opts.open.current=!0};handleClose=()=>{this.#l.stop(),this.opts.open.current=!1};#d=()=>{this.#l.stop();const e=!this.provider.isOpenDelayed,r=this.delayDuration??0;e||r===0?(k(this.#o,r>0&&e,!0),this.opts.open.current=!0):this.#l.start()};onTriggerEnter=()=>{this.#d()};onTriggerLeave=()=>{this.disableHoverableContent?this.handleClose():this.#l.stop()}}class pI{static create(e){return new pI(e,uI.get())}opts;root;attachment;#e=us(!1);#t=_e(!1);#r=F(()=>this.opts.disabled.current||this.root.disabled);domContext;#n=null;constructor(e,r){this.opts=e,this.root=r,this.domContext=new au(e.ref),this.attachment=vn(this.opts.ref,n=>this.root.triggerNode=n)}#i=()=>{this.#n!==null&&(clearTimeout(this.#n),this.#n=null)};handlePointerUp=()=>{this.#e.current=!1};#a=()=>{p(this.#r)||(this.#e.current=!1)};#s=()=>{p(this.#r)||(this.#e.current=!0,this.domContext.getDocument().addEventListener("pointerup",()=>{this.handlePointerUp()},{once:!0}))};#o=e=>{if(!p(this.#r)&&e.pointerType!=="touch"){if(this.root.provider.isPointerInTransit.current){this.#i(),this.#n=window.setTimeout(()=>{this.root.provider.isPointerInTransit.current&&(this.root.provider.isPointerInTransit.current=!1,this.root.onTriggerEnter(),k(this.#t,!0))},250);return}this.root.onTriggerEnter(),k(this.#t,!0)}};#l=e=>{p(this.#r)||e.pointerType!=="touch"&&(p(this.#t)||(this.#i(),this.root.provider.isPointerInTransit.current=!1,this.root.onTriggerEnter(),k(this.#t,!0)))};#c=()=>{p(this.#r)||(this.#i(),this.root.onTriggerLeave(),k(this.#t,!1))};#d=e=>{this.#e.current||p(this.#r)||this.root.ignoreNonKeyboardFocus&&!yX(e.currentTarget)||this.root.handleOpen()};#u=()=>{p(this.#r)||this.root.handleClose()};#m=()=>{this.root.disableCloseOnTriggerClick||p(this.#r)||this.root.handleClose()};#f=F(()=>({id:this.opts.id.current,"aria-describedby":this.root.opts.open.current?this.root.contentNode?.id:void 0,"data-state":this.root.stateAttr,"data-disabled":Pi(p(this.#r)),"data-delay-duration":`${this.root.delayDuration}`,[MU.trigger]:"",tabindex:p(this.#r)?void 0:this.opts.tabindex.current,disabled:this.opts.disabled.current,onpointerup:this.#a,onpointerdown:this.#s,onpointerenter:this.#o,onpointermove:this.#l,onpointerleave:this.#c,onfocus:this.#d,onblur:this.#u,onclick:this.#m,...this.attachment}));get props(){return p(this.#f)}set props(e){k(this.#f,e)}}class mI{static create(e){return new mI(e,uI.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=vn(this.opts.ref,n=>this.root.contentNode=n),new wU({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&!this.root.disableHoverableContent,onPointerExit:()=>{this.root.provider.isTooltipOpen(this.root)&&this.root.handleClose()}}),qB(()=>Kr(window,"scroll",n=>{const a=n.target;a&&a.contains(this.root.triggerNode)&&this.root.handleClose()}))}onInteractOutside=e=>{if(Mc(e.target)&&this.root.triggerNode?.contains(e.target)&&this.root.disableCloseOnTriggerClick){e.preventDefault();return}this.opts.onInteractOutside.current(e),!e.defaultPrevented&&this.root.handleClose()};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current?.(e),!e.defaultPrevented&&this.root.handleClose()};onOpenAutoFocus=e=>{e.preventDefault()};onCloseAutoFocus=e=>{e.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#e=F(()=>({open:this.root.opts.open.current}));get snippetProps(){return p(this.#e)}set snippetProps(e){k(this.#e,e)}#t=F(()=>({id:this.opts.id.current,"data-state":this.root.stateAttr,"data-disabled":Pi(this.root.disabled),style:{outline:"none"},[MU.content]:"",...this.attachment}));get props(){return p(this.#t)}set props(e){k(this.#t,e)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus}}function jte(t,e){ye(e,!0);let r=V(e,"open",15,!1),n=V(e,"onOpenChange",3,Rr),a=V(e,"onOpenChangeComplete",3,Rr);hI.create({open:Pe(()=>r(),i=>{r(i),n()(i)}),delayDuration:Pe(()=>e.delayDuration),disableCloseOnTriggerClick:Pe(()=>e.disableCloseOnTriggerClick),disableHoverableContent:Pe(()=>e.disableHoverableContent),ignoreNonKeyboardFocus:Pe(()=>e.ignoreNonKeyboardFocus),disabled:Pe(()=>e.disabled),onOpenChangeComplete:Pe(()=>a())}),og(t,{tooltip:!0,children:(i,s)=>{var o=se(),l=L(o);De(l,()=>e.children??Ge),C(i,o)},$$slots:{default:!0}}),Te()}var Qte=q("
"),Xte=q("
");function Zte(t,e){const r=In();ye(e,!0);let n=V(e,"id",19,()=>xn(r)),a=V(e,"ref",15,null),i=V(e,"side",3,"top"),s=V(e,"sideOffset",3,0),o=V(e,"align",3,"center"),l=V(e,"avoidCollisions",3,!0),c=V(e,"arrowPadding",3,0),u=V(e,"sticky",3,"partial"),d=V(e,"hideWhenDetached",3,!1),h=V(e,"collisionPadding",3,0),m=V(e,"onInteractOutside",3,Rr),f=V(e,"onEscapeKeydown",3,Rr),g=V(e,"forceMount",3,!1),b=Ve(e,["$$slots","$$events","$$legacy","children","child","id","ref","side","sideOffset","align","avoidCollisions","arrowPadding","sticky","strategy","hideWhenDetached","collisionPadding","onInteractOutside","onEscapeKeydown","forceMount","style"]);const _=mI.create({id:Pe(()=>n()),ref:Pe(()=>a(),A=>a(A)),onInteractOutside:Pe(()=>m()),onEscapeKeydown:Pe(()=>f())}),S=F(()=>({side:i(),sideOffset:s(),align:o(),avoidCollisions:l(),arrowPadding:c(),sticky:u(),hideWhenDetached:d(),collisionPadding:h(),strategy:e.strategy})),E=F(()=>Er(b,p(S),_.props));var y=se(),v=L(y);{var T=A=>{{const I=(D,$)=>{let H=()=>$?.().props,G=()=>$?.().wrapperProps;const K=F(()=>Er(H(),{style:Hc("tooltip")},{style:e.style}));var z=se(),re=L(z);{var W=M=>{var B=se(),J=L(B);{let N=F(()=>({props:p(K),wrapperProps:G(),..._.snippetProps}));De(J,()=>e.child,()=>p(N))}C(M,B)},ie=M=>{var B=Qte();$t(B,()=>({...G()}));var J=j(B);$t(J,()=>({...p(K)}));var N=j(J);De(N,()=>e.children??Ge),Y(J),Y(B),C(M,B)};le(re,M=>{e.child?M(W):M(ie,!1)})}C(D,z)};let x=F(()=>_.root.disableHoverableContent?"none":"auto");dg(A,ot(()=>p(E),()=>_.popperProps,{get enabled(){return _.root.opts.open.current},get id(){return n()},trapFocus:!1,loop:!1,preventScroll:!1,forceMount:!0,get ref(){return _.opts.ref},tooltip:!0,get shouldRender(){return _.shouldRender},get contentPointerEvents(){return p(x)},popper:I,$$slots:{popper:!0}}))}},w=A=>{var I=se(),x=L(I);{var D=$=>{{const H=(K,z)=>{let re=()=>z?.().props,W=()=>z?.().wrapperProps;const ie=F(()=>Er(re(),{style:Hc("tooltip")},{style:e.style}));var M=se(),B=L(M);{var J=O=>{var U=se(),X=L(U);{let ne=F(()=>({props:p(ie),wrapperProps:W(),..._.snippetProps}));De(X,()=>e.child,()=>p(ne))}C(O,U)},N=O=>{var U=Xte();$t(U,()=>({...W()}));var X=j(U);$t(X,()=>({...p(ie)}));var ne=j(X);De(ne,()=>e.children??Ge),Y(X),Y(U),C(O,U)};le(B,O=>{e.child?O(J):O(N,!1)})}C(K,M)};let G=F(()=>_.root.disableHoverableContent?"none":"auto");ug($,ot(()=>p(E),()=>_.popperProps,{get open(){return _.root.opts.open.current},get id(){return n()},trapFocus:!1,loop:!1,preventScroll:!1,forceMount:!1,get ref(){return _.opts.ref},tooltip:!0,get shouldRender(){return _.shouldRender},get contentPointerEvents(){return p(G)},popper:H,$$slots:{popper:!0}}))}};le(x,$=>{g()||$(D)},!0)}C(A,I)};le(v,A=>{g()?A(T):A(w,!1)})}C(t,y),Te()}var Jte=q("");function ere(t,e){const r=In();ye(e,!0);let n=V(e,"id",19,()=>xn(r)),a=V(e,"disabled",3,!1),i=V(e,"type",3,"button"),s=V(e,"tabindex",3,0),o=V(e,"ref",15,null),l=Ve(e,["$$slots","$$events","$$legacy","children","child","id","disabled","type","tabindex","ref"]);const c=pI.create({id:Pe(()=>n()),disabled:Pe(()=>a()??!1),tabindex:Pe(()=>s()??0),ref:Pe(()=>o(),d=>o(d))}),u=F(()=>Er(l,c.props,{type:i()}));cg(t,{get id(){return n()},get ref(){return c.opts.ref},tooltip:!0,children:(d,h)=>{var m=se(),f=L(m);{var g=_=>{var S=se(),E=L(S);De(E,()=>e.child,()=>({props:p(u)})),C(_,S)},b=_=>{var S=Jte();$t(S,()=>({...p(u)}));var E=j(S);De(E,()=>e.children??Ge),Y(S),C(_,S)};le(f,_=>{e.child?_(g):_(b,!1)})}C(d,m)},$$slots:{default:!0}}),Te()}function tre(t,e){ye(e,!0);let r=V(e,"ref",15,null),n=Ve(e,["$$slots","$$events","$$legacy","ref"]);See(t,ot(()=>n,{get ref(){return r()},set ref(a){r(a)}})),Te()}function rre(t,e){ye(e,!0);let r=V(e,"delayDuration",3,700),n=V(e,"disableCloseOnTriggerClick",3,!1),a=V(e,"disableHoverableContent",3,!1),i=V(e,"disabled",3,!1),s=V(e,"ignoreNonKeyboardFocus",3,!1),o=V(e,"skipDelayDuration",3,300);dI.create({delayDuration:Pe(()=>r()),disableCloseOnTriggerClick:Pe(()=>n()),disableHoverableContent:Pe(()=>a()),disabled:Pe(()=>i()),ignoreNonKeyboardFocus:Pe(()=>s()),skipDelayDuration:Pe(()=>o())});var l=se(),c=L(l);De(c,()=>e.children??Ge),C(t,l),Te()}function ca(t,e){ye(e,!0);let r=V(e,"ref",15,null),n=Ve(e,["$$slots","$$events","$$legacy","ref"]);var a=se(),i=L(a);fe(i,()=>ere,(s,o)=>{o(s,ot({"data-slot":"tooltip-trigger"},()=>n,{get ref(){return r()},set ref(l){r(l)}}))}),C(t,a),Te()}var nre=q("
"),are=q(" ",1);function ua(t,e){ye(e,!0);const r=m=>{var f=se(),g=L(f);fe(g,()=>Zte,(b,_)=>{_(b,ot({"data-slot":"tooltip-content",get sideOffset(){return a()},get side(){return i()},get class(){return p(l)}},()=>o,{get ref(){return n()},set ref(S){n(S)},children:(S,E)=>{var y=are(),v=L(y);De(v,()=>e.children??Ge);var T=te(v,2);{const w=(A,I)=>{let x=()=>I?.().props;var D=nre();$t(D,$=>({class:$,...x()}),[()=>jt("z-50 size-2.5 rotate-45 rounded-[2px] bg-primary","data-[side=top]:translate-x-1/2 data-[side=top]:translate-y-[calc(-50%_+_2px)]","data-[side=bottom]:-translate-x-1/2 data-[side=bottom]:-translate-y-[calc(-50%_+_1px)]","data-[side=right]:translate-x-[calc(50%_+_2px)] data-[side=right]:translate-y-1/2","data-[side=left]:-translate-y-[calc(50%_-_3px)]",e.arrowClasses)]),C(A,D)};fe(T,()=>tre,(A,I)=>{I(A,{child:w,$$slots:{child:!0}})})}C(S,y)},$$slots:{default:!0}}))}),C(m,f)};let n=V(e,"ref",15,null),a=V(e,"sideOffset",3,0),i=V(e,"side",3,"top"),s=V(e,"noPortal",3,!1),o=Ve(e,["$$slots","$$events","$$legacy","ref","class","sideOffset","side","children","arrowClasses","noPortal"]);const l=F(()=>jt("z-50 w-fit origin-(--bits-tooltip-content-transform-origin) animate-in rounded-md bg-primary px-3 py-1.5 text-xs text-balance text-primary-foreground fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",e.class));var c=se(),u=L(c);{var d=m=>{r(m)},h=m=>{var f=se(),g=L(f);fe(g,()=>iu,(b,_)=>{_(b,{children:(S,E)=>{r(S)},$$slots:{default:!0}})}),C(m,f)};le(u,m=>{s()?m(d):m(h,!1)})}C(t,c),Te()}const da=jte,ire=rre;var sre=q("

"),ore=q(" ",1);function Ks(t,e){let r=V(e,"variant",3,"ghost"),n=V(e,"size",3,"sm"),a=V(e,"class",3,""),i=V(e,"disabled",3,!1),s=V(e,"iconSize",3,"h-3 w-3");var o=se(),l=L(o);fe(l,()=>da,(c,u)=>{u(c,{children:(d,h)=>{var m=ore(),f=L(m);fe(f,()=>ca,(b,_)=>{_(b,{children:(S,E)=>{{let y=F(()=>e["aria-label"]||e.tooltip);Dr(S,{get variant(){return r()},get size(){return n()},get disabled(){return i()},get onclick(){return e.onclick},get class(){return`h-6 w-6 p-0 ${a()??""} flex`},get"aria-label"(){return p(y)},children:(v,T)=>{const w=F(()=>e.icon);var A=se(),I=L(A);fe(I,()=>p(w),(x,D)=>{D(x,{get class(){return s()}})}),C(v,A)},$$slots:{default:!0}})}},$$slots:{default:!0}})});var g=te(f,2);fe(g,()=>ua,(b,_)=>{_(b,{children:(S,E)=>{var y=sre(),v=j(y,!0);Y(y),we(()=>qe(v,e.tooltip)),C(S,y)},$$slots:{default:!0}})}),C(d,m)},$$slots:{default:!0}})}),C(t,o)}const lre={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var cre=td("");function pr(t,e){ye(e,!0);const r=V(e,"color",3,"currentColor"),n=V(e,"size",3,24),a=V(e,"strokeWidth",3,2),i=V(e,"absoluteStrokeWidth",3,!1),s=V(e,"iconNode",19,()=>[]),o=Ve(e,["$$slots","$$events","$$legacy","name","color","size","strokeWidth","absoluteStrokeWidth","iconNode","children"]);var l=cre();$t(l,d=>({...lre,...o,width:n(),height:n(),stroke:r(),"stroke-width":d,class:["lucide-icon lucide",e.name&&`lucide-${e.name}`,e.class]}),[()=>i()?Number(a())*24/Number(n()):a()]);var c=j(l);xr(c,17,s,ku,(d,h)=>{var m=F(()=>K2(p(h),2));let f=()=>p(m)[0],g=()=>p(m)[1];var b=se(),_=L(b);HF(_,f,!0,(S,E)=>{$t(S,()=>({...g()}))}),C(d,b)});var u=te(c);De(u,()=>e.children??Ge),Y(l),C(t,l),Te()}function ure(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M9 18v-6H5l7-7 7 7h-4v6H9z"}]];pr(t,ot({name:"arrow-big-up"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function PU(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M5 12h14"}],["path",{d:"m12 5 7 7-7 7"}]];pr(t,ot({name:"arrow-right"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function dre(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m5 12 7-7 7 7"}],["path",{d:"M12 19V5"}]];pr(t,ot({name:"arrow-up"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function hre(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M12 7v14"}],["path",{d:"M16 12h2"}],["path",{d:"M16 8h2"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z"}],["path",{d:"M6 12h2"}],["path",{d:"M6 8h2"}]];pr(t,ot({name:"book-open-text"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function LU(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1"}]];pr(t,ot({name:"braces"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function JD(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18"}]];pr(t,ot({name:"brain"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function pre(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M17 21v-2a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1"}],["path",{d:"M19 15V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V9"}],["path",{d:"M21 21v-2h-4"}],["path",{d:"M3 5h4V3"}],["path",{d:"M7 5a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1V3"}]];pr(t,ot({name:"cable"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function US(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M20 6 9 17l-5-5"}]];pr(t,ot({name:"check"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function Yc(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m6 9 6 6 6-6"}]];pr(t,ot({name:"chevron-down"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function fI(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m15 18-6-6 6-6"}]];pr(t,ot({name:"chevron-left"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function mre(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m18 15-6-6-6 6"}]];pr(t,ot({name:"chevron-up"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function Vc(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m9 18 6-6-6-6"}]];pr(t,ot({name:"chevron-right"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function fre(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m7 15 5 5 5-5"}],["path",{d:"m7 9 5-5 5 5"}]];pr(t,ot({name:"chevrons-up-down"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function gI(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"10"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16"}]];pr(t,ot({name:"circle-alert"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function gre(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335"}],["path",{d:"m9 11 3 3L22 4"}]];pr(t,ot({name:"circle-check-big"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function FU(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m15 9-6 6"}],["path",{d:"m9 9 6 6"}]];pr(t,ot({name:"circle-x"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function l_(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"10"}],["polyline",{points:"12 6 12 12 16 14"}]];pr(t,ot({name:"clock"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function BU(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m16 18 6-6-6-6"}],["path",{d:"m8 6-6 6 6 6"}]];pr(t,ot({name:"code"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function UU(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]];pr(t,ot({name:"copy"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function _I(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5"}],["path",{d:"M3 12A9 3 0 0 0 21 12"}]];pr(t,ot({name:"database"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function GS(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M12 15V3"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["path",{d:"m7 10 5 5 5-5"}]];pr(t,ot({name:"download"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function _re(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]];pr(t,ot({name:"ellipsis"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function bre(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M15 3h6v6"}],["path",{d:"M10 14 21 3"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}]];pr(t,ot({name:"external-link"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function bI(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}],["circle",{cx:"12",cy:"12",r:"3"}]];pr(t,ot({name:"eye"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function Nc(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}],["path",{d:"M10 9H8"}],["path",{d:"M16 13H8"}],["path",{d:"M16 17H8"}]];pr(t,ot({name:"file-text"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function Sre(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}],["path",{d:"m14.5 12.5-5 5"}],["path",{d:"m9.5 12.5 5 5"}]];pr(t,ot({name:"file-x"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function SI(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}]];pr(t,ot({name:"file"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function c_(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2"}],["path",{d:"M6.453 15h11.094"}],["path",{d:"M8.5 2h7"}]];pr(t,ot({name:"flask-conical"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function fg(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"}]];pr(t,ot({name:"folder-open"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function Ere(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z"}]];pr(t,ot({name:"funnel"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function vv(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m12 14 4-4"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0"}]];pr(t,ot({name:"gauge"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function dR(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["line",{x1:"6",x2:"6",y1:"3",y2:"15"}],["circle",{cx:"18",cy:"6",r:"3"}],["circle",{cx:"6",cy:"18",r:"3"}],["path",{d:"M18 9a9 9 0 0 1-9 9"}]];pr(t,ot({name:"git-branch"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function vre(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"}],["path",{d:"M2 12h20"}]];pr(t,ot({name:"globe"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function yre(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["line",{x1:"2",y1:"2",x2:"22",y2:"22"}],["path",{d:"M16.5 16.5 12 21l-7-7c-1.5-1.45-3-3.2-3-5.5a5.5 5.5 0 0 1 2.14-4.35"}],["path",{d:"M8.76 3.1c1.15.22 2.13.78 3.24 1.9 1.5-1.5 2.74-2 4.5-2A5.5 5.5 0 0 1 22 8.5c0 2.12-1.3 3.78-2.67 5.17"}]];pr(t,ot({name:"heart-off"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function Tre(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"}]];pr(t,ot({name:"heart"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function EI(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}],["circle",{cx:"9",cy:"9",r:"2"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"}]];pr(t,ot({name:"image"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function vI(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];pr(t,ot({name:"info"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function Cre(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4"}],["path",{d:"m21 2-9.6 9.6"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5"}]];pr(t,ot({name:"key"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function e5(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17"}]];pr(t,ot({name:"layers"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function wre(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m3 17 2 2 4-4"}],["path",{d:"m3 7 2 2 4-4"}],["path",{d:"M13 6h8"}],["path",{d:"M13 12h8"}],["path",{d:"M13 18h8"}]];pr(t,ot({name:"list-checks"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function Xa(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];pr(t,ot({name:"loader-circle"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function yI(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"}]];pr(t,ot({name:"message-square"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function TI(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22"}]];pr(t,ot({name:"mic"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function Are(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M5 12h14"}]];pr(t,ot({name:"minus"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function GU(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21"}]];pr(t,ot({name:"monitor"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function Rre(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"}]];pr(t,ot({name:"moon"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function t5(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M9 18V5l12-2v13"}],["circle",{cx:"6",cy:"18",r:"3"}],["circle",{cx:"18",cy:"16",r:"3"}]];pr(t,ot({name:"music"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function dp(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z"}],["path",{d:"M12 22V12"}],["polyline",{points:"3.29 7 12 12 20.71 7"}],["path",{d:"m7.5 4.27 9 5.15"}]];pr(t,ot({name:"package"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function Ore(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}]];pr(t,ot({name:"panel-left"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function CI(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];pr(t,ot({name:"pencil"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function kp(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]];pr(t,ot({name:"plus"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function r5(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68"}],["path",{d:"M12 2v4"}],["path",{d:"m2 2 20 20"}]];pr(t,ot({name:"power-off"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function Nre(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M12 2v10"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04"}]];pr(t,ot({name:"power"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function Ire(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5"}],["circle",{cx:"12",cy:"12",r:"2"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19"}]];pr(t,ot({name:"radio"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function Ic(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}],["path",{d:"M8 16H3v5"}]];pr(t,ot({name:"refresh-cw"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function hR(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}]];pr(t,ot({name:"rotate-ccw"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function xre(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}]];pr(t,ot({name:"rotate-cw"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function cb(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m21 21-4.34-4.34"}],["circle",{cx:"11",cy:"11",r:"8"}]];pr(t,ot({name:"search"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function qU(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18"}]];pr(t,ot({name:"server"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function qS(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}],["circle",{cx:"12",cy:"12",r:"3"}]];pr(t,ot({name:"settings"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function zU(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"}],["path",{d:"M20 3v4"}],["path",{d:"M22 5h-4"}],["path",{d:"M4 17v2"}],["path",{d:"M5 18H3"}]];pr(t,ot({name:"sparkles"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function $U(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z"}]];pr(t,ot({name:"square-pen"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function wI(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}]];pr(t,ot({name:"square"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function Dre(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"4"}],["path",{d:"M12 2v2"}],["path",{d:"M12 20v2"}],["path",{d:"m4.93 4.93 1.41 1.41"}],["path",{d:"m17.66 17.66 1.41 1.41"}],["path",{d:"M2 12h2"}],["path",{d:"M20 12h2"}],["path",{d:"m6.34 17.66-1.41 1.41"}],["path",{d:"m19.07 4.93-1.41 1.41"}]];pr(t,ot({name:"sun"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function Mre(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M10 2h4"}],["path",{d:"M4.6 11a8 8 0 0 0 1.7 8.7 8 8 0 0 0 8.7 1.7"}],["path",{d:"M7.4 7.4a8 8 0 0 1 10.3 1 8 8 0 0 1 .9 10.2"}],["path",{d:"m2 2 20 20"}],["path",{d:"M12 12v-2"}]];pr(t,ot({name:"timer-off"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function Wc(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M3 6h18"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17"}]];pr(t,ot({name:"trash-2"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function Kc(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{d:"M12 9v4"}],["path",{d:"M12 17h.01"}]];pr(t,ot({name:"triangle-alert"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function HU(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M12 3v12"}],["path",{d:"m17 8-5-5-5 5"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}]];pr(t,ot({name:"upload"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function yv(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"7",cy:"12",r:"3"}],["path",{d:"M10 9v6"}],["circle",{cx:"17",cy:"12",r:"3"}],["path",{d:"M14 7v8"}],["path",{d:"M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1"}]];pr(t,ot({name:"whole-word"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function Rf(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"}]];pr(t,ot({name:"wrench"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function Xl(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];pr(t,ot({name:"x"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}function AI(t,e){ye(e,!0);let r=Ve(e,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z"}]];pr(t,ot({name:"zap"},()=>r,{get iconNode(){return n},children:(a,i)=>{var s=se(),o=L(s);De(o,()=>e.children??Ge),C(a,s)},$$slots:{default:!0}})),Te()}var Qr=(t=>(t.AUDIO="AUDIO",t.IMAGE="IMAGE",t.MCP_PROMPT="MCP_PROMPT",t.MCP_RESOURCE="MCP_RESOURCE",t.PDF="PDF",t.TEXT="TEXT",t.LEGACY_CONTEXT="context",t))(Qr||{}),zS=(t=>(t.FUNCTION="function",t))(zS||{}),Ka=(t=>(t.TEXT="text",t.TOOL_CALL="tool_call",t.TOOL_CALL_PENDING="tool_call_pending",t.TOOL_CALL_STREAMING="tool_call_streaming",t.REASONING="reasoning",t.REASONING_PENDING="reasoning_pending",t))(Ka||{}),gi=(t=>(t.GENERATION="generation",t.READING="reading",t.TOOLS="tools",t.SUMMARY="summary",t))(gi||{}),pR=(t=>(t.NONE="none",t.AUTO="auto",t))(pR||{}),tr=(t=>(t.USER="user",t.ASSISTANT="assistant",t.SYSTEM="system",t.TOOL="tool",t))(tr||{}),Nl=(t=>(t.ROOT="root",t.TEXT="text",t.THINK="think",t.SYSTEM="system",t))(Nl||{}),ts=(t=>(t.TEXT="text",t.IMAGE_URL="image_url",t.INPUT_AUDIO="input_audio",t))(ts||{}),Tc=(t=>(t.TIMEOUT="timeout",t.SERVER="server",t))(Tc||{}),kn=(t=>(t.IMAGE="image",t.AUDIO="audio",t.PDF="pdf",t.TEXT="text",t))(kn||{}),Of=(t=>(t.MCP_PROMPT="mcp-prompt",t))(Of||{}),qh=(t=>(t.JPEG="jpeg",t.PNG="png",t.GIF="gif",t.WEBP="webp",t.SVG="svg",t))(qh||{}),mR=(t=>(t.MP3="mp3",t.WAV="wav",t.WEBM="webm",t))(mR||{}),YU=(t=>(t.PDF="pdf",t))(YU||{}),Xr=(t=>(t.PLAIN_TEXT="plainText",t.MARKDOWN="md",t.ASCIIDOC="asciidoc",t.JAVASCRIPT="js",t.TYPESCRIPT="ts",t.JSX="jsx",t.TSX="tsx",t.CSS="css",t.HTML="html",t.JSON="json",t.XML="xml",t.YAML="yaml",t.CSV="csv",t.LOG="log",t.PYTHON="python",t.JAVA="java",t.CPP="cpp",t.PHP="php",t.RUBY="ruby",t.GO="go",t.RUST="rust",t.SHELL="shell",t.SQL="sql",t.R="r",t.SCALA="scala",t.KOTLIN="kotlin",t.SWIFT="swift",t.DART="dart",t.VUE="vue",t.SVELTE="svelte",t.LATEX="latex",t.BIBTEX="bibtex",t.CUDA="cuda",t.VULKAN="vulkan",t.HASKELL="haskell",t.CSHARP="csharp",t.PROPERTIES="properties",t))(Xr||{}),Zs=(t=>(t.JPG=".jpg",t.JPEG=".jpeg",t.PNG=".png",t.GIF=".gif",t.WEBP=".webp",t.SVG=".svg",t))(Zs||{}),Nf=(t=>(t.MP3=".mp3",t.WAV=".wav",t))(Nf||{}),RI=(t=>(t.PDF=".pdf",t))(RI||{}),Wt=(t=>(t.TXT=".txt",t.MD=".md",t.ADOC=".adoc",t.JS=".js",t.TS=".ts",t.JSX=".jsx",t.TSX=".tsx",t.CSS=".css",t.HTML=".html",t.HTM=".htm",t.JSON=".json",t.XML=".xml",t.YAML=".yaml",t.YML=".yml",t.CSV=".csv",t.LOG=".log",t.PY=".py",t.JAVA=".java",t.CPP=".cpp",t.C=".c",t.H=".h",t.PHP=".php",t.RB=".rb",t.GO=".go",t.RS=".rs",t.SH=".sh",t.BAT=".bat",t.SQL=".sql",t.R=".r",t.SCALA=".scala",t.KT=".kt",t.SWIFT=".swift",t.DART=".dart",t.VUE=".vue",t.SVELTE=".svelte",t.TEX=".tex",t.BIB=".bib",t.CU=".cu",t.CUH=".cuh",t.COMP=".comp",t.HPP=".hpp",t.HS=".hs",t.PROPERTIES=".properties",t.CS=".cs",t))(Wt||{}),Pp=(t=>(t.IMAGE="image/",t.TEXT="text",t))(Pp||{}),Js=(t=>(t.JSON="json",t.JAVASCRIPT="javascript",t.TYPESCRIPT="typescript",t))(Js||{}),fR=(t=>(t.DATABASE_KEYWORD="database",t.DATABASE_SCHEME="db://",t))(fR||{}),If=(t=>(t.PDF="application/pdf",t.OCTET_STREAM="application/octet-stream",t))(If||{}),ja=(t=>(t.MP3_MPEG="audio/mpeg",t.MP3="audio/mp3",t.MP4="audio/mp4",t.WAV="audio/wav",t.WEBM="audio/webm",t.WEBM_OPUS="audio/webm;codecs=opus",t))(ja||{}),ta=(t=>(t.JPEG="image/jpeg",t.JPG="image/jpg",t.PNG="image/png",t.GIF="image/gif",t.WEBP="image/webp",t.SVG="image/svg+xml",t))(ta||{}),Lt=(t=>(t.PLAIN="text/plain",t.MARKDOWN="text/markdown",t.ASCIIDOC="text/asciidoc",t.JAVASCRIPT="text/javascript",t.JAVASCRIPT_APP="application/javascript",t.TYPESCRIPT="text/typescript",t.JSX="text/jsx",t.TSX="text/tsx",t.CSS="text/css",t.HTML="text/html",t.JSON="application/json",t.XML_TEXT="text/xml",t.XML_APP="application/xml",t.YAML_TEXT="text/yaml",t.YAML_APP="application/yaml",t.CSV="text/csv",t.PYTHON="text/x-python",t.JAVA="text/x-java-source",t.CPP_HDR="text/x-c++hdr",t.CPP_SRC="text/x-c++src",t.CSHARP="text/x-csharp",t.HASKELL="text/x-haskell",t.C_SRC="text/x-csrc",t.C_HDR="text/x-chdr",t.PHP="text/x-php",t.RUBY="text/x-ruby",t.GO="text/x-go",t.RUST="text/x-rust",t.SHELL="text/x-shellscript",t.BAT="application/x-bat",t.SQL="text/x-sql",t.R="text/x-r",t.SCALA="text/x-scala",t.KOTLIN="text/x-kotlin",t.SWIFT="text/x-swift",t.DART="text/x-dart",t.VUE="text/x-vue",t.SVELTE="text/x-svelte",t.TEX="text/x-tex",t.TEX_APP="application/x-tex",t.LATEX="application/x-latex",t.BIBTEX="text/x-bibtex",t.CUDA="text/x-cuda",t.PROPERTIES="text/properties",t))(Lt||{}),Da=(t=>(t.IDLE="idle",t.TRANSPORT_CREATING="transport_creating",t.TRANSPORT_READY="transport_ready",t.INITIALIZING="initializing",t.CAPABILITIES_EXCHANGED="capabilities_exchanged",t.LISTING_TOOLS="listing_tools",t.CONNECTED="connected",t.ERROR="error",t.DISCONNECTED="disconnected",t))(Da||{}),qu=(t=>(t.INFO="info",t.WARN="warn",t.ERROR="error",t))(qu||{}),Is=(t=>(t.WEBSOCKET="websocket",t.STREAMABLE_HTTP="streamable_http",t.SSE="sse",t))(Is||{}),Dn=(t=>(t.IDLE="idle",t.CONNECTING="connecting",t.SUCCESS="success",t.ERROR="error",t))(Dn||{}),y1=(t=>(t.TEXT="text",t.IMAGE="image",t.RESOURCE="resource",t))(y1||{}),VU=(t=>(t.OBJECT="object",t))(VU||{}),gR=(t=>(t.PROMPT="ref/prompt",t.RESOURCE="ref/resource",t))(gR||{}),jc=(t=>(t.TEXT="TEXT",t.AUDIO="AUDIO",t.VISION="VISION",t))(jc||{}),Pd=(t=>(t.MODEL="model",t.ROUTER="router",t))(Pd||{}),bi=(t=>(t.UNLOADED="unloaded",t.LOADING="loading",t.LOADED="loaded",t.SLEEPING="sleeping",t.FAILED="failed",t))(bi||{}),_R=(t=>(t.DEFAULT="default",t.CUSTOM="custom",t))(_R||{}),Vr=(t=>(t.NUMBER="number",t.STRING="string",t.BOOLEAN="boolean",t))(Vr||{}),Gr=(t=>(t.INPUT="input",t.TEXTAREA="textarea",t.CHECKBOX="checkbox",t.SELECT="select",t))(Gr||{}),Gl=(t=>(t.LIGHT="light",t.DARK="dark",t.SYSTEM="system",t))(Gl||{}),xf=(t=>(t.MESSAGE="message",t.ATTACHMENT="attachment",t))(xf||{}),ho=(t=>(t.DATA="data:",t.HTTP="http://",t.HTTPS="https://",t.WEBSOCKET="ws://",t.WEBSOCKET_SECURE="wss://",t))(ho||{}),Cn=(t=>(t.ENTER="Enter",t.ESCAPE="Escape",t.ARROW_UP="ArrowUp",t.ARROW_DOWN="ArrowDown",t.TAB="Tab",t.D_LOWER="d",t.D_UPPER="D",t.E_UPPER="E",t.K_LOWER="k",t.O_UPPER="O",t.SPACE=" ",t))(Cn||{}),kre=q(''),Pre=q('
');function Lre(t,e){ye(e,!0);let r=V(e,"disabled",3,!1);const n=F(()=>e.language?.toLowerCase()===Xr.HTML);function a(){r()||e.onPreview?.(e.code,e.language)}var i=Pre(),s=j(i);let o;var l=j(s);{let d=F(()=>!r()),h=F(()=>r()?"Code incomplete":"Copy code");Fp(l,{get text(){return e.code},get canCopy(){return p(d)},get ariaLabel(){return p(h)}})}Y(s);var c=te(s,2);{var u=d=>{var h=kre();let m;h.__click=a;var f=j(h);bI(f,{size:16}),Y(h),we(()=>{m=Et(h,1,"preview-code-btn",null,m,{"opacity-50":r(),"!cursor-not-allowed":r()}),rr(h,"title",r()?"Code incomplete":"Preview code"),rr(h,"aria-disabled",r())}),C(d,h)};le(c,d=>{p(n)&&d(u)})}Y(i),we(()=>o=Et(s,1,"copy-code-btn",null,o,{"opacity-50":r(),"!cursor-not-allowed":r()})),C(t,i),Te()}Bn(["click"]);const Fre=/\[Attachment saved: ([^\]]+)\]/,ub=` +`,n5="\n\n```\nTurn limit reached\n```\n",a5=` \`\`\` Upstream LLM error: -`,tO="\n```\n",yS={enabled:!0,maxTurns:100,maxToolPreviewLines:25},kre={START:"<<>>"},cf={COMPLETED_TOOL_CALL:/<<>>\n<<>>\n<<>>([\s\S]*?)<<>>([\s\S]*?)<<>>/g,REASONING_BLOCK:/<<>>[\s\S]*?<<>>/g,REASONING_EXTRACT:/<<>>([\s\S]*?)<<>>/,REASONING_OPEN:/<<>>[\s\S]*$/,AGENTIC_TOOL_CALL_OPEN:/\n*<<>>[\s\S]*$/,HAS_LEGACY_MARKERS:/<<<(?:AGENTIC_TOOL_CALL_START|reasoning_content_start)>>>/},o0={LIST:"/v1/models",LOAD:"/models/load",UNLOAD:"/models/unload"},qU="/cors-proxy",Mre="PDF File",Dre="MCP Prompt",Pre="MCP Resource",rO=100,Lre=10,Fre={prefixLength:1024*10,suspiciousCharThresholdRatio:.15,maxAbsoluteNullBytes:2},HU=300*1e3,Bre=100,Ure=600*1e3,$re=50,Gre=50,zre=300*1e3,qre=10,Hre=1800*1e3,Vre=0,Yre=` +`,i5="\n```\n",Tv={enabled:!0,maxTurns:100,maxToolPreviewLines:25},Bre={START:"<<>>"},hp={COMPLETED_TOOL_CALL:/<<>>\n<<>>\n<<>>([\s\S]*?)<<>>([\s\S]*?)<<>>/g,REASONING_BLOCK:/<<>>[\s\S]*?<<>>/g,REASONING_EXTRACT:/<<>>([\s\S]*?)<<>>/,REASONING_OPEN:/<<>>[\s\S]*$/,AGENTIC_TOOL_CALL_OPEN:/\n*<<>>[\s\S]*$/,HAS_LEGACY_MARKERS:/<<<(?:AGENTIC_TOOL_CALL_START|reasoning_content_start)>>>/},u_={LIST:"/v1/models",LOAD:"/models/load",UNLOAD:"/models/unload"},WU="/cors-proxy",Ure="PDF File",Gre="MCP Prompt",qre="MCP Resource",s5=100,zre=10,$re={prefixLength:1024*10,suspiciousCharThresholdRatio:.15,maxAbsoluteNullBytes:2},KU=300*1e3,Hre=100,Yre=600*1e3,Vre=50,Wre=50,Kre=300*1e3,jre=10,Qre=1800*1e3,Xre=0,Zre=` -`,Wre='"',nO="/",SS="@",jre="code-block-scroll-container",Kre="code-block-wrapper",Xre="code-block-header",Qre="code-block-actions",Zre="code-language",Jre="copy-code-btn",ene="preview-code-btn",tne="relative",rne=` -`,nne="text",ane=/^(\w*)\n?/,ine=/&/g,sne=//g,aO=/^```|\n```/g,lne="chat-message-edit",cne="chat-actions",une="chat-settings-dialog",VU="border border-border/30 focus-within:border-border dark:border-border/20 dark:focus-within:border-border",T4=` +`,Jre='"',o5="/",Cv="@",ene="code-block-scroll-container",tne="code-block-wrapper",rne="code-block-header",nne="code-block-actions",ane="code-language",ine="copy-code-btn",sne="preview-code-btn",one="relative",lne=` +`,cne="text",une=/^(\w*)\n?/,dne=/&/g,hne=//g,l5=/^```|\n```/g,mne="chat-message-edit",fne="chat-actions",gne="chat-settings-dialog",jU="border border-border/30 focus-within:border-border dark:border-border/20 dark:focus-within:border-border",OI=` bg-muted/60 dark:bg-muted/75 - ${VU} + ${jU} shadow-sm outline-none text-foreground -`,dne=` +`,_ne=` bg-background border border-border/30 dark:border-border/20 shadow-sm backdrop-blur-lg! rounded-t-lg! -`,hne="max-h-80",fne="https://www.google.com/s2/favicons",pne=32,iO=".",sO=2,y_=1e3,oO=60,lO=3600,mne=1,gne=10,cO="0s",YU=256,WU=8192,_ne=/[\x00-\x1F\x7F]/g,bne=/[\x00-\x08\x0A-\x0D\x0E-\x1F\x7F]/g,Yo={[Dn.IMAGE]:g4,[Dn.AUDIO]:v4,[Dn.TEXT]:wc,[Dn.PDF]:m4},vne={[qc.VISION]:p4,[qc.AUDIO]:v4},yne={[qc.VISION]:"Vision",[qc.AUDIO]:"Audio"},Sne=/(```[\s\S]*?```|`[^`\n]+`)/g,Ene=new RegExp("(```[\\S\\s]*?```|`.*?`)|(?--api-key option for the server.",systemMessage:"The starting message that defines how model should behave.",showSystemMessage:"Display the system message at the top of each conversation.",theme:"Choose the color theme for the interface. You can choose between System (follows your device settings), Light, or Dark.",pasteLongTextToFileLen:"On pasting long text, it will be converted to a file. You can control the file length by setting the value of this parameter. Value 0 means disable.",copyTextAttachmentsAsPlainText:"When copying a message with text attachments, combine them into a single plain text string instead of a special format that can be pasted back as attachments.",samplers:'The order at which samplers are applied, in simplified way. Default is "top_k;typ_p;top_p;min_p;temperature": top_k->typ_p->top_p->min_p->temperature',backend_sampling:"Enable backend-based samplers. When enabled, supported samplers run on the accelerator backend for faster sampling.",temperature:"Controls the randomness of the generated text by affecting the probability distribution of the output tokens. Higher = more random, lower = more focused.",dynatemp_range:"Addon for the temperature sampler. The added value to the range of dynamic temperature, which adjusts probabilities by entropy of tokens.",dynatemp_exponent:"Addon for the temperature sampler. Smoothes out the probability redistribution based on the most probable token.",top_k:"Keeps only k top tokens.",top_p:"Limits tokens to those that together have a cumulative probability of at least p",min_p:"Limits tokens based on the minimum probability for a token to be considered, relative to the probability of the most likely token.",xtc_probability:"XTC sampler cuts out top tokens; this parameter controls the chance of cutting tokens at all. 0 disables XTC.",xtc_threshold:"XTC sampler cuts out top tokens; this parameter controls the token probability that is required to cut that token.",typ_p:"Sorts and limits tokens based on the difference between log-probability and entropy.",repeat_last_n:"Last n tokens to consider for penalizing repetition",repeat_penalty:"Controls the repetition of token sequences in the generated text",presence_penalty:"Limits tokens based on whether they appear in the output or not.",frequency_penalty:"Limits tokens based on how often they appear in the output.",dry_multiplier:"DRY sampling reduces repetition in generated text even across long contexts. This parameter sets the DRY sampling multiplier.",dry_base:"DRY sampling reduces repetition in generated text even across long contexts. This parameter sets the DRY sampling base value.",dry_allowed_length:"DRY sampling reduces repetition in generated text even across long contexts. This parameter sets the allowed length for DRY sampling.",dry_penalty_last_n:"DRY sampling reduces repetition in generated text even across long contexts. This parameter sets DRY penalty for the last n tokens.",max_tokens:"The maximum number of token per output. Use -1 for infinite (no limit).",custom:"Custom JSON parameters to send to the API. Must be valid JSON format.",showThoughtInProgress:"Expand thought process by default when generating messages.",disableReasoningParsing:"Send reasoning_format=none to prevent server-side extraction of reasoning tokens into separate field",excludeReasoningFromContext:"Strip reasoning content from previous messages before sending to the model. When unchecked, reasoning is sent back via the reasoning_content field so the model can see its own chain-of-thought across turns.",showRawOutputSwitch:"Show toggle button to display messages as plain text instead of Markdown-formatted content",keepStatsVisible:"Keep processing statistics visible after generation finishes.",showMessageStats:"Display generation statistics (tokens/second, token count, duration) below each assistant message.",askForTitleConfirmation:"Ask for confirmation before automatically changing conversation title when editing the first message.",pdfAsImage:"Parse PDF as image instead of text. Automatically falls back to text processing for non-vision models.",disableAutoScroll:"Disable automatic scrolling while messages stream so you can control the viewport position manually.",renderUserContentAsMarkdown:"Render user messages using markdown formatting in the chat.",alwaysShowSidebarOnDesktop:"Always keep the sidebar visible on desktop instead of auto-hiding it.",autoShowSidebarOnNewChat:"Automatically show sidebar when starting a new chat. Disable to keep the sidebar hidden until you click on it.",autoMicOnEmpty:"Automatically show microphone button instead of send button when textarea is empty for models with audio modality support.",fullHeightCodeBlocks:"Always display code blocks at their full natural height, overriding any height limits.",showRawModelNames:'Display full raw model identifiers (e.g. "ggml-org/GLM-4.7-Flash-GGUF:Q8_0") instead of parsed names with badges.',mcpServers:"Configure MCP servers as a JSON list. Use the form in the MCP Client settings section to edit.",mcpServerUsageStats:"Usage statistics for MCP servers. Tracks how many times tools from each server have been used.",agenticMaxTurns:"Maximum number of tool execution cycles before stopping (prevents infinite loops).",agenticMaxToolPreviewLines:"Number of lines shown in tool output previews (last N lines). Only these previews and the final LLM response persist after the agentic loop completes.",showToolCallInProgress:"Automatically expand tool call details while executing and keep them expanded after completion.",pyInterpreterEnabled:"Enable Python interpreter using Pyodide. Allows running Python code in markdown code blocks.",enableContinueGeneration:'Enable "Continue" button for assistant messages. Currently works only with non-reasoning models.'},pae=[{value:Pl.SYSTEM,label:"System",icon:LU},{value:Pl.LIGHT,label:"Light",icon:Are},{value:Pl.DARK,label:"Dark",icon:Sre}],mae=["temperature","top_k","top_p","min_p","max_tokens","pasteLongTextToFileLen","dynatemp_range","dynatemp_exponent","typ_p","xtc_probability","xtc_threshold","repeat_last_n","repeat_penalty","presence_penalty","frequency_penalty","dry_multiplier","dry_base","dry_allowed_length","dry_penalty_last_n","agenticMaxTurns","agenticMaxToolPreviewLines"],gae=["agenticMaxTurns","agenticMaxToolPreviewLines"],Hr={THEME:"theme",API_KEY:"apiKey",SYSTEM_MESSAGE:"systemMessage",PASTE_LONG_TEXT_TO_FILE_LEN:"pasteLongTextToFileLen",COPY_TEXT_ATTACHMENTS_AS_PLAIN_TEXT:"copyTextAttachmentsAsPlainText",ENABLE_CONTINUE_GENERATION:"enableContinueGeneration",PDF_AS_IMAGE:"pdfAsImage",ASK_FOR_TITLE_CONFIRMATION:"askForTitleConfirmation",SHOW_MESSAGE_STATS:"showMessageStats",SHOW_THOUGHT_IN_PROGRESS:"showThoughtInProgress",KEEP_STATS_VISIBLE:"keepStatsVisible",AUTO_MIC_ON_EMPTY:"autoMicOnEmpty",RENDER_USER_CONTENT_AS_MARKDOWN:"renderUserContentAsMarkdown",DISABLE_AUTO_SCROLL:"disableAutoScroll",ALWAYS_SHOW_SIDEBAR_ON_DESKTOP:"alwaysShowSidebarOnDesktop",AUTO_SHOW_SIDEBAR_ON_NEW_CHAT:"autoShowSidebarOnNewChat",FULL_HEIGHT_CODE_BLOCKS:"fullHeightCodeBlocks",SHOW_RAW_MODEL_NAMES:"showRawModelNames",TEMPERATURE:"temperature",DYNATEMP_RANGE:"dynatemp_range",DYNATEMP_EXPONENT:"dynatemp_exponent",TOP_K:"top_k",TOP_P:"top_p",MIN_P:"min_p",XTC_PROBABILITY:"xtc_probability",XTC_THRESHOLD:"xtc_threshold",TYP_P:"typ_p",MAX_TOKENS:"max_tokens",SAMPLERS:"samplers",BACKEND_SAMPLING:"backend_sampling",REPEAT_LAST_N:"repeat_last_n",REPEAT_PENALTY:"repeat_penalty",PRESENCE_PENALTY:"presence_penalty",FREQUENCY_PENALTY:"frequency_penalty",DRY_MULTIPLIER:"dry_multiplier",DRY_BASE:"dry_base",DRY_ALLOWED_LENGTH:"dry_allowed_length",DRY_PENALTY_LAST_N:"dry_penalty_last_n",AGENTIC_MAX_TURNS:"agenticMaxTurns",ALWAYS_SHOW_AGENTIC_TURNS:"alwaysShowAgenticTurns",AGENTIC_MAX_TOOL_PREVIEW_LINES:"agenticMaxToolPreviewLines",SHOW_TOOL_CALL_IN_PROGRESS:"showToolCallInProgress",DISABLE_REASONING_PARSING:"disableReasoningParsing",EXCLUDE_REASONING_FROM_CONTEXT:"excludeReasoningFromContext",SHOW_RAW_OUTPUT_SWITCH:"showRawOutputSwitch",CUSTOM:"custom"},Ss={GENERAL:"General",DISPLAY:"Display",SAMPLING:"Sampling",PENALTIES:"Penalties",IMPORT_EXPORT:"Import/Export",MCP:"MCP",DEVELOPER:"Developer"};u3.MP3+"",Am.MP3,ja.MP3_MPEG,ja.MP3,u3.WAV+"",Am.WAV,ja.WAV;Fh.JPEG+"",Ks.JPG,Ks.JPEG,ea.JPEG,Fh.PNG+"",Ks.PNG,ea.PNG,Fh.GIF+"",Ks.GIF,ea.GIF,Fh.WEBP+"",Ks.WEBP,ea.WEBP,Fh.SVG+"",Ks.SVG,ea.SVG;GU.PDF+"",w4.PDF,xm.PDF;Xr.PLAIN_TEXT+"",Wt.TXT,Pt.PLAIN,Xr.MARKDOWN+"",Wt.MD,Pt.MARKDOWN,Xr.ASCIIDOC+"",Wt.ADOC,Pt.ASCIIDOC,Xr.JAVASCRIPT+"",Wt.JS,Pt.JAVASCRIPT,Pt.JAVASCRIPT_APP,Xr.TYPESCRIPT+"",Wt.TS,Pt.TYPESCRIPT,Xr.JSX+"",Wt.JSX,Pt.JSX,Xr.TSX+"",Wt.TSX,Pt.TSX,Xr.CSS+"",Wt.CSS,Pt.CSS,Xr.HTML+"",Wt.HTML,Wt.HTM,Pt.HTML,Xr.JSON+"",Wt.JSON,Pt.JSON,Xr.XML+"",Wt.XML,Pt.XML_TEXT,Pt.XML_APP,Xr.YAML+"",Wt.YAML,Wt.YML,Pt.YAML_TEXT,Pt.YAML_APP,Xr.CSV+"",Wt.CSV,Pt.CSV,Xr.LOG+"",Wt.LOG,Pt.PLAIN,Xr.PYTHON+"",Wt.PY,Pt.PYTHON,Xr.JAVA+"",Wt.JAVA,Pt.JAVA,Xr.CPP+"",Wt.CPP,Wt.C,Wt.H,Wt.HPP,Pt.CPP_SRC,Pt.CPP_HDR,Pt.C_SRC,Pt.C_HDR,Xr.PHP+"",Wt.PHP,Pt.PHP,Xr.RUBY+"",Wt.RB,Pt.RUBY,Xr.GO+"",Wt.GO,Pt.GO,Xr.RUST+"",Wt.RS,Pt.RUST,Xr.SHELL+"",Wt.SH,Wt.BAT,Pt.SHELL,Pt.BAT,Xr.SQL+"",Wt.SQL,Pt.SQL,Xr.R+"",Wt.R,Pt.R,Xr.SCALA+"",Wt.SCALA,Pt.SCALA,Xr.KOTLIN+"",Wt.KT,Pt.KOTLIN,Xr.SWIFT+"",Wt.SWIFT,Pt.SWIFT,Xr.DART+"",Wt.DART,Pt.DART,Xr.VUE+"",Wt.VUE,Pt.VUE,Xr.SVELTE+"",Wt.SVELTE,Pt.SVELTE,Xr.LATEX+"",Wt.TEX,Pt.LATEX,Pt.TEX,Pt.TEX_APP,Xr.BIBTEX+"",Wt.BIB,Pt.BIBTEX,Xr.CUDA+"",Wt.CU,Wt.CUH,Pt.CUDA,Xr.VULKAN+"",Wt.COMP,Pt.PLAIN,Xr.HASKELL+"",Wt.HS,Pt.HASKELL,Xr.CSHARP+"",Wt.CS,Pt.CSHARP,Xr.PROPERTIES+"",Wt.PROPERTIES,Pt.PROPERTIES;const _ae=//gi,bae=/^