diff --git a/changelog/unreleased/credit-floor.md b/changelog/unreleased/credit-floor.md new file mode 100644 index 00000000..4e4c4fa7 --- /dev/null +++ b/changelog/unreleased/credit-floor.md @@ -0,0 +1,15 @@ +### English + +- Add a configurable credit floor (`CLI2API_CREDIT_FLOOR`, default `0` = disabled) so accounts below the threshold are skipped for paid models while remaining eligible for free models. +- Allow a per-account `credit_floor` override in the account card (save an explicit `0` to disable the floor for that account; leave the override off to inherit the global floor) and through the management API. +- Only enforce the credit floor against quota snapshots reported in `credits`. +- Add an independent percent floor (`CLI2API_PERCENT_FLOOR`, default `0` = disabled, per-account `percent_floor`) for accounts whose quota is reported as a remaining percentage (Devin, Kimi, Zhipu). The two floors never compare across units; entitlement-pack and rate-limit-window accounts keep their existing scheduling behaviour. +- Reject invalid or negative floor values at startup instead of silently disabling the gate. + +### 中文 + +- 新增可配置积分下限(`CLI2API_CREDIT_FLOOR`,默认 `0` 表示关闭):积分低于阈值的账号不再调度计费模型,但仍可调度免费模型。 +- 账号卡片与管理 API 支持按账号设置 `credit_floor`(填 0 表示显式关闭该账号保底;关闭覆盖则继承全局阈值)。 +- 积分阈值只对以 `credits` 为单位上报的余额生效。 +- 新增独立的百分比保底(`CLI2API_PERCENT_FLOOR`,默认 `0` 关闭;按账号 `percent_floor`),适用于以剩余百分比上报余额的账号(Devin、Kimi、智谱);两种单位分别判断、互不做数值换算,权益包与速率窗口账号维持原有调度行为。 +- 启动时会拒绝非法或负值配置,避免阈值校验被静默关闭。 diff --git a/frontend/src/api/types.ts b/frontend/src/api/types.ts index a7074966..6243c723 100644 --- a/frontend/src/api/types.ts +++ b/frontend/src/api/types.ts @@ -147,6 +147,8 @@ export type Overview = { enabled?: boolean max_inflight?: number priority?: number + credit_floor?: number | null + percent_floor?: number | null drop_system_prompt?: boolean model_aliases?: Record enabled_models?: string[] diff --git a/frontend/src/components/account/EditAccountModal.tsx b/frontend/src/components/account/EditAccountModal.tsx index b0eb9cb2..d283ad95 100644 --- a/frontend/src/components/account/EditAccountModal.tsx +++ b/frontend/src/components/account/EditAccountModal.tsx @@ -20,13 +20,17 @@ type Props = { busy: boolean t: Translate onClose: () => void - onSave: (input: { name: string; max_inflight: number; priority: number; proxy_url: string; checkin_time?: string; drop_system_prompt?: boolean; model_aliases: Record; enabled_models: string[]; set_model_routing: boolean }) => Promise + onSave: (input: { name: string; max_inflight: number; priority: number; credit_floor: number | null; percent_floor: number | null; proxy_url: string; checkin_time?: string; drop_system_prompt?: boolean; model_aliases: Record; enabled_models: string[]; set_model_routing: boolean }) => Promise } export function EditAccountModal({ account, checkinDefaultTime, checkinTimezone, busy, t, onClose, onSave }: Props) { const [name, setName] = useState(account?.name || '') const [maxInFlight, setMaxInFlight] = useState(account?.max_inflight ?? 4) const [priority, setPriority] = useState(account?.priority ?? 50) + const [creditFloorMode, setCreditFloorMode] = useState<'inherit' | 'custom'>(account?.credit_floor == null ? 'inherit' : 'custom') + const [creditFloor, setCreditFloor] = useState(account?.credit_floor ?? 0) + const [percentFloorMode, setPercentFloorMode] = useState<'inherit' | 'custom'>(account?.percent_floor == null ? 'inherit' : 'custom') + const [percentFloor, setPercentFloor] = useState(account?.percent_floor ?? 0) const [proxyUrl, setProxyUrl] = useState(account?.proxy_url || '') const [dropSystemPrompt, setDropSystemPrompt] = useState(Boolean(account?.drop_system_prompt)) const [aliases, setAliases] = useState>( @@ -69,6 +73,14 @@ export function EditAccountModal({ account, checkinDefaultTime, checkinTimezone, setError(t('priorityInvalid')) return } + if (creditFloorMode === 'custom' && (!Number.isFinite(creditFloor) || creditFloor < 0)) { + setError(t('creditFloorInvalid')) + return + } + if (percentFloorMode === 'custom' && (!Number.isFinite(percentFloor) || percentFloor < 0 || percentFloor > 100)) { + setError(t('percentFloorInvalid')) + return + } if (checkinDefaultTime !== undefined && !inheritCheckinTime && !/^([01]\d|2[0-3]):[0-5]\d$/.test(checkinTime ?? checkinDefaultTime)) { setError(t('checkinTimeInvalid')) return @@ -79,6 +91,8 @@ export function EditAccountModal({ account, checkinDefaultTime, checkinTimezone, name: trimmed, max_inflight: maxInFlight, priority, + credit_floor: creditFloorMode === 'custom' ? creditFloor : null, + percent_floor: percentFloorMode === 'custom' ? percentFloor : null, proxy_url: proxyUrl.trim(), checkin_time: checkinDefaultTime !== undefined ? (inheritCheckinTime ? '' : checkinTime ?? checkinDefaultTime) : undefined, drop_system_prompt: account?.provider === 'workbuddy' || account?.provider === 'trae' ? dropSystemPrompt : undefined, @@ -169,6 +183,65 @@ export function EditAccountModal({ account, checkinDefaultTime, checkinTimezone, + +
+ setCreditFloorMode(selected ? 'custom' : 'inherit')} + /> + {creditFloorMode === 'custom' ? ( + setCreditFloor(value ?? 0)} + minValue={0} + step={1} + isDisabled={busy} + isRequired + > + + + + + + + ) : ( +

{t('creditFloorInheritHint')}

+ )} +
+
+ +
+ setPercentFloorMode(selected ? 'custom' : 'inherit')} + /> + {percentFloorMode === 'custom' ? ( + setPercentFloor(value ?? 0)} + minValue={0} + maxValue={100} + step={1} + isDisabled={busy} + isRequired + > + + + + + + + ) : ( +

{t('percentFloorInheritHint')}

+ )} +
+
= { accountsSigned: '{n} / {total} accounts ready', addAccount: 'Add account', batchImport: 'Batch import', - batchImportLoading: 'Importing accounts…', + batchImportLoading: 'Importing WorkBuddy accounts…', batchImportUnrecognized: 'Could not recognize this credential file format.', batchImportConfirmTitle: 'Confirm batch import', batchImportConfirmHint: 'Detected from {file}. Review and confirm before importing.', batchImportConfirmHintNoFile: 'Review the detected format, then confirm to import.', batchImportRegion: 'WorkBuddy region', - batchImportKiroRegion: 'Kiro region', batchImportRegionPickHint: 'Region was unclear — pick CN or Global before importing.', - batchImportKiroRegionPickHint: 'Region was unclear — pick US East or EU Central before importing.', batchImportRegionMixed: 'This pack mixes CN and Global domains. Split it, or pick one region to force.', batchImportRegionUnknown: 'Region not detected from domains — please confirm.', batchImportUnknownFormat: 'Unknown format field; guessed from shape.', @@ -871,6 +869,16 @@ export const messages: Record = { wizardNamePh: 'Account name', maxInflightHint: 'How many chats this account may run at once. Changing it later restarts the worker.', priorityHint: 'Higher numbers are preferred when routing later uses this field. Default 50.', + creditFloor: 'Credit floor', + creditFloorHint: 'When enabled, paid models are skipped once the sampled credit balance reaches this value; free models still work. Only accounts reporting credits are affected.', + creditFloorCustom: 'Override global floor for this account', + creditFloorInheritHint: 'Inherits CLI2API_CREDIT_FLOOR. Set 0 here to explicitly disable the floor for this account.', + creditFloorInvalid: 'Credit floor must be zero or a positive number.', + percentFloor: 'Percent floor', + percentFloorHint: 'For accounts reporting remaining percentage (Devin, Kimi, Zhipu): skip paid models once remaining percent reaches this value. Independent of the credit floor; free models still work.', + percentFloorCustom: 'Override global percent floor for this account', + percentFloorInheritHint: 'Inherits CLI2API_PERCENT_FLOOR. Set 0 here to explicitly disable the floor for this account.', + percentFloorInvalid: 'Percent floor must be a number between 0 and 100.', proxyUrl: 'Proxy URL', proxyUrlPlaceholder: 'http://127.0.0.1:7890, direct', proxyUrlHint: 'Blank inherits the global proxy. Use direct or none to bypass proxies for this account. Qoder supports HTTP(S) only; WorkBuddy/Trae also support SOCKS5.', @@ -924,7 +932,7 @@ export const messages: Record = { zhipuKeyRequired: 'Paste the Zhipu API key first.', wizardPatPh: 'Paste personal access token', wizardCreateAndLogin: 'Create and sign in', - wizardImportLead: 'Paste a credential JSON export. WorkBuddy hub packages import every account in the file. Kiro accepts a Builder ID, Identity Center, social, or ksk_ JSON.', + wizardImportLead: 'Paste a credential JSON export. WorkBuddy hub packages import every account in the file.', wizardImportPh: 'Paste credential JSON', wizardChooseFile: 'Choose file', wizardBadJson: 'That does not look like a valid credential bundle.', @@ -1755,15 +1763,13 @@ export const messages: Record = { accountsSigned: '{n} / {total} 个账号就绪', addAccount: '添加账号', batchImport: '批量导入', - batchImportLoading: '正在导入账号…', + batchImportLoading: '正在导入 WorkBuddy 账号…', batchImportUnrecognized: '无法识别此凭证文件格式。', batchImportConfirmTitle: '确认批量导入', batchImportConfirmHint: '已从 {file} 识别。请核对后再导入。', batchImportConfirmHintNoFile: '请核对识别结果,确认后再导入。', batchImportRegion: 'WorkBuddy 区', - batchImportKiroRegion: 'Kiro 地区', batchImportRegionPickHint: '未能明确识别区,请先选择国内版或国际版。', - batchImportKiroRegionPickHint: '未能明确识别地区,请先选择美东或欧洲中部。', batchImportRegionMixed: '此包同时含国内与国际域名。请拆分后导入,或强制选择一个区。', batchImportRegionUnknown: '未从域名识别出区,请确认。', batchImportUnknownFormat: '未知 format 字段,已按形状猜测。', @@ -1859,6 +1865,16 @@ export const messages: Record = { wizardNamePh: '账号名称', maxInflightHint: '这个账号同时能跑多少条对话。之后改并发会重启该账号的 worker。', priorityHint: '数字越大,之后调度会越优先选这个账号。默认 50。', + creditFloor: '积分保底', + creditFloorHint: '开启后,采样到的积分余额降到该值时跳过计费模型,免费模型仍可用;只影响以积分为单位上报余额的账号。', + creditFloorCustom: '为该账号覆盖全局阈值', + creditFloorInheritHint: '继承 CLI2API_CREDIT_FLOOR;填 0 表示显式关闭该账号的保底。', + creditFloorInvalid: '积分保底必须是不小于 0 的数字。', + percentFloor: '百分比保底', + percentFloorHint: '对以剩余百分比上报余额的账号(Devin、Kimi、智谱):剩余百分比降到该值时跳过计费模型;与积分保底互不影响,免费模型仍可用。', + percentFloorCustom: '为该账号覆盖全局百分比阈值', + percentFloorInheritHint: '继承 CLI2API_PERCENT_FLOOR;填 0 表示显式关闭该账号的保底。', + percentFloorInvalid: '百分比保底必须是 0 到 100 之间的数字。', proxyUrl: '代理地址', proxyUrlPlaceholder: 'http://127.0.0.1:7890、direct', proxyUrlHint: '留空继承全局代理;填写 direct 或 none 可让此账号直连。Qoder 仅支持 HTTP(S),WorkBuddy/Trae 额外支持 SOCKS5。', @@ -1912,7 +1928,7 @@ export const messages: Record = { zhipuKeyRequired: '请先粘贴智谱 API Key。', wizardPatPh: '粘贴个人访问令牌', wizardCreateAndLogin: '创建并登录', - wizardImportLead: '粘贴凭证 JSON。WorkBuddy hub 导出包会一次性导入其中全部账号。Kiro 接受 Builder ID、Identity Center、社交登录或 ksk_ 的 JSON。', + wizardImportLead: '粘贴凭证 JSON。WorkBuddy hub 导出包会一次性导入其中全部账号。', wizardImportPh: '粘贴凭证 JSON', wizardChooseFile: '选择文件', wizardBadJson: '这看起来不是有效的凭证包。', diff --git a/frontend/src/pages/AccountsPage.tsx b/frontend/src/pages/AccountsPage.tsx index 00a18031..4c38acc8 100644 --- a/frontend/src/pages/AccountsPage.tsx +++ b/frontend/src/pages/AccountsPage.tsx @@ -606,7 +606,7 @@ export function AccountsPage() { }) } - async function onSaveSettings(id: string, input: { name: string; max_inflight: number; priority: number; proxy_url?: string; checkin_time?: string; drop_system_prompt?: boolean; model_aliases?: Record; enabled_models?: string[]; set_model_routing?: boolean }) { + async function onSaveSettings(id: string, input: { name: string; max_inflight: number; priority: number; credit_floor: number | null; percent_floor: number | null; proxy_url?: string; checkin_time?: string; drop_system_prompt?: boolean; model_aliases?: Record; enabled_models?: string[]; set_model_routing?: boolean }) { if (!id) throw new Error(t('accountNameRequired')) setNameById((current) => ({ ...current, [id]: input.name })) setInflightById((current) => ({ ...current, [id]: input.max_inflight })) diff --git a/internal/accounts/types.go b/internal/accounts/types.go index c2b69581..eb42d1e9 100644 --- a/internal/accounts/types.go +++ b/internal/accounts/types.go @@ -26,6 +26,16 @@ type Account struct { Enabled bool `json:"enabled"` MaxInFlight int `json:"max_inflight"` Priority int `json:"priority"` + // CreditFloor is the per-account credit floor override. Nil means "not + // set" and defers to the global CLI2API_CREDIT_FLOOR; a non-nil value + // (including 0, which disables the floor for this account) overrides it. + // No omitempty: an explicit 0 must survive API responses so a caller can + // distinguish "disable this account's floor" from "inherit the global floor". + CreditFloor *float64 `json:"credit_floor"` + // PercentFloor is the per-account floor for percent-denominated quota. + // Nil defers to the global CLI2API_PERCENT_FLOOR; a non-nil value (including + // 0, which disables the percent floor for this account) overrides it. + PercentFloor *float64 `json:"percent_floor"` // DropSystemPrompt drops caller system prompts before provider-native chat. DropSystemPrompt bool `json:"drop_system_prompt"` // ModelAliases maps a client-facing name to this account's real catalog @@ -66,6 +76,8 @@ type CreateAccount struct { Enabled bool MaxInFlight int Priority int + CreditFloor *float64 + PercentFloor *float64 DropSystemPrompt *bool WorkBuddyAutoCheckin *bool WorkBuddyCheckinTime string @@ -76,12 +88,22 @@ type CreateAccount struct { } type UpdateAccount struct { - AutoCheckin *bool - CheckinTime *string - Name string - Enabled *bool - MaxInFlight *int - Priority *int + AutoCheckin *bool + CheckinTime *string + Name string + Enabled *bool + MaxInFlight *int + Priority *int + // CreditFloor overrides the global floor when non-nil. A nil pointer + // leaves the stored value unchanged on PATCH; a non-nil value (including + // 0, which disables the floor for this account) is stored as the override. + CreditFloor *float64 + PercentFloor *float64 + // SetCreditFloor/SetPercentFloor let a caller explicitly clear an override + // (store NULL) while leaving PATCH fields absent untouched. Without these, + // a JSON null would be indistinguishable from an omitted field in *float64. + SetCreditFloor bool + SetPercentFloor bool DropSystemPrompt *bool WorkBuddyAutoCheckin *bool WorkBuddyCheckinTime *string @@ -108,6 +130,8 @@ type ImportAccount struct { Enabled bool MaxInFlight int Priority int + CreditFloor *float64 + PercentFloor *float64 DropSystemPrompt *bool WorkBuddyAutoCheckin *bool WorkBuddyCheckinTime string @@ -117,9 +141,9 @@ type ImportAccount struct { type AccountView struct { Account - Ready bool `json:"ready"` - Hot bool `json:"hot"` - InFlight int `json:"in_flight"` + Ready bool `json:"ready"` + Hot bool `json:"hot"` + InFlight int `json:"in_flight"` // InFlightSince is RFC3339 when the pool slot went busy (0→1); empty when idle. InFlightSince string `json:"in_flight_since,omitempty"` Restarts int `json:"restarts"` diff --git a/internal/app/app.go b/internal/app/app.go index 12740eee..b7514282 100644 --- a/internal/app/app.go +++ b/internal/app/app.go @@ -115,6 +115,8 @@ func New(cfg config.Config) *App { } pool := manager.Pool() pool.SetRoutingStrategy(routingStrategy) + pool.SetDefaultCreditFloor(cfg.CreditFloor) + pool.SetDefaultPercentFloor(cfg.PercentFloor) providerReg := providers.NewRegistry() workbuddyClient := workbuddy.NewClient(store) providerReg.Register(workbuddyClient.Adapter()) diff --git a/internal/config/config.go b/internal/config/config.go index 0d05a449..8e6ada70 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -1,6 +1,7 @@ package config import ( + "fmt" "os" "strconv" "strings" @@ -33,9 +34,24 @@ type Config struct { UpdateAgentToken string UpdateGitHubToken string CatalogRefreshInterval time.Duration + // CreditFloor is the global default credit floor. Zero disables the gate; + // per-account credit_floor overrides it when set. + CreditFloor float64 + // PercentFloor is the global default floor for percent-denominated quota + // snapshots (remaining percent). Zero disables the percent gate; a + // per-account percent_floor overrides it when set. + PercentFloor float64 } func Load() (Config, error) { + creditFloor, err := parseFloorEnv("CLI2API_CREDIT_FLOOR", os.Getenv("CLI2API_CREDIT_FLOOR")) + if err != nil { + return Config{}, err + } + percentFloor, err := parseFloorEnv("CLI2API_PERCENT_FLOOR", os.Getenv("CLI2API_PERCENT_FLOOR")) + if err != nil { + return Config{}, err + } port := 3010 if v := strings.TrimSpace(os.Getenv("PORT")); v != "" { if n, err := strconv.Atoi(v); err == nil && n > 0 { @@ -97,9 +113,29 @@ func Load() (Config, error) { UpdateAgentToken: strings.TrimSpace(os.Getenv("UPDATE_AGENT_TOKEN")), UpdateGitHubToken: strings.TrimSpace(os.Getenv("UPDATE_GITHUB_TOKEN")), CatalogRefreshInterval: catalogRefreshInterval(os.Getenv("CLI2API_CATALOG_REFRESH_INTERVAL")), + CreditFloor: creditFloor, + PercentFloor: percentFloor, }, nil } +// parseFloorEnv parses a unit-specific floor environment variable. Unset means +// 0 (disabled). Negative or non-numeric values fail closed so a typo cannot +// silently turn the gate off or admit a wrong threshold. +func parseFloorEnv(name, raw string) (float64, error) { + value := strings.TrimSpace(raw) + if value == "" { + return 0, nil + } + floor, err := strconv.ParseFloat(value, 64) + if err != nil { + return 0, fmt.Errorf("%s must be a number, got %q", name, value) + } + if floor < 0 { + return 0, fmt.Errorf("%s must be >= 0, got %v", name, floor) + } + return floor, nil +} + // catalogRefreshInterval parses CLI2API_CATALOG_REFRESH_INTERVAL: a Go duration // ("90s", "15m") or a bare number of minutes ("10"). Unset keeps the default, // a negative or zero value disables the background loop, and garbage falls back diff --git a/internal/config/config_test.go b/internal/config/config_test.go index cb468143..74db6f39 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -42,6 +42,24 @@ func TestLoadLocalUpdaterEndpoint(t *testing.T) { } } +func TestLoadPercentFloor(t *testing.T) { + t.Setenv("CLI2API_PERCENT_FLOOR", "15") + cfg, err := Load() + if err != nil { + t.Fatal(err) + } + if cfg.PercentFloor != 15 { + t.Fatalf("percent floor = %v, want 15", cfg.PercentFloor) + } +} + +func TestLoadRejectsNegativePercentFloor(t *testing.T) { + t.Setenv("CLI2API_PERCENT_FLOOR", "-1") + if _, err := Load(); err == nil { + t.Fatal("negative percent floor must fail closed") + } +} + func TestLoadRetryAccountBudget(t *testing.T) { t.Setenv("QODER_MAX_RETRY_ACCOUNTS", "99") cfg, err := Load() diff --git a/internal/console/accounts.go b/internal/console/accounts.go index 3e7557c0..6d3e89c4 100644 --- a/internal/console/accounts.go +++ b/internal/console/accounts.go @@ -30,18 +30,20 @@ func (h *Handler) HandleAccounts(w http.ResponseWriter, r *http.Request) { writeJSON(w, http.StatusOK, map[string]any{"object": "list", "data": items}) case http.MethodPost: var input struct { - Name string `json:"name"` - Provider string `json:"provider"` - Region string `json:"region"` - Enabled bool `json:"enabled"` - MaxInFlight int `json:"max_inflight"` - Priority int `json:"priority"` - DropSystemPrompt *bool `json:"drop_system_prompt"` - WorkBuddyAutoCheckin *bool `json:"workbuddy_auto_checkin"` - WorkBuddyCheckinTime string `json:"workbuddy_checkin_time"` - AutoCheckin *bool `json:"auto_checkin"` - CheckinTime string `json:"checkin_time"` - ProxyURL string `json:"proxy_url"` + Name string `json:"name"` + Provider string `json:"provider"` + Region string `json:"region"` + Enabled bool `json:"enabled"` + MaxInFlight int `json:"max_inflight"` + Priority int `json:"priority"` + CreditFloor *float64 `json:"credit_floor,omitempty"` + PercentFloor *float64 `json:"percent_floor,omitempty"` + DropSystemPrompt *bool `json:"drop_system_prompt"` + WorkBuddyAutoCheckin *bool `json:"workbuddy_auto_checkin"` + WorkBuddyCheckinTime string `json:"workbuddy_checkin_time"` + AutoCheckin *bool `json:"auto_checkin"` + CheckinTime string `json:"checkin_time"` + ProxyURL string `json:"proxy_url"` } if err := json.NewDecoder(http.MaxBytesReader(w, r.Body, maxConsoleBodyBytes)).Decode(&input); err != nil { writeErr(w, http.StatusBadRequest, "invalid_request", err.Error()) @@ -55,6 +57,8 @@ func (h *Handler) HandleAccounts(w http.ResponseWriter, r *http.Request) { AutoCheckin: input.AutoCheckin, CheckinTime: input.CheckinTime, Name: input.Name, Provider: input.Provider, Region: input.Region, Enabled: input.Enabled, MaxInFlight: input.MaxInFlight, Priority: input.Priority, + CreditFloor: input.CreditFloor, + PercentFloor: input.PercentFloor, DropSystemPrompt: input.DropSystemPrompt, WorkBuddyAutoCheckin: input.WorkBuddyAutoCheckin, WorkBuddyCheckinTime: input.WorkBuddyCheckinTime, ProxyURL: input.ProxyURL, }) @@ -120,11 +124,18 @@ func (h *Handler) HandleAccountByID(w http.ResponseWriter, r *http.Request) { } writeJSON(w, http.StatusOK, account) case http.MethodPatch: + var raw json.RawMessage + if err := json.NewDecoder(http.MaxBytesReader(w, r.Body, maxConsoleBodyBytes)).Decode(&raw); err != nil { + writeErr(w, http.StatusBadRequest, "invalid_request", err.Error()) + return + } var input struct { Name string `json:"name"` Enabled *bool `json:"enabled"` MaxInFlight *int `json:"max_inflight"` Priority *int `json:"priority"` + CreditFloor *float64 `json:"credit_floor"` + PercentFloor *float64 `json:"percent_floor"` DropSystemPrompt *bool `json:"drop_system_prompt"` WorkBuddyAutoCheckin *bool `json:"workbuddy_auto_checkin"` WorkBuddyCheckinTime *string `json:"workbuddy_checkin_time"` @@ -135,13 +146,17 @@ func (h *Handler) HandleAccountByID(w http.ResponseWriter, r *http.Request) { EnabledModels []string `json:"enabled_models"` SetModelRouting bool `json:"set_model_routing"` } - if err := json.NewDecoder(http.MaxBytesReader(w, r.Body, maxConsoleBodyBytes)).Decode(&input); err != nil { + if err := json.Unmarshal(raw, &input); err != nil { writeErr(w, http.StatusBadRequest, "invalid_request", err.Error()) return } account, err := h.Control.Accounts.Update(r.Context(), accountID, accounts.UpdateAccount{ AutoCheckin: input.AutoCheckin, CheckinTime: input.CheckinTime, Name: input.Name, Enabled: input.Enabled, MaxInFlight: input.MaxInFlight, Priority: input.Priority, + CreditFloor: input.CreditFloor, + PercentFloor: input.PercentFloor, + SetCreditFloor: hasJSONField(raw, "credit_floor"), + SetPercentFloor: hasJSONField(raw, "percent_floor"), DropSystemPrompt: input.DropSystemPrompt, WorkBuddyAutoCheckin: input.WorkBuddyAutoCheckin, WorkBuddyCheckinTime: input.WorkBuddyCheckinTime, ProxyURL: input.ProxyURL, ModelAliases: input.ModelAliases, EnabledModels: input.EnabledModels, SetModelRouting: input.SetModelRouting, @@ -278,3 +293,15 @@ func (h *Handler) HandleAccountByID(w http.ResponseWriter, r *http.Request) { writeErr(w, http.StatusNotFound, "not_found", "unknown account action") } } + +// hasJSONField reports whether a JSON object contains a key, including when +// its value is null. It lets floor overrides distinguish "inherit" (null or +// absent) from an explicit numeric value without changing PATCH semantics. +func hasJSONField(raw json.RawMessage, key string) bool { + var obj map[string]json.RawMessage + if json.Unmarshal(raw, &obj) != nil { + return false + } + _, ok := obj[key] + return ok +} diff --git a/internal/control/accounts.go b/internal/control/accounts.go index 41182eff..4eca3516 100644 --- a/internal/control/accounts.go +++ b/internal/control/accounts.go @@ -102,7 +102,7 @@ func (a *Accounts) ImportNative(ctx context.Context, input accounts.ImportAccoun account, err := a.store().Create(ctx, accounts.CreateAccount{ AutoCheckin: input.AutoCheckin, CheckinTime: input.CheckinTime, Name: input.Name, Provider: input.Provider, Region: input.Region, Enabled: false, - MaxInFlight: input.MaxInFlight, Priority: input.Priority, DropSystemPrompt: input.DropSystemPrompt, + MaxInFlight: input.MaxInFlight, Priority: input.Priority, CreditFloor: input.CreditFloor, PercentFloor: input.PercentFloor, DropSystemPrompt: input.DropSystemPrompt, WorkBuddyAutoCheckin: input.WorkBuddyAutoCheckin, WorkBuddyCheckinTime: input.WorkBuddyCheckinTime, ProxyURL: input.ProxyURL, }) if err != nil { diff --git a/internal/executor/credit_floor_test.go b/internal/executor/credit_floor_test.go new file mode 100644 index 00000000..8677c861 --- /dev/null +++ b/internal/executor/credit_floor_test.go @@ -0,0 +1,268 @@ +package executor + +import ( + "encoding/json" + "testing" + + "github.com/caigee-cmd/cli2api/internal/accounts" +) + +// Credit floor gates only paid models on an account whose sampled remaining +// balance is at or below the effective floor. A free model is always exempt, +// and a nil quota (never sampled) is never blocked because there is no +// trustworthy balance to compare. +func TestCreditFloorBlocksPaidModelButNotFreeModel(t *testing.T) { + pool := NewPool(nil, nil) + pool.SetDefaultCreditFloor(10) + pool.Upsert(Item{ + ID: "acc-low", + Provider: "qoder", + Region: "global", + Models: []string{"paid-one", "free-one"}, + FreeModels: []string{"free-one"}, + Quota: &QuotaSnapshot{Exceeded: false, Remaining: 5, Total: 100, Unit: "credits"}, + }) + + if _, ok := pool.PickRoute(RouteQuery{PublicModel: "paid-one"}); ok { + t.Fatal("paid model: low-balance account was picked, want blocked by floor") + } + item, ok := pool.PickRoute(RouteQuery{PublicModel: "free-one"}) + if !ok || item.ID != "acc-low" { + t.Fatal("free model: account was blocked, want served (free models exempt)") + } +} + +// Per-account override wins over the global floor. A non-nil 0 disables the +// floor for that account even when a global floor is set (option A semantics). +func TestCreditFloorPerAccountOverride(t *testing.T) { + global := 50.0 + zero := 0.0 + high := 1.0 + + pool := NewPool(nil, nil) + pool.SetDefaultCreditFloor(global) + pool.Upsert(Item{ + ID: "acc-zero", Provider: "qoder", Region: "global", + Models: []string{"paid"}, Quota: &QuotaSnapshot{Remaining: 10, Total: 100, Unit: "credits"}, + CreditFloor: &zero, + }) + pool.Upsert(Item{ + ID: "acc-high", Provider: "qoder", Region: "global", + Models: []string{"paid"}, Quota: &QuotaSnapshot{Remaining: 10, Total: 100, Unit: "credits"}, + CreditFloor: &high, + }) + pool.Upsert(Item{ + ID: "acc-inherit", Provider: "qoder", Region: "global", + Models: []string{"paid"}, Quota: &QuotaSnapshot{Remaining: 10, Total: 100, Unit: "credits"}, + }) + + // acc-zero: override 0 disables floor -> stays eligible (remaining 10 <= global 50). + // acc-high: override 1 -> remaining 10 > 1 -> stays eligible. + // acc-inherit: no override -> global 50 -> remaining 10 <= 50 -> blocked. + seen := map[string]bool{} + for i := 0; i < 6; i++ { + if item, ok := pool.PickRoute(RouteQuery{PublicModel: "paid"}); ok { + seen[item.ID] = true + } + } + if !seen["acc-zero"] || !seen["acc-high"] { + t.Fatalf("per-account overrides should stay eligible, seen=%v", seen) + } + if seen["acc-inherit"] { + t.Fatal("account without override should inherit global floor and be blocked") + } +} + +// A floor of 0 (global default) disables the gate entirely. +func TestCreditFloorZeroDisablesGate(t *testing.T) { + pool := NewPool(nil, nil) + pool.SetDefaultCreditFloor(0) + pool.Upsert(Item{ + ID: "acc", Provider: "qoder", Region: "global", + Models: []string{"paid"}, Quota: &QuotaSnapshot{Remaining: 0, Total: 100, Unit: "credits"}, + }) + if _, ok := pool.PickRoute(RouteQuery{PublicModel: "paid"}); !ok { + t.Fatal("global floor 0 must disable the gate") + } +} + +// An account whose quota has never been sampled (nil) is not blocked by the +// floor — there is no balance to compare against. +func TestCreditFloorDoesNotBlockUnsampledQuota(t *testing.T) { + pool := NewPool(nil, nil) + pool.SetDefaultCreditFloor(10) + pool.Upsert(Item{ + ID: "acc", Provider: "qoder", Region: "global", + Models: []string{"paid"}, Quota: nil, + }) + if _, ok := pool.PickRoute(RouteQuery{PublicModel: "paid"}); !ok { + t.Fatal("nil quota (never sampled) must not be blocked by credit floor") + } +} + +// The pre-existing Exceeded flag still gates ahead of the floor; a balance +// above the floor must not rescue an upstream-reported exhausted account. +func TestCreditFloorDoesNotOverrideExceeded(t *testing.T) { + pool := NewPool(nil, nil) + pool.SetDefaultCreditFloor(1) + pool.Upsert(Item{ + ID: "acc", Provider: "qoder", Region: "global", + Models: []string{"paid"}, + Quota: &QuotaSnapshot{Exceeded: true, Remaining: 999, Total: 1000, Unit: "credits"}, + }) + if _, ok := pool.PickRoute(RouteQuery{PublicModel: "paid"}); ok { + t.Fatal("upstream Exceeded must still block regardless of remaining>floor") + } +} + +// SetCreditFloor updates an existing account's override in place. +func TestSetCreditFloorUpdatesInPlace(t *testing.T) { + pool := NewPool(nil, nil) + pool.Upsert(Item{ID: "acc", Provider: "qoder", Region: "global", Models: []string{"paid"}, + Quota: &QuotaSnapshot{Remaining: 5, Total: 100, Unit: "credits"}}) + pool.SetDefaultCreditFloor(10) + // Before override: blocked by global floor. + if _, ok := pool.PickRoute(RouteQuery{PublicModel: "paid"}); ok { + t.Fatal("should be blocked by global floor before override") + } + zero := 0.0 + pool.SetCreditFloor("acc", &zero) + // After override 0: eligible. + if _, ok := pool.PickRoute(RouteQuery{PublicModel: "paid"}); !ok { + t.Fatal("override 0 should re-enable the account") + } +} + +// A floor is a credit threshold, not a generic remaining-value threshold. +// Providers reporting percent, entitlement packs or rate-limit windows must +// keep their current scheduling behaviour even when the numeric remaining is +// at or below the floor. +func TestCreditFloorOnlyAppliesToCreditsUnit(t *testing.T) { + for _, unit := range []string{"percent", "entitlement_pack", "rate_limit_window", "", "Credits"} { + t.Run(unit, func(t *testing.T) { + pool := NewPool(nil, nil) + pool.SetDefaultCreditFloor(100) + pool.Upsert(Item{ + ID: "acc-non-credit", Provider: "qoder", Region: "global", + Models: []string{"paid"}, Quota: &QuotaSnapshot{Remaining: 5, Total: 100, Unit: unit}, + }) + if _, ok := pool.PickRoute(RouteQuery{PublicModel: "paid"}); !ok { + t.Fatalf("unit %q must not be credit-floor blocked", unit) + } + }) + } +} + +// An explicit per-account zero must be visible in API responses so the +// console can distinguish "disable this floor" from "inherit the global one". +func TestAccountCreditFloorJSONKeepsExplicitZero(t *testing.T) { + zero := 0.0 + payload, err := json.Marshal(accounts.Account{CreditFloor: &zero}) + if err != nil { + t.Fatalf("marshal account: %v", err) + } + var decoded map[string]any + if err := json.Unmarshal(payload, &decoded); err != nil { + t.Fatalf("unmarshal account: %v", err) + } + value, present := decoded["credit_floor"] + if !present { + t.Fatalf("explicit credit_floor=0 was omitted from JSON: %s", payload) + } + if number, ok := value.(float64); !ok || number != 0 { + t.Fatalf("credit_floor=%v, want numeric 0", value) + } +} + +// Percent-denominated accounts use their own floor. The global credit floor +// must never gate a percent account, even with the same numeric value. +func TestPercentFloorBlocksPaidModelButNotFreeModel(t *testing.T) { + pool := NewPool(nil, nil) + pool.SetDefaultCreditFloor(100) + pool.SetDefaultPercentFloor(20) + pool.Upsert(Item{ + ID: "acc-percent-low", Provider: "kimi", Region: "global", + Models: []string{"paid", "free"}, FreeModels: []string{"free"}, + Quota: &QuotaSnapshot{Remaining: 15, Total: 100, Unit: "percent"}, + }) + if _, ok := pool.PickRoute(RouteQuery{PublicModel: "paid"}); ok { + t.Fatal("percent account at 15% remaining should be blocked by percent floor 20") + } + item, ok := pool.PickRoute(RouteQuery{PublicModel: "free"}) + if !ok || item.ID != "acc-percent-low" { + t.Fatal("free model must stay available for percent account") + } +} + +func TestPercentFloorPerAccountOverride(t *testing.T) { + globalPct := 50.0 + zero := 0.0 + high := 1.0 + pool := NewPool(nil, nil) + pool.SetDefaultPercentFloor(globalPct) + pool.Upsert(Item{ID: "pct-zero", Provider: "kimi", Region: "global", Models: []string{"paid"}, + Quota: &QuotaSnapshot{Remaining: 10, Total: 100, Unit: "percent"}, PercentFloor: &zero}) + pool.Upsert(Item{ID: "pct-high", Provider: "kimi", Region: "global", Models: []string{"paid"}, + Quota: &QuotaSnapshot{Remaining: 10, Total: 100, Unit: "percent"}, PercentFloor: &high}) + pool.Upsert(Item{ID: "pct-inherit", Provider: "kimi", Region: "global", Models: []string{"paid"}, + Quota: &QuotaSnapshot{Remaining: 10, Total: 100, Unit: "percent"}}) + seen := map[string]bool{} + for i := 0; i < 6; i++ { + if item, ok := pool.PickRoute(RouteQuery{PublicModel: "paid"}); ok { + seen[item.ID] = true + } + } + if !seen["pct-zero"] || !seen["pct-high"] { + t.Fatalf("percent overrides should stay eligible, seen=%v", seen) + } + if seen["pct-inherit"] { + t.Fatal("percent account without override should inherit global percent floor and be blocked") + } +} + +// Global credit floor 100 used to block percent accounts numerically (the +// maintainer's objection). It must now be inert for percent units. +func TestCreditFloorDoesNotBlockPercentAccount(t *testing.T) { + pool := NewPool(nil, nil) + pool.SetDefaultCreditFloor(100) + pool.SetDefaultPercentFloor(0) + pool.Upsert(Item{ID: "pct", Provider: "devin", Region: "global", Models: []string{"paid"}, + Quota: &QuotaSnapshot{Remaining: 5, Total: 100, Unit: "percent"}}) + if _, ok := pool.PickRoute(RouteQuery{PublicModel: "paid"}); !ok { + t.Fatal("CLI2API_CREDIT_FLOOR must not gate a percent account") + } +} + +func TestSetPercentFloorUpdatesInPlace(t *testing.T) { + pool := NewPool(nil, nil) + pool.Upsert(Item{ID: "pct", Provider: "kimi", Region: "global", Models: []string{"paid"}, + Quota: &QuotaSnapshot{Remaining: 5, Total: 100, Unit: "percent"}}) + pool.SetDefaultPercentFloor(10) + if _, ok := pool.PickRoute(RouteQuery{PublicModel: "paid"}); ok { + t.Fatal("should be blocked by global percent floor before override") + } + zero := 0.0 + pool.SetPercentFloor("pct", &zero) + if _, ok := pool.PickRoute(RouteQuery{PublicModel: "paid"}); !ok { + t.Fatal("percent override 0 should re-enable the account") + } +} + +func TestAccountPercentFloorJSONKeepsExplicitZero(t *testing.T) { + zero := 0.0 + payload, err := json.Marshal(accounts.Account{PercentFloor: &zero}) + if err != nil { + t.Fatalf("marshal account: %v", err) + } + var decoded map[string]any + if err := json.Unmarshal(payload, &decoded); err != nil { + t.Fatalf("unmarshal account: %v", err) + } + value, present := decoded["percent_floor"] + if !present { + t.Fatalf("explicit percent_floor=0 was omitted from JSON: %s", payload) + } + if number, ok := value.(float64); !ok || number != 0 { + t.Fatalf("percent_floor=%v, want numeric 0", value) + } +} diff --git a/internal/executor/fefo.go b/internal/executor/fefo.go index 84203a5d..3ccebb83 100644 --- a/internal/executor/fefo.go +++ b/internal/executor/fefo.go @@ -39,7 +39,38 @@ func routeQuotaExceeded(item Item, q RouteQuery) bool { } if !q.fefoNow.IsZero() { _, depleted := fefoExpiry(item, q.PublicModel, q.fefoNow) - return depleted + if depleted { + return true + } + } + // Unit-aware floor: block paid models once the account's remaining amount + // is at or below the effective floor for its quota unit. A nil quota + // (never sampled) is not blocked — there is no trustworthy value to compare. + // WorkBuddy/Qoder/Command report "credits" (CLI2API_CREDIT_FLOOR), while + // Devin/Kimi/Zhipu report "percent" (CLI2API_PERCENT_FLOOR). The two floors + // are never compared across units: a numeric 100 in one never silently + // gates the other. Trae entitlement packs and Codex rate-limit windows keep + // their existing scheduling behaviour. Floor <= 0 disables that unit's + // gate. Free models were already exempted above and never reach this point. + if item.Quota == nil { + return false + } + var floor float64 + var applies bool + switch item.Quota.Unit { + case "credits": + floor, applies = q.creditFloorDefault, true + if item.CreditFloor != nil { + floor = *item.CreditFloor + } + case "percent": + floor, applies = q.percentFloorDefault, true + if item.PercentFloor != nil { + floor = *item.PercentFloor + } + } + if applies && floor > 0 && !(item.Quota.Remaining > floor) { + return true } return false } diff --git a/internal/executor/pool.go b/internal/executor/pool.go index 68d46625..a24399fe 100644 --- a/internal/executor/pool.go +++ b/internal/executor/pool.go @@ -36,6 +36,14 @@ type Item struct { NextRestartAt time.Time RestartBackoffLevel int Quota *QuotaSnapshot + // CreditFloor is this account's per-account credit floor override. Nil + // means "not set" and defers to the pool's default floor; a non-nil + // value (including 0, which disables the floor for this account) wins. + CreditFloor *float64 + // PercentFloor is this account's per-account percent-quota floor override. + // Nil defers to the pool's default percent floor; a non-nil value (including + // 0, which disables the floor for this account) wins. + PercentFloor *float64 // Models is the last successful per-account catalog snapshot. A nil // slice means unknown (fail open); a non-nil slice, including empty, // is used to filter PublicModel. Entries keep the provider-native @@ -113,6 +121,10 @@ type RouteQuery struct { // fefoNow is set only by a FEFO pool. Other strategies keep the historical // quota gate, even when a cached package has since expired. fefoNow time.Time + // creditFloorDefault is the global floor, filled in by PickRoute from the + // pool. An account's Item.CreditFloor override wins when non-nil. + creditFloorDefault float64 + percentFloorDefault float64 } func itemRegion(item Item) string { @@ -403,6 +415,10 @@ type Pool struct { // lastPicked and then by account ID. Only used when weights differ. weightCounter map[string]map[string]int64 routingStrategy string + // defaultCreditFloor is the global credit floor applied to accounts that + // have no per-account override. Zero disables the floor. Guarded by mu. + defaultCreditFloor float64 + defaultPercentFloor float64 // stateCounter is the monotonic source for Item.StateVersion. Bumped // under p.mu on every persistable mutation, so the version stamped onto // a snapshot reflects its true production order even though the observer @@ -446,7 +462,59 @@ func NewPool(urls []string, ids []string) *Pool { ID: id, URL: url, Provider: "qoder", Runtime: "child_process", }) } - return &Pool{items: items, routingStrategy: RoutingStrategyRoundRobin} + return &Pool{items: items, routingStrategy: RoutingStrategyRoundRobin, defaultCreditFloor: 0, defaultPercentFloor: 0} +} + +// SetDefaultCreditFloor sets the global floor applied to accounts without a +// per-account override. Zero disables the floor. +func (p *Pool) SetDefaultCreditFloor(floor float64) { + if p == nil { + return + } + p.mu.Lock() + p.defaultCreditFloor = floor + p.mu.Unlock() +} + +// SetDefaultPercentFloor sets the global floor for percent-denominated quota. +// Zero disables the percent floor. +func (p *Pool) SetDefaultPercentFloor(floor float64) { + if p == nil { + return + } + p.mu.Lock() + p.defaultPercentFloor = floor + p.mu.Unlock() +} + +// SetCreditFloor sets one account's per-account credit-floor override. +func (p *Pool) SetCreditFloor(id string, floor *float64) { + if p == nil || id == "" { + return + } + p.mu.Lock() + defer p.mu.Unlock() + for i := range p.items { + if p.items[i].ID == id { + p.items[i].CreditFloor = floor + return + } + } +} + +// SetPercentFloor sets one account's per-account percent-floor override. +func (p *Pool) SetPercentFloor(id string, floor *float64) { + if p == nil || id == "" { + return + } + p.mu.Lock() + defer p.mu.Unlock() + for i := range p.items { + if p.items[i].ID == id { + p.items[i].PercentFloor = floor + return + } + } } func (p *Pool) SetRoutingStrategy(strategy string) { @@ -499,6 +567,8 @@ func (p *Pool) LenRoute(q RouteQuery) int { if p.routingStrategy == RoutingStrategyFEFO { q.fefoNow = time.Now() } + q.creditFloorDefault = p.defaultCreditFloor + q.percentFloorDefault = p.defaultPercentFloor count := 0 for _, item := range p.items { if routeMatches(item, q) { @@ -522,6 +592,8 @@ func (p *Pool) HasCapacity(q RouteQuery) bool { if p.routingStrategy == RoutingStrategyFEFO { q.fefoNow = now } + q.creditFloorDefault = p.defaultCreditFloor + q.percentFloorDefault = p.defaultPercentFloor for _, item := range p.items { if routeMatches(item, q) && !itemDown(item, now) && !itemModelDown(item, q, now) && !itemSaturated(item) { return true @@ -543,6 +615,8 @@ func (p *Pool) QuotaBlockedForModel(q RouteQuery) (Item, bool) { if p.routingStrategy == RoutingStrategyFEFO { q.fefoNow = time.Now() } + q.creditFloorDefault = p.defaultCreditFloor + q.percentFloorDefault = p.defaultPercentFloor for _, item := range p.items { if routeBlockedByQuota(item, q) { return item, true @@ -591,6 +665,8 @@ func (p *Pool) PickRoute(q RouteQuery) (Item, bool) { if p.routingStrategy == RoutingStrategyFEFO { q.fefoNow = now } + q.creditFloorDefault = p.defaultCreditFloor + q.percentFloorDefault = p.defaultPercentFloor eligible := make([]int, 0, len(p.items)) for i, item := range p.items { if routeMatches(item, q) { diff --git a/internal/runtime/manager_accounts.go b/internal/runtime/manager_accounts.go index 9c6bb368..8f2b01e3 100644 --- a/internal/runtime/manager_accounts.go +++ b/internal/runtime/manager_accounts.go @@ -45,6 +45,12 @@ func (m *Manager) SyncAccount(ctx context.Context, before, after Account) error if before.Priority != after.Priority { m.pool.SetWeight(after.ID, after.Priority) } + if !sameFloorValue(before.CreditFloor, after.CreditFloor) { + m.pool.SetCreditFloor(after.ID, after.CreditFloor) + } + if !samePercentFloor(before.PercentFloor, after.PercentFloor) { + m.pool.SetPercentFloor(after.ID, after.PercentFloor) + } if !sameModelRouting(before, after) { m.pool.SetModelRouting(after.ID, after.ModelAliases, after.EnabledModels, after.ModelsRestricted) } @@ -85,6 +91,23 @@ func (m *Manager) Create(ctx context.Context, input CreateAccount) (Account, err return account, nil } +// sameFloorValue compares two optional floor overrides; nil means "inherit", +// so nil and an explicit 0 are different values. +func sameFloorValue(a, b *float64) bool { + if a == nil || b == nil { + return a == b + } + return *a == *b +} + +// samePercentFloor compares two optional percent-floor overrides. +func samePercentFloor(a, b *float64) bool { + if a == nil || b == nil { + return a == b + } + return *a == *b +} + func sameModelRouting(before, after Account) bool { if before.ModelsRestricted != after.ModelsRestricted || len(before.EnabledModels) != len(after.EnabledModels) || len(before.ModelAliases) != len(after.ModelAliases) { return false @@ -131,7 +154,7 @@ func (m *Manager) Import(ctx context.Context, input ImportAccount) (Account, err account, err := m.store.Create(ctx, CreateAccount{ AutoCheckin: input.AutoCheckin, CheckinTime: input.CheckinTime, Name: input.Name, Provider: input.Provider, Region: input.Region, Enabled: false, - MaxInFlight: input.MaxInFlight, Priority: input.Priority, DropSystemPrompt: input.DropSystemPrompt, + MaxInFlight: input.MaxInFlight, Priority: input.Priority, CreditFloor: input.CreditFloor, PercentFloor: input.PercentFloor, DropSystemPrompt: input.DropSystemPrompt, WorkBuddyAutoCheckin: input.WorkBuddyAutoCheckin, WorkBuddyCheckinTime: input.WorkBuddyCheckinTime, ProxyURL: input.ProxyURL, }) diff --git a/internal/runtime/manager_process.go b/internal/runtime/manager_process.go index 29a546e8..4c9ee672 100644 --- a/internal/runtime/manager_process.go +++ b/internal/runtime/manager_process.go @@ -63,7 +63,7 @@ func (m *Manager) startAccount(ctx context.Context, account Account) error { m.pool.Upsert(Item{ ID: account.ID, Provider: descriptor.ID, Region: account.ProviderRegion, Runtime: string(descriptor.Runtime), DropSystemPrompt: account.DropSystemPrompt, - Weight: NormalizeWeight(account.Priority), MaxInFlight: account.MaxInFlight, Quota: account.Quota, + Weight: NormalizeWeight(account.Priority), MaxInFlight: account.MaxInFlight, Quota: account.Quota, CreditFloor: account.CreditFloor, PercentFloor: account.PercentFloor, ModelAliases: account.ModelAliases, EnabledModels: account.EnabledModels, ModelsRestricted: account.ModelsRestricted, RuntimeState: "starting", }) @@ -85,7 +85,7 @@ func (m *Manager) startAccount(ctx context.Context, account Account) error { m.pool.Upsert(Item{ ID: account.ID, Provider: descriptor.ID, Region: account.ProviderRegion, Runtime: string(providers.RuntimeInProcess), DropSystemPrompt: account.DropSystemPrompt, - Weight: NormalizeWeight(account.Priority), MaxInFlight: account.MaxInFlight, Quota: account.Quota, + Weight: NormalizeWeight(account.Priority), MaxInFlight: account.MaxInFlight, Quota: account.Quota, CreditFloor: account.CreditFloor, PercentFloor: account.PercentFloor, ModelAliases: account.ModelAliases, EnabledModels: account.EnabledModels, ModelsRestricted: account.ModelsRestricted, Ready: &ready, RuntimeState: "ready", }) @@ -107,7 +107,7 @@ func (m *Manager) startAccount(ctx context.Context, account Account) error { m.pool.Upsert(Item{ ID: account.ID, Provider: descriptor.ID, Region: account.ProviderRegion, Runtime: string(descriptor.Runtime), - Weight: NormalizeWeight(account.Priority), MaxInFlight: account.MaxInFlight, Quota: account.Quota, + Weight: NormalizeWeight(account.Priority), MaxInFlight: account.MaxInFlight, Quota: account.Quota, CreditFloor: account.CreditFloor, PercentFloor: account.PercentFloor, ModelAliases: account.ModelAliases, EnabledModels: account.EnabledModels, ModelsRestricted: account.ModelsRestricted, Ready: ¬Ready, RuntimeState: "starting", }) @@ -137,7 +137,7 @@ func (m *Manager) startAccount(ctx context.Context, account Account) error { m.pool.Upsert(Item{ ID: account.ID, URL: process.URL(), Provider: descriptor.ID, Region: account.ProviderRegion, Runtime: string(descriptor.Runtime), Restarts: restarts, - Weight: NormalizeWeight(account.Priority), MaxInFlight: account.MaxInFlight, Quota: account.Quota, + Weight: NormalizeWeight(account.Priority), MaxInFlight: account.MaxInFlight, Quota: account.Quota, CreditFloor: account.CreditFloor, PercentFloor: account.PercentFloor, ModelAliases: account.ModelAliases, EnabledModels: account.EnabledModels, ModelsRestricted: account.ModelsRestricted, Ready: ¬Ready, RuntimeState: "starting", }) diff --git a/internal/store/backup_test.go b/internal/store/backup_test.go index cf34f3dc..3bb9e932 100644 --- a/internal/store/backup_test.go +++ b/internal/store/backup_test.go @@ -104,6 +104,8 @@ func TestPublishedMigrationsKeepOrderedFilenameAndSQLDigest(t *testing.T) { {"025_request_log_api_key.sql", "1b02ba3388fc88de4263419e1b1a8fd97839e67587f2cdf1c0ec7560bd2386f1"}, {"026_request_log_detail_expiry.sql", "1467d6c863355f451c2268ef6062cd27fa4870141230697ed778996ca6a16a95"}, {"027_api_key_max_inflight.sql", "f5e5f592718579aa077c2f6cbd89e73a7da78e6ec0f009c183168acef43e2242"}, + {"028_account_credit_floor.sql", "1d0ce27561c054e36e0bacd6a8eb49ae8e58fb28835461f545f0ffab74272416"}, + {"029_account_percent_floor.sql", "cf4c2790ca5f4dc1d95c8f7446fe87a5b35f8d5e7571b7b2b297c6b5112a0587"}, } if len(sqliteMigrations) != len(want) { t.Fatalf("migration count = %d, want %d", len(sqliteMigrations), len(want)) diff --git a/internal/store/migrations.go b/internal/store/migrations.go index 1e5840ab..53e72c9a 100644 --- a/internal/store/migrations.go +++ b/internal/store/migrations.go @@ -256,6 +256,10 @@ ALTER TABLE request_logs ADD COLUMN detail_expired INTEGER NOT NULL DEFAULT 0; CREATE INDEX IF NOT EXISTS request_logs_detail_expired ON request_logs(detail_expired, created_at);`}, {filename: "027_api_key_max_inflight.sql", sql: ` ALTER TABLE api_keys ADD COLUMN max_inflight INTEGER NOT NULL DEFAULT 0;`}, + {filename: "028_account_credit_floor.sql", sql: ` +ALTER TABLE accounts ADD COLUMN credit_floor REAL;`}, + {filename: "029_account_percent_floor.sql", sql: ` +ALTER TABLE accounts ADD COLUMN percent_floor REAL;`}, } const schemaMigrationsDDL = ` diff --git a/internal/store/store.go b/internal/store/store.go index f3de453c..a202abbc 100644 --- a/internal/store/store.go +++ b/internal/store/store.go @@ -115,6 +115,12 @@ func (s *Store) Create(ctx context.Context, input accounts.CreateAccount) (accou if err := validateAccountProxy(input.Provider, input.Region, input.ProxyURL); err != nil { return accounts.Account{}, err } + if input.CreditFloor != nil && *input.CreditFloor < 0 { + return accounts.Account{}, fmt.Errorf("credit_floor must be >= 0") + } + if input.PercentFloor != nil && *input.PercentFloor < 0 { + return accounts.Account{}, fmt.Errorf("percent_floor must be >= 0") + } maxInFlight := accounts.DefaultMaxInFlightValue(input.MaxInFlight) priority := accounts.DefaultPriorityValue(input.Priority) now := time.Now().UTC() @@ -153,6 +159,8 @@ func (s *Store) Create(ctx context.Context, input accounts.CreateAccount) (accou Enabled: input.Enabled, MaxInFlight: maxInFlight, Priority: priority, + CreditFloor: input.CreditFloor, + PercentFloor: input.PercentFloor, DropSystemPrompt: dropSystemPrompt, WorkBuddyAutoCheckin: autoCheckin, WorkBuddyCheckinTime: checkinTime, @@ -165,11 +173,11 @@ func (s *Store) Create(ctx context.Context, input accounts.CreateAccount) (accou } _, err = s.db.ExecContext(ctx, ` INSERT INTO accounts ( - id, name, provider, provider_region, auth_type, enabled, max_inflight, priority, drop_system_prompt, + id, name, provider, provider_region, auth_type, enabled, max_inflight, priority, credit_floor, percent_floor, drop_system_prompt, workbuddy_auto_checkin, workbuddy_checkin_time, proxy_url, status, created_at, updated_at, auto_checkin, checkin_time - ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`, + ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`, account.ID, account.Name, account.Provider, account.ProviderRegion, account.AuthType, - account.Enabled, account.MaxInFlight, account.Priority, account.DropSystemPrompt, + account.Enabled, account.MaxInFlight, account.Priority, account.CreditFloor, account.PercentFloor, account.DropSystemPrompt, account.WorkBuddyAutoCheckin, account.WorkBuddyCheckinTime, account.ProxyURL, account.Status, formatTime(account.CreatedAt), formatTime(account.UpdatedAt), account.AutoCheckin, account.CheckinTime, @@ -182,7 +190,7 @@ func (s *Store) Create(ctx context.Context, input accounts.CreateAccount) (accou func (s *Store) Get(ctx context.Context, id string) (accounts.Account, error) { row := s.db.QueryRowContext(ctx, ` - SELECT id, name, provider, provider_region, remote_uid, auth_type, enabled, max_inflight, priority, + SELECT id, name, provider, provider_region, remote_uid, auth_type, enabled, max_inflight, priority, credit_floor, percent_floor, drop_system_prompt, workbuddy_auto_checkin, workbuddy_checkin_time, proxy_url, last_checkin_at, last_checkin_msg, last_checkin_status, status, last_error, last_error_kind, cooldown_until, quota_json, created_at, updated_at, auto_checkin, checkin_time FROM accounts WHERE id = ?`, strings.TrimSpace(id)) @@ -206,9 +214,10 @@ type rowScanner interface { func scanAccount(row rowScanner) (accounts.Account, error) { var account accounts.Account var cooldown, quotaJSON, created, updated sql.NullString + var creditFloor, percentFloor sql.NullFloat64 err := row.Scan( &account.ID, &account.Name, &account.Provider, &account.ProviderRegion, &account.RemoteUID, - &account.AuthType, &account.Enabled, &account.MaxInFlight, &account.Priority, + &account.AuthType, &account.Enabled, &account.MaxInFlight, &account.Priority, &creditFloor, &percentFloor, &account.DropSystemPrompt, &account.WorkBuddyAutoCheckin, &account.WorkBuddyCheckinTime, &account.ProxyURL, &account.LastCheckinAt, &account.LastCheckinMsg, &account.LastCheckinStatus, &account.Status, &account.LastError, &account.LastErrorKind, &cooldown, "aJSON, &created, &updated, &account.AutoCheckin, &account.CheckinTime, @@ -216,6 +225,14 @@ func scanAccount(row rowScanner) (accounts.Account, error) { if err != nil { return accounts.Account{}, err } + if creditFloor.Valid { + value := creditFloor.Float64 + account.CreditFloor = &value + } + if percentFloor.Valid { + value := percentFloor.Float64 + account.PercentFloor = &value + } if account.Provider == "" { account.Provider = "qoder" } @@ -259,7 +276,7 @@ func parseTime(value string) time.Time { func (s *Store) List(ctx context.Context) ([]accounts.Account, error) { rows, err := s.db.QueryContext(ctx, ` - SELECT id, name, provider, provider_region, remote_uid, auth_type, enabled, max_inflight, priority, + SELECT id, name, provider, provider_region, remote_uid, auth_type, enabled, max_inflight, priority, credit_floor, percent_floor, drop_system_prompt, workbuddy_auto_checkin, workbuddy_checkin_time, proxy_url, last_checkin_at, last_checkin_msg, last_checkin_status, status, last_error, last_error_kind, cooldown_until, quota_json, created_at, updated_at, auto_checkin, checkin_time FROM accounts ORDER BY created_at, id`) @@ -301,6 +318,24 @@ func (s *Store) Update(ctx context.Context, id string, input accounts.UpdateAcco if input.Priority != nil && *input.Priority > 0 { account.Priority = *input.Priority } + if input.CreditFloor != nil { + if *input.CreditFloor < 0 { + return fmt.Errorf("credit_floor must be >= 0") + } + value := *input.CreditFloor + account.CreditFloor = &value + } else if input.SetCreditFloor { + account.CreditFloor = nil + } + if input.PercentFloor != nil { + if *input.PercentFloor < 0 { + return fmt.Errorf("percent_floor must be >= 0") + } + value := *input.PercentFloor + account.PercentFloor = &value + } else if input.SetPercentFloor { + account.PercentFloor = nil + } if input.DropSystemPrompt != nil { account.DropSystemPrompt = *input.DropSystemPrompt } @@ -352,9 +387,9 @@ func (s *Store) Update(ctx context.Context, id string, input accounts.UpdateAcco } account.UpdatedAt = time.Now().UTC() result, err := s.db.ExecContext(ctx, ` - UPDATE accounts SET name = ?, enabled = ?, max_inflight = ?, priority = ?, drop_system_prompt = ?, + UPDATE accounts SET name = ?, enabled = ?, max_inflight = ?, priority = ?, credit_floor = ?, percent_floor = ?, drop_system_prompt = ?, workbuddy_auto_checkin = ?, workbuddy_checkin_time = ?, proxy_url = ?, updated_at = ?, auto_checkin = ?, checkin_time = ? - WHERE id = ?`, account.Name, account.Enabled, account.MaxInFlight, account.Priority, account.DropSystemPrompt, + WHERE id = ?`, account.Name, account.Enabled, account.MaxInFlight, account.Priority, account.CreditFloor, account.PercentFloor, account.DropSystemPrompt, account.WorkBuddyAutoCheckin, account.WorkBuddyCheckinTime, account.ProxyURL, formatTime(account.UpdatedAt), account.AutoCheckin, account.CheckinTime, account.ID) if err != nil { return fmt.Errorf("update account: %w", err) @@ -813,6 +848,7 @@ WHERE id = ?`, string(payload), status, formatTime(time.Now().UTC()), id) } return nil } + // ObserveHealth updates the probe-derived fields (remote_uid, last_error, // last_error_kind) but leaves the account's status column untouched. It is used // by the detached refresh path for a disabled account: probing must not promote diff --git a/internal/webui/static/assets/CartesianGrid-B7-zf0Hh.js b/internal/webui/static/assets/CartesianGrid-FBINGwGS.js similarity index 99% rename from internal/webui/static/assets/CartesianGrid-B7-zf0Hh.js rename to internal/webui/static/assets/CartesianGrid-FBINGwGS.js index f34b535a..13fec679 100644 --- a/internal/webui/static/assets/CartesianGrid-B7-zf0Hh.js +++ b/internal/webui/static/assets/CartesianGrid-FBINGwGS.js @@ -1,4 +1,4 @@ -import{$t as e,A as t,At as n,Bt as r,Cn as i,Ct as a,Dt as o,E as s,Et as c,F as l,Ft as u,Gt as d,H as f,Ht as p,I as m,It as h,J as g,Jt as _,K as v,Kt as y,L as b,Lt as x,M as S,Mt as C,N as w,Nt as T,O as E,Ot as D,P as O,Pt as k,R as ee,Rt as te,Sn as A,St as j,Tn as M,Tt as ne,Ut as re,Vt as ie,W as N,Wt as ae,X as oe,Xt as se,Y as P,Yt as ce,Z as le,Zt as ue,an as F,bt as de,cn as fe,ct as I,dn as pe,dt as me,en as L,et as he,fn as ge,gt as _e,ht as ve,it as ye,j as be,jt as xe,k as Se,kt as Ce,l as we,ln as Te,nn as Ee,nt as De,on as Oe,ot as ke,pn as Ae,q as R,qt as je,rt as Me,sn as Ne,st as Pe,tn as z,tt as Fe,u as Ie,ut as Le,vt as Re,wn as ze,wt as Be,xt as Ve,yt as B,z as He,zt as Ue}from"./index-Bm8WSfCK.js";function We(e,t){let n=new Map;for(let r=0;rvoid 0)}function et(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case`object`:return tt(e,t,n,r,i);case`function`:return Object.keys(t).length>0?et(e,{...t},n,r,i):j(e,t);default:return Ve(e)&&i?typeof t!=`string`||t===``:j(e,t)}}function tt(e,t,n,r,i=!1){if(t==null)return!0;if(Array.isArray(t))return rt(e,t,n,r);if(t instanceof Map)return nt(e,t,n,r);if(t instanceof Set)return it(e,t,n,r);let a=Object.keys(t);if(e==null)return i&&a.length===0;if(i)Je(e)&&(e=Object(e));else{let t=y(e);if(t!==`[object Object]`&&t!==`[object Arguments]`)return!1}if(a.length===0)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let i=0;ivoid 0)}function ot(e){return e=Qe(e),t=>at(t,e)}function st(e,t){return Xe(e,(n,i,a,s)=>{let c=t?.(n,i,a,s);if(c!==void 0)return c;if(typeof e==`object`){if(y(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return s.set(e,t),H(t,e,a,s),t}switch(Object.prototype.toString.call(e)){case h:case r:case o:{let t=new e.constructor(e?.valueOf());return H(t,e),t}case Be:{let t={};return H(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function ct(e){return st(e)}function lt(e){return typeof e==`object`&&!!e&&y(e)===`[object Arguments]`}function ut(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&Te(t)&&!(t in Object(e))?Ne(t):[t],n.length===0)return!1;let r=e;for(let e=0;evoid 0)}function et(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case`object`:return tt(e,t,n,r,i);case`function`:return Object.keys(t).length>0?et(e,{...t},n,r,i):j(e,t);default:return Ve(e)&&i?typeof t!=`string`||t===``:j(e,t)}}function tt(e,t,n,r,i=!1){if(t==null)return!0;if(Array.isArray(t))return rt(e,t,n,r);if(t instanceof Map)return nt(e,t,n,r);if(t instanceof Set)return it(e,t,n,r);let a=Object.keys(t);if(e==null)return i&&a.length===0;if(i)Je(e)&&(e=Object(e));else{let t=y(e);if(t!==`[object Object]`&&t!==`[object Arguments]`)return!1}if(a.length===0)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let i=0;ivoid 0)}function ot(e){return e=Qe(e),t=>at(t,e)}function st(e,t){return Xe(e,(n,i,a,s)=>{let c=t?.(n,i,a,s);if(c!==void 0)return c;if(typeof e==`object`){if(y(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return s.set(e,t),H(t,e,a,s),t}switch(Object.prototype.toString.call(e)){case h:case r:case o:{let t=new e.constructor(e?.valueOf());return H(t,e),t}case Be:{let t={};return H(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function ct(e){return st(e)}function lt(e){return typeof e==`object`&&!!e&&y(e)===`[object Arguments]`}function ut(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&Te(t)&&!(t in Object(e))?Ne(t):[t],n.length===0)return!1;let r=e;for(let e=0;ee.length)&&(t=e.length);for(var n=0,r=Array(t);nW||Math.abs(e.left-t.left)>W||Math.abs(e.top-t.top)>W||Math.abs(e.width-t.width)>W}function wt(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function Tt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=_t((0,U.useState)({height:0,left:0,top:0,width:0}),2),n=t[0],r=t[1],i=(0,U.useRef)(null),a=(0,U.useRef)(n);a.current=n;var o=(0,U.useCallback)(e=>{if(i.current!=null&&(i.current.disconnect(),i.current=null),e!=null){var t=wt(e);if(Ct(t,a.current)&&r(t),typeof ResizeObserver<`u`){var n=new ResizeObserver(()=>{var t=wt(e);Ct(t,a.current)&&r(t)});n.observe(e),i.current=n}}},[...e]);return(0,U.useEffect)(()=>()=>{var e;(e=i.current)==null||e.disconnect()},[]),[n,o]}function Et(){return Et=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n{var n=t.separator,r=n===void 0?K.separator:n,i=t.contentStyle,a=t.itemStyle,o=t.labelStyle,s=o===void 0?K.labelStyle:o,c=t.payload,l=t.formatter,u=t.itemSorter,d=t.wrapperClassName,f=t.labelClassName,p=t.label,m=t.labelFormatter,h=t.accessibilityLayer,g=h===void 0?K.accessibilityLayer:h,_=()=>{if(c&&c.length){var e={padding:0,margin:0},t=Rt(c,u).map((e,t)=>{if(!e||e.type===`none`)return null;var n=e.formatter||l||Lt,i=e.value,o=e.name,s=i,u=o;if(n){var d=n(i,o,e,t,c);if(Array.isArray(d)){var f=jt(d,2);s=f[0],u=f[1]}else if(d!=null)s=d;else return null}var p=G(G({},K.itemStyle),{},{color:e.color||K.itemStyle.color},a);return U.createElement(`li`,{className:`recharts-tooltip-item`,key:`tooltip-item-${t}`,style:p},L(u)?U.createElement(`span`,{className:`recharts-tooltip-item-name`},u):null,L(u)?U.createElement(`span`,{className:`recharts-tooltip-item-separator`},r):null,U.createElement(`span`,{className:`recharts-tooltip-item-value`},s),U.createElement(`span`,{className:`recharts-tooltip-item-unit`},e.unit||``))});return U.createElement(`ul`,{className:`recharts-tooltip-item-list`,style:e},t)}return null},v=G(G({},K.contentStyle),i),y=G({margin:0},s),b=!e(p),x=b?p:``,S=A(`recharts-default-tooltip`,d),C=A(`recharts-tooltip-label`,f);b&&m&&c!=null&&(x=m(p,c));var w=g?{role:`status`,"aria-live":`assertive`}:{};return U.createElement(`div`,Et({className:S,style:v},w),U.createElement(`p`,{className:C,style:y},U.isValidElement(x)?x:`${x}`),_())},q=`recharts-tooltip-wrapper`,Bt={visibility:`hidden`};function Vt(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return A(q,{[`${q}-right`]:z(n)&&t&&z(t.x)&&n>=t.x,[`${q}-left`]:z(n)&&t&&z(t.x)&&n=t.y,[`${q}-top`]:z(r)&&t&&z(t.y)&&r0?i:0),d=n[r]+i;if(t[r])return o[r]?u:d;var f=c[r];return f==null?0:o[r]?Math.max(uf+l?Math.max(u,f):Math.max(d,f)}function Ut(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?`translate3d(${t}px, ${n}px, 0)`:`translate(${t}px, ${n}px)`}}function Wt(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTop,i=e.offsetLeft,a=e.position,o=e.reverseDirection,s=e.tooltipBox,c=e.useTranslate3d,l=e.viewBox,u,d,f;return s&&s.height>0&&s.width>0&&n?(d=Ht({allowEscapeViewBox:t,coordinate:n,key:`x`,offset:i,position:a,reverseDirection:o,tooltipDimension:s.width,viewBox:l,viewBoxDimension:l.width}),f=Ht({allowEscapeViewBox:t,coordinate:n,key:`y`,offset:r,position:a,reverseDirection:o,tooltipDimension:s.height,viewBox:l,viewBoxDimension:l.height}),u=Ut({translateX:d,translateY:f,useTranslate3d:c})):u=Bt,{cssProperties:u,cssClasses:Vt({translateX:d,translateY:f,coordinate:n})}}function Gt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function J(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),2),r=n[0],i=n[1];U.useEffect(()=>{var t=t=>{t.key===`Escape`&&i({dismissed:!0,dismissedAtCoordinate:{x:e.coordinate?.x??0,y:e.coordinate?.y??0}})};return document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`keydown`,t)}},[e.coordinate?.x,e.coordinate?.y]),r.dismissed&&((e.coordinate?.x??0)!==r.dismissedAtCoordinate.x||(e.coordinate?.y??0)!==r.dismissedAtCoordinate.y)&&i(J(J({},r),{},{dismissed:!1}));var a=Wt({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset==`number`?e.offset:e.offset.x,offsetTop:typeof e.offset==`number`?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:e.lastBoundingBox,useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),o=a.cssClasses,s=a.cssProperties,c=J(J({},e.hasPortalFromProps?{}:J(J({transition:tn({prefersReducedMotion:t,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},s),{},{pointerEvents:`none`,position:`absolute`,top:0,left:0})),{},{visibility:!r.dismissed&&e.active&&e.hasPayload?`visible`:`hidden`},e.wrapperStyle);return U.createElement(`div`,{xmlns:`http://www.w3.org/1999/xhtml`,tabIndex:-1,className:o,style:c,ref:e.innerRef},e.children)}var rn=U.memo(nn),an=[`x`,`y`,`top`,`left`,`width`,`height`,`className`];function on(){return on=Object.assign?Object.assign.bind():function(e){for(var t=1;t`M${e},${i}v${r}M${a},${t}h${n}`,hn=e=>{var t=e.x,n=t===void 0?0:t,r=e.y,i=r===void 0?0:r,a=e.top,o=a===void 0?0:a,s=e.left,c=s===void 0?0:s,l=e.width,u=l===void 0?0:l,d=e.height,f=d===void 0?0:d,p=e.className,m=fn(e,an),h=cn({x:n,y:i,top:o,left:c,width:u,height:f},m);return!z(n)||!z(i)||!z(u)||!z(f)||!z(o)||!z(c)?null:U.createElement(`path`,on({},pe(h),{className:A(`recharts-cross`,p),d:mn(n,i,u,f,o,c)}))};function gn(e,t,n,r){var i=r/2;return{stroke:`none`,fill:`#ccc`,x:e===`horizontal`?t.x-i:n.left+.5,y:e===`horizontal`?n.top+.5:t.y-i,width:e===`horizontal`?r:n.width-1,height:e===`horizontal`?n.height-1:r}}function _n(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,a=e.endAngle;return{points:[R(t,n,r,i),R(t,n,r,a)],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}var vn,yn,bn,xn,Sn,Cn,wn;function Tn(){return Tn=Object.assign?Object.assign.bind():function(e){for(var t=1;tEe(t-e)*Math.min(Math.abs(t-e),359.999),X=e=>{var t=e.cx,n=e.cy,r=e.radius,i=e.angle,a=e.sign,o=e.isExternal,s=e.cornerRadius,c=e.cornerIsExternal,l=s*(o?1:-1)+r,u=Math.asin(s/l)/v,d=c?i:i+a*u,f=R(t,n,l,d),p=R(t,n,r,d),m=c?i-a*u:i;return{center:f,circleTangency:p,lineTangency:R(t,n,l*Math.cos(u*v),m),theta:u}},Dn=e=>{var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,a=e.startAngle,o=e.endAngle,s=En(a,o),c=a+s,l=R(t,n,i,a),u=R(t,n,i,c),d=F(vn||=Y([`M `,`,`,` diff --git a/internal/webui/static/assets/CostChart-_UJ6Pb7Z.js b/internal/webui/static/assets/CostChart-DD91nkKz.js similarity index 96% rename from internal/webui/static/assets/CostChart-_UJ6Pb7Z.js rename to internal/webui/static/assets/CostChart-DD91nkKz.js index f7bfac8f..a2dbcafe 100644 --- a/internal/webui/static/assets/CostChart-_UJ6Pb7Z.js +++ b/internal/webui/static/assets/CostChart-DD91nkKz.js @@ -1 +1 @@ -import{n as e,t}from"./CartesianGrid-B7-zf0Hh.js";import{Tn as n,_n as r,a as i,at as a,gn as o,i as s,r as c,t as l,vn as u,wn as d,xn as f}from"./index-Bm8WSfCK.js";var p=n(d(),1),m=f(),h=[`var(--accent)`,`var(--muted)`,`var(--success)`,`var(--warning)`];function g(e,t,n){let r=new Date(e);return Number.isFinite(r.getTime())?new Intl.DateTimeFormat(n===`zh`?`zh-CN`:`en-US`,t?{month:`short`,day:`numeric`}:{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,hour12:!1}).format(r):``}function _(e,t){return t===`credits`?e.per_model_credits??{}:t===`tokens`?e.per_model_tokens??{}:e.per_model??{}}function v(e,t){return t===`cost`?o(e):t===`tokens`?r(e):u(e)}function y(e,t){return t===`cost`?`¥${e>=10?Math.round(e):Number(e.toFixed(1))}`:t===`tokens`?r(e):u(e)}function b({active:e,payload:t,label:n,daily:r,lang:i,models:a,totalLabel:o,metric:s}){if(!e||!t?.length)return null;let c=new Map(a.map(e=>[e.id,e.label])),l=t.filter(e=>(e.value??0)>0).sort((e,t)=>t.value-e.value),u=t.reduce((e,t)=>e+(t.value??0),0);return(0,m.jsxs)(`div`,{className:`rounded-xl bg-overlay px-3 py-2 text-caption text-overlay-foreground shadow-overlay`,children:[(0,m.jsx)(`div`,{className:`mono text-muted`,children:g(String(n),r,i)}),(0,m.jsxs)(`div`,{className:`mt-1.5 grid gap-1`,children:[l.map(e=>(0,m.jsxs)(`div`,{className:`flex items-center justify-between gap-6`,children:[(0,m.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,m.jsx)(`span`,{className:`size-1.5 rounded-full`,style:{background:h[a.findIndex(t=>t.id===e.dataKey)%h.length]}}),c.get(e.dataKey)||e.dataKey]}),(0,m.jsx)(`span`,{className:`mono font-medium`,children:v(e.value,s)})]},e.dataKey)),(0,m.jsxs)(`div`,{className:`flex items-center justify-between gap-6 border-t border-separator pt-1`,children:[(0,m.jsx)(`span`,{className:`text-muted`,children:o}),(0,m.jsx)(`span`,{className:`mono font-medium`,children:v(u,s)})]})]})]})}function x({series:n,models:r,lang:o,emptyLabel:u,totalLabel:d,metric:f=`credits`}){let v=(0,p.useMemo)(()=>r.map(e=>e.id),[r]),x=(0,p.useMemo)(()=>n.map(e=>{let t=_(e,f),n={at:e.at};for(let e of v){let r=Number(t[e]??0);n[e]=f===`tokens`?r:Number(r.toFixed(4))}return n}),[n,v,f]),S=Math.max(0,...x.map(e=>v.reduce((t,n)=>t+Number(e[n]??0),0)))>0,C=(x.length>1?Date.parse(x[x.length-1].at)-Date.parse(x[0].at):0)>1728e5;return!n.length||!S?(0,m.jsx)(`div`,{className:`grid min-h-56 place-items-center px-6 py-12 text-center text-sm text-muted`,children:u}):(0,m.jsxs)(`div`,{className:`min-w-0`,children:[(0,m.jsx)(`div`,{className:`h-72 w-full`,children:(0,m.jsx)(a,{width:`100%`,height:`100%`,children:(0,m.jsxs)(l,{data:x,margin:{top:8,right:8,bottom:0,left:0},children:[(0,m.jsx)(`defs`,{children:v.map((e,t)=>(0,m.jsxs)(`linearGradient`,{id:`cost-${f}-${e}`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,m.jsx)(`stop`,{offset:`0%`,stopColor:h[t%h.length],stopOpacity:.32}),(0,m.jsx)(`stop`,{offset:`100%`,stopColor:h[t%h.length],stopOpacity:.04})]},e))}),(0,m.jsx)(t,{vertical:!1,stroke:`var(--separator)`,strokeDasharray:`3 6`}),(0,m.jsx)(s,{dataKey:`at`,tickLine:!1,axisLine:!1,minTickGap:28,tick:{fill:`var(--muted)`,fontSize:10,fontFamily:`var(--font-mono)`},tickFormatter:e=>g(e,C,o)}),(0,m.jsx)(c,{width:52,tickLine:!1,axisLine:!1,tick:{fill:`var(--muted)`,fontSize:10,fontFamily:`var(--font-mono)`},tickFormatter:e=>y(e,f)}),(0,m.jsx)(e,{cursor:{stroke:`var(--border)`,strokeDasharray:`3 3`},content:(0,m.jsx)(b,{daily:C,lang:o,models:r,totalLabel:d,metric:f})}),v.map((e,t)=>(0,m.jsx)(i,{type:`monotone`,dataKey:e,stackId:`usage`,stroke:h[t%h.length],strokeWidth:1.5,fill:`url(#cost-${f}-${e})`,isAnimationActive:!1,dot:!1,activeDot:{r:3,strokeWidth:1.2}},e))]})})}),(0,m.jsx)(`div`,{className:`mt-2 flex flex-wrap items-center gap-x-4 gap-y-1 text-[10px] text-muted`,children:r.map((e,t)=>(0,m.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,m.jsx)(`span`,{className:`size-1.5 rounded-full`,style:{background:h[t%h.length]}}),e.label]},e.id))})]})}export{x as CostChart}; \ No newline at end of file +import{n as e,t}from"./CartesianGrid-FBINGwGS.js";import{Tn as n,_n as r,a as i,at as a,gn as o,i as s,r as c,t as l,vn as u,wn as d,xn as f}from"./index-BuN5UEBJ.js";var p=n(d(),1),m=f(),h=[`var(--accent)`,`var(--muted)`,`var(--success)`,`var(--warning)`];function g(e,t,n){let r=new Date(e);return Number.isFinite(r.getTime())?new Intl.DateTimeFormat(n===`zh`?`zh-CN`:`en-US`,t?{month:`short`,day:`numeric`}:{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,hour12:!1}).format(r):``}function _(e,t){return t===`credits`?e.per_model_credits??{}:t===`tokens`?e.per_model_tokens??{}:e.per_model??{}}function v(e,t){return t===`cost`?o(e):t===`tokens`?r(e):u(e)}function y(e,t){return t===`cost`?`¥${e>=10?Math.round(e):Number(e.toFixed(1))}`:t===`tokens`?r(e):u(e)}function b({active:e,payload:t,label:n,daily:r,lang:i,models:a,totalLabel:o,metric:s}){if(!e||!t?.length)return null;let c=new Map(a.map(e=>[e.id,e.label])),l=t.filter(e=>(e.value??0)>0).sort((e,t)=>t.value-e.value),u=t.reduce((e,t)=>e+(t.value??0),0);return(0,m.jsxs)(`div`,{className:`rounded-xl bg-overlay px-3 py-2 text-caption text-overlay-foreground shadow-overlay`,children:[(0,m.jsx)(`div`,{className:`mono text-muted`,children:g(String(n),r,i)}),(0,m.jsxs)(`div`,{className:`mt-1.5 grid gap-1`,children:[l.map(e=>(0,m.jsxs)(`div`,{className:`flex items-center justify-between gap-6`,children:[(0,m.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,m.jsx)(`span`,{className:`size-1.5 rounded-full`,style:{background:h[a.findIndex(t=>t.id===e.dataKey)%h.length]}}),c.get(e.dataKey)||e.dataKey]}),(0,m.jsx)(`span`,{className:`mono font-medium`,children:v(e.value,s)})]},e.dataKey)),(0,m.jsxs)(`div`,{className:`flex items-center justify-between gap-6 border-t border-separator pt-1`,children:[(0,m.jsx)(`span`,{className:`text-muted`,children:o}),(0,m.jsx)(`span`,{className:`mono font-medium`,children:v(u,s)})]})]})]})}function x({series:n,models:r,lang:o,emptyLabel:u,totalLabel:d,metric:f=`credits`}){let v=(0,p.useMemo)(()=>r.map(e=>e.id),[r]),x=(0,p.useMemo)(()=>n.map(e=>{let t=_(e,f),n={at:e.at};for(let e of v){let r=Number(t[e]??0);n[e]=f===`tokens`?r:Number(r.toFixed(4))}return n}),[n,v,f]),S=Math.max(0,...x.map(e=>v.reduce((t,n)=>t+Number(e[n]??0),0)))>0,C=(x.length>1?Date.parse(x[x.length-1].at)-Date.parse(x[0].at):0)>1728e5;return!n.length||!S?(0,m.jsx)(`div`,{className:`grid min-h-56 place-items-center px-6 py-12 text-center text-sm text-muted`,children:u}):(0,m.jsxs)(`div`,{className:`min-w-0`,children:[(0,m.jsx)(`div`,{className:`h-72 w-full`,children:(0,m.jsx)(a,{width:`100%`,height:`100%`,children:(0,m.jsxs)(l,{data:x,margin:{top:8,right:8,bottom:0,left:0},children:[(0,m.jsx)(`defs`,{children:v.map((e,t)=>(0,m.jsxs)(`linearGradient`,{id:`cost-${f}-${e}`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,m.jsx)(`stop`,{offset:`0%`,stopColor:h[t%h.length],stopOpacity:.32}),(0,m.jsx)(`stop`,{offset:`100%`,stopColor:h[t%h.length],stopOpacity:.04})]},e))}),(0,m.jsx)(t,{vertical:!1,stroke:`var(--separator)`,strokeDasharray:`3 6`}),(0,m.jsx)(s,{dataKey:`at`,tickLine:!1,axisLine:!1,minTickGap:28,tick:{fill:`var(--muted)`,fontSize:10,fontFamily:`var(--font-mono)`},tickFormatter:e=>g(e,C,o)}),(0,m.jsx)(c,{width:52,tickLine:!1,axisLine:!1,tick:{fill:`var(--muted)`,fontSize:10,fontFamily:`var(--font-mono)`},tickFormatter:e=>y(e,f)}),(0,m.jsx)(e,{cursor:{stroke:`var(--border)`,strokeDasharray:`3 3`},content:(0,m.jsx)(b,{daily:C,lang:o,models:r,totalLabel:d,metric:f})}),v.map((e,t)=>(0,m.jsx)(i,{type:`monotone`,dataKey:e,stackId:`usage`,stroke:h[t%h.length],strokeWidth:1.5,fill:`url(#cost-${f}-${e})`,isAnimationActive:!1,dot:!1,activeDot:{r:3,strokeWidth:1.2}},e))]})})}),(0,m.jsx)(`div`,{className:`mt-2 flex flex-wrap items-center gap-x-4 gap-y-1 text-[10px] text-muted`,children:r.map((e,t)=>(0,m.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,m.jsx)(`span`,{className:`size-1.5 rounded-full`,style:{background:h[t%h.length]}}),e.label]},e.id))})]})}export{x as CostChart}; \ No newline at end of file diff --git a/internal/webui/static/assets/LiveSparkline-13g_xCuL.js b/internal/webui/static/assets/LiveSparkline-CpXF5h0H.js similarity index 80% rename from internal/webui/static/assets/LiveSparkline-13g_xCuL.js rename to internal/webui/static/assets/LiveSparkline-CpXF5h0H.js index d7acf67b..5f0ec023 100644 --- a/internal/webui/static/assets/LiveSparkline-13g_xCuL.js +++ b/internal/webui/static/assets/LiveSparkline-CpXF5h0H.js @@ -1 +1 @@ -import{a as e,at as t,r as n,t as r,xn as i}from"./index-Bm8WSfCK.js";var a=i();function o({samples:i,capacity:o,label:s}){let c=i.length?i:[{at:0,value:0}],l=Math.max(1,o,...c.map(e=>e.value));return(0,a.jsx)(`div`,{className:`h-6 w-[120px] shrink-0`,role:`img`,"aria-label":s,children:(0,a.jsx)(t,{width:`100%`,height:`100%`,children:(0,a.jsxs)(r,{data:c,margin:{top:1,right:0,bottom:1,left:0},children:[(0,a.jsx)(n,{hide:!0,domain:[0,l]}),(0,a.jsx)(e,{type:`monotone`,dataKey:`value`,stroke:`var(--foreground)`,strokeOpacity:.7,strokeWidth:1.25,fill:`var(--foreground)`,fillOpacity:.08,isAnimationActive:!1,dot:!1})]})})})}export{o as LiveSparkline}; \ No newline at end of file +import{a as e,at as t,r as n,t as r,xn as i}from"./index-BuN5UEBJ.js";var a=i();function o({samples:i,capacity:o,label:s}){let c=i.length?i:[{at:0,value:0}],l=Math.max(1,o,...c.map(e=>e.value));return(0,a.jsx)(`div`,{className:`h-6 w-[120px] shrink-0`,role:`img`,"aria-label":s,children:(0,a.jsx)(t,{width:`100%`,height:`100%`,children:(0,a.jsxs)(r,{data:c,margin:{top:1,right:0,bottom:1,left:0},children:[(0,a.jsx)(n,{hide:!0,domain:[0,l]}),(0,a.jsx)(e,{type:`monotone`,dataKey:`value`,stroke:`var(--foreground)`,strokeOpacity:.7,strokeWidth:1.25,fill:`var(--foreground)`,fillOpacity:.08,isAnimationActive:!1,dot:!1})]})})})}export{o as LiveSparkline}; \ No newline at end of file diff --git a/internal/webui/static/assets/TrafficChart-BhmoeXrG.js b/internal/webui/static/assets/TrafficChart-Cbl19Xw8.js similarity index 99% rename from internal/webui/static/assets/TrafficChart-BhmoeXrG.js rename to internal/webui/static/assets/TrafficChart-Cbl19Xw8.js index fa88c2b2..a8eb4c01 100644 --- a/internal/webui/static/assets/TrafficChart-BhmoeXrG.js +++ b/internal/webui/static/assets/TrafficChart-Cbl19Xw8.js @@ -1 +1 @@ -import{n as e,t}from"./CartesianGrid-B7-zf0Hh.js";import{$ as n,$t as r,B as i,C as a,D as o,G as s,Q as c,Qt as l,S as u,Sn as d,T as f,Tn as p,U as m,V as h,W as g,Y as _,Yt as v,_ as y,_n as b,_t as x,a as S,at as C,b as w,bn as T,c as E,ct as D,d as ee,dn as O,f as k,fn as A,ft as j,g as M,h as te,hn as ne,i as re,in as N,k as P,lt as F,m as I,mn as ie,mt as L,n as ae,o as oe,p as se,pt as R,r as ce,rn as le,s as ue,st as z,tt as de,un as fe,v as pe,w as me,wn as he,x as ge,xn as _e,y as ve,yn as B,yt as ye}from"./index-Bm8WSfCK.js";var V=p(he()),be=[`animationElapsedTime`,`isAnimating`,`isEntrance`,`visibleLength`,`strokeDasharray`,`connectNulls`];function H(){return H=Object.assign?Object.assign.bind():function(e){for(var t=1;te+t,0);if(!i)return U(t,e);for(var a=Math.floor(e/i),o=e%i,s=[],c=0,l=0;co){s=[...r.slice(0,c),o-l];break}}var f=s.length%2==0?[0,t]:[t];return[...Te(r,a),...s,...f].map(e=>`${e}px`).join(`, `)}function De(e,t,n){return e?Ee(n,t,`${e}`.split(/[,\s]+/gim).map(e=>parseFloat(e))):U(t,n)}function Oe(e){e.animationElapsedTime,e.isAnimating,e.isEntrance;var t=e.visibleLength,n=e.strokeDasharray,r=e.connectNulls,i=xe(e,be),a=r??!1,o;if(t!=null){var s=i.pathRef;o=De(n,Ce(s?.current??null),t)}else n!=null&&(o=String(n));return V.createElement(_,H({},i,{connectNulls:a,strokeDasharray:o}))}function ke(e){var t=(0,V.useRef)(0),n=(0,V.useRef)(0),r=(0,V.useRef)(!1),i=(0,V.useRef)(e);return i.current!==e&&(t.current=n.current,i.current=e),(0,V.useCallback)((e,i)=>{if(r.current)return null;var a=Math.min(N(t.current+e*i),i);return e>0&&i>0&&(n.current=Math.max(n.current,a),a>=i)?(r.current=!0,null):a},[])}var Ae=[`children`];function je(e,t){if(e==null)return{};var n,r,i=Me(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r({x:0,y:0,value:0}),errorBarOffset:0});function Pe(e){var t=e.children,n=je(e,Ae);return V.createElement(Ne.Provider,{value:n},t)}var W=(e,t,n,r)=>i(e,`xAxis`,t,r),G=(e,t,n,r)=>h(e,`xAxis`,t,r),K=(e,t,n,r)=>i(e,`yAxis`,n,r),q=(e,t,n,r)=>h(e,`yAxis`,n,r),Fe=x([n,W,K,G,q],(e,t,n,r,i)=>L(e,`xAxis`)?D(t,r,!1):D(n,i,!1)),Ie=(e,t,n,r,i)=>i;function Le(e){return e.type===`line`}var Re=x([m,Ie],(e,t)=>e.filter(Le).find(e=>e.id===t)),ze=x([n,W,K,G,q,Re,Fe,s],(e,t,n,r,i,a,o,s)=>{var c=s.chartData,l=s.dataStartIndex,u=s.dataEndIndex;if(!(a==null||t==null||n==null||r==null||i==null||r.length===0||i.length===0||o==null||e!==`horizontal`&&e!==`vertical`)){var d=a.dataKey,f=a.data,p=f!=null&&f.length>0?f:c?.slice(l,u+1);if(p!=null)return at({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:d,bandSize:o,displayedData:p})}}),Be=[`id`],Ve=[`type`,`layout`,`connectNulls`,`needClip`,`shape`,`strokeDasharray`],He=[`activeDot`,`animateNewValues`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`hide`,`isAnimationActive`,`label`,`legendType`,`xAxisId`,`yAxisId`,`id`];function J(){return J=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?t/n:0}var Q={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,animationInterpolateFn:(e,t)=>{if(e==null)return[];if(t===1)return e.flatMap(e=>e.status===`removed`?[]:[e.next]);var n=Je(e),r=[];for(var i of e)if(i.status===`matched`)r.push(Z(Z({},i.next),{},{x:l(i.prev.x,i.next.x,t),y:l(i.prev.y,i.next.y,t)}));else if(i.status===`added`){if(i.next.x!=null){var a=i.next.x-n;r.push(Z(Z({},i.next),{},{x:l(a,i.next.x,t),y:i.next.y}))}else r.push(i.next)}else if(i.status===`removed`&&i.prev.x!=null){var o=i.prev.x+n;r.push(Z(Z({},i.prev),{},{x:l(i.prev.x,o,t),y:i.prev.y}))}return r},animationMatchBy:ve,connectNulls:!1,dot:!0,fill:`#fff`,hide:!1,isAnimationActive:`auto`,label:!1,legendType:`line`,shape:Oe,stroke:`#3182bd`,strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:g.line,type:`linear`},Ye=e=>{var t=e.dataKey,n=e.name,r=e.stroke,i=e.legendType;return[{inactive:e.hide,dataKey:t,type:i,color:r,value:j(n,t),payload:e}]},Xe=V.memo(e=>{var t=e.dataKey,n=e.data,r=e.stroke,i=e.strokeWidth,a=e.fill,o=e.name,s=e.hide,c=e.unit,l=e.formatter,u=e.tooltipType,d=e.id,f={dataDefinedOnItem:n,getPosition:le,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:j(o,t),hide:s,type:u,color:r,unit:c,formatter:l,graphicalItemId:d}};return V.createElement(ge,{tooltipEntrySettings:f})});function Ze(e){var t=e.clipPathId,n=e.points,r=e.props,i=r.dot,a=r.dataKey,o=r.needClip;r.id;var s=Y(r,Be),c=A(s);return V.createElement(I,{points:n,dot:i,className:`recharts-line-dots`,dotClassName:`recharts-line-dot`,dataKey:a,baseProps:c,needClip:o,clipPathId:t})}function Qe(e){var t=e.showLabels,n=e.children,r=e.points,i=(0,V.useMemo)(()=>r?.map(e=>{var t={x:e.x??0,y:e.y??0,width:0,lowerWidth:0,upperWidth:0,height:0};return Z(Z({},t),{},{value:e.value,payload:e.payload,viewBox:t,parentViewBox:void 0,fill:void 0})}),[r]);return V.createElement(me,{value:t?i:void 0},n)}function $e(e){var t=e.clipPathId,n=e.pathRef,r=e.points,i=e.props,a=e.animationElapsedTime,o=e.isAnimating,s=e.isEntrance,c=e.visibleLength,l=i.type,d=i.layout,f=i.connectNulls,p=i.needClip,m=i.shape,h=i.strokeDasharray,g=Y(i,Ve),_=Z(Z({},O(g)),{},{fill:`none`,className:`recharts-line-curve`,clipPath:p?`url(#clipPath-${t})`:void 0,points:r,type:l,layout:d,connectNulls:f,strokeDasharray:h??i.strokeDasharray,pathRef:n,animationElapsedTime:a,isAnimating:o,isEntrance:i.animateNewValues?s:!1,visibleLength:c});return V.createElement(V.Fragment,null,r?.length>1&&V.createElement(u,{option:m,DefaultShape:Q.shape,shapeProps:_}),V.createElement(Ze,{points:r,clipPathId:t,props:i}))}function et(e){var t=e.clipPathId,n=e.props,r=e.pathRef,i=e.previousPointsRef,a=n.points,o=n.isAnimationActive,s=n.animationBegin,c=n.animationDuration,l=n.animationEasing,u=n.animationMatchBy,d=n.animationInterpolateFn,p=n.layout,m=qe(r.current),h=pe(n.onAnimationStart,n.onAnimationEnd),g=h.isAnimating,_=h.handleAnimationStart,v=h.handleAnimationEnd,b=!g,x=ke(a),S=(0,V.useCallback)(e=>e>0&&m>0,[m]);return V.createElement(Qe,{points:a,showLabels:b},n.children,V.createElement(y,{animationInput:a,animationIdPrefix:`recharts-line-`,items:a,previousItemsRef:i,isAnimationActive:o,animationBegin:s,animationDuration:c,animationEasing:l,onAnimationStart:_,onAnimationEnd:v,animationInterpolateFn:d,animationMatchBy:u,shouldUpdatePreviousRef:S,layout:p},(e,i,a)=>{var o=g||i<1,s=o?x(i,m):null;return V.createElement($e,{props:n,points:e,clipPathId:t,pathRef:r,animationElapsedTime:i,isAnimating:o,isEntrance:a,visibleLength:s})}),V.createElement(f,{label:n.label}))}function tt(e){var t=e.clipPathId,n=e.props,r=(0,V.useRef)(null),i=(0,V.useRef)(null);return V.createElement(et,{props:n,clipPathId:t,previousPointsRef:r,pathRef:i})}var nt=(e,t)=>({x:e.x??void 0,y:e.y??void 0,value:e.value,errorVal:R(e.payload,t)}),rt=class extends V.Component{render(){var e=this.props,t=e.hide,n=e.dot,r=e.points,i=e.className,o=e.xAxisId,s=e.yAxisId,c=e.top,l=e.left,u=e.width,f=e.height,p=e.id,m=e.needClip,h=e.zIndex;if(t)return null;var g=d(`recharts-line`,i),_=p,v=oe(n),y=v.r,b=v.strokeWidth,x=a(n),S=y*2+b,C=m?`url(#clipPath-${x?``:`dots-`}${_})`:void 0;return V.createElement(P,{zIndex:h},V.createElement(fe,{className:g},m&&V.createElement(`defs`,null,V.createElement(ue,{clipPathId:_,xAxisId:o,yAxisId:s}),!x&&V.createElement(`clipPath`,{id:`clipPath-dots-${_}`},V.createElement(`rect`,{x:l-S/2,y:c-S/2,width:u+S,height:f+S}))),V.createElement(Pe,{xAxisId:o,yAxisId:s,data:r,dataPointFormatter:nt,errorBarOffset:0},V.createElement(tt,{props:this.props,clipPathId:_}))),V.createElement(k,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:C}))}};function it(e){var t=v(e,Q),n=t.activeDot,r=t.animateNewValues,i=t.animationBegin,a=t.animationDuration,o=t.animationEasing,s=t.connectNulls,c=t.dot,l=t.hide,u=t.isAnimationActive,d=t.label,f=t.legendType,p=t.xAxisId,m=t.yAxisId,h=t.id,g=Y(t,He),_=E(p,m).needClip,y=se(),b=de(),x=z(),S=ye(e=>ze(e,p,m,x,h));if(b!==`horizontal`&&b!==`vertical`||S==null||y==null)return null;var C=y.height,w=y.width,T=y.x,D=y.y;return V.createElement(rt,J({},g,{id:h,connectNulls:s,dot:c,activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:a,animationEasing:o,isAnimationActive:u,hide:l,label:d,legendType:f,xAxisId:p,yAxisId:m,points:S,layout:b,height:C,width:w,left:T,top:D,needClip:_}))}function at(e){var t=e.layout,n=e.xAxis,i=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,s=e.dataKey,c=e.bandSize;return e.displayedData.map((e,l)=>{var u=R(e,s);if(t===`horizontal`)return{x:F({axis:n,ticks:a,bandSize:c,entry:e,index:l}),y:(r(u)?null:i.scale.map(u))??null,value:u,payload:e};var d=r(u)?null:n.scale.map(u),f=F({axis:i,ticks:o,bandSize:c,entry:e,index:l});return d==null||f==null?null:{x:d,y:f,value:u,payload:e}}).filter(Boolean)}function ot(e){var t=v(e,Q),n=z();return V.createElement(M,{id:t.id,type:`line`},e=>V.createElement(V.Fragment,null,V.createElement(w,{legendPayload:Ye(t)}),V.createElement(Xe,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,formatter:t.formatter,tooltipType:t.tooltipType,id:e}),V.createElement(te,{type:`line`,id:e,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),V.createElement(it,J({},t,{id:e}))))}var st=V.memo(ot,c);st.displayName=`Line`;var ct=[`axis`],lt=(0,V.forwardRef)((e,t)=>V.createElement(ae,{chartName:`ComposedChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:ct,tooltipPayloadSearcher:o,categoricalChartProps:e,ref:t})),ut={metric:24,title:18,section:15,body:13,xs:12,caption:12},$=_e();function dt(e,t,n){let r=new Date(e);return Number.isFinite(r.getTime())?new Intl.DateTimeFormat(n===`zh`?`zh-CN`:`en-US`,t?{month:`short`,day:`numeric`}:{hour:`2-digit`,minute:`2-digit`,hour12:!1}).format(r):``}function ft(e){if(e<=1)return 1;let t=10**Math.floor(Math.log10(e)),n=e/t;return(n<=1?1:n<=2?2:n<=5?5:10)*t}function pt(e){let t=Math.max(0,e.ok??e.requests-e.error),n=Math.min(Math.max(0,e.requests-t),Math.max(0,e.requests));return{...e,okCount:t,errorCount:n,inputTokens:e.prompt_tokens??0,outputTokens:e.completion_tokens??0,cacheTokens:e.cache_read_tokens??0,p50:e.latency_p50_ms??null,p95:e.latency_p95_ms??null}}function mt({active:e,payload:t,daily:n,lang:r,specs:i,format:a,totalLabel:o,total:s}){if(!e||!t?.[0])return null;let c=t[0].payload;return(0,$.jsxs)(`div`,{className:`rounded-xl bg-overlay px-3 py-2 text-caption text-overlay-foreground shadow-overlay`,children:[(0,$.jsx)(`div`,{className:`mono text-muted`,children:dt(c.at,n,r)}),(0,$.jsxs)(`div`,{className:`mt-1.5 grid gap-1`,children:[i.map(e=>(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-6`,children:[(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,$.jsx)(`span`,{className:`size-1.5 rounded-full`,style:{background:e.color}}),e.label]}),(0,$.jsx)(`span`,{className:`mono font-medium`,children:a(c[e.key])})]},String(e.key))),s&&o?(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-6 pt-1`,children:[(0,$.jsx)(`span`,{className:`text-muted`,children:o}),(0,$.jsx)(`span`,{className:`mono font-medium`,children:a(s(c))})]}):null]})]})}function ht({series:n,lang:r,emptyLabel:i,okLabel:a,errorLabel:o,onSelectRange:s,selectHint:c,labels:l,initialMetric:u=`requests`}){let[d,f]=(0,V.useState)(u),[p,m]=(0,V.useState)(null),[h,g]=(0,V.useState)(null),_=(0,V.useRef)(!1),v=(0,V.useRef)(null),y=(0,V.useMemo)(()=>n.map(pt),[n]),x=y[0],w=y[y.length-1],E=(x&&w?Date.parse(w.at)-Date.parse(x.at):0)>1728e5,D=l??{requests:`Requests`,tokens:`Tokens`,latency:`p95 latency`,input:`input`,output:`output`,cacheRead:`cache read`,p50:`p50`,p95:`p95`,total:`total`},O=d===`tokens`?[{key:`inputTokens`,label:D.input,color:`var(--foreground)`,area:!0,width:1.5,opacity:.75},{key:`outputTokens`,label:D.output,color:`var(--success)`,area:!0,width:1.5},{key:`cacheTokens`,label:D.cacheRead,color:`var(--muted)`,width:1.25,opacity:.8}]:d===`latency`?[{key:`p95`,label:D.p95,color:`var(--warning)`,area:!0,width:1.75},{key:`p50`,label:D.p50,color:`var(--muted)`,width:1.25,opacity:.85}]:[{key:`okCount`,label:a,color:`var(--success)`,area:!0,width:1.75},{key:`errorCount`,label:o,color:`var(--danger)`,area:!0,width:1.25,opacity:.7}],k=e=>e==null?`—`:d===`latency`?B(e):b(e),A=d===`requests`?e=>e.requests:d===`tokens`?e=>e.inputTokens+e.outputTokens:void 0,j=y.flatMap(e=>O.map(t=>Number(e[t.key]??0))),M=d===`requests`?Math.max(0,...y.map(e=>e.requests)):Math.max(0,...j),te=ft(M),N=y.some(e=>e.requests>0),P=y.map(e=>`${e.at}:${e.requests}:${e.error}`).join(`|`);(0,V.useLayoutEffect)(()=>{let e=v.current;if(!e||!N||_.current)return;let t=!1,n=null,r=T.context(()=>{let r=T.matchMedia(),i=()=>{let t=T.utils.toArray(`.recharts-area-area`,e),n=T.utils.toArray(`.recharts-line-curve`,e);return!t.length&&!n.length?!1:(r.add(`(prefers-reduced-motion: reduce)`,()=>{T.set(n,{clearProps:`strokeDashoffset,strokeDasharray`}),T.set(t,{clearProps:`autoAlpha`})}),r.add(`(prefers-reduced-motion: no-preference)`,()=>{T.fromTo(t,{autoAlpha:0},{autoAlpha:1,duration:.45,ease:`power2.out`,stagger:.05}),n.forEach((e,t)=>{let n=e.getTotalLength();T.fromTo(e,{strokeDasharray:n,strokeDashoffset:n},{strokeDashoffset:0,duration:.7,delay:t*.05,ease:`power2.out`})})}),!0)};if(i()){t=!0,_.current=!0;return}n=new MutationObserver(()=>{t||i()&&(t=!0,_.current=!0,n?.disconnect())}),n.observe(e,{childList:!0,subtree:!0})},e);return()=>{n?.disconnect(),r.revert()}},[N,P]);let F=y.length>1?Date.parse(y[1].at)-Date.parse(y[0].at):36e5,I=()=>{if(p&&h&&s){let e=Date.parse(p),t=Date.parse(h);if(Number.isFinite(e)&&Number.isFinite(t)){let n=Math.min(e,t),r=Math.max(e,t)+F;s(new Date(n).toISOString(),new Date(r).toISOString())}}m(null),g(null)},L=e=>{let t=e?.activeLabel;return t==null?null:String(t)};return!n.length||!N?(0,$.jsx)(ne,{emptyLabel:i}):(0,$.jsxs)(`div`,{ref:v,className:`min-w-0`,children:[(0,$.jsx)(`div`,{className:`mb-3 flex justify-end`,children:(0,$.jsx)(ie,{value:d,onChange:e=>f(e),ariaLabel:D.requests,options:[{id:`requests`,label:D.requests},{id:`tokens`,label:D.tokens},{id:`latency`,label:D.latency}]})}),(0,$.jsx)(`div`,{className:`h-56 w-full`,children:(0,$.jsx)(C,{width:`100%`,height:`100%`,children:(0,$.jsxs)(lt,{data:y,margin:{top:8,right:8,bottom:0,left:0},style:s?{cursor:`crosshair`,userSelect:`none`}:void 0,onMouseDown:s?e=>{let t=L(e);t&&(m(t),g(t))}:void 0,onMouseMove:s?e=>{if(!p)return;let t=L(e);t&&g(t)}:void 0,onMouseUp:s?I:void 0,onMouseLeave:s?()=>{m(null),g(null)}:void 0,children:[(0,$.jsx)(`defs`,{children:O.filter(e=>e.area).map(e=>(0,$.jsxs)(`linearGradient`,{id:`traffic-fill-${String(e.key)}`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,$.jsx)(`stop`,{offset:`0%`,stopColor:e.color,stopOpacity:.22}),(0,$.jsx)(`stop`,{offset:`100%`,stopColor:e.color,stopOpacity:.02})]},String(e.key)))}),(0,$.jsx)(t,{vertical:!1,stroke:`var(--separator)`,strokeDasharray:`3 6`}),(0,$.jsx)(re,{dataKey:`at`,tickLine:!1,axisLine:!1,minTickGap:28,tick:{fill:`var(--muted)`,fontSize:ut.caption,fontFamily:`var(--font-mono)`},tickFormatter:e=>dt(e,E,r)}),(0,$.jsx)(ce,{width:d===`latency`?44:36,domain:[0,te],tickLine:!1,axisLine:!1,allowDecimals:!1,tick:{fill:`var(--muted)`,fontSize:ut.caption,fontFamily:`var(--font-mono)`},tickFormatter:e=>d===`latency`?B(e):b(e)}),(0,$.jsx)(e,{cursor:{stroke:`var(--border)`,strokeDasharray:`3 3`},content:(0,$.jsx)(mt,{daily:E,lang:r,specs:O,format:k,totalLabel:D.total,total:A})}),O.filter(e=>e.area).map(e=>(0,$.jsx)(S,{type:`monotone`,dataKey:e.key,stroke:`none`,fill:`url(#traffic-fill-${String(e.key)})`,isAnimationActive:!1,activeDot:!1,dot:!1,connectNulls:!0},`area-${String(e.key)}`)),O.map(e=>(0,$.jsx)(st,{type:`monotone`,dataKey:e.key,stroke:e.color,strokeWidth:e.width??1.5,strokeOpacity:e.opacity??1,dot:!1,isAnimationActive:!1,connectNulls:!0,activeDot:{r:4,fill:`var(--surface)`,stroke:e.color,strokeWidth:1.5}},`line-${String(e.key)}`)),p&&h?(0,$.jsx)(ee,{x1:p,x2:h,fill:`var(--foreground)`,fillOpacity:.06,stroke:`none`,ifOverflow:`visible`}):null]})})}),(0,$.jsxs)(`div`,{className:`mt-2 flex min-h-5 items-center justify-between gap-3 text-caption text-muted`,children:[(0,$.jsx)(`div`,{className:`flex items-center gap-3`,children:O.map(e=>(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,$.jsx)(`span`,{className:`size-1.5 rounded-full`,style:{background:e.color}}),e.label]},String(e.key)))}),(0,$.jsxs)(`span`,{className:`flex items-center gap-3`,children:[s&&c?(0,$.jsx)(`span`,{children:c}):null,(0,$.jsxs)(`span`,{className:`mono`,children:[k(M),` peak`]})]})]})]})}export{ht as TrafficChart}; \ No newline at end of file +import{n as e,t}from"./CartesianGrid-FBINGwGS.js";import{$ as n,$t as r,B as i,C as a,D as o,G as s,Q as c,Qt as l,S as u,Sn as d,T as f,Tn as p,U as m,V as h,W as g,Y as _,Yt as v,_ as y,_n as b,_t as x,a as S,at as C,b as w,bn as T,c as E,ct as D,d as ee,dn as O,f as k,fn as A,ft as j,g as M,h as te,hn as ne,i as re,in as N,k as P,lt as F,m as I,mn as ie,mt as L,n as ae,o as oe,p as se,pt as R,r as ce,rn as le,s as ue,st as z,tt as de,un as fe,v as pe,w as me,wn as he,x as ge,xn as _e,y as ve,yn as B,yt as ye}from"./index-BuN5UEBJ.js";var V=p(he()),be=[`animationElapsedTime`,`isAnimating`,`isEntrance`,`visibleLength`,`strokeDasharray`,`connectNulls`];function H(){return H=Object.assign?Object.assign.bind():function(e){for(var t=1;te+t,0);if(!i)return U(t,e);for(var a=Math.floor(e/i),o=e%i,s=[],c=0,l=0;co){s=[...r.slice(0,c),o-l];break}}var f=s.length%2==0?[0,t]:[t];return[...Te(r,a),...s,...f].map(e=>`${e}px`).join(`, `)}function De(e,t,n){return e?Ee(n,t,`${e}`.split(/[,\s]+/gim).map(e=>parseFloat(e))):U(t,n)}function Oe(e){e.animationElapsedTime,e.isAnimating,e.isEntrance;var t=e.visibleLength,n=e.strokeDasharray,r=e.connectNulls,i=xe(e,be),a=r??!1,o;if(t!=null){var s=i.pathRef;o=De(n,Ce(s?.current??null),t)}else n!=null&&(o=String(n));return V.createElement(_,H({},i,{connectNulls:a,strokeDasharray:o}))}function ke(e){var t=(0,V.useRef)(0),n=(0,V.useRef)(0),r=(0,V.useRef)(!1),i=(0,V.useRef)(e);return i.current!==e&&(t.current=n.current,i.current=e),(0,V.useCallback)((e,i)=>{if(r.current)return null;var a=Math.min(N(t.current+e*i),i);return e>0&&i>0&&(n.current=Math.max(n.current,a),a>=i)?(r.current=!0,null):a},[])}var Ae=[`children`];function je(e,t){if(e==null)return{};var n,r,i=Me(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r({x:0,y:0,value:0}),errorBarOffset:0});function Pe(e){var t=e.children,n=je(e,Ae);return V.createElement(Ne.Provider,{value:n},t)}var W=(e,t,n,r)=>i(e,`xAxis`,t,r),G=(e,t,n,r)=>h(e,`xAxis`,t,r),K=(e,t,n,r)=>i(e,`yAxis`,n,r),q=(e,t,n,r)=>h(e,`yAxis`,n,r),Fe=x([n,W,K,G,q],(e,t,n,r,i)=>L(e,`xAxis`)?D(t,r,!1):D(n,i,!1)),Ie=(e,t,n,r,i)=>i;function Le(e){return e.type===`line`}var Re=x([m,Ie],(e,t)=>e.filter(Le).find(e=>e.id===t)),ze=x([n,W,K,G,q,Re,Fe,s],(e,t,n,r,i,a,o,s)=>{var c=s.chartData,l=s.dataStartIndex,u=s.dataEndIndex;if(!(a==null||t==null||n==null||r==null||i==null||r.length===0||i.length===0||o==null||e!==`horizontal`&&e!==`vertical`)){var d=a.dataKey,f=a.data,p=f!=null&&f.length>0?f:c?.slice(l,u+1);if(p!=null)return at({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:d,bandSize:o,displayedData:p})}}),Be=[`id`],Ve=[`type`,`layout`,`connectNulls`,`needClip`,`shape`,`strokeDasharray`],He=[`activeDot`,`animateNewValues`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`hide`,`isAnimationActive`,`label`,`legendType`,`xAxisId`,`yAxisId`,`id`];function J(){return J=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?t/n:0}var Q={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,animationInterpolateFn:(e,t)=>{if(e==null)return[];if(t===1)return e.flatMap(e=>e.status===`removed`?[]:[e.next]);var n=Je(e),r=[];for(var i of e)if(i.status===`matched`)r.push(Z(Z({},i.next),{},{x:l(i.prev.x,i.next.x,t),y:l(i.prev.y,i.next.y,t)}));else if(i.status===`added`){if(i.next.x!=null){var a=i.next.x-n;r.push(Z(Z({},i.next),{},{x:l(a,i.next.x,t),y:i.next.y}))}else r.push(i.next)}else if(i.status===`removed`&&i.prev.x!=null){var o=i.prev.x+n;r.push(Z(Z({},i.prev),{},{x:l(i.prev.x,o,t),y:i.prev.y}))}return r},animationMatchBy:ve,connectNulls:!1,dot:!0,fill:`#fff`,hide:!1,isAnimationActive:`auto`,label:!1,legendType:`line`,shape:Oe,stroke:`#3182bd`,strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:g.line,type:`linear`},Ye=e=>{var t=e.dataKey,n=e.name,r=e.stroke,i=e.legendType;return[{inactive:e.hide,dataKey:t,type:i,color:r,value:j(n,t),payload:e}]},Xe=V.memo(e=>{var t=e.dataKey,n=e.data,r=e.stroke,i=e.strokeWidth,a=e.fill,o=e.name,s=e.hide,c=e.unit,l=e.formatter,u=e.tooltipType,d=e.id,f={dataDefinedOnItem:n,getPosition:le,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:j(o,t),hide:s,type:u,color:r,unit:c,formatter:l,graphicalItemId:d}};return V.createElement(ge,{tooltipEntrySettings:f})});function Ze(e){var t=e.clipPathId,n=e.points,r=e.props,i=r.dot,a=r.dataKey,o=r.needClip;r.id;var s=Y(r,Be),c=A(s);return V.createElement(I,{points:n,dot:i,className:`recharts-line-dots`,dotClassName:`recharts-line-dot`,dataKey:a,baseProps:c,needClip:o,clipPathId:t})}function Qe(e){var t=e.showLabels,n=e.children,r=e.points,i=(0,V.useMemo)(()=>r?.map(e=>{var t={x:e.x??0,y:e.y??0,width:0,lowerWidth:0,upperWidth:0,height:0};return Z(Z({},t),{},{value:e.value,payload:e.payload,viewBox:t,parentViewBox:void 0,fill:void 0})}),[r]);return V.createElement(me,{value:t?i:void 0},n)}function $e(e){var t=e.clipPathId,n=e.pathRef,r=e.points,i=e.props,a=e.animationElapsedTime,o=e.isAnimating,s=e.isEntrance,c=e.visibleLength,l=i.type,d=i.layout,f=i.connectNulls,p=i.needClip,m=i.shape,h=i.strokeDasharray,g=Y(i,Ve),_=Z(Z({},O(g)),{},{fill:`none`,className:`recharts-line-curve`,clipPath:p?`url(#clipPath-${t})`:void 0,points:r,type:l,layout:d,connectNulls:f,strokeDasharray:h??i.strokeDasharray,pathRef:n,animationElapsedTime:a,isAnimating:o,isEntrance:i.animateNewValues?s:!1,visibleLength:c});return V.createElement(V.Fragment,null,r?.length>1&&V.createElement(u,{option:m,DefaultShape:Q.shape,shapeProps:_}),V.createElement(Ze,{points:r,clipPathId:t,props:i}))}function et(e){var t=e.clipPathId,n=e.props,r=e.pathRef,i=e.previousPointsRef,a=n.points,o=n.isAnimationActive,s=n.animationBegin,c=n.animationDuration,l=n.animationEasing,u=n.animationMatchBy,d=n.animationInterpolateFn,p=n.layout,m=qe(r.current),h=pe(n.onAnimationStart,n.onAnimationEnd),g=h.isAnimating,_=h.handleAnimationStart,v=h.handleAnimationEnd,b=!g,x=ke(a),S=(0,V.useCallback)(e=>e>0&&m>0,[m]);return V.createElement(Qe,{points:a,showLabels:b},n.children,V.createElement(y,{animationInput:a,animationIdPrefix:`recharts-line-`,items:a,previousItemsRef:i,isAnimationActive:o,animationBegin:s,animationDuration:c,animationEasing:l,onAnimationStart:_,onAnimationEnd:v,animationInterpolateFn:d,animationMatchBy:u,shouldUpdatePreviousRef:S,layout:p},(e,i,a)=>{var o=g||i<1,s=o?x(i,m):null;return V.createElement($e,{props:n,points:e,clipPathId:t,pathRef:r,animationElapsedTime:i,isAnimating:o,isEntrance:a,visibleLength:s})}),V.createElement(f,{label:n.label}))}function tt(e){var t=e.clipPathId,n=e.props,r=(0,V.useRef)(null),i=(0,V.useRef)(null);return V.createElement(et,{props:n,clipPathId:t,previousPointsRef:r,pathRef:i})}var nt=(e,t)=>({x:e.x??void 0,y:e.y??void 0,value:e.value,errorVal:R(e.payload,t)}),rt=class extends V.Component{render(){var e=this.props,t=e.hide,n=e.dot,r=e.points,i=e.className,o=e.xAxisId,s=e.yAxisId,c=e.top,l=e.left,u=e.width,f=e.height,p=e.id,m=e.needClip,h=e.zIndex;if(t)return null;var g=d(`recharts-line`,i),_=p,v=oe(n),y=v.r,b=v.strokeWidth,x=a(n),S=y*2+b,C=m?`url(#clipPath-${x?``:`dots-`}${_})`:void 0;return V.createElement(P,{zIndex:h},V.createElement(fe,{className:g},m&&V.createElement(`defs`,null,V.createElement(ue,{clipPathId:_,xAxisId:o,yAxisId:s}),!x&&V.createElement(`clipPath`,{id:`clipPath-dots-${_}`},V.createElement(`rect`,{x:l-S/2,y:c-S/2,width:u+S,height:f+S}))),V.createElement(Pe,{xAxisId:o,yAxisId:s,data:r,dataPointFormatter:nt,errorBarOffset:0},V.createElement(tt,{props:this.props,clipPathId:_}))),V.createElement(k,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:C}))}};function it(e){var t=v(e,Q),n=t.activeDot,r=t.animateNewValues,i=t.animationBegin,a=t.animationDuration,o=t.animationEasing,s=t.connectNulls,c=t.dot,l=t.hide,u=t.isAnimationActive,d=t.label,f=t.legendType,p=t.xAxisId,m=t.yAxisId,h=t.id,g=Y(t,He),_=E(p,m).needClip,y=se(),b=de(),x=z(),S=ye(e=>ze(e,p,m,x,h));if(b!==`horizontal`&&b!==`vertical`||S==null||y==null)return null;var C=y.height,w=y.width,T=y.x,D=y.y;return V.createElement(rt,J({},g,{id:h,connectNulls:s,dot:c,activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:a,animationEasing:o,isAnimationActive:u,hide:l,label:d,legendType:f,xAxisId:p,yAxisId:m,points:S,layout:b,height:C,width:w,left:T,top:D,needClip:_}))}function at(e){var t=e.layout,n=e.xAxis,i=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,s=e.dataKey,c=e.bandSize;return e.displayedData.map((e,l)=>{var u=R(e,s);if(t===`horizontal`)return{x:F({axis:n,ticks:a,bandSize:c,entry:e,index:l}),y:(r(u)?null:i.scale.map(u))??null,value:u,payload:e};var d=r(u)?null:n.scale.map(u),f=F({axis:i,ticks:o,bandSize:c,entry:e,index:l});return d==null||f==null?null:{x:d,y:f,value:u,payload:e}}).filter(Boolean)}function ot(e){var t=v(e,Q),n=z();return V.createElement(M,{id:t.id,type:`line`},e=>V.createElement(V.Fragment,null,V.createElement(w,{legendPayload:Ye(t)}),V.createElement(Xe,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,formatter:t.formatter,tooltipType:t.tooltipType,id:e}),V.createElement(te,{type:`line`,id:e,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),V.createElement(it,J({},t,{id:e}))))}var st=V.memo(ot,c);st.displayName=`Line`;var ct=[`axis`],lt=(0,V.forwardRef)((e,t)=>V.createElement(ae,{chartName:`ComposedChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:ct,tooltipPayloadSearcher:o,categoricalChartProps:e,ref:t})),ut={metric:24,title:18,section:15,body:13,xs:12,caption:12},$=_e();function dt(e,t,n){let r=new Date(e);return Number.isFinite(r.getTime())?new Intl.DateTimeFormat(n===`zh`?`zh-CN`:`en-US`,t?{month:`short`,day:`numeric`}:{hour:`2-digit`,minute:`2-digit`,hour12:!1}).format(r):``}function ft(e){if(e<=1)return 1;let t=10**Math.floor(Math.log10(e)),n=e/t;return(n<=1?1:n<=2?2:n<=5?5:10)*t}function pt(e){let t=Math.max(0,e.ok??e.requests-e.error),n=Math.min(Math.max(0,e.requests-t),Math.max(0,e.requests));return{...e,okCount:t,errorCount:n,inputTokens:e.prompt_tokens??0,outputTokens:e.completion_tokens??0,cacheTokens:e.cache_read_tokens??0,p50:e.latency_p50_ms??null,p95:e.latency_p95_ms??null}}function mt({active:e,payload:t,daily:n,lang:r,specs:i,format:a,totalLabel:o,total:s}){if(!e||!t?.[0])return null;let c=t[0].payload;return(0,$.jsxs)(`div`,{className:`rounded-xl bg-overlay px-3 py-2 text-caption text-overlay-foreground shadow-overlay`,children:[(0,$.jsx)(`div`,{className:`mono text-muted`,children:dt(c.at,n,r)}),(0,$.jsxs)(`div`,{className:`mt-1.5 grid gap-1`,children:[i.map(e=>(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-6`,children:[(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,$.jsx)(`span`,{className:`size-1.5 rounded-full`,style:{background:e.color}}),e.label]}),(0,$.jsx)(`span`,{className:`mono font-medium`,children:a(c[e.key])})]},String(e.key))),s&&o?(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-6 pt-1`,children:[(0,$.jsx)(`span`,{className:`text-muted`,children:o}),(0,$.jsx)(`span`,{className:`mono font-medium`,children:a(s(c))})]}):null]})]})}function ht({series:n,lang:r,emptyLabel:i,okLabel:a,errorLabel:o,onSelectRange:s,selectHint:c,labels:l,initialMetric:u=`requests`}){let[d,f]=(0,V.useState)(u),[p,m]=(0,V.useState)(null),[h,g]=(0,V.useState)(null),_=(0,V.useRef)(!1),v=(0,V.useRef)(null),y=(0,V.useMemo)(()=>n.map(pt),[n]),x=y[0],w=y[y.length-1],E=(x&&w?Date.parse(w.at)-Date.parse(x.at):0)>1728e5,D=l??{requests:`Requests`,tokens:`Tokens`,latency:`p95 latency`,input:`input`,output:`output`,cacheRead:`cache read`,p50:`p50`,p95:`p95`,total:`total`},O=d===`tokens`?[{key:`inputTokens`,label:D.input,color:`var(--foreground)`,area:!0,width:1.5,opacity:.75},{key:`outputTokens`,label:D.output,color:`var(--success)`,area:!0,width:1.5},{key:`cacheTokens`,label:D.cacheRead,color:`var(--muted)`,width:1.25,opacity:.8}]:d===`latency`?[{key:`p95`,label:D.p95,color:`var(--warning)`,area:!0,width:1.75},{key:`p50`,label:D.p50,color:`var(--muted)`,width:1.25,opacity:.85}]:[{key:`okCount`,label:a,color:`var(--success)`,area:!0,width:1.75},{key:`errorCount`,label:o,color:`var(--danger)`,area:!0,width:1.25,opacity:.7}],k=e=>e==null?`—`:d===`latency`?B(e):b(e),A=d===`requests`?e=>e.requests:d===`tokens`?e=>e.inputTokens+e.outputTokens:void 0,j=y.flatMap(e=>O.map(t=>Number(e[t.key]??0))),M=d===`requests`?Math.max(0,...y.map(e=>e.requests)):Math.max(0,...j),te=ft(M),N=y.some(e=>e.requests>0),P=y.map(e=>`${e.at}:${e.requests}:${e.error}`).join(`|`);(0,V.useLayoutEffect)(()=>{let e=v.current;if(!e||!N||_.current)return;let t=!1,n=null,r=T.context(()=>{let r=T.matchMedia(),i=()=>{let t=T.utils.toArray(`.recharts-area-area`,e),n=T.utils.toArray(`.recharts-line-curve`,e);return!t.length&&!n.length?!1:(r.add(`(prefers-reduced-motion: reduce)`,()=>{T.set(n,{clearProps:`strokeDashoffset,strokeDasharray`}),T.set(t,{clearProps:`autoAlpha`})}),r.add(`(prefers-reduced-motion: no-preference)`,()=>{T.fromTo(t,{autoAlpha:0},{autoAlpha:1,duration:.45,ease:`power2.out`,stagger:.05}),n.forEach((e,t)=>{let n=e.getTotalLength();T.fromTo(e,{strokeDasharray:n,strokeDashoffset:n},{strokeDashoffset:0,duration:.7,delay:t*.05,ease:`power2.out`})})}),!0)};if(i()){t=!0,_.current=!0;return}n=new MutationObserver(()=>{t||i()&&(t=!0,_.current=!0,n?.disconnect())}),n.observe(e,{childList:!0,subtree:!0})},e);return()=>{n?.disconnect(),r.revert()}},[N,P]);let F=y.length>1?Date.parse(y[1].at)-Date.parse(y[0].at):36e5,I=()=>{if(p&&h&&s){let e=Date.parse(p),t=Date.parse(h);if(Number.isFinite(e)&&Number.isFinite(t)){let n=Math.min(e,t),r=Math.max(e,t)+F;s(new Date(n).toISOString(),new Date(r).toISOString())}}m(null),g(null)},L=e=>{let t=e?.activeLabel;return t==null?null:String(t)};return!n.length||!N?(0,$.jsx)(ne,{emptyLabel:i}):(0,$.jsxs)(`div`,{ref:v,className:`min-w-0`,children:[(0,$.jsx)(`div`,{className:`mb-3 flex justify-end`,children:(0,$.jsx)(ie,{value:d,onChange:e=>f(e),ariaLabel:D.requests,options:[{id:`requests`,label:D.requests},{id:`tokens`,label:D.tokens},{id:`latency`,label:D.latency}]})}),(0,$.jsx)(`div`,{className:`h-56 w-full`,children:(0,$.jsx)(C,{width:`100%`,height:`100%`,children:(0,$.jsxs)(lt,{data:y,margin:{top:8,right:8,bottom:0,left:0},style:s?{cursor:`crosshair`,userSelect:`none`}:void 0,onMouseDown:s?e=>{let t=L(e);t&&(m(t),g(t))}:void 0,onMouseMove:s?e=>{if(!p)return;let t=L(e);t&&g(t)}:void 0,onMouseUp:s?I:void 0,onMouseLeave:s?()=>{m(null),g(null)}:void 0,children:[(0,$.jsx)(`defs`,{children:O.filter(e=>e.area).map(e=>(0,$.jsxs)(`linearGradient`,{id:`traffic-fill-${String(e.key)}`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,$.jsx)(`stop`,{offset:`0%`,stopColor:e.color,stopOpacity:.22}),(0,$.jsx)(`stop`,{offset:`100%`,stopColor:e.color,stopOpacity:.02})]},String(e.key)))}),(0,$.jsx)(t,{vertical:!1,stroke:`var(--separator)`,strokeDasharray:`3 6`}),(0,$.jsx)(re,{dataKey:`at`,tickLine:!1,axisLine:!1,minTickGap:28,tick:{fill:`var(--muted)`,fontSize:ut.caption,fontFamily:`var(--font-mono)`},tickFormatter:e=>dt(e,E,r)}),(0,$.jsx)(ce,{width:d===`latency`?44:36,domain:[0,te],tickLine:!1,axisLine:!1,allowDecimals:!1,tick:{fill:`var(--muted)`,fontSize:ut.caption,fontFamily:`var(--font-mono)`},tickFormatter:e=>d===`latency`?B(e):b(e)}),(0,$.jsx)(e,{cursor:{stroke:`var(--border)`,strokeDasharray:`3 3`},content:(0,$.jsx)(mt,{daily:E,lang:r,specs:O,format:k,totalLabel:D.total,total:A})}),O.filter(e=>e.area).map(e=>(0,$.jsx)(S,{type:`monotone`,dataKey:e.key,stroke:`none`,fill:`url(#traffic-fill-${String(e.key)})`,isAnimationActive:!1,activeDot:!1,dot:!1,connectNulls:!0},`area-${String(e.key)}`)),O.map(e=>(0,$.jsx)(st,{type:`monotone`,dataKey:e.key,stroke:e.color,strokeWidth:e.width??1.5,strokeOpacity:e.opacity??1,dot:!1,isAnimationActive:!1,connectNulls:!0,activeDot:{r:4,fill:`var(--surface)`,stroke:e.color,strokeWidth:1.5}},`line-${String(e.key)}`)),p&&h?(0,$.jsx)(ee,{x1:p,x2:h,fill:`var(--foreground)`,fillOpacity:.06,stroke:`none`,ifOverflow:`visible`}):null]})})}),(0,$.jsxs)(`div`,{className:`mt-2 flex min-h-5 items-center justify-between gap-3 text-caption text-muted`,children:[(0,$.jsx)(`div`,{className:`flex items-center gap-3`,children:O.map(e=>(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,$.jsx)(`span`,{className:`size-1.5 rounded-full`,style:{background:e.color}}),e.label]},String(e.key)))}),(0,$.jsxs)(`span`,{className:`flex items-center gap-3`,children:[s&&c?(0,$.jsx)(`span`,{children:c}):null,(0,$.jsxs)(`span`,{className:`mono`,children:[k(M),` peak`]})]})]})]})}export{ht as TrafficChart}; \ No newline at end of file diff --git a/internal/webui/static/assets/index-Bm8WSfCK.js b/internal/webui/static/assets/index-BuN5UEBJ.js similarity index 88% rename from internal/webui/static/assets/index-Bm8WSfCK.js rename to internal/webui/static/assets/index-BuN5UEBJ.js index 885ce57a..74fce854 100644 --- a/internal/webui/static/assets/index-Bm8WSfCK.js +++ b/internal/webui/static/assets/index-BuN5UEBJ.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/TrafficChart-BhmoeXrG.js","assets/CartesianGrid-B7-zf0Hh.js","assets/CostChart-_UJ6Pb7Z.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/TrafficChart-Cbl19Xw8.js","assets/CartesianGrid-FBINGwGS.js","assets/CostChart-DD91nkKz.js"])))=>i.map(i=>d[i]); var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1B||(e.current=z[B],z[B]=null,B--)}function ee(e,t){B++,z[B]=e.current,e.current=t}var te=V(null),ne=V(null),re=V(null),ie=V(null);function ae(e,t){switch(ee(re,t),ee(ne,e),ee(te,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Yd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Yd(t),e=Xd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}H(te),ee(te,e)}function oe(){H(te),H(ne),H(re)}function se(e){e.memoizedState!==null&&ee(ie,e);var t=te.current,n=Xd(t,e.type);t!==n&&(ee(ne,e),ee(te,n))}function ce(e){ne.current===e&&(H(te),H(ne)),ie.current===e&&(H(ie),op._currentValue=R)}var le,ue;function de(e){if(le===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);le=t&&t[1]||``,ue=-1)`:-1 to e)),this.defaultLocale=t}getStringForLocale(e,t){let n=this.getStringsForLocale(t)[e];if(!n)throw Error(`Could not find intl message ${e} in ${t} locale`);return n}getStringsForLocale(e){let t=this.strings[e];return t||(t=lte(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(t){if(typeof window>`u`)return null;let n=window[ste];if(e_===void 0){let t=window[cte];if(!t)return null;e_={};for(let r in t)e_[r]=new e({[n]:t[r]},n)}let r=e_?.[t];if(!r)throw Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}};function lte(e,t,n=`en-US`){if(t[e])return t[e];let r=ute(e),i=dte(e);if(i&&t[`${r}-${i}`])return t[`${r}-${i}`];if(t[r])return t[r];for(let e in t)if(e.startsWith(r+`-`))return t[e];return t[n]}function ute(e){return Intl.Locale?new Intl.Locale(e).language:e.split(`-`)[0]}function dte(e){if(Intl.Locale)return new Intl.Locale(e).script}var n_=new Map,r_=new Map,i_=class{constructor(e,t){this.locale=e,this.strings=t}format(e,t){let n=this.strings.getStringForLocale(e,this.locale);return typeof n==`function`?n(t,this):n}plural(e,t,n=`cardinal`){let r=t[`=`+e];if(r)return typeof r==`function`?r():r;let i=this.locale+`:`+n,a=n_.get(i);return a||(a=new Intl.PluralRules(this.locale,{type:n}),n_.set(i,a)),r=t[a.select(e)]||t.other,typeof r==`function`?r():r}number(e){let t=r_.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),r_.set(this.locale,t)),t.format(e)}select(e,t){let n=e[t]||e.other;return typeof n==`function`?n():n}},a_=new WeakMap;function fte(e){let t=a_.get(e);return t||(t=new t_(e),a_.set(e,t)),t}function o_(e,t){return t&&t_.getGlobalDictionaryForPackage(t)||fte(e)}function s_(e,t){let{locale:n}=bp(),r=o_(e,t);return(0,v.useMemo)(()=>new i_(n,r),[n,r])}var c_={border:0,clip:`rect(0 0 0 0)`,clipPath:`inset(50%)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,width:`1px`,whiteSpace:`nowrap`};function l_(e={}){let{style:t,isFocusable:n}=e,[r,i]=(0,v.useState)(!1),{focusWithinProps:a}=Wm({isDisabled:!n,onFocusWithinChange:e=>i(e)}),o=(0,v.useMemo)(()=>r?t:t?{...c_,...t}:c_,[r]);return{visuallyHiddenProps:{...a,style:o}}}function u_(e){let{children:t,elementType:n=`div`,isFocusable:r,style:i,...a}=e,{visuallyHiddenProps:o}=l_(e);return v.createElement(n,W(a,o),t)}function pte(e){return e&&e.__esModule?e.default:e}function d_(e){let{onDismiss:t,...n}=e,r=Xs(n,s_(pte($g),`@react-aria/overlays`).format(`dismiss`)),i=()=>{t&&t()};return v.createElement(u_,null,v.createElement(`button`,{...r,tabIndex:-1,onClick:i,style:{width:1,height:1}}))}var f_=v.forwardRef(({children:e,...t},n)=>{let r=(0,v.useRef)(!1),i=(0,v.useContext)(Am),a=W(i||{},{...t,register(){r.current=!0,i&&i.register()}});return a.ref=Zs(n||i?.ref),ic(i,a.ref),(0,v.useEffect)(()=>{r.current||=!0},[]),v.createElement(Am.Provider,{value:a},e)});function mte({children:e}){let t=(0,v.useMemo)(()=>({register:()=>{}}),[]);return v.createElement(Am.Provider,{value:t},e)}var hte=(0,v.createContext)({});function p_(){return(0,v.useContext)(hte)??{}}var m_=v.createContext(null);function h_(e){let t=cs(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[i,a]=(0,v.useState)(!1),o=(0,v.useMemo)(()=>({contain:i,setContain:a}),[i,a]),{getContainer:s}=p_();if(!e.portalContainer&&s&&(n=s()),!n)return null;let c=e.children;return e.disableFocusManagement||(c=v.createElement(Gh,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!r},c)),c=v.createElement(m_.Provider,{value:o},v.createElement(mte,null,v.createElement(Cm.Provider,{value:null},c))),Ec.createPortal(c,n)}function g_(){let e=(0,v.useContext)(m_)?.setContain;Xo(()=>{e?.(!0)},[e])}function __(e){let[t,n]=eh(e.isOpen,e.defaultOpen||!1,e.onOpenChange),[r,i]=(0,v.useState)(null);return{isOpen:t,setOpen:n,open:(0,v.useCallback)(()=>{n(!0)},[n]),close:(0,v.useCallback)(()=>{n(!1)},[n]),toggle:(0,v.useCallback)(()=>{n(!t)},[n,t]),point:r,setPoint:i}}var v_=(0,v.createContext)(null),y_=(0,v.createContext)(null),b_=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,v_);let n=(0,v.useContext)(jb),r=__(e),i=e.isOpen!=null||e.defaultOpen!=null||!n?r:n,a=Oc(t,i.isOpen),o=e.isExiting||!e.shouldSkipAnimation&&a||!1,s=op(),{direction:c}=bp();if(s){let t=e.children;return typeof t==`function`&&(t=t({trigger:e.trigger||null,placement:`bottom`,isEntering:!1,isExiting:!1,defaultChildren:null})),v.createElement(v.Fragment,null,t)}return i&&!i.isOpen&&!o?null:v.createElement(gte,{...e,triggerRef:e.triggerRef,state:i,popoverRef:t,isExiting:o,dir:c})});function gte({state:e,isExiting:t,UNSTABLE_portalContainer:n,clearContexts:r,...i}){let a=(0,v.useRef)(null),o=(0,v.useRef)(null),s=(0,v.useContext)(y_),c=s&&i.trigger===`SubmenuTrigger`,{popoverProps:l,underlayProps:u,arrowProps:d,placement:f,triggerAnchorPoint:p}=ote({...i,offset:i.offset??8,arrowRef:a,groupRef:c?s:o},e),m=i.popoverRef,h=Dc(m,!!f),g=i.isEntering||!i.shouldSkipAnimation&&h||!1,_=Jf({...i,defaultClassName:`react-aria-Popover`,values:{trigger:i.trigger||null,placement:f,isEntering:g,isExiting:t}}),y=!i.isNonModal||i.trigger===`SubmenuTrigger`||i.trigger===`PreviewTrigger`,[b,x]=(0,v.useState)(i.trigger===`PreviewTrigger`);Xo(()=>{m.current&&x(y&&!m.current.querySelector(`[role=dialog]`))},[m,y]),(0,v.useEffect)(()=>{b&&i.trigger!==`PreviewTrigger`&&(i.trigger!==`SubmenuTrigger`||pm()!==`pointer`)&&m.current&&!As(m.current)&&_m(m.current)},[b,m,i.trigger]);let S=(0,v.useMemo)(()=>{let e=_.children;if(r)for(let t of r)e=v.createElement(t.Provider,{value:null},e);return e},[_.children,r]),[C,w]=(0,v.useState)(null),T=(0,v.useCallback)(()=>{i.triggerRef.current&&w(i.triggerRef.current.getBoundingClientRect().width+`px`)},[i.triggerRef]);Xo(T,[T]),rc({ref:_.style?.[`--trigger-width`]?void 0:i.triggerRef,onResize:T});let E={...l.style,"--trigger-anchor-point":p?`${p.x}px ${p.y}px`:void 0,..._.style,"--trigger-width":_.style?.[`--trigger-width`]||C},D=v.createElement(np.div,{...W(Us(i,{global:!0}),l),..._,id:b?i.id:void 0,role:b?`dialog`:void 0,tabIndex:b?-1:void 0,"aria-label":i[`aria-label`],"aria-labelledby":i[`aria-labelledby`],ref:m,slot:i.slot||void 0,style:E,dir:i.dir,"data-trigger":i.trigger,"data-placement":f,"data-entering":g||void 0,"data-exiting":t||void 0},!i.isNonModal&&v.createElement(d_,{onDismiss:e.close}),v.createElement(bh.Provider,{value:{...d,placement:f,ref:a}},S),v.createElement(d_,{onDismiss:e.close}));return c?v.createElement(h_,{...i,shouldContainFocus:b&&i.trigger!==`PreviewTrigger`,isExiting:t,portalContainer:n??s?.current??void 0},D):v.createElement(h_,{...i,shouldContainFocus:b&&i.trigger!==`PreviewTrigger`,isExiting:t,portalContainer:n},!i.isNonModal&&e.isOpen&&v.createElement(`div`,{"data-testid":`underlay`,...u,style:{position:`fixed`,inset:0}}),v.createElement(`div`,{ref:o,style:{display:`contents`}},v.createElement(y_.Provider,{value:o},D)))}var x_=class{constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}},S_=class extends x_{filter(e,t,n){let[r,i]=D_(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}};(class extends x_{static{this.type=`header`}});var C_=class extends x_{static{this.type=`loader`}},w_=class extends S_{static{this.type=`item`}filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}},T_=class extends S_{static{this.type=`section`}filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}},E_=class{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey==null?void 0:this.keyMap.get(this.firstKey);for(;e;)yield e,e=e.nextKey==null?void 0:this.keyMap.get(e.nextKey)}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),r=n?.firstChildKey==null?null:t.get(n.firstChildKey);for(;r;)yield r,r=r.nextKey==null?void 0:t.get(r.nextKey)}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!==`item`&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);return t?.key??null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!==`item`&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey==null?null:this.keyMap.get(this.lastKey);for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw Error(`Not implemented`)}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t.itemCount=this.itemCount,t}addNode(e){if(this.frozen)throw Error(`Cannot add a node to a frozen collection`);e.type===`item`&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,t){this.addNode(e);let n=t.getChildren(e.key);for(let e of n)this.addDescendants(e,t)}removeNode(e){if(this.frozen)throw Error(`Cannot remove a node to a frozen collection`);let t=this.keyMap.get(e);t!=null&&t.type===`item`&&this.itemCount--,this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw Error(`Cannot commit a frozen collection`);this.firstKey=e,this.lastKey=t,this.frozen=!n}filter(e){let t=new this.constructor,[n,r]=D_(this,t,this.firstKey,e);return t?.commit(n,r),t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}};function D_(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey==null?null:e.getItem(o.nextKey)}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e==null?a=null:(a=t.getItem(e),a.nextKey=null)}return[i?.key??null,a?.key??null]}var O_=class{constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){return this.parentNode?.isConnected||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.indexthis.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}};function j_(e){let{children:t,items:n,idScope:r,addIdAndValue:i,dependencies:a=[]}=e,o=(0,v.useMemo)(()=>void 0,[t]),s=(0,v.useMemo)(()=>new WeakMap,[...a,o]);return(0,v.useMemo)(()=>{if(n&&typeof t==`function`){let e=[];for(let a of n){let n=M_(a)?a:null,o=n?s.get(n):null;if(!o){o=t(a);let c=o.props.id??a?.key??a?.id;r!=null&&o.props.id==null&&c!=null&&(c=r+`:`+c);let l=c??e.length;o=(0,v.cloneElement)(o,i?{key:l,id:c,value:a}:{key:l}),n&&s.set(n,o)}e.push(o)}return e}if(typeof t!=`function`)return t},[t,n,s,r,i])}function M_(e){switch(typeof e){case`object`:return e!=null;case`function`:case`symbol`:return!0;default:return!1}}var N_=o((e=>{var t=d();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),P_=o(((e,t)=>{t.exports=N_()})),_te=P_(),F_=(0,v.createContext)(!1),I_=(0,v.createContext)(null);function L_(e){if((0,v.useContext)(I_))return e.content;let{collection:t,document:n}=xte(e.createCollection);return v.createElement(v.Fragment,null,v.createElement(ip,null,v.createElement(I_.Provider,{value:n},e.content)),v.createElement(vte,{render:e.children,collection:t}))}function vte({collection:e,render:t}){return t(e)}function yte(e,t,n){let r=cs(),i=(0,v.useRef)(r);i.current=r;let a=(0,v.useCallback)(()=>i.current?n():t(),[t,n]);return(0,_te.useSyncExternalStore)(e,a)}var bte=typeof v.useSyncExternalStore==`function`?v.useSyncExternalStore:yte;function xte(e){let[t]=(0,v.useState)(()=>new A_(e?.()||new E_));return{collection:bte((0,v.useCallback)(e=>t.subscribe(e),[t]),(0,v.useCallback)(()=>{let e=t.getCollection();return t.isSSR&&t.resetAfterSSR(),e},[t]),(0,v.useCallback)(()=>(t.isSSR=!0,t.getCollection()),[t])),document:t}}var R_=(0,v.createContext)(null);function Ste(e){return class extends x_{static{this.type=e}}}function z_(e,t,n,r,i,a){typeof e==`string`&&(e=Ste(e));let o=(0,v.useCallback)(i=>{i?.setProps(t,n,e,r,a)},[t,n,r,a,e]),s=(0,v.useContext)(R_);if(s){let o=s.ownerDocument.nodesByProps.get(t);return o||(o=s.ownerDocument.createElement(e.type),o.setProps(t,n,e,r,a),s.appendChild(o),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(t,o)),i?v.createElement(R_.Provider,{value:o},i):null}return v.createElement(e.type,{ref:o},i)}function B_(e,t){let n=({node:e})=>t(e.props,e.props.ref,e),r=(0,v.forwardRef)((r,i)=>{let a=(0,v.useContext)(Cm);if(!(0,v.useContext)(F_)){if(t.length>=3)throw Error(t.name+` cannot be rendered outside a collection.`);return t(r,i)}return z_(e,r,i,`children`in r?r.children:null,null,e=>v.createElement(Cm.Provider,{value:a},v.createElement(n,{node:e})))});return r.displayName=t.name,r}function V_(e,t,n=H_){let r=({node:e})=>t(e.props,e.props.ref,e),i=(0,v.forwardRef)((t,i)=>z_(e,t,i,null,n(t),e=>v.createElement(r,{node:e}))??v.createElement(v.Fragment,null));return i.displayName=t.name,i}function H_(e){return j_({...e,addIdAndValue:!0})}var U_=(0,v.createContext)(null);function W_(e){let t=(0,v.useContext)(U_),n=(t?.dependencies||[]).concat(e.dependencies),r=e.idScope??t?.idScope,i=H_({...e,idScope:r,dependencies:n});return(0,v.useContext)(I_)&&(i=v.createElement(Cte,null,i)),t=(0,v.useMemo)(()=>({dependencies:n,idScope:r}),[r,...n]),v.createElement(U_.Provider,{value:t},i)}function Cte({children:e}){let t=(0,v.useContext)(I_),n=(0,v.useMemo)(()=>v.createElement(I_.Provider,{value:null},v.createElement(F_.Provider,{value:!0},e)),[e]);return cs()?v.createElement(R_.Provider,{value:t},n):(0,Ec.createPortal)(n,t)}var G_=(0,v.createContext)(null),K_={CollectionRoot({collection:e,renderDropIndicator:t}){return q_(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return q_(e,t,n)}};function q_(e,t,n){return j_({items:t?e.getChildren(t.key):e,dependencies:[n],children(t){if(t.type===`content`)return v.createElement(v.Fragment,null);let r=t.render(t);return!n||t.type!==`item`?r:v.createElement(v.Fragment,null,n({type:`item`,key:t.key,dropPosition:`before`}),r,wte(e,t,n))}})}function wte(e,t,n){let r=t.key,i=e.getKeyAfter(r),a=i==null?null:e.getItem(i);for(;a!=null&&a.type!==`item`;)i=e.getKeyAfter(a.key),a=i==null?null:e.getItem(i);let o=t.nextKey==null?null:e.getItem(t.nextKey);for(;o!=null&&o.type!==`item`;)o=o.nextKey==null?null:e.getItem(o.nextKey);let s=[];if(o==null){let r=t;for(;r?.type===`item`&&(!a||r.parentKey!==a.parentKey&&a.levele==null?null:new Set([e]),[e])}function X_(e){let t=$_(vs(e));t!==e&&(t&&Z_(t,e),e&&Q_(e,t))}function Z_(e,t){e.dispatchEvent(new FocusEvent(`blur`,{relatedTarget:t})),e.dispatchEvent(new FocusEvent(`focusout`,{bubbles:!0,relatedTarget:t}))}function Q_(e,t){e.dispatchEvent(new FocusEvent(`focus`,{relatedTarget:t})),e.dispatchEvent(new FocusEvent(`focusin`,{bubbles:!0,relatedTarget:t}))}function $_(e){let t=Os(e),n=t?.getAttribute(`aria-activedescendant`);return n&&e.getElementById(n)||t}var ev={};ev={collectionLabel:`مقترحات`};var tv={};tv={collectionLabel:`Предложения`};var nv={};nv={collectionLabel:`Návrhy`};var rv={};rv={collectionLabel:`Forslag`};var iv={};iv={collectionLabel:`Empfehlungen`};var av={};av={collectionLabel:`Προτάσεις`};var ov={};ov={collectionLabel:`Suggestions`};var sv={};sv={collectionLabel:`Sugerencias`};var cv={};cv={collectionLabel:`Soovitused`};var lv={};lv={collectionLabel:`Ehdotukset`};var uv={};uv={collectionLabel:`Suggestions`};var dv={};dv={collectionLabel:`הצעות`};var fv={};fv={collectionLabel:`Prijedlozi`};var pv={};pv={collectionLabel:`Javaslatok`};var mv={};mv={collectionLabel:`Suggerimenti`};var hv={};hv={collectionLabel:`候補`};var gv={};gv={collectionLabel:`제안`};var _v={};_v={collectionLabel:`Pasiūlymai`};var vv={};vv={collectionLabel:`Ieteikumi`};var yv={};yv={collectionLabel:`Forslag`};var bv={};bv={collectionLabel:`Suggesties`};var xv={};xv={collectionLabel:`Sugestie`};var Sv={};Sv={collectionLabel:`Sugestões`};var Cv={};Cv={collectionLabel:`Sugestões`};var wv={};wv={collectionLabel:`Sugestii`};var Tv={};Tv={collectionLabel:`Предложения`};var Ev={};Ev={collectionLabel:`Návrhy`};var Dv={};Dv={collectionLabel:`Predlogi`};var Ov={};Ov={collectionLabel:`Predlozi`};var kv={};kv={collectionLabel:`Förslag`};var Av={};Av={collectionLabel:`Öneriler`};var jv={};jv={collectionLabel:`Пропозиції`};var Mv={};Mv={collectionLabel:`建议`};var Nv={};Nv={collectionLabel:`建議`};var Pv={};Pv={"ar-AE":ev,"bg-BG":tv,"cs-CZ":nv,"da-DK":rv,"de-DE":iv,"el-GR":av,"en-US":ov,"es-ES":sv,"et-EE":cv,"fi-FI":lv,"fr-FR":uv,"he-IL":dv,"hr-HR":fv,"hu-HU":pv,"it-IT":mv,"ja-JP":hv,"ko-KR":gv,"lt-LT":_v,"lv-LV":vv,"nb-NO":yv,"nl-NL":bv,"pl-PL":xv,"pt-BR":Sv,"pt-PT":Cv,"ro-RO":wv,"ru-RU":Tv,"sk-SK":Ev,"sl-SI":Dv,"sr-SP":Ov,"sv-SE":kv,"tr-TR":Av,"uk-UA":jv,"zh-CN":Mv,"zh-TW":Nv};function Tte(e){return e&&e.__esModule?e.default:e}function Ete(e,t){let{inputRef:n,collectionRef:r,filter:i,disableAutoFocusFirst:a=!1,disableVirtualFocus:o=!1}=e,s=ms(),c=(0,v.useRef)(void 0),l=(0,v.useRef)(!1),u=(0,v.useRef)(null),d=pm()===`virtual`&&(Ao()||Po()),[f,p]=(0,v.useState)(!d&&!o),[m,h]=(0,v.useState)(!1),[g,_]=(0,v.useState)(!1);(0,v.useEffect)(()=>()=>clearTimeout(c.current),[]);let y=$s(e=>{!e.isTrusted&&f&&n.current&&Os(vs(n.current))!==n.current&&iee()!==`touch`&&n.current.focus();let i=U(e);e.isTrusted||!i||u.current===i.id||(clearTimeout(c.current),i===r.current?u.current&&!document.getElementById(u.current)&&(u.current=null,t.setFocusedNodeId(null)):l.current?(u.current=i.id,c.current=setTimeout(()=>{t.setFocusedNodeId(i.id)},500)):(u.current=i.id,t.setFocusedNodeId(i.id)),l.current=!1)}),[b,x]=(0,v.useState)(null),S=(0,v.useCallback)(e=>{x(e),e==null?h(!1):(e.getAttribute(`tabindex`)!=null&&p(!1),h(!0))},[]);Xo(()=>(b?.addEventListener(`focusin`,y),()=>{b?.removeEventListener(`focusin`,y)}),[b]);let C=Zs((0,v.useMemo)(()=>Ns(r,S),[r,S])),w=(0,v.useCallback)(()=>{if(!r.current){_(!0);return}l.current=!0,r.current?.dispatchEvent(new CustomEvent(Co,{cancelable:!0,bubbles:!0,detail:{focusStrategy:`first`}}))},[r]),T=(0,v.useCallback)(e=>{_(!1),X_(Os()),u.current=null,t.setFocusedNodeId(null);let n=new CustomEvent(So,{cancelable:!0,bubbles:!0,detail:{clearFocusKey:e}});clearTimeout(c.current),l.current=!1,r.current?.dispatchEvent(n)},[r,t]),E=(0,v.useRef)(``);_c(n,`beforeinput`,e=>{let{inputType:t}=e;E.current=t});let D=e=>{(E.current===`insertText`||E.current===`insertCompositionText`||E.current===`insertFromComposition`)&&!a?w():E.current&&(E.current.includes(`insert`)||E.current.includes(`delete`)||E.current.includes(`history`))&&(T(!0),$_(document)===n.current&&Q_(n.current,null)),t.setInputValue(e)},O=(0,v.useRef)(null),k=e=>{if(O.current=U(e),e.nativeEvent.isComposing)return;let t=u.current;switch(t!==null&&vs(n.current).getElementById(t)==null&&(u.current=null,t=null),e.key){case`a`:if(cc(e))return;break;case`Escape`:if(e.isDefaultPrevented())return;break;case` `:return;case`Tab`:`continuePropagation`in e&&e.continuePropagation();return;case`Home`:case`End`:case`PageDown`:case`PageUp`:case`ArrowUp`:case`ArrowDown`:case`ArrowRight`:case`ArrowLeft`:{if((e.key===`Home`||e.key===`End`)&&t==null&&e.shiftKey)return;if(e.key===`ArrowRight`||e.key===`ArrowLeft`){if(t==null){e.isPropagationStopped()||e.stopPropagation();return}break}e.preventDefault();let n=new CustomEvent(Co,{cancelable:!0,bubbles:!0});r.current?.dispatchEvent(n);break}}e.isPropagationStopped()||e.stopPropagation();let i=!0;if(r.current!==null){if(t==null)i=r.current?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type,e.nativeEvent))||!1;else{let n=document.getElementById(t);n&&(i=n?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type,e.nativeEvent))||!1)}}if(i)switch(e.key){case`ArrowLeft`:case`ArrowRight`:T();break;case`Enter`:t!=null&&document.getElementById(t)?.dispatchEvent(new PointerEvent(`click`,e.nativeEvent));break}else e.preventDefault()},A=$s(e=>{if(U(e)===O.current){e.stopImmediatePropagation();let t=u.current;t==null?r.current?.dispatchEvent(new KeyboardEvent(e.type,e)):document.getElementById(t)?.dispatchEvent(new KeyboardEvent(e.type,e))}});(0,v.useEffect)(()=>(document.addEventListener(`keyup`,A,!0),()=>{document.removeEventListener(`keyup`,A,!0)}),[]);let j=Xs({id:s,"aria-label":s_(Tte(Pv),`@react-aria/autocomplete`).format(`collectionLabel`)}),M=(0,v.useCallback)((e,n)=>!i||i(e,t.inputValue,n),[t.inputValue,i]),N=e=>{if(!e.isTrusted)return;let t=u.current?document.getElementById(u.current):null;t&&Z_(t,e.relatedTarget)},P=e=>{if(e.isTrusted&&u.current&&document.getElementById(u.current)){let t=U(e);queueMicrotask(()=>{Z_(t,r.current),Q_(r.current,t)})}},F=e=>{e.button===0&&e.pointerType!==`touch`&&u.current!=null&&n.current!=null&&U(e)===n.current&&T()},I={value:t.inputValue,onChange:D},L={onKeyDown:k,"aria-activedescendant":t.focusedNodeId??void 0,onBlur:N,onFocus:P,onPointerDown:F};return I={...I,...f&&m&&L,enterKeyHint:`go`,"aria-controls":m?s:void 0,"aria-autocomplete":`list`,autoCorrect:`off`,spellCheck:`false`,autoComplete:`off`},{inputProps:I,collectionProps:W(j,{shouldUseVirtualFocus:f,disallowTypeAhead:f,autoFocus:g?`first`:!1}),collectionRef:C,filter:i==null?void 0:M}}function Dte(e){let{onInputChange:t,inputValue:n,defaultInputValue:r=``}=e,i=e=>{t&&t(e)},[a,o]=(0,v.useState)(null),[s,c]=eh(n,r,i);return{inputValue:s,setInputValue:c,focusedNodeId:a,setFocusedNodeId:o}}var Ote=(0,v.createContext)(null),kte=(0,v.createContext)(null),Fv=(0,v.createContext)(null),Iv=(0,v.createContext)(null);function Ate(e){e=W(Xf(Ote,e.slot),e);let{filter:t,disableAutoFocusFirst:n}=e,r=Dte(e),i=(0,v.useRef)(null),a=(0,v.useRef)(null),{inputProps:o,collectionProps:s,collectionRef:c,filter:l}=Ete({...$f(e),filter:t,disableAutoFocusFirst:n,inputRef:i,collectionRef:a},r);return v.createElement(qf,{values:[[kte,r],[Iv,{...o,ref:i}],[Fv,{...s,filter:l,ref:c}]]},e.children)}var Lv=(0,v.createContext)({}),jte=(0,v.createContext)({}),Rv=(0,v.createContext)(null);function zv(e){let t=(0,v.useRef)({});return v.createElement(Rv.Provider,{value:t},e.children)}var Mte=(0,v.forwardRef)(function(e,t){let{name:n,isVisible:r=!0,children:i,className:a,style:o,render:s,...c}=e,[l,u]=(0,v.useState)(r?`visible`:`hidden`),d=(0,v.useContext)(Rv);if(!d)throw Error(` must be rendered inside a `);r&&l===`hidden`&&u(`visible`),t=Zs(t),Xo(()=>{let e=t.current,i=d.current,a=i[n],o=null;if(e&&r&&a){u(`visible`);let t=e.getAnimations(),r=a.style.map(([t,n])=>{let r=e.style[t];if(t===`translate`){let t=a.rect,n=e.getBoundingClientRect(),r=t.left-n?.left,i=t.top-n?.top;e.style.translate=`${r}px ${i}px`}else e.style[t]=n;return[t,r]});for(let n of e.getAnimations())t.includes(n)||n.cancel();o=requestAnimationFrame(()=>{o=null;for(let[t,n]of r)e.style[t]=n}),delete i[n]}else e&&r&&!a?(queueMicrotask(()=>(0,Ec.flushSync)(()=>u(`entering`))),o=requestAnimationFrame(()=>{o=null,u(`visible`)})):e&&!r&&queueMicrotask(()=>{i[n]?(delete i[n],(0,Ec.flushSync)(()=>u(`exiting`)),Promise.all(e.getAnimations().map(e=>e.finished)).then(()=>u(`hidden`)).catch(()=>{})):u(`hidden`)});return()=>{if(o!=null&&cancelAnimationFrame(o),e&&e.isConnected&&!e.hasAttribute(`data-exiting`)){let t=window.getComputedStyle(e);if(t.transitionProperty!==`none`){let r=t.transitionProperty.split(/\s*,\s*/);i[n]={rect:e.getBoundingClientRect(),style:r.map(e=>[e,t[e]])}}}}},[t,d,n,r]);let f=Jf({children:i,className:a,style:o,render:s,values:{isEntering:l===`entering`,isExiting:l===`exiting`}});return l===`hidden`?null:v.createElement(np.div,{...c,...f,ref:t,"data-entering":l===`entering`||void 0,"data-exiting":l===`exiting`||void 0})}),Bv=(0,v.createContext)({isSelected:!1}),Nte=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,Bv);let{isSelected:n,...r}=e;return v.createElement(Mte,{...r,ref:t,className:e.className||`react-aria-SelectionIndicator`,name:`SelectionIndicator`,isVisible:n})});function Pte(e){let t=Us(e,{labelable:!0}),n;return e.orientation===`vertical`&&(n=`vertical`),e.elementType===`hr`?{separatorProps:t}:{separatorProps:{...t,role:`separator`,"aria-orientation":n}}}var Vv=(0,v.createContext)({}),Fte=B_(class extends x_{static{this.type=`separator`}filter(e,t){let n=t.getItem(this.prevKey);if(n&&n.type!==`separator`){let n=this.clone();return t.addDescendants(n,e),n}return null}},function(e,t){[e,t]=Zf(e,t,Vv);let{elementType:n,orientation:r,style:i,className:a,slot:o,...s}=e,c=n||`hr`;c===`hr`&&r===`vertical`&&(c=`div`);let l=np[c],{separatorProps:u}=Pte({...s,elementType:n,orientation:r}),d=Us(e,{global:!0});return v.createElement(l,{render:e.render,...W(d,u),style:i,className:a??`react-aria-Separator`,ref:t,slot:o||void 0})}),Hv=(0,v.createContext)({}),Ite=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,Hv);let{elementType:n=`span`,...r}=e,i=np[n];return v.createElement(i,{className:`react-aria-Text`,...r,ref:t})}),Uv={};Uv={longPressMessage:`اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة`};var Wv={};Wv={longPressMessage:`Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто`};var Gv={};Gv={longPressMessage:`Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku`};var Kv={};Kv={longPressMessage:`Langt tryk eller tryk på Alt + pil ned for at åbne menuen`};var qv={};qv={longPressMessage:`Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen`};var Jv={};Jv={longPressMessage:`Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού`};var Yv={};Yv={longPressMessage:`Long press or press Alt + ArrowDown to open menu`};var Xv={};Xv={longPressMessage:`Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú`};var Zv={};Zv={longPressMessage:`Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool`};var Qv={};Qv={longPressMessage:`Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli`};var $v={};$v={longPressMessage:`Appuyez de manière prolongée ou appuyez sur Alt\xA0+\xA0Flèche vers le bas pour ouvrir le menu.`};var ey={};ey={longPressMessage:`לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט`};var ty={};ty={longPressMessage:`Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika`};var ny={};ny={longPressMessage:`Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához`};var ry={};ry={longPressMessage:`Premi a lungo o premi Alt + Freccia giù per aprire il menu`};var iy={};iy={longPressMessage:`長押しまたは Alt+下矢印キーでメニューを開く`};var ay={};ay={longPressMessage:`길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기`};var oy={};oy={longPressMessage:`Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“.`};var sy={};sy={longPressMessage:`Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa`};var cy={};cy={longPressMessage:`Langt trykk eller trykk Alt + PilNed for å åpne menyen`};var ly={};ly={longPressMessage:`Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen`};var uy={};uy={longPressMessage:`Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu`};var dy={};dy={longPressMessage:`Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu`};var fy={};fy={longPressMessage:`Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu`};var py={};py={longPressMessage:`Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul`};var my={};my={longPressMessage:`Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню`};var hy={};hy={longPressMessage:`Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol`};var gy={};gy={longPressMessage:`Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol`};var _y={};_y={longPressMessage:`Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni`};var vy={};vy={longPressMessage:`Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn`};var yy={};yy={longPressMessage:`Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın`};var by={};by={longPressMessage:`Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню`};var xy={};xy={longPressMessage:`长按或按 Alt + 向下方向键以打开菜单`};var Sy={};Sy={longPressMessage:`長按或按 Alt+向下鍵以開啟功能表`};var Cy={};Cy={"ar-AE":Uv,"bg-BG":Wv,"cs-CZ":Gv,"da-DK":Kv,"de-DE":qv,"el-GR":Jv,"en-US":Yv,"es-ES":Xv,"et-EE":Zv,"fi-FI":Qv,"fr-FR":$v,"he-IL":ey,"hr-HR":ty,"hu-HU":ny,"it-IT":ry,"ja-JP":iy,"ko-KR":ay,"lt-LT":oy,"lv-LV":sy,"nb-NO":cy,"nl-NL":ly,"pl-PL":uy,"pt-BR":dy,"pt-PT":fy,"ro-RO":py,"ru-RU":my,"sk-SK":hy,"sl-SI":gy,"sr-SP":_y,"sv-SE":vy,"tr-TR":yy,"uk-UA":by,"zh-CN":xy,"zh-TW":Sy};var Lte=500;function wy(e){let{isDisabled:t,pointerType:n,onLongPressStart:r,onLongPressEnd:i,onLongPress:a,threshold:o=Lte,accessibilityDescription:s}=e,c=(0,v.useRef)(void 0),{addGlobalListener:l,removeAllGlobalListeners:u}=Ys(),d=e=>n?e.pointerType===n:e.pointerType===`mouse`||e.pointerType===`touch`,{pressProps:f}=Fm({isDisabled:t,onPressStart(e){if(e.continuePropagation(),d(e)){r&&r({...e,type:`longpressstart`}),c.current=setTimeout(()=>{e.target.dispatchEvent(new PointerEvent(`pointercancel`,{bubbles:!0})),l(e.target,`click`,e=>e.preventDefault(),{once:!0}),vs(e.target).activeElement!==e.target&&Io(e.target),a&&a({...e,type:`longpress`}),c.current=void 0},o),e.pointerType===`touch`&&l(e.target,`contextmenu`,e=>e.preventDefault(),{once:!0});let t=ys(e.target);l(t,`pointerup`,()=>{setTimeout(()=>{u()},100)},{once:!0})}},onPressEnd(e){c.current&&clearTimeout(c.current),i&&d(e)&&i({...e,type:`longpressend`})}});return{longPressProps:W(f,gc(a&&!t?s:void 0))}}function Rte(e){let{onContextMenu:t}=e,n=(0,v.useRef)(!1),{longPressProps:r}=wy({onLongPressStart(){n.current=!1},onLongPress(e){n.current?n.current=!1:t?.({target:e.target,x:e.x,y:e.y})}});return t?{contextMenuProps:W(Ao()?r:{},{onContextMenu(e){e.stopPropagation(),e.preventDefault(),n.current=!0;let r=e.currentTarget.getBoundingClientRect();t({target:e.currentTarget,x:e.clientX-r.x,y:e.clientY-r.y})},onKeyDown(e){if(Do()&&e.ctrlKey&&e.key===`Enter`){n.current=!1;let r=e.currentTarget;e.stopPropagation(),setTimeout(()=>{if(n.current)n.current=!1;else{let e=r.getBoundingClientRect();t({target:r,x:e.width/2,y:e.height/2})}},10)}}})}:{contextMenuProps:{}}}function Ty(e,t,n){let{type:r}=e,{isOpen:i}=t;(0,v.useEffect)(()=>{n&&n.current&&zh.set(n.current,t.close)});let a;r===`menu`?a=!0:r===`listbox`&&(a=`listbox`);let o=ms();return{triggerProps:{"aria-haspopup":a,"aria-expanded":i,"aria-controls":i?o:void 0,onPress:t.toggle},overlayProps:{id:o}}}function zte(e){return e&&e.__esModule?e.default:e}function Ey(e,t,n){let{type:r=`menu`,isDisabled:i,trigger:a=`press`}=e,o=ms(),{triggerProps:s,overlayProps:c}=Ty({type:r},t,n),l=(e,n,r=`first`)=>{if(!e||n.isDefaultPrevented())return!1;t.toggle(r)},{keyboardProps:u}=Sm({isDisabled:i,shortcuts:{Enter:e=>l(a!==`longPress`,e,`first`)," ":e=>l(a!==`longPress`,e,`first`),ArrowDown:e=>l(a!==`longPress`,e,`first`),ArrowUp:e=>l(a!==`longPress`,e,`last`),"Alt+Enter":e=>l(a===`longPress`,e,`first`),"Alt+ ":e=>l(a===`longPress`,e,`first`),"Alt+ArrowDown":e=>l(!0,e,`first`),"Alt+ArrowUp":e=>l(!0,e,`last`)}}),d=s_(zte(Cy),`@react-aria/menu`),{longPressProps:f}=wy({isDisabled:i||a!==`longPress`,accessibilityDescription:d.format(`longPressMessage`),onLongPressStart(){t.close()},onLongPress(){t.open(`first`)}}),p={preventFocusOnPress:!0,onPressStart(e){e.pointerType!==`touch`&&e.pointerType!==`keyboard`&&!i&&(Io(e.target),t.open(e.pointerType===`virtual`?`first`:null))},onPress(e){e.pointerType===`touch`&&!i&&(Io(e.target),t.toggle())}};delete s.onPress;let{contextMenuProps:m}=Rte({onContextMenu(e){let n=e.target.getBoundingClientRect();t.setPoint({x:n.x+e.x,y:n.y+e.y}),t.open()}});(0,v.useEffect)(()=>{if(t.isOpen&&a===`contextMenu`){let e=e=>{(e.button===2||e.button===0&&e.ctrlKey===!0)&&U(e)===document.body&&t.close()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)}},[t,a]);let h;if(a===`press`)h={...p,...u};else if(a===`longPress`)h={...f,...u};else if(a===`contextMenu`){h=m;let{"aria-haspopup":e,"aria-expanded":t,"aria-controls":n,...r}=s;s=r}return{menuTriggerProps:{...s,...h,id:o},menuProps:{...c,"aria-labelledby":o,autoFocus:t.focusStrategy||!0,onClose:t.close}}}var Dy=new WeakMap;function Oy(e){return jo()?e.altKey:e.ctrlKey}function ky(e,t){let n=`[data-key="${CSS.escape(String(t))}"]`,r=e.current?.dataset.collection;return r&&(n=`[data-collection="${CSS.escape(r)}"]${n}`),e.current?.querySelector(n)}var Ay=new WeakMap;function Bte(e){let t=ms();return Ay.set(e,t),t}function Vte(e){return Ay.get(e)}var jy=1e3;function My(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,i=(0,v.useRef)({search:``,timeout:void 0});return(0,v.useEffect)(()=>{let e=i.current.timeout;return()=>{clearTimeout(e)}},[i]),{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?e=>{if(i.current.search.length>0&&e.key===` `){if(e.preventDefault(),(!(`continuePropagation`in e)||`continuePropagation`in e&&!e.isPropagationStopped())&&e.stopPropagation(),i.current.search+=` `,t.getKeyForSearch!=null){let e=t.getKeyForSearch(i.current.search,n.focusedKey);e??=t.getKeyForSearch(i.current.search),e!=null&&(n.setFocusedKey(e),r&&r(e))}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search=``},jy)}}:void 0,onKeyDown:t.getKeyForSearch?e=>{let a=Hte(e.key);if(!(!a||e.ctrlKey||e.metaKey||e.altKey||!Ds(e.currentTarget,U(e))||i.current.search.length===0&&a===` `)){if(i.current.search+=a,t.getKeyForSearch!=null){let a=t.getKeyForSearch(i.current.search,n.focusedKey);if(a??=t.getKeyForSearch(i.current.search),a!=null)n.setFocusedKey(a),r&&r(a),e.preventDefault(),`continuePropagation`in e||e.stopPropagation();else{i.current.search=``,clearTimeout(i.current.timeout),i.current.timeout=void 0;return}}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search=``},jy)}}:void 0}}}function Hte(e){return e.length===1||!/^[A-Z]/i.test(e)?e:``}function Ny(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:a=!1,disallowEmptySelection:o=!1,disallowSelectAll:s=!1,escapeKeyBehavior:c=`clearSelection`,selectOnFocus:l=t.selectionBehavior===`replace`,disallowTypeAhead:u=!1,shouldUseVirtualFocus:d,allowsTabNavigation:f=!1,scrollRef:p=r,linkBehavior:m=`action`,UNSTABLE_focusOnEntry:h}=e,{direction:g}=bp(),_=Ho(),y=(e,n,i)=>{if(n!=null){if(t.isLink(n)&&m===`selection`&&l&&!Oy(e)){(0,Ec.flushSync)(()=>{t.setFocusedKey(n,i)});let a=ky(r,n),o=t.getItemProps(n);if(a){_.open(a,e,o.href,o.routerOptions);return}return!1}if(t.setFocusedKey(n,i),t.isLink(n)&&m===`override`)return!1;if(e.shiftKey&&t.selectionMode===`multiple`){t.extendSelection(n);return}if(l&&!Oy(e)){t.replaceSelection(n);return}}return!1},b=e=>{if(n.getKeyBelow){let r=t.focusedKey==null?n.getFirstKey?.():n.getKeyBelow?.(t.focusedKey);if(r==null&&a&&(r=n.getFirstKey?.(t.focusedKey)),r!=null){y(e,r);return}}return!1},x=e=>{if(n.getKeyAbove){let r=t.focusedKey==null?n.getLastKey?.():n.getKeyAbove?.(t.focusedKey);if(r==null&&a&&(r=n.getLastKey?.(t.focusedKey)),r!=null){y(e,r);return}}return!1},S=e=>{if(n.getFirstKey){if(t.focusedKey===null&&e.shiftKey)return!1;let r=n.getFirstKey(t.focusedKey,cc(e));if(t.setFocusedKey(r),r!=null){if(cc(e)&&e.shiftKey&&t.selectionMode===`multiple`){t.extendSelection(r);return}if(l){t.replaceSelection(r);return}}}return!1},C=e=>{if(n.getKeyLeftOf){let r=t.focusedKey==null?n.getFirstKey?.():n.getKeyLeftOf?.(t.focusedKey);if(r==null&&a&&(r=g===`rtl`?n.getFirstKey?.(t.focusedKey):n.getLastKey?.(t.focusedKey)),r!=null){y(e,r,g===`rtl`?`first`:`last`);return}}return!1},w=e=>{if(n.getKeyRightOf){let r=t.focusedKey==null?n.getFirstKey?.():n.getKeyRightOf?.(t.focusedKey);if(r==null&&a&&(r=g===`rtl`?n.getLastKey?.(t.focusedKey):n.getFirstKey?.(t.focusedKey)),r!=null){y(e,r,g===`rtl`?`last`:`first`);return}}return!1},T=e=>{if(n.getLastKey){if(t.focusedKey===null&&e.shiftKey)return!1;let r=n.getLastKey(t.focusedKey,cc(e));if(t.setFocusedKey(r),r!=null){if(cc(e)&&e.shiftKey&&t.selectionMode===`multiple`){t.extendSelection(r);return}if(l){t.replaceSelection(r);return}}}return!1},E=e=>{if(n.getKeyPageBelow&&t.focusedKey!=null){let r=n.getKeyPageBelow(t.focusedKey);if(r!=null)return y(e,r)}return!1},D=e=>{if(n.getKeyPageAbove&&t.focusedKey!=null){let r=n.getKeyPageAbove(t.focusedKey);if(r!=null)return y(e,r)}return!1},O=()=>{if(t.selectionMode===`multiple`&&s!==!0){t.selectAll();return}return!1},k=()=>{if(c===`clearSelection`&&!o&&t.selectedKeys.size!==0){t.clearSelection();return}return!1},A=()=>{if(!f&&r.current){let e=rg(r.current,{tabbable:!0}),t,n;do n=e.lastChild(),n&&(t=n);while(n);let i=Os();t&&(!As(t)||i&&!Rc(i))&&Io(t)}return{shouldContinuePropagation:!0,shouldPreventDefault:!1}},j=()=>(!f&&r.current&&r.current.focus(),{shouldContinuePropagation:!0,shouldPreventDefault:!1}),M=(e,t)=>({[Do()?e+`+Shift+Alt`:e+`+Shift+Control`]:t,[e+`+Shift`]:t,[Do()?e+`+Alt`:e+`+Control`]:t,[e]:t}),{keyboardProps:N}=Sm({shortcuts:{...M(`ArrowDown`,b),...M(`ArrowUp`,x),...M(`ArrowLeft`,C),...M(`ArrowRight`,w),...M(`PageDown`,E),...M(`PageUp`,D)},allowRepeats:!0}),{keyboardProps:P}=Sm({shortcuts:{...M(`Home`,S),...M(`End`,T),"Mod+A":O,Escape:k,Tab:A,"Tab+Shift":j}}),F=(0,v.useRef)({top:0,left:0});_c(p,`scroll`,()=>{F.current={top:p.current?.scrollTop??0,left:p.current?.scrollLeft??0}});let I=e=>{if(t.isFocused){Ds(e.currentTarget,U(e))||t.setFocused(!1);return}if(!Ds(e.currentTarget,U(e)))return;let i=pm();t.setFocused(!0);let a=e=>{e!=null&&(t.setFocusedKey(e),l&&!t.isSelected(e)&&t.replaceSelection(e))};if(h&&(i===`keyboard`||i===`virtual`))a(h===`first`?n.getFirstKey?.():n.getLastKey?.());else if(t.focusedKey==null){let r=e.relatedTarget;r&&e.currentTarget.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_FOLLOWING?a(t.lastSelectedKey??n.getLastKey?.()):a(t.firstSelectedKey??n.getFirstKey?.())}else p.current&&(p.current.scrollTop=F.current.top,p.current.scrollLeft=F.current.left);if(t.focusedKey!=null&&p.current){let e=ky(r,t.focusedKey);e instanceof HTMLElement&&(!As(e)&&!d&&Io(e),(i===`keyboard`||h&&i===`virtual`)&&yc(e,{containingElement:r.current}))}},L=e=>{Ds(e.currentTarget,e.relatedTarget)||t.setFocused(!1)},R=(0,v.useRef)(!1);_c(r,Co,d?e=>{let{detail:n}=e;e.stopPropagation(),t.setFocused(!0),n?.focusStrategy===`first`&&(R.current=!0)}:void 0);let z=n.getFirstKey?.()??null;tc(()=>{if(R.current){if(z==null){let e=Os();X_(r.current),Q_(e,null),t.collection.size>0&&(R.current=!1)}else t.setFocusedKey(z),R.current=!1}},[z,t.collection.size]),tc(()=>{t.collection.size>0&&(R.current=!1)},[t.focusedKey]),_c(r,So,d?e=>{e.stopPropagation(),t.setFocused(!1),e.detail?.clearFocusKey&&t.setFocusedKey(null)}:void 0);let B=(0,v.useRef)(i),V=(0,v.useRef)(!1);(0,v.useEffect)(()=>{if(B.current){let e=null;i===`first`&&(e=n.getFirstKey?.()??null),i===`last`&&(e=n.getLastKey?.()??null);let a=t.selectedKeys;if(a.size){for(let n of a)if(t.canSelectItem(n)){e=n;break}}t.setFocused(!0),t.setFocusedKey(e),e==null&&!d&&r.current&&_m(r.current),t.collection.size>0&&(B.current=!1,V.current=!0)}});let H=(0,v.useRef)(t.focusedKey),ee=(0,v.useRef)(null);(0,v.useEffect)(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==H.current||V.current)&&p.current&&r.current){let e=pm(),n=ky(r,t.focusedKey);if(!(n instanceof HTMLElement))return;(e===`keyboard`||V.current)&&(ee.current&&cancelAnimationFrame(ee.current),ee.current=requestAnimationFrame(()=>{p.current&&(vc(p.current,n),e!==`virtual`&&yc(n,{containingElement:r.current}))}))}!d&&t.isFocused&&t.focusedKey==null&&H.current!=null&&r.current&&_m(r.current),H.current=t.focusedKey,V.current=!1}),(0,v.useEffect)(()=>()=>{ee.current&&cancelAnimationFrame(ee.current)},[]),_c(r,`react-aria-focus-scope-restore`,e=>{e.preventDefault(),t.setFocused(!0)});let te={...W(P,N),onFocus:I,onBlur:L,onMouseDown(e){p.current===U(e)&&e.preventDefault()}},{typeSelectProps:ne}=My({keyboardDelegate:n,selectionManager:t});u||(te=W(ne,te));let re;d||(re=t.focusedKey==null?0:-1);let ie=Bte(t.collection);return{collectionProps:W(te,{tabIndex:re,"data-collection":ie})}}var Py=class{constructor(e){this.ref=e}getItemRect(e){let t=this.ref.current;if(!t)return null;let n=e==null?null:ky(this.ref,e);if(!n)return null;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();return{x:i.left-r.left-t.clientLeft+t.scrollLeft,y:i.top-r.top-t.clientTop+t.scrollTop,width:i.width,height:i.height}}getContentSize(){let e=this.ref.current;return{width:e?.scrollWidth??0,height:e?.scrollHeight??0}}getVisibleRect(){let e=this.ref.current;return{x:e?.scrollLeft??0,y:e?.scrollTop??0,width:e?.clientWidth??0,height:e?.clientHeight??0}}},Fy=class{constructor(...e){if(e.length===1){let t=e[0];this.collection=t.collection,this.ref=t.ref,this.collator=t.collator,this.disabledKeys=t.disabledKeys||new Set,this.disabledBehavior=t.disabledBehavior||`all`,this.orientation=t.orientation||`vertical`,this.direction=t.direction,this.layout=t.layout||`stack`,this.layoutDelegate=t.layoutDelegate||new Py(t.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout=`stack`,this.orientation=`vertical`,this.disabledBehavior=`all`,this.layoutDelegate=new Py(this.ref);this.layout===`stack`&&this.orientation===`vertical`&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}isDisabled(e){return this.disabledBehavior===`all`&&(e.props?.isDisabled||this.disabledKeys.has(e.key))&&e.props?.disabledBehavior!==`selection`}findNextNonDisabled(e,t,n=!1){let r=e;for(;r!=null;){let e=this.collection.getItem(r);if(e?.type===`item`&&(n||!this.isDisabled(e)))return r;r=t(r)}return null}getNextKey(e,t){let n=e;return n=this.collection.getKeyAfter(n),this.findNextNonDisabled(n,e=>this.collection.getKeyAfter(e),t?.includeDisabled)}getPreviousKey(e,t){let n=e;return n=this.collection.getKeyBefore(n),this.findNextNonDisabled(n,e=>this.collection.getKeyBefore(e),t?.includeDisabled)}findKey(e,t,n){let r=e,i=this.layoutDelegate.getItemRect(r);if(!i||r==null)return null;let a=i;do{if(r=t(r),r==null)break;i=this.layoutDelegate.getItemRect(r)}while(i&&n(a,i)&&r!=null);return r}isSameRow(e,t){return e.y===t.y||e.x!==t.x}isSameColumn(e,t){return e.x===t.x||e.y!==t.y}isReversed(e){let t=this.getNextKey(e),n=ky(this.ref,e);if(t!=null){let e=ky(this.ref,t);return!n||!e?!1:n.getBoundingClientRect().top>e.getBoundingClientRect().top}let r=this.getPreviousKey(e);if(r!=null){let e=ky(this.ref,r);return!n||!e?!1:e.getBoundingClientRect().top>n.getBoundingClientRect().top}return!1}getKeyBelow(e,t){return this.layout===`grid`&&this.orientation===`vertical`?this.findKey(e,e=>this.getNextKey(e,t),this.isSameRow):this.orientation===`vertical`&&this.isReversed(e)?this.getPreviousKey(e,t):this.getNextKey(e,t)}getKeyAbove(e,t){return this.layout===`grid`&&this.orientation===`vertical`?this.findKey(e,e=>this.getPreviousKey(e,t),this.isSameRow):this.orientation===`vertical`&&this.isReversed(e)?this.getNextKey(e,t):this.getPreviousKey(e,t)}getNextColumn(e,t,n){return t?this.getPreviousKey(e,n):this.getNextKey(e,n)}getKeyRightOf(e,t){let n=this.direction===`ltr`?`getKeyRightOf`:`getKeyLeftOf`;return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,e=>this.layoutDelegate[n](e),t?.includeDisabled)):this.layout===`grid`?this.orientation===`vertical`?this.getNextColumn(e,this.direction===`rtl`,t):this.findKey(e,e=>this.getNextColumn(e,this.direction===`rtl`,t),this.isSameColumn):this.orientation===`horizontal`?this.getNextColumn(e,this.direction===`rtl`,t):null}getKeyLeftOf(e,t){let n=this.direction===`ltr`?`getKeyLeftOf`:`getKeyRightOf`;return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,e=>this.layoutDelegate[n](e),t?.includeDisabled)):this.layout===`grid`?this.orientation===`vertical`?this.getNextColumn(e,this.direction===`ltr`,t):this.findKey(e,e=>this.getNextColumn(e,this.direction===`ltr`,t),this.isSameColumn):this.orientation===`horizontal`?this.getNextColumn(e,this.direction===`ltr`,t):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,e=>this.collection.getKeyAfter(e))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,e=>this.collection.getKeyBefore(e))}getKeyPageAbove(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;let r=this.isReversed(e);if(t&&!ac(t))return this.getFirstKey();let i=e;if(this.orientation===`horizontal`){let e=Math.max(0,n.x+n.width-this.layoutDelegate.getVisibleRect().width);for(;n&&n.x>e&&i!=null;)i=this.getKeyAbove(i),n=i==null?null:this.layoutDelegate.getItemRect(i)}else{let e=this.layoutDelegate.getVisibleRect(),t=r?n.y-e.height:Math.max(0,n.y+n.height-e.height);for(;n&&n.y>t&&i!=null;)i=this.getKeyAbove(i),n=i==null?null:this.layoutDelegate.getItemRect(i)}return i??(r?this.getLastKey():this.getFirstKey())}getKeyPageBelow(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;let r=this.isReversed(e);if(t&&!ac(t))return this.getLastKey();let i=e;if(this.orientation===`horizontal`){let e=Math.min(this.layoutDelegate.getContentSize().width,n.x-n.width+this.layoutDelegate.getVisibleRect().width);for(;n&&n.xe[0]a||new Fy({collection:n,disabledKeys:r,disabledBehavior:l,ref:i,collator:c,layoutDelegate:o,orientation:s}),[a,o,n,r,i,c,l,s]),{collectionProps:d}=Ny({...e,ref:i,selectionManager:t,keyboardDelegate:u});return{listProps:d}}function Ute(e,t,n){let{shouldFocusWrap:r=!0,onKeyDown:i,onKeyUp:a,...o}=e;!e[`aria-label`]&&e[`aria-labelledby`];let s=Us(e,{labelable:!0}),{listProps:c}=Ry({...o,ref:n,selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,shouldFocusWrap:r,linkBehavior:`override`});return Dy.set(t,{onClose:e.onClose,onAction:e.onAction,shouldUseVirtualFocus:e.shouldUseVirtualFocus}),{menuProps:W(s,{onKeyDown:i,onKeyUp:a},{role:`menu`,...c,onKeyDown:t=>{(t.key!==`Escape`||e.shouldUseVirtualFocus)&&c.onKeyDown?.(t)}})}}function zy(e){let{id:t,selectionManager:n,key:r,ref:i,shouldSelectOnPressUp:a,shouldUseVirtualFocus:o,focus:s,isDisabled:c,onAction:l,allowsDifferentPressOrigin:u,linkBehavior:d=`action`}=e,f=Ho();t=ms(t);let p=e=>{if(e.pointerType===`keyboard`&&Oy(e))n.toggleSelection(r);else{if(n.selectionMode===`none`)return;if(n.isLink(r)){if(d===`selection`&&i.current){let t=n.getItemProps(r);f.open(i.current,e,t.href,t.routerOptions),n.setSelectedKeys(n.selectedKeys);return}if(d===`override`||d===`none`)return}n.selectionMode===`single`?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):e&&e.shiftKey?n.extendSelection(r):n.selectionBehavior===`toggle`||e&&(cc(e)||e.pointerType===`touch`||e.pointerType===`virtual`)?n.toggleSelection(r):n.replaceSelection(r)}};(0,v.useEffect)(()=>{r===n.focusedKey&&n.isFocused&&(o?X_(i.current):s?s():Os()!==i.current&&i.current&&_m(i.current))},[i,r,n.focusedKey,n.childFocusStrategy,n.isFocused,o]),c||=n.isDisabled(r);let m={};!o&&!c?m={tabIndex:r===n.focusedKey?0:-1,onFocus(e){U(e)===i.current&&n.setFocusedKey(r)}}:c&&(m.onMouseDown=e=>{e.preventDefault()}),(0,v.useEffect)(()=>{c&&n.focusedKey===r&&n.setFocusedKey(null)},[n,c,r]);let h=n.isLink(r)&&d===`override`,g=l&&e.UNSTABLE_itemBehavior===`action`,_=n.isLink(r)&&d!==`selection`&&d!==`none`,y=!c&&n.canSelectItem(r)&&!h&&!g,b=(l||_)&&!c,x=b&&(n.selectionBehavior===`replace`?!y:!y||n.isEmpty),S=b&&y&&n.selectionBehavior===`replace`,C=x||S,w=(0,v.useRef)(null),T=C&&y,E=(0,v.useRef)(!1),D=(0,v.useRef)(!1),O=n.getItemProps(r),k=e=>{l&&(l(),i.current?.dispatchEvent(new CustomEvent(`react-aria-item-action`,{bubbles:!0}))),_&&i.current&&f.open(i.current,e,O.href,O.routerOptions)},A={ref:i};a?(A.onPressStart=e=>{w.current=e.pointerType,E.current=T,e.pointerType===`keyboard`&&(!C||Vy(e.key))&&p(e)},u?(A.onPressUp=x?void 0:e=>{e.pointerType===`mouse`&&y&&p(e)},A.onPress=x?k:e=>{e.pointerType!==`keyboard`&&e.pointerType!==`mouse`&&y&&p(e)}):A.onPress=e=>{if(x||S&&e.pointerType!==`mouse`){if(e.pointerType===`keyboard`&&!By(e.key))return;k(e)}else e.pointerType!==`keyboard`&&y&&p(e)}):(A.onPressStart=e=>{w.current=e.pointerType,E.current=T,D.current=x,y&&(e.pointerType===`mouse`&&!x||e.pointerType===`keyboard`&&(!b||Vy(e.key)))&&p(e)},A.onPress=e=>{(e.pointerType===`touch`||e.pointerType===`pen`||e.pointerType===`virtual`||e.pointerType===`keyboard`&&C&&By(e.key)||e.pointerType===`mouse`&&D.current)&&(C?k(e):y&&p(e))});let j=Vte(n.collection);if(m[`data-collection`]=j,m[`data-key`]=r,A.preventFocusOnPress=o,o&&(A=W(A,{onPressStart(e){e.pointerType!==`touch`&&(n.setFocused(!0),n.setFocusedKey(r))},onPress(e){e.pointerType===`touch`&&(n.setFocused(!0),n.setFocusedKey(r))}})),O)for(let e of[`onPressStart`,`onPressEnd`,`onPressChange`,`onPress`,`onPressUp`,`onClick`])O[e]&&(A[e]=_s(A[e],O[e]));let{pressProps:M,isPressed:N}=Fm(A),P=S?e=>{w.current===`mouse`&&(e.stopPropagation(),e.preventDefault(),k(e))}:void 0,{longPressProps:F}=wy({isDisabled:!T,onLongPress(e){e.pointerType===`touch`&&(p(e),n.setSelectionBehavior(`toggle`))}}),I=e=>{w.current===`touch`&&E.current&&e.preventDefault()},L=d!==`none`&&n.isLink(r)?e=>{Wo.isOpening||e.preventDefault()}:void 0,R=W(m,y||x||o&&!c?M:{},T?F:{},{onDoubleClick:P,onDragStartCapture:I,onClick:L,id:t},o?{onMouseDown:e=>e.preventDefault()}:void 0),z=e=>{let t=e;for(;t&&t!==i.current;){let e=t.getAttribute(`data-collection`);if(e!=null)return e!==j;t=t.parentElement}return Rc(e)},B=R.onPointerDown;R.onPointerDown=e=>{let t=U(e);if(t&&t!==i.current&&z(t)){e.stopPropagation();return}B?.(e)};let V=R.onMouseDown;return R.onMouseDown=e=>{let t=U(e);if(t&&t!==i.current&&z(t)){e.stopPropagation();return}V?.(e)},{itemProps:R,isPressed:N,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:c,allowsSelection:y,hasAction:C}}function By(e){return e===`Enter`}function Vy(e){return e===` `}function Hy(e,t){return typeof t.getChildren==`function`?t.getChildren(e.key):e.childNodes}function Uy(e){return Wy(e,0)}function Wy(e,t){if(t<0)return;let n=0;for(let r of e){if(n===t)return r;n++}}function Gy(e){let t;for(let n of e)t=n;return t}function Ky(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...qy(e,t),t],i=[...qy(e,n),n],a=r.slice(0,i.length).findIndex((e,t)=>e!==i[t]);return a===-1?r.findIndex(e=>e===n)>=0?1:(i.findIndex(e=>e===t),-1):(t=r[a],n=i[a],t.index-n.index)}function qy(e,t){let n=[],r=t;for(;r?.parentKey!=null;)r=e.getItem(r.parentKey),r&&n.unshift(r);return n}var Jy=new WeakMap;function Yy(e){let t=Jy.get(e);if(t!=null)return t;let n=0,r=t=>{for(let i of t)i.type===`section`?r(Hy(i,e)):i.type===`item`&&n++};return r(e),Jy.set(e,n),n}function Wte(e,t,n){let{id:r,key:i,closeOnSelect:a,shouldCloseOnSelect:o,isVirtualized:s,"aria-haspopup":c,onPressStart:l,onPressUp:u,onPress:d,onPressChange:f,onPressEnd:p,onClick:m,onHoverStart:h,onHoverChange:g,onHoverEnd:_,onKeyDown:y,onKeyUp:b,onFocus:x,onFocusChange:S,onBlur:C,selectionManager:w=t.selectionManager}=e,T=!!c,E=T&&e[`aria-expanded`]===`true`,D=e.isDisabled??w.isDisabled(i),O=e.isSelected??w.isSelected(i),k=Dy.get(t),A=t.collection.getItem(i),j=e.onClose||k.onClose,M=Ho(),N=()=>{if(!T&&(A?.props?.onAction?A.props.onAction():e.onAction&&e.onAction(i),k.onAction)){let e=k.onAction;e(i,A?.value)}},P=`menuitem`;T||(w.selectionMode===`single`?P=`menuitemradio`:w.selectionMode===`multiple`&&(P=`menuitemcheckbox`));let F=gs(),I=gs(),L=gs(),R={id:r,"aria-disabled":D||void 0,role:P,"aria-label":e[`aria-label`],"aria-labelledby":F,"aria-describedby":[e[`aria-describedby`],I,L].filter(Boolean).join(` `)||void 0,"aria-controls":e[`aria-controls`],"aria-haspopup":c,"aria-expanded":e[`aria-expanded`]};if(w.selectionMode!==`none`&&!T&&(R[`aria-checked`]=O),s){let e=Number(A?.index);R[`aria-posinset`]=Number.isNaN(e)?void 0:e+1,R[`aria-setsize`]=Yy(t.collection)}let z=(0,v.useRef)(!1),B=e=>{f?.(e),z.current=e},V=(0,v.useRef)(null),H=e=>{e.pointerType!==`keyboard`&&(V.current={pointerType:e.pointerType}),e.pointerType===`mouse`&&(z.current||e.target.click()),u?.(e)},ee=e=>{m?.(e),N(),Yo(e,M,A.props.href,A?.props.routerOptions);let t=V.current?.pointerType===`keyboard`?V.current?.key===`Enter`||w.selectionMode===`none`||w.isLink(i):w.selectionMode!==`multiple`||w.isLink(i);t=o??a??t,j&&!T&&t&&j(),V.current=null},{itemProps:te,isFocused:ne}=zy({id:r,selectionManager:w,key:i,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:`none`,shouldUseVirtualFocus:k.shouldUseVirtualFocus}),{pressProps:re,isPressed:ie}=Fm({onPressStart:l,onPress:d,onPressUp:H,onPressChange:B,onPressEnd:p,isDisabled:D}),{hoverProps:ae}=Zm({isDisabled:D,onHoverStart(e){!fm()&&!(E&&c)&&(w.setFocused(!0),w.setFocusedKey(i)),h?.(e)},onHoverChange:g,onHoverEnd:_}),{keyboardProps:oe}=Sm({shortcuts:{" ":e=>{V.current={pointerType:`keyboard`,key:` `},U(e).click(),mm(`keyboard`)},Enter:e=>{V.current={pointerType:`keyboard`,key:`Enter`};let t=U(e);if(t.tagName!==`A`){t.click(),mm(`keyboard`);return}return mm(`keyboard`),{shouldPreventDefault:!1,shouldContinuePropagation:!1}}},onKeyDown:y,onKeyUp:b}),{focusableProps:se}=wm({onBlur:C,onFocus:x,onFocusChange:S},n),ce=Us(A?.props);delete ce.id;let le=Jo(A?.props);return{menuItemProps:{...R,...W(ce,le,T?{onFocus:te.onFocus,"data-collection":te[`data-collection`],"data-key":te[`data-key`]}:te,re,ae,oe,se,k.shouldUseVirtualFocus||T?{onMouseDown:e=>e.preventDefault()}:void 0,D?void 0:{onClick:ee}),tabIndex:te.tabIndex!=null&&E&&!k.shouldUseVirtualFocus?-1:te.tabIndex},labelProps:{id:F},descriptionProps:{id:I},keyboardShortcutProps:{id:L},isFocused:ne,isFocusVisible:ne&&w.isFocused&&fm()&&!E,isSelected:O,isPressed:ie,isDisabled:D}}function Gte(e){let{heading:t,"aria-label":n}=e,r=ms();return{itemProps:{role:`presentation`},headingProps:t?{id:r,role:`presentation`}:{},groupProps:{role:`group`,"aria-label":n,"aria-labelledby":t?r:void 0}}}var Xy=2,Kte=50,qte=1e3,Zy=Math.PI/12;function Qy(e){let{menuRef:t,submenuRef:n,isOpen:r,isDisabled:i}=e,a=(0,v.useRef)(void 0),o=(0,v.useRef)(void 0),s=(0,v.useRef)(0),c=(0,v.useRef)(void 0),l=(0,v.useRef)(void 0),u=(0,v.useRef)(void 0),d=(0,v.useRef)(2),[f,p]=(0,v.useState)(!1);rc({ref:r?n:void 0,onResize:()=>{n.current&&(o.current=n.current.getBoundingClientRect(),u.current=void 0)}});let m=()=>{p(!1),d.current=Xy,a.current=void 0},h=hm(),g=$s(e=>{f&&e.preventDefault()});(0,v.useEffect)(()=>{f&&t.current?t.current.style.pointerEvents=`none`:t.current.style.pointerEvents=``},[t,f]),Xo(()=>{let e=n.current,f=t.current;if(i||!e||!r||h!==`pointer`||!f){m();return}o.current=e.getBoundingClientRect();let _=e=>{if(e.pointerType===`touch`||e.pointerType===`pen`)return;let t=Date.now();if(t-s.currento.current.right?`left`:`right`,nf.getBoundingClientRect().right||rf.getBoundingClientRect().bottom){m();return}let i=a.current.x,h=a.current.y,g=u.current===`right`?o.current.left-i:i-o.current.right,_=Math.atan2(h-o.current.top,g)+Zy,v=Math.atan2(h-o.current.bottom,g)-Zy,y=Math.atan2(h-r,u.current===`left`?-(n-i):n-i),b=y<_&&y>v;d.current=b?Math.min(d.current+1,Xy):Math.max(d.current-1,0),d.current>=Xy?p(!0):p(!1),s.current=t,a.current={x:n,y:r},b&&(c.current=setTimeout(()=>{m(),l.current=setTimeout(()=>{let e=document.elementFromPoint(n,r);e&&Ds(f,e)&&e.dispatchEvent(new PointerEvent(`pointerover`,{bubbles:!0,cancelable:!0}))},100)},qte))};return window.addEventListener(`pointermove`,_),window.addEventListener(`pointerdown`,g,!0),()=>{window.removeEventListener(`pointermove`,_),window.removeEventListener(`pointerdown`,g,!0),clearTimeout(c.current),clearTimeout(l.current),d.current=Xy}},[i,r,t,h,p,n])}function $y(e,t,n){let{parentMenuRef:r,submenuRef:i,type:a=`menu`,isDisabled:o,delay:s=200,shouldUseVirtualFocus:c}=e,l=ms(),u=ms(),{direction:d}=bp(),f=(0,v.useRef)(void 0),p=(0,v.useCallback)(()=>{f.current&&=(clearTimeout(f.current),void 0)},[f]),m=(0,v.useCallback)(e=>{p(),t.open(e)},[t,p]),h=(0,v.useCallback)(()=>{p(),t.close()},[t,p]);Xo(()=>()=>{p()},[p]);let{keyboardProps:g}=Sm({shortcuts:{ArrowLeft:e=>{if(!As(e.currentTarget))return!1;if(d===`ltr`&&Ds(e.currentTarget,U(e))){h(),!c&&n.current&&Io(n.current);return}return!1},ArrowRight:e=>{if(!As(e.currentTarget))return!1;if(d===`rtl`&&Ds(e.currentTarget,U(e))){h(),!c&&n.current&&Io(n.current);return}return!1},Escape:e=>{if(!As(e.currentTarget))return!1;if(Ds(i.current,U(e))){h(),!c&&n.current&&Io(n.current);return}return!1}}}),_={id:u,"aria-labelledby":l,submenuLevel:t.submenuLevel,...a===`menu`&&{onClose:t.closeAll,autoFocus:t.focusStrategy??void 0,...g}},{keyboardProps:y}=Sm({shortcuts:{ArrowRight:()=>{if(!o){if(d===`ltr`){t.isOpen||m(`first`),a===`menu`&&i?.current&&Os()===n?.current&&Io(i.current);return}if(t.isOpen){h();return}return!1}return!1},ArrowLeft:()=>{if(!o){if(d===`rtl`){t.isOpen||m(`first`),a===`menu`&&i?.current&&Os()===n?.current&&Io(i.current);return}if(t.isOpen){h();return}return!1}return!1}}});return _c(r,`focusin`,e=>{t.isOpen&&Ds(r.current,U(e))&&U(e)!==n.current&&h()}),Qy({menuRef:r,submenuRef:i,isOpen:t.isOpen,isDisabled:o}),{submenuTriggerProps:{onKeyDown:y.onKeyDown,onKeyUp:y.onKeyUp,id:l,"aria-controls":t.isOpen?u:void 0,"aria-haspopup":o?void 0:a,"aria-expanded":t.isOpen?`true`:`false`,onPressStart:e=>{!o&&(e.pointerType===`virtual`||e.pointerType===`keyboard`)&&m(`first`)},onPress:e=>{!o&&(e.pointerType===`touch`||e.pointerType===`mouse`)&&m()},onHoverChange:e=>{o||(e&&!t.isOpen?f.current||=setTimeout(()=>{m()},s):e||p())},isOpen:t.isOpen},submenuProps:_,popoverProps:{isNonModal:!0,shouldCloseOnInteractOutside:e=>e!==n.current}}}function eb(e){let t=__(e),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)([]),o=()=>{a([]),t.close()},s=(e,t)=>{a(n=>t>n.length?n:[...n.slice(0,t),e])},c=(e,t)=>{a(n=>n[t]===e?n.slice(0,t):n)};return{focusStrategy:n,...t,open(e=null){r(e),t.open()},toggle(e=null){r(e),t.toggle()},close(){o()},expandedKeysStack:i,openSubmenu:s,closeSubmenu:c}}function tb(e,t){let{triggerKey:n}=e,{expandedKeysStack:r,openSubmenu:i,closeSubmenu:a,close:o}=t,[s]=(0,v.useState)(r?.length),c=(0,v.useMemo)(()=>r[s]===n,[r,n,s]),[l,u]=(0,v.useState)(null),d=(0,v.useCallback)(e=>{u(e??null),i(n,s)},[i,s,n]),f=(0,v.useCallback)(()=>{u(null),a(n,s)},[a,s,n]),p=(0,v.useCallback)(e=>{u(e??null),c?f():d(e)},[f,d,c]);return(0,v.useMemo)(()=>({focusStrategy:l,isOpen:c,open:d,close:f,closeAll:o,submenuLevel:s,setOpen:()=>{},toggle:p,point:null,setPoint:()=>{}}),[c,d,f,o,l,p,s])}var nb=class e extends Set{constructor(t,n,r){super(t),t instanceof e?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}},rb=class e{constructor(e,t,n){this.collection=e,this.state=t,this.allowsCellSelection=n?.allowsCellSelection??!1,this._isSelectAll=null,this.layoutDelegate=n?.layoutDelegate||null,this.fullCollection=n?.fullCollection||null}get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,t){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,t)}get selectedKeys(){return this.state.selectedKeys===`all`?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode===`none`)return!1;let t=this.getKey(e);return t==null?!1:this.state.selectedKeys===`all`?this.canSelectItem(t):this.state.selectedKeys.has(t)}get isEmpty(){return this.state.selectedKeys!==`all`&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys===`all`)return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),t=this.state.selectedKeys;return this._isSelectAll=e.every(e=>t.has(e)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);(!e||n&&Ky(this.collection,n,e)<0)&&(e=n)}return e?.key??null}get lastSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);(!e||n&&Ky(this.collection,n,e)>0)&&(e=n)}return e?.key??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode===`none`)return;if(this.selectionMode===`single`){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n;if(this.state.selectedKeys===`all`)n=new nb([t],t,t);else{let e=this.state.selectedKeys,r=e.anchorKey??t;n=new nb(e,r,t);for(let i of this.getKeyRange(r,e.currentKey??t))n.delete(i);for(let e of this.getKeyRange(t,r))this.canSelectItem(e)&&n.add(e)}this.state.setSelectedKeys(n)}getKeyRange(e,t){let n=this.collection.getItem(e),r=this.collection.getItem(t);return n&&r?Ky(this.collection,n,r)<=0?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){if(this.layoutDelegate?.getKeyRange)return this.layoutDelegate.getKeyRange(e,t);let n=[],r=e;for(;r!=null;){let e=this.collection.getItem(r);if(e&&(e.type===`item`||e.type===`cell`&&this.allowsCellSelection)&&n.push(r),r===t)return n;r=this.collection.getKeyAfter(r)}return[]}getKey(e){let t=this.collection.getItem(e);if(!t||t.type===`cell`&&this.allowsCellSelection)return e;for(;t&&t.type!==`item`&&t.parentKey!=null;)t=this.collection.getItem(t.parentKey);return!t||t.type!==`item`?null:t.key}toggleSelection(e){if(this.selectionMode===`none`)return;if(this.selectionMode===`single`&&!this.isSelected(e)){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n=new nb(this.state.selectedKeys===`all`?this.getSelectAllKeys():this.state.selectedKeys);n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode===`none`)return;let t=this.getKey(e);if(t==null)return;let n=this.canSelectItem(t)?new nb([t],t,t):new nb;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode===`none`)return;let t=new nb;for(let n of e){let e=this.getKey(n);if(e!=null&&(t.add(e),this.selectionMode===`single`))break}this.state.setSelectedKeys(t)}getSelectAllKeys(){let e=this.fullCollection??this.collection,t=[],n=r=>{for(;r!=null;){if(this.canSelectItemIn(r,e)){let i=e.getItem(r);i?.type===`item`&&t.push(r),i?.hasChildNodes&&(this.allowsCellSelection||i.type!==`item`)&&n(Uy(Hy(i,e))?.key??null)}r=e.getKeyAfter(r)}};return n(e.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode===`multiple`&&this.state.setSelectedKeys(`all`)}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys===`all`||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new nb)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode!==`none`&&(this.selectionMode===`single`?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior===`toggle`||t&&(t.pointerType===`touch`||t.pointerType===`virtual`)?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let t=this.selectedKeys;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;for(let n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){return this.canSelectItemIn(e,this.collection)}canSelectItemIn(e,t){if(this.state.selectionMode===`none`||this.state.disabledKeys.has(e))return!1;let n=t.getItem(e);return!(!n||n?.props?.isDisabled||n.type===`cell`&&!this.allowsCellSelection)}isDisabled(e){let t=this.collection.getItem(e);return this.state.disabledBehavior===`all`&&(this.state.disabledKeys.has(e)||!!t?.props?.isDisabled)&&t?.props?.disabledBehavior!==`selection`}isLink(e){return!!this.collection.getItem(e)?.props?.href}getItemProps(e){return this.collection.getItem(e)?.props}withCollection(t){return new e(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0,fullCollection:this.fullCollection??this.collection})}},ib=class{constructor(e,{expandedKeys:t}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,t||=new Set;let n=e=>{if(this.keyMap.set(e.key,e),e.childNodes&&(e.type===`section`||t.has(e.key)))for(let t of e.childNodes)n(t)};for(let t of e)n(t);let r=null,i=0;for(let[e,t]of this.keyMap)r?(r.nextKey=e,t.prevKey=r.key):(this.firstKey=e,t.prevKey=void 0),t.type===`item`&&(t.index=i++),r=t,r.nextKey=void 0;this.lastKey=r?.key??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);return t?t.prevKey??null:null}getKeyAfter(e){let t=this.keyMap.get(e);return t?t.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){let t=[...this.getKeys()];return this.getItem(t[e])}},ab=class{build(e,t){return this.context=t,ob(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:t,items:n}=e;if(v.isValidElement(t)&&t.type===v.Fragment)yield*this.iterateCollection({children:t.props.children,items:n});else if(typeof t==`function`){if(!n)throw Error(`props.children was a function but props.items is missing`);let e=0;for(let r of n)yield*this.getFullNode({value:r,index:e},{renderer:t}),e++}else{let e=[];v.Children.forEach(t,t=>{t&&e.push(t)});let n=0;for(let t of e){let e=this.getFullNode({element:t,index:n},{});for(let t of e)n++,yield t}}}getKey(e,t,n,r){if(e.key!=null)return e.key;if(t.type===`cell`&&t.key!=null)return`${r}${t.key}`;let i=t.value;if(i!=null){let e=i.key??i.id;if(e==null)throw Error(`No key found for item`);return e}return r?`${r}.${t.index}`:`$.${t.index}`}getChildState(e,t){return{renderer:t.renderer||e.renderer}}*getFullNode(e,t,n,r){if(v.isValidElement(e.element)&&e.element.type===v.Fragment){let i=[];v.Children.forEach(e.element.props.children,e=>{i.push(e)});let a=e.index??0;for(let e of i)yield*this.getFullNode({element:e,index:a++},t,n,r);return}let i=e.element;if(!i&&e.value&&t&&t.renderer){let n=this.cache.get(e.value);if(n&&(!n.shouldInvalidate||!n.shouldInvalidate(this.context))){n.index=e.index,n.parentKey=r?r.key:null,yield n;return}i=t.renderer(e.value)}if(v.isValidElement(i)){let a=i.type;if(typeof a!=`function`&&typeof a.getCollectionNode!=`function`){let e=i.type;throw Error(`Unknown element <${e}> in collection.`)}let o=a.getCollectionNode(i.props,this.context),s=e.index??0,c=o.next();for(;!c.done&&c.value;){let a=c.value;e.index=s;let l=a.key??null;l??=a.element?null:this.getKey(i,e,t,n);let u=[...this.getFullNode({...a,key:l,index:s,wrapper:sb(e.wrapper,a.wrapper)},this.getChildState(t,a),n?`${n}${i.key}`:i.key,r)];for(let t of u){if(t.value=a.value??e.value??null,t.value&&this.cache.set(t.value,t),e.type&&t.type!==e.type)throw Error(`Unsupported type <${cb(t.type)}> in <${cb(r?.type??`unknown parent type`)}>. Only <${cb(e.type)}> is supported.`);s++,yield t}c=o.next(u)}return}if(e.key==null||e.type==null)return;let a=this,o={type:e.type,props:e.props,key:e.key,parentKey:r?r.key:null,value:e.value??null,level:(r?.level??0)+ +(r?.type===`item`),index:e.index,rendered:e.rendered,textValue:e.textValue??``,"aria-label":e[`aria-label`],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:ob(function*(){if(!e.hasChildNodes||!e.childNodes)return;let n=0;for(let r of e.childNodes()){r.key!=null&&(r.key=`${o.key}${r.key}`);let e=a.getFullNode({...r,index:n},a.getChildState(t,r),o.key,o);for(let t of e)n++,yield t}})};yield o}constructor(){this.cache=new WeakMap}};function ob(e){let t=[],n=null;return{*[Symbol.iterator](){for(let e of t)yield e;n||=e();for(let e of n)t.push(e),yield e}}}function sb(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function cb(e){return e[0].toUpperCase()+e.slice(1)}function lb(e,t,n){let r=(0,v.useMemo)(()=>new ab,[]),{children:i,items:a,collection:o}=e;return(0,v.useMemo)(()=>o||t(r.build({children:i,items:a},n)),[r,i,a,o,n,t])}function ub(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function db(e){let{selectionMode:t=`none`,disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i=`toggle`,disabledBehavior:a=`all`}=e,o=(0,v.useRef)(!1),[,s]=(0,v.useState)(!1),c=(0,v.useRef)(null),l=(0,v.useRef)(null),[,u]=(0,v.useState)(null),[d,f]=eh((0,v.useMemo)(()=>fb(e.selectedKeys),[e.selectedKeys]),(0,v.useMemo)(()=>fb(e.defaultSelectedKeys,new nb),[e.defaultSelectedKeys]),e.onSelectionChange),p=(0,v.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[m,h]=(0,v.useState)(i);i===`replace`&&m===`toggle`&&typeof d==`object`&&d.size===0&&h(`replace`);let g=(0,v.useRef)(i);return(0,v.useEffect)(()=>{i!==g.current&&(h(i),g.current=i)},[i]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:m,setSelectionBehavior:h,get isFocused(){return o.current},setFocused(e){o.current=e,s(e)},get focusedKey(){return c.current},get childFocusStrategy(){return l.current},setFocusedKey(e,t=`first`){c.current=e,l.current=t,u(e)},selectedKeys:d,setSelectedKeys(e){(r||!ub(e,d))&&f(e)},disabledKeys:p,disabledBehavior:a}}function fb(e,t){return e?e===`all`?`all`:new nb(e):t}function pb(e){let{onExpandedChange:t}=e,[n,r]=eh(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),i=db(e),a=(0,v.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),o=lb(e,(0,v.useCallback)(e=>new ib(e,{expandedKeys:n}),[n]),null);return(0,v.useEffect)(()=>{i.focusedKey!=null&&!o.getItem(i.focusedKey)&&i.setFocusedKey(null)},[o,i.focusedKey]),{collection:o,expandedKeys:n,disabledKeys:a,toggleKey:e=>{r(mb(n,e))},setExpandedKeys:r,selectionManager:new rb(o,i)}}function mb(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}var hb=(0,v.createContext)(null),gb=(0,v.createContext)(null),_b=(0,v.createContext)(null),vb=(0,v.createContext)(null);function yb(e){let t=eb(e),n=(0,v.useRef)(null),{menuTriggerProps:r,menuProps:i}=Ey({...e,type:`menu`},t,n),a=(0,v.useRef)(null);return op()?null:v.createElement(qf,{values:[[hb,{...i,ref:a}],[jb,t],[_b,t],[v_,{trigger:`MenuTrigger`,triggerRef:n,scrollRef:a,placement:`bottom start`,"aria-labelledby":i[`aria-labelledby`],offset:e.trigger===`contextMenu`?0:void 0}]]},v.createElement(f_,{...r,ref:n,isPressed:t.isOpen},e.children))}var bb=(0,v.createContext)(null),xb=V_(class extends x_{static{this.type=`submenutrigger`}filter(e,t,n){let r=e.getItem(this.firstChildKey);if(r&&n(r.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}},(e,t,n)=>{let{CollectionBranch:r}=(0,v.useContext)(J_),i=(0,v.useContext)(gb),a=(0,v.useContext)(_b),o=tb({triggerKey:n.key},a),s=(0,v.useRef)(null),c=Zs(t),{parentMenuRef:l,shouldUseVirtualFocus:u}=(0,v.useContext)(bb),{submenuTriggerProps:d,submenuProps:f,popoverProps:p}=$y({parentMenuRef:l,submenuRef:s,delay:e.delay,shouldUseVirtualFocus:u},o,c);return v.createElement(qf,{values:[[Db,{...d,onAction:void 0,ref:c}],[hb,{ref:s,...f}],[jb,o],[v_,{trigger:`SubmenuTrigger`,triggerRef:c,placement:`end top`,"aria-labelledby":f[`aria-labelledby`],...p}]]},v.createElement(r,{collection:i.collection,parent:n}),e.children[1])},e=>e.children[0]),Sb=(0,v.forwardRef)(function(e,t){return[e,t]=Zf(e,t,hb),v.createElement(L_,{content:v.createElement(W_,e)},n=>v.createElement(Cb,{props:e,collection:n,menuRef:t}))});function Cb({props:e,collection:t,menuRef:n}){[e,n]=Zf(e,n,Fv);let{filter:r,...i}=e,a=(0,v.useMemo)(()=>r?t.filter(r):t,[t,r]),o=pb({...e,collection:a,children:void 0}),s=(0,v.useContext)(_b),{isVirtualized:c,CollectionRoot:l}=(0,v.useContext)(J_),{menuProps:u}=Ute({...e,isVirtualized:c,onClose:e.onClose||s?.close},o,n),d=Jf({...e,children:void 0,defaultClassName:`react-aria-Menu`,values:{isEmpty:o.collection.size===0}}),f=null;o.collection.size===0&&e.renderEmptyState&&(f=v.createElement(`div`,{role:`menuitem`,style:{display:`contents`}},e.renderEmptyState()));let p=Us(e,{global:!0});return v.createElement(Gh,null,v.createElement(np.div,{...W(p,d,u),ref:n,slot:e.slot||void 0,"data-empty":o.collection.size===0||void 0,onScroll:e.onScroll},v.createElement(qf,{values:[[gb,o],[Vv,{elementType:`div`}],[G_,{name:`MenuSection`,render:Tb}],[bb,{parentMenuRef:n,shouldUseVirtualFocus:i?.shouldUseVirtualFocus}],[Db,{shouldCloseOnSelect:e.shouldCloseOnSelect}],[Fv,null],[Iv,null],[vb,o.selectionManager],[_b,s??eb({})]]},v.createElement(zv,null,v.createElement(l,{collection:o.collection,persistedKeys:Y_(o.selectionManager.focusedKey),scrollRef:n}))),f))}var wb=class extends rb{constructor(e,t){super(e.collection,t),this.parent=e}get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,t){return this.parent.setFocusedKey(e,t)}setFocused(e){this.parent.setFocused(e)}get childFocusStrategy(){return this.parent.childFocusStrategy}};function Tb(e,t,n,r=`react-aria-MenuSection`){let i=(0,v.useContext)(gb),{CollectionBranch:a}=(0,v.useContext)(J_),[o,s]=Qf(),{headingProps:c,groupProps:l}=Gte({heading:s,"aria-label":n.props[`aria-label`]??void 0}),u=Jf({...e,id:void 0,children:void 0,defaultClassName:r,className:n.props?.className,style:n.props?.style,values:void 0}),d=(0,v.useContext)(vb),f=db(e),p=e.selectionMode==null?d:new wb(d,f),m=Xf(Db)?.shouldCloseOnSelect,h=Us(e,{global:!0});return delete h.id,v.createElement(np.section,{...W(h,u,l),ref:t},v.createElement(qf,{values:[[Lv,{...c,ref:o}],[vb,p],[Db,{shouldCloseOnSelect:e.shouldCloseOnSelect??m}]]},v.createElement(a,{collection:i.collection,parent:n})))}var Eb=V_(T_,Tb),Db=(0,v.createContext)(null),Ob=B_(w_,function(e,t,n){[e,t]=Zf(e,t,Db);let r=Xf(Db)?.id,i=(0,v.useContext)(gb),a=Zs(t),o=(0,v.useContext)(vb),{isVirtualized:s}=(0,v.useContext)(J_),{menuItemProps:c,labelProps:l,descriptionProps:u,keyboardShortcutProps:d,...f}=Wte({...e,id:r,key:n.key,selectionManager:o,isVirtualized:s},i,a),{hoverProps:p,isHovered:m}=Zm({isDisabled:f.isDisabled}),h=Jf({...e,id:void 0,children:n.rendered,defaultClassName:`react-aria-MenuItem`,values:{...f,isHovered:m,isFocusVisible:f.isFocusVisible,selectionMode:o.selectionMode,selectionBehavior:o.selectionBehavior,hasSubmenu:!!e[`aria-haspopup`],isOpen:e[`aria-expanded`]===`true`}}),g=e.href?np.a:np.div,_=Us(e,{global:!0});return delete _.id,delete _.onClick,v.createElement(g,{...W(_,h,c,p),ref:a,"data-disabled":f.isDisabled||void 0,"data-hovered":m||void 0,"data-focused":f.isFocused||void 0,"data-focus-visible":f.isFocusVisible||void 0,"data-pressed":f.isPressed||void 0,"data-selected":f.isSelected||void 0,"data-selection-mode":o.selectionMode===`none`?void 0:o.selectionMode,"data-has-submenu":!!e[`aria-haspopup`]||void 0,"data-open":e[`aria-expanded`]===`true`||void 0},v.createElement(qf,{values:[[Hv,{slots:{[Kf]:l,label:l,description:u}}],[jte,d],[Bv,{isSelected:f.isSelected}]]},h.children))});function kb(e,t){let{role:n=`dialog`}=e,r=gs();r=e[`aria-label`]?void 0:r;let i=gs();i=n===`alertdialog`&&!e[`aria-describedby`]?i:void 0;let a=(0,v.useRef)(!1);(0,v.useEffect)(()=>{if(t.current&&!As(t.current)){_m(t.current);let e=setTimeout(()=>{(Os()===t.current||Os()===document.body)&&(a.current=!0,t.current&&(t.current.blur(),_m(t.current)),a.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),g_(),(0,v.useRef)(!1),(0,v.useEffect)(()=>{});let o=e[`aria-describedby`]??i;return{dialogProps:{...Us(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e[`aria-labelledby`]??r,"aria-describedby":o,onBlur:e=>{a.current&&e.stopPropagation()}},titleProps:{id:r},contentProps:{id:i}}}var Ab=(0,v.createContext)(null),jb=(0,v.createContext)(null);function Mb(e){let t=eb(e),n=(0,v.useRef)(null),{triggerProps:r,overlayProps:i}=Ty({type:`dialog`},t,n);return r.id=ms(),i[`aria-labelledby`]=r.id,v.createElement(qf,{values:[[jb,t],[_b,t],[Ab,i],[v_,{trigger:`DialogTrigger`,triggerRef:n,id:i.id,"aria-labelledby":i[`aria-labelledby`]}]]},v.createElement(f_,{...r,ref:n,isPressed:t.isOpen},e.children))}var Nb=(0,v.forwardRef)(function(e,t){let n=e[`aria-labelledby`];[e,t]=Zf(e,t,Ab);let{dialogProps:r,titleProps:i,contentProps:a}=kb({...e,"aria-labelledby":n},t),o=(0,v.useContext)(jb);!r[`aria-label`]&&!r[`aria-labelledby`]&&e[`aria-labelledby`]&&(r[`aria-labelledby`]=e[`aria-labelledby`]);let s=Jf({defaultClassName:`react-aria-Dialog`,className:e.className,style:e.style,children:e.children,values:{close:o?.close||(()=>{})}}),c=Us(e,{global:!0});return v.createElement(np.section,{...W(c,s,r),render:e.render,ref:t,slot:e.slot||void 0},v.createElement(qf,{values:[[ih,{slots:{[Kf]:{},title:{...i,level:2}}}],[Hv,{slots:{[Kf]:{},description:a}}],[Qm,{slots:{[Kf]:{},close:{onPress:()=>o?.close()}}}]]},s.children))});function Pb(e,t,n){let{overlayProps:r,underlayProps:i}=ug({...e,isOpen:t.isOpen,onClose:t.close},n);return mg({isDisabled:!t.isOpen}),g_(),(0,v.useEffect)(()=>{if(t.isOpen&&n.current)return wh([n.current],{shouldUseInert:!0})},[t.isOpen,n]),{modalProps:W(r),underlayProps:i}}var Fb=(0,v.createContext)(null),Ib=(0,v.createContext)(null),Lb=(0,v.forwardRef)(function(e,t){if((0,v.useContext)(Ib))return v.createElement(zb,{...e,modalRef:t},e.children);let{isDismissable:n,isKeyboardDismissDisabled:r,isOpen:i,defaultOpen:a,onOpenChange:o,children:s,isEntering:c,isExiting:l,UNSTABLE_portalContainer:u,shouldCloseOnInteractOutside:d,...f}=e;return v.createElement(Rb,{isDismissable:n,isKeyboardDismissDisabled:r,isOpen:i,defaultOpen:a,onOpenChange:o,isEntering:c,isExiting:l,UNSTABLE_portalContainer:u,shouldCloseOnInteractOutside:d},v.createElement(zb,{...f,modalRef:t},s))});function Jte(e,t){[e,t]=Zf(e,t,Fb);let n=(0,v.useContext)(jb),r=__(e),i=e.isOpen!=null||e.defaultOpen!=null||!n?r:n,a=Zs(t),o=(0,v.useRef)(null),s=Oc(a,i.isOpen),c=Oc(o,i.isOpen),l=s||c||e.isExiting||!1,u=cs();return!i.isOpen&&!l||u?null:v.createElement(Yte,{...e,state:i,isExiting:l,overlayRef:a,modalRef:o})}var Rb=(0,v.forwardRef)(Jte);function Yte({UNSTABLE_portalContainer:e,...t}){let n=t.modalRef,{state:r}=t,{modalProps:i,underlayProps:a}=Pb(t,r,n),o=Dc(t.overlayRef)||t.isEntering||!1,s=Jf({...t,defaultClassName:`react-aria-ModalOverlay`,values:{isEntering:o,isExiting:t.isExiting,state:r}}),c=fc(),l,u;if(typeof document<`u`){let e=ac(document.body)?document.body:document.scrollingElement||document.documentElement,t=e.getBoundingClientRect().width%1,n=e.getBoundingClientRect().height%1;l=e.scrollWidth-t,u=e.scrollHeight-n}let d={...s.style,"--visual-viewport-width":c.width+`px`,"--visual-viewport-height":c.height+`px`,"--page-width":l===void 0?void 0:l+`px`,"--page-height":u===void 0?void 0:u+`px`};return v.createElement(h_,{isExiting:t.isExiting,portalContainer:e},v.createElement(np.div,{...W(Us(t,{global:!0}),a),...s,style:d,ref:t.overlayRef,"data-entering":o||void 0,"data-exiting":t.isExiting||void 0},v.createElement(qf,{values:[[Ib,{modalProps:i,modalRef:n,isExiting:t.isExiting,isDismissable:t.isDismissable}],[jb,r]]},s.children)))}function zb(e){let{modalProps:t,modalRef:n,isExiting:r,isDismissable:i}=(0,v.useContext)(Ib),a=(0,v.useContext)(jb),o=Zs((0,v.useMemo)(()=>Ns(e.modalRef,n),[e.modalRef,n])),s=Dc(o),c=Jf({...e,defaultClassName:`react-aria-Modal`,values:{isEntering:s,isExiting:r,state:a}});return v.createElement(np.div,{...W(Us(e,{global:!0}),t),...c,ref:o,"data-entering":s||void 0,"data-exiting":r||void 0},i&&v.createElement(d_,{onDismiss:a.close}),c.children)}var Bb=v.forwardRef(({children:e,...t},n)=>{n=Zs(n);let{pressProps:r}=Fm({...t,ref:n}),{focusableProps:i}=wm(t,n),a=v.Children.only(e);(0,v.useEffect)(()=>{},[n,t.isDisabled]);let o=a.props.ref;return v.cloneElement(a,{...W(r,i,a.props),ref:Ns(o,n)})}),Vb=({children:e,className:t,slot:n,style:r,variant:i,...a})=>{let o=(0,v.useMemo)(()=>df({variant:i}),[i]);return(0,G.jsx)($m,{"aria-label":`Close`,className:K(t,o),"data-slot":`close-button`,slot:n,style:r,type:`button`,...a,children:t=>typeof e==`function`?e(t):e??(0,G.jsx)(dh,{"data-slot":`close-button-icon`})})},Hb=Object.assign(Vb,{Root:Vb}),Ub=(0,v.createContext)({}),Wb=({children:e,...t})=>{let n=(0,v.useMemo)(()=>({slots:nf(),placement:void 0}),[]);return(0,G.jsx)(Ub,{value:n,children:(0,G.jsx)(Mb,{"data-slot":`alert-dialog-root`,...t,children:e})})},Gb=Object.assign(Wb,{Root:Wb,Trigger:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Ub);return(0,G.jsx)(Bb,{children:(0,G.jsx)(`div`,{className:q(r?.trigger,t),"data-slot":`alert-dialog-trigger`,role:`button`,...n,children:e})})},Backdrop:({children:e,className:t,isDismissable:n=!1,isKeyboardDismissDisabled:r=!0,onClick:i,variant:a,...o})=>{let{slots:s}=(0,v.use)(Ub),c=(0,v.useMemo)(()=>nf({variant:a}),[a]),l=(0,v.useMemo)(()=>({slots:{...s,...c}}),[s,c]);return(0,G.jsx)(Rb,{className:K(t,c?.backdrop()),"data-slot":`alert-dialog-backdrop`,isDismissable:n,isKeyboardDismissDisabled:r,onClick:e=>{e.stopPropagation(),i?.(e)},...o,children:t=>(0,G.jsxs)(Ub,{value:l,children:[typeof e==`function`?e(t):e,` `]})})},Container:({children:e,className:t,placement:n=`auto`,size:r,...i})=>{let{slots:a}=(0,v.use)(Ub),o=(0,v.useMemo)(()=>nf({size:r}),[r]),s=(0,v.useMemo)(()=>({placement:n,slots:{...a,...o}}),[n,a,o]);return(0,G.jsx)(Lb,{className:K(t,o?.container()),"data-placement":n,"data-slot":`alert-dialog-container`,...i,children:t=>(0,G.jsx)(Ub,{value:s,children:typeof e==`function`?e(t):e})})},Dialog:({children:e,className:t,...n})=>{let{placement:r,slots:i}=(0,v.use)(Ub);return(0,G.jsx)(Nb,{className:q(i?.dialog,t),"data-placement":r,"data-slot":`alert-dialog-dialog`,role:`alertdialog`,...n,children:e})},Header:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Ub);return(0,G.jsx)(`div`,{className:q(r?.header,t),"data-slot":`alert-dialog-header`,...n,children:e})},Heading:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Ub);return(0,G.jsx)(ah,{className:q(r?.heading,t),"data-slot":`alert-dialog-heading`,slot:`title`,...n,children:e})},Body:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Ub);return(0,G.jsx)(`div`,{className:q(r?.body,t),"data-slot":`alert-dialog-body`,...n,children:e})},Footer:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Ub);return(0,G.jsx)(`div`,{className:q(r?.footer,t),"data-slot":`alert-dialog-footer`,...n,children:e})},Icon:({children:e,className:t,status:n=`danger`,...r})=>{let i=(0,v.useMemo)(()=>nf({status:n}),[n]),a=()=>{switch(n){case`default`:return(0,G.jsx)(fh,{"data-slot":`alert-dialog-default-icon`});case`accent`:return(0,G.jsx)(fh,{"data-slot":`alert-dialog-default-icon`});case`success`:return(0,G.jsx)(hh,{"data-slot":`alert-dialog-default-icon`});case`warning`:return(0,G.jsx)(ph,{"data-slot":`alert-dialog-default-icon`});case`danger`:return(0,G.jsx)(mh,{"data-slot":`alert-dialog-default-icon`});default:return(0,G.jsx)(mh,{"data-slot":`alert-dialog-default-icon`})}};return(0,G.jsx)(Xc.div,{className:i?.icon({className:t}),"data-slot":`alert-dialog-icon`,...r,children:e??a()})},CloseTrigger:({className:e,...t})=>{let{slots:n}=(0,v.use)(Ub);return(0,G.jsx)(Hb,{className:K(e,n?.closeTrigger()),"data-slot":`alert-dialog-close-trigger`,slot:`close`,...t})}});function Xte(e){let t=Ly({usage:`search`,...e}),n=(0,v.useCallback)((e,n)=>n.length===0||(e=e.normalize(`NFC`),n=n.normalize(`NFC`),t.compare(e.slice(0,n.length),n)===0),[t]),r=(0,v.useCallback)((e,n)=>n.length===0||(e=e.normalize(`NFC`),n=n.normalize(`NFC`),t.compare(e.slice(-n.length),n)===0),[t]),i=(0,v.useCallback)((e,n)=>{if(n.length===0)return!0;e=e.normalize(`NFC`),n=n.normalize(`NFC`);let r=0,i=n.length;for(;r+i<=e.length;r++){let a=e.slice(r,r+i);if(t.compare(n,a)===0)return!0}return!1},[t]);return(0,v.useMemo)(()=>({startsWith:n,endsWith:r,contains:i}),[n,r,i])}var Kb=(0,v.createContext)({}),qb=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,Kb);let{isDisabled:n,isInvalid:r,isReadOnly:i,onHoverStart:a,onHoverChange:o,onHoverEnd:s,...c}=e;n??=!!e[`aria-disabled`]&&e[`aria-disabled`]!==`false`,r??=!!e[`aria-invalid`]&&e[`aria-invalid`]!==`false`;let{hoverProps:l,isHovered:u}=Zm({onHoverStart:a,onHoverChange:o,onHoverEnd:s,isDisabled:n}),{isFocused:d,isFocusVisible:f,focusProps:p}=Gm({within:!0}),m=Jf({...e,values:{isHovered:u,isFocusWithin:d,isFocusVisible:f,isDisabled:n,isInvalid:r},defaultClassName:`react-aria-Group`});return v.createElement(np.div,{...W(c,p,l),...m,ref:t,role:e.role??`group`,slot:e.slot??void 0,"data-focus-within":d||void 0,"data-hovered":u||void 0,"data-focus-visible":f||void 0,"data-disabled":n||void 0,"data-invalid":r||void 0,"data-readonly":i||void 0},m.children)}),Jb=(0,v.createContext)(null),Yb={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},Xb={...Yb,customError:!0,valid:!1},Zb={isInvalid:!1,validationDetails:Yb,validationErrors:[]},Qb=(0,v.createContext)({}),$b=`__reactAriaFormValidationState`;function ex(e){if(e.__reactAriaFormValidationState){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}=e[$b];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}}return Zte(e)}function Zte(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:a,validate:o,validationBehavior:s=`aria`}=e;n&&(t||=n===`invalid`);let c=t===void 0?null:{isInvalid:t,validationErrors:[],validationDetails:Xb},l=(0,v.useMemo)(()=>!o||i==null?null:nx(Qte(o,i)),[o,i]);a?.validationDetails.valid&&(a=void 0);let u=(0,v.useContext)(Qb),d=(0,v.useMemo)(()=>r?Array.isArray(r)?r.flatMap(e=>tx(u[e])):tx(u[r]):[],[u,r]),[f,p]=(0,v.useState)(u),[m,h]=(0,v.useState)(!1);u!==f&&(p(u),h(!1));let g=(0,v.useMemo)(()=>nx(m?[]:d),[m,d]),_=(0,v.useRef)(Zb),[y,b]=(0,v.useState)(Zb),x=(0,v.useRef)(Zb),S=()=>{if(!C)return;w(!1);let e=l||a||_.current;rx(e,x.current)||(x.current=e,b(e))},[C,w]=(0,v.useState)(!1);return(0,v.useEffect)(S),{realtimeValidation:c||g||l||a||Zb,displayValidation:s===`native`?c||g||y:c||g||l||a||y,updateValidation(e){s===`aria`&&!rx(y,e)?b(e):_.current=e},resetValidation(){let e=Zb;rx(e,x.current)||(x.current=e,b(e)),s===`native`&&w(!1),h(!0)},commitValidation(){s===`native`&&w(!0),h(!0)}}}function tx(e){return e?Array.isArray(e)?e:[e]:[]}function Qte(e,t){if(typeof e==`function`){let n=e(t);if(n&&typeof n!=`boolean`)return tx(n)}return[]}function nx(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:Xb}:null}function rx(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,n)=>e===t.validationErrors[n])&&Object.entries(e.validationDetails).every(([e,n])=>t.validationDetails[e]===n)}function ix(...e){let t=new Set,n=!1,r={...Yb};for(let i of e){for(let e of i.validationErrors)t.add(e);n||=i.isInvalid;for(let e in r)r[e]||=i.validationDetails[e]}return r.valid=!n,{isInvalid:n,validationErrors:[...t],validationDetails:r}}var ax=(0,v.createContext)(null),$te=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,ax);let{validationErrors:n,validationBehavior:r=`native`,children:i,className:a,...o}=e;return v.createElement(np.form,{noValidate:r!==`native`,...o,ref:t,className:a||`react-aria-Form`},v.createElement(ax.Provider,{value:{...e,validationBehavior:r}},v.createElement(Qb.Provider,{value:n??{}},i)))}),ox={};ox={colorSwatchPicker:`تغييرات الألوان`,dropzoneLabel:`DropZone`,selectPlaceholder:`حدد عنصرًا`,tableResizer:`أداة تغيير الحجم`};var sx={};sx={colorSwatchPicker:`Цветови мостри`,dropzoneLabel:`DropZone`,selectPlaceholder:`Изберете предмет`,tableResizer:`Преоразмерител`};var cx={};cx={colorSwatchPicker:`Vzorky barev`,dropzoneLabel:`Místo pro přetažení`,selectPlaceholder:`Vyberte položku`,tableResizer:`Změna velikosti`};var lx={};lx={colorSwatchPicker:`Farveprøver`,dropzoneLabel:`DropZone`,selectPlaceholder:`Vælg et element`,tableResizer:`Størrelsesændring`};var ux={};ux={colorSwatchPicker:`Farbfelder`,dropzoneLabel:`Ablegebereich`,selectPlaceholder:`Element wählen`,tableResizer:`Größenanpassung`};var dx={};dx={colorSwatchPicker:`Χρωματικά δείγματα`,dropzoneLabel:`DropZone`,selectPlaceholder:`Επιλέξτε ένα αντικείμενο`,tableResizer:`Αλλαγή μεγέθους`};var fx={};fx={selectPlaceholder:`Select an item`,tableResizer:`Resizer`,dropzoneLabel:`DropZone`,colorSwatchPicker:`Color swatches`};var px={};px={colorSwatchPicker:`Muestras de colores`,dropzoneLabel:`DropZone`,selectPlaceholder:`Seleccionar un artículo`,tableResizer:`Cambiador de tamaño`};var mx={};mx={colorSwatchPicker:`Värvinäidised`,dropzoneLabel:`DropZone`,selectPlaceholder:`Valige üksus`,tableResizer:`Suuruse muutja`};var hx={};hx={colorSwatchPicker:`Värimallit`,dropzoneLabel:`DropZone`,selectPlaceholder:`Valitse kohde`,tableResizer:`Koon muuttaja`};var gx={};gx={colorSwatchPicker:`Échantillons de couleurs`,dropzoneLabel:`DropZone`,selectPlaceholder:`Sélectionner un élément`,tableResizer:`Redimensionneur`};var _x={};_x={colorSwatchPicker:`דוגמיות צבע`,dropzoneLabel:`DropZone`,selectPlaceholder:`בחר פריט`,tableResizer:`שינוי גודל`};var vx={};vx={colorSwatchPicker:`Uzorci boja`,dropzoneLabel:`Zona spuštanja`,selectPlaceholder:`Odaberite stavku`,tableResizer:`Promjena veličine`};var yx={};yx={colorSwatchPicker:`Színtárak`,dropzoneLabel:`DropZone`,selectPlaceholder:`Válasszon ki egy elemet`,tableResizer:`Átméretező`};var bx={};bx={colorSwatchPicker:`Campioni di colore`,dropzoneLabel:`Zona di rilascio`,selectPlaceholder:`Seleziona un elemento`,tableResizer:`Ridimensionamento`};var xx={};xx={colorSwatchPicker:`カラースウォッチ`,dropzoneLabel:`ドロップゾーン`,selectPlaceholder:`項目を選択`,tableResizer:`サイズ変更ツール`};var Sx={};Sx={colorSwatchPicker:`색상 견본`,dropzoneLabel:`드롭 영역`,selectPlaceholder:`항목 선택`,tableResizer:`크기 조정기`};var Cx={};Cx={colorSwatchPicker:`Spalvų pavyzdžiai`,dropzoneLabel:`„DropZone“`,selectPlaceholder:`Pasirinkite elementą`,tableResizer:`Dydžio keitiklis`};var wx={};wx={colorSwatchPicker:`Krāsu paraugi`,dropzoneLabel:`DropZone`,selectPlaceholder:`Izvēlēties vienumu`,tableResizer:`Izmēra mainītājs`};var Tx={};Tx={colorSwatchPicker:`Fargekart`,dropzoneLabel:`Droppsone`,selectPlaceholder:`Velg et element`,tableResizer:`Størrelsesendrer`};var Ex={};Ex={colorSwatchPicker:`kleurstalen`,dropzoneLabel:`DropZone`,selectPlaceholder:`Selecteer een item`,tableResizer:`Resizer`};var Dx={};Dx={colorSwatchPicker:`Próbki kolorów`,dropzoneLabel:`Strefa upuszczania`,selectPlaceholder:`Wybierz element`,tableResizer:`Zmiana rozmiaru`};var Ox={};Ox={colorSwatchPicker:`Amostras de cores`,dropzoneLabel:`DropZone`,selectPlaceholder:`Selecione um item`,tableResizer:`Redimensionador`};var kx={};kx={colorSwatchPicker:`Amostras de cores`,dropzoneLabel:`DropZone`,selectPlaceholder:`Selecione um item`,tableResizer:`Redimensionador`};var Ax={};Ax={colorSwatchPicker:`Specimene de culoare`,dropzoneLabel:`Zonă de plasare`,selectPlaceholder:`Selectați un element`,tableResizer:`Instrument de redimensionare`};var jx={};jx={colorSwatchPicker:`Цветовые образцы`,dropzoneLabel:`DropZone`,selectPlaceholder:`Выберите элемент`,tableResizer:`Средство изменения размера`};var Mx={};Mx={colorSwatchPicker:`Vzorkovníky farieb`,dropzoneLabel:`DropZone`,selectPlaceholder:`Vyberte položku`,tableResizer:`Nástroj na zmenu veľkosti`};var Nx={};Nx={colorSwatchPicker:`Barvne palete`,dropzoneLabel:`DropZone`,selectPlaceholder:`Izberite element`,tableResizer:`Spreminjanje velikosti`};var Px={};Px={colorSwatchPicker:`Uzorci boje`,dropzoneLabel:`DropZone`,selectPlaceholder:`Izaberite stavku`,tableResizer:`Promena veličine`};var Fx={};Fx={colorSwatchPicker:`Färgrutor`,dropzoneLabel:`DropZone`,selectPlaceholder:`Välj en artikel`,tableResizer:`Storleksändrare`};var Ix={};Ix={colorSwatchPicker:`Renk örnekleri`,dropzoneLabel:`Bırakma Bölgesi`,selectPlaceholder:`Bir öğe seçin`,tableResizer:`Yeniden boyutlandırıcı`};var Lx={};Lx={colorSwatchPicker:`Зразки кольорів`,dropzoneLabel:`DropZone`,selectPlaceholder:`Виберіть елемент`,tableResizer:`Засіб змінення розміру`};var Rx={};Rx={colorSwatchPicker:`颜色色板`,dropzoneLabel:`放置区域`,selectPlaceholder:`选择一个项目`,tableResizer:`尺寸调整器`};var zx={};zx={colorSwatchPicker:`色票`,dropzoneLabel:`放置區`,selectPlaceholder:`選取項目`,tableResizer:`大小調整器`};var Bx={};Bx={"ar-AE":ox,"bg-BG":sx,"cs-CZ":cx,"da-DK":lx,"de-DE":ux,"el-GR":dx,"en-US":fx,"es-ES":px,"et-EE":mx,"fi-FI":hx,"fr-FR":gx,"he-IL":_x,"hr-HR":vx,"hu-HU":yx,"it-IT":bx,"ja-JP":xx,"ko-KR":Sx,"lt-LT":Cx,"lv-LV":wx,"nb-NO":Tx,"nl-NL":Ex,"pl-PL":Dx,"pt-BR":Ox,"pt-PT":kx,"ro-RO":Ax,"ru-RU":jx,"sk-SK":Mx,"sl-SI":Nx,"sr-SP":Px,"sv-SE":Fx,"tr-TR":Ix,"uk-UA":Lx,"zh-CN":Rx,"zh-TW":zx};var Vx=(0,v.createContext)({}),Hx=(0,v.createContext)(null),ene=(0,v.forwardRef)(function(e,t){let{render:n}=(0,v.useContext)(Hx);return v.createElement(v.Fragment,null,n(e,t))});function Ux(e,t){let n=e?.renderDropIndicator,r=e?.isVirtualDragging?.(),i=(0,v.useCallback)(e=>{if(r||t?.isDropTarget(e))return n?n(e):v.createElement(ene,{target:e})},[t?.target,r,n]);return e?.useDropIndicator?i:void 0}function Wx(e,t,n){let r=e.focusedKey,i=null;if(t?.isVirtualDragging?.()&&n?.target?.type===`item`&&(i=n.target.key,n.target.dropPosition===`after`)){let e=n.collection.getKeyAfter(i),t=null;if(e!=null){let r=n.collection.getItem(i)?.level??0;for(;e!=null;){let i=n.collection.getItem(e);if(!i)break;if(i.type!==`item`){e=n.collection.getKeyAfter(e);continue}if((i.level??0)<=r)break;t=e,e=n.collection.getKeyAfter(e)}}i=e??t??i}return(0,v.useMemo)(()=>new Set([r,i].filter(e=>e!=null)),[r,i])}var Gx=new WeakMap;function tne(e){return typeof e==`string`?e.replace(/\s*/g,``):``+e}function nne(e,t){let n=Gx.get(e);if(!n)throw Error(`Unknown list`);return`${n.id}-option-${tne(t)}`}function rne(e,t,n){let r=Us(e,{labelable:!0}),i=e.selectionBehavior||`toggle`,a=e.orientation||`vertical`,o=e.linkBehavior||(i===`replace`?`action`:`override`);i===`toggle`&&o===`action`&&(o=`override`);let{listProps:s}=Ry({...e,ref:n,selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,linkBehavior:o}),{focusWithinProps:c}=Wm({onFocusWithin:e.onFocus,onBlurWithin:e.onBlur,onFocusWithinChange:e.onFocusChange}),l=ms(e.id);Gx.set(t,{id:l,shouldUseVirtualFocus:e.shouldUseVirtualFocus,shouldSelectOnPressUp:e.shouldSelectOnPressUp,shouldFocusOnHover:e.shouldFocusOnHover,isVirtualized:e.isVirtualized,onAction:e.onAction,linkBehavior:o,UNSTABLE_itemBehavior:e.UNSTABLE_itemBehavior});let{labelProps:u,fieldProps:d}=lp({...e,id:l,labelElementType:`span`});return{labelProps:u,listBoxProps:W(r,c,t.selectionManager.selectionMode===`multiple`?{"aria-multiselectable":`true`}:{},{role:`listbox`,"aria-orientation":a,...W(d,s)})}}function ine(e,t,n){let{key:r}=e,i=Gx.get(t),a=e.isDisabled??t.selectionManager.isDisabled(r),o=e.isSelected??t.selectionManager.isSelected(r),s=e.shouldSelectOnPressUp??i?.shouldSelectOnPressUp,c=e.shouldFocusOnHover??i?.shouldFocusOnHover,l=e.shouldUseVirtualFocus??i?.shouldUseVirtualFocus,u=e.isVirtualized??i?.isVirtualized,d=gs(),f=gs(),p={role:`option`,"aria-disabled":a||void 0,"aria-selected":t.selectionManager.selectionMode===`none`?void 0:o,"aria-label":e[`aria-label`],"aria-labelledby":d,"aria-describedby":f},m=t.collection.getItem(r);if(u){let e=Number(m?.index);p[`aria-posinset`]=Number.isNaN(e)?void 0:e+1,p[`aria-setsize`]=Yy(t.collection)}let h=i?.onAction?()=>i?.onAction?.(r):void 0,g=nne(t,r),{itemProps:_,isPressed:v,isFocused:y,hasAction:b,allowsSelection:x}=zy({selectionManager:t.selectionManager,key:r,ref:n,shouldSelectOnPressUp:s,allowsDifferentPressOrigin:s&&c,isVirtualized:u,shouldUseVirtualFocus:l,isDisabled:a,onAction:h||m?.props?.onAction?_s(m?.props?.onAction,h):void 0,linkBehavior:i?.linkBehavior,UNSTABLE_itemBehavior:i?.UNSTABLE_itemBehavior,id:g}),{hoverProps:S}=Zm({isDisabled:a||!c,onHoverStart(){fm()||(t.selectionManager.setFocused(!0),t.selectionManager.setFocusedKey(r))}}),C=Us(m?.props);delete C.id;let w=Jo(m?.props);return{optionProps:{...p,...W(C,_,S,w),id:g},labelProps:{id:d},descriptionProps:{id:f},isFocused:y,isFocusVisible:y&&t.selectionManager.isFocused&&fm(),isSelected:o,isDisabled:a,isPressed:v,allowsSelection:x,hasAction:b}}function ane(e){let{heading:t,"aria-label":n}=e,r=ms();return{itemProps:{role:`presentation`},headingProps:t?{id:r,role:`presentation`,onMouseDown:e=>{e.preventDefault()}}:{},groupProps:{role:`group`,"aria-label":n,"aria-labelledby":t?r:void 0}}}var Kx=class{constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let t=e=>{if(this.keyMap.set(e.key,e),e.childNodes&&e.type===`section`)for(let n of e.childNodes)t(n)};for(let n of e)t(n);let n=null,r=0,i=0;for(let[e,t]of this.keyMap)n?(n.nextKey=e,t.prevKey=n.key):(this.firstKey=e,t.prevKey=void 0),t.type===`item`&&(t.index=r++),(t.type===`section`||t.type===`item`)&&i++,n=t,n.nextKey=void 0;this._size=i,this.lastKey=n?.key??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);return t?t.prevKey??null:null}getKeyAfter(e){let t=this.keyMap.get(e);return t?t.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){let t=[...this.getKeys()];return this.getItem(t[e])}getChildren(e){return this.keyMap.get(e)?.childNodes||[]}};function qx(e){let{filter:t,layoutDelegate:n}=e,r=db(e),i=(0,v.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),a=lb(e,(0,v.useCallback)(e=>t?new Kx(t(e)):new Kx(e),[t]),(0,v.useMemo)(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning])),o=(0,v.useMemo)(()=>new rb(a,r,{layoutDelegate:n}),[a,r,n]);return Jx(a,o),{collection:a,disabledKeys:i,selectionManager:o}}function one(e,t){let n=(0,v.useMemo)(()=>t?e.collection.filter(t):e.collection,[e.collection,t]),r=e.selectionManager.withCollection(n);return Jx(n,r),{collection:n,selectionManager:r,disabledKeys:e.disabledKeys}}function Jx(e,t){let n=(0,v.useRef)(null);(0,v.useEffect)(()=>{if(t.focusedKey!=null&&!e.getItem(t.focusedKey)&&n.current){let r=n.current.getKeyAfter(t.focusedKey),i=null;for(;r!=null;){let a=e.getItem(r);if(a&&a.type===`item`&&!t.isDisabled(r)){i=r;break}r=n.current.getKeyAfter(r)}if(i==null)for(r=n.current.getKeyBefore(t.focusedKey);r!=null;){let a=e.getItem(r);if(a&&a.type===`item`&&!t.isDisabled(r)){i=r;break}r=n.current.getKeyBefore(r)}t.setFocusedKey(i)}n.current=e},[e,t])}var Yx=(0,v.createContext)(null),Xx=(0,v.createContext)(null),sne=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,Yx);let n=(0,v.useContext)(Xx);return n?v.createElement(Zx,{state:n,props:e,listBoxRef:t}):v.createElement(L_,{content:v.createElement(W_,e)},n=>v.createElement(cne,{props:e,listBoxRef:t,collection:n}))});function cne({props:e,listBoxRef:t,collection:n}){e={...e,collection:n,children:null,items:null};let{layoutDelegate:r}=(0,v.useContext)(J_),i=qx({...e,layoutDelegate:r});return v.createElement(Zx,{state:i,props:e,listBoxRef:t})}function Zx({state:e,props:t,listBoxRef:n}){[t,n]=Zf(t,n,Fv);let{dragAndDropHooks:r,layout:i=`stack`,orientation:a=`vertical`,filter:o}=t,s=one(e,o),{collection:c,selectionManager:l}=s,u=!!r?.useDraggableCollectionState,d=!!r?.useDroppableCollectionState,{direction:f}=bp(),{disabledBehavior:p,disabledKeys:m}=l,h=Ly({usage:`search`,sensitivity:`base`}),{isVirtualized:g,layoutDelegate:_,dropTargetDelegate:y,CollectionRoot:b}=(0,v.useContext)(J_),x=(0,v.useMemo)(()=>t.keyboardDelegate||new Fy({collection:c,collator:h,ref:n,disabledKeys:m,disabledBehavior:p,layout:i,orientation:a,direction:f,layoutDelegate:_}),[c,h,n,p,m,a,f,t.keyboardDelegate,i,_]),{listBoxProps:S}=rne({...t,shouldSelectOnPressUp:u||t.shouldSelectOnPressUp,keyboardDelegate:x,isVirtualized:g},s,n);(0,v.useRef)(u),(0,v.useRef)(d),(0,v.useEffect)(()=>{},[u,d]);let C,w,T,E=!1,D=null,O=(0,v.useRef)(null);if(u&&r){C=r.useDraggableCollectionState({collection:c,selectionManager:l,preview:r.renderDragPreview?O:void 0}),r.useDraggableCollection({},C,n);let e=r.DragPreview;D=r.renderDragPreview?v.createElement(e,{ref:O},r.renderDragPreview):null}if(d&&r){w=r.useDroppableCollectionState({collection:c,selectionManager:l});let e=r.dropTargetDelegate||y||new r.ListDropTargetDelegate(c,n,{orientation:a,layout:i,direction:f});T=r.useDroppableCollection({keyboardDelegate:x,dropTargetDelegate:e},w,n),E=w.isDropTarget({type:`root`})}let{focusProps:k,isFocused:A,isFocusVisible:j}=Gm(),M=s.collection.size===0,N={isDropTarget:E,isEmpty:M,isFocused:A,isFocusVisible:j,layout:t.layout||`stack`,orientation:a,state:s},P=Jf({...t,children:void 0,defaultClassName:`react-aria-ListBox`,values:N}),F=null;M&&t.renderEmptyState&&(F=v.createElement(`div`,{role:`option`,style:{display:`contents`}},t.renderEmptyState(N)));let I=Us(t,{global:!0});return v.createElement(Gh,null,v.createElement(np.div,{...W(I,P,S,k,T?.collectionProps),ref:n,slot:t.slot||void 0,onScroll:t.onScroll,"data-drop-target":E||void 0,"data-empty":M||void 0,"data-focused":A||void 0,"data-focus-visible":j||void 0,"data-layout":t.layout||`stack`,"data-orientation":a},v.createElement(qf,{values:[[Yx,t],[Xx,s],[Vx,{dragAndDropHooks:r,dragState:C,dropState:w}],[Vv,{elementType:`div`}],[Hx,{render:dne}],[G_,{name:`ListBoxSection`,render:Qx}]]},v.createElement(zv,null,v.createElement(b,{collection:c,scrollRef:n,persistedKeys:Wx(l,r,w),renderDropIndicator:Ux(r,w)}))),F,D))}function Qx(e,t,n,r=`react-aria-ListBoxSection`){let i=(0,v.useContext)(Xx),{dragAndDropHooks:a,dropState:o}=(0,v.useContext)(Vx),{CollectionBranch:s}=(0,v.useContext)(J_),[c,l]=Qf(),{headingProps:u,groupProps:d}=ane({heading:l,"aria-label":e[`aria-label`]??void 0}),f=Jf({...e,id:void 0,children:void 0,defaultClassName:r,values:void 0}),p=Us(e,{global:!0});return delete p.id,v.createElement(np.section,{...W(p,f,d),ref:t},v.createElement(Lv.Provider,{value:{...u,ref:c}},v.createElement(s,{collection:i.collection,parent:n,renderDropIndicator:Ux(a,o)})))}var lne=V_(T_,Qx),une=B_(w_,function(e,t,n){let r=Zs(t),i=(0,v.useContext)(Xx),{dragAndDropHooks:a,dragState:o,dropState:s}=(0,v.useContext)(Vx),c=o&&!(o.isDisabled||o.selectionManager.isDisabled(n.key)),{optionProps:l,labelProps:u,descriptionProps:d,...f}=ine({key:n.key,"aria-label":e?.[`aria-label`]},i,r),{hoverProps:p,isHovered:m}=Zm({isDisabled:!f.allowsSelection&&!f.hasAction&&!c,onHoverStart:n.props.onHoverStart,onHoverChange:n.props.onHoverChange,onHoverEnd:n.props.onHoverEnd}),{keyboardProps:h}=Sm(e),{focusProps:g}=vm(e),_=null;o&&a&&(_=a.useDraggableItem({key:n.key,hasAction:f.hasAction},o));let y=null;s&&a&&(y=a.useDroppableItem({target:{type:`item`,key:n.key,dropPosition:`on`}},s,r));let b=o&&o.isDragging(n.key),x=Jf({...e,id:void 0,children:e.children,defaultClassName:`react-aria-ListBoxItem`,values:{...f,isHovered:m,selectionMode:i.selectionManager.selectionMode,selectionBehavior:i.selectionManager.selectionBehavior,allowsDragging:!!o,isDragging:b,isDropTarget:y?.isDropTarget}});(0,v.useEffect)(()=>{n.textValue},[n.textValue]);let S=e.href?np.a:np.div,C=Us(e,{global:!0});return delete C.id,delete C.onClick,e.href&&l.tabIndex==null&&(l.tabIndex=-1),v.createElement(S,{...W(C,x,l,p,h,g,_?.dragProps,y?.dropProps),ref:r,"data-allows-dragging":!!o||void 0,"data-selected":f.isSelected||void 0,"data-disabled":f.isDisabled||void 0,"data-hovered":m||void 0,"data-focused":f.isFocused||void 0,"data-focus-visible":f.isFocusVisible||void 0,"data-pressed":f.isPressed||void 0,"data-dragging":b||void 0,"data-drop-target":y?.isDropTarget||void 0,"data-selection-mode":i.selectionManager.selectionMode===`none`?void 0:i.selectionManager.selectionMode},v.createElement(qf,{values:[[Hv,{slots:{[Kf]:u,label:u,description:d}}],[Bv,{isSelected:f.isSelected}]]},x.children))});function dne(e,t){t=Zs(t);let{dragAndDropHooks:n,dropState:r}=(0,v.useContext)(Vx),{dropIndicatorProps:i,isHidden:a,isDropTarget:o}=n.useDropIndicator(e,r,t);return a?null:v.createElement(pne,{...e,dropIndicatorProps:i,isDropTarget:o,ref:t})}function fne(e,t){let{dropIndicatorProps:n,isDropTarget:r,...i}=e,a=Jf({...i,defaultClassName:`react-aria-DropIndicator`,values:{isDropTarget:r}});return v.createElement(v.Fragment,null,v.createElement(np.div,{...n,...a,role:`option`,ref:t,"data-drop-target":r||void 0}))}var pne=(0,v.forwardRef)(fne);B_(C_,function(e,t,n){let r=(0,v.useContext)(Xx),{isLoading:i,onLoadMore:a,scrollOffset:o,...s}=e,c=(0,v.useRef)(null);wc((0,v.useMemo)(()=>({onLoadMore:a,collection:r?.collection,sentinelRef:c,scrollOffset:o}),[a,o,r?.collection]),c);let l=Jf({...s,id:void 0,children:n.rendered,defaultClassName:`react-aria-ListBoxLoadingIndicator`,values:void 0});return v.createElement(v.Fragment,null,v.createElement(`div`,{style:{position:`relative`,width:0,height:0},inert:Tc(!0)},v.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:c,style:{position:`absolute`,height:1,width:1}})),i&&l.children&&v.createElement(v.Fragment,null,v.createElement(np.div,{...W(Us(e,{global:!0}),{tabIndex:-1}),...l,role:`option`,ref:t},l.children)))});function $x(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:a,fieldProps:o}=lp(e),s=gs([!!t,!!n,r,i]),c=gs([!!t,!!n,r,i]);return o=W(o,{"aria-describedby":[s,c,e[`aria-describedby`]].filter(Boolean).join(` `)||void 0}),{labelProps:a,fieldProps:o,descriptionProps:{id:s},errorMessageProps:{id:c}}}var eS=new WeakMap;function mne(e,t,n){let{keyboardDelegate:r,isDisabled:i,isRequired:a,name:o,form:s,validationBehavior:c=`aria`}=e,l=Ly({usage:`search`,sensitivity:`base`}),u=(0,v.useMemo)(()=>r||new Fy(t.collection,t.disabledKeys,n,l),[r,t.collection,t.disabledKeys,l,n]),{menuTriggerProps:d,menuProps:f}=Ey({isDisabled:i,type:`listbox`},t,n),{keyboardProps:p}=Sm({shortcuts:{ArrowLeft:()=>{if(t.selectionManager.selectionMode===`multiple`)return!1;let e=t.selectedKey==null?u.getFirstKey?.():u.getKeyAbove?.(t.selectedKey);e!=null&&t.setSelectedKey(e)},ArrowRight:()=>{if(t.selectionManager.selectionMode===`multiple`)return!1;let e=t.selectedKey==null?u.getFirstKey?.():u.getKeyBelow?.(t.selectedKey);e!=null&&t.setSelectedKey(e)}},allowRepeats:!0,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp}),{typeSelectProps:m}=My({keyboardDelegate:u,selectionManager:t.selectionManager,onTypeSelect(e){t.setSelectedKey(e)}}),{isInvalid:h,validationErrors:g,validationDetails:_}=t.displayValidation,{labelProps:y,fieldProps:b,descriptionProps:x,errorMessageProps:S}=$x({...e,labelElementType:`span`,isInvalid:h,errorMessage:e.errorMessage||g});t.selectionManager.selectionMode===`multiple`&&(m={});let C=Us(e,{labelable:!0}),w=W(m,d,b),T=ms();return eS.set(t,{isDisabled:i,isRequired:a,name:o,form:s,validationBehavior:c}),{labelProps:{...y,onClick:()=>{e.isDisabled||(n.current?.focus(),mm(`keyboard`))}},triggerProps:W(C,{...w,isDisabled:i,onKeyDown:_s(w.onKeyDown,p.onKeyDown),onKeyUp:p.onKeyUp,"aria-labelledby":[T,w[`aria-labelledby`],w[`aria-label`]&&!w[`aria-labelledby`]?w.id:null].filter(Boolean).join(` `),onFocus(n){t.isFocused||(e.onFocus&&e.onFocus(n),e.onFocusChange&&e.onFocusChange(!0),t.setFocused(!0))},onBlur(n){t.isOpen||(e.onBlur&&e.onBlur(n),e.onFocusChange&&e.onFocusChange(!1),t.setFocused(!1))}}),valueProps:{id:T},menuProps:{...f,onAction:void 0,autoFocus:t.focusStrategy||!0,shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,disallowEmptySelection:!0,linkBehavior:`selection`,onBlur:n=>{Ds(n.currentTarget,n.relatedTarget)||(e.onBlur&&e.onBlur(n),e.onFocusChange&&e.onFocusChange(!1),t.setFocused(!1))},"aria-labelledby":[b[`aria-labelledby`],w[`aria-label`]&&!b[`aria-labelledby`]?w.id:null].filter(Boolean).join(` `)},descriptionProps:x,errorMessageProps:S,isInvalid:h,validationErrors:g,validationDetails:_,hiddenSelectProps:{isDisabled:i,name:o,label:e.label,state:t,triggerRef:n,form:s}}}function tS(e,t,n){let{validationBehavior:r,focus:i}=e;Xo(()=>{if(r===`native`&&n?.current&&`setCustomValidity`in n.current&&!n.current.disabled){let e=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(` `)||`Invalid value.`:``;n.current.setCustomValidity(e),n.current.hasAttribute(`title`)||(n.current.title=``),t.realtimeValidation.isInvalid||t.updateValidation(gne(n.current))}});let a=(0,v.useRef)(!1),o=$s(()=>{a.current||t.resetValidation()}),s=$s(e=>{t.displayValidation.isInvalid||t.commitValidation();let r=n?.current?.form;!e.defaultPrevented&&n&&r&&_ne(r)===n.current&&(i?i():n.current?.focus(),mm(`keyboard`)),e.preventDefault()}),c=$s(()=>{t.commitValidation()});(0,v.useEffect)(()=>{let e=n?.current;if(!e)return;let t=e.form,r=t?.reset;return t&&(t.reset=()=>{a.current=!window.event||window.event.type===`message`&&U(window.event)instanceof MessagePort,r?.call(t),a.current=!1}),e.addEventListener(`invalid`,s),e.addEventListener(`change`,c),t?.addEventListener(`reset`,o),()=>{e.removeEventListener(`invalid`,s),e.removeEventListener(`change`,c),t?.removeEventListener(`reset`,o),t&&(t.reset=r)}},[n,r])}function hne(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function gne(e){return{isInvalid:!e.validity.valid,validationDetails:hne(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function _ne(e){for(let t=0;tn.current?.focus()},t,e.selectRef);let d=t.setValue,f=(0,v.useCallback)(e=>{let t=U(e);t.multiple?d(Array.from(t.selectedOptions,e=>e.value)):d(e.currentTarget.value)},[d]);return{containerProps:{...u,"aria-hidden":!0,"data-react-aria-prevent-focus":!0,"data-a11y-ignore":`aria-hidden-focus`},inputProps:{style:{display:`none`}},selectProps:{tabIndex:-1,autoComplete:i,disabled:s,multiple:t.selectionManager.selectionMode===`multiple`,required:c===`native`&&l,name:a,form:o,value:t.value??``,onChange:f,onInput:f}}}function yne(e){let{state:t,triggerRef:n,label:r,name:i,form:a,isDisabled:o}=e,s=(0,v.useRef)(null),c=(0,v.useRef)(null),{containerProps:l,selectProps:u}=vne({...e,selectRef:t.collection.size<=300?s:c},t,n),d=Array.isArray(t.value)?t.value:[t.value];if(t.collection.size<=300)return v.createElement(`div`,{...l,"data-testid":`hidden-select-container`},v.createElement(`label`,null,r,v.createElement(`select`,{...u,ref:s},v.createElement(`option`,{value:``,label:`\xA0`},`\xA0`),[...t.collection.getKeys()].map(e=>{let n=t.collection.getItem(e);if(n&&n.type===`item`)return v.createElement(`option`,{key:n.key,value:n.key},n.textValue)}),t.collection.size===0&&i&&d.map((e,t)=>v.createElement(`option`,{key:t,value:e??``})))));if(i){let{validationBehavior:e}=eS.get(t)||{};d.length===0&&(d=[null]);let n=d.map((t,n)=>{let r={type:`hidden`,autoComplete:u.autoComplete,name:i,form:a,disabled:o,value:t??``};return e===`native`?v.createElement(`input`,{key:n,...r,ref:n===0?c:null,style:{display:`none`},type:`text`,required:n===0&&u.required,onChange:()=>{}}):v.createElement(`input`,{key:n,...r,ref:n===0?c:null})});return v.createElement(v.Fragment,null,n)}return null}function bne(e){let{selectionMode:t=`single`,shouldCloseOnSelect:n=t===`single`}=e,r=__(e),[i,a]=(0,v.useState)(null),o=(0,v.useMemo)(()=>e.defaultValue===void 0?t===`single`?e.defaultSelectedKey??null:[]:e.defaultValue,[e.defaultValue,e.defaultSelectedKey,t]),[s,c]=eh((0,v.useMemo)(()=>e.value===void 0?t===`single`?e.selectedKey:void 0:e.value,[e.value,e.selectedKey,t]),o,e.onChange),l=t===`single`&&Array.isArray(s)?s[0]:s,u=n=>{if(t===`single`){let t=Array.isArray(n)?n[0]??null:n;c(t),t!==l&&e.onSelectionChange?.(t)}else{let e=[];Array.isArray(n)?e=n:n!=null&&(e=[n]),c(e)}},d=qx({...e,selectionMode:t,disallowEmptySelection:t===`single`,allowDuplicateSelectionEvents:!0,selectedKeys:(0,v.useMemo)(()=>xne(l),[l]),onSelectionChange:e=>{if(e!==`all`){if(t===`single`){let t=e.values().next().value??null;u(t)}else u([...e]);n&&r.close(),m.commitValidation()}}}),f=d.selectionManager.firstSelectedKey,p=(0,v.useMemo)(()=>[...d.selectionManager.selectedKeys].map(e=>d.collection.getItem(e)).filter(e=>e!=null),[d.selectionManager.selectedKeys,d.collection]),m=ex({...e,value:Array.isArray(l)&&l.length===0?null:l}),[h,g]=(0,v.useState)(!1),[_]=(0,v.useState)(l);return{...m,...d,...r,value:l,defaultValue:o??_,setValue:u,selectedKey:f,setSelectedKey:u,selectedItem:p[0]??null,selectedItems:p,defaultSelectedKey:e.defaultSelectedKey??(e.selectionMode===`single`?_:null),focusStrategy:i,open(t=null){(d.collection.size!==0||e.allowsEmptyCollection)&&(a(t),r.open())},toggle(t=null){(d.collection.size!==0||e.allowsEmptyCollection)&&(a(t),r.toggle())},isFocused:h,setFocused:g}}function xne(e){if(e!==void 0)return e===null?[]:Array.isArray(e)?e:[e]}function Sne(e={}){let{locale:t}=bp();return(0,v.useMemo)(()=>new Intl.ListFormat(t,e),[t,e])}function Cne(e){return e&&e.__esModule?e.default:e}var nS=(0,v.createContext)(null),rS=(0,v.createContext)(null),iS=ap(function(e,t){[e,t]=Zf(e,t,nS);let{children:n,isDisabled:r=!1,isInvalid:i=!1,isRequired:a=!1}=e,o=(0,v.useMemo)(()=>typeof n==`function`?n({isOpen:!1,isDisabled:r,isInvalid:i,isRequired:a,isFocused:!1,isFocusVisible:!1,defaultChildren:null}):n,[n,r,i,a]);return v.createElement(L_,{content:o},n=>v.createElement(Tne,{props:e,collection:n,selectRef:t}))}),wne=[sp,Qm,Hv];function Tne({props:e,selectRef:t,collection:n}){let{validationBehavior:r}=Xf(ax)||{},i=e.validationBehavior??r??`native`,a=bne({...e,collection:n,children:void 0,validationBehavior:i}),{isFocusVisible:o,focusProps:s}=Gm({within:!0}),c=(0,v.useRef)(null),[l,u]=Qf(!e[`aria-label`]&&!e[`aria-labelledby`]),{labelProps:d,triggerProps:f,valueProps:p,menuProps:m,descriptionProps:h,errorMessageProps:g,hiddenSelectProps:_,...y}=mne({...$f(e),label:u,validationBehavior:i},a,c),b=(0,v.useMemo)(()=>({isOpen:a.isOpen,isFocused:a.isFocused,isFocusVisible:o,isDisabled:e.isDisabled||!1,isInvalid:y.isInvalid||!1,isRequired:e.isRequired||!1}),[a.isOpen,a.isFocused,o,e.isDisabled,y.isInvalid,e.isRequired]),x=Jf({...e,values:b,defaultClassName:`react-aria-Select`}),S=Us(e,{global:!0});delete S.id;let C=(0,v.useRef)(null);return v.createElement(qf,{values:[[nS,e],[rS,a],[aS,p],[sp,{...d,ref:l,elementType:`span`}],[Qm,{...f,ref:c,isPressed:a.isOpen,autoFocus:e.autoFocus}],[jb,a],[v_,{trigger:`Select`,triggerRef:c,scrollRef:C,placement:`bottom start`,"aria-labelledby":m[`aria-labelledby`],clearContexts:wne}],[Yx,{...m,ref:C}],[Xx,a],[Hv,{slots:{description:h,errorMessage:g}}],[Jb,y]]},v.createElement(np.div,{...W(S,x,s),ref:t,slot:e.slot||void 0,"data-focused":a.isFocused||void 0,"data-focus-visible":o||void 0,"data-open":a.isOpen||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":y.isInvalid||void 0,"data-required":e.isRequired||void 0},x.children,v.createElement(yne,{..._,autoComplete:e.autoComplete})))}var aS=(0,v.createContext)(null),oS=ap(function(e,t){[e,t]=Zf(e,t,aS);let n=(0,v.useContext)(rS),{placeholder:r}=Xf(nS),i=n.selectedItems.map(e=>{let t=e.props?.children;return typeof t==`function`&&(t=t({isHovered:!1,isPressed:!1,isSelected:!1,isFocused:!1,isFocusVisible:!1,isDisabled:!1,selectionMode:`single`,selectionBehavior:`toggle`})),t}),a=Sne(),o=(0,v.useMemo)(()=>n.selectedItems.map(e=>e?.textValue),[n.selectedItems]),s=n.selectionManager.selectionMode,c=(0,v.useMemo)(()=>s===`single`?o[0]??``:a.format(o),[s,a,o]),l=(0,v.useMemo)(()=>{if(s===`single`)return i[0];let e=a.formatToParts(o);if(e.length===0)return null;let t=0;return e.map(e=>e.type===`element`?v.createElement(v.Fragment,{key:t},i[t++]):e.value)},[s,a,o,i]),u=s_(Cne(Bx),`react-aria-components`),d=Jf({...e,defaultChildren:l??r??u.format(`selectPlaceholder`),defaultClassName:`react-aria-SelectValue`,values:{selectedItem:n.selectedItems[0]?.value??null,selectedItems:(0,v.useMemo)(()=>n.selectedItems.map(e=>e.value??null),[n.selectedItems]),selectedText:c,isPlaceholder:n.selectedItems.length===0,state:n}}),f=Us(e,{global:!0});return v.createElement(np.span,{ref:t,...f,...d,"data-placeholder":n.selectedItems.length===0||void 0},v.createElement(Hv.Provider,{value:void 0},d.children))}),sS=(0,v.createContext)(!1),Ene=e=>{let t=(0,v.use)(sS),n=(0,v.use)(Hv);return!t||n?.slots?.[e]!=null},cS=({children:e})=>(0,G.jsx)(sS,{value:!0,children:e}),lS=(0,v.createContext)({triggerRef:{current:null},clearButtonRef:{current:null},isDisabled:!1}),uS=({children:e,className:t,fullWidth:n,isDisabled:r,onClear:i,variant:a,...o})=>{let s=v.useMemo(()=>rf({fullWidth:n,variant:a}),[n,a]),c=(0,v.useRef)(null),l=(0,v.useRef)(null);return(0,G.jsx)(cS,{children:(0,G.jsx)(lS,{value:{slots:s,triggerRef:c,clearButtonRef:l,onClear:i,isDisabled:r},children:(0,G.jsx)(iS,{"data-slot":`autocomplete`,...o,className:K(t,s?.base()),isDisabled:r,children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})})})},dS=({children:e,className:t,isDisabled:n,onClick:r,ref:i,...a})=>{let{clearButtonRef:o,isDisabled:s,slots:c,triggerRef:l}=(0,v.use)(lS),u=(0,v.use)(rS),d=n??s??!1,f=op(),p=Ns(v.useCallback(e=>{l.current=e},[l]),i);return f?null:(0,G.jsx)(qb,{ref:p,className:K(t,c?.trigger()),"data-slot":`autocomplete-trigger`,isDisabled:d,onClick:e=>{o.current?.contains(e.target)||(r?.(e),u?.toggle())},...a,children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})};dS.displayName=`AutocompleteTrigger`;var fS=Object.assign(uS,{Root:uS,Trigger:dS,Value:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(lS);return(0,G.jsx)(oS,{className:K(t,r?.value()),"data-slot":`autocomplete-value`,...n,children:e})},Indicator:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(lS),i=(0,v.use)(rS),a=e&&v.isValidElement(e)?v.cloneElement(e,{...n,className:q(r?.indicator,t),"data-slot":`autocomplete-indicator`,"data-open":oh(i?.isOpen)}):(0,G.jsx)(sh,{className:q(r?.indicator,t),"data-open":oh(i?.isOpen),"data-slot":`autocomplete-default-indicator`,...n});return(0,G.jsx)($m,{children:a})},Popover:({children:e,className:t,placement:n=`bottom`,style:r,...i})=>{let{slots:a,triggerRef:o}=(0,v.use)(lS),[s,c]=(0,v.useState)(null);return rc({ref:o,onResize:(0,v.useCallback)(()=>{o.current&&c(o.current.offsetWidth+`px`)},[o])}),(0,G.jsx)(gh,{value:{variant:`default`},children:(0,G.jsx)(b_,{...i,className:K(t,a?.popover()),"data-slot":`autocomplete-popover`,placement:n,triggerRef:o,style:{"--trigger-width":s,...typeof r==`object`&&r?r:{}},children:e})})},Filter:({children:e,...t})=>(0,G.jsx)(Ate,{"data-slot":`autocomplete-filter`,...t,children:e}),ClearButton:({className:e,onClick:t,ref:n,...r})=>{let{clearButtonRef:i,isDisabled:a,onClear:o,slots:s}=(0,v.use)(lS),c=(0,v.use)(rS),l=Ns(v.useCallback(e=>{i.current=e},[i]),n),u=e=>{c?.selectionManager.setSelectedKeys(new Set),o?.(),t?.(e)},d=c?.selectionManager.selectedKeys.size===0;return(0,G.jsx)(Xc.button,{ref:l,"aria-hidden":d||void 0,"aria-label":`Clear selection`,className:s?.clearButton({className:e}),"data-empty":oh(d),"data-slot":`autocomplete-clear-button`,disabled:a??!1,tabIndex:-1,type:`button`,onClick:u,...r,children:(0,G.jsx)(dh,{"data-slot":`autocomplete-clear-button-icon`})})}});function pS(e,t,n){let{isSelected:r}=t,{isPressed:i,buttonProps:a}=Um({...e,onPress:_s(t.toggle,e.onPress)},n);return{isPressed:i,isSelected:r,isDisabled:e.isDisabled||!1,buttonProps:W(a,{"aria-pressed":r})}}function mS(e,t){let{"aria-label":n,"aria-labelledby":r,orientation:i=`horizontal`}=e,[a,o]=(0,v.useState)(!1);Xo(()=>{o(!!(t.current&&t.current.parentElement?.closest(`[role="toolbar"]`)))});let{direction:s}=bp(),c=s===`rtl`&&i===`horizontal`,l=ig(t),u=e=>{if(Ds(e.currentTarget,U(e))){if(i===`horizontal`&&e.key===`ArrowRight`||i===`vertical`&&e.key===`ArrowDown`)c?l.focusPrevious():l.focusNext();else if(i===`horizontal`&&e.key===`ArrowLeft`||i===`vertical`&&e.key===`ArrowUp`)c?l.focusNext():l.focusPrevious();else if(e.key===`Tab`){d.current=Os(),e.shiftKey?l.focusFirst():l.focusLast();return}else return;e.stopPropagation(),e.preventDefault()}},d=(0,v.useRef)(null),f=e=>{!Ds(e.currentTarget,e.relatedTarget)&&!d.current&&(d.current=U(e))},p=e=>{d.current&&!Ds(e.currentTarget,e.relatedTarget)&&Ds(t.current,U(e))&&(d.current?.focus(),d.current=null)};return{toolbarProps:{...Us(e,{labelable:!0}),role:a?`group`:`toolbar`,"aria-orientation":i,"aria-label":n,"aria-labelledby":n==null?r:void 0,onKeyDownCapture:a?void 0:u,onFocusCapture:a?void 0:p,onBlurCapture:a?void 0:f}}}function Dne(e,t,n){let{isDisabled:r}=e,{toolbarProps:i}=mS(e,n);return{groupProps:{...i,role:t.selectionMode===`single`?`radiogroup`:i.role,"aria-disabled":r}}}function One(e,t,n){let r={isSelected:t.selectedKeys.has(e.id),defaultSelected:!1,setSelected(n){t.setSelected(e.id,n)},toggle(){t.toggleKey(e.id)}},{isPressed:i,isSelected:a,isDisabled:o,buttonProps:s}=pS({...e,id:void 0,isDisabled:e.isDisabled||t.isDisabled},r,n);return t.selectionMode===`single`&&(s.role=`radio`,s[`aria-checked`]=r.isSelected,delete s[`aria-pressed`]),{isPressed:i,isSelected:a,isDisabled:o,buttonProps:s}}function kne(e){let{selectionMode:t=`single`,disallowEmptySelection:n,isDisabled:r=!1}=e,[i,a]=eh((0,v.useMemo)(()=>e.selectedKeys?new Set(e.selectedKeys):void 0,[e.selectedKeys]),(0,v.useMemo)(()=>e.defaultSelectedKeys?new Set(e.defaultSelectedKeys):new Set,[e.defaultSelectedKeys]),e.onSelectionChange);return{selectionMode:t,isDisabled:r,selectedKeys:i,setSelectedKeys:a,toggleKey(e){let r;t===`multiple`?(r=new Set(i),r.has(e)&&(!n||r.size>1)?r.delete(e):r.add(e)):r=new Set(i.has(e)&&!n?[]:[e]),a(r)},setSelected(e,t){t!==i.has(e)&&this.toggleKey(e)}}}var hS=(0,v.createContext)({}),gS=(0,v.createContext)(null),Ane=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,hS);let n=kne(e),{groupProps:r}=Dne(e,n,t),i=Jf({...e,values:{orientation:e.orientation||`horizontal`,isDisabled:n.isDisabled,state:n},defaultClassName:`react-aria-ToggleButtonGroup`}),a=Us(e,{global:!0});return v.createElement(np.div,{...W(a,i,r),ref:t,slot:e.slot||void 0,"data-orientation":e.orientation||`horizontal`,"data-disabled":e.isDisabled||void 0},v.createElement(gS.Provider,{value:n},v.createElement(zv,null,i.children)))});function _S(e={}){let{isReadOnly:t}=e,[n,r]=eh(e.isSelected,e.defaultSelected||!1,e.onChange),[i]=(0,v.useState)(n);function a(e){t||r(e)}function o(){t||r(!n)}return{isSelected:n,defaultSelected:e.defaultSelected??i,setSelected:a,toggle:o}}var jne=(0,v.createContext)({}),Mne=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,jne);let n=(0,v.useContext)(gS),r=_S(n&&e.id!=null?{isSelected:n.selectedKeys.has(e.id),onChange(t){n.setSelected(e.id,t)}}:e),{buttonProps:i,isPressed:a,isSelected:o,isDisabled:s}=n&&e.id!=null?One({...e,id:e.id},n,t):pS({...e,id:e.id==null?void 0:String(e.id)},r,t),{focusProps:c,isFocused:l,isFocusVisible:u}=Gm(e),{hoverProps:d,isHovered:f}=Zm({...e,isDisabled:s}),p=Jf({...e,id:void 0,values:{isHovered:f,isPressed:a,isFocused:l,isSelected:r.isSelected,isFocusVisible:u,isDisabled:s,state:r},defaultClassName:`react-aria-ToggleButton`}),m=Us(e,{global:!0});return delete m.id,delete m.onClick,v.createElement(np.button,{...W(m,p,i,c,d),ref:t,slot:e.slot||void 0,"data-focused":l||void 0,"data-disabled":s||void 0,"data-pressed":a||void 0,"data-selected":o||void 0,"data-hovered":f||void 0,"data-focus-visible":u||void 0},v.createElement(Bv.Provider,{value:{isSelected:o}},p.children))}),Nne=(0,v.createContext)({}),Pne=`__button_group_child`,vS=({children:e,className:t,fullWidth:n,isDisabled:r,isIconOnly:i,size:a,slot:o,style:s,variant:c,[Pne]:l,...u})=>{let d=(0,v.use)(Nne),f=l===!0,p=a??(f?d?.size:void 0),m=c??(f?d?.variant:void 0),h=r??(f?d?.isDisabled:void 0),g=af({fullWidth:n??(f?d?.fullWidth:void 0),isIconOnly:i,size:p,variant:m});return(0,G.jsx)($m,{className:K(t,g),"data-slot":`button`,isDisabled:h,slot:o,style:s,...u,children:t=>typeof e==`function`?e(t):e})},J=Object.assign(vS,{Root:vS}),yS=(0,v.createContext)({}),bS=({children:e,className:t,variant:n=`default`,...r})=>{let i=v.useMemo(()=>cf({variant:n}),[n]),a=(0,G.jsx)(Xc.div,{className:i.base({className:t}),"data-slot":`card`,...r,children:e});return(0,G.jsx)(yS,{value:{slots:i},children:n===`transparent`?a:(0,G.jsx)(gh,{value:{variant:n},children:a})})},xS=Object.assign(bS,{Root:bS,Header:({className:e,...t})=>{let{slots:n}=(0,v.use)(yS);return(0,G.jsx)(Xc.div,{className:q(n?.header,e),"data-slot":`card-header`,...t})},Title:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(yS);return(0,G.jsx)(Xc.h3,{className:q(r?.title,t),"data-slot":`card-title`,...n,children:e})},Description:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(yS);return(0,G.jsx)(Xc.p,{className:q(r?.description,t),"data-slot":`card-description`,...n,children:e})},Content:({className:e,...t})=>{let{slots:n}=(0,v.use)(yS);return(0,G.jsx)(Xc.div,{className:q(n?.content,e),"data-slot":`card-content`,...t})},Footer:({className:e,...t})=>{let{slots:n}=(0,v.use)(yS);return(0,G.jsx)(Xc.div,{className:q(n?.footer,e),"data-slot":`card-footer`,...t})}}),Fne=new WeakMap;function Ine(e=!0){let[t,n]=(0,v.useState)(e),r=(0,v.useRef)(!1),i=(0,v.useCallback)(e=>{r.current=!0,n(!!e)},[]);return Xo(()=>{r.current||n(!1)},[]),[i,t]}function SS(e=!0){let t=ms(),[n,r]=Ine(e);return{id:r?t:void 0,ref:n}}function CS(e,t,n){let{isDisabled:r=!1,isReadOnly:i=!1,value:a,name:o,form:s,children:c,isRequired:l,validationBehavior:u=`aria`,"aria-label":d,"aria-labelledby":f,"aria-describedby":p,onPressStart:m,onPressEnd:h,onPressChange:g,onPress:_,onPressUp:y,onClick:b}=e,x=ex({...e,value:t.isSelected}),{isInvalid:S,validationErrors:C,validationDetails:w}=x.displayValidation;tS(e,x,n);let T=e=>{e.stopPropagation(),t.setSelected(U(e).checked)},{pressProps:E,isPressed:D}=Fm({onPressStart:m,onPressEnd:h,onPressChange:g,onPress:_,onPressUp:y,onClick:b,isDisabled:r}),[O,k]=(0,v.useState)(!1),{pressProps:A}=Fm({onPressStart(e){if(e.pointerType===`keyboard`||e.pointerType===`virtual`){e.continuePropagation();return}m?.(e),g?.(!0),k(!0)},onPressEnd(e){if(e.pointerType===`keyboard`||e.pointerType===`virtual`){e.continuePropagation();return}h?.(e),g?.(!1),k(!1)},onPressUp(e){if(e.pointerType===`keyboard`||e.pointerType===`virtual`){e.continuePropagation();return}y?.(e)},onClick:b,onPress(r){if(r.pointerType===`keyboard`||r.pointerType===`virtual`){r.continuePropagation();return}_?.(r),t.toggle(),n.current?.focus();let{[$b]:i}=e,{commitValidation:a}=i||x;a()},isDisabled:r||i}),{focusableProps:j}=wm(e,n),M=W(E,j),N=Us(e,{labelable:!0});Cc(n,t.defaultSelected,t.setSelected);let P=SS(),F=SS();return{labelProps:W(A,{onClick:e=>e.preventDefault()}),inputProps:W(N,{checked:t.isSelected,"aria-required":l&&u===`aria`||void 0,required:l&&u===`native`,"aria-invalid":S||e.validationState===`invalid`||void 0,"aria-errormessage":e[`aria-errormessage`],"aria-controls":e[`aria-controls`],"aria-readonly":i||void 0,"aria-describedby":[P.id,F.id,p].filter(Boolean).join(` `)||void 0,onChange:T,disabled:r,...a==null?{}:{value:a},name:o,form:s,type:`checkbox`,...M}),descriptionProps:P,errorMessageProps:F,isSelected:t.isSelected,isPressed:D||O,isDisabled:r,isReadOnly:i,isInvalid:S||e.validationState===`invalid`,validationErrors:C,validationDetails:w}}function wS(e,t,n){let{labelProps:r,inputProps:i,descriptionProps:a,errorMessageProps:o,isSelected:s,isPressed:c,isDisabled:l,isReadOnly:u,isInvalid:d,validationErrors:f,validationDetails:p}=CS(e,t,n),{isIndeterminate:m}=e;return(0,v.useEffect)(()=>{n.current&&(n.current.indeterminate=!!m)}),{labelProps:W(r,(0,v.useMemo)(()=>({onMouseDown:e=>e.preventDefault()}),[])),inputProps:i,descriptionProps:a,errorMessageProps:o,isSelected:s,isPressed:c,isDisabled:l,isReadOnly:u,isInvalid:d,validationErrors:f,validationDetails:p}}function Lne(e,t,n){let r=_S({isReadOnly:e.isReadOnly||t.isReadOnly,isSelected:t.isSelected(e.value),defaultSelected:t.defaultValue.includes(e.value),onChange(n){n?t.addValue(e.value):t.removeValue(e.value),e.onChange&&e.onChange(n)}}),{name:i,form:a,descriptionId:o,errorMessageId:s,validationBehavior:c}=Fne.get(t);c=e.validationBehavior??c;let{realtimeValidation:l}=ex({...e,value:r.isSelected,name:void 0,validationBehavior:`aria`}),u=(0,v.useRef)(Zb),d=()=>{t.setInvalid(e.value,l.isInvalid?l:u.current)};(0,v.useEffect)(d);let f=t.realtimeValidation.isInvalid?t.realtimeValidation:l,p=c===`native`?t.displayValidation:f,m=wS({...e,isReadOnly:e.isReadOnly||t.isReadOnly,isDisabled:e.isDisabled||t.isDisabled,name:e.name||i,form:e.form||a,isRequired:e.isRequired??t.isRequired,validationBehavior:c,[$b]:{realtimeValidation:f,displayValidation:p,resetValidation:t.resetValidation,commitValidation:t.commitValidation,updateValidation(e){u.current=e,d()}}},r,n);return{...m,inputProps:{...m.inputProps,"aria-describedby":[m.inputProps[`aria-describedby`],t.isInvalid?s:null,o].filter(Boolean).join(` `)||void 0}}}var TS=(0,v.createContext)(null),ES=(0,v.createContext)(null),DS=(0,v.createContext)(null),OS=(0,v.createContext)(null),Rne=(0,v.forwardRef)(function(e,t){let{inputRef:n=null,...r}=e;[e,t]=Zf(r,t,ES);let i=(0,v.useContext)(DS),[a,o]=zne(e,n),{descriptionProps:s,errorMessageProps:c,isSelected:l,isDisabled:u,isReadOnly:d,isInvalid:f,validationDetails:p,validationErrors:m}=a,h=Jf({...e,defaultClassName:`react-aria-CheckboxField`,values:{isSelected:l,isIndeterminate:e.isIndeterminate||!1,isDisabled:u,isReadOnly:d,isInvalid:f,isRequired:e.isRequired||!1}}),g=Us(e,{global:!0});return delete g.id,delete g.onClick,v.createElement(np.div,{...W(g,h),ref:t,slot:e.slot||void 0,"data-selected":l||void 0,"data-indeterminate":e.isIndeterminate||void 0,"data-disabled":u||void 0,"data-readonly":d||void 0,"data-invalid":f||void 0,"data-required":e.isRequired||void 0},v.createElement(qf,{values:[[OS,{...a,inputRef:o,defaultClassName:`react-aria-CheckboxButton`,isIndeterminate:e.isIndeterminate,isRequired:e.isRequired}],[Hv,{slots:{description:s,errorMessage:c}}],[Jb,i?null:{isInvalid:f,validationDetails:p,validationErrors:m}]]},h.children))});function zne(e,t){let{validationBehavior:n}=Xf(ax)||{},r=e.validationBehavior??n??`native`,i=(0,v.useContext)(DS),a=Zs((0,v.useMemo)(()=>Ns(t,e.inputRef===void 0?null:e.inputRef),[t,e.inputRef])),o={...$f(e),children:typeof e.children==`function`||e.children,value:e.value,validationBehavior:r};return[i?Lne(o,i,a):wS(o,_S(e),a),a]}var Bne=(0,v.forwardRef)(function(e,t){let{labelProps:n,inputProps:r,isSelected:i,isDisabled:a,isReadOnly:o,isPressed:s,isInvalid:c,inputRef:l,defaultClassName:u,isIndeterminate:d,isRequired:f}=(0,v.useContext)(OS),{isFocused:p,isFocusVisible:m,focusProps:h}=Gm(),g=a||o,{hoverProps:_,isHovered:y}=Zm({...e,isDisabled:g}),b=Jf({...e,defaultClassName:u,values:{isSelected:i,isIndeterminate:d||!1,isPressed:s,isHovered:y,isFocused:p,isFocusVisible:m,isDisabled:a,isReadOnly:o,isInvalid:c,isRequired:f||!1}}),x=Us(e,{global:!0});return delete x.id,delete x.onClick,v.createElement(np.label,{...W(x,n,_,b),ref:t,slot:e.slot||void 0,"data-selected":i||void 0,"data-indeterminate":d||void 0,"data-pressed":s||void 0,"data-hovered":y||void 0,"data-focused":p||void 0,"data-focus-visible":m||void 0,"data-disabled":a||void 0,"data-readonly":o||void 0,"data-invalid":c||void 0,"data-required":f||void 0},v.createElement(u_,{elementType:`span`},v.createElement(`input`,{...W(r,h),ref:l})),b.children)}),Vne=(0,v.createContext)({}),kS=(0,v.createContext)({}),AS=({children:e,className:t,variant:n,...r})=>{let i=(0,v.use)(Vne),a=n??i.variant,o=v.useMemo(()=>lf({variant:a}),[a]);return(0,G.jsx)(Rne,{"data-slot":`checkbox`,...r,className:K(t,o.base()),children:t=>(0,G.jsx)(kS,{value:{slots:o,state:t},children:typeof e==`function`?e(t):e})})};AS.displayName=`HeroUI.Checkbox`;var jS=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(kS);return(0,G.jsx)(Bne,{"data-slot":`checkbox-content`,...n,className:K(t,r?.content()),children:e})};jS.displayName=`HeroUI.Checkbox.Content`;var MS=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(kS);return(0,G.jsx)(Xc.span,{className:q(r?.control,t),"data-slot":`checkbox-control`,...n,children:e})};MS.displayName=`HeroUI.Checkbox.Control`;var NS=({children:e,className:t,...n})=>{let{slots:r,state:i}=(0,v.use)(kS),a=i?.isSelected,o=i?.isIndeterminate,s=typeof e==`function`?e(i??{}):e||(o?(0,G.jsx)(`svg`,{"aria-hidden":`true`,"data-slot":`checkbox-default-indicator--indeterminate`,fill:`none`,role:`presentation`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:3,viewBox:`0 0 24 24`,children:(0,G.jsx)(`line`,{x1:`21`,x2:`3`,y1:`12`,y2:`12`})}):(0,G.jsx)(`svg`,{"aria-hidden":`true`,"data-slot":`checkbox-default-indicator--checkmark`,fill:`none`,role:`presentation`,stroke:`currentColor`,strokeDasharray:22,strokeDashoffset:a?44:66,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,viewBox:`0 0 17 18`,children:(0,G.jsx)(`polyline`,{points:`1 9 7 14 15 4`})}));return(0,G.jsx)(Xc.span,{"aria-hidden":`true`,className:q(r?.indicator,t),"data-slot":`checkbox-indicator`,...n,children:s})};NS.displayName=`HeroUI.Checkbox.Indicator`;var PS=Object.assign(AS,{Root:AS,Content:jS,Control:MS,Indicator:NS}),FS=(0,v.createContext)({}),IS=({children:e,className:t,color:n,size:r,variant:i,...a})=>{let o=v.useMemo(()=>uf({color:n,size:r,variant:i}),[n,r,i]),s=v.useMemo(()=>typeof e==`string`||typeof e==`number`?(0,G.jsx)(LS,{children:e}):e,[e]);return(0,G.jsx)(FS,{value:{slots:o},children:(0,G.jsx)(Xc.span,{...a,className:q(o.base,t),"data-slot":`chip`,children:s})})},LS=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(FS);return(0,G.jsx)(Xc.span,{className:q(r?.label,t),"data-slot":`chip-label`,...n,children:e})},RS=Object.assign(IS,{Root:IS,Label:LS});function Hne(e){let{onMoveStart:t,onMove:n,onMoveEnd:r}=e,i=(0,v.useRef)({didMove:!1,lastPosition:null,id:null}),{addGlobalListener:a,removeGlobalListener:o}=Ys(),s=$s((0,v.useCallback)((e,r,a,o)=>{(a!==0||o!==0)&&(i.current.didMove||(i.current.didMove=!0,t?.({type:`movestart`,pointerType:r,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey})),n?.({type:`move`,pointerType:r,deltaX:a,deltaY:o,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey}))},[t,n,i])),c=$s((0,v.useCallback)((e,t)=>{km(),i.current.didMove&&r?.({type:`moveend`,pointerType:t,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey})},[r,i]));return{moveProps:(0,v.useMemo)(()=>{let e={},t=()=>{Om(),i.current.didMove=!1};{let n=e=>{if(e.pointerId===i.current.id){let t=e.pointerType||`mouse`;s(e,t,e.pageX-(i.current.lastPosition?.pageX??0),e.pageY-(i.current.lastPosition?.pageY??0)),i.current.lastPosition={pageX:e.pageX,pageY:e.pageY}}},r=e=>{if(e.pointerId===i.current.id){let t=e.pointerType||`mouse`;c(e,t),i.current.id=null;let a=ys(U(e));o(a,`pointermove`,n,!1),o(a,`pointerup`,r,!1),o(a,`pointercancel`,r,!1)}};e.onPointerDown=e=>{if(e.button===0&&i.current.id==null){t(),e.stopPropagation(),e.preventDefault(),i.current.lastPosition={pageX:e.pageX,pageY:e.pageY},i.current.id=e.pointerId;let o=ys(U(e));a(o,`pointermove`,n,!1),a(o,`pointerup`,r,!1),a(o,`pointercancel`,r,!1)}}}let n=(e,n,r)=>{t(),s(e,`keyboard`,n,r),c(e,`keyboard`)};return e.onKeyDown=e=>{switch(e.key){case`Left`:case`ArrowLeft`:e.preventDefault(),e.stopPropagation(),n(e,-1,0);break;case`Right`:case`ArrowRight`:e.preventDefault(),e.stopPropagation(),n(e,1,0);break;case`Up`:case`ArrowUp`:e.preventDefault(),e.stopPropagation(),n(e,0,-1);break;case`Down`:case`ArrowDown`:e.preventDefault(),e.stopPropagation(),n(e,0,1)}},e},[a,o,i])}}var zS=(0,v.createContext)({}),Une=e=>{let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,...i}=e;return i},BS=ap(function(e,t){[e,t]=Zf(e,t,zS);let{hoverProps:n,isHovered:r}=Zm({...e,isDisabled:e.disabled}),{isFocused:i,isFocusVisible:a,focusProps:o}=Gm({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e[`aria-invalid`]&&e[`aria-invalid`]!==`false`,c=Jf({...e,values:{isHovered:r,isFocused:i,isFocusVisible:a,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:`react-aria-Input`});return v.createElement(np.input,{...W(Une(e),o,n),...c,ref:t,"data-focused":i||void 0,"data-disabled":e.disabled||void 0,"data-hovered":r||void 0,"data-focus-visible":a||void 0,"data-invalid":s||void 0})});function VS(e,t){let{inputElementType:n=`input`,isDisabled:r=!1,isRequired:i=!1,isReadOnly:a=!1,type:o=`text`,validationBehavior:s=`aria`}=e,[c,l]=eh(e.value,e.defaultValue||``,e.onChange),{focusableProps:u}=wm(e,t),d=ex({...e,value:c}),{isInvalid:f,validationErrors:p,validationDetails:m}=d.displayValidation,{labelProps:h,fieldProps:g,descriptionProps:_,errorMessageProps:y}=$x({...e,isInvalid:f,errorMessage:e.errorMessage||p}),b=Us(e,{labelable:!0}),x={type:o,pattern:e.pattern},[S]=(0,v.useState)(c);return Cc(t,e.defaultValue??S,l),tS(e,d,t),{labelProps:h,inputProps:W(b,n===`input`?x:void 0,{disabled:r,readOnly:a,required:i&&s===`native`,"aria-required":i&&s===`aria`||void 0,"aria-invalid":f||void 0,"aria-errormessage":e[`aria-errormessage`],"aria-activedescendant":e[`aria-activedescendant`],"aria-autocomplete":e[`aria-autocomplete`],"aria-haspopup":e[`aria-haspopup`],"aria-controls":e[`aria-controls`],value:c,onChange:e=>l(U(e).value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,form:e.form,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,enterKeyHint:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...u,...g}),descriptionProps:_,errorMessageProps:y,isInvalid:f,validationErrors:p,validationDetails:m}}function HS(){return typeof window<`u`&&window.InputEvent&&typeof InputEvent.prototype.getTargetRanges==`function`}function Wne(e,t,n){let r=$s(e=>{let r=n.current;if(!r)return;let i=null;switch(e.inputType){case`historyUndo`:case`historyRedo`:return;case`insertLineBreak`:return;case`deleteContent`:case`deleteByCut`:case`deleteByDrag`:i=r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case`deleteContentForward`:i=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd+1):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case`deleteContentBackward`:i=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart-1)+r.value.slice(r.selectionStart):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case`deleteSoftLineBackward`:case`deleteHardLineBackward`:i=r.value.slice(r.selectionStart);break;default:e.data!=null&&(i=r.value.slice(0,r.selectionStart)+e.data+r.value.slice(r.selectionEnd))}(i==null||!t.validate(i))&&e.preventDefault()});(0,v.useEffect)(()=>{if(!HS()||!n.current)return;let e=n.current;return e.addEventListener(`beforeinput`,r,!1),()=>{e.removeEventListener(`beforeinput`,r,!1)}},[n]);let i=HS()?null:e=>{let n=U(e).value.slice(0,U(e).selectionStart)+e.data+U(e).value.slice(U(e).selectionEnd);t.validate(n)||e.preventDefault()},{labelProps:a,inputProps:o,descriptionProps:s,errorMessageProps:c,...l}=VS(e,n),u=(0,v.useRef)(null);return{inputProps:W(o,{onBeforeInput:i,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:r}=n.current;u.current={value:e,selectionStart:t,selectionEnd:r}},onCompositionEnd(){if(n.current&&!t.validate(n.current.value)){let{value:e,selectionStart:r,selectionEnd:i}=u.current;n.current.value=e,n.current.setSelectionRange(r,i),t.setInputValue(e)}}}),labelProps:a,descriptionProps:s,errorMessageProps:c,...l}}function Gne(e,t){let{onScroll:n,isDisabled:r}=e,i=(0,v.useCallback)(e=>{e.ctrlKey||(e.preventDefault(),e.stopPropagation(),n&&n({deltaX:e.deltaX,deltaY:e.deltaY}))},[n]);_c(t,`wheel`,r?void 0:i)}var US={};US={Empty:`فارغ`};var WS={};WS={Empty:`Изпразни`};var GS={};GS={Empty:`Prázdné`};var KS={};KS={Empty:`Tom`};var qS={};qS={Empty:`Leer`};var JS={};JS={Empty:`Άδειο`};var YS={};YS={Empty:`Empty`};var XS={};XS={Empty:`Vacío`};var ZS={};ZS={Empty:`Tühjenda`};var QS={};QS={Empty:`Tyhjä`};var $S={};$S={Empty:`Vide`};var eC={};eC={Empty:`ריק`};var tC={};tC={Empty:`Prazno`};var nC={};nC={Empty:`Üres`};var rC={};rC={Empty:`Vuoto`};var iC={};iC={Empty:`空`};var aC={};aC={Empty:`비어 있음`};var oC={};oC={Empty:`Tuščias`};var sC={};sC={Empty:`Tukšs`};var cC={};cC={Empty:`Tom`};var lC={};lC={Empty:`Leeg`};var uC={};uC={Empty:`Pusty`};var dC={};dC={Empty:`Vazio`};var fC={};fC={Empty:`Vazio`};var pC={};pC={Empty:`Gol`};var mC={};mC={Empty:`Не заполнено`};var hC={};hC={Empty:`Prázdne`};var gC={};gC={Empty:`Prazen`};var _C={};_C={Empty:`Prazno`};var vC={};vC={Empty:`Tomt`};var yC={};yC={Empty:`Boş`};var bC={};bC={Empty:`Пусто`};var xC={};xC={Empty:`空`};var SC={};SC={Empty:`空白`};var CC={};CC={"ar-AE":US,"bg-BG":WS,"cs-CZ":GS,"da-DK":KS,"de-DE":qS,"el-GR":JS,"en-US":YS,"es-ES":XS,"et-EE":ZS,"fi-FI":QS,"fr-FR":$S,"he-IL":eC,"hr-HR":tC,"hu-HU":nC,"it-IT":rC,"ja-JP":iC,"ko-KR":aC,"lt-LT":oC,"lv-LV":sC,"nb-NO":cC,"nl-NL":lC,"pl-PL":uC,"pt-BR":dC,"pt-PT":fC,"ro-RO":pC,"ru-RU":mC,"sk-SK":hC,"sl-SI":gC,"sr-SP":_C,"sv-SE":vC,"tr-TR":yC,"uk-UA":bC,"zh-CN":xC,"zh-TW":SC};function wC(e){return e&&e.__esModule?e.default:e}var TC=()=>{};function EC(e){let t=(0,v.useRef)(void 0),{value:n,textValue:r,minValue:i,maxValue:a,isDisabled:o,isReadOnly:s,isRequired:c,onIncrement:l,onIncrementPage:u,onDecrement:d,onDecrementPage:f,onDecrementToMin:p,onIncrementToMax:m}=e,h=s_(wC(CC),`@react-aria/spinbutton`),g=(0,v.useRef)(!1),_=(0,v.useCallback)(()=>{clearTimeout(t.current),g.current=!1},[]),y=$s(()=>{_()});(0,v.useEffect)(()=>()=>y(),[]);let{keyboardProps:b}=Sm({isDisabled:o||s,shortcuts:{PageUp:()=>{if(u){u();return}if(l){l();return}return!1},ArrowUp:()=>{if(l){l();return}return!1},PageDown:()=>{if(f){f();return}if(d){d();return}return!1},ArrowDown:()=>{if(d){d();return}return!1},Home:()=>{if(p){p();return}return!1},End:()=>{if(m){m();return}return!1}},allowRepeats:!0}),x=(0,v.useRef)(!1),S=()=>{x.current=!0},C=()=>{x.current=!1},w=r===``?h.format(`Empty`):(r||`${n}`).replace(`-`,`−`);(0,v.useEffect)(()=>{x.current&&(Kp(`assertive`),Gp(w,`assertive`))},[w]);let T=(0,v.useCallback)(()=>{_()},[_]),E=$s(l??TC),D=$s(d??TC),O=$s(()=>{(a===void 0||isNaN(a)||n===void 0||isNaN(n)||n{y(),g.current=!0,t.current=window.setTimeout(O,e)}),A=$s(()=>{(i===void 0||isNaN(i)||n===void 0||isNaN(n)||n>i)&&(D(),j(60))}),j=$s(e=>{y(),g.current=!0,t.current=window.setTimeout(A,e)}),M=e=>{e.preventDefault()},{addGlobalListener:N,removeAllGlobalListeners:P}=Ys(),F=(0,v.useRef)(!1),[I,L]=(0,v.useState)(null);(0,v.useEffect)(()=>{I===`touch`?k(600):I?k(400):I||y()},[I]);let[R,z]=(0,v.useState)(null);return(0,v.useEffect)(()=>{R===`touch`?j(600):R?j(400):R||y()},[R]),{spinButtonProps:{role:`spinbutton`,"aria-valuenow":n!==void 0&&!isNaN(n)?n:void 0,"aria-valuetext":w,"aria-valuemin":i,"aria-valuemax":a,"aria-disabled":o||void 0,"aria-readonly":s||void 0,"aria-required":c||void 0,...b,onFocus:S,onBlur:C},incrementButtonProps:{onPressStart:e=>{_(),e.pointerType===`touch`?(N(window,`pointercancel`,T,{capture:!0}),F.current=!1,L(`touch`)):(l?.(),L(`mouse`)),N(window,`contextmenu`,M)},onPressUp:e=>{_(),e.pointerType===`touch`&&(F.current=!0),P(),L(null)},onPressEnd:e=>{_(),e.pointerType===`touch`&&!g.current&&F.current&&l?.(),F.current=!1,L(null)},onFocus:S,onBlur:C},decrementButtonProps:{onPressStart:e=>{_(),e.pointerType===`touch`?(N(window,`pointercancel`,T,{capture:!0}),F.current=!1,z(`touch`)):(d?.(),z(`mouse`))},onPressUp:e=>{_(),e.pointerType===`touch`&&(F.current=!0),P(),z(null)},onPressEnd:e=>{_(),e.pointerType===`touch`&&!g.current&&F.current&&d?.(),F.current=!1,z(null)},onFocus:S,onBlur:C}}}var DC={};DC={decrease:e=>`\u{62E}\u{641}\u{636} ${e.fieldLabel}`,increase:e=>`\u{632}\u{64A}\u{627}\u{62F}\u{629} ${e.fieldLabel}`,numberField:`حقل رقمي`};var OC={};OC={decrease:e=>`\u{41D}\u{430}\u{43C}\u{430}\u{43B}\u{44F}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{441}\u{438}\u{43B}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,numberField:`Номер на полето`};var kC={};kC={decrease:e=>`Sn\xed\u{17E}it ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}it ${e.fieldLabel}`,numberField:`Číselné pole`};var AC={};AC={decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`\xd8g ${e.fieldLabel}`,numberField:`Talfelt`};var jC={};jC={decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erh\xf6hen`,numberField:`Nummernfeld`};var MC={};MC={decrease:e=>`\u{39C}\u{3B5}\u{3AF}\u{3C9}\u{3C3}\u{3B7} ${e.fieldLabel}`,increase:e=>`\u{391}\u{3CD}\u{3BE}\u{3B7}\u{3C3}\u{3B7} ${e.fieldLabel}`,numberField:`Πεδίο αριθμού`};var NC={};NC={decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:`Number field`};var PC={};PC={decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:`Campo de número`};var FC={};FC={decrease:e=>`V\xe4henda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:`Numbri väli`};var IC={};IC={decrease:e=>`V\xe4henn\xe4 ${e.fieldLabel}`,increase:e=>`Lis\xe4\xe4 ${e.fieldLabel}`,numberField:`Numerokenttä`};var LC={};LC={decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:`Champ de nombre`};var RC={};RC={decrease:e=>`\u{5D4}\u{5E7}\u{5D8}\u{5DF} ${e.fieldLabel}`,increase:e=>`\u{5D4}\u{5D2}\u{5D3}\u{5DC} ${e.fieldLabel}`,numberField:`שדה מספר`};var zC={};zC={decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:`Polje broja`};var BC={};BC={decrease:e=>`${e.fieldLabel} cs\xf6kkent\xe9se`,increase:e=>`${e.fieldLabel} n\xf6vel\xe9se`,numberField:`Számmező`};var VC={};VC={decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:`Campo numero`};var HC={};HC={decrease:e=>`${e.fieldLabel}\u{3092}\u{7E2E}\u{5C0F}`,increase:e=>`${e.fieldLabel}\u{3092}\u{62E1}\u{5927}`,numberField:`数値フィールド`};var UC={};UC={decrease:e=>`${e.fieldLabel} \u{AC10}\u{C18C}`,increase:e=>`${e.fieldLabel} \u{C99D}\u{AC00}`,numberField:`번호 필드`};var WC={};WC={decrease:e=>`Suma\u{17E}inti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:`Numerio laukas`};var GC={};GC={decrease:e=>`Samazin\u{101}\u{161}ana ${e.fieldLabel}`,increase:e=>`Palielin\u{101}\u{161}ana ${e.fieldLabel}`,numberField:`Skaitļu lauks`};var KC={};KC={decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`\xd8k ${e.fieldLabel}`,numberField:`Tallfelt`};var qC={};qC={decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:`Getalveld`};var JC={};JC={decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwi\u{119}ksz ${e.fieldLabel}`,numberField:`Pole numeru`};var YC={};YC={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:`Campo de número`};var XC={};XC={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:`Campo numérico`};var ZC={};ZC={decrease:e=>`Sc\u{103}dere ${e.fieldLabel}`,increase:e=>`Cre\u{219}tere ${e.fieldLabel}`,numberField:`Câmp numeric`};var QC={};QC={decrease:e=>`\u{423}\u{43C}\u{435}\u{43D}\u{44C}\u{448}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{432}\u{435}\u{43B}\u{438}\u{447}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,numberField:`Числовое поле`};var $C={};$C={decrease:e=>`Zn\xed\u{17E}i\u{165} ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}i\u{165} ${e.fieldLabel}`,numberField:`Číselné pole`};var ew={};ew={decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Pove\u{10D}ajte ${e.fieldLabel}`,numberField:`Številčno polje`};var tw={};tw={decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:`Polje broja`};var nw={};nw={decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`\xd6ka ${e.fieldLabel}`,numberField:`Nummerfält`};var rw={};rw={decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} artt\u{131}r`,numberField:`Sayı alanı`};var iw={};iw={decrease:e=>`\u{417}\u{43C}\u{435}\u{43D}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,increase:e=>`\u{417}\u{431}\u{456}\u{43B}\u{44C}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,numberField:`Поле номера`};var aw={};aw={decrease:e=>`\u{964D}\u{4F4E} ${e.fieldLabel}`,increase:e=>`\u{63D0}\u{9AD8} ${e.fieldLabel}`,numberField:`数字字段`};var ow={};ow={decrease:e=>`\u{7E2E}\u{5C0F} ${e.fieldLabel}`,increase:e=>`\u{653E}\u{5927} ${e.fieldLabel}`,numberField:`數字欄位`};var sw={};sw={"ar-AE":DC,"bg-BG":OC,"cs-CZ":kC,"da-DK":AC,"de-DE":jC,"el-GR":MC,"en-US":NC,"es-ES":PC,"et-EE":FC,"fi-FI":IC,"fr-FR":LC,"he-IL":RC,"hr-HR":zC,"hu-HU":BC,"it-IT":VC,"ja-JP":HC,"ko-KR":UC,"lt-LT":WC,"lv-LV":GC,"nb-NO":KC,"nl-NL":qC,"pl-PL":JC,"pt-BR":YC,"pt-PT":XC,"ro-RO":ZC,"ru-RU":QC,"sk-SK":$C,"sl-SI":ew,"sr-SP":tw,"sv-SE":nw,"tr-TR":rw,"uk-UA":iw,"zh-CN":aw,"zh-TW":ow};function Kne(e){return e&&e.__esModule?e.default:e}function qne(e,t,n){let{id:r,decrementAriaLabel:i,incrementAriaLabel:a,isDisabled:o,isReadOnly:s,isRequired:c,minValue:l,maxValue:u,autoFocus:d,label:f,formatOptions:p,onBlur:m=()=>{},onFocus:h,onFocusChange:g,onKeyDown:_,onKeyUp:y,description:b,errorMessage:x,isWheelDisabled:S,...C}=e,{increment:w,incrementToMax:T,decrement:E,decrementToMin:D,numberValue:O,inputValue:k,commit:A,commitValidation:j}=t,M=s_(Kne(sw),`@react-aria/numberfield`),N=(0,v.useCallback)(()=>{let e=n.current?.value??``;(0,Ec.flushSync)(()=>{A()}),n.current?.value!==e&&Gp(n.current?.value??``,`assertive`)},[A,n]),P=ms(r),{focusProps:F}=vm({onBlur(){N()}}),I=Bp(p),L=(0,v.useMemo)(()=>I.resolvedOptions(),[I]),R=Bp({...p,currencySign:void 0}),{spinButtonProps:z,incrementButtonProps:B,decrementButtonProps:V}=EC({isDisabled:o,isReadOnly:s,isRequired:c,maxValue:u,minValue:l,onIncrement:w,onIncrementToMax:T,onDecrement:E,onDecrementToMin:D,value:O,textValue:(0,v.useMemo)(()=>isNaN(O)?``:R.format(O),[R,O])}),[H,ee]=(0,v.useState)(!1),{focusWithinProps:te}=Wm({isDisabled:o,onFocusWithinChange:ee});Gne({onScroll:(0,v.useCallback)(e=>{Math.abs(e.deltaY)<=Math.abs(e.deltaX)||(e.deltaY>0?w():e.deltaY<0&&E())},[E,w]),isDisabled:S||o||s||!H},n);let ne=(L.maximumFractionDigits??0)>0,re=t.minValue===void 0||isNaN(t.minValue)||t.minValue<0,ie=`numeric`;Oo()?re?ie=`text`:ne&&(ie=`decimal`):Po()&&(re?ie=`numeric`:ne&&(ie=`decimal`));let ae=e=>{t.validate(e)&&t.setInputValue(e)},oe=t=>{e.onPaste?.(t);let n=U(t);n&&(n.selectionEnd??-1)-(n.selectionStart??0)===n.value.length&&(t.preventDefault(),A(t.clipboardData?.getData?.(`text/plain`)?.trim()??``))},se=Us(e),{keyboardProps:ce}=Sm({isDisabled:o||s,shortcuts:{Enter:()=>((0,Ec.flushSync)(()=>{A()}),j(),{shouldPreventDefault:!1})},onKeyDown:_,onKeyUp:y}),{isInvalid:le,validationErrors:ue,validationDetails:de}=t.displayValidation,{labelProps:fe,inputProps:pe,descriptionProps:me,errorMessageProps:he}=Wne({...C,...se,name:void 0,form:void 0,label:f,autoFocus:d,isDisabled:o,isReadOnly:s,isRequired:c,validate:void 0,[$b]:t,value:k,defaultValue:`!`,autoComplete:`off`,"aria-label":e[`aria-label`]||void 0,"aria-labelledby":e[`aria-labelledby`]||void 0,id:P,type:`text`,inputMode:ie,onChange:ae,onBlur:m,onFocus:h,onFocusChange:g,onPaste:oe,description:b,errorMessage:x},t,n),ge=W(ce,pe);Cc(n,t.defaultNumberValue,t.setNumberValue),Jne(t,e.validationBehavior,e.commitBehavior,n,t.minValue,t.maxValue,e.step,t.numberValue);let _e=W(z,F,ge,{role:null,"aria-roledescription":Ao()?null:M.format(`numberField`),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:`off`,spellCheck:`false`});e.validationBehavior===`native`&&(_e[`aria-required`]=void 0);let ve=e=>{Os()!==n.current&&(e.pointerType===`mouse`?n.current?.focus():e.target.focus())},ye=e[`aria-label`]||(typeof e.label==`string`?e.label:``),be;ye||(be=e.label==null?e[`aria-labelledby`]:fe.id);let xe=ms(),Se=ms(),Ce=W(B,{"aria-label":a||M.format(`increase`,{fieldLabel:ye}).trim(),id:be&&!a?xe:null,"aria-labelledby":be&&!a?`${xe} ${be}`:null,"aria-controls":P,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:ve}),we=W(V,{"aria-label":i||M.format(`decrease`,{fieldLabel:ye}).trim(),id:be&&!i?Se:null,"aria-labelledby":be&&!i?`${Se} ${be}`:null,"aria-controls":P,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:ve});return{groupProps:{...te,role:`group`,"aria-disabled":o,"aria-invalid":le?`true`:void 0},labelProps:fe,inputProps:_e,incrementButtonProps:Ce,decrementButtonProps:we,errorMessageProps:he,descriptionProps:me,isInvalid:le,validationErrors:ue,validationDetails:de}}var cw=null;function Jne(e,t,n,r,i,a,o,s){Xo(()=>{let c=r.current;if(n!==`validate`||e.realtimeValidation.isInvalid||!c||c.disabled||(!cw&&typeof document<`u`&&(cw=document.createElement(`input`),cw.type=`number`),!cw))return;cw.min=i!=null&&!isNaN(i)?String(i):``,cw.max=a!=null&&!isNaN(a)?String(a):``,cw.step=o!=null&&!isNaN(o)?String(o):``,cw.value=s!=null&&!isNaN(s)?String(s):``;let l=c.validity.valid&&cw.validity.valid,u=c.validationMessage||cw.validationMessage,d={isInvalid:!l,validationErrors:u?[u]:[],validationDetails:{badInput:c.validity.badInput,customError:c.validity.customError,patternMismatch:c.validity.patternMismatch,rangeOverflow:cw.validity.rangeOverflow,rangeUnderflow:cw.validity.rangeUnderflow,stepMismatch:cw.validity.stepMismatch,tooLong:c.validity.tooLong,tooShort:c.validity.tooShort,typeMismatch:c.validity.typeMismatch,valueMissing:c.validity.valueMissing,valid:l}};e.updateValidation(d),t===`native`&&!cw.validity.valid&&c.setCustomValidity(cw.validationMessage)})}function Yne(e){let{minValue:t,maxValue:n,step:r,formatOptions:i,value:a,defaultValue:o=NaN,onChange:s,locale:c,isDisabled:l,isReadOnly:u,commitBehavior:d=`snap`}=e;a===null&&(a=NaN);let f=(0,v.useCallback)(e=>r===void 0||isNaN(r)?Uc(e,t,n):Gc(e,t,n,r),[r,t,n]);a!==void 0&&!isNaN(a)&&d===`snap`&&(a=f(a)),!isNaN(o)&&d===`snap`&&(o=f(o));let[p,m]=eh(a,isNaN(o)?NaN:o,s),[h]=(0,v.useState)(p),[g,_]=(0,v.useState)(()=>isNaN(p)?``:new Tp(c,i).format(p)),y=(0,v.useMemo)(()=>new Ap(c,i),[c,i]),b=(0,v.useMemo)(()=>y.getNumberingSystem(g),[y,g]),x=(0,v.useMemo)(()=>new Tp(c,{...i,numberingSystem:b}),[c,i,b]),S=(0,v.useMemo)(()=>x.resolvedOptions(),[x]),C=(0,v.useCallback)(e=>isNaN(e)||e===null?``:x.format(e),[x]),w=ex({...e,value:p}),T=r!==void 0&&!isNaN(r)?r:1;S.style===`percent`&&(r===void 0||isNaN(r))&&(T=.01);let[E,D]=(0,v.useState)(p),[O,k]=(0,v.useState)(c),[A,j]=(0,v.useState)(i);(!Object.is(p,E)||c!==O||!Xne(i,A))&&(_(C(p)),D(p),k(c),j(i));let M=(0,v.useMemo)(()=>y.parse(g),[y,g]),N=e=>{let t=e===void 0?g:e,n=M;if(e!==void 0&&(n=y.parse(t)),!t.length){m(NaN),_(a===void 0?``:C(p));return}if(isNaN(n)){_(C(p));return}let r=d===`snap`?f(n):n;r=y.parse(C(r));let i=r!==p;m(r),_(C(a===void 0?r:p)),i&&w.commitValidation()},P=(e,r=0)=>{let i=M;if(isNaN(i))return Gc(isNaN(r)?0:r,t,n,T);{let r=Gc(i,t,n,T);return e===`+`&&r>i||e===`-`&&r{let e=P(`+`,t);e===p&&_(C(e)),m(e),w.commitValidation()},I=()=>{let e=P(`-`,n);e===p&&_(C(e)),m(e),w.commitValidation()},L=()=>{n!=null&&(m(Gc(n,t,n,T)),w.commitValidation())},R=()=>{t!=null&&(m(t),w.commitValidation())},z=(0,v.useMemo)(()=>!l&&!u&&(isNaN(M)||n===void 0||isNaN(n)||Gc(M,t,n,T)>M||lw(`+`,M,T)<=n),[l,u,t,n,T,M]),B=(0,v.useMemo)(()=>!l&&!u&&(isNaN(M)||t===void 0||isNaN(t)||Gc(M,t,n,T)=t),[l,u,t,n,T,M]),V=e=>y.isValidPartialNumber(e,t,n);return{...w,validate:V,increment:F,incrementToMax:L,decrement:I,decrementToMin:R,canIncrement:z,canDecrement:B,minValue:t,maxValue:n,numberValue:M,defaultNumberValue:isNaN(o)?h:o,setNumberValue:m,setInputValue:_,inputValue:g,commit:N}}function Xne(e,t){if(e===t)return!0;if(!e||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(t[r]!==e[r])return!1;return!0}function lw(e,t,n){let r=e===`+`?t+n:t-n;if(t%1!=0||n%1!=0){let i=t.toString().split(`.`),a=n.toString().split(`.`),o=i[1]&&i[1].length||0,s=a[1]&&a[1].length||0,c=10**Math.max(o,s);t=Math.round(t*c),n=Math.round(n*c),r=e===`+`?t+n:t-n,r/=c}return r}var uw={blue:`\x1B[34m`,green:`\x1B[32m`,magenta:`\x1B[35m`,red:`\x1B[31m`,reset:`\x1B[0m`,yellow:`\x1B[33m`},Zne={debug:uw.magenta,error:uw.red,info:uw.blue,success:uw.green,warn:uw.yellow},Qne={debug:`🔍`,error:`❌`,info:`ℹ️`,success:`✅`,warn:`⚠️`},$ne=new class{constructor(e={}){this.enabled=e.enabled??!0,this.prefix=e.prefix??`HeroUI`}formatMessage(e,t){let n=Zne[e],r=Qne[e];return`${n}[${this.prefix}]${uw.reset} ${r} ${t}`}log(e,t,...n){if(!this.enabled)return;let r=this.formatMessage(e,t);switch(e){case`error`:console.error(r,...n);break;case`warn`:console.warn(r,...n);break;default:console.log(r,...n)}}info(e,...t){this.log(`info`,e,...t)}success(e,...t){this.log(`success`,e,...t)}warn(e,...t){this.log(`warn`,e,...t)}error(e,...t){this.log(`error`,e,...t)}debug(e,...t){this.log(`debug`,e,...t)}divider(e=`=`,t=80){this.enabled&&console.log(e.repeat(t))}newline(){this.enabled&&console.log()}}({prefix:`HeroUI`}),dw,ere=typeof process<`u`&&!1,fw=e=>{ere&&(dw??=new Set,dw.has(e)&&$ne.warn(`Duplicate collection slot "${e}". Use a unique, namespaced name (e.g. "tabs.listContainer", "menu.popover").`),dw.add(e));let t=`$$heroui.collection.${e}`,n=(0,v.createContext)(void 0),r=(e,n)=>v.Children.map(e,e=>(0,v.isValidElement)(e)?v.cloneElement(e,{[t]:n}):e),i=e=>{let{[t]:n,...r}=e;return[n,r]},a=e=>{let[t,r]=i(e),a=(0,v.useContext)(n);return[t??a,r]},o=({children:e,...t})=>(0,G.jsx)(n.Provider,{value:t,children:r(e,t)});return o.displayName=`HeroUI.CollectionSlot(${e})`,{key:t,inject:r,consume:i,useSlot:a,Injector:o,withSlot:(t,n)=>{let r=(0,v.forwardRef)(function(r,i){let[o,s]=a(r),{children:c,...l}=s;if(!o)return(0,G.jsx)(t,{...l,ref:i,children:c});if(n)return n({...l,children:c},o,i);let{className:u,render:d,...f}=o;return(0,G.jsx)(t,{...l,ref:i,children:d?d({children:c,className:u,...f}):(0,G.jsx)(`div`,{className:u,"data-slot":`${e}-container`,...f,children:c})})});return r.displayName=`HeroUI.withCollectionSlot(${t.displayName||t.name||e})`,r},Context:n}},tre=(0,v.createContext)({});fw(`combo-box.inputGroup`);function pw(e,t){return e-t*Math.floor(e/t)}var nre=1721426;function mw(e,t,n,r){t=gw(e,t);let i=t-1,a=-2;return n<=2?a=0:hw(t)&&(a=-1),1721425+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+r)}function hw(e){return e%4==0&&(e%100!=0||e%400==0)}function gw(e,t){return e===`BC`?1-t:t}function _w(e){let t=`AD`;return e<=0&&(t=`BC`,e=1-e),[t,e]}var rre={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]},vw=class{fromJulianDay(e){let t=e,n=t-nre,r=Math.floor(n/146097),i=pw(n,146097),a=Math.floor(i/36524),o=pw(i,36524),s=Math.floor(o/1461),c=pw(o,1461),l=Math.floor(c/365),[u,d]=_w(r*400+a*100+s*4+l+ +(a!==4&&l!==4)),f=t-mw(u,d,1,1),p=2;t=0?e:t:e||t}function zw(e){return e=Zw(e,new vw),Bw(gw(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Bw(e,t,n,r,i,a,o){let s=new Date;return s.setUTCHours(r,i,a,o),s.setUTCFullYear(e,t-1,n),s.getTime()}function Vw(e,t){if(t===`UTC`)return 0;if(e>0&&t===kw()&&!Aw())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:r,day:i,hour:a,minute:o,second:s}=Uw(e,t);return Bw(n,r,i,a,o,s,0)-Math.floor(e/1e3)*1e3}var Hw=new Map;function Uw(e,t){let n=Hw.get(t);n||(n=new Intl.DateTimeFormat(`en-US`,{timeZone:t,hour12:!1,era:`short`,year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`}),Hw.set(t,n));let r=n.formatToParts(new Date(e)),i={};for(let e of r)e.type!==`literal`&&(i[e.type]=e.value);return{year:i.era===`BC`||i.era===`B`?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour===`24`?0:+i.hour,minute:+i.minute,second:+i.second}}var Ww=864e5;function mre(e,t,n,r){return(n===r?[n]:[n,r]).filter(n=>hre(e,t,n))}function hre(e,t,n){let r=Uw(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}function Gw(e,t,n=`compatible`){let r=Yw(e);if(t===`UTC`)return zw(r);if(t===kw()&&n===`compatible`&&!Aw()){r=Zw(r,new vw);let e=new Date,t=gw(r.era,r.year);return e.setFullYear(t,r.month-1,r.day),e.setHours(r.hour,r.minute,r.second,r.millisecond),e.getTime()}let i=zw(r),a=Vw(i-Ww,t),o=Vw(i+Ww,t),s=mre(r,t,i-a,i-o);if(s.length===1)return s[0];if(s.length>1)switch(n){case`compatible`:case`earlier`:return s[0];case`later`:return s[s.length-1];case`reject`:throw RangeError(`Multiple possible absolute times found`)}switch(n){case`earlier`:return Math.min(i-a,i-o);case`compatible`:case`later`:return Math.max(i-a,i-o);case`reject`:throw RangeError(`No such absolute time found`)}}function Kw(e,t,n=`compatible`){return new Date(Gw(e,t,n))}function qw(e,t){let n=Vw(e,t),r=new Date(e+n),i=r.getUTCFullYear(),a=r.getUTCMonth()+1,o=r.getUTCDate(),s=r.getUTCHours(),c=r.getUTCMinutes(),l=r.getUTCSeconds(),u=r.getUTCMilliseconds();return new DT(i<1?`BC`:`AD`,i<1?-i+1:i,a,o,t,n,s,c,l,u)}function Jw(e){return new wT(e.calendar,e.era,e.year,e.month,e.day)}function Yw(e,t){let n=0,r=0,i=0,a=0;if(`timeZone`in e)({hour:n,minute:r,second:i,millisecond:a}=e);else if(`hour`in e&&!t)return e;return t&&({hour:n,minute:r,second:i,millisecond:a}=t),new ET(e.calendar,e.era,e.year,e.month,e.day,n,r,i,a)}function Xw(e){return new TT(e.hour,e.minute,e.second,e.millisecond)}function Zw(e,t){if(bw(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,aT(r),r}function Qw(e,t,n){return e instanceof DT?e.timeZone===t?e:$w(e,t):qw(Gw(e,t,n),t)}function gre(e){let t=zw(e)-e.offset;return new Date(t)}function $w(e,t){return Zw(qw(zw(e)-e.offset,t),e.calendar)}function _re(e){return $w(e,kw())}var eT=36e5;function tT(e,t){let n=e.copy(),r=`hour`in n?fT(n,t):0;nT(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,rT(n),iT(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=r,vre(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){let e=n.calendar.isInverseEra?.(n);n.year=i,n.month=e?1:n.calendar.getMonthsInYear(n),n.day=e?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let a=n.calendar.getMonthsInYear(n);return n.month>a&&(n.month=a,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function nT(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function rT(e){for(;e.month<1;)nT(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,nT(e,1)}function vre(e){for(;e.day<1;)e.month--,rT(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,rT(e)}function iT(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function aT(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),iT(e)}function oT(e){let t={};for(let n in e)typeof e[n]==`number`&&(t[n]=-e[n]);return t}function sT(e,t){return tT(e,oT(t))}function cT(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),aT(n),n}function lT(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),uT(n),n}function yre(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=dT(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=dT(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=dT(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=dT(e.hour,24),t}function uT(e){e.millisecond=Math.max(0,Math.min(e.millisecond,999)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function dT(e,t){let n=e%t;return n<0&&(n+=t),n}function fT(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,yre(e)}function pT(e,t){let n=e.copy();return fT(n,t),n}function bre(e,t){return pT(e,oT(t))}function mT(e,t,n,r){let i=e.copy();switch(t){case`era`:{let t=e.calendar.getEras(),a=t.indexOf(e.era);if(a<0)throw Error(`Invalid era: `+e.era);a=gT(a,n,0,t.length-1,r?.round),i.era=t[a],aT(i);break}case`year`:i.calendar.isInverseEra?.(i)&&(n=-n),i.year=gT(e.year,n,-1/0,9999,r?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case`month`:i.month=gT(e.month,n,1,e.calendar.getMonthsInYear(e),r?.round);break;case`day`:i.day=gT(e.day,n,1,e.calendar.getDaysInMonth(e),r?.round);break;default:throw Error(`Unsupported field `+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),aT(i),i}function hT(e,t,n,r){let i=e.copy();switch(t){case`hour`:{let t=e.hour,a=0,o=23;if(r?.hourCycle===12){let e=t>=12;a=e?12:0,o=e?23:11}i.hour=gT(t,n,a,o,r?.round);break}case`minute`:i.minute=gT(e.minute,n,0,59,r?.round);break;case`second`:i.second=gT(e.second,n,0,59,r?.round);break;case`millisecond`:i.millisecond=gT(e.millisecond,n,0,999,r?.round);break;default:throw Error(`Unsupported field `+t)}return i}function gT(e,t,n,r,i=!1){if(i){e+=Math.sign(t),e0?Math.ceil(e/i)*i:Math.floor(e/i)*i,e>r&&(e=n)}else e+=t,er&&(e=n+(e-r-1));return e}function _T(e,t){let n;return n=t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0?Gw(tT(Yw(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):zw(e)-e.offset,n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5,Zw(qw(n,e.timeZone),e.calendar)}function xre(e,t){return _T(e,oT(t))}function Sre(e,t,n,r){switch(t){case`hour`:{let t=0,i=23;if(r?.hourCycle===12){let n=e.hour>=12;t=n?12:0,i=n?23:11}let a=Yw(e),o=Zw(lT(a,{hour:t}),new vw),s=[Gw(o,e.timeZone,`earlier`),Gw(o,e.timeZone,`later`)].filter(t=>qw(t,e.timeZone).day===o.day)[0],c=Zw(lT(a,{hour:i}),new vw),l=[Gw(c,e.timeZone,`earlier`),Gw(c,e.timeZone,`later`)].filter(t=>qw(t,e.timeZone).day===c.day).pop(),u=zw(e)-e.offset,d=Math.floor(u/eT),f=u%eT;return u=gT(d,n,Math.floor(s/eT),Math.floor(l/eT),r?.round)*eT+f,Zw(qw(u,e.timeZone),e.calendar)}case`minute`:case`second`:case`millisecond`:return hT(e,t,n,r);case`era`:case`year`:case`month`:case`day`:return Zw(qw(Gw(mT(Yw(e),t,n,r),e.timeZone),e.timeZone),e.calendar);default:throw Error(`Unsupported field `+t)}}function Cre(e,t,n){let r=Yw(e),i=lT(cT(r,t),t);return i.compare(r)===0?e:Zw(qw(Gw(i,e.timeZone,n),e.timeZone),e.calendar)}var wre=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,Tre=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,vT=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function Ere(e){let t=e.match(wre);if(!t)throw vT.test(e)?Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):Error(`Invalid ISO 8601 date string: `+e);let n=new wT(yT(t[1],0,9999),yT(t[2],1,12),1);return n.day=yT(t[3],1,n.calendar.getDaysInMonth(n)),n}function Dre(e){let t=e.match(Tre);if(!t)throw vT.test(e)?Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`):Error(`Invalid ISO 8601 date time string: `+e);let n=yT(t[1],-9999,9999),r=new ET(n<1?`BC`:`AD`,n<1?-n+1:n,yT(t[2],1,12),1,t[4]?yT(t[4],0,23):0,t[5]?yT(t[5],0,59):0,t[6]?yT(t[6],0,59):0,t[7]?yT(t[7],0,1/0)*1e3:0);return r.day=yT(t[3],0,r.calendar.getDaysInMonth(r)),r}function Ore(e,t){let n=e.match(vT);if(!n)throw Error(`Invalid ISO 8601 date time string: `+e);let r=yT(n[1],-9999,9999),i=new DT(r<1?`BC`:`AD`,r<1?-r+1:r,yT(n[2],1,12),1,t,0,n[4]?yT(n[4],0,23):0,n[5]?yT(n[5],0,59):0,n[6]?yT(n[6],0,59):0,n[7]?yT(n[7],0,1/0)*1e3:0);return i.day=yT(n[3],0,i.calendar.getDaysInMonth(i)),n[8]&&(i.offset=yT(n[8],-23,23)*36e5+yT(n[9]??`0`,0,59)*6e4),$w(i,t)}function kre(e){return Ore(e,kw())}function yT(e,t,n){let r=Number(e);if(rn)throw RangeError(`Value out of range: ${t} <= ${r} <= ${n}`);return r}function bT(e){return`${String(e.hour).padStart(2,`0`)}:${String(e.minute).padStart(2,`0`)}:${String(e.second).padStart(2,`0`)}${e.millisecond?String(e.millisecond/1e3).slice(1):``}`}function xT(e){let t=Zw(e,new vw),n;return n=t.era===`BC`?t.year===1?`0000`:`-`+String(Math.abs(1-t.year)).padStart(6,`00`):String(t.year).padStart(4,`0`),`${n}-${String(t.month).padStart(2,`0`)}-${String(t.day).padStart(2,`0`)}`}function ST(e){return`${xT(e)}T${bT(e)}`}function Are(e){let t=Math.sign(e)<0?`-`:`+`;e=Math.abs(e);let n=Math.floor(e/36e5),r=Math.floor(e%36e5/6e4),i=Math.floor(e%36e5%6e4/1e3),a=`${t}${String(n).padStart(2,`0`)}:${String(r).padStart(2,`0`)}`;return i!==0&&(a+=`:${String(i).padStart(2,`0`)}`),a}function jre(e){return`${ST(e)}${Are(e.offset)}[${e.timeZone}]`}function CT(e){let t=typeof e[0]==`object`?e.shift():new vw,n;if(typeof e[0]==`string`)n=e.shift();else{let e=t.getEras();n=e[e.length-1]}let r=e.shift(),i=e.shift(),a=e.shift();return[t,n,r,i,a]}var wT=class e{constructor(...e){let[t,n,r,i,a]=CT(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,aT(this)}copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day):new e(this.calendar,this.year,this.month,this.day)}add(e){return tT(this,e)}subtract(e){return sT(this,e)}set(e){return cT(this,e)}cycle(e,t,n){return mT(this,e,t,n)}toDate(e){return Kw(this,e)}toString(){return xT(this)}compare(e){return Tw(this,e)}},TT=class e{constructor(e=0,t=0,n=0,r=0){this.hour=e,this.minute=t,this.second=n,this.millisecond=r,uT(this)}copy(){return new e(this.hour,this.minute,this.second,this.millisecond)}add(e){return pT(this,e)}subtract(e){return bre(this,e)}set(e){return lT(this,e)}cycle(e,t,n){return hT(this,e,t,n)}toString(){return bT(this)}compare(e){return Ew(this,e)}},ET=class e{constructor(...e){let[t,n,r,i,a]=CT(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,aT(this)}copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return tT(this,e)}subtract(e){return sT(this,e)}set(e){return cT(lT(this,e),e)}cycle(e,t,n){switch(e){case`era`:case`year`:case`month`:case`day`:return mT(this,e,t,n);default:return hT(this,e,t,n)}}toDate(e,t){return Kw(this,e,t)}toString(){return ST(this)}compare(e){let t=Tw(this,e);return t===0?Ew(this,Yw(e)):t}},DT=class e{constructor(...e){let[t,n,r,i,a]=CT(e),o=e.shift(),s=e.shift();this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.timeZone=o,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,aT(this)}copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return _T(this,e)}subtract(e){return xre(this,e)}set(e,t){return Cre(this,e,t)}cycle(e,t,n){return Sre(this,e,t,n)}toDate(){return gre(this)}toString(){return jre(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-Qw(e,this.timeZone).toDate().getTime()}},OT=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],Mre=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],kT=[1867,1911,1925,1988,2018],AT=[`meiji`,`taisho`,`showa`,`heisei`,`reiwa`];function jT(e){let t=OT.findIndex(([t,n,r])=>e.year=0){let[,n,r]=OT[t];e.month=Math.max(n,e.month),e.month===n&&(e.day=Math.max(r,e.day))}}getEras(){return AT}getYearsInEra(e){let t=AT.indexOf(e.era),n=OT[t],r=OT[t+1];if(r==null)return 9999-n[0]+1;let i=r[0]-n[0];return(e.month0?[`minguo`,t]:[`before_minguo`,1-t]}var Fre=class extends vw{fromJulianDay(e){let t=super.fromJulianDay(e),[n,r]=RT(gw(t.era,t.year));return new wT(this,n,r,t.month,t.day)}toJulianDay(e){return super.toJulianDay(zT(e))}getEras(){return[`before_minguo`,`minguo`]}balanceDate(e){let[t,n]=RT(LT(e));e.era=t,e.year=n}isInverseEra(e){return e.era===`before_minguo`}getDaysInMonth(e){return super.getDaysInMonth(zT(e))}getYearsInEra(e){return e.era===`before_minguo`?9999:8088}constructor(...e){super(...e),this.identifier=`roc`}};function zT(e){let[t,n]=_w(LT(e));return new wT(t,n,e.month,e.day)}var Ire=1948320,BT=[0,31,62,93,124,155,186,216,246,276,306,336],Lre=class{fromJulianDay(e){let t=e-Ire,n=1+Math.floor((33*t+3)/12053),r=t-(365*(n-1)+Math.floor((8*n+21)/33)),i=Math.floor(r<216?r/31:(r-6)/30),a=r-BT[i]+1;return new wT(this,n,i+1,a)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=BT[e.month-1],t+=e.day,t}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||pw(25*e.year+11,33)<8?30:29}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getEras(){return[`AP`]}getYearsInEra(){return 9377}constructor(){this.identifier=`persian`}},VT=78,HT=80,Rre=class extends vw{fromJulianDay(e){let t=super.fromJulianDay(e),n=t.year-VT,r=e-mw(t.era,t.year,1,1),i;r=8&&(i+=(e.month-7)*30),i+=e.day-1,i)}getDaysInMonth(e){return e.month===1&&hw(e.year+VT)||e.month>=2&&e.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return[`saka`]}balanceDate(){}constructor(...e){super(...e),this.identifier=`indian`}},UT=1948440,WT=1948439,GT=1300,KT=1600,zre=460322;function qT(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function JT(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),i=Math.min(12,Math.ceil((n-(29+qT(t,r,1,1)))/29.5)+1);return new wT(e,r,i,n-qT(t,r,i,1)+1)}function YT(e){return(14+11*e)%30<11}var XT=class{fromJulianDay(e){return JT(this,UT,e)}toJulianDay(e){return qT(UT,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return e.month===12&&YT(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return YT(e.year)?355:354}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9665}getEras(){return[`AH`]}constructor(){this.identifier=`islamic-civil`}},Bre=class extends XT{fromJulianDay(e){return JT(this,WT,e)}toJulianDay(e){return qT(WT,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier=`islamic-tbla`}},Vre=`qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=`,ZT,QT;function $T(e){return zre+QT[e-GT]}function eE(e,t){let n=e-GT,r=1<<11-(t-1);return(ZT[n]&r)===0?29:30}function tE(e,t){let n=$T(e);for(let r=1;re.charCodeAt(0)).buffer),!QT){QT=new Uint32Array(301);let e=0;for(let t=GT;t<=KT;t++){QT[t-GT]=e;for(let n=1;n<=12;n++)e+=eE(t,n)}}}fromJulianDay(e){let t=e-UT,n=$T(GT),r=$T(KT);if(tr)return super.fromJulianDay(e);{let e=1299,n=1,r=1;for(;r>0;){e++,r=t-$T(e)+1;let i=nE(e);if(r===i){n=12;break}if(rt;)r-=t,n++,t=eE(e,n);break}}return new wT(this,e,n,t-tE(e,n)+1)}}toJulianDay(e){return e.yearKT?super.toJulianDay(e):UT+tE(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.yearKT?super.getDaysInMonth(e):eE(e.year,e.month)}getDaysInYear(e){return e.yearKT?super.getDaysInYear(e):nE(e.year)}},rE=347997,Ure=25920,Wre=765433;function iE(e){return pw(e*7+1,19)<7}function aE(e){let t=Math.floor((235*e-234)/19),n=12084+13753*t,r=t*29+Math.floor(n/25920);return pw(3*(r+1),7)<3&&(r+=1),r}function Gre(e){let t=aE(e-1),n=aE(e);return aE(e+1)-n===356?2:+(n-t===382)}function oE(e){return aE(e)+Gre(e)}function sE(e){return oE(e+1)-oE(e)}function Kre(e){let t=sE(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}function cE(e,t){if(t>=6&&!iE(e)&&t++,t===4||t===7||t===9||t===11||t===13)return 29;let n=Kre(e);return t===2?n===2?30:29:t===3?n===0?29:30:t===6?iE(e)?30:0:30}var qre=class{fromJulianDay(e){let t=e-rE,n=t*Ure/Wre,r=Math.floor((19*n+234)/235)+1,i=oE(r),a=Math.floor(t-i);for(;a<1;)r--,i=oE(r),a=Math.floor(t-i);let o=1,s=0;for(;s6?e.month--:!iE(t.year)&&iE(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier=`hebrew`}},lE=1723856,uE=1824665,dE=5500;function fE(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function pE(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-fE(e,n,1,1))/30);return[n,r,t+1-fE(e,n,r,1)]}function mE(e){return Math.floor(e%4/3)}function hE(e,t){return t%13==0?mE(e)+5:30}var gE=class{fromJulianDay(e){let[t,n,r]=pE(lE,e),i=`AM`;return t<=0&&(i=`AA`,t+=dE),new wT(this,i,t,n,r)}toJulianDay(e){let t=e.year;return e.era===`AA`&&(t-=dE),fE(lE,t,e.month,e.day)}getDaysInMonth(e){return hE(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+mE(e.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(e){return e.era===`AA`?9999:9991}getEras(){return[`AA`,`AM`]}constructor(){this.identifier=`ethiopic`}},Jre=class extends gE{fromJulianDay(e){let[t,n,r]=pE(lE,e);return t+=dE,new wT(this,`AA`,t,n,r)}getEras(){return[`AA`]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier=`ethioaa`}},Yre=class extends gE{fromJulianDay(e){let[t,n,r]=pE(uE,e),i=`CE`;return t<=0&&(i=`BCE`,t=1-t),new wT(this,i,t,n,r)}toJulianDay(e){let t=e.year;return e.era===`BCE`&&(t=1-t),fE(uE,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return e.era===`BCE`&&(t=1-t),hE(t,e.month)}isInverseEra(e){return e.era===`BCE`}balanceDate(e){e.year<=0&&(e.era=e.era===`BCE`?`CE`:`BCE`,e.year=1-e.year)}getEras(){return[`BCE`,`CE`]}getYearsInEra(e){return e.era===`BCE`?9999:9715}constructor(...e){super(...e),this.identifier=`coptic`}};function _E(e){switch(e){case`buddhist`:return new Pre;case`ethiopic`:return new gE;case`ethioaa`:return new Jre;case`coptic`:return new Yre;case`hebrew`:return new qre;case`indian`:return new Rre;case`islamic-civil`:return new XT;case`islamic-tbla`:return new Bre;case`islamic-umalqura`:return new Hre;case`japanese`:return new Nre;case`persian`:return new Lre;case`roc`:return new Fre;default:return new vw}}var vE=new Map,yE=class{constructor(e,t={}){this.formatter=bE(e,t),this.options=t}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if(typeof this.formatter.formatRange==`function`)return this.formatter.formatRange(e,t);if(t= start date`);return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(t)}`}formatRangeToParts(e,t){if(typeof this.formatter.formatRangeToParts==`function`)return this.formatter.formatRangeToParts(e,t);if(t= start date`);let n=this.formatter.formatToParts(e),r=this.formatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return Qre()&&(this.resolvedHourCycle||=$re(e.locale,this.options),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle===`h11`||this.resolvedHourCycle===`h12`),e.calendar===`ethiopic-amete-alem`&&(e.calendar=`ethioaa`),e}},Xre={true:{ja:`h11`},false:{}};function bE(e,t={}){if(typeof t.hour12==`boolean`&&Zre()){t={...t};let n=Xre[String(t.hour12)][e.split(`-`)[0]],r=t.hour12?`h12`:`h23`;t.hourCycle=n??r,delete t.hour12}let n=e+(t?Object.entries(t).sort((e,t)=>e[0]e.type===`hour`).value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(e=>e.type===`hour`).value,10);if(r===0&&i===23)return`h23`;if(r===24&&i===23)return`h24`;if(r===0&&i===11)return`h11`;if(r===12&&i===11)return`h12`;throw Error(`Unexpected hour cycle result`)}var eie=[`day`,`month`,`year`],tie={hour:1,minute:2,second:3};function nie(e,t){let{autoComplete:n,isDisabled:r,name:i}=e,{visuallyHiddenProps:a}=l_({style:{position:`fixed`,top:0,left:0}}),o=60;t.granularity===`second`?o=1:t.granularity===`hour`&&(o=3600);let s=``;t.value&&(s=t.granularity===`day`?Jw(t.value).toString():Yw(`timeZone`in t.value?_re(t.value):t.value).toString());let c=t.granularity===`day`?`date`:`datetime-local`,l=[`hour`,`minute`,`second`],u=0;return l.includes(t.granularity)&&(u=tie[t.granularity],l=l.slice(0,u)),{containerProps:{...a,"aria-hidden":!0,"data-react-aria-prevent-focus":!0,"data-a11y-ignore":`aria-hidden-focus`},inputProps:{tabIndex:-1,autoComplete:n,disabled:r,type:c,form:``,name:i,step:o,value:s,onChange:e=>{let n=U(e).value.toString();if(n)try{let e=Dre(n);if(t.granularity===`day`&&(e=Ere(n)),`setSegment`in t)for(let n in e)eie.includes(n)&&t.setSegment(n,e[n]),l.includes(n)&&t.setSegment(n,e[n]);t.setValue(e)}catch{}}}}}function rie(e){let{state:t}=e,{containerProps:n,inputProps:r}=nie({...e},t);return v.createElement(`div`,{...n,"data-testid":`hidden-dateinput-container`},v.createElement(`input`,r))}var CE={};CE={calendar:`التقويم`,day:`يوم`,dayPeriod:`ص/م`,endDate:`تاريخ الانتهاء`,era:`العصر`,hour:`الساعات`,minute:`الدقائق`,month:`الشهر`,second:`الثواني`,selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,selectedTimeDescription:e=>`\u{627}\u{644}\u{648}\u{642}\u{62A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.time}`,startDate:`تاريخ البدء`,timeZoneName:`التوقيت`,weekday:`اليوم`,year:`السنة`};var wE={};wE={calendar:`Календар`,day:`ден`,dayPeriod:`пр.об./сл.об.`,endDate:`Крайна дата`,era:`ера`,hour:`час`,minute:`минута`,month:`месец`,second:`секунда`,selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{434}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{432}\u{440}\u{435}\u{43C}\u{435}: ${e.time}`,startDate:`Начална дата`,timeZoneName:`часова зона`,weekday:`ден от седмицата`,year:`година`};var TE={};TE={calendar:`Kalendář`,day:`den`,dayPeriod:`část dne`,endDate:`Konečné datum`,era:`letopočet`,hour:`hodina`,minute:`minuta`,month:`měsíc`,second:`sekunda`,selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.startDate} a\u{17E} ${e.endDate}`,selectedTimeDescription:e=>`Vybran\xfd \u{10D}as: ${e.time}`,startDate:`Počáteční datum`,timeZoneName:`časové pásmo`,weekday:`den v týdnu`,year:`rok`};var EE={};EE={calendar:`Kalender`,day:`dag`,dayPeriod:`AM/PM`,endDate:`Slutdato`,era:`æra`,hour:`time`,minute:`minut`,month:`måned`,second:`sekund`,selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tidspunkt: ${e.time}`,startDate:`Startdato`,timeZoneName:`tidszone`,weekday:`ugedag`,year:`år`};var DE={};DE={calendar:`Kalender`,day:`Tag`,dayPeriod:`Tageshälfte`,endDate:`Enddatum`,era:`Epoche`,hour:`Stunde`,minute:`Minute`,month:`Monat`,second:`Sekunde`,selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.startDate} bis ${e.endDate}`,selectedTimeDescription:e=>`Ausgew\xe4hlte Zeit: ${e.time}`,startDate:`Startdatum`,timeZoneName:`Zeitzone`,weekday:`Wochentag`,year:`Jahr`};var OE={};OE={calendar:`Ημερολόγιο`,day:`ημέρα`,dayPeriod:`π.μ./μ.μ.`,endDate:`Ημερομηνία λήξης`,era:`περίοδος`,hour:`ώρα`,minute:`λεπτό`,month:`μήνας`,second:`δευτερόλεπτο`,selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,selectedTimeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3CE}\u{3C1}\u{3B1}: ${e.time}`,startDate:`Ημερομηνία έναρξης`,timeZoneName:`ζώνη ώρας`,weekday:`καθημερινή`,year:`έτος`};var kE={};kE={era:`era`,year:`year`,month:`month`,day:`day`,hour:`hour`,minute:`minute`,second:`second`,dayPeriod:`AM/PM`,calendar:`Calendar`,startDate:`Start Date`,endDate:`End Date`,weekday:`day of the week`,timeZoneName:`time zone`,selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.startDate} to ${e.endDate}`,selectedTimeDescription:e=>`Selected Time: ${e.time}`};var AE={};AE={calendar:`Calendario`,day:`día`,dayPeriod:`a.\xA0m./p.\xA0m.`,endDate:`Fecha final`,era:`era`,hour:`hora`,minute:`minuto`,month:`mes`,second:`segundo`,selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Rango seleccionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora seleccionada: ${e.time}`,startDate:`Fecha de inicio`,timeZoneName:`zona horaria`,weekday:`día de la semana`,year:`año`};var jE={};jE={calendar:`Kalender`,day:`päev`,dayPeriod:`enne/pärast lõunat`,endDate:`Lõppkuupäev`,era:`ajastu`,hour:`tund`,minute:`minut`,month:`kuu`,second:`sekund`,selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.startDate} kuni ${e.endDate}`,selectedTimeDescription:e=>`Valitud aeg: ${e.time}`,startDate:`Alguskuupäev`,timeZoneName:`ajavöönd`,weekday:`nädalapäev`,year:`aasta`};var ME={};ME={calendar:`Kalenteri`,day:`päivä`,dayPeriod:`vuorokaudenaika`,endDate:`Päättymispäivä`,era:`aikakausi`,hour:`tunti`,minute:`minuutti`,month:`kuukausi`,second:`sekunti`,selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.startDate} \u{2013} ${e.endDate}`,selectedTimeDescription:e=>`Valittu aika: ${e.time}`,startDate:`Alkamispäivä`,timeZoneName:`aikavyöhyke`,weekday:`viikonpäivä`,year:`vuosi`};var NE={};NE={calendar:`Calendrier`,day:`jour`,dayPeriod:`cadran`,endDate:`Date de fin`,era:`ère`,hour:`heure`,minute:`minute`,month:`mois`,second:`seconde`,selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.startDate} au ${e.endDate}`,selectedTimeDescription:e=>`Heure choisie\xa0: ${e.time}`,startDate:`Date de début`,timeZoneName:`fuseau horaire`,weekday:`jour de la semaine`,year:`année`};var PE={};PE={calendar:`לוח שנה`,day:`יום`,dayPeriod:`לפנה״צ/אחה״צ`,endDate:`תאריך סיום`,era:`תקופה`,hour:`שעה`,minute:`דקה`,month:`חודש`,second:`שנייה`,selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,selectedTimeDescription:e=>`\u{5D6}\u{5DE}\u{5DF} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.time}`,startDate:`תאריך התחלה`,timeZoneName:`אזור זמן`,weekday:`יום בשבוע`,year:`שנה`};var FE={};FE={calendar:`Kalendar`,day:`dan`,dayPeriod:`AM/PM`,endDate:`Datum završetka`,era:`era`,hour:`sat`,minute:`minuta`,month:`mjesec`,second:`sekunda`,selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Odabrano vrijeme: ${e.time}`,startDate:`Datum početka`,timeZoneName:`vremenska zona`,weekday:`dan u tjednu`,year:`godina`};var IE={};IE={calendar:`Naptár`,day:`nap`,dayPeriod:`napszak`,endDate:`Befejező dátum`,era:`éra`,hour:`óra`,minute:`perc`,month:`hónap`,second:`másodperc`,selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.startDate}\u{2013}${e.endDate}`,selectedTimeDescription:e=>`Kijel\xf6lt id\u{151}: ${e.time}`,startDate:`Kezdő dátum`,timeZoneName:`időzóna`,weekday:`hét napja`,year:`év`};var LE={};LE={calendar:`Calendario`,day:`giorno`,dayPeriod:`AM/PM`,endDate:`Data finale`,era:`era`,hour:`ora`,minute:`minuto`,month:`mese`,second:`secondo`,selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: da ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Ora selezionata: ${e.time}`,startDate:`Data iniziale`,timeZoneName:`fuso orario`,weekday:`giorno della settimana`,year:`anno`};var RE={};RE={calendar:`カレンダー`,day:`日`,dayPeriod:`午前/午後`,endDate:`終了日`,era:`時代`,hour:`時`,minute:`分`,month:`月`,second:`秒`,selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.startDate} \u{304B}\u{3089} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{6642}\u{9593} : ${e.time}`,startDate:`開始日`,timeZoneName:`タイムゾーン`,weekday:`曜日`,year:`年`};var zE={};zE={calendar:`달력`,day:`일`,dayPeriod:`오전/오후`,endDate:`종료일`,era:`연호`,hour:`시`,minute:`분`,month:`월`,second:`초`,selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.startDate} ~ ${e.endDate}`,selectedTimeDescription:e=>`\u{C120}\u{D0DD} \u{C2DC}\u{AC04}: ${e.time}`,startDate:`시작일`,timeZoneName:`시간대`,weekday:`요일`,year:`년`};var BE={};BE={calendar:`Kalendorius`,day:`diena`,dayPeriod:`iki pietų / po pietų`,endDate:`Pabaigos data`,era:`era`,hour:`valanda`,minute:`minutė`,month:`mėnuo`,second:`sekundė`,selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:`Pradžios data`,timeZoneName:`laiko juosta`,weekday:`savaitės diena`,year:`metai`};var VE={};VE={calendar:`Kalendārs`,day:`diena`,dayPeriod:`priekšpusdienā/pēcpusdienā`,endDate:`Beigu datums`,era:`ēra`,hour:`stundas`,minute:`minūtes`,month:`mēnesis`,second:`sekundes`,selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: no ${e.startDate} l\u{12B}dz ${e.endDate}`,selectedTimeDescription:e=>`Atlas\u{12B}tais laiks: ${e.time}`,startDate:`Sākuma datums`,timeZoneName:`laika josla`,weekday:`nedēļas diena`,year:`gads`};var HE={};HE={calendar:`Kalender`,day:`dag`,dayPeriod:`a.m./p.m.`,endDate:`Sluttdato`,era:`tidsalder`,hour:`time`,minute:`minutt`,month:`måned`,second:`sekund`,selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tid: ${e.time}`,startDate:`Startdato`,timeZoneName:`tidssone`,weekday:`ukedag`,year:`år`};var UE={};UE={calendar:`Kalender`,day:`dag`,dayPeriod:`a.m./p.m.`,endDate:`Einddatum`,era:`tijdperk`,hour:`uur`,minute:`minuut`,month:`maand`,second:`seconde`,selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.startDate} tot ${e.endDate}`,selectedTimeDescription:e=>`Geselecteerde tijd: ${e.time}`,startDate:`Startdatum`,timeZoneName:`tijdzone`,weekday:`dag van de week`,year:`jaar`};var WE={};WE={calendar:`Kalendarz`,day:`dzień`,dayPeriod:`rano / po południu / wieczorem`,endDate:`Data końcowa`,era:`era`,hour:`godzina`,minute:`minuta`,month:`miesiąc`,second:`sekunda`,selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Wybrany czas: ${e.time}`,startDate:`Data początkowa`,timeZoneName:`strefa czasowa`,weekday:`dzień tygodnia`,year:`rok`};var GE={};GE={calendar:`Calendário`,day:`dia`,dayPeriod:`AM/PM`,endDate:`Data final`,era:`era`,hour:`hora`,minute:`minuto`,month:`mês`,second:`segundo`,selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:`Data inicial`,timeZoneName:`fuso horário`,weekday:`dia da semana`,year:`ano`};var KE={};KE={calendar:`Calendário`,day:`dia`,dayPeriod:`am/pm`,endDate:`Data de Término`,era:`era`,hour:`hora`,minute:`minuto`,month:`mês`,second:`segundo`,selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:`Data de Início`,timeZoneName:`fuso horário`,weekday:`dia da semana`,year:`ano`};var qE={};qE={calendar:`Calendar`,day:`zi`,dayPeriod:`a.m/p.m.`,endDate:`Dată final`,era:`eră`,hour:`oră`,minute:`minut`,month:`lună`,second:`secundă`,selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: de la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,selectedTimeDescription:e=>`Ora selectat\u{103}: ${e.time}`,startDate:`Dată început`,timeZoneName:`fus orar`,weekday:`ziua din săptămână`,year:`an`};var JE={};JE={calendar:`Календарь`,day:`день`,dayPeriod:`AM/PM`,endDate:`Дата окончания`,era:`эра`,hour:`час`,minute:`минута`,month:`месяц`,second:`секунда`,selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: \u{441} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{43E}\u{435} \u{432}\u{440}\u{435}\u{43C}\u{44F}: ${e.time}`,startDate:`Дата начала`,timeZoneName:`часовой пояс`,weekday:`день недели`,year:`год`};var YE={};YE={calendar:`Kalendár`,day:`deň`,dayPeriod:`AM/PM`,endDate:`Dátum ukončenia`,era:`letopočet`,hour:`hodina`,minute:`minúta`,month:`mesiac`,second:`sekunda`,selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Vybrat\xfd \u{10D}as: ${e.time}`,startDate:`Dátum začatia`,timeZoneName:`časové pásmo`,weekday:`deň týždňa`,year:`rok`};var XE={};XE={calendar:`Koledar`,day:`dan`,dayPeriod:`dop/pop`,endDate:`Datum konca`,era:`doba`,hour:`ura`,minute:`minuta`,month:`mesec`,second:`sekunda`,selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izbrani \u{10D}as: ${e.time}`,startDate:`Datum začetka`,timeZoneName:`časovni pas`,weekday:`dan v tednu`,year:`leto`};var ZE={};ZE={calendar:`Kalendar`,day:`дан`,dayPeriod:`пре подне/по подне`,endDate:`Datum završetka`,era:`ера`,hour:`сат`,minute:`минут`,month:`месец`,second:`секунд`,selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani opseg: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izabrano vreme: ${e.time}`,startDate:`Datum početka`,timeZoneName:`временска зона`,weekday:`дан у недељи`,year:`година`};var QE={};QE={calendar:`Kalender`,day:`dag`,dayPeriod:`fm/em`,endDate:`Slutdatum`,era:`era`,hour:`timme`,minute:`minut`,month:`månad`,second:`sekund`,selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.startDate} till ${e.endDate}`,selectedTimeDescription:e=>`Vald tid: ${e.time}`,startDate:`Startdatum`,timeZoneName:`tidszon`,weekday:`veckodag`,year:`år`};var $E={};$E={calendar:`Takvim`,day:`gün`,dayPeriod:`ÖÖ/ÖS`,endDate:`Bitiş Tarihi`,era:`çağ`,hour:`saat`,minute:`dakika`,month:`ay`,second:`saniye`,selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.startDate} - ${e.endDate}`,selectedTimeDescription:e=>`Se\xe7ilen Zaman: ${e.time}`,startDate:`Başlangıç Tarihi`,timeZoneName:`saat dilimi`,weekday:`haftanın günü`,year:`yıl`};var eD={};eD={calendar:`Календар`,day:`день`,dayPeriod:`дп/пп`,endDate:`Дата завершення`,era:`ера`,hour:`година`,minute:`хвилина`,month:`місяць`,second:`секунда`,selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{2014} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{447}\u{430}\u{441}: ${e.time}`,startDate:`Дата початку`,timeZoneName:`часовий пояс`,weekday:`день тижня`,year:`рік`};var tD={};tD={calendar:`日历`,day:`日`,dayPeriod:`上午/下午`,endDate:`结束日期`,era:`纪元`,hour:`小时`,minute:`分钟`,month:`月`,second:`秒`,selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65F6}\u{95F4}\u{FF1A}${e.time}`,startDate:`开始日期`,timeZoneName:`时区`,weekday:`工作日`,year:`年`};var nD={};nD={calendar:`日曆`,day:`日`,dayPeriod:`上午/下午`,endDate:`結束日期`,era:`纪元`,hour:`小时`,minute:`分钟`,month:`月`,second:`秒`,selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{6642}\u{9593}\u{FF1A}${e.time}`,startDate:`開始日期`,timeZoneName:`时区`,weekday:`工作日`,year:`年`};var rD={};rD={"ar-AE":CE,"bg-BG":wE,"cs-CZ":TE,"da-DK":EE,"de-DE":DE,"el-GR":OE,"en-US":kE,"es-ES":AE,"et-EE":jE,"fi-FI":ME,"fr-FR":NE,"he-IL":PE,"hr-HR":FE,"hu-HU":IE,"it-IT":LE,"ja-JP":RE,"ko-KR":zE,"lt-LT":BE,"lv-LV":VE,"nb-NO":HE,"nl-NL":UE,"pl-PL":WE,"pt-BR":GE,"pt-PT":KE,"ro-RO":qE,"ru-RU":JE,"sk-SK":YE,"sl-SI":XE,"sr-SP":ZE,"sv-SE":QE,"tr-TR":$E,"uk-UA":eD,"zh-CN":tD,"zh-TW":nD};function iD(e,t,n){let{direction:r}=bp(),i=(0,v.useMemo)(()=>ig(t),[t]),{keyboardProps:a}=Sm({shortcuts:{"Alt+ArrowDown":()=>{if(`setOpen`in e){e.setOpen(!0);return}return!1},"Alt+ArrowUp":()=>{if(`setOpen`in e){e.setOpen(!0);return}return!1},ArrowLeft:e=>{if(n)return!1;if(r===`rtl`){if(t.current){let n=U(e),r=aD(t.current,n.getBoundingClientRect().left,-1);if(r){r.focus();return}}}else{i.focusPrevious();return}return!1},ArrowRight:e=>{if(n)return!1;if(r===`rtl`){if(t.current){let n=U(e),r=aD(t.current,n.getBoundingClientRect().left,1);if(r){r.focus();return}}}else{i.focusNext();return}return!1}},allowRepeats:!0}),o=()=>{if(!t.current)return;let e=window.event?U(window.event):null,n=rg(t.current,{tabbable:!0});if(e&&=(n.currentNode=e,n.previousNode()),!e){let t;do t=n.lastChild(),t&&(e=t);while(t)}for(;e?.hasAttribute(`data-placeholder`);){let t=n.previousNode();if(t&&t.hasAttribute(`data-placeholder`))e=t;else break}e&&e.focus()},{pressProps:s}=Fm({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){e.pointerType===`mouse`&&o()},onPress(e){(e.pointerType===`touch`||e.pointerType===`pen`)&&o()}});return W(s,a)}function aD(e,t,n){let r=rg(e,{tabbable:!0}),i=r.nextNode(),a=null,o=1/0;for(;i;){let e=i.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===n&&s{t.confirmPlaceholder(),t.value!==u.current&&t.commitValidation(),e.onBlur?.(n)},onFocusWithinChange:e.onFocusChange}),f=s_(iie(rD),`@react-aria/datepicker`),p=t.maxGranularity===`hour`?`selectedTimeDescription`:`selectedDateDescription`,m=t.maxGranularity===`hour`?`time`:`date`,h=gc(t.value?f.format(p,{[m]:t.formatValue({month:`long`})}):``),g=e.__reactAriaDateFieldRole===`presentation`?s[`aria-describedby`]:[h[`aria-describedby`],s[`aria-describedby`]].filter(Boolean).join(` `)||void 0,_=e[cD],y=(0,v.useMemo)(()=>_||ig(n),[_,n]),b=iD(t,n,e[sD]===`presentation`);oD.set(t,{ariaLabel:e[`aria-label`],ariaLabelledBy:[o.id,e[`aria-labelledby`]].filter(Boolean).join(` `)||void 0,ariaDescribedBy:g,focusManager:y});let x=(0,v.useRef)(e.autoFocus),S;S=e.__reactAriaDateFieldRole===`presentation`?{role:`presentation`}:W(s,{role:`group`,"aria-disabled":e.isDisabled||void 0,"aria-describedby":g}),(0,v.useEffect)(()=>{x.current&&y.focusFirst(),x.current=!1},[y]),Cc(e.inputRef,t.defaultValue,t.setValue),tS({...e,focus(){y.focusFirst()}},t,e.inputRef);let C={type:`hidden`,name:e.name,form:e.form,value:t.value?.toString()||``,disabled:e.isDisabled};e.validationBehavior===`native`&&(C.type=`text`,C.hidden=!0,C.required=e.isRequired,C.onChange=()=>{});let w=Us(e);return{labelProps:{...o,onClick:()=>{y.focusFirst()}},fieldProps:W(w,S,b,d,{onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,style:{unicodeBidi:`isolate`}}),inputProps:C,descriptionProps:c,errorMessageProps:l,isInvalid:r,validationErrors:i,validationDetails:a}}function aie(e,t,n){let r=lD(e,t,n);return r.inputProps.value=t.timeValue?.toString()||``,r}function uD(e){e=Sc(e??{},oie);let{locale:t}=bp();return(0,v.useMemo)(()=>new yE(t,e),[t,e])}function oie(e,t){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(t[r]!==e[r])return!1;return!0}function sie(e){return e&&e.__esModule?e.default:e}function cie(){let{locale:e}=bp(),t=o_(sie(rD),`@react-aria/datepicker`);return(0,v.useMemo)(()=>{try{return new Intl.DisplayNames(e,{type:`dateTimeField`})}catch{return new lie(e,t)}},[e,t])}var lie=class{constructor(e,t){this.locale=e,this.dictionary=t}of(e){return this.dictionary.getStringForLocale(e,this.locale)}};function uie(e,t,n){let r=(0,v.useRef)(``),{locale:i,direction:a}=bp(),o=cie(),{ariaLabel:s,ariaLabelledBy:c,ariaDescribedBy:l,focusManager:u}=oD.get(t),d=e.isPlaceholder?``:e.text,f=(0,v.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),p=uD({month:`long`,timeZone:f.timeZone}),m=uD({hour:`numeric`,hour12:f.hour12,timeZone:f.timeZone});if(e.type===`month`&&!e.isPlaceholder){let e=p.format(t.dateValue);d=e===d?e:`${d} \u{2013} ${e}`}else e.type===`hour`&&!e.isPlaceholder&&(d=m.format(t.dateValue));let{spinButtonProps:h}=EC({value:e.value??void 0,textValue:d,minValue:e.minValue,maxValue:e.maxValue,isDisabled:t.isDisabled,isReadOnly:t.isReadOnly||!e.isEditable,isRequired:t.isRequired,onIncrement:()=>{r.current=``,t.increment(e.type)},onDecrement:()=>{r.current=``,t.decrement(e.type)},onIncrementPage:()=>{r.current=``,t.incrementPage(e.type)},onDecrementPage:()=>{r.current=``,t.decrementPage(e.type)},onIncrementToMax:()=>{r.current=``,t.incrementToMax(e.type)},onDecrementToMin:()=>{r.current=``,t.decrementToMin(e.type)}}),g=(0,v.useMemo)(()=>new Ap(i,{maximumFractionDigits:0}),[i]),_=()=>{if(e.text===e.placeholder&&u.focusPrevious(),g.isValidPartialNumber(e.text)&&!t.isReadOnly&&!e.isPlaceholder){let n=e.text.slice(0,-1),i=g.parse(n);n=i===0?``:n,n.length===0||i===0?t.clearSegment(e.type):t.setSegment(e.type,i),r.current=n}else(e.type===`dayPeriod`||e.type===`era`)&&t.clearSegment(e.type)},{keyboardProps:y}=Sm({shortcuts:{Backspace:()=>{_()},Delete:()=>{_()},"Mod+a":()=>{}},allowRepeats:!0}),{startsWith:b}=Xte({sensitivity:`base`}),x=uD({hour:`numeric`,hour12:!0}),S=(0,v.useMemo)(()=>{let e=new Date;return e.setHours(0),x.formatToParts(e).find(e=>e.type===`dayPeriod`).value},[x]),C=(0,v.useMemo)(()=>{let e=new Date;return e.setHours(12),x.formatToParts(e).find(e=>e.type===`dayPeriod`).value},[x]),w=uD({year:`numeric`,era:`narrow`,timeZone:`UTC`}),T=(0,v.useMemo)(()=>{if(e.type!==`era`)return[];let n=Zw(new wT(1,1,1),t.calendar),r=t.calendar.getEras().map(e=>{let t=n.set({year:1,month:1,day:1,era:e}).toDate(`UTC`);return{era:e,formatted:w.formatToParts(t).find(e=>e.type===`era`).value}}),i=die(r.map(e=>e.formatted));if(i)for(let e of r)e.formatted=e.formatted.slice(i);return r},[w,t.calendar,e.type]),E=n=>{if(t.isDisabled||t.isReadOnly)return;let i=r.current+n;switch(e.type){case`dayPeriod`:if(b(S,n))t.setSegment(`dayPeriod`,0);else if(b(C,n))t.setSegment(`dayPeriod`,1);else break;u.focusNext();break;case`era`:{let e=T.find(e=>b(e.formatted,n));e&&(t.setSegment(`era`,e.era),u.focusNext());break}case`day`:case`hour`:case`minute`:case`second`:case`month`:case`year`:{if(!g.isValidPartialNumber(i))return;let a=g.parse(i),o=a;if(e.maxValue!==void 0&&a>e.maxValue&&(o=g.parse(n)),isNaN(a))return;t.setSegment(e.type,o),e.maxValue!==void 0&&(Number(a+`0`)>e.maxValue||i.length>=String(e.maxValue).length)?(r.current=``,u.focusNext()):r.current=i;break}}},D=()=>{r.current=``,n.current&&yc(n.current,{containingElement:oc(n.current)}),window.getSelection()?.collapse(n.current)};_c((0,v.useRef)(typeof document<`u`?document:null),`selectionchange`,()=>{let e=window.getSelection();e?.anchorNode&&Ds(n.current,e?.anchorNode)&&Os()===n.current&&e.collapse(n.current)});let O=(0,v.useRef)(``);_c(n,`beforeinput`,r=>{if(n.current)switch(r.preventDefault(),r.inputType){case`deleteContentBackward`:case`deleteContentForward`:g.isValidPartialNumber(e.text)&&!t.isReadOnly&&_();break;case`insertCompositionText`:O.current=n.current.textContent,n.current.textContent=n.current.textContent;break;default:r.data!=null&&E(r.data)}}),_c(n,`input`,e=>{let{inputType:t,data:r}=e;t===`insertCompositionText`&&(n.current&&(n.current.textContent=O.current),r!=null&&(b(S,r)||b(C,r))&&E(r))}),Xo(()=>{let e=n.current;return()=>{Os()===e&&(u.focusPrevious()||u.focusNext())}},[n,u]);let k=Ao()||e.type===`timeZoneName`?{role:`textbox`,"aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e!==(0,v.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])&&!t.isInvalid&&(l=void 0);let A=ms(),j=!t.isDisabled&&!t.isReadOnly&&e.isEditable,M=Xs({"aria-label":`${e.type===`literal`?``:o.of(e.type)}${s?`, ${s}`:``}${c?`, `:``}`,"aria-labelledby":c});if(e.type===`literal`)return{segmentProps:{"aria-hidden":!0}};let N={caretColor:`transparent`};if(a===`rtl`){N.unicodeBidi=`embed`;let t=f[e.type];(t===`numeric`||t===`2-digit`)&&(N.direction=`ltr`)}return{segmentProps:W(h,M,{id:A,...k,...y,"aria-invalid":t.isInvalid?`true`:void 0,"aria-describedby":l,"aria-readonly":t.isReadOnly||!e.isEditable?`true`:void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:j,suppressContentEditableWarning:j,spellCheck:j?`false`:void 0,autoCorrect:j?`off`:void 0,enterKeyHint:j?`next`:void 0,inputMode:t.isDisabled||e.type===`dayPeriod`||e.type===`era`||!j?void 0:`numeric`,tabIndex:t.isDisabled?void 0:0,onFocus:D,style:N,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}function die(e){e.sort();let t=e[0],n=e[e.length-1];for(let e=0;e`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.maxValue} \u{623}\u{648} \u{642}\u{628}\u{644} \u{630}\u{644}\u{643}.`,rangeReversed:`تاريخ البدء يجب أن يكون قبل تاريخ الانتهاء.`,rangeUnderflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.minValue} \u{623}\u{648} \u{628}\u{639}\u{62F} \u{630}\u{644}\u{643}.`,unavailableDate:`البيانات المحددة غير متاحة.`};var fD={};fD={rangeOverflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.maxValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{440}\u{430}\u{43D}\u{43D}\u{430}.`,rangeReversed:`Началната дата трябва да е преди крайната.`,rangeUnderflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.minValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{43A}\u{44A}\u{441}\u{43D}\u{43E}.`,unavailableDate:`Избраната дата не е налична.`};var pD={};pD={rangeOverflow:e=>`Hodnota mus\xed b\xfdt ${e.maxValue} nebo d\u{159}\xedv\u{11B}j\u{161}\xed.`,rangeReversed:`Datum zahájení musí předcházet datu ukončení.`,rangeUnderflow:e=>`Hodnota mus\xed b\xfdt ${e.minValue} nebo pozd\u{11B}j\u{161}\xed.`,unavailableDate:`Vybrané datum není k dispozici.`};var mD={};mD={rangeOverflow:e=>`V\xe6rdien skal v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:`Startdatoen skal være før slutdatoen.`,rangeUnderflow:e=>`V\xe6rdien skal v\xe6re ${e.minValue} eller nyere.`,unavailableDate:`Den valgte dato er ikke tilgængelig.`};var hD={};hD={rangeOverflow:e=>`Der Wert muss ${e.maxValue} oder fr\xfcher sein.`,rangeReversed:`Das Startdatum muss vor dem Enddatum liegen.`,rangeUnderflow:e=>`Der Wert muss ${e.minValue} oder sp\xe4ter sein.`,unavailableDate:`Das ausgewählte Datum ist nicht verfügbar.`};var gD={};gD={rangeOverflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.maxValue} \u{3AE} \u{3C0}\u{3B1}\u{3BB}\u{3B1}\u{3B9}\u{3CC}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,rangeReversed:`Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης.`,rangeUnderflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.minValue} \u{3AE} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3B3}\u{3B5}\u{3BD}\u{3AD}\u{3C3}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,unavailableDate:`Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη.`};var _D={};_D={rangeUnderflow:e=>`Value must be ${e.minValue} or later.`,rangeOverflow:e=>`Value must be ${e.maxValue} or earlier.`,rangeReversed:`Start date must be before end date.`,unavailableDate:`Selected date unavailable.`};var vD={};vD={rangeOverflow:e=>`El valor debe ser ${e.maxValue} o anterior.`,rangeReversed:`La fecha de inicio debe ser anterior a la fecha de finalización.`,rangeUnderflow:e=>`El valor debe ser ${e.minValue} o posterior.`,unavailableDate:`Fecha seleccionada no disponible.`};var yD={};yD={rangeOverflow:e=>`V\xe4\xe4rtus peab olema ${e.maxValue} v\xf5i varasem.`,rangeReversed:`Alguskuupäev peab olema enne lõppkuupäeva.`,rangeUnderflow:e=>`V\xe4\xe4rtus peab olema ${e.minValue} v\xf5i hilisem.`,unavailableDate:`Valitud kuupäev pole saadaval.`};var bD={};bD={rangeOverflow:e=>`Arvon on oltava ${e.maxValue} tai sit\xe4 aikaisempi.`,rangeReversed:`Aloituspäivän on oltava ennen lopetuspäivää.`,rangeUnderflow:e=>`Arvon on oltava ${e.minValue} tai sit\xe4 my\xf6h\xe4isempi.`,unavailableDate:`Valittu päivämäärä ei ole käytettävissä.`};var xD={};xD={rangeOverflow:e=>`La valeur doit \xeatre ${e.maxValue} ou ant\xe9rieure.`,rangeReversed:`La date de début doit être antérieure à la date de fin.`,rangeUnderflow:e=>`La valeur doit \xeatre ${e.minValue} ou ult\xe9rieure.`,unavailableDate:`La date sélectionnée n’est pas disponible.`};var SD={};SD={rangeOverflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.maxValue} \u{5D0}\u{5D5} \u{5DE}\u{5D5}\u{5E7}\u{5D3}\u{5DD} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,rangeReversed:`תאריך ההתחלה חייב להיות לפני תאריך הסיום.`,rangeUnderflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.minValue} \u{5D0}\u{5D5} \u{5DE}\u{5D0}\u{5D5}\u{5D7}\u{5E8} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,unavailableDate:`התאריך הנבחר אינו זמין.`};var CD={};CD={rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:`Datum početka mora biti prije datuma završetka.`,rangeUnderflow:e=>`Vrijednost mora biti ${e.minValue} ili kasnije.`,unavailableDate:`Odabrani datum nije dostupan.`};var wD={};wD={rangeOverflow:e=>`Az \xe9rt\xe9knek ${e.maxValue} vagy kor\xe1bbinak kell lennie.`,rangeReversed:`A kezdő dátumnak a befejező dátumnál korábbinak kell lennie.`,rangeUnderflow:e=>`Az \xe9rt\xe9knek ${e.minValue} vagy k\xe9s\u{151}bbinek kell lennie.`,unavailableDate:`A kiválasztott dátum nem érhető el.`};var TD={};TD={rangeOverflow:e=>`Il valore deve essere ${e.maxValue} o precedente.`,rangeReversed:`La data di inizio deve essere antecedente alla data di fine.`,rangeUnderflow:e=>`Il valore deve essere ${e.minValue} o successivo.`,unavailableDate:`Data selezionata non disponibile.`};var ED={};ED={rangeOverflow:e=>`\u{5024}\u{306F} ${e.maxValue} \u{4EE5}\u{4E0B}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,rangeReversed:`開始日は終了日より前にする必要があります。`,rangeUnderflow:e=>`\u{5024}\u{306F} ${e.minValue} \u{4EE5}\u{4E0A}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,unavailableDate:`選択した日付は使用できません。`};var DD={};DD={rangeOverflow:e=>`\u{AC12}\u{C740} ${e.maxValue} \u{C774}\u{C804}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,rangeReversed:`시작일은 종료일 이전이어야 합니다.`,rangeUnderflow:e=>`\u{AC12}\u{C740} ${e.minValue} \u{C774}\u{D6C4}\u{C5EC}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,unavailableDate:`선택한 날짜를 사용할 수 없습니다.`};var OD={};OD={rangeOverflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.maxValue} arba ankstesn\u{117}.`,rangeReversed:`Pradžios data turi būti ankstesnė nei pabaigos data.`,rangeUnderflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.minValue} arba naujesn\u{117}.`,unavailableDate:`Pasirinkta data nepasiekiama.`};var kD={};kD={rangeOverflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.maxValue} vai agr\u{101}kai.`,rangeReversed:`Sākuma datumam ir jābūt pirms beigu datuma.`,rangeUnderflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.minValue} vai v\u{113}l\u{101}kai.`,unavailableDate:`Atlasītais datums nav pieejams.`};var AD={};AD={rangeOverflow:e=>`Verdien m\xe5 v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:`Startdatoen må være før sluttdatoen.`,rangeUnderflow:e=>`Verdien m\xe5 v\xe6re ${e.minValue} eller senere.`,unavailableDate:`Valgt dato utilgjengelig.`};var jD={};jD={rangeOverflow:e=>`Waarde moet ${e.maxValue} of eerder zijn.`,rangeReversed:`De startdatum moet voor de einddatum liggen.`,rangeUnderflow:e=>`Waarde moet ${e.minValue} of later zijn.`,unavailableDate:`Geselecteerde datum niet beschikbaar.`};var MD={};MD={rangeOverflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.maxValue} lub wcze\u{15B}niejsz\u{105}.`,rangeReversed:`Data rozpoczęcia musi być wcześniejsza niż data zakończenia.`,rangeUnderflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.minValue} lub p\xf3\u{17A}niejsz\u{105}.`,unavailableDate:`Wybrana data jest niedostępna.`};var ND={};ND={rangeOverflow:e=>`O valor deve ser ${e.maxValue} ou anterior.`,rangeReversed:`A data inicial deve ser anterior à data final.`,rangeUnderflow:e=>`O valor deve ser ${e.minValue} ou posterior.`,unavailableDate:`Data selecionada indisponível.`};var PD={};PD={rangeOverflow:e=>`O valor tem de ser ${e.maxValue} ou anterior.`,rangeReversed:`A data de início deve ser anterior à data de fim.`,rangeUnderflow:e=>`O valor tem de ser ${e.minValue} ou posterior.`,unavailableDate:`Data selecionada indisponível.`};var FD={};FD={rangeOverflow:e=>`Valoarea trebuie s\u{103} fie ${e.maxValue} sau anterioar\u{103}.`,rangeReversed:`Data de început trebuie să fie anterioară datei de sfârșit.`,rangeUnderflow:e=>`Valoarea trebuie s\u{103} fie ${e.minValue} sau ulterioar\u{103}.`,unavailableDate:`Data selectată nu este disponibilă.`};var ID={};ID={rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{43F}\u{43E}\u{437}\u{436}\u{435} ${e.maxValue}.`,rangeReversed:`Дата начала должна предшествовать дате окончания.`,rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{44C}\u{448}\u{435} ${e.minValue}.`,unavailableDate:`Выбранная дата недоступна.`};var LD={};LD={rangeOverflow:e=>`Hodnota mus\xed by\u{165} ${e.maxValue} alebo skor\u{161}ia.`,rangeReversed:`Dátum začiatku musí byť skorší ako dátum konca.`,rangeUnderflow:e=>`Hodnota mus\xed by\u{165} ${e.minValue} alebo neskor\u{161}ia.`,unavailableDate:`Vybratý dátum je nedostupný.`};var RD={};RD={rangeOverflow:e=>`Vrednost mora biti ${e.maxValue} ali starej\u{161}a.`,rangeReversed:`Začetni datum mora biti pred končnim datumom.`,rangeUnderflow:e=>`Vrednost mora biti ${e.minValue} ali novej\u{161}a.`,unavailableDate:`Izbrani datum ni na voljo.`};var zD={};zD={rangeOverflow:e=>`Vrednost mora da bude ${e.maxValue} ili starija.`,rangeReversed:`Datum početka mora biti pre datuma završetka.`,rangeUnderflow:e=>`Vrednost mora da bude ${e.minValue} ili novija.`,unavailableDate:`Izabrani datum nije dostupan.`};var BD={};BD={rangeOverflow:e=>`V\xe4rdet m\xe5ste vara ${e.maxValue} eller tidigare.`,rangeReversed:`Startdatumet måste vara före slutdatumet.`,rangeUnderflow:e=>`V\xe4rdet m\xe5ste vara ${e.minValue} eller senare.`,unavailableDate:`Det valda datumet är inte tillgängligt.`};var VD={};VD={rangeOverflow:e=>`De\u{11F}er, ${e.maxValue} veya \xf6ncesi olmal\u{131}d\u{131}r.`,rangeReversed:`Başlangıç tarihi bitiş tarihinden önce olmalıdır.`,rangeUnderflow:e=>`De\u{11F}er, ${e.minValue} veya sonras\u{131} olmal\u{131}d\u{131}r.`,unavailableDate:`Seçilen tarih kullanılamıyor.`};var HD={};HD={rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{43F}\u{456}\u{437}\u{43D}\u{456}\u{448}\u{435} ${e.maxValue}.`,rangeReversed:`Дата початку має передувати даті завершення.`,rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{456}\u{448}\u{435} ${e.minValue}.`,unavailableDate:`Вибрана дата недоступна.`};var UD={};UD={rangeOverflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{65E5}\u{671F}\u{3002}`,rangeReversed:`开始日期必须早于结束日期。`,rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{65E5}\u{671F}\u{3002}`,unavailableDate:`所选日期不可用。`};var WD={};WD={rangeOverflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{3002}`,rangeReversed:`開始日期必須在結束日期之前。`,rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{3002}`,unavailableDate:`所選日期無法使用。`};var GD={};GD={"ar-AE":dD,"bg-BG":fD,"cs-CZ":pD,"da-DK":mD,"de-DE":hD,"el-GR":gD,"en-US":_D,"es-ES":vD,"et-EE":yD,"fi-FI":bD,"fr-FR":xD,"he-IL":SD,"hr-HR":CD,"hu-HU":wD,"it-IT":TD,"ja-JP":ED,"ko-KR":DD,"lt-LT":OD,"lv-LV":kD,"nb-NO":AD,"nl-NL":jD,"pl-PL":MD,"pt-BR":ND,"pt-PT":PD,"ro-RO":FD,"ru-RU":ID,"sk-SK":LD,"sl-SI":RD,"sr-SP":zD,"sv-SE":BD,"tr-TR":VD,"uk-UA":HD,"zh-CN":UD,"zh-TW":WD};function fie(e){return e&&e.__esModule?e.default:e}var KD=new t_(fie(GD));function qD(){let e=typeof navigator<`u`&&(navigator.language||navigator.userLanguage)||`en-US`;try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e=`en-US`}return e}function JD(e,t,n,r,i){let a=e!=null&&n!=null&&e.compare(n)>0,o=e!=null&&t!=null&&e.compare(t)<0,s=e!=null&&r?.(e)||!1,c=a||o||s,l=[];if(c){let e=qD(),r=new i_(e,t_.getGlobalDictionaryForPackage(`@react-stately/datepicker`)||KD),c=new yE(e,YD({},i)),u=c.resolvedOptions().timeZone;o&&t!=null&&l.push(r.format(`rangeUnderflow`,{minValue:c.format(t.toDate(u))})),a&&n!=null&&l.push(r.format(`rangeOverflow`,{maxValue:c.format(n.toDate(u))})),s&&l.push(r.format(`unavailableDate`))}return{isInvalid:c,validationErrors:l,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:a,rangeUnderflow:o,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!c}}}function pie(e,t,n,r,i){let a=ix(JD(e?.start??null,t,n,r,i),JD(e?.end??null,t,n,r,i));if(e?.end!=null&&e.start!=null&&e.end.compare(e.start)<0){let e=t_.getGlobalDictionaryForPackage(`@react-stately/datepicker`)||KD;a=ix(a,{isInvalid:!0,validationErrors:[e.getStringForLocale(`rangeReversed`,qD())],validationDetails:{...Yb,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})}return a}var mie={year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`2-digit`,second:`2-digit`},hie={year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`};function YD(e,t){e={...t.shouldForceLeadingZeros?hie:mie,...e};let n=t.granularity||`minute`,r=Object.keys(e),i=r.indexOf(t.maxGranularity??`year`);i<0&&(i=0);let a=r.indexOf(n);if(a<0&&(a=2),i>a)throw Error(`maxGranularity must be greater than granularity`);let o=r.slice(i,a+1).reduce((t,n)=>(t[n]=e[n],t),{});return t.hourCycle!=null&&(o.hour12=t.hourCycle===12),o.timeZone=t.timeZone||`UTC`,(n===`hour`||n===`minute`||n===`second`)&&t.timeZone&&!t.hideTimeZone&&(o.timeZoneName=`short`),t.showEra&&i===0&&(o.era=`short`),o}function XD(e){return e&&`hour`in e?e:new TT}function ZD(e,t){if(e===null)return null;if(e)return Zw(e,t)}function gie(e,t,n,r){if(e)return ZD(e,n);let i=Zw(Cw(r??kw()).set({hour:0,minute:0,second:0,millisecond:0}),n);return t===`year`||t===`month`||t===`day`?Jw(i):r?i:Yw(i)}function QD(e,t){let n=e&&`timeZone`in e?e.timeZone:void 0,r=e&&`minute`in e?`minute`:`day`;if(e&&t&&!(t in e))throw Error(`Invalid granularity `+t+` for value `+e.toString());let[i,a]=(0,v.useState)([r,n]);e&&(i[0]!==r||i[1]!==n)&&a([r,n]),t||=e?r:i[0];let o=e?n:i[1];return[t,o]}var _ie=new t_({ach:{year:`mwaka`,month:`dwe`,day:`nino`},af:{year:`jjjj`,month:`mm`,day:`dd`},am:{year:`ዓዓዓዓ`,month:`ሚሜ`,day:`ቀቀ`},an:{year:`aaaa`,month:`mm`,day:`dd`},ar:{year:`سنة`,month:`شهر`,day:`يوم`},ast:{year:`aaaa`,month:`mm`,day:`dd`},az:{year:`iiii`,month:`aa`,day:`gg`},be:{year:`гггг`,month:`мм`,day:`дд`},bg:{year:`гггг`,month:`мм`,day:`дд`},bn:{year:`yyyy`,month:`মিমি`,day:`dd`},br:{year:`bbbb`,month:`mm`,day:`dd`},bs:{year:`gggg`,month:`mm`,day:`dd`},ca:{year:`aaaa`,month:`mm`,day:`dd`},cak:{year:`jjjj`,month:`ii`,day:`q'q'`},ckb:{year:`ساڵ`,month:`مانگ`,day:`ڕۆژ`},cs:{year:`rrrr`,month:`mm`,day:`dd`},cy:{year:`bbbb`,month:`mm`,day:`dd`},da:{year:`åååå`,month:`mm`,day:`dd`},de:{year:`jjjj`,month:`mm`,day:`tt`},dsb:{year:`llll`,month:`mm`,day:`źź`},el:{year:`εεεε`,month:`μμ`,day:`ηη`},en:{year:`yyyy`,month:`mm`,day:`dd`},eo:{year:`jjjj`,month:`mm`,day:`tt`},es:{year:`aaaa`,month:`mm`,day:`dd`},et:{year:`aaaa`,month:`kk`,day:`pp`},eu:{year:`uuuu`,month:`hh`,day:`ee`},fa:{year:`سال`,month:`ماه`,day:`روز`},ff:{year:`hhhh`,month:`ll`,day:`ññ`},fi:{year:`vvvv`,month:`kk`,day:`pp`},fr:{year:`aaaa`,month:`mm`,day:`jj`},fy:{year:`jjjj`,month:`mm`,day:`dd`},ga:{year:`bbbb`,month:`mm`,day:`ll`},gd:{year:`bbbb`,month:`mm`,day:`ll`},gl:{year:`aaaa`,month:`mm`,day:`dd`},he:{year:`שנה`,month:`חודש`,day:`יום`},hr:{year:`gggg`,month:`mm`,day:`dd`},hsb:{year:`llll`,month:`mm`,day:`dd`},hu:{year:`éééé`,month:`hh`,day:`nn`},ia:{year:`aaaa`,month:`mm`,day:`dd`},id:{year:`tttt`,month:`bb`,day:`hh`},is:{year:`áááá`,month:`mm`,day:`dd`},it:{year:`aaaa`,month:`mm`,day:`gg`},ja:{year:`年`,month:`月`,day:`日`},ka:{year:`წწწწ`,month:`თთ`,day:`რრ`},kk:{year:`жжжж`,month:`аа`,day:`кк`},kn:{year:`ವವವವ`,month:`ಮಿಮೀ`,day:`ದಿದಿ`},ko:{year:`연도`,month:`월`,day:`일`},lb:{year:`jjjj`,month:`mm`,day:`dd`},lo:{year:`ປປປປ`,month:`ດດ`,day:`ວວ`},lt:{year:`mmmm`,month:`mm`,day:`dd`},lv:{year:`gggg`,month:`mm`,day:`dd`},meh:{year:`aaaa`,month:`mm`,day:`dd`},ml:{year:`വർഷം`,month:`മാസം`,day:`തീയതി`},ms:{year:`tttt`,month:`mm`,day:`hh`},nb:{year:`åååå`,month:`mm`,day:`dd`},nl:{year:`jjjj`,month:`mm`,day:`dd`},nn:{year:`åååå`,month:`mm`,day:`dd`},no:{year:`åååå`,month:`mm`,day:`dd`},oc:{year:`aaaa`,month:`mm`,day:`jj`},pl:{year:`rrrr`,month:`mm`,day:`dd`},pt:{year:`aaaa`,month:`mm`,day:`dd`},rm:{year:`oooo`,month:`mm`,day:`dd`},ro:{year:`aaaa`,month:`ll`,day:`zz`},ru:{year:`гггг`,month:`мм`,day:`дд`},sc:{year:`aaaa`,month:`mm`,day:`dd`},scn:{year:`aaaa`,month:`mm`,day:`jj`},sk:{year:`rrrr`,month:`mm`,day:`dd`},sl:{year:`llll`,month:`mm`,day:`dd`},sr:{year:`гггг`,month:`мм`,day:`дд`},"sr-Latn":{year:`gggg`,month:`mm`,day:`dd`},sv:{year:`åååå`,month:`mm`,day:`dd`},szl:{year:`rrrr`,month:`mm`,day:`dd`},tg:{year:`сссс`,month:`мм`,day:`рр`},th:{year:`ปปปป`,month:`ดด`,day:`วว`},tr:{year:`yyyy`,month:`aa`,day:`gg`},uk:{year:`рррр`,month:`мм`,day:`дд`},"zh-CN":{year:`年`,month:`月`,day:`日`},"zh-TW":{year:`年`,month:`月`,day:`日`}},`en`);function vie(e,t,n){return e===`era`||e===`dayPeriod`?t:e===`year`||e===`month`||e===`day`?_ie.getStringForLocale(e,n):`––`}var $D=class e{constructor(e,t,n){if(this.era=n?.era??null,this.calendar=e,this.year=n?.year??null,this.month=n?.month??null,this.day=n?.day??null,this.hour=n?.hour??null,this.hourCycle=t,this.dayPeriod=null,this.minute=n?.minute??null,this.second=n?.second??null,this.millisecond=n?.millisecond??null,this.offset=`offset`in(n??{})?n.offset:null,this.hour!=null){let[e,n]=tO(this.hour,t);this.dayPeriod=e,this.hour=n}}copy(){let t=new e(this.calendar,this.hourCycle);return t.era=this.era,t.year=this.year,t.month=this.month,t.day=this.day,t.hour=this.hour,t.dayPeriod=this.dayPeriod,t.minute=this.minute,t.second=this.second,t.millisecond=this.millisecond,t.offset=this.offset,t}isComplete(e){return e.every(e=>this[e]!=null)}validate(e,t){return t.every(t=>{if((t===`hour`||t===`dayPeriod`)&&`hour`in e){let[t,n]=tO(e.hour,this.hourCycle);return this.dayPeriod===t&&this.hour===n}return this[t]===e[t]})}isCleared(e){return e.every(e=>this[e]===null)}set(e,t,n){let r=this.copy();return r[e]=t,e===`hour`&&r.dayPeriod==null&&`hour`in n&&(r.dayPeriod=tO(n.hour,this.hourCycle)[0]),e===`year`&&r.era==null&&(r.era=n.era),e!==`second`&&e!==`literal`&&e!==`timeZoneName`&&(r.offset=null),r}clear(e){let t=this.copy();return t[e]=null,e===`year`&&(t.era=null),t.offset=null,t}cycle(e,t,n,r){let i=this.copy();if(i[e]==null&&e!==`dayPeriod`&&e!==`era`){if(e===`hour`&&`hour`in n){let[e,t]=tO(n.hour,this.hourCycle);i.dayPeriod=e,i.hour=t}else i[e]=n[e];return e===`year`&&i.era==null&&(i.era=n.era),i}switch(e){case`era`:{let e=this.calendar.getEras(),n=e.indexOf(i.era);n=eO(n,t,0,e.length-1),i.era=e[n];break}case`year`:{let r=new wT(this.calendar,this.era??n.era,this.year??n.year,this.month??1,this.day??1);r=r.cycle(e,t,{round:e===`year`}),i.era=r.era,i.year=r.year;break}case`month`:i.month=eO(i.month??1,t,1,this.calendar.getMaximumMonthsInYear());break;case`day`:i.day=eO(i.day??1,t,1,this.calendar.getMaximumDaysInMonth());break;case`hour`:{let e=r.some(e=>[`year`,`month`,`day`].includes(e));if(`timeZone`in n&&(!e||i.year!=null&&i.month!=null&&i.day!=null)){let e=this.toValue(n);e=e.cycle(`hour`,t,{hourCycle:this.hourCycle===`h12`?12:24,round:!1});let[r,a]=tO(e.hour,this.hourCycle);i.hour=a,i.dayPeriod=r,i.offset=e.offset}else{let e=i.hour??0,r=this.getSegmentLimits(`hour`);i.hour=eO(e,t,r.minValue,r.maxValue),i.dayPeriod==null&&`hour`in n&&(i.dayPeriod=tO(n.hour,this.hourCycle)[0])}break}case`dayPeriod`:i.dayPeriod=eO(i.dayPeriod??0,t,0,1);break;case`minute`:i.minute=eO(i.minute??0,t,0,59,!0);break;case`second`:i.second=eO(i.second??0,t,0,59,!0)}return i}toValue(e){if(`hour`in e){let t=this.hour;t==null?(this.hourCycle===`h12`||this.hourCycle===`h11`)&&(t=this.dayPeriod===1?12:0):t=yie(t,this.dayPeriod??0,this.hourCycle);let n=e.set({era:this.era??e.era,year:this.year??e.year,month:this.month??e.month,day:this.day??e.day,hour:t??e.hour,minute:this.minute??e.minute,second:this.second??e.second,millisecond:this.millisecond??e.millisecond});return`offset`in n&&this.offset!=null&&n.offset!==this.offset&&(n=n.add({milliseconds:n.offset-this.offset})),n}return e.set({era:this.era??e.era,year:this.year??e.year,month:this.month??e.month,day:this.day??e.day})}getSegmentLimits(e){switch(e){case`era`:{let e=this.calendar.getEras();return{value:this.era==null?e.length-1:e.indexOf(this.era),minValue:0,maxValue:e.length-1}}case`year`:return{value:this.year,minValue:1,maxValue:9999};case`month`:return{value:this.month,minValue:1,maxValue:this.calendar.getMaximumMonthsInYear()};case`day`:return{value:this.day,minValue:1,maxValue:this.calendar.getMaximumDaysInMonth()};case`dayPeriod`:return{value:this.dayPeriod,minValue:0,maxValue:1};case`hour`:{let e=0,t=23;return this.hourCycle===`h12`?(e=1,t=12):this.hourCycle===`h11`&&(e=0,t=11),{value:this.hour,minValue:e,maxValue:t}}case`minute`:return{value:this.minute,minValue:0,maxValue:59};case`second`:return{value:this.second,minValue:0,maxValue:59}}}};function eO(e,t,n,r,i=!1){if(i){e+=Math.sign(t),e0?Math.ceil(e/i)*i:Math.floor(e/i)*i,e>r&&(e=n)}else e+=t,er&&(e=n+(e-r-1));return e}function tO(e,t){let n=+(e>=12);switch(t){case`h11`:e>=12&&(e-=12);break;case`h12`:e===0?e=12:e>12&&(e-=12);break;case`h23`:n=null;break;case`h24`:e+=1,n=null}return[n,e]}function yie(e,t,n){switch(n){case`h11`:t===1&&(e+=12);break;case`h12`:e===12&&(e=0),t===1&&(e+=12);break;case`h24`:--e}return e}var nO={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},rO={year:5,month:2,day:7,hour:2,minute:15,second:15},bie={dayperiod:`dayPeriod`,relatedYear:`year`,yearName:`literal`,unknown:`literal`};function iO(e){let{locale:t,createCalendar:n,hideTimeZone:r,isDisabled:i=!1,isReadOnly:a=!1,isRequired:o=!1,minValue:s,maxValue:c,isDateUnavailable:l}=e,u=e.value||e.defaultValue||e.placeholderValue||null,[d,f]=QD(u,e.granularity),p=f||`UTC`;if(u&&!(d in u))throw Error(`Invalid granularity `+d+` for value `+u.toString());let[m,h]=(0,v.useMemo)(()=>{let r=new yE(t,{dateStyle:`short`,timeStyle:`short`,hour12:e.hourCycle==null?void 0:e.hourCycle===12}).resolvedOptions();return[n(r.calendar),r.hourCycle]},[t,e.hourCycle,n]),[g,_]=eh(e.value,e.defaultValue??null,e.onChange),[y]=(0,v.useState)(g),b=(0,v.useMemo)(()=>ZD(g,m)??null,[g,m]),[x,S]=(0,v.useState)(()=>new $D(m,h,b)),C=m.identifier===`gregory`&&x.era===`BC`,w=(0,v.useMemo)(()=>({granularity:d,maxGranularity:e.maxGranularity??`year`,timeZone:f,hideTimeZone:r,hourCycle:e.hourCycle,showEra:C,shouldForceLeadingZeros:e.shouldForceLeadingZeros}),[e.maxGranularity,d,e.hourCycle,e.shouldForceLeadingZeros,f,r,C]),T=(0,v.useMemo)(()=>YD({},w),[w]),E=(0,v.useMemo)(()=>new yE(t,T),[t,T]),D=(0,v.useMemo)(()=>E.resolvedOptions(),[E]),O=(0,v.useMemo)(()=>gie(e.placeholderValue,d,m,f),[e.placeholderValue,d,m,f]),k=(0,v.useMemo)(()=>{let t=h===`h11`||h===`h12`,n=[`era`,`year`,`month`,`day`,`hour`,...t?[`dayPeriod`]:[],`minute`,`second`],r=n.indexOf(e.maxGranularity||`era`),i=n.indexOf(d===`hour`&&t?`dayPeriod`:d);return n.slice(r,i+1)},[e.maxGranularity,d,h]),[A,j]=(0,v.useState)(b),[M,N]=(0,v.useState)(m),[P,F]=(0,v.useState)(h);(b!==A||h!==P||!bw(m,M))&&(x=new $D(m,h,b),j(b),N(m),F(h),S(x));let I=t=>{if(!(e.isDisabled||e.isReadOnly)){if(t==null||t instanceof $D&&t.isCleared(k))S(new $D(m,h,b)),_(null);else if(!(t instanceof $D))t=Zw(t,u?.calendar||new vw),S(new $D(m,h,b)),_(t);else{if(t.isComplete(k)){let e=t.toValue(b??O);if(t.validate(e,k)){let t=Zw(e,u?.calendar||new vw);if(!g||t.compare(g)!==0){S(new $D(m,h,b)),_(t);return}}}S(t)}}},L=(0,v.useMemo)(()=>x.toValue(b??O).toDate(p),[x,p,b,O]),R=(0,v.useMemo)(()=>xie(L,x,E,D,m,t,d),[L,E,D,x,m,t,d]),z=(e,t)=>{I(x.cycle(e,t,O,k))},B=(0,v.useMemo)(()=>JD(g,s,c,l,w),[g,s,c,l,w]),V=ex({...e,value:g,builtinValidation:B}),H=V.displayValidation.isInvalid,ee=e.validationState||(H?`invalid`:null);return{...V,value:b,defaultValue:e.defaultValue??y,dateValue:L,calendar:m,setValue:I,segments:R,dateFormatter:E,validationState:ee,isInvalid:H,granularity:d,maxGranularity:e.maxGranularity??`year`,isDisabled:i,isReadOnly:a,isRequired:o,increment(e){z(e,1)},decrement(e){z(e,-1)},incrementPage(e){z(e,rO[e]||1)},decrementPage(e){z(e,-(rO[e]||1))},incrementToMax(e){let t=e===`hour`&&h===`h12`?11:x.getSegmentLimits(e).maxValue;I(x.set(e,t,O))},decrementToMin(e){let t=e===`hour`&&h===`h12`?12:x.getSegmentLimits(e).minValue;I(x.set(e,t,O))},setSegment(e,t){I(x.set(e,t,O))},confirmPlaceholder(){if(!(e.isDisabled||e.isReadOnly)&&x.isComplete(k)){let e=Zw(x.toValue(b??O),u?.calendar||new vw);(!g||e.compare(g)!==0)&&_(e),S(new $D(m,h,b))}},clearSegment(e){let t=x;e!==`timeZoneName`&&e!==`literal`&&(t=x.clear(e)),I(t)},formatValue(e){if(!b)return``;let n=YD(e,w);return new yE(t,n).format(L)},getDateFormatter(e,t){return new yE(e,YD({},{...w,...t}))}}}function xie(e,t,n,r,i,a,o){let s=[`hour`,`minute`,`second`],c=n.formatToParts(e),l=new Tp(a,{useGrouping:!1}),u=new Tp(a,{useGrouping:!1,minimumIntegerDigits:2});for(let e of c)if(e.type===`year`||e.type===`month`||e.type===`day`||e.type===`hour`){let n=t[e.type]??0;e.value=r[e.type]===`2-digit`?u.format(n):l.format(n)}let d=[];for(let e of c){let n=bie[e.type]||e.type,r=nO[n];n===`era`&&i.getEras().length===1&&(r=!1);let c=nO[n]&&t[e.type]==null,l=nO[n]?vie(n,e.value,a):null,u={type:n,text:c?l:e.value,...t.getSegmentLimits(n),isPlaceholder:c,placeholder:l,isEditable:r};n===`hour`?(d.push({type:`literal`,text:`⁦`,isPlaceholder:!1,placeholder:``,isEditable:!1}),d.push(u),n===o&&d.push({type:`literal`,text:`⁩`,isPlaceholder:!1,placeholder:``,isEditable:!1})):s.includes(n)&&n===o?(d.push(u),d.push({type:`literal`,text:`⁩`,isPlaceholder:!1,placeholder:``,isEditable:!1})):d.push(u)}return d}function Sie(e){let{placeholderValue:t=new TT,minValue:n,maxValue:r,defaultValue:i,granularity:a,validate:o}=e,[s,c]=eh(e.value,i??null,e.onChange),l=s||t,u=l&&`day`in l?l:void 0,d=i&&`timeZone`in i?i.timeZone:void 0,f=(0,v.useMemo)(()=>{let e=l&&`timeZone`in l?l.timeZone:void 0;return(e||d)&&t?Qw(aO(t),e||d):aO(t)},[t,l,d]),p=(0,v.useMemo)(()=>aO(n,u),[n,u]),m=(0,v.useMemo)(()=>aO(r,u),[r,u]),h=(0,v.useMemo)(()=>s&&`day`in s?Xw(s):s,[s]),g=(0,v.useMemo)(()=>s==null?null:aO(s),[s]),_=(0,v.useMemo)(()=>i==null?null:aO(i),[i]),y=e=>{c(u||d?e:e&&Xw(e))};return{...iO({...e,value:g,defaultValue:_,minValue:p,maxValue:m,onChange:y,granularity:a||`minute`,maxGranularity:`hour`,placeholderValue:f??void 0,createCalendar:()=>new vw,validate:(0,v.useCallback)(()=>o?.(s),[o,s])}),timeValue:h}}function aO(e,t=ww(kw())){return e?`day`in e?e:Yw(t,e):null}var oO=(0,v.createContext)(null),Cie=(0,v.createContext)(null),sO=(0,v.createContext)(null),cO=(0,v.createContext)(null),wie=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,oO);let{validationBehavior:n}=Xf(ax)||{},r=e.validationBehavior??n??`native`,{locale:i}=bp(),a=iO({...e,locale:i,createCalendar:_E,validationBehavior:r}),o=(0,v.useRef)(null),[s,c]=Qf(!e[`aria-label`]&&!e[`aria-labelledby`]),l=(0,v.useRef)(null),{labelProps:u,fieldProps:d,inputProps:f,descriptionProps:p,errorMessageProps:m,...h}=lD({...$f(e),label:c,inputRef:l,validationBehavior:r},a,o),g=Jf({...$f(e),values:{state:a,isInvalid:a.isInvalid,isDisabled:a.isDisabled,isReadOnly:a.isReadOnly,isRequired:e.isRequired||!1},defaultClassName:`react-aria-DateField`}),_=Us(e,{global:!0});return delete _.id,v.createElement(qf,{values:[[sO,a],[Kb,{...d,ref:o,isInvalid:a.isInvalid,isDisabled:a.isDisabled}],[zS,{...f,ref:l}],[sp,{...u,ref:s,elementType:`span`}],[Hv,{slots:{description:p,errorMessage:m}}],[Jb,h]]},v.createElement(np.div,{..._,...g,ref:t,slot:e.slot||void 0,"data-invalid":a.isInvalid||void 0,"data-disabled":a.isDisabled||void 0,"data-readonly":a.isReadOnly||void 0,"data-required":e.isRequired||void 0}),v.createElement(rie,{autoComplete:e.autoComplete,name:e.name,isDisabled:e.isDisabled,state:a}))}),Tie=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,Cie);let{validationBehavior:n}=Xf(ax)||{},r=e.validationBehavior??n??`native`,{locale:i}=bp(),a=Sie({...e,locale:i,validationBehavior:r}),o=(0,v.useRef)(null),[s,c]=Qf(!e[`aria-label`]&&!e[`aria-labelledby`]),l=(0,v.useRef)(null),{labelProps:u,fieldProps:d,inputProps:f,descriptionProps:p,errorMessageProps:m,...h}=aie({...$f(e),label:c,inputRef:l,validationBehavior:r},a,o),g=Jf({...e,values:{state:a,isInvalid:a.isInvalid,isDisabled:a.isDisabled,isReadOnly:a.isReadOnly,isRequired:e.isRequired||!1},defaultClassName:`react-aria-TimeField`}),_=Us(e,{global:!0});return delete _.id,v.createElement(qf,{values:[[cO,a],[Kb,{...d,ref:o,isInvalid:a.isInvalid,isDisabled:a.isDisabled}],[zS,{...f,ref:l}],[sp,{...u,ref:s,elementType:`span`}],[Hv,{slots:{description:p,errorMessage:m}}],[Jb,h]]},v.createElement(np.div,{..._,...g,ref:t,slot:e.slot||void 0,"data-invalid":a.isInvalid||void 0,"data-disabled":a.isDisabled||void 0,"data-readonly":a.isReadOnly||void 0,"data-required":e.isRequired||void 0}))}),Eie=(0,v.forwardRef)(function(e,t){let n=(0,v.useContext)(sO),r=(0,v.useContext)(cO);return n||r?v.createElement(lO,{...e,ref:t}):v.createElement(Die,{...e,ref:t})}),Die=(0,v.forwardRef)((e,t)=>{let[n,r]=Zf({slot:e.slot},t,oO),{locale:i}=bp(),a=iO({...n,locale:i,createCalendar:_E}),o=(0,v.useRef)(null),{fieldProps:s,inputProps:c}=lD({...n,inputRef:o},a,r);return v.createElement(qf,{values:[[sO,a],[zS,{...c,ref:o}],[Kb,{...s,ref:r,isInvalid:a.isInvalid,isDisabled:a.isDisabled}]]},v.createElement(lO,e))}),lO=(0,v.forwardRef)((e,t)=>{let{className:n,children:r}=e,i=(0,v.useContext)(sO),a=(0,v.useContext)(cO),o=i??a;return v.createElement(v.Fragment,null,v.createElement(qb,{...e,ref:t,slot:e.slot||void 0,className:n??`react-aria-DateInput`,isReadOnly:o.isReadOnly,isInvalid:o.isInvalid,isDisabled:o.isDisabled},o.segments.map((e,t)=>(0,v.cloneElement)(r(e),{key:t}))),v.createElement(BS,{className:``}))}),Oie=(0,v.forwardRef)(function({segment:e,...t},n){let r=(0,v.useContext)(sO),i=(0,v.useContext)(cO),a=r??i,o=Zs(n),{segmentProps:s}=uie(e,a,o),{focusProps:c,isFocused:l,isFocusVisible:u}=Gm(),{hoverProps:d,isHovered:f}=Zm({...t,isDisabled:a.isDisabled||e.type===`literal`}),p=Jf({...t,values:{...e,isReadOnly:a.isReadOnly,isInvalid:a.isInvalid,isDisabled:a.isDisabled,isHovered:f,isFocused:l,isFocusVisible:u},defaultChildren:e.text,defaultClassName:`react-aria-DateSegment`});return v.createElement(np.span,{...W(Us(t,{global:!0}),s,c,d),...p,style:s.style,ref:o,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":a.isInvalid||void 0,"data-readonly":a.isReadOnly||void 0,"data-disabled":a.isDisabled||void 0,"data-type":e.type,"data-hovered":f||void 0,"data-focused":l||void 0,"data-focus-visible":u||void 0})}),uO=(0,v.createContext)({}),dO=({children:e,className:t,fullWidth:n,variant:r,...i})=>{let a=v.useMemo(()=>mf({fullWidth:n,variant:r}),[n,r]);return(0,G.jsx)(uO,{value:{slots:a},children:(0,G.jsx)(qb,{className:K(t,a?.base()),"data-slot":`date-input-group`,...i,children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})})},fO=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(uO);return(0,G.jsx)(Xc.div,{className:q(r?.prefix,t),"data-slot":`date-input-group-prefix`,...n,children:e})},pO=({className:e,...t})=>{let{slots:n}=(0,v.use)(uO);return(0,G.jsx)(Eie,{className:K(e,n?.input()),"data-slot":`date-input-group-input`,...t})},mO=({className:e,segment:t,...n})=>{let{slots:r}=(0,v.use)(uO);return(0,G.jsx)(Oie,{className:q(r?.segment,e),"data-slot":`date-input-group-segment`,segment:t,...n})},hO=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(uO);return(0,G.jsx)(Xc.div,{className:q(r?.inputContainer,t),"data-slot":`date-input-group-input-container`,...n,children:e})},gO=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(uO);return(0,G.jsx)(Xc.div,{className:q(r?.suffix,t),"data-slot":`date-input-group-suffix`,...n,children:e})};function _O({children:e,className:t,fullWidth:n,...r}){let i=v.useMemo(()=>ff({fullWidth:n}),[n]);return(0,G.jsx)(wie,{"data-required":oh(r.isRequired),"data-slot":`date-field`,...r,className:K(t,i),children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})}var vO=Object.assign(_O,{Root:_O,Group:dO,Input:pO,InputContainer:hO,Segment:mO,Prefix:fO,Suffix:gO}),yO={};yO={dateRange:e=>`${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,dateSelected:e=>`${e.date} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`,finishRangeSelectionPrompt:`انقر لإنهاء عملية تحديد نطاق التاريخ`,maximumDate:`آخر تاريخ متاح`,minimumDate:`أول تاريخ متاح`,next:`التالي`,previous:`السابق`,selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.dateRange}`,startRangeSelectionPrompt:`انقر لبدء عملية تحديد نطاق التاريخ`,todayDate:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date}`,todayDateSelected:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date} \u{645}\u{62D}\u{62F}\u{62F}`};var bO={};bO={dateRange:e=>`${e.startDate} \u{434}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{435} ${e.date}`,finishRangeSelectionPrompt:`Натиснете, за да довършите избора на времеви интервал`,maximumDate:`Последна налична дата`,minimumDate:`Първа налична дата`,next:`Напред`,previous:`Назад`,selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:`Натиснете, за да пристъпите към избора на времеви интервал`,todayDate:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date}`,todayDateSelected:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date} \u{441}\u{430} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438}`};var xO={};xO={dateRange:e=>`${e.startDate} a\u{17E} ${e.endDate}`,dateSelected:e=>`Vybr\xe1no ${e.date}`,finishRangeSelectionPrompt:`Kliknutím dokončíte výběr rozsahu dat`,maximumDate:`Poslední dostupné datum`,minimumDate:`První dostupné datum`,next:`Další`,previous:`Předchozí`,selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknutím zahájíte výběr rozsahu dat`,todayDate:e=>`Dnes, ${e.date}`,todayDateSelected:e=>`Dnes, vybr\xe1no ${e.date}`};var SO={};SO={dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:`Klik for at fuldføre valg af datoområde`,maximumDate:`Sidste ledige dato`,minimumDate:`Første ledige dato`,next:`Næste`,previous:`Forrige`,selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.dateRange}`,startRangeSelectionPrompt:`Klik for at starte valg af datoområde`,todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`};var CO={};CO={dateRange:e=>`${e.startDate} bis ${e.endDate}`,dateSelected:e=>`${e.date} ausgew\xe4hlt`,finishRangeSelectionPrompt:`Klicken, um die Auswahl des Datumsbereichs zu beenden`,maximumDate:`Letztes verfügbares Datum`,minimumDate:`Erstes verfügbares Datum`,next:`Weiter`,previous:`Zurück`,selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.dateRange}`,startRangeSelectionPrompt:`Klicken, um die Auswahl des Datumsbereichs zu beginnen`,todayDate:e=>`Heute, ${e.date}`,todayDateSelected:e=>`Heute, ${e.date} ausgew\xe4hlt`};var wO={};wO={dateRange:e=>`${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,dateSelected:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} ${e.date}`,finishRangeSelectionPrompt:`Κάντε κλικ για να ολοκληρώσετε την επιλογή εύρους ημερομηνιών`,maximumDate:`Τελευταία διαθέσιμη ημερομηνία`,minimumDate:`Πρώτη διαθέσιμη ημερομηνία`,next:`Επόμενο`,previous:`Προηγούμενο`,selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.dateRange}`,startRangeSelectionPrompt:`Κάντε κλικ για να ξεκινήσετε την επιλογή εύρους ημερομηνιών`,todayDate:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, ${e.date}`,todayDateSelected:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3C4}\u{3B7}\u{3BA}\u{3B5} ${e.date}`};var TO={};TO={previous:`Previous`,next:`Next`,selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.dateRange}`,todayDate:e=>`Today, ${e.date}`,todayDateSelected:e=>`Today, ${e.date} selected`,dateSelected:e=>`${e.date} selected`,startRangeSelectionPrompt:`Click to start selecting date range`,finishRangeSelectionPrompt:`Click to finish selecting date range`,minimumDate:`First available date`,maximumDate:`Last available date`,dateRange:e=>`${e.startDate} to ${e.endDate}`};var EO={};EO={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} seleccionado`,finishRangeSelectionPrompt:`Haga clic para terminar de seleccionar rango de fechas`,maximumDate:`Última fecha disponible`,minimumDate:`Primera fecha disponible`,next:`Siguiente`,previous:`Anterior`,selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo seleccionado: ${e.dateRange}`,startRangeSelectionPrompt:`Haga clic para comenzar a seleccionar un rango de fechas`,todayDate:e=>`Hoy, ${e.date}`,todayDateSelected:e=>`Hoy, ${e.date} seleccionado`};var DO={};DO={dateRange:e=>`${e.startDate} kuni ${e.endDate}`,dateSelected:e=>`${e.date} valitud`,finishRangeSelectionPrompt:`Klõpsake kuupäevavahemiku valimise lõpetamiseks`,maximumDate:`Viimane saadaolev kuupäev`,minimumDate:`Esimene saadaolev kuupäev`,next:`Järgmine`,previous:`Eelmine`,selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.dateRange}`,startRangeSelectionPrompt:`Klõpsake kuupäevavahemiku valimiseks`,todayDate:e=>`T\xe4na, ${e.date}`,todayDateSelected:e=>`T\xe4na, ${e.date} valitud`};var OO={};OO={dateRange:e=>`${e.startDate} \u{2013} ${e.endDate}`,dateSelected:e=>`${e.date} valittu`,finishRangeSelectionPrompt:`Lopeta päivämääräalueen valinta napsauttamalla tätä.`,maximumDate:`Viimeinen varattavissa oleva päivämäärä`,minimumDate:`Ensimmäinen varattavissa oleva päivämäärä`,next:`Seuraava`,previous:`Edellinen`,selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.dateRange}`,startRangeSelectionPrompt:`Aloita päivämääräalueen valinta napsauttamalla tätä.`,todayDate:e=>`T\xe4n\xe4\xe4n, ${e.date}`,todayDateSelected:e=>`T\xe4n\xe4\xe4n, ${e.date} valittu`};var kO={};kO={dateRange:e=>`${e.startDate} \xe0 ${e.endDate}`,dateSelected:e=>`${e.date} s\xe9lectionn\xe9`,finishRangeSelectionPrompt:`Cliquer pour finir de sélectionner la plage de dates`,maximumDate:`Dernière date disponible`,minimumDate:`Première date disponible`,next:`Suivant`,previous:`Précédent`,selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.dateRange}`,startRangeSelectionPrompt:`Cliquer pour commencer à sélectionner la plage de dates`,todayDate:e=>`Aujourd'hui, ${e.date}`,todayDateSelected:e=>`Aujourd\u{2019}hui, ${e.date} s\xe9lectionn\xe9`};var AO={};AO={dateRange:e=>`${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,dateSelected:e=>`${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`,finishRangeSelectionPrompt:`חץ כדי לסיים את בחירת טווח התאריכים`,maximumDate:`תאריך פנוי אחרון`,minimumDate:`תאריך פנוי ראשון`,next:`הבא`,previous:`הקודם`,selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.dateRange}`,startRangeSelectionPrompt:`לחץ כדי להתחיל בבחירת טווח התאריכים`,todayDate:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date}`,todayDateSelected:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`};var jO={};jO={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} odabran`,finishRangeSelectionPrompt:`Kliknite da dovršite raspon odabranih datuma`,maximumDate:`Posljednji raspoloživi datum`,minimumDate:`Prvi raspoloživi datum`,next:`Sljedeći`,previous:`Prethodni`,selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknite da započnete raspon odabranih datuma`,todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, odabran ${e.date}`};var MO={};MO={dateRange:e=>`${e.startDate}\u{2013}${e.endDate}`,dateSelected:e=>`${e.date} kiv\xe1lasztva`,finishRangeSelectionPrompt:`Kattintson a dátumtartomány kijelölésének befejezéséhez`,maximumDate:`Utolsó elérhető dátum`,minimumDate:`Az első elérhető dátum`,next:`Következő`,previous:`Előző`,selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.dateRange}`,startRangeSelectionPrompt:`Kattintson a dátumtartomány kijelölésének indításához`,todayDate:e=>`Ma, ${e.date}`,todayDateSelected:e=>`Ma, ${e.date} kijel\xf6lve`};var NO={};NO={dateRange:e=>`Da ${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selezionata`,finishRangeSelectionPrompt:`Fai clic per completare la selezione dell’intervallo di date`,maximumDate:`Ultima data disponibile`,minimumDate:`Prima data disponibile`,next:`Successivo`,previous:`Precedente`,selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: ${e.dateRange}`,startRangeSelectionPrompt:`Fai clic per selezionare l’intervallo di date`,todayDate:e=>`Oggi, ${e.date}`,todayDateSelected:e=>`Oggi, ${e.date} selezionata`};var PO={};PO={dateRange:e=>`${e.startDate} \u{304B}\u{3089} ${e.endDate}`,dateSelected:e=>`${e.date} \u{3092}\u{9078}\u{629E}`,finishRangeSelectionPrompt:`クリックして日付範囲の選択を終了`,maximumDate:`最終利用可能日`,minimumDate:`最初の利用可能日`,next:`次へ`,previous:`前へ`,selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.dateRange}`,startRangeSelectionPrompt:`クリックして日付範囲の選択を開始`,todayDate:e=>`\u{672C}\u{65E5}\u{3001}${e.date}`,todayDateSelected:e=>`\u{672C}\u{65E5}\u{3001}${e.date} \u{3092}\u{9078}\u{629E}`};var FO={};FO={dateRange:e=>`${e.startDate} ~ ${e.endDate}`,dateSelected:e=>`${e.date} \u{C120}\u{D0DD}\u{B428}`,finishRangeSelectionPrompt:`날짜 범위 선택을 완료하려면 클릭하십시오.`,maximumDate:`마지막으로 사용 가능한 일자`,minimumDate:`처음으로 사용 가능한 일자`,next:`다음`,previous:`이전`,selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.dateRange}`,startRangeSelectionPrompt:`날짜 범위 선택을 시작하려면 클릭하십시오.`,todayDate:e=>`\u{C624}\u{B298}, ${e.date}`,todayDateSelected:e=>`\u{C624}\u{B298}, ${e.date} \u{C120}\u{D0DD}\u{B428}`};var IO={};IO={dateRange:e=>`Nuo ${e.startDate} iki ${e.endDate}`,dateSelected:e=>`Pasirinkta ${e.date}`,finishRangeSelectionPrompt:`Spustelėkite, kad baigtumėte pasirinkti datų intervalą`,maximumDate:`Paskutinė galima data`,minimumDate:`Pirmoji galima data`,next:`Paskesnis`,previous:`Ankstesnis`,selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:`Spustelėkite, kad pradėtumėte pasirinkti datų intervalą`,todayDate:e=>`\u{160}iandien, ${e.date}`,todayDateSelected:e=>`\u{160}iandien, pasirinkta ${e.date}`};var LO={};LO={dateRange:e=>`No ${e.startDate} l\u{12B}dz ${e.endDate}`,dateSelected:e=>`Atlas\u{12B}ts: ${e.date}`,finishRangeSelectionPrompt:`Noklikšķiniet, lai pabeigtu datumu diapazona atlasi`,maximumDate:`Pēdējais pieejamais datums`,minimumDate:`Pirmais pieejamais datums`,next:`Tālāk`,previous:`Atpakaļ`,selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:`Noklikšķiniet, lai sāktu datumu diapazona atlasi`,todayDate:e=>`\u{160}odien, ${e.date}`,todayDateSelected:e=>`Atlas\u{12B}ta \u{161}odiena, ${e.date}`};var RO={};RO={dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:`Klikk for å fullføre valg av datoområde`,maximumDate:`Siste tilgjengelige dato`,minimumDate:`Første tilgjengelige dato`,next:`Neste`,previous:`Forrige`,selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.dateRange}`,startRangeSelectionPrompt:`Klikk for å starte valg av datoområde`,todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`};var zO={};zO={dateRange:e=>`${e.startDate} tot ${e.endDate}`,dateSelected:e=>`${e.date} geselecteerd`,finishRangeSelectionPrompt:`Klik om de selectie van het datumbereik te voltooien`,maximumDate:`Laatste beschikbare datum`,minimumDate:`Eerste beschikbare datum`,next:`Volgende`,previous:`Vorige`,selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.dateRange}`,startRangeSelectionPrompt:`Klik om het datumbereik te selecteren`,todayDate:e=>`Vandaag, ${e.date}`,todayDateSelected:e=>`Vandaag, ${e.date} geselecteerd`};var BO={};BO={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`Wybrano ${e.date}`,finishRangeSelectionPrompt:`Kliknij, aby zakończyć wybór zakresu dat`,maximumDate:`Ostatnia dostępna data`,minimumDate:`Pierwsza dostępna data`,next:`Dalej`,previous:`Wstecz`,selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknij, aby rozpocząć wybór zakresu dat`,todayDate:e=>`Dzisiaj, ${e.date}`,todayDateSelected:e=>`Dzisiaj wybrano ${e.date}`};var VO={};VO={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:`Clique para concluir a seleção do intervalo de datas`,maximumDate:`Última data disponível`,minimumDate:`Primeira data disponível`,next:`Próximo`,previous:`Anterior`,selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:`Clique para iniciar a seleção do intervalo de datas`,todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`};var HO={};HO={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:`Clique para terminar de selecionar o intervalo de datas`,maximumDate:`Última data disponível`,minimumDate:`Primeira data disponível`,next:`Próximo`,previous:`Anterior`,selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:`Clique para começar a selecionar o intervalo de datas`,todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`};var UO={};UO={dateRange:e=>`De la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,dateSelected:e=>`${e.date} selectat\u{103}`,finishRangeSelectionPrompt:`Apăsaţi pentru a finaliza selecţia razei pentru dată`,maximumDate:`Ultima dată disponibilă`,minimumDate:`Prima dată disponibilă`,next:`Următorul`,previous:`Înainte`,selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:`Apăsaţi pentru a începe selecţia razei pentru dată`,todayDate:e=>`Ast\u{103}zi, ${e.date}`,todayDateSelected:e=>`Azi, ${e.date} selectat\u{103}`};var WO={};WO={dateRange:e=>`\u{421} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:`Щелкните, чтобы завершить выбор диапазона дат`,maximumDate:`Последняя доступная дата`,minimumDate:`Первая доступная дата`,next:`Далее`,previous:`Назад`,selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:`Щелкните, чтобы начать выбор диапазона дат`,todayDate:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`};var GO={};GO={dateRange:e=>`Od ${e.startDate} do ${e.endDate}`,dateSelected:e=>`Vybrat\xfd d\xe1tum ${e.date}`,finishRangeSelectionPrompt:`Kliknutím dokončíte výber rozsahu dátumov`,maximumDate:`Posledný dostupný dátum`,minimumDate:`Prvý dostupný dátum`,next:`Nasledujúce`,previous:`Predchádzajúce`,selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknutím spustíte výber rozsahu dátumov`,todayDate:e=>`Dnes ${e.date}`,todayDateSelected:e=>`Vybrat\xfd dne\u{161}n\xfd d\xe1tum ${e.date}`};var KO={};KO={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izbrano`,finishRangeSelectionPrompt:`Kliknite za dokončanje izbire datumskega obsega`,maximumDate:`Zadnji razpoložljivi datum`,minimumDate:`Prvi razpoložljivi datum`,next:`Naprej`,previous:`Nazaj`,selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknite za začetek izbire datumskega obsega`,todayDate:e=>`Danes, ${e.date}`,todayDateSelected:e=>`Danes, ${e.date} izbrano`};var qO={};qO={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izabran`,finishRangeSelectionPrompt:`Kliknite da dovršite opseg izabranih datuma`,maximumDate:`Zadnji raspoloživi datum`,minimumDate:`Prvi raspoloživi datum`,next:`Sledeći`,previous:`Prethodni`,selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknite da započnete opseg izabranih datuma`,todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, izabran ${e.date}`};var JO={};JO={dateRange:e=>`${e.startDate} till ${e.endDate}`,dateSelected:e=>`${e.date} har valts`,finishRangeSelectionPrompt:`Klicka för att avsluta val av datumintervall`,maximumDate:`Sista tillgängliga datum`,minimumDate:`Första tillgängliga datum`,next:`Nästa`,previous:`Föregående`,selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.dateRange}`,startRangeSelectionPrompt:`Klicka för att välja datumintervall`,todayDate:e=>`Idag, ${e.date}`,todayDateSelected:e=>`Idag, ${e.date} har valts`};var YO={};YO={dateRange:e=>`${e.startDate} - ${e.endDate}`,dateSelected:e=>`${e.date} se\xe7ildi`,finishRangeSelectionPrompt:`Tarih aralığı seçimini tamamlamak için tıklayın`,maximumDate:`Son müsait tarih`,minimumDate:`İlk müsait tarih`,next:`Sonraki`,previous:`Önceki`,selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.dateRange}`,startRangeSelectionPrompt:`Tarih aralığı seçimini başlatmak için tıklayın`,todayDate:e=>`Bug\xfcn, ${e.date}`,todayDateSelected:e=>`Bug\xfcn, ${e.date} se\xe7ildi`};var XO={};XO={dateRange:e=>`${e.startDate} \u{2014} ${e.endDate}`,dateSelected:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:`Натисніть, щоб завершити вибір діапазону дат`,maximumDate:`Остання доступна дата`,minimumDate:`Перша доступна дата`,next:`Наступний`,previous:`Попередній`,selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:`Натисніть, щоб почати вибір діапазону дат`,todayDate:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`};var ZO={};ZO={dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9009}\u{62E9} ${e.date}`,finishRangeSelectionPrompt:`单击以完成选择日期范围`,maximumDate:`最后一个可用日期`,minimumDate:`第一个可用日期`,next:`下一页`,previous:`上一页`,selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:`单击以开始选择日期范围`,todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9009}\u{62E9}\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`};var QO={};QO={dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9078}\u{53D6} ${e.date}`,finishRangeSelectionPrompt:`按一下以完成選取日期範圍`,maximumDate:`最後一個可用日期`,minimumDate:`第一個可用日期`,next:`下一頁`,previous:`上一頁`,selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:`按一下以開始選取日期範圍`,todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9078}\u{53D6}\u{4ECA}\u{5929}\u{FF0C}${e.date}`};var $O={};$O={"ar-AE":yO,"bg-BG":bO,"cs-CZ":xO,"da-DK":SO,"de-DE":CO,"el-GR":wO,"en-US":TO,"es-ES":EO,"et-EE":DO,"fi-FI":OO,"fr-FR":kO,"he-IL":AO,"hr-HR":jO,"hu-HU":MO,"it-IT":NO,"ja-JP":PO,"ko-KR":FO,"lt-LT":IO,"lv-LV":LO,"nb-NO":RO,"nl-NL":zO,"pl-PL":BO,"pt-BR":VO,"pt-PT":HO,"ro-RO":UO,"ru-RU":WO,"sk-SK":GO,"sl-SI":KO,"sr-SP":qO,"sv-SE":JO,"tr-TR":YO,"uk-UA":XO,"zh-CN":ZO,"zh-TW":QO};function ek(e){return e&&e.__esModule?e.default:e}var tk=new WeakMap;function nk(e){return e?.calendar.identifier===`gregory`&&e.era===`BC`?`short`:void 0}function kie(e){let t=s_(ek($O),`@react-aria/calendar`),n,r;`highlightedRange`in e?{start:n,end:r}=e.highlightedRange||{}:(n=Array.isArray(e.value)?e.value[0]:e.value??void 0,r=Array.isArray(e.value)?e.value.at(-1):e.value??void 0);let i=uD({weekday:`long`,month:`long`,year:`numeric`,day:`numeric`,era:nk(n)||nk(r),timeZone:e.timeZone}),{locale:a}=bp(),o=(0,v.useMemo)(()=>new Intl.ListFormat(a),[a]),s=`anchorDate`in e?e.anchorDate:null;return(0,v.useMemo)(()=>{if(!s&&n&&r){if(yw(n,r)){let r=i.format(n.toDate(e.timeZone));return t.format(`selectedDateDescription`,{date:r})}if(`highlightedRange`in e){let a=ik(i,t,n,r,e.timeZone);return t.format(`selectedRangeDescription`,{dateRange:a})}if(Array.isArray(e.value)){let n=e.value.map(t=>i.format(t.toDate(e.timeZone))),r=o.format(n);return t.format(`selectedDateDescription`,{date:r})}}return``},[n,r,s,e,t,i,o])}function rk(e,t,n,r){let i=s_(ek($O),`@react-aria/calendar`),a=nk(e)||nk(t),o=uD({month:`long`,year:`numeric`,era:a,calendar:e.calendar.identifier,timeZone:n}),s=uD({month:`long`,year:`numeric`,day:`numeric`,era:a,calendar:e.calendar.identifier,timeZone:n});return(0,v.useMemo)(()=>{if(yw(e,jw(e))){let a=e,s=t;if(e.calendar.getFormattableMonth&&(a=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),yw(t,Mw(e)))return o.format(a.toDate(n));if(yw(t,Mw(t)))return r?ik(o,i,a,s,n):o.formatRange(a.toDate(n),s.toDate(n))}return r?ik(s,i,e,t,n):s.formatRange(e.toDate(n),t.toDate(n))},[e,t,o,s,i,n,r])}function ik(e,t,n,r,i){let a=e.formatRangeToParts(n.toDate(i),r.toDate(i)),o=-1;for(let e=0;eo&&(c+=a[e].value);return t.format(`dateRange`,{startDate:s,endDate:c})}function Aie(e){return e&&e.__esModule?e.default:e}function jie(e,t){let n=s_(Aie($O),`@react-aria/calendar`),r=Us(e),i=rk(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),a=rk(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);ec(()=>{t.isFocused||Gp(a)},[a]);let o=kie(t);ec(()=>{o&&Gp(o,`polite`,4e3)},[o]);let s=gs([!!e.errorMessage,e.isInvalid,e.validationState]);tk.set(t,{ariaLabel:e[`aria-label`],ariaLabelledBy:e[`aria-labelledby`],errorMessageId:s,selectedDateDescription:o});let[c,l]=(0,v.useState)(!1),u=e.isDisabled||t.isNextVisibleRangeInvalid();u&&c&&(l(!1),t.setFocused(!0));let[d,f]=(0,v.useState)(!1),p=e.isDisabled||t.isPreviousVisibleRangeInvalid();return p&&d&&(f(!1),t.setFocused(!0)),{calendarProps:W(r,Xs({id:e.id,"aria-label":[e[`aria-label`],a].filter(Boolean).join(`, `),"aria-labelledby":e[`aria-labelledby`]}),{role:`application`,"aria-details":e[`aria-details`]||void 0,"aria-describedby":e[`aria-describedby`]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":n.format(`next`),isDisabled:u,onFocusChange:l},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":n.format(`previous`),isDisabled:p,onFocusChange:f},errorMessageProps:{id:s},title:i}}function ak(e,t){let{startDate:n=t.visibleRange.start,endDate:r=t.visibleRange.end,firstDayOfWeek:i}=e,{direction:a}=bp(),{keyboardProps:o}=Sm({shortcuts:{End:()=>{t.focusSectionEnd()},Home:()=>{t.focusSectionStart()},Escape:()=>(`setAnchorDate`in t&&t.setAnchorDate(null),!1)}}),{keyboardProps:s}=Sm({shortcuts:{Enter:()=>{t.selectFocusedDate()}," ":()=>{t.selectFocusedDate()},PageUp:()=>{t.focusPreviousSection()},"Shift+PageUp":()=>{t.focusPreviousSection(!0)},PageDown:()=>{t.focusNextSection()},"Shift+PageDown":()=>{t.focusNextSection(!0)},ArrowLeft:()=>{a===`rtl`?t.focusNextDay():t.focusPreviousDay()},ArrowUp:()=>{t.focusPreviousRow()},ArrowRight:()=>{a===`rtl`?t.focusPreviousDay():t.focusNextDay()},ArrowDown:()=>{t.focusNextRow()}},allowRepeats:!0}),c=rk(n,r,t.timeZone,!0),{ariaLabel:l,ariaLabelledBy:u}=tk.get(t),d=Xs({"aria-label":[l,c].filter(Boolean).join(`, `),"aria-labelledby":u}),f=uD({weekday:e.weekdayStyle||`narrow`,timeZone:t.timeZone}),{locale:p}=bp(),m=(0,v.useMemo)(()=>{let e=t.visibleDuration.days&&t.visibleDuration.days<7,r=e?n:Pw(ww(t.timeZone),p,i),a=e?t.visibleDuration.days:7;return[...Array(a).keys()].map(e=>{let n=r.add({days:e}).toDate(t.timeZone);return f.format(n)})},[p,t.timeZone,f,i,n,t.visibleDuration.days]),h=t.getWeeksInMonth(n);return{gridProps:W(d,{role:`grid`,"aria-readonly":t.isReadOnly||void 0,"aria-disabled":t.isDisabled||void 0,"aria-multiselectable":`highlightedRange`in t||t.selectionMode===`multiple`||void 0,onFocus:()=>t.setFocused(!0),onBlur:()=>t.setFocused(!1)},o,s),headerProps:{"aria-hidden":!0},weekDays:m,weeksInMonth:h}}function ok(e){return e&&e.__esModule?e.default:e}function Mie(e,t,n){let{date:r,isDisabled:i}=e,{errorMessageId:a,selectedDateDescription:o}=tk.get(t),s=s_(ok($O),`@react-aria/calendar`),c=uD({weekday:`long`,day:`numeric`,month:`long`,year:`numeric`,era:nk(r),timeZone:t.timeZone}),l=t.isCellFocused(r)&&!e.isOutsideMonth;i=i||t.isCellDisabled(r)||!!e.isOutsideMonth;let u=t.isCellUnavailable(r),d=!i&&!u,f=t.isSelected(r)&&d,p=!1;t.isValueInvalid&&(`highlightedRange`in t?p=!t.anchorDate&&t.highlightedRange!=null&&r.compare(t.highlightedRange.start)>=0&&r.compare(t.highlightedRange.end)<=0:Array.isArray(t.value)?p=t.value.some(e=>yw(e,r)):t.value&&(p=yw(t.value,r))),p&&!i&&(f=!0),r=Sc(r,sre);let m=(0,v.useMemo)(()=>r.toDate(t.timeZone),[r,t.timeZone]),h=xw(r,t.timeZone),g=(0,v.useMemo)(()=>{let e=``;return`highlightedRange`in t&&t.value&&!t.anchorDate&&(yw(r,t.value.start)||yw(r,t.value.end))&&(e=o+`, `),e+=c.format(m),h?e=s.format(f?`todayDateSelected`:`todayDate`,{date:e}):f&&(e=s.format(`dateSelected`,{date:e})),t.minValue&&yw(r,t.minValue)?e+=`, `+s.format(`minimumDate`):t.maxValue&&yw(r,t.maxValue)&&(e+=`, `+s.format(`maximumDate`)),e},[c,m,s,f,h,r,t,o]),_=``;`anchorDate`in t&&l&&!t.isReadOnly&&d&&(_=t.anchorDate?s.format(`finishRangeSelectionPrompt`):s.format(`startRangeSelectionPrompt`));let y=gc(_),b=(0,v.useRef)(!1),x=(0,v.useRef)(!1),S=(0,v.useRef)(void 0),{pressProps:C,isPressed:w}=Fm({shouldCancelOnPointerExit:`anchorDate`in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!d||t.isReadOnly,onPressStart(e){if(t.isReadOnly){t.setFocusedDate(r),t.setFocused(!0);return}if(`highlightedRange`in t&&!t.anchorDate&&(e.pointerType===`mouse`||e.pointerType===`touch`)){if(t.highlightedRange&&!p){if(yw(r,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(r),t.setFocused(!0),t.setDragging(!0),x.current=!0;return}if(yw(r,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(r),t.setFocused(!0),t.setDragging(!0),x.current=!0;return}}let n=()=>{t.setDragging(!0),S.current=void 0,t.selectDate(r),t.setFocusedDate(r),t.setFocused(!0),b.current=!0};e.pointerType===`touch`?S.current=setTimeout(n,200):n()}},onPressEnd(){x.current=!1,b.current=!1,clearTimeout(S.current),S.current=void 0},onPress(){!(`anchorDate`in t)&&!t.isReadOnly&&(t.selectDate(r),t.setFocusedDate(r),t.setFocused(!0))},onPressUp(e){t.isReadOnly||(`anchorDate`in t&&S.current&&(t.selectDate(r),t.setFocusedDate(r),t.setFocused(!0)),`anchorDate`in t&&(x.current?t.setAnchorDate(r):t.anchorDate&&!b.current?(t.selectDate(r),t.setFocusedDate(r),t.setFocused(!0)):e.pointerType===`keyboard`&&!t.anchorDate?(t.selectDate(r),t.focusNearestAvailableDate(r)):e.pointerType===`virtual`&&(t.selectDate(r),t.setFocusedDate(r),t.setFocused(!0))))}}),T;i||(T=yw(r,t.focusedDate)?0:-1),(0,v.useEffect)(()=>{l&&n.current&&(Io(n.current),pm()!==`pointer`&&Os()===n.current&&yc(n.current,{containingElement:oc(n.current)}))},[l,n]);let E=uD({day:`numeric`,timeZone:t.timeZone,calendar:r.calendar.identifier}),D=(0,v.useMemo)(()=>E.formatToParts(m).find(e=>e.type===`day`).value,[E,m]);return{cellProps:{role:`gridcell`,"aria-disabled":!d||void 0,"aria-selected":f||void 0,"aria-invalid":p||void 0},buttonProps:W(C,{onFocus(){i||(t.setFocusedDate(r),t.setFocused(!0))},tabIndex:T,role:`button`,"aria-disabled":!d||void 0,"aria-label":g,"aria-invalid":p||void 0,"aria-describedby":[p?a:void 0,y[`aria-describedby`]].filter(Boolean).join(` `)||void 0,onPointerEnter(e){`highlightDate`in t&&(e.pointerType!==`touch`||t.isDragging)&&d&&t.highlightDate(r)},onPointerDown(e){let t=U(e);t instanceof HTMLElement&&`releasePointerCapture`in t&&(`hasPointerCapture`in t?t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId):t.releasePointerCapture(e.pointerId))},onContextMenu(e){e.preventDefault()}}),isPressed:w,isFocused:l,isSelected:f,isDisabled:i,isUnavailable:u,isOutsideVisibleRange:r.compare(t.visibleRange.start)<0||r.compare(t.visibleRange.end)>0,isInvalid:p,formattedDate:D}}function Nie(e,t){let n=uD({year:e.format?.year||`numeric`,era:e.format?.era||(t.focusedDate.calendar.identifier===`gregory`&&t.focusedDate.era===`BC`?`short`:void 0),calendar:t.focusedDate.calendar.identifier,timeZone:t.timeZone}),r=e.visibleYears||20,i=t.focusedDate.subtract({years:Math.floor(r/2)}),a=t.focusedDate.add({years:Math.ceil(r/2)-1});t.maxValue&&a.compare(t.maxValue)>0&&(a=Jw(t.maxValue),i=a.subtract({years:r-1})),t.minValue&&i.compare(t.minValue)<0&&(i=Jw(t.minValue),a=i.add({years:r-1}),t.maxValue&&a.compare(t.maxValue)>0&&(a=Jw(t.maxValue)));let o=[],s=i,c=0;for(;s.compare(a)<=0;)ore(s,t.focusedDate)&&(c=o.length),o.push({id:o.length,date:s,formatted:n.format(s.toDate(t.timeZone))}),s=s.add({years:1});let{locale:l}=bp();return{"aria-label":(0,v.useMemo)(()=>new Intl.DisplayNames(l,{type:`dateTimeField`}).of(`year`),[l]),value:c,onChange:e=>{e!=null&&t.setFocusedDate(o[e].date)},items:o}}function sk(e,t){let n=(0,v.useMemo)(()=>{let n=t.visibleRange.start;return e.offset&&(n=n.add(e.offset)),n},[t.visibleRange.start,e.offset]),r=t.visibleDuration.days||t.visibleDuration.weeks,i=uD({day:e.format?.day||(r?`numeric`:void 0),month:e.format?.month||`long`,year:e.format?.year||`numeric`,era:e.format?.era||n&&n.calendar.identifier===`gregory`&&n.era===`BC`?`short`:void 0,calendar:t.visibleRange?.start.calendar.identifier,timeZone:t.timeZone});return(0,v.useMemo)(()=>{if(r)return i.formatRange(n.toDate(t.timeZone),t.visibleRange.end.toDate(t.timeZone));let e=n.calendar.getFormattableMonth?n.calendar.getFormattableMonth(n):n;return i.format(e.toDate(t.timeZone))},[i,r,n,t.timeZone,t.visibleRange.end])}function Pie(e,t,n){let{commitBehavior:r=`select`,...i}=e,a=jie(i,t),o=(0,v.useRef)(!1),s=(0,v.useRef)(typeof window<`u`?window:null);_c(s,`pointerdown`,e=>{o.current=e.width===0&&e.height===0});let c={clear:()=>t.clearSelection(),reset:()=>t.setAnchorDate(null),select:()=>t.commitSelection()};return _c(s,`pointerup`,e=>{if(o.current){o.current=!1;return}if(t.setDragging(!1),!t.anchorDate)return;let i=e.target;n.current&&As(n.current)&&(!Ds(n.current,i)||!i.closest(`button, [role="button"]`))&&c[r]()}),a.calendarProps.onBlur=e=>{n.current&&(!e.relatedTarget||!Ds(n.current,e.relatedTarget))&&t.anchorDate&&c[r]()},_c(n,`touchmove`,e=>{t.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),a}function ck(e,t,n){return t!=null&&e.compare(t)<0||n!=null&&e.compare(n)>0}function lk(e,t,n,r,i){let a={};for(let e in t)a[e]=Math.floor(t[e]/2),a[e]>0&&t[e]%2==0&&a[e]--;return fk(e,uk(e,t,n).subtract(a),t,n,r,i)}function uk(e,t,n,r,i){let a=e;return t.years?a=Nw(e):t.months?a=jw(e):(t.weeks||t.days&&t.days>7)&&(a=Pw(e,n)),fk(e,a,t,n,r,i)}function dk(e,t,n,r,i){let a={...t};return a.days?a.days--:a.weeks?a.weeks--:a.months?a.months--:a.years&&a.years--,fk(e,uk(e,t,n).subtract(a),t,n,r,i)}function fk(e,t,n,r,i,a){if(i&&e.compare(i)>=0){let e=Rw(t,uk(Jw(i),n,r));e&&(t=e)}if(a&&e.compare(a)<=0){let e=Lw(t,dk(Jw(a),n,r));e&&(t=e)}return t}function pk(e,t,n){if(t){let n=Rw(e,Jw(t));n&&(e=n)}if(n){let t=Lw(e,Jw(n));t&&(e=t)}return e}function mk(e,t,n){if(!n)return e;for(;e.compare(t)>=0&&n(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}function Fie(e,t){return e===t||e.days===t.days&&e.weeks===t.weeks&&e.months===t.months&&e.years===t.years}function Iie(e){let t=(0,v.useMemo)(()=>new yE(e.locale),[e.locale]),n=(0,v.useMemo)(()=>t.resolvedOptions(),[t]),{locale:r,createCalendar:i,visibleDuration:a={months:1},minValue:o,maxValue:s,selectionAlignment:c,isDateUnavailable:l,pageBehavior:u=`visible`,selectionMode:d=`single`,firstDayOfWeek:f,weeksInMonth:p}=e,m=(0,v.useMemo)(()=>i(n.calendar),[i,n.calendar]),[h,g]=eh(e.value,e.defaultValue??null,e.onChange),_=(0,v.useMemo)(()=>Array.isArray(h)?h.map(e=>Zw(Jw(e),m)):h?Zw(Jw(h),m):null,[h,m]),y=(0,v.useMemo)(()=>{let e=Array.isArray(h)?h[0]:h;return e&&`timeZone`in e?e.timeZone:n.timeZone},[h,n.timeZone]),[b,x]=eh((0,v.useMemo)(()=>e.focusedValue?pk(Zw(Jw(e.focusedValue),m),o,s):void 0,[e.focusedValue,m,o,s]),(0,v.useMemo)(()=>e.defaultFocusedValue?pk(Zw(Jw(e.defaultFocusedValue),m),o,s):pk(_?Array.isArray(_)?_[0]:_:Zw(ww(y),m),o,s),[e.defaultFocusedValue,_,y,m,o,s]),e.onFocusChange),S=()=>{switch(c){case`start`:return uk(b,a,r,o,s);case`end`:return dk(b,a,r,o,s);default:return lk(b,a,r,o,s)}},[C,w]=(0,v.useState)(S),[T,E]=(0,v.useState)(e.autoFocus||!1),[D,O]=(0,v.useState)(a);Fie(a,D)||(O(a),w(S()));let k=(0,v.useMemo)(()=>{let e={...a};return e.days?e.days--:e.days=-1,C.add(e)},[C,a]),[A,j]=(0,v.useState)(m);if(!bw(m,A)){let e=Zw(b,m);w(lk(e,a,r,o,s)),x(e),j(m)}ck(b,o,s)?x(pk(b,o,s)):b.compare(C)<0?w(dk(b,a,r,o,s)):b.compare(k)>0&&w(uk(b,a,r,o,s));function M(e){e=pk(e,o,s),x(e)}function N(e){let t=mk(pk(e,o,s),C,l);if(!t)return null;let n=Array.isArray(h)?h[0]:h,r=Zw(t,n?.calendar||new vw);return n&&`hour`in n?n.set(r):r}function P(t){if(!e.isDisabled&&!e.isReadOnly){if(t===null){g(d===`multiple`?[]:null);return}if(Array.isArray(t))g(t.map(N).filter(Boolean));else{let e=N(t);e&&g(e)}}}let F=(0,v.useMemo)(()=>_?Array.isArray(_)?_.some(e=>l?.(e)||ck(e,o,s)):l?.(_)||ck(_,o,s):!1,[_,l,o,s]),I=e.isInvalid||e.validationState===`invalid`||F,L=I?`invalid`:null,R=(0,v.useMemo)(()=>u===`visible`?a:hk(a),[u,a]);return{isDisabled:e.isDisabled??!1,isReadOnly:e.isReadOnly??!1,value:_,setValue:P,selectionMode:d,visibleDuration:a,visibleRange:{start:C,end:k},minValue:o,maxValue:s,focusedDate:b,timeZone:y,validationState:L,isValueInvalid:I,setFocusedDate(e){M(e)},focusNextDay(){M(b.add({days:1}))},focusPreviousDay(){M(b.subtract({days:1}))},focusNextRow(){a.days?this.focusNextPage():(a.weeks||a.months||a.years)&&M(b.add({weeks:1}))},focusPreviousRow(){a.days?this.focusPreviousPage():(a.weeks||a.months||a.years)&&M(b.subtract({weeks:1}))},focusNextPage(){let e=C.add(R);x(pk(b.add(R),o,s)),w(uk(fk(b,e,R,r,o,s),R,r))},focusPreviousPage(){let e=C.subtract(R);x(pk(b.subtract(R),o,s)),w(uk(fk(b,e,R,r,o,s),R,r))},focusSectionStart(){a.days?M(C):a.weeks?M(Pw(b,r)):(a.months||a.years)&&M(jw(b))},focusSectionEnd(){a.days?M(k):a.weeks?M(ure(b,r)):(a.months||a.years)&&M(Mw(b))},focusNextSection(e){if(!e&&!a.days){M(b.add(hk(a)));return}a.days?this.focusNextPage():a.weeks?M(b.add({months:1})):(a.months||a.years)&&M(b.add({years:1}))},focusPreviousSection(e){if(!e&&!a.days){M(b.subtract(hk(a)));return}a.days?this.focusPreviousPage():a.weeks?M(b.subtract({months:1})):(a.months||a.years)&&M(b.subtract({years:1}))},selectFocusedDate(){l&&l(b)||this.selectDate(b)},selectDate(t){if(!(e.isDisabled||e.isReadOnly)){if(d===`multiple`&&t!=null){let e=N(t);if(!e)return;let n=[];Array.isArray(h)?n=h:h!=null&&(n=[h]);let r=n.findIndex(t=>yw(t,e)),i=r>=0?n.slice(0,r).concat(n.slice(r+1)):[...n,e];g(i)}else P(t)}},isFocused:T,setFocused:E,isInvalid(e){return ck(e,o,s)},isSelected(e){return!_||this.isCellDisabled(e)||this.isCellUnavailable(e)?!1:Array.isArray(_)?_.some(t=>yw(t,e)):yw(e,_)},isCellFocused(e){return T&&b&&yw(e,b)},isCellDisabled(t){return e.isDisabled||t.compare(C)<0||t.compare(k)>0||this.isInvalid(t)},isCellUnavailable(t){return e.isDateUnavailable?e.isDateUnavailable(t):!1},isPreviousVisibleRangeInvalid(){let e=C.subtract({days:1});return yw(e,C)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=k.add({days:1});return yw(e,k)||this.isInvalid(e)},getDatesInWeek(e,t=C){let n=t.add({weeks:e}),i=[],o=a.days&&a.days<7?a.days:7;if(o===7){n=Pw(n,r,f);let e=Sw(n,r,f);for(let t=0;t0&&(m=`start`)}let h=(0,v.useMemo)(()=>{let t=e.isDateUnavailable;if(t)return e=>t(e,f)},[e.isDateUnavailable,f]),g=(0,v.useCallback)(t=>t&&h&&!e.allowsNonContiguousRanges?{start:vk(t,h,o,-1),end:vk(t,h,o,1)}:null,[h,o,e.allowsNonContiguousRanges]),_=(0,v.useMemo)(()=>g(f),[g,f]),y=(0,v.useMemo)(()=>Rw(s,_?.start),[s,_]),b=(0,v.useMemo)(()=>Lw(c,_?.end),[c,_]),x=Iie({...l,value:u&&u.start,createCalendar:i,locale:a,visibleDuration:o,minValue:y,maxValue:b,selectionAlignment:e.selectionAlignment||m,isDateUnavailable:h}),S=f?gk(f,x.focusedDate):u&&gk(u.start,u.end),C=t=>{if(e.isReadOnly)return;let n=mk(pk(t,y,b),x.visibleRange.start,h);if(n){if(!f)p(n);else{let e=gk(f,n);e&&d({start:_k(e.start,u?.start),end:_k(e.end,u?.end)}),p(null)}}},[w,T]=(0,v.useState)(!1),E=(0,v.useMemo)(()=>!u||f?!1:h&&(h(u.start)||h(u.end))?!0:ck(u.start,s,c)||ck(u.end,s,c),[h,u,f,s,c]),D=e.isInvalid||e.validationState===`invalid`||E,O=D?`invalid`:null;return{...x,value:u,setValue:d,anchorDate:f,setAnchorDate:p,highlightedRange:S,validationState:O,isValueInvalid:D,selectFocusedDate(){x.isCellUnavailable(x.focusedDate)||C(x.focusedDate)},commitSelection(){C(x.focusedDate)},selectDate:C,highlightDate(e){f&&x.setFocusedDate(e)},isSelected(e){return!!(S&&e.compare(S.start)>=0&&e.compare(S.end)<=0&&!x.isCellDisabled(e)&&!x.isCellUnavailable(e))},isInvalid(e){return x.isInvalid(e)||ck(e,_?.start,_?.end)},isDragging:w,setDragging:T,clearSelection(){p(null),d(null)},focusNearestAvailableDate(e){let t=g(e),n=e=>this.isInvalid(e)||ck(e,t?.start,t?.end),r=e.add({days:1});n(r)&&(r=e.subtract({days:1})),n(r)||(this.setFocusedDate(r),this.setFocused(!0))}}}function gk(e,t){return!e||!t?null:(t.compare(e)<0&&([e,t]=[t,e]),{start:Jw(e),end:Jw(t)})}function _k(e,t){return e=Zw(e,t?.calendar||new vw),t&&`hour`in t?t.set(e):e}function vk(e,t,n,r){let i=e.add({days:r}),a=e.subtract(n),o=e.add(n);for(;(r<0?i.compare(a)>=0:i.compare(o)<=0)&&!t(i);)i=i.add({days:r});if(t(i))return i.add({days:-r})}var yk=(0,v.createContext)(null),bk=(0,v.createContext)(null),xk=(0,v.createContext)(null),Sk=(0,v.createContext)(null),Rie=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,bk);let{locale:n}=bp(),r=Lie({...e,locale:n,createCalendar:e.createCalendar||_E}),{calendarProps:i,prevButtonProps:a,nextButtonProps:o,errorMessageProps:s,title:c}=Pie(e,r,t),l=Jf({...e,values:{state:r,isDisabled:e.isDisabled||!1,isInvalid:r.isValueInvalid},defaultClassName:`react-aria-RangeCalendar`}),u=Us(e,{global:!0});return v.createElement(np.div,{...W(l,u,i),ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":r.isValueInvalid||void 0},v.createElement(qf,{values:[[Qm,{slots:{previous:a,next:o}}],[ih,{"aria-hidden":!0,level:2,children:c}],[Sk,r],[bk,e],[Hv,{slots:{errorMessage:s}}]]},v.createElement(u_,null,v.createElement(`h2`,null,i[`aria-label`])),l.children,v.createElement(u_,null,v.createElement(`button`,{"aria-label":o[`aria-label`],disabled:o.isDisabled,onClick:()=>r.focusNextPage(),tabIndex:-1}))))}),Ck=(0,v.createContext)(null),zie=(0,v.forwardRef)(function(e,t){let n=(0,v.useContext)(xk),r=(0,v.useContext)(Sk),i=Xf(yk),a=Xf(bk),o=n??r,s=o.visibleRange.start;e.offset&&(s=s.add(e.offset));let c=i?.firstDayOfWeek??a?.firstDayOfWeek,{gridProps:l,headerProps:u,weekDays:d,weeksInMonth:f}=ak({startDate:s,endDate:Mw(s),weekdayStyle:e.weekdayStyle,firstDayOfWeek:c},o),p=Us(e,{global:!0});return v.createElement(Ck.Provider,{value:{headerProps:u,weekDays:d,startDate:s,weeksInMonth:f}},v.createElement(np.table,{render:e.render,...W(p,l),ref:t,style:e.style,cellPadding:0,className:e.className??`react-aria-CalendarGrid`},typeof e.children==`function`?v.createElement(v.Fragment,null,v.createElement(wk,null,e=>v.createElement(Tk,null,e)),v.createElement(Ek,null,e.children)):e.children))});function Bie(e,t){let{children:n,style:r,className:i}=e,{headerProps:a,weekDays:o}=(0,v.useContext)(Ck),s=Us(e,{global:!0});return v.createElement(np.thead,{render:e.render,...W(s,a),ref:t,style:r,className:i??`react-aria-CalendarGridHeader`},v.createElement(`tr`,null,o.map((e,t)=>v.cloneElement(n(e),{key:t}))))}var wk=(0,v.forwardRef)(Bie);function Vie(e,t){let{children:n,style:r,className:i}=e,a=Us(e,{global:!0});return v.createElement(np.th,{render:e.render,...a,ref:t,style:r,className:i||`react-aria-CalendarHeaderCell`},n)}var Tk=(0,v.forwardRef)(Vie);function Hie(e,t){let{children:n,style:r,className:i}=e,a=(0,v.useContext)(xk),o=(0,v.useContext)(Sk),s=a??o,{startDate:c,weeksInMonth:l}=(0,v.useContext)(Ck),u=Us(e,{global:!0});return v.createElement(np.tbody,{render:e.render,...u,ref:t,style:r,className:i??`react-aria-CalendarGridBody`},[...Array(l).keys()].map(e=>v.createElement(`tr`,{key:e},s.getDatesInWeek(e,c).map((e,t)=>e?v.cloneElement(n(e),{key:t}):v.createElement(`td`,{key:t})))))}var Ek=(0,v.forwardRef)(Hie),Uie=(0,v.forwardRef)(function({date:e,...t},n){let r=(0,v.useContext)(xk),i=(0,v.useContext)(Sk),a=r??i,{startDate:o}=(0,v.useContext)(Ck)??{startDate:a.visibleRange.start},s=a.visibleDuration.days||a.visibleDuration.weeks?!1:!are(o,e),c=xw(e,a.timeZone),l=(0,v.useRef)(null),{cellProps:u,buttonProps:d,...f}=Mie({date:e,isOutsideMonth:s},a,l),{hoverProps:p,isHovered:m}=Zm({...t,isDisabled:f.isDisabled||f.isUnavailable}),{focusProps:h,isFocusVisible:g}=Gm();g&&=f.isFocused;let _=!1,y=!1;`highlightedRange`in a&&a.highlightedRange&&(_=yw(e,a.highlightedRange.start),y=yw(e,a.highlightedRange.end));let b=Jf({...t,defaultChildren:f.formattedDate,defaultClassName:`react-aria-CalendarCell`,values:{date:e,isHovered:m,isOutsideMonth:s,isFocusVisible:g,isSelectionStart:_,isSelectionEnd:y,isToday:c,...f}}),x={"data-focused":f.isFocused||void 0,"data-hovered":m||void 0,"data-pressed":f.isPressed||void 0,"data-unavailable":f.isUnavailable||void 0,"data-disabled":f.isDisabled||void 0,"data-focus-visible":g||void 0,"data-outside-visible-range":f.isOutsideVisibleRange||void 0,"data-outside-month":s||void 0,"data-selected":f.isSelected||void 0,"data-selection-start":_||void 0,"data-selection-end":y||void 0,"data-invalid":f.isInvalid||void 0,"data-today":c||void 0},S=Us(t,{global:!0});return v.createElement(`td`,{...u,ref:n},v.createElement(np.div,{...W(S,d,h,p,x,b),ref:l}))}),Wie=(0,v.forwardRef)(function(e,t){let{offset:n,format:r,className:i=`react-aria-CalendarHeading`,...a}=e,o=v.useContext(xk),s=v.useContext(Sk),c=sk({offset:n,format:r},o||s);return v.createElement(ah,{...a,className:i,ref:t},c)});function Gie(e){return e&&e.__esModule?e.default:e}function Kie(e,t,n){let r=s_(Gie(rD),`@react-aria/datepicker`),{isInvalid:i,validationErrors:a,validationDetails:o}=t.displayValidation,{labelProps:s,fieldProps:c,descriptionProps:l,errorMessageProps:u}=$x({...e,labelElementType:`span`,isInvalid:i,errorMessage:e.errorMessage||a}),d=c[`aria-labelledby`]||c.id,{locale:f}=bp(),p=t.formatValue(f,{month:`long`}),m=gc(p?r.format(`selectedRangeDescription`,{startDate:p.start,endDate:p.end}):``),h={"aria-label":r.format(`startDate`),"aria-labelledby":d},g={"aria-label":r.format(`endDate`),"aria-labelledby":d},_=ms(),y=ms(),b=iD(t,n),x=[m[`aria-describedby`],c[`aria-describedby`]].filter(Boolean).join(` `)||void 0,S=(0,v.useMemo)(()=>ig(n,{accept:e=>e.id!==_}),[n,_]),C={[cD]:S,[sD]:`presentation`,"aria-describedby":x,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},w=Us(e),T=(0,v.useRef)(!1),{focusWithinProps:E}=Wm({...e,isDisabled:t.isOpen,onBlurWithin:t=>{Ds(document.getElementById(y),t.relatedTarget)||(T.current=!1,e.onBlur?.(t),e.onFocusChange?.(!1))},onFocusWithin:t=>{T.current||(T.current=!0,e.onFocus?.(t),e.onFocusChange?.(!0))}}),D=(0,v.useRef)(Zb),O=(0,v.useRef)(Zb);return{groupProps:W(w,b,c,m,E,{role:`group`,"aria-disabled":e.isDisabled||null,"aria-describedby":x,onKeyDown(n){t.isOpen||e.onKeyDown&&e.onKeyDown(n)},onKeyUp(n){t.isOpen||e.onKeyUp&&e.onKeyUp(n)}}),labelProps:{...s,onClick:()=>{S.focusFirst()}},buttonProps:{...m,id:_,"aria-haspopup":`dialog`,"aria-label":r.format(`calendar`),"aria-labelledby":`${_} ${d}`,"aria-describedby":x,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:y,"aria-labelledby":`${_} ${d}`},startFieldProps:{...h,...C,value:t.value?.start??null,defaultValue:t.defaultValue?.start,onChange:e=>t.setDateTime(`start`,e),autoFocus:e.autoFocus,name:e.startName,form:e.form,[$b]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){D.current=e,t.updateValidation(ix(e,O.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...g,...C,value:t.value?.end??null,defaultValue:t.defaultValue?.end,onChange:e=>t.setDateTime(`end`,e),name:e.endName,form:e.form,[$b]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){O.current=e,t.updateValidation(ix(D.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:l,errorMessageProps:u,calendarProps:{autoFocus:!0,value:t.dateRange?.start&&t.dateRange.end?t.dateRange:null,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:typeof e.errorMessage==`function`?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(` `),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:i,validationErrors:a,validationDetails:o}}function qie(e){let t=__(e),[n,r]=eh(e.value,e.defaultValue||null,e.onChange),[i]=(0,v.useState)(n),[a,o]=(0,v.useState)(()=>n||{start:null,end:null});n==null&&a.start&&a.end&&(a={start:null,end:null},o(a));let s=n||a,c=e=>{s=e||{start:null,end:null},o(s),Dk(s)?r(s):r(null)},[l,u]=QD(s?.start||s?.end||e.placeholderValue||null,e.granularity),d=l===`hour`||l===`minute`||l===`second`,f=e.shouldCloseOnSelect??!0,[p,m]=(0,v.useState)(null),[h,g]=(0,v.useState)(null);s&&Dk(s)&&(p=s,`hour`in s.start&&(h=s));let _=(e,t)=>{c({start:`timeZone`in t.start?t.start.set(Jw(e.start)):Yw(e.start,t.start),end:`timeZone`in t.end?t.end.set(Jw(e.end)):Yw(e.end,t.end)}),m(null),g(null),D.commitValidation()},y=n=>{let r=typeof f==`function`?f():f;d?Dk(n)&&(r||h?.start&&h?.end)?_(n,{start:h?.start||XD(e.placeholderValue),end:h?.end||XD(e.placeholderValue)}):m(n):Dk(n)?(c(n),D.commitValidation()):m(n),r&&t.setOpen(!1)},b=e=>{Dk(p)&&Dk(e)?_(p,e):g(e)},x=s?.start?.calendar.identifier===`gregory`&&s.start.era===`BC`||s?.end?.calendar.identifier===`gregory`&&s.end.era===`BC`,S=(0,v.useMemo)(()=>({granularity:l,timeZone:u,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:x}),[l,e.hourCycle,e.shouldForceLeadingZeros,u,e.hideTimeZone,x]),{minValue:C,maxValue:w,isDateUnavailable:T}=e,E=(0,v.useMemo)(()=>pie(s,C,w,T?e=>T(e,null):void 0,S),[s,C,w,T,S]),D=ex({...e,value:n,name:(0,v.useMemo)(()=>[e.startName,e.endName].filter(e=>e!=null),[e.startName,e.endName]),builtinValidation:E}),O=D.displayValidation.isInvalid,k=e.validationState||(O?`invalid`:null);return{...D,value:s,defaultValue:e.defaultValue??i,setValue:c,dateRange:p,timeRange:h,granularity:l,hasTime:d,setDate(e,t){y(e===`start`?{start:t,end:p?.end??null}:{start:p?.start??null,end:t})},setTime(e,t){b(e===`start`?{start:t,end:h?.end??null}:{start:h?.start??null,end:t})},setDateTime(e,t){c(e===`start`?{start:t,end:s?.end??null}:{start:s?.start??null,end:t})},setDateRange:y,setTimeRange:b,...t,setOpen(n){!n&&!(s?.start&&s?.end)&&Dk(p)&&d&&_(p,{start:h?.start||XD(e.placeholderValue),end:h?.end||XD(e.placeholderValue)}),t.setOpen(n)},validationState:k,isInvalid:O,formatValue(t,n){if(!s||!s.start||!s.end)return null;let r=`timeZone`in s.start?s.start.timeZone:void 0,i=e.granularity||(s.start&&`minute`in s.start?`minute`:`day`),a=`timeZone`in s.end?s.end.timeZone:void 0,o=e.granularity||(s.end&&`minute`in s.end?`minute`:`day`),c=YD(n,{granularity:i,timeZone:r,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:s.start.calendar.identifier===`gregory`&&s.start.era===`BC`||s.end.calendar.identifier===`gregory`&&s.end.era===`BC`}),l=s.start.toDate(r||`UTC`),u=s.end.toDate(a||`UTC`),d=new yE(t,c),f;if(r===a&&i===o&&s.start.compare(s.end)!==0){try{let e=d.formatRangeToParts(l,u),t=-1;for(let n=0;nt&&(r+=e[i].value);return{start:n,end:r}}catch{}f=d}else f=new yE(t,YD(n,{granularity:o,timeZone:a,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:d.format(l),end:f.format(u)}},getDateFormatter(e,t){return new yE(e,YD({},{...S,...t}))}}}function Dk(e){return e?.start!=null&&e.end!=null}var Jie=(0,v.createContext)(null),Yie=(0,v.createContext)(null),Xie=[Kb,Qm,sp,Hv],Zie=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,Jie);let{validationBehavior:n}=Xf(ax)||{},r=e.validationBehavior??n??`native`,i=qie({...e,validationBehavior:r}),a=(0,v.useRef)(null),[o,s]=Qf(!e[`aria-label`]&&!e[`aria-labelledby`]),{groupProps:c,labelProps:l,startFieldProps:u,endFieldProps:d,buttonProps:f,dialogProps:p,calendarProps:m,descriptionProps:h,errorMessageProps:g,..._}=Kie({...$f(e),label:s,validationBehavior:r},i,a),{focusProps:y,isFocused:b,isFocusVisible:x}=Gm({within:!0}),S=Jf({...e,values:{state:i,isFocusWithin:b,isFocusVisible:x,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1},defaultClassName:`react-aria-DateRangePicker`}),C=Us(e,{global:!0});return delete C.id,v.createElement(qf,{values:[[Yie,i],[Kb,{...c,ref:a,isInvalid:i.isInvalid}],[Qm,{...f,isPressed:i.isOpen}],[sp,{...l,ref:o,elementType:`span`}],[bk,m],[jb,i],[v_,{trigger:`DateRangePicker`,triggerRef:a,placement:`bottom start`,clearContexts:Xie}],[Ab,p],[oO,{slots:{start:u,end:d}}],[Hv,{slots:{description:h,errorMessage:g}}],[Jb,_]]},v.createElement(np.div,{...W(C,S,y),ref:t,slot:e.slot||void 0,"data-focus-within":b||void 0,"data-invalid":i.isInvalid||void 0,"data-focus-visible":x||void 0,"data-disabled":e.isDisabled||void 0,"data-readonly":e.isReadOnly||void 0,"data-required":e.isRequired||void 0,"data-open":i.isOpen||void 0}))}),Ok=(0,v.createContext)({triggerRef:{current:null}}),kk=({children:e,className:t,onOpenChange:n,...r})=>{let i=v.useMemo(()=>pf(),[]),a=(0,v.useRef)(null),[o,s]=v.useState(!1),c=(0,v.useRef)(!1);(0,v.useEffect)(()=>{if(!o)return;let e=e=>{!e.metaKey&&!e.ctrlKey&&!e.altKey&&(c.current=!0)};return window.addEventListener(`keydown`,e,!0),()=>{window.removeEventListener(`keydown`,e,!0)}},[o]);let l=e=>{s(e),!e&&c.current&&window.requestAnimationFrame(()=>{a.current?.focus()}),c.current=!1,n?.(e)};return(0,G.jsx)(Ok,{value:{slots:i,triggerRef:a},children:(0,G.jsx)(Zie,{"data-required":oh(r.isRequired),"data-slot":`date-range-picker`,...r,className:K(t,i?.base()),onOpenChange:l,children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})})};kk.displayName=`HeroUI.DateRangePicker`;var Ak=({children:e,className:t,ref:n,...r})=>{let{slots:i,triggerRef:a}=(0,v.use)(Ok),o=Ns(v.useCallback(e=>{a.current=e},[a]),n);return(0,G.jsx)($m,{ref:o,className:K(t,i?.trigger()),"data-slot":`date-range-picker-trigger`,...r,children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})};Ak.displayName=`HeroUI.DateRangePicker.Trigger`;var jk=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Ok);return(0,G.jsx)(Xc.span,{"aria-hidden":`true`,className:q(r?.triggerIndicator,t),"data-slot":`date-range-picker-trigger-indicator`,...n,children:e||(0,G.jsx)(Nee,{})})};jk.displayName=`HeroUI.DateRangePicker.TriggerIndicator`;var Mk=({children:e=` - `,className:t,...n})=>{let{slots:r}=(0,v.use)(Ok);return(0,G.jsx)(Xc.span,{"aria-hidden":`true`,className:q(r?.rangeSeparator,t),"data-slot":`date-range-picker-range-separator`,...n,children:e})};Mk.displayName=`HeroUI.DateRangePicker.RangeSeparator`;var Nk=({children:e,className:t,placement:n=`bottom`,...r})=>{let{slots:i}=(0,v.use)(Ok);return(0,G.jsx)(gh,{value:{variant:`default`},children:(0,G.jsx)(b_,{...r,className:K(t,i?.popover()),"data-slot":`date-range-picker-popover`,placement:n,children:e})})};Nk.displayName=`HeroUI.DateRangePicker.Popover`;var Pk=Object.assign(kk,{Root:kk,Trigger:Ak,TriggerIndicator:jk,RangeSeparator:Mk,Popover:Nk}),Qie=8,$ie=.3,eae=.5;function tae(e,t){let n=(0,v.use)(jb),r=(0,v.useRef)(null),i=(0,v.useRef)(!1),a=(0,v.useRef)(!1),o=(0,v.useRef)(0),s=(0,v.useRef)(0),c=(0,v.useRef)(0),l=(0,v.useRef)(0),u=(0,v.useRef)(0),d=e===`top`||e===`bottom`,f=(0,v.useCallback)(e=>d?e.clientY:e.clientX,[d]),p=(0,v.useCallback)(t=>{switch(e){case`bottom`:return Math.max(0,t);case`top`:return Math.min(0,t);case`right`:return Math.max(0,t);case`left`:return Math.min(0,t);default:return t}},[e]),m=(0,v.useCallback)(e=>{t&&e.button===0&&(e.target.closest(`input, textarea, button, [role='button'], select, a, [data-slot='drawer-body']`)||(i.current=!0,a.current=!1,o.current=f(e),u.current=o.current,l.current=Date.now(),s.current=0,c.current=0))},[f,t]),h=(0,v.useCallback)(e=>{if(!i.current||!r.current)return;let t=f(e),n=t-o.current,m=p(n);if(!a.current){if(Math.abs(n)0&&(c.current=(t-u.current)/g,l.current=h,u.current=t);let _=d?`Y`:`X`;r.current.style.transform=`translate${_}(${m}px)`},[f,p,d]),g=(0,v.useCallback)(e=>{if(!i.current)return;i.current=!1;let t=r.current;if(!t||!a.current){a.current=!1;return}a.current=!1;try{t.releasePointerCapture(e.pointerId)}catch{}let o=d?t.offsetHeight:t.offsetWidth,l=Math.abs(s.current),u=Math.abs(c.current);(l>o*$ie||u>eae)&&n?n.close():(t.style.transition=`transform 300ms cubic-bezier(0.32, 0.72, 0, 1)`,t.style.transform=``,t.addEventListener(`transitionend`,()=>{t.style.transition=``},{once:!0})),s.current=0,c.current=0},[d,n]);return{dialogRef:r,dragHandlers:t?{onPointerDown:m,onPointerMove:h,onPointerUp:g}:{}}}var Fk=(0,v.createContext)({}),Ik=({children:e,state:t,...n})=>{let r=(0,v.useMemo)(()=>({slots:gf(),placement:void 0,isDismissable:!0}),[]),i=(0,v.useMemo)(()=>t?{isOpen:t.isOpen,onOpenChange:t.setOpen}:{},[t]);return(0,G.jsx)(Fk,{value:r,children:(0,G.jsx)(Mb,{"data-slot":`drawer-root`,...W(n,i),children:e})})};Ik.displayName=`HeroUI.Drawer`;var Lk=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Fk);return(0,G.jsx)($m,{className:K(t,r?.trigger()),"data-slot":`drawer-trigger`,...n,children:e})};Lk.displayName=`HeroUI.Drawer.Trigger`;var Rk=({children:e,className:t,isDismissable:n=!0,variant:r,...i})=>{let{slots:a}=(0,v.use)(Fk),o=(0,v.useMemo)(()=>gf({variant:r}),[r]),s=(0,v.useMemo)(()=>({slots:{...a,...o},isDismissable:n}),[a,o,n]);return(0,G.jsx)(Rb,{className:K(t,o?.backdrop()),"data-slot":`drawer-backdrop`,isDismissable:n,...i,children:t=>(0,G.jsx)(Fk,{value:s,children:typeof e==`function`?e(t):e})})};Rk.displayName=`HeroUI.Drawer.Backdrop`;var zk=({children:e,className:t,placement:n=`bottom`,...r})=>{let{isDismissable:i,slots:a}=(0,v.use)(Fk),o=(0,v.useMemo)(()=>gf({placement:n}),[n]),s=(0,v.useMemo)(()=>({placement:n,isDismissable:i,slots:{...a,...o}}),[a,n,i,o]);return(0,G.jsx)(Lb,{className:K(t,o?.content()),"data-placement":n,"data-slot":`drawer-content`,...r,children:t=>(0,G.jsx)(Fk,{value:s,children:typeof e==`function`?e(t):e})})};zk.displayName=`HeroUI.Drawer.Content`;var Bk=({children:e,className:t,...n})=>{let{isDismissable:r=!0,placement:i,slots:a}=(0,v.use)(Fk),{dialogRef:o,dragHandlers:s}=tae(i,r);return(0,G.jsx)(gh,{value:{variant:`default`},children:(0,G.jsx)(Nb,{ref:o,className:q(a?.dialog,t),"data-placement":i,"data-slot":`drawer-dialog`,style:r?{touchAction:`none`}:void 0,...s,...n,children:e})})};Bk.displayName=`HeroUI.Drawer.Dialog`;var Vk=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Fk);return(0,G.jsx)(Xc.div,{className:q(r?.header,t),"data-slot":`drawer-header`,...n,children:e})};Vk.displayName=`HeroUI.Drawer.Header`;var Hk=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Fk);return(0,G.jsx)(Xc.div,{className:q(r?.body,t),"data-slot":`drawer-body`,style:{touchAction:`pan-y`},...n,children:e})};Hk.displayName=`HeroUI.Drawer.Body`;var Uk=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Fk);return(0,G.jsx)(Xc.div,{className:q(r?.footer,t),"data-slot":`drawer-footer`,...n,children:e})};Uk.displayName=`HeroUI.Drawer.Footer`;var Wk=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Fk);return(0,G.jsx)(ah,{className:q(r?.heading,t),"data-slot":`drawer-heading`,slot:`title`,...n,children:e})};Wk.displayName=`HeroUI.Drawer.Heading`;var Gk=({className:e,...t})=>{let{slots:n}=(0,v.use)(Fk);return(0,G.jsx)(Xc.div,{"aria-hidden":`true`,className:q(n?.handle,e),"data-slot":`drawer-handle`,...t,children:(0,G.jsx)(`div`,{"data-slot":`drawer-handle-bar`})})};Gk.displayName=`HeroUI.Drawer.Handle`;var Kk=({className:e,...t})=>{let{slots:n}=(0,v.use)(Fk);return(0,G.jsx)(Hb,{className:K(e,n?.closeTrigger()),"data-slot":`drawer-close-trigger`,slot:`close`,...t})};Kk.displayName=`HeroUI.Drawer.CloseTrigger`;var qk=Object.assign(Ik,{Root:Ik,Trigger:Lk,Backdrop:Rk,Content:zk,Dialog:Bk,Header:Vk,Heading:Wk,Body:Hk,Footer:Uk,Handle:Gk,CloseTrigger:Kk});function nae(e){let{progressBarProps:t,labelProps:n}=Vp(e);return{meterProps:{...t,role:`meter progressbar`},labelProps:n}}var rae=(0,v.createContext)(null),iae=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,rae);let{value:n=0,minValue:r=0,maxValue:i=100}=e;n=Uc(n,r,i);let a=i-r,[o,s]=Qf(!e[`aria-label`]&&!e[`aria-labelledby`]),{meterProps:c,labelProps:l}=nae({...e,label:s}),u=a===0?0:(n-r)/a*100,d=Jf({...e,defaultClassName:`react-aria-Meter`,values:{percentage:u,valueText:c[`aria-valuetext`]}}),f=Us(e,{global:!0});return v.createElement(np.div,{...W(f,d,c),ref:t,slot:e.slot||void 0},v.createElement(sp.Provider,{value:{...l,ref:o,elementType:`span`}},d.children))});function Jk({children:e,className:t,fullWidth:n,...r}){let i=v.useMemo(()=>Vf({fullWidth:n}),[n]);return(0,G.jsx)(Tie,{"data-required":oh(r.isRequired),"data-slot":`time-field`,...r,className:K(t,i),children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})}var Yk=Object.assign(Jk,{Root:Jk,Group:dO,Input:pO,InputContainer:hO,Segment:mO,Prefix:fO,Suffix:gO}),aae=e=>{let{containerRef:t,isEnabled:n,offset:r,onVisibilityChange:i,orientation:a,visibility:o}=e,s=(0,v.useRef)(null),c=(0,v.useRef)(null),l=(0,v.useCallback)(()=>{let e=t.current;if(!e)return;let n=a===`vertical`,o=n?e.scrollTop:Math.abs(e.scrollLeft),l=n?e.scrollHeight:e.scrollWidth,u=n?e.clientHeight:e.clientWidth,d=o>r,f=o+u+r{c.current=null,n?d&&f?(e.dataset.topBottomScroll=`true`,delete e.dataset.topScroll,delete e.dataset.bottomScroll,i?.(`both`)):(e.dataset.topScroll=String(d),e.dataset.bottomScroll=String(f),delete e.dataset.topBottomScroll,i&&i(d?`top`:f?`bottom`:`none`)):d&&f?(e.dataset.leftRightScroll=`true`,delete e.dataset.leftScroll,delete e.dataset.rightScroll,i?.(`both`)):(e.dataset.leftScroll=String(d),e.dataset.rightScroll=String(f),delete e.dataset.leftRightScroll,i&&i(d?`left`:f?`right`:`none`))}))},[t,a,r,i]);(0,v.useEffect)(()=>{let e=t.current;if(!e||!n||o!==`auto`)return;l(),e.addEventListener(`scroll`,l,{passive:!0});let r=new ResizeObserver(l);return r.observe(e),()=>{e.removeEventListener(`scroll`,l),r.disconnect(),c.current!==null&&(cancelAnimationFrame(c.current),c.current=null),s.current=null}},[t,o,n,l])},oae=globalThis?.document?v.useLayoutEffect:v.useEffect,Xk=({children:e,className:t,hideScrollBar:n=!1,isEnabled:r=!0,offset:i=0,onVisibilityChange:a,orientation:o=`vertical`,ref:s,size:c=40,variant:l=`fade`,visibility:u=`auto`,...d})=>{let f=(0,v.useRef)(null);aae({containerRef:f,isEnabled:r,offset:i,onVisibilityChange:a,orientation:o,visibility:u}),oae(()=>{let e=f.current;!e||u===`auto`||(delete e.dataset.topScroll,delete e.dataset.bottomScroll,delete e.dataset.topBottomScroll,delete e.dataset.leftScroll,delete e.dataset.rightScroll,delete e.dataset.leftRightScroll,u===`both`?e.dataset[o===`vertical`?`topBottomScroll`:`leftRightScroll`]=`true`:u!==`none`&&(e.dataset[`${u}Scroll`]=`true`))},[u,o]);let p=(0,v.useMemo)(()=>jf({hideScrollBar:n,orientation:o,variant:l}),[o,n,l]),m={"--scroll-shadow-size":`${c}px`,...d.style};return(0,G.jsx)(`div`,{ref:Ns(f,s),className:p.base({className:t}),"data-orientation":o,"data-scroll-shadow-size":c,"data-slot":`scroll-shadow`,style:m,...d,children:e})};Xk.displayName=`HeroUI.ScrollShadow`;var sae=Object.assign(Xk,{Root:Xk}),Zk=({className:e,orientation:t,variant:n,...r})=>{let i=Xf(Vv),a=t??i?.orientation??`horizontal`;return(0,G.jsx)(Fte,{"data-orientation":a,"data-slot":`separator`,orientation:a,className:Pf({orientation:a,variant:n,className:e}),...r})},cae=Object.assign(Zk,{Root:Zk}),Qk=new Map;function $k(e,t,n=!0){let r=cs();return v.useMemo(()=>{if(t!==void 0)return t;if(!r){if(n&&Qk.has(e))return Qk.get(e);try{let t=document.documentElement,r=getComputedStyle(t).getPropertyValue(e).trim()||void 0;return n&&Qk.set(e,r),r}catch{return}}},[e,t,r,n])}var eA=({animationType:e,className:t,...n})=>{let r=$k(`--skeleton-animation`,e),i=v.useMemo(()=>Ff({animationType:r}),[r]);return(0,G.jsx)(Xc.div,{className:i.base({className:t}),...n})},tA=Object.assign(eA,{Root:eA}),nA=(0,v.createContext)({}),rA=({children:e,className:t,fullWidth:n,isDetached:r=!1,isDisabled:i,orientation:a,size:o,...s})=>{let c=Xf(hS),l=a??c?.orientation??`horizontal`,u=v.useMemo(()=>Uf({fullWidth:n,isDetached:r,orientation:l}),[n,r,l]);return(0,G.jsx)(nA,{value:{slots:u,size:o,isDisabled:i},children:(0,G.jsx)(Ane,{className:K(t,u.base()),"data-slot":`toggle-button-group`,isDisabled:i,orientation:l,...s,children:e})})},lae=({className:e,...t})=>{let{slots:n}=(0,v.use)(nA);return(0,G.jsx)(Xc.span,{"aria-hidden":`true`,className:q(n?.separator,e),"data-slot":`toggle-button-group-separator`,...t})},iA=({children:e,className:t,isIconOnly:n,size:r,style:i,variant:a,...o})=>{let s=(0,v.use)(nA),c=Hf({isIconOnly:n,size:r??s?.size,variant:a});return(0,G.jsx)(Mne,{className:K(t,c),"data-slot":`toggle-button`,style:i,...o,children:t=>typeof e==`function`?e(t):e})},aA=Object.assign(iA,{Root:iA});function uae(e,t,n){let{labelProps:r,inputProps:i,isSelected:a,...o}=CS(e,t,n);return{labelProps:r,inputProps:{...i,role:`switch`,checked:a},isSelected:a,...o}}var dae=(0,v.createContext)(null),oA=(0,v.createContext)(null),sA=(0,v.createContext)(null),fae=(0,v.forwardRef)(function(e,t){let{inputRef:n=null,...r}=e;[e,t]=Zf(r,t,dae);let{validationBehavior:i}=Xf(ax)||{},a=e.validationBehavior??i??`native`,o=Zs(Ns(n,e.inputRef===void 0?null:e.inputRef)),s=_S(e),c=uae({...$f(e),children:typeof e.children==`function`||e.children,validationBehavior:a},s,o),{descriptionProps:l,errorMessageProps:u,isSelected:d,isDisabled:f,isReadOnly:p,isInvalid:m,validationDetails:h,validationErrors:g}=c,_=Jf({...e,defaultClassName:`react-aria-SwitchField`,values:{isSelected:d,isDisabled:f,isReadOnly:p,isInvalid:m,isRequired:e.isRequired||!1,state:s}}),y=Us(e,{global:!0});return delete y.id,delete y.onClick,v.createElement(np.div,{...W(y,_),ref:t,slot:e.slot||void 0,"data-selected":d||void 0,"data-disabled":f||void 0,"data-readonly":p||void 0,"data-invalid":m||void 0,"data-required":e.isRequired||void 0},v.createElement(qf,{values:[[oA,s],[sA,{...c,inputRef:o,defaultClassName:`react-aria-SwitchButton`,isRequired:e.isRequired}],[Hv,{slots:{description:l,errorMessage:u}}],[Jb,{isInvalid:m,validationDetails:h,validationErrors:g}]]},_.children))}),pae=(0,v.forwardRef)(function(e,t){let{labelProps:n,inputProps:r,isSelected:i,isDisabled:a,isReadOnly:o,isPressed:s,isInvalid:c,inputRef:l,defaultClassName:u,isRequired:d}=(0,v.useContext)(sA),{isFocused:f,isFocusVisible:p,focusProps:m}=Gm(),h=a||o,g=(0,v.useContext)(oA),{hoverProps:_,isHovered:y}=Zm({...e,isDisabled:h}),b=Jf({...e,defaultClassName:u,values:{isSelected:i,isPressed:s,isHovered:y,isFocused:f,isFocusVisible:p,isDisabled:a,isReadOnly:o,isInvalid:c,isRequired:d||!1,state:g}}),x=Us(e,{global:!0});return delete x.id,delete x.onClick,v.createElement(np.label,{...W(x,n,_,b),ref:t,slot:e.slot||void 0,"data-selected":i||void 0,"data-pressed":s||void 0,"data-hovered":y||void 0,"data-focused":f||void 0,"data-focus-visible":p||void 0,"data-disabled":a||void 0,"data-readonly":o||void 0,"data-invalid":c||void 0,"data-required":d||void 0},v.createElement(u_,{elementType:`span`},v.createElement(`input`,{...W(r,m),ref:l})),b.children)}),cA=(0,v.createContext)({}),lA=({children:e,className:t,size:n,...r})=>{let i=v.useMemo(()=>If({size:n}),[n]);return(0,G.jsx)(fae,{"data-slot":`switch`,...r,className:K(t,i.base()),children:t=>(0,G.jsx)(cA,{value:{slots:i,state:t},children:typeof e==`function`?e(t):e})})};lA.displayName=`HeroUI.Switch`;var uA=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(cA);return(0,G.jsx)(pae,{"data-slot":`switch-content`,...n,className:K(t,r?.content()),children:e})};uA.displayName=`HeroUI.Switch.Content`;var dA=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(cA);return(0,G.jsx)(Xc.span,{className:q(r?.control,t),"data-slot":`switch-control`,...n,children:e})};dA.displayName=`HeroUI.Switch.Control`;var fA=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(cA);return(0,G.jsx)(Xc.span,{className:q(r?.thumb,t),"data-slot":`switch-thumb`,...n,children:e})};fA.displayName=`HeroUI.Switch.Thumb`;var pA=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(cA);return(0,G.jsx)(Xc.span,{className:q(r?.icon,t),"data-slot":`switch-icon`,...n,children:e})};pA.displayName=`HeroUI.Switch.Icon`;var mA=Object.assign(lA,{Root:lA,Content:uA,Control:dA,Thumb:fA,Icon:pA}),hA=new WeakMap;function gA(e,t,n){return e?(typeof t==`string`&&(t=t.replace(/\s+/g,``)),`${hA.get(e)}-${n}-${t}`):``}function mae(e,t,n){let{key:r,isDisabled:i,shouldSelectOnPressUp:a}=e,{selectionManager:o,selectedKey:s}=t,c=r===s,l=i||t.isDisabled||t.selectionManager.isDisabled(r),u=t.collection.getItem(r),{itemProps:d,isPressed:f}=zy({selectionManager:o,key:r,ref:n,isDisabled:l,shouldSelectOnPressUp:a??u?.props.href!=null,linkBehavior:`selection`}),p=gA(t,r,`tab`),m=gA(t,r,`tabpanel`),{tabIndex:h}=d,g=Us(u?.props,{labelable:!0});delete g.id;let _=Jo(u?.props),{focusableProps:v}=wm({...u?.props,isDisabled:l},n);return{tabProps:W(g,v,_,d,{id:p,"aria-selected":c,"aria-disabled":l||void 0,"aria-controls":c?m:void 0,tabIndex:l?void 0:h,role:`tab`}),isSelected:c,isDisabled:l,isPressed:f}}function _A(e,t){let n=t?.isDisabled,[r,i]=(0,v.useState)(!1);return Xo(()=>{if(e?.current&&!n){let t=()=>{if(e.current){let t=rg(e.current,{tabbable:!0});i(!!t.nextNode())}};t();let n=new MutationObserver(t);return n.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`tabIndex`,`disabled`]}),()=>{n.disconnect()}}}),!n&&r}function hae(e,t,n){let r=_A(n)?void 0:0,i=gA(t,e.id??t?.selectedKey,`tabpanel`);return{tabPanelProps:W(Xs({...e,id:i,"aria-labelledby":gA(t,t?.selectedKey,`tab`)}),{tabIndex:r,role:`tabpanel`,"aria-describedby":e[`aria-describedby`],"aria-details":e[`aria-details`]})}}var gae=class{constructor(e,t,n,r=new Set){this.collection=e,this.flipDirection=t===`rtl`&&n===`horizontal`,this.disabledKeys=r,this.tabDirection=n===`horizontal`}getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){return this.disabledKeys.has(e)||!!this.collection.getItem(e)?.props?.isDisabled}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){let t=e;do t=this.collection.getKeyAfter(t),t??=this.collection.getFirstKey();while(t!=null&&this.isDisabled(t)&&t!==e);return t}getPreviousKey(e){let t=e;do t=this.collection.getKeyBefore(t),t??=this.collection.getLastKey();while(t!=null&&this.isDisabled(t)&&t!==e);return t}};function _ae(e,t,n){let{orientation:r=`horizontal`,keyboardActivation:i=`automatic`}=e,{collection:a,selectionManager:o,disabledKeys:s}=t,{direction:c}=bp(),{collectionProps:l}=Ny({ref:n,selectionManager:o,keyboardDelegate:(0,v.useMemo)(()=>new gae(a,c,r,s),[a,s,r,c]),selectOnFocus:i===`automatic`,disallowEmptySelection:!0,scrollRef:n,linkBehavior:`selection`}),u=ms();return hA.set(t,u),{tabListProps:{...W(l,Xs({...e,id:u})),role:`tablist`,"aria-orientation":r,tabIndex:void 0}}}function vae(e){let[t,n]=eh(e.selectedKey,e.defaultSelectedKey??null,e.onSelectionChange),r=(0,v.useMemo)(()=>t==null?[]:[t],[t]),{collection:i,disabledKeys:a,selectionManager:o}=qx({...e,selectionMode:`single`,disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:r,onSelectionChange:r=>{if(r===`all`)return;let i=r.values().next().value??null;i===t&&e.onSelectionChange&&e.onSelectionChange(i),n(i)}});return{collection:i,disabledKeys:a,selectionManager:o,selectedKey:t,setSelectedKey:n,selectedItem:t==null?null:i.getItem(t)}}function yae(e){let t=vae({...e,onSelectionChange:e.onSelectionChange?t=>{t!=null&&e.onSelectionChange?.(t)}:void 0,suppressTextValueWarning:!0,defaultSelectedKey:e.defaultSelectedKey??vA(e.collection,e.disabledKeys?new Set(e.disabledKeys):new Set)??void 0}),{selectionManager:n,collection:r,selectedKey:i}=t,a=(0,v.useRef)(i);return(0,v.useEffect)(()=>{let o=i;e.selectedKey==null&&(n.isEmpty||o==null||!r.getItem(o))&&(o=vA(r,t.disabledKeys),o!=null&&n.setSelectedKeys([o])),(o!=null&&n.focusedKey==null||!n.isFocused&&o!==a.current)&&n.setFocusedKey(o),a.current=o}),{...t,isDisabled:e.isDisabled||!1}}function vA(e,t){let n=null;if(e){for(n=e.getFirstKey();n!=null&&(t.has(n)||e.getItem(n)?.props?.isDisabled)&&n!==e.getLastKey();)n=e.getKeyAfter(n);n!=null&&(t.has(n)||e.getItem(n)?.props?.isDisabled)&&n===e.getLastKey()&&(n=e.getFirstKey())}return n}var yA=(0,v.createContext)(null),bA=(0,v.createContext)(null),bae=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,yA);let{children:n,orientation:r=`horizontal`}=e;return n=(0,v.useMemo)(()=>typeof n==`function`?n({orientation:r,defaultChildren:null}):n,[n,r]),v.createElement(L_,{content:n},n=>v.createElement(xae,{props:e,collection:n,tabsRef:t}))});function xae({props:e,tabsRef:t,collection:n}){let{orientation:r=`horizontal`}=e,i=yae({...e,collection:n,children:void 0}),{focusProps:a,isFocused:o,isFocusVisible:s}=Gm({within:!0}),c=(0,v.useMemo)(()=>({orientation:r,isFocusWithin:o,isFocusVisible:s}),[r,o,s]),l=Jf({...e,defaultClassName:`react-aria-Tabs`,values:c}),u=Us(e,{global:!0});return v.createElement(np.div,{...W(u,l,a),ref:t,slot:e.slot||void 0,"data-focused":o||void 0,"data-orientation":r,"data-focus-visible":s||void 0,"data-disabled":i.isDisabled||void 0},v.createElement(qf,{values:[[yA,e],[bA,i]]},l.children))}var xA=(0,v.forwardRef)(function(e,t){return(0,v.useContext)(bA)?v.createElement(Sae,{props:e,forwardedRef:t}):v.createElement(W_,e)});function Sae({props:e,forwardedRef:t}){let n=(0,v.useContext)(bA),{CollectionRoot:r}=(0,v.useContext)(J_),{orientation:i=`horizontal`,keyboardActivation:a=`automatic`}=Xf(yA),o=Zs(t),{tabListProps:s}=_ae({...e,orientation:i,keyboardActivation:a},n,o),c=Jf({...e,children:null,defaultClassName:`react-aria-TabList`,values:{orientation:i,state:n}}),l=Us(e,{global:!0});return delete l.id,v.createElement(np.div,{...W(l,c,s),ref:o,"data-orientation":i||void 0},v.createElement(zv,null,v.createElement(r,{collection:n.collection,persistedKeys:Y_(n.selectionManager.focusedKey)})))}var Cae=B_(class extends x_{static{this.type=`item`}},(e,t,n)=>{let r=(0,v.useContext)(bA),i=Zs(t),{tabProps:a,isSelected:o,isDisabled:s,isPressed:c}=mae({key:n.key,...e},r,i),{focusProps:l,isFocused:u,isFocusVisible:d}=Gm(),{hoverProps:f,isHovered:p}=Zm({isDisabled:s,onHoverStart:e.onHoverStart,onHoverEnd:e.onHoverEnd,onHoverChange:e.onHoverChange}),m=Jf({...e,id:void 0,children:n.rendered,defaultClassName:`react-aria-Tab`,values:{isSelected:o,isDisabled:s,isFocused:u,isFocusVisible:d,isPressed:c,isHovered:p}}),h=n.props.href?np.a:np.div,g=Us(e,{global:!0});return delete g.id,delete g.onClick,v.createElement(h,{...W(g,m,a,l,f),ref:i,"data-selected":o||void 0,"data-disabled":s||void 0,"data-focused":u||void 0,"data-focus-visible":d||void 0,"data-pressed":c||void 0,"data-hovered":p||void 0},v.createElement(Bv.Provider,{value:{isSelected:o}},m.children))}),wae=ap(function(e,t){let n=(0,v.useContext)(bA),r=Zs(t),i=n.selectedKey===e.id,[a,o]=(0,v.useState)(n.selectedKey==null?null:i);a==null&&n.selectedKey!=null?o(i):!i&&a&&o(!1);let s=Oc(r,i);return!i&&!e.shouldForceMount&&!s?null:v.createElement(Tae,{...e,tabPanelRef:r,isInitiallySelected:a||!1,isExiting:s})});function Tae(e){let t=(0,v.useContext)(bA),{id:n,tabPanelRef:r,isInitiallySelected:i,isExiting:a,...o}=e,{tabPanelProps:s}=hae(e,t,r),{focusProps:c,isFocused:l,isFocusVisible:u}=Gm(),d=t.selectedKey===e.id,f=Dc(r)&&!i,p=Jf({...e,defaultClassName:`react-aria-TabPanel`,values:{isFocused:l,isFocusVisible:u,isInert:Tc(!d),isEntering:f,isExiting:a,state:t}}),m=Us(o,{global:!0});delete m.id;let h=d?W(m,s,c,p):W(m,p);return v.createElement(np.div,{...h,ref:r,"data-focused":l||void 0,"data-focus-visible":u||void 0,inert:Tc(!d||e.inert),"data-inert":d?void 0:`true`,"data-entering":f||void 0,"data-exiting":a||void 0},v.createElement(qf,{values:[[yA,null],[bA,null]]},v.createElement(J_.Provider,{value:K_},p.children)))}var SA=(0,v.createContext)({}),CA=fw(`tabs.listContainer`),wA=({children:e,className:t,orientation:n=`horizontal`,variant:r,...i})=>{let a=v.useMemo(()=>Rf({variant:r}),[r]);return(0,G.jsx)(SA,{value:{orientation:n,slots:a},children:(0,G.jsx)(bae,{...i,className:K(t,a.base()),"data-slot":`tabs`,orientation:n,children:e})})},Eae=({children:e,className:t,render:n,...r})=>(0,G.jsx)(CA.Injector,{...r,className:t,render:n,children:e}),Dae=({children:e,className:t,...n})=>{let{orientation:r=`horizontal`,slots:i}=(0,v.use)(SA),a=(0,v.useRef)(null),o=r===`vertical`,[s,c]=CA.useSlot(n),l=(0,v.useCallback)(e=>{let t=a.current;if(!t)return;let n=o?t.clientHeight:t.clientWidth,r=o?t.scrollHeight:t.scrollWidth,i=Math.max(0,r-n),s=!o&&getComputedStyle(t).direction===`rtl`,c=e*n*.8*(s?-1:1),l=o?t.scrollTop:t.scrollLeft,u=Math.min(s?0:i,Math.max(s?-i:0,l+c));u!==l&&t.scrollTo({behavior:`smooth`,[o?`top`:`left`]:u})},[o]);if(!s)return(0,G.jsx)(xA,{...c,className:K(t,i?.tabList()),"data-slot":`tabs-list`,children:e});let{className:u,render:d,...f}=s;return(0,G.jsx)(xA,{...c,className:K(t,i?.tabList()),"data-slot":`tabs-list`,render:e=>{let{children:t,className:n,ref:s,...c}=e;return(0,G.jsxs)(Xc.div,{className:q(i?.tabListContainer,u),"data-slot":`tabs-list-container`,render:d,...f,children:[(0,G.jsx)(sae,{ref:a,hideScrollBar:!0,className:q(i?.scroller),orientation:r,size:64,children:(0,G.jsx)(`div`,{...c,ref:s,className:n,children:t})}),(0,G.jsx)(`button`,{"aria-label":o?`Scroll tabs up`:`Scroll tabs left`,className:q(i?.scrollPrev),tabIndex:-1,type:`button`,onClick:()=>l(-1),children:o?(0,G.jsx)(ch,{}):(0,G.jsx)(lh,{})}),(0,G.jsx)(`button`,{"aria-label":o?`Scroll tabs down`:`Scroll tabs right`,className:q(i?.scrollNext),tabIndex:-1,type:`button`,onClick:()=>l(1),children:o?(0,G.jsx)(sh,{}):(0,G.jsx)(uh,{})})]})},children:e})},TA=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(SA);return(0,G.jsx)(Cae,{...n,className:K(t,r?.tab()),"data-slot":`tabs-tab`,children:e})},EA=Object.assign(wA,{Root:wA,ListContainer:Eae,List:Dae,Tab:TA,Indicator:({className:e,...t})=>{let{slots:n}=(0,v.use)(SA);return(0,G.jsx)(Nte,{className:q(n?.tabIndicator,e),"data-slot":`tabs-indicator`,...t})},Separator:({className:e,...t})=>{let{slots:n}=(0,v.use)(SA);return(0,G.jsx)(Xc.span,{"aria-hidden":`true`,className:q(n?.separator,e),"data-slot":`tabs-separator`,...t})},Panel:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(SA);return(0,G.jsx)(wae,{...n,className:K(t,r?.tabPanel()),"data-slot":`tabs-panel`,children:e})}}),DA={};DA={deselectedItem:e=>`${e.item} \u{63A}\u{64A}\u{631} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`,longPressToSelect:`اضغط مطولًا للدخول إلى وضع التحديد.`,select:`تحديد`,selectedAll:`جميع العناصر المحددة.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`لم يتم تحديد عناصر`,one:()=>`${t.number(e.count)} \u{639}\u{646}\u{635}\u{631} \u{645}\u{62D}\u{62F}\u{62F}`,other:()=>`${t.number(e.count)} \u{639}\u{646}\u{635}\u{631} \u{645}\u{62D}\u{62F}\u{62F}`})}.`,selectedItem:e=>`${e.item} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`};var OA={};OA={deselectedItem:e=>`${e.item} \u{43D}\u{435} \u{435} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}.`,longPressToSelect:`Натиснете и задръжте за да влезете в избирателен режим.`,select:`Изберете`,selectedAll:`Всички елементи са избрани.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Няма избрани елементи`,one:()=>`${t.number(e.count)} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}`,other:()=>`${t.number(e.count)} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{438}`})}.`,selectedItem:e=>`${e.item} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}.`};var kA={};kA={deselectedItem:e=>`Polo\u{17E}ka ${e.item} nen\xed vybr\xe1na.`,longPressToSelect:`Dlouhým stisknutím přejdete do režimu výběru.`,select:`Vybrat`,selectedAll:`Vybrány všechny položky.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nevybrány žádné položky`,one:()=>`Vybr\xe1na ${t.number(e.count)} polo\u{17E}ka`,other:()=>`Vybr\xe1no ${t.number(e.count)} polo\u{17E}ek`})}.`,selectedItem:e=>`Vybr\xe1na polo\u{17E}ka ${e.item}.`};var AA={};AA={deselectedItem:e=>`${e.item} ikke valgt.`,longPressToSelect:`Lav et langt tryk for at aktivere valgtilstand.`,select:`Vælg`,selectedAll:`Alle elementer valgt.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Ingen elementer valgt`,one:()=>`${t.number(e.count)} element valgt`,other:()=>`${t.number(e.count)} elementer valgt`})}.`,selectedItem:e=>`${e.item} valgt.`};var jA={};jA={deselectedItem:e=>`${e.item} nicht ausgew\xe4hlt.`,longPressToSelect:`Gedrückt halten, um Auswahlmodus zu öffnen.`,select:`Auswählen`,selectedAll:`Alle Elemente ausgewählt.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Keine Elemente ausgewählt`,one:()=>`${t.number(e.count)} Element ausgew\xe4hlt`,other:()=>`${t.number(e.count)} Elemente ausgew\xe4hlt`})}.`,selectedItem:e=>`${e.item} ausgew\xe4hlt.`};var MA={};MA={deselectedItem:e=>`\u{394}\u{3B5}\u{3BD} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} \u{3C4}\u{3BF} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF} ${e.item}.`,longPressToSelect:`Πατήστε παρατεταμένα για να μπείτε σε λειτουργία επιλογής.`,select:`Επιλογή`,selectedAll:`Επιλέχθηκαν όλα τα στοιχεία.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Δεν επιλέχθηκαν στοιχεία`,one:()=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} ${t.number(e.count)} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF}`,other:()=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B1}\u{3BD} ${t.number(e.count)} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3B1}`})}.`,selectedItem:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} \u{3C4}\u{3BF} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF} ${e.item}.`};var NA={};NA={deselectedItem:e=>`${e.item} not selected.`,select:`Select`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`No items selected`,one:()=>`${t.number(e.count)} item selected`,other:()=>`${t.number(e.count)} items selected`})}.`,selectedAll:`All items selected.`,selectedItem:e=>`${e.item} selected.`,longPressToSelect:`Long press to enter selection mode.`};var PA={};PA={deselectedItem:e=>`${e.item} no seleccionado.`,longPressToSelect:`Mantenga pulsado para abrir el modo de selección.`,select:`Seleccionar`,selectedAll:`Todos los elementos seleccionados.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Ningún elemento seleccionado`,one:()=>`${t.number(e.count)} elemento seleccionado`,other:()=>`${t.number(e.count)} elementos seleccionados`})}.`,selectedItem:e=>`${e.item} seleccionado.`};var FA={};FA={deselectedItem:e=>`${e.item} pole valitud.`,longPressToSelect:`Valikurežiimi sisenemiseks vajutage pikalt.`,select:`Vali`,selectedAll:`Kõik üksused valitud.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Üksusi pole valitud`,one:()=>`${t.number(e.count)} \xfcksus valitud`,other:()=>`${t.number(e.count)} \xfcksust valitud`})}.`,selectedItem:e=>`${e.item} valitud.`};var IA={};IA={deselectedItem:e=>`Kohdetta ${e.item} ei valittu.`,longPressToSelect:`Siirry valintatilaan painamalla pitkään.`,select:`Valitse`,selectedAll:`Kaikki kohteet valittu.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Ei yhtään kohdetta valittu`,one:()=>`${t.number(e.count)} kohde valittu`,other:()=>`${t.number(e.count)} kohdetta valittu`})}.`,selectedItem:e=>`${e.item} valittu.`};var LA={};LA={deselectedItem:e=>`${e.item} non s\xe9lectionn\xe9.`,longPressToSelect:`Appuyez de manière prolongée pour passer en mode de sélection.`,select:`Sélectionner`,selectedAll:`Tous les éléments sélectionnés.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Aucun élément sélectionné`,one:()=>`${t.number(e.count)} \xe9l\xe9ment s\xe9lectionn\xe9`,other:()=>`${t.number(e.count)} \xe9l\xe9ments s\xe9lectionn\xe9s`})}.`,selectedItem:e=>`${e.item} s\xe9lectionn\xe9.`};var RA={};RA={deselectedItem:e=>`${e.item} \u{5DC}\u{5D0} \u{5E0}\u{5D1}\u{5D7}\u{5E8}.`,longPressToSelect:`הקשה ארוכה לכניסה למצב בחירה.`,select:`בחר`,selectedAll:`כל הפריטים נבחרו.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`לא נבחרו פריטים`,one:()=>`\u{5E4}\u{5E8}\u{5D9}\u{5D8} ${t.number(e.count)} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`,other:()=>`${t.number(e.count)} \u{5E4}\u{5E8}\u{5D9}\u{5D8}\u{5D9}\u{5DD} \u{5E0}\u{5D1}\u{5D7}\u{5E8}\u{5D5}`})}.`,selectedItem:e=>`${e.item} \u{5E0}\u{5D1}\u{5D7}\u{5E8}.`};var zA={};zA={deselectedItem:e=>`Stavka ${e.item} nije odabrana.`,longPressToSelect:`Dugo pritisnite za ulazak u način odabira.`,select:`Odaberite`,selectedAll:`Odabrane su sve stavke.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nije odabrana nijedna stavka`,one:()=>`Odabrana je ${t.number(e.count)} stavka`,other:()=>`Odabrano je ${t.number(e.count)} stavki`})}.`,selectedItem:e=>`Stavka ${e.item} je odabrana.`};var BA={};BA={deselectedItem:e=>`${e.item} nincs kijel\xf6lve.`,longPressToSelect:`Nyomja hosszan a kijelöléshez.`,select:`Kijelölés`,selectedAll:`Az összes elem kijelölve.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Egy elem sincs kijelölve`,one:()=>`${t.number(e.count)} elem kijel\xf6lve`,other:()=>`${t.number(e.count)} elem kijel\xf6lve`})}.`,selectedItem:e=>`${e.item} kijel\xf6lve.`};var VA={};VA={deselectedItem:e=>`${e.item} non selezionato.`,longPressToSelect:`Premi a lungo per passare alla modalità di selezione.`,select:`Seleziona`,selectedAll:`Tutti gli elementi selezionati.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nessun elemento selezionato`,one:()=>`${t.number(e.count)} elemento selezionato`,other:()=>`${t.number(e.count)} elementi selezionati`})}.`,selectedItem:e=>`${e.item} selezionato.`};var HA={};HA={deselectedItem:e=>`${e.item} \u{304C}\u{9078}\u{629E}\u{3055}\u{308C}\u{3066}\u{3044}\u{307E}\u{305B}\u{3093}\u{3002}`,longPressToSelect:`長押しして選択モードを開きます。`,select:`選択`,selectedAll:`すべての項目を選択しました。`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`項目が選択されていません`,one:()=>`${t.number(e.count)} \u{9805}\u{76EE}\u{3092}\u{9078}\u{629E}\u{3057}\u{307E}\u{3057}\u{305F}`,other:()=>`${t.number(e.count)} \u{9805}\u{76EE}\u{3092}\u{9078}\u{629E}\u{3057}\u{307E}\u{3057}\u{305F}`})}\u{3002}`,selectedItem:e=>`${e.item} \u{3092}\u{9078}\u{629E}\u{3057}\u{307E}\u{3057}\u{305F}\u{3002}`};var UA={};UA={deselectedItem:e=>`${e.item}\u{C774}(\u{AC00}) \u{C120}\u{D0DD}\u{B418}\u{C9C0} \u{C54A}\u{C558}\u{C2B5}\u{B2C8}\u{B2E4}.`,longPressToSelect:`선택 모드로 들어가려면 길게 누르십시오.`,select:`선택`,selectedAll:`모든 항목이 선택되었습니다.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`선택된 항목이 없습니다`,one:()=>`${t.number(e.count)}\u{AC1C} \u{D56D}\u{BAA9}\u{C774} \u{C120}\u{D0DD}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}`,other:()=>`${t.number(e.count)}\u{AC1C} \u{D56D}\u{BAA9}\u{C774} \u{C120}\u{D0DD}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}`})}.`,selectedItem:e=>`${e.item}\u{C774}(\u{AC00}) \u{C120}\u{D0DD}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}.`};var WA={};WA={deselectedItem:e=>`${e.item} nepasirinkta.`,longPressToSelect:`Norėdami įjungti pasirinkimo režimą, paspauskite ir palaikykite.`,select:`Pasirinkti`,selectedAll:`Pasirinkti visi elementai.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nepasirinktas nė vienas elementas`,one:()=>`Pasirinktas ${t.number(e.count)} elementas`,other:()=>`Pasirinkta element\u{173}: ${t.number(e.count)}`})}.`,selectedItem:e=>`Pasirinkta: ${e.item}.`};var GA={};GA={deselectedItem:e=>`Vienums ${e.item} nav atlas\u{12B}ts.`,longPressToSelect:`Ilgi turiet nospiestu. lai ieslēgtu atlases režīmu.`,select:`Atlasīt`,selectedAll:`Atlasīti visi vienumi.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nav atlasīts neviens vienums`,one:()=>`Atlas\u{12B}to vienumu skaits: ${t.number(e.count)}`,other:()=>`Atlas\u{12B}to vienumu skaits: ${t.number(e.count)}`})}.`,selectedItem:e=>`Atlas\u{12B}ts vienums ${e.item}.`};var KA={};KA={deselectedItem:e=>`${e.item} er ikke valgt.`,longPressToSelect:`Bruk et langt trykk for å gå inn i valgmodus.`,select:`Velg`,selectedAll:`Alle elementer er valgt.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Ingen elementer er valgt`,one:()=>`${t.number(e.count)} element er valgt`,other:()=>`${t.number(e.count)} elementer er valgt`})}.`,selectedItem:e=>`${e.item} er valgt.`};var qA={};qA={deselectedItem:e=>`${e.item} niet geselecteerd.`,longPressToSelect:`Druk lang om de selectiemodus te openen.`,select:`Selecteren`,selectedAll:`Alle items geselecteerd.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Geen items geselecteerd`,one:()=>`${t.number(e.count)} item geselecteerd`,other:()=>`${t.number(e.count)} items geselecteerd`})}.`,selectedItem:e=>`${e.item} geselecteerd.`};var JA={};JA={deselectedItem:e=>`Nie zaznaczono ${e.item}.`,longPressToSelect:`Naciśnij i przytrzymaj, aby wejść do trybu wyboru.`,select:`Zaznacz`,selectedAll:`Wszystkie zaznaczone elementy.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nie zaznaczono żadnych elementów`,one:()=>`${t.number(e.count)} zaznaczony element`,other:()=>`${t.number(e.count)} zaznaczonych element\xf3w`})}.`,selectedItem:e=>`Zaznaczono ${e.item}.`};var YA={};YA={deselectedItem:e=>`${e.item} n\xe3o selecionado.`,longPressToSelect:`Mantenha pressionado para entrar no modo de seleção.`,select:`Selecionar`,selectedAll:`Todos os itens selecionados.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nenhum item selecionado`,one:()=>`${t.number(e.count)} item selecionado`,other:()=>`${t.number(e.count)} itens selecionados`})}.`,selectedItem:e=>`${e.item} selecionado.`};var XA={};XA={deselectedItem:e=>`${e.item} n\xe3o selecionado.`,longPressToSelect:`Prima continuamente para entrar no modo de seleção.`,select:`Selecionar`,selectedAll:`Todos os itens selecionados.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nenhum item selecionado`,one:()=>`${t.number(e.count)} item selecionado`,other:()=>`${t.number(e.count)} itens selecionados`})}.`,selectedItem:e=>`${e.item} selecionado.`};var ZA={};ZA={deselectedItem:e=>`${e.item} neselectat.`,longPressToSelect:`Apăsați lung pentru a intra în modul de selectare.`,select:`Selectare`,selectedAll:`Toate elementele selectate.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Niciun element selectat`,one:()=>`${t.number(e.count)} element selectat`,other:()=>`${t.number(e.count)} elemente selectate`})}.`,selectedItem:e=>`${e.item} selectat.`};var QA={};QA={deselectedItem:e=>`${e.item} \u{43D}\u{435} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`,longPressToSelect:`Нажмите и удерживайте для входа в режим выбора.`,select:`Выбрать`,selectedAll:`Выбраны все элементы.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Нет выбранных элементов`,one:()=>`${t.number(e.count)} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}`,other:()=>`${t.number(e.count)} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{43E}\u{432} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E}`})}.`,selectedItem:e=>`${e.item} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`};var $A={};$A={deselectedItem:e=>`Nevybrat\xe9 polo\u{17E}ky: ${e.item}.`,longPressToSelect:`Dlhším stlačením prejdite do režimu výberu.`,select:`Vybrať`,selectedAll:`Všetky vybraté položky.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Žiadne vybraté položky`,one:()=>`${t.number(e.count)} vybrat\xe1 polo\u{17E}ka`,other:()=>`Po\u{10D}et vybrat\xfdch polo\u{17E}iek:${t.number(e.count)}`})}.`,selectedItem:e=>`Vybrat\xe9 polo\u{17E}ky: ${e.item}.`};var ej={};ej={deselectedItem:e=>`Element ${e.item} ni izbran.`,longPressToSelect:`Za izbirni način pritisnite in dlje časa držite.`,select:`Izberite`,selectedAll:`Vsi elementi so izbrani.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Noben element ni izbran`,one:()=>`${t.number(e.count)} element je izbran`,other:()=>`${t.number(e.count)} elementov je izbranih`})}.`,selectedItem:e=>`Element ${e.item} je izbran.`};var tj={};tj={deselectedItem:e=>`${e.item} nije izabrano.`,longPressToSelect:`Dugo pritisnite za ulazak u režim biranja.`,select:`Izaberite`,selectedAll:`Izabrane su sve stavke.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nije izabrana nijedna stavka`,one:()=>`Izabrana je ${t.number(e.count)} stavka`,other:()=>`Izabrano je ${t.number(e.count)} stavki`})}.`,selectedItem:e=>`${e.item} je izabrano.`};var nj={};nj={deselectedItem:e=>`${e.item} ej markerat.`,longPressToSelect:`Tryck länge när du vill öppna väljarläge.`,select:`Markera`,selectedAll:`Alla markerade objekt.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Inga markerade objekt`,one:()=>`${t.number(e.count)} markerat objekt`,other:()=>`${t.number(e.count)} markerade objekt`})}.`,selectedItem:e=>`${e.item} markerat.`};var rj={};rj={deselectedItem:e=>`${e.item} se\xe7ilmedi.`,longPressToSelect:`Seçim moduna girmek için uzun basın.`,select:`Seç`,selectedAll:`Tüm ögeler seçildi.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Hiçbir öge seçilmedi`,one:()=>`${t.number(e.count)} \xf6ge se\xe7ildi`,other:()=>`${t.number(e.count)} \xf6ge se\xe7ildi`})}.`,selectedItem:e=>`${e.item} se\xe7ildi.`};var ij={};ij={deselectedItem:e=>`${e.item} \u{43D}\u{435} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`,longPressToSelect:`Виконайте довге натиснення, щоб перейти в режим вибору.`,select:`Вибрати`,selectedAll:`Усі елементи вибрано.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Жодних елементів не вибрано`,one:()=>`${t.number(e.count)} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E}`,other:()=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{456}\u{432}: ${t.number(e.count)}`})}.`,selectedItem:e=>`${e.item} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`};var aj={};aj={deselectedItem:e=>`\u{672A}\u{9009}\u{62E9} ${e.item}\u{3002}`,longPressToSelect:`长按以进入选择模式。`,select:`选择`,selectedAll:`已选择所有项目。`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`未选择项目`,one:()=>`\u{5DF2}\u{9009}\u{62E9} ${t.number(e.count)} \u{4E2A}\u{9879}\u{76EE}`,other:()=>`\u{5DF2}\u{9009}\u{62E9} ${t.number(e.count)} \u{4E2A}\u{9879}\u{76EE}`})}\u{3002}`,selectedItem:e=>`\u{5DF2}\u{9009}\u{62E9} ${e.item}\u{3002}`};var oj={};oj={deselectedItem:e=>`\u{672A}\u{9078}\u{53D6}\u{300C}${e.item}\u{300D}\u{3002}`,longPressToSelect:`長按以進入選擇模式。`,select:`選取`,selectedAll:`已選取所有項目。`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`未選取任何項目`,one:()=>`\u{5DF2}\u{9078}\u{53D6} ${t.number(e.count)} \u{500B}\u{9805}\u{76EE}`,other:()=>`\u{5DF2}\u{9078}\u{53D6} ${t.number(e.count)} \u{500B}\u{9805}\u{76EE}`})}\u{3002}`,selectedItem:e=>`\u{5DF2}\u{9078}\u{53D6}\u{300C}${e.item}\u{300D}\u{3002}`};var sj={};sj={"ar-AE":DA,"bg-BG":OA,"cs-CZ":kA,"da-DK":AA,"de-DE":jA,"el-GR":MA,"en-US":NA,"es-ES":PA,"et-EE":FA,"fi-FI":IA,"fr-FR":LA,"he-IL":RA,"hr-HR":zA,"hu-HU":BA,"it-IT":VA,"ja-JP":HA,"ko-KR":UA,"lt-LT":WA,"lv-LV":GA,"nb-NO":KA,"nl-NL":qA,"pl-PL":JA,"pt-BR":YA,"pt-PT":XA,"ro-RO":ZA,"ru-RU":QA,"sk-SK":$A,"sl-SI":ej,"sr-SP":tj,"sv-SE":nj,"tr-TR":rj,"uk-UA":ij,"zh-CN":aj,"zh-TW":oj};function cj(e){return e&&e.__esModule?e.default:e}function lj(e,t){let{getRowText:n=e=>t.collection.getTextValue?.(e)??t.collection.getItem(e)?.textValue}=e,r=s_(cj(sj),`@react-aria/grid`),i=t.selectionManager.rawSelection,a=(0,v.useRef)(i),o=(0,v.useCallback)(()=>{if(!t.selectionManager.isFocused||i===a.current){a.current=i;return}let e=uj(i,a.current),o=uj(a.current,i),s=t.selectionManager.selectionBehavior===`replace`,c=[];if(t.selectionManager.selectedKeys.size===1&&s){let e=t.selectionManager.selectedKeys.keys().next().value;if(e!=null&&t.collection.getItem(e)){let t=n(e);t&&c.push(r.format(`selectedItem`,{item:t}))}}else if(e.size===1&&o.size===0){let t=e.keys().next().value;if(t!=null){let e=n(t);e&&c.push(r.format(`selectedItem`,{item:e}))}}else if(o.size===1&&e.size===0){let e=o.keys().next().value;if(e!=null&&t.collection.getItem(e)){let t=n(e);t&&c.push(r.format(`deselectedItem`,{item:t}))}}t.selectionManager.selectionMode===`multiple`&&(c.length===0||i===`all`||i.size>1||a.current===`all`||a.current?.size>1)&&c.push(i===`all`?r.format(`selectedAll`):r.format(`selectedCount`,{count:i.size})),c.length>0&&Gp(c.join(` `)),a.current=i},[i,t.selectionManager.selectedKeys,t.selectionManager.isFocused,t.selectionManager.selectionBehavior,t.selectionManager.selectionMode,t.collection,n,r]);ec(()=>{if(t.selectionManager.isFocused)o();else{let e=requestAnimationFrame(o);return()=>cancelAnimationFrame(e)}},[i,t.selectionManager.isFocused])}function uj(e,t){let n=new Set;if(e===`all`||t===`all`)return n;for(let r of e.keys())t.has(r)||n.add(r);return n}function dj(e){return e&&e.__esModule?e.default:e}function fj(e){let t=s_(dj(sj),`@react-aria/grid`),n=hm(),r=(n===`pointer`||n===`virtual`||n==null)&&typeof window<`u`&&`ontouchstart`in window;return gc((0,v.useMemo)(()=>{let n=e.selectionManager.selectionMode,i=e.selectionManager.selectionBehavior,a;return r&&(a=t.format(`longPressToSelect`)),i===`replace`&&n!==`none`&&e.hasItemActions?a:void 0},[e.selectionManager.selectionMode,e.selectionManager.selectionBehavior,e.hasItemActions,t,r]))}var pj=Object.assign(rA,{Root:rA,Separator:lae}),mj=(0,v.createContext)({}),hj=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,mj);let{toolbarProps:n}=mS(e,t),r=Jf({...e,values:{orientation:e.orientation||`horizontal`},defaultClassName:`react-aria-Toolbar`}),i=Us(e,{global:!0});return delete i.id,v.createElement(np.div,{...W(i,r,n),ref:t,slot:e.slot||void 0,"data-orientation":e.orientation||`horizontal`},r.children)}),gj=({children:e,className:t,isAttached:n,orientation:r=`horizontal`,...i})=>{let a=v.useMemo(()=>Wf({isAttached:n,orientation:r}),[n,r]);return(0,G.jsx)(hS.Provider,{value:{orientation:r},children:(0,G.jsx)(Vv.Provider,{value:{orientation:r===`horizontal`?`vertical`:`horizontal`},children:(0,G.jsx)(hj,{className:K(t,a),"data-slot":`toolbar`,orientation:r,...i,children:e})})})};gj.displayName=`HeroUI.Toolbar`;var _j=Object.assign(gj,{Root:gj}),vj=v.createContext(null);function Oae(e){let{children:t}=e,n=(0,v.useContext)(vj),[r,i]=(0,v.useState)(0),a=(0,v.useMemo)(()=>({parent:n,modalCount:r,addModal(){i(e=>e+1),n&&n.addModal()},removeModal(){i(e=>e-1),n&&n.removeModal()}}),[n,r]);return v.createElement(vj.Provider,{value:a},t)}function kae(){let e=(0,v.useContext)(vj);return{modalProviderProps:{"aria-hidden":e&&e.modalCount>0?!0:void 0}}}function Aae(e){let{modalProviderProps:t}=kae();return v.createElement(`div`,{"data-overlay-container":!0,...e,...t})}function jae(e){return v.createElement(Oae,null,v.createElement(Aae,e))}function Mae(e){let t=cs(),{portalContainer:n=t?null:document.body,...r}=e,{getContainer:i}=p_();if(!e.portalContainer&&i&&(n=i()),v.useEffect(()=>{if(n?.closest(`[data-overlay-container]`))throw Error(`An OverlayContainer must not be inside another container. Please change the portalContainer prop.`)},[n]),!n)return null;let a=v.createElement(jae,r);return Ec.createPortal(a,n)}var Nae=1500,yj=500,bj={},Pae=0,xj=!1,Sj=null,Cj=null;function wj(e={}){let{delay:t=Nae,closeDelay:n=yj}=e,{isOpen:r,open:i,close:a}=__(e),[o,s]=(0,v.useState)(!1),c=(0,v.useMemo)(()=>`${++Pae}`,[]),l=(0,v.useRef)(null),u=(0,v.useRef)(a),d=()=>{bj[c]=m},f=()=>{for(let e in bj)e!==c&&(bj[e](!0,!0),delete bj[e])},p=e=>{l.current&&clearTimeout(l.current),l.current=null,f(),d(),s(!!e),xj=!0,i(),Sj&&=(clearTimeout(Sj),null),Cj&&=(clearTimeout(Cj),null)},m=(e,t)=>{s(!!t),e||n<=0?(l.current&&clearTimeout(l.current),l.current=null,u.current()):l.current||=setTimeout(()=>{l.current=null,u.current()},n),Sj&&=(clearTimeout(Sj),null),xj&&(Cj&&clearTimeout(Cj),Cj=setTimeout(()=>{delete bj[c],Cj=null,xj=!1},Math.max(yj,n)))},h=()=>{f(),d(),!r&&!xj?(Sj&&clearTimeout(Sj),Sj=setTimeout(()=>{Sj=null,xj=!0,p(!1)},t)):r||p(!0)};return(0,v.useEffect)(()=>{u.current=a},[a]),(0,v.useEffect)(()=>()=>{l.current&&clearTimeout(l.current),bj[c]&&delete bj[c]},[c]),{isOpen:r,shouldSkipAnimation:o,open:e=>{!e&&t>0&&!l.current?h():p(xj)},close:m}}function Fae(e,t){let n=Us(e,{labelable:!0}),{hoverProps:r}=Zm({onHoverStart:()=>t?.open(!0),onHoverEnd:()=>t?.close()});return{tooltipProps:W(n,r,{role:`tooltip`})}}function Iae(e,t,n){let{isDisabled:r,trigger:i,shouldCloseOnPress:a=!0}=e,o=ms(),s=(0,v.useRef)(!1),c=(0,v.useRef)(!1),l=()=>{(s.current||c.current)&&t.open(c.current)},u=e=>{!s.current&&!c.current&&t.close(e)};(0,v.useEffect)(()=>{let e=e=>{n&&n.current&&e.key===`Escape`&&(e.stopPropagation(),t.close(!0))};if(t.isOpen)return document.addEventListener(`keydown`,e,!0),()=>{document.removeEventListener(`keydown`,e,!0)}},[n,t]);let d=()=>{i!==`focus`&&(pm()===`pointer`?s.current=!0:s.current=!1,l())},f=()=>{i!==`focus`&&(c.current=!1,s.current=!1,u())},p=()=>{a&&(c.current=!1,s.current=!1,u(!0))},m=()=>{fm()&&(c.current=!0,l())},h=()=>{c.current=!1,s.current=!1,u(!0)},{hoverProps:g}=Zm({isDisabled:r,onHoverStart:d,onHoverEnd:f}),{focusableProps:_}=wm({isDisabled:r,onFocus:m,onBlur:h},n);return{triggerProps:{"aria-describedby":t.isOpen?o:void 0,...W(_,g,{onPointerDown:p,onKeyDown:p}),tabIndex:void 0},tooltipProps:{id:o}}}var Tj=(0,v.createContext)(null),Ej=(0,v.createContext)(null);function Lae(e){let t=wj(e),n=(0,v.useRef)(null),{triggerProps:r,tooltipProps:i}=Iae(e,t,n);return v.createElement(qf,{values:[[Tj,t],[Ej,{...i,triggerRef:n}]]},v.createElement(vee,{...r,ref:n},e.children))}var Rae=(0,v.forwardRef)(function({UNSTABLE_portalContainer:e,...t},n){[t,n]=Zf(t,n,Ej);let r=(0,v.useContext)(Tj),i=wj(t),a=t.isOpen!=null||t.defaultOpen!=null||!r?i:r,o=Oc(n,a.isOpen),s=t.isExiting||!a.shouldSkipAnimation&&o||!1;return!a.isOpen&&!s?null:v.createElement(Mae,{portalContainer:e},v.createElement(zae,{...t,tooltipRef:n,isExiting:s}))});function zae(e){let t=(0,v.useContext)(Tj),n=(0,v.useRef)(null),{overlayProps:r,arrowProps:i,placement:a,triggerAnchorPoint:o}=Vh({placement:e.placement||`top`,targetRef:e.triggerRef,overlayRef:e.tooltipRef,arrowRef:n,offset:e.offset,crossOffset:e.crossOffset,isOpen:t.isOpen,arrowBoundaryOffset:e.arrowBoundaryOffset,shouldFlip:e.shouldFlip,containerPadding:e.containerPadding,onClose:()=>t.close(!0)}),s=Dc(e.tooltipRef,!!a),c=e.isEntering||!t.shouldSkipAnimation&&s||!1,l=Jf({...e,defaultClassName:`react-aria-Tooltip`,values:{placement:a,isEntering:c,isExiting:e.isExiting,state:t}});e=W(e,r);let{tooltipProps:u}=Fae(e,t),d=Us(e,{global:!0});return v.createElement(np.div,{...W(d,l,u),ref:e.tooltipRef,style:{...r.style,"--trigger-anchor-point":o?`${o.x}px ${o.y}px`:void 0,...l.style},"data-placement":a??void 0,"data-entering":c||void 0,"data-exiting":e.isExiting||void 0},v.createElement(bh.Provider,{value:{...i,placement:a,ref:n}},l.children))}var Dj=e=>{if(!e)return;let t=e.trim(),n=parseFloat(t);if(!Number.isNaN(n))return t.endsWith(`ms`)?n:t.endsWith(`s`)?n*1e3:n},Oj=(0,v.createContext)({}),Bae=({children:e,shouldSkipAnimation:t})=>{let n=(0,v.use)(Tj);return!n||t?e:(0,G.jsx)(Tj,{value:{...n,shouldSkipAnimation:!1},children:e})},kj=({children:e,closeDelay:t,delay:n,shouldSkipAnimation:r=!1,...i})=>{let a=v.useMemo(()=>Gf(),[]),o=$k(`--tooltip-delay`),s=$k(`--tooltip-close-delay`),c=n??Dj(o),l=t??Dj(s);return(0,G.jsx)(Oj,{value:{slots:a},children:(0,G.jsx)(Lae,{closeDelay:l,"data-slot":`tooltip-root`,delay:c,...i,children:(0,G.jsx)(Bae,{shouldSkipAnimation:r,children:e})})})},Aj=Object.assign(kj,{Root:kj,Trigger:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Oj),i=(0,v.useRef)(null),{focusableProps:a}=wm({},i);return(0,G.jsx)(Xc.div,{ref:i,className:q(r?.trigger,t),"data-slot":`tooltip-trigger`,role:`button`,...W(a,n),children:e})},Content:({children:e,className:t,offset:n,showArrow:r=!1,...i})=>{let{slots:a}=(0,v.use)(Oj),o=n||(r?7:3);return(0,G.jsx)(Rae,{...i,className:K(t,a?.base()),offset:o,children:e})},Arrow:({children:e,className:t,...n})=>{let r=(0,G.jsx)(`svg`,{"data-slot":`overlay-arrow`,fill:`none`,height:`12`,viewBox:`0 0 12 12`,width:`12`,xmlns:`http://www.w3.org/2000/svg`,children:(0,G.jsx)(`path`,{d:`M0 0C5.48483 8 6.5 8 12 0Z`})}),i=v.isValidElement(e)?v.cloneElement(e,{"data-slot":`overlay-arrow`}):r;return(0,G.jsx)(Pee,{"data-slot":`tooltip-arrow`,...n,className:t,children:i})}}),jj=(0,v.createContext)({}),Vae=e=>{let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,...i}=e;return i},Mj=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,jj);let{hoverProps:n,isHovered:r}=Zm(e),{isFocused:i,isFocusVisible:a,focusProps:o}=Gm({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e[`aria-invalid`]&&e[`aria-invalid`]!==`false`,c=Jf({...e,values:{isHovered:r,isFocused:i,isFocusVisible:a,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:`react-aria-TextArea`});return v.createElement(np.textarea,{...W(Vae(e),o,n),...c,ref:t,"data-focused":i||void 0,"data-disabled":e.disabled||void 0,"data-hovered":r||void 0,"data-focus-visible":a||void 0,"data-invalid":s||void 0})}),Hae=(0,v.createContext)(null),Uae=ap(function(e,t){[e,t]=Zf(e,t,Hae);let{validationBehavior:n}=Xf(ax)||{},r=e.validationBehavior??n??`native`,i=(0,v.useRef)(null);[e,i]=Zf(e,i,Iv);let[a,o]=Qf(!e[`aria-label`]&&!e[`aria-labelledby`]),[s,c]=(0,v.useState)(`input`),{labelProps:l,inputProps:u,descriptionProps:d,errorMessageProps:f,...p}=VS({...$f(e),inputElementType:s,label:o,validationBehavior:r},i),m=(0,v.useCallback)(e=>{i.current=e,e&&c(e instanceof HTMLTextAreaElement?`textarea`:`input`)},[i]),h=Jf({...e,values:{isDisabled:e.isDisabled||!1,isInvalid:p.isInvalid,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1},defaultClassName:`react-aria-TextField`}),g=Us(e,{global:!0});return delete g.id,v.createElement(np.div,{...g,...h,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":p.isInvalid||void 0,"data-readonly":e.isReadOnly||void 0,"data-required":e.isRequired||void 0},v.createElement(qf,{values:[[sp,{...l,ref:a}],[zS,{...u,ref:m}],[jj,{...u,ref:m}],[Kb,{role:`presentation`,isInvalid:p.isInvalid,isDisabled:e.isDisabled||!1}],[Hv,{slots:{description:d,errorMessage:f}}],[Jb,p]]},h.children))}),Nj=(0,v.createContext)({}),Pj=({children:e,className:t,fullWidth:n,variant:r,...i})=>{let a=v.useMemo(()=>zf({fullWidth:n}),[n]);return(0,G.jsx)(Uae,{"data-slot":`textfield`,...i,className:K(t,a),children:t=>(0,G.jsx)(Nj,{value:{variant:r},children:(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})})},Fj=({className:e,fullWidth:t,variant:n,...r})=>{let i=(0,v.use)(Nj),a=(0,v.use)(tre),o=n??i.variant??a.variant;return(0,G.jsx)(BS,{className:K(e,yf({fullWidth:t,variant:o})),"data-slot":`input`,...r})},Ij=Object.assign(Fj,{Root:Fj}),Lj=(0,v.createContext)({}),Rj=({children:e,className:t,fullWidth:n,onClick:r,variant:i,...a})=>{let o=(0,v.use)(Nj),s=i??o?.variant,c=v.useRef(null),l=v.useMemo(()=>bf({fullWidth:n,variant:s}),[n,s]),u=e=>{let t=e.target,n=c.current?.querySelector(`input`);n&&t!==n&&!n.contains(t)&&n.focus(),r?.(e)};return(0,G.jsx)(Lj,{value:{slots:l},children:(0,G.jsx)(qb,{...a,ref:c,className:K(t,l?.base()),"data-slot":`input-group`,onClick:u,children:t=>typeof e==`function`?e(t):e})})},zj=Object.assign(Rj,{Root:Rj,Input:({className:e,...t})=>{let{slots:n}=(0,v.use)(Lj);return(0,G.jsx)(BS,{className:K(e,n?.input()),"data-slot":`input-group-input`,...t})},TextArea:({className:e,...t})=>{let{slots:n}=(0,v.use)(Lj);return(0,G.jsx)(Mj,{className:K(e,n?.input()),"data-slot":`input-group-textarea`,...t})},Prefix:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Lj);return(0,G.jsx)(`div`,{className:q(r?.prefix,t),"data-slot":`input-group-prefix`,...n,children:e})},Suffix:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Lj);return(0,G.jsx)(`div`,{className:q(r?.suffix,t),"data-slot":`input-group-suffix`,...n,children:e})}}),Bj=({className:e,fullWidth:t,variant:n,...r})=>{let i=(0,v.use)(Nj),a=n??i?.variant;return(0,G.jsx)(Mj,{"data-slot":`textarea`,className:K(e,Bf({fullWidth:t,variant:a})),...r})},Vj=Object.assign(Bj,{Root:Bj}),Hj=Object.assign(Pj,{Root:Pj}),Uj={};Uj={"Clear search":`مسح البحث`};var Wj={};Wj={"Clear search":`Изчистване на търсене`};var Gj={};Gj={"Clear search":`Vymazat hledání`};var Kj={};Kj={"Clear search":`Ryd søgning`};var qj={};qj={"Clear search":`Suche zurücksetzen`};var Jj={};Jj={"Clear search":`Απαλοιφή αναζήτησης`};var Yj={};Yj={"Clear search":`Clear search`};var Xj={};Xj={"Clear search":`Borrar búsqueda`};var Zj={};Zj={"Clear search":`Tühjenda otsing`};var Qj={};Qj={"Clear search":`Tyhjennä haku`};var $j={};$j={"Clear search":`Effacer la recherche`};var eM={};eM={"Clear search":`נקה חיפוש`};var tM={};tM={"Clear search":`Obriši pretragu`};var nM={};nM={"Clear search":`Keresés törlése`};var rM={};rM={"Clear search":`Cancella ricerca`};var iM={};iM={"Clear search":`検索をクリア`};var aM={};aM={"Clear search":`검색 지우기`};var oM={};oM={"Clear search":`Išvalyti iešką`};var sM={};sM={"Clear search":`Notīrīt meklēšanu`};var cM={};cM={"Clear search":`Tøm søk`};var lM={};lM={"Clear search":`Zoekactie wissen`};var uM={};uM={"Clear search":`Wyczyść zawartość wyszukiwania`};var dM={};dM={"Clear search":`Limpar pesquisa`};var fM={};fM={"Clear search":`Limpar pesquisa`};var pM={};pM={"Clear search":`Ştergeţi căutarea`};var mM={};mM={"Clear search":`Очистить поиск`};var hM={};hM={"Clear search":`Vymazať vyhľadávanie`};var gM={};gM={"Clear search":`Počisti iskanje`};var _M={};_M={"Clear search":`Obriši pretragu`};var vM={};vM={"Clear search":`Rensa sökning`};var yM={};yM={"Clear search":`Aramayı temizle`};var bM={};bM={"Clear search":`Очистити пошук`};var xM={};xM={"Clear search":`清除搜索`};var SM={};SM={"Clear search":`清除搜尋條件`};var CM={};CM={"ar-AE":Uj,"bg-BG":Wj,"cs-CZ":Gj,"da-DK":Kj,"de-DE":qj,"el-GR":Jj,"en-US":Yj,"es-ES":Xj,"et-EE":Zj,"fi-FI":Qj,"fr-FR":$j,"he-IL":eM,"hr-HR":tM,"hu-HU":nM,"it-IT":rM,"ja-JP":iM,"ko-KR":aM,"lt-LT":oM,"lv-LV":sM,"nb-NO":cM,"nl-NL":lM,"pl-PL":uM,"pt-BR":dM,"pt-PT":fM,"ro-RO":pM,"ru-RU":mM,"sk-SK":hM,"sl-SI":gM,"sr-SP":_M,"sv-SE":vM,"tr-TR":yM,"uk-UA":bM,"zh-CN":xM,"zh-TW":SM};function Wae(e){return e&&e.__esModule?e.default:e}function Gae(e,t,n){let r=s_(Wae(CM),`@react-aria/searchfield`),{isDisabled:i,isReadOnly:a,onSubmit:o,onClear:s,type:c=`search`}=e,{keyboardProps:l}=Sm({isDisabled:i||a,shortcuts:{Enter:()=>{if(o){o(t.value);return}return!1},Escape:()=>{if(t.value===``&&(!n.current||n.current.value===``))return!1;t.setValue(``),s?.()}}}),u=()=>{t.setValue(``),s&&s()},d=()=>{n.current?.focus()},{labelProps:f,inputProps:p,descriptionProps:m,errorMessageProps:h,...g}=VS({...e,value:t.value,onChange:t.setValue,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,type:c},n);return{labelProps:f,inputProps:W(l,{...p,defaultValue:void 0}),clearButtonProps:{"aria-label":r.format(`Clear search`),excludeFromTabOrder:!0,preventFocusOnPress:!0,isDisabled:i||a,onPress:u,onPressStart:d},descriptionProps:m,errorMessageProps:h,...g}}function Kae(e){let[t,n]=eh(wM(e.value),wM(e.defaultValue)||``,e.onChange);return{value:t,setValue:n}}function wM(e){if(e!=null)return e.toString()}var qae=(0,v.createContext)(null),Jae=ap(function(e,t){[e,t]=Zf(e,t,qae);let{validationBehavior:n}=Xf(ax)||{},r=e.validationBehavior??n??`native`,i=(0,v.useRef)(null);[e,i]=Zf(e,i,Iv);let[a,o]=Qf(!e[`aria-label`]&&!e[`aria-labelledby`]),s=Kae({...e,validationBehavior:r}),{labelProps:c,inputProps:l,clearButtonProps:u,descriptionProps:d,errorMessageProps:f,...p}=Gae({...$f(e),label:o,validationBehavior:r},s,i),m=Jf({...e,values:{isEmpty:s.value===``,isDisabled:e.isDisabled||!1,isInvalid:p.isInvalid||!1,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1,state:s},defaultClassName:`react-aria-SearchField`}),h=Us(e,{global:!0});return delete h.id,v.createElement(np.div,{...h,...m,ref:t,slot:e.slot||void 0,"data-empty":s.value===``||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":p.isInvalid||void 0,"data-readonly":e.isReadOnly||void 0,"data-required":e.isRequired||void 0},v.createElement(qf,{values:[[sp,{...c,ref:a}],[zS,{...l,ref:i}],[Qm,u],[Hv,{slots:{description:d,errorMessage:f}}],[Kb,{isInvalid:p.isInvalid,isDisabled:e.isDisabled||!1}],[Jb,p]]},m.children))}),TM=(0,v.createContext)({}),EM=({children:e,className:t,fullWidth:n,variant:r,...i})=>{let a=v.useMemo(()=>Mf({fullWidth:n,variant:r}),[n,r]);return(0,G.jsx)(TM,{value:{slots:a},children:(0,G.jsx)(Jae,{"data-slot":`search-field`,...i,className:K(t,a?.base()),children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})})},DM=Object.assign(EM,{Root:EM,Group:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(TM);return(0,G.jsx)(qb,{className:K(t,r?.group()),"data-slot":`search-field-group`,...n,children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})},Input:({className:e,...t})=>{let{slots:n}=(0,v.use)(TM);return(0,G.jsx)(BS,{className:K(e,n?.input()),"data-slot":`search-field-input`,...t})},SearchIcon:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(TM);return e&&v.isValidElement(e)?v.cloneElement(e,{...n,className:q(r?.searchIcon,t),"data-slot":`search-field-search-icon`}):(0,G.jsx)(Mee,{className:q(r?.searchIcon,t),"data-slot":`search-field-search-icon`,...n})},ClearButton:({className:e,...t})=>{let{slots:n}=(0,v.use)(TM);return(0,G.jsx)(Hb,{className:K(e,n?.clearButton()),"data-slot":`search-field-clear-button`,slot:`clear`,...t})}}),OM=({children:e,className:t,isDisabled:n,isInvalid:r,isRequired:i,...a})=>(0,G.jsx)(cp,{className:xf({isRequired:i,isDisabled:n,isInvalid:r,className:t}),"data-slot":`label`,...a,children:e}),kM=Object.assign(OM,{Root:OM}),AM=({children:e,className:t,...n})=>Ene(`description`)?(0,G.jsx)(Ite,{className:hf({className:t}),"data-slot":`description`,slot:`description`,...n,children:e}):null,jM=Object.assign(AM,{Root:AM}),MM=({children:e,className:t,...n})=>(0,G.jsx)(Xc.div,{className:vf({className:t}),"data-slot":`empty-state`,...n,children:e||`No results found`}),NM=Object.assign(MM,{Root:MM});function PM(e){return e&&e.__esModule?e.default:e}function FM(e,t){let{key:n}=e,r=t.selectionManager,i=ms(),a=!t.selectionManager.canSelectItem(n),o=t.selectionManager.isSelected(n);return{checkboxProps:{id:i,"aria-label":s_(PM(sj),`@react-aria/grid`).format(`select`),isSelected:o,isDisabled:a,onChange:()=>r.toggleSelection(n)}}}for(var IM=(0,v.createContext)(null),LM=(0,v.createContext)(null),RM=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,IM);let{validationBehavior:n}=Xf(ax)||{},r=e.validationBehavior??n??`native`,{locale:i}=bp(),a=Yne({...e,locale:i,validationBehavior:r}),o=(0,v.useRef)(null),[s,c]=Qf(!e[`aria-label`]&&!e[`aria-labelledby`]),{labelProps:l,groupProps:u,inputProps:d,incrementButtonProps:f,decrementButtonProps:p,descriptionProps:m,errorMessageProps:h,...g}=qne({...$f(e),label:c,validationBehavior:r},a,o),_=Jf({...e,values:{state:a,isDisabled:e.isDisabled||!1,isInvalid:g.isInvalid||!1,isRequired:e.isRequired||!1,isReadOnly:e.isReadOnly||!1},defaultClassName:`react-aria-NumberField`}),y=Us(e,{global:!0});return delete y.id,v.createElement(qf,{values:[[LM,a],[Kb,u],[zS,{...d,ref:o}],[sp,{...l,ref:s}],[Qm,{slots:{increment:f,decrement:p}}],[Hv,{slots:{description:m,errorMessage:h}}],[Jb,g]]},v.createElement(np.div,{...y,..._,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-readonly":e.isReadOnly||void 0,"data-required":e.isRequired||void 0,"data-invalid":g.isInvalid||void 0}),e.name&&v.createElement(`input`,{type:`hidden`,name:e.name,form:e.form,value:isNaN(a.numberValue)?``:a.numberValue,disabled:e.isDisabled||void 0}))}),zM=10,BM=5,VM=class{setup(e,t,n){this.delegate=e,this.state=t,this.direction=n}getDropTargetFromPoint(e,t,n){let r=this.delegate.getDropTargetFromPoint(e,t,n);return!r||r.type===`root`?r:this.resolveDropTarget(r,e,t,n)}resolveDropTarget(e,t,n,r){let i=this.pointerTracking,a=n-i.lastY,o=t-i.lastX,s=i.yDirection,c=i.xDirection;if(Math.abs(a)>BM&&(s=a>0?`down`:`up`,i.yDirection=s,i.lastY=n),Math.abs(o)>zM&&(c=o>0?`right`:`left`,i.xDirection=c,i.lastX=t),e.dropPosition===`before`){let t=this.state.collection.getKeyBefore(e.key);for(;t!=null;){let e=this.state.collection.getItem(t);if(e?.type===`item`)break;t=e?.parentKey??null}if(t!=null){let n={type:`item`,key:t,dropPosition:`after`};r(n)&&(e=n)}}let l=this.getPotentialTargets(e,r);if(l.length===0)return{type:`root`};let u;return l.length>1?u=this.selectTarget(l,e,t,n,s,c):(u=l[0],i.boundaryContext=null),u}getPotentialTargets(e,t){if(e.dropPosition===`on`)return[e];let n=e,r=this.state.collection,i=r.getItem(n.key);for(;i&&i?.type!==`item`&&i.nextKey!=null;)n.key=i.nextKey,i=r.getItem(i.nextKey);let a=[n];if(i&&i.hasChildNodes&&this.state.expandedKeys.has(i.key)&&r.getChildren&&n.dropPosition===`after`){let e=i.firstChildKey==null?null:r.getItem(i.firstChildKey);for(;e&&e.type!==`item`;)e=e.nextKey==null?null:r.getItem(e.nextKey);if(e?.type===`item`){let n={type:`item`,key:e.key,dropPosition:`before`};return t(n)?[n]:[]}}if(i?.nextKey!=null)return[e];let o=i?.parentKey,s=[];for(;o!=null;){let e=r.getItem(o),n=e?.nextKey==null?null:r.getItem(e.nextKey);if(!n||n.parentKey!==o){let e={type:`item`,key:o,dropPosition:`after`};if(t(e)&&s.push(e),n)break}o=e?.parentKey}if(s.length>0&&a.push(...s),a.length===1){let e=r.getKeyAfter(n.key),a=e==null?null:r.getItem(e);if(e!=null&&a&&i&&a.level!=null&&i.level!=null&&a.level>i.level){let n={type:`item`,key:e,dropPosition:`before`};if(t(n))return[n]}}return a.filter(t)}selectTarget(e,t,n,r,i,a){if(e.length<2)return e[0];let o=this.pointerTracking,s=this.state.collection.getItem(t.key)?.parentKey;if(s==null)return e[0];(!o.boundaryContext||o.boundaryContext.parentKey!==s)&&(o.boundaryContext={parentKey:s,preferredTargetIndex:o.yDirection===`up`?e.length-1:0,lastSwitchY:r,lastSwitchX:n});let c=o.boundaryContext,l=Math.abs(n-c.lastSwitchX);if(Math.abs(r-c.lastSwitchY)>BM&&i){let t=c.preferredTargetIndex||0;i===`down`&&t===0?c.preferredTargetIndex=e.length-1:i===`up`&&t===e.length-1&&(c.preferredTargetIndex=0),o.xDirection=null}if(l>zM&&a){let t=c.preferredTargetIndex||0;a===`left`?this.direction===`ltr`?t0&&(c.preferredTargetIndex=t-1,c.lastSwitchX=n):a===`right`&&(this.direction===`ltr`?t>0&&(c.preferredTargetIndex=t-1,c.lastSwitchX=n):t{let i=this.keyMap.get(r.key);e.visitNode&&(r=e.visitNode(r)),this.keyMap.set(r.key,r);let a=new Set,o=null,s=!1;if(r.type===`item`){for(let e of r.childNodes)if(e.props?.colSpan!==void 0){s=!0;break}}for(let e of r.childNodes)e.type===`cell`&&s&&(e.colspan=e.props?.colSpan,e.colSpan=e.props?.colSpan,e.colIndex=o?(o.colIndex??o.index)+(o.colSpan??1):e.index),e.type===`cell`&&e.parentKey==null&&(e.parentKey=r.key),a.add(e.key),o?(o.nextKey=e.key,e.prevKey=o.key):e.prevKey=null,t(e),o=e;if(o&&(o.nextKey=null),i)for(let e of i.childNodes)a.has(e.key)||n(e)},n=e=>{this.keyMap.delete(e.key);for(let t of e.childNodes)this.keyMap.get(t.key)===t&&n(t)},r=null;for(let[n,i]of e.items.entries()){let e={...i,level:i.level??0,key:i.key??`row-`+n,type:i.type??`row`,value:i.value??null,hasChildNodes:!0,childNodes:[...i.childNodes],rendered:i.rendered,textValue:i.textValue??``,index:i.index??n};r?(r.nextKey=e.key,e.prevKey=r.key):e.prevKey=null,this.rows.push(e),t(e),r=e}r&&(r.nextKey=null)}*[Symbol.iterator](){yield*[...this.rows]}get size(){return[...this.rows].length}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);return t?t.prevKey??null:null}getKeyAfter(e){let t=this.keyMap.get(e);return t?t.nextKey??null:null}getFirstKey(){return[...this.rows][0]?.key}getLastKey(){let e=[...this.rows];return e[e.length-1]?.key}getItem(e){return this.keyMap.get(e)??null}at(e){let t=[...this.getKeys()];return this.getItem(t[e])}getChildren(e){return this.keyMap.get(e)?.childNodes||[]}},UM=`row-header-column-`+Math.random().toString(36).slice(2),WM=`row-header-column-`+Math.random().toString(36).slice(2);UM===WM;)WM=`row-header-column-`+Math.random().toString(36).slice(2);function GM(e,t){if(t.length===0)return[];let n=[],r=new Map;for(let i of t){let t=i.parentKey,a=[i];for(;t!=null;){let n=e.get(t);if(!n)break;if(r.has(n)){n.colSpan??=0,n.colSpan++,n.colspan=n.colSpan;let{column:e,index:t}=r.get(n);if(t>a.length)break;for(let n=t;ne.length)),a=Array(i).fill(0).map(()=>[]),o=0;for(let e of n){let t=i-1;for(let n of e){if(n){let e=a[t],r=e.reduce((e,t)=>e+(t.colSpan??1),0);if(r0&&(e[e.length-1].nextKey=i.key,i.prevKey=e[e.length-1].key),e.push(i)}e.length>0&&(e[e.length-1].nextKey=n.key,n.prevKey=e[e.length-1].key),n.level=t,n.colIndex=o,e.push(n)}t--}o++}let s=0;for(let e of a){let n=e.reduce((e,t)=>e+(t.colSpan??1),0);if(n({type:`headerrow`,key:`headerrow-`+t,index:t,value:null,rendered:null,level:0,hasChildNodes:!0,childNodes:e,textValue:``}))}var KM=class extends HM{constructor(e,t,n){let r=new Set,i=null,a=[];if(n?.showSelectionCheckboxes){let e={type:`column`,key:UM,value:null,textValue:``,level:0,index:+!!n?.showDragButtons,hasChildNodes:!1,rendered:null,childNodes:[],props:{isSelectionCell:!0}};a.unshift(e)}if(n?.showDragButtons){let e={type:`column`,key:WM,value:null,textValue:``,level:0,index:0,hasChildNodes:!1,rendered:null,childNodes:[],props:{isDragButtonCell:!0}};a.unshift(e)}let o=[],s=new Map,c=e=>{switch(e.type){case`body`:i=e;break;case`column`:s.set(e.key,e),e.hasChildNodes||(a.push(e),e.props.isRowHeader&&r.add(e.key));break;case`item`:o.push(e);return}for(let t of e.childNodes)c(t)};for(let t of e)c(t);let l=GM(s,a);if(l.forEach((e,t)=>o.splice(t,0,e)),super({columnCount:a.length,items:o,visitNode:e=>(e.column=a[e.index],e)}),this._size=0,this.columns=a,this.rowHeaderColumnKeys=r,this.body=i,this.headerRows=l,this._size=[...i.childNodes].length,this.rowHeaderColumnKeys.size===0){let e=this.columns.find(e=>!e.props?.isDragButtonCell&&!e.props?.isSelectionCell);e&&this.rowHeaderColumnKeys.add(e.key)}}*[Symbol.iterator](){yield*this.body.childNodes}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){return this.keyMap.get(e)?.prevKey??null}getKeyAfter(e){return this.keyMap.get(e)?.nextKey??null}getFirstKey(){return Uy(this.body.childNodes)?.key??null}getLastKey(){return Gy(this.body.childNodes)?.key??null}getItem(e){return e===this.body.key?this.body:this.keyMap.get(e)??null}at(e){let t=[...this.getKeys()];return this.getItem(t[e])}getChildren(e){if(e===this.body.key)return this.body.childNodes;let t=this.getItem(e);return t?.type===`item`?[...t.childNodes].filter(e=>e.type===`cell`):super.getChildren(e)}getTextValue(e){let t=this.getItem(e);if(!t)return``;if(t.textValue)return t.textValue;let n=this.rowHeaderColumnKeys;if(n){let e=[];for(let r of t.childNodes){let t=this.columns[r.index];if(n.has(t.key)&&r.textValue&&e.push(r.textValue),e.length===n.size)break}return e.join(` `)}return``}};function qM(e){return e!=null&&(!isNaN(e)||String(e).match(/^(\d+)(?=%$)/)!==null)}function JM(e){if(!e||typeof e==`number`)return 1;let t=e.match(/^(.+)(?=fr$)/);return t?parseFloat(t[0]):1}function YM(e,t){if(typeof e==`string`){let n=e.match(/^(\d+)(?=%$)/);if(!n)throw Error(`Only percentages or numbers are supported for static column widths`);return t*(parseFloat(n[0])/100)}return e}function XM(e,t){return e==null?2**53-1:YM(e,t)}function ZM(e,t){return e==null?0:YM(e,t)}function QM(e,t,n,r,i){let a=e,o=Math.floor(e),s=e-o>0;e=o;let c=!1,l=t.map((t,a)=>{let o=n.get(t.key)==null?t.width??t.defaultWidth??r?.(a)??`1fr`:n.get(t.key)??`1fr`,s=!1,l=0,u=0,d=0;qM(o)?(l=YM(o,e),s=!0):(u=JM(o),u<=0&&(s=!0));let f=ZM(t.minWidth??i?.(a)??0,e),p=XM(t.maxWidth,e),m=Math.max(f,Math.min(l,p));return s?d=m:l>m&&(s=!0,d=m),s||(c=!0),{frozen:s,baseSize:l,hypotheticalMainSize:m,min:f,max:p,flex:u,targetMainSize:d,violation:0}});for(;c;){let t=0,n=0;l.forEach(e=>{e.frozen?t+=e.targetMainSize:(t+=e.baseSize,n+=e.flex)});let r=e-t;r>0&&l.forEach(e=>{if(!e.frozen){let t=e.flex/n;e.targetMainSize=e.baseSize+t*r}});let i=0;l.forEach(e=>{if(e.violation=0,!e.frozen){let{min:t,max:n,targetMainSize:r}=e;e.targetMainSize=Math.max(t,Math.min(r,n)),e.violation=e.targetMainSize-r,i+=e.violation}}),c=!1,l.forEach(e=>{i===0||Math.sign(i)===Math.sign(e.violation)?e.frozen=!0:e.frozen||(c=!0)})}let u=$M(l);if(s&&u.length>0){let e=a.toString().split(`.`)[1],t=u[u.length-1].toString();u[u.length-1]=Number(t+`.`+e)}return u}function $M(e){let t=0,n=0,r=[];return e.forEach(function(e){let i=e.targetMainSize,a=Math.round(i+t)-n;t+=i,n+=a,r.push(a)}),r}var eN=class{constructor(e){this.columnWidths=new Map,this.columnMinWidths=new Map,this.columnMaxWidths=new Map,this.getDefaultWidth=e?.getDefaultWidth??(()=>`1fr`),this.getDefaultMinWidth=e?.getDefaultMinWidth??(()=>75)}splitColumnsIntoControlledAndUncontrolled(e){return e.reduce((e,t)=>(t.props.width==null?e[1].set(t.key,t):e[0].set(t.key,t),e),[new Map,new Map])}recombineColumns(e,t,n,r){return new Map(e.map(e=>n.has(e.key)?[e.key,t.get(e.key)]:[e.key,r.get(e.key).props.width]))}getInitialUncontrolledWidths(e){return new Map(Array.from(e).map(([e,t])=>[e,t.props.defaultWidth??this.getDefaultWidth?.(t)??`1fr`]))}getColumnWidth(e){return this.columnWidths.get(e)??0}getColumnMinWidth(e){return this.columnMinWidths.get(e)??0}getColumnMaxWidth(e){return this.columnMaxWidths.get(e)??0}resizeColumnWidth(e,t,n,r){let i=this.columnWidths,a=!0,o=new Map;return r=Math.max(this.getColumnMinWidth(n),Math.min(this.getColumnMaxWidth(n),Math.floor(r))),e.columns.forEach(e=>{e.key===n?(o.set(e.key,r),a=!1):a?o.set(e.key,i.get(e.key)??0):o.set(e.key,e.props.width??t.get(e.key))}),o}buildColumnWidths(e,t,n){return this.columnWidths=new Map,this.columnMinWidths=new Map,this.columnMaxWidths=new Map,QM(e,t.columns.map(e=>({...e.props,key:e.key})),n,e=>this.getDefaultWidth(t.columns[e]),e=>this.getDefaultMinWidth(t.columns[e])).forEach((n,r)=>{let i=t.columns[r].key,a=t.columns[r];this.columnWidths.set(i,n),this.columnMinWidths.set(i,ZM(a.props.minWidth??this.getDefaultMinWidth(a),e)),this.columnMaxWidths.set(i,XM(a.props.maxWidth,e))}),this.columnWidths}};function tN(e,t){let{getDefaultWidth:n,getDefaultMinWidth:r,tableWidth:i=0}=e,[a,o]=(0,v.useState)(null),s=(0,v.useMemo)(()=>new eN({getDefaultWidth:n,getDefaultMinWidth:r}),[n,r]),[c,l]=(0,v.useMemo)(()=>s.splitColumnsIntoControlledAndUncontrolled(t.collection.columns),[t.collection.columns,s]),[u,d]=(0,v.useState)(()=>s.getInitialUncontrolledWidths(l)),[f,p]=(0,v.useState)(t.collection.columns);t.collection.columns!==f&&((t.collection.columns.length!==f.length||t.collection.columns.some((e,t)=>e.key!==f[t].key))&&d(s.getInitialUncontrolledWidths(l)),p(t.collection.columns));let m=(0,v.useMemo)(()=>s.recombineColumns(t.collection.columns,u,l,c),[t.collection.columns,u,l,c,s]),h=(0,v.useCallback)(e=>{o(e)},[o]),g=(0,v.useCallback)((e,n)=>{let r=s.resizeColumnWidth(t.collection,u,e,n),i=new Map(Array.from(l).map(([e])=>[e,r.get(e)]));return i.set(e,n),d(i),r},[l,d,s,t.collection,u]),_=(0,v.useCallback)(()=>{o(null)},[o]),y=(0,v.useMemo)(()=>s.buildColumnWidths(i,t.collection,m),[i,t.collection,m,s]);return(0,v.useMemo)(()=>({resizingColumn:a,updateResizedColumns:g,startResize:h,endResize:_,getColumnWidth:e=>s.getColumnWidth(e),getColumnMinWidth:e=>s.getColumnMinWidth(e),getColumnMaxWidth:e=>s.getColumnMaxWidth(e),tableState:t,columnWidths:y}),[s,y,a,g,h,_,t])}function nN(e){let{collection:t,focusMode:n}=e,r=e.UNSAFE_selectionState||db(e),i=(0,v.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),a=r.setFocusedKey;r.setFocusedKey=(e,r)=>{if(n===`cell`&&e!=null){let n=t.getItem(e);if(n?.type===`item`){let i=Hy(n,t);e=r===`last`?Gy(i)?.key??null:Uy(i)?.key??null}}a(e,r)};let o=(0,v.useMemo)(()=>new rb(t,r),[t,r]),s=(0,v.useRef)(null);return(0,v.useEffect)(()=>{if(r.focusedKey!=null&&s.current&&!t.getItem(r.focusedKey)){let e=s.current.getItem(r.focusedKey),n=e?.parentKey!=null&&(e.type===`cell`||e.type===`rowheader`||e.type===`column`)?s.current.getItem(e.parentKey):e;if(!n){r.setFocusedKey(null);return}let i=s.current.rows,a=t.rows,c=i.length-a.length,l=Math.min(c>1?Math.max(n.index-c+1,0):n.index,a.length-1),u=null;for(let e=Math.max(0,l);e=0;e--)if(!o.isDisabled(a[e].key)&&a[e].type!==`headerrow`){u=a[e];break}}if(u){let i=u.hasChildNodes?[...Hy(u,t)]:[],a=u.hasChildNodes&&n!==e&&e&&e.index({showSelectionCheckboxes:i&&r!==`none`,showDragButtons:a,selectionMode:r,columns:[]}),[e.children,i,r,a]),c=lb(e,(0,v.useCallback)(e=>new KM(e,null,s),[s]),s),{disabledKeys:l,selectionManager:u}=nN({...e,collection:c,disabledBehavior:e.disabledBehavior||`selection`}),[d,f]=eh(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,e.onExpandedChange);return{collection:c,disabledKeys:l,selectionManager:u,showSelectionCheckboxes:e.showSelectionCheckboxes||!1,sortDescriptor:e.sortDescriptor??null,isKeyboardNavigationDisabled:c.size===0||t,setKeyboardNavigationDisabled:n,sort(t,n){e.onSortChange?.({column:t,direction:n??(e.sortDescriptor?.column===t?rN[e.sortDescriptor.direction]:`ascending`)})},expandedKeys:d,toggleKey(e){f(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},treeColumn:o}}function aN(e,t){let n=(0,v.useMemo)(()=>t?e.collection.filter(t):e.collection,[e.collection,t]),r=e.selectionManager.withCollection(n);return{...e,collection:n,selectionManager:r}}var oN=class{constructor(e){if(this.collection=e.collection,this.disabledKeys=e.disabledKeys,this.disabledBehavior=e.disabledBehavior||`all`,this.direction=e.direction,this.collator=e.collator,!e.layout&&!e.ref)throw Error(`Either a layout or a ref must be specified.`);this.layoutDelegate=e.layoutDelegate||(e.layout?new sN(e.layout):new Py(e.ref)),this.focusMode=e.focusMode??`row`}isCell(e){return e.type===`cell`}isRow(e){return e.type===`row`||e.type===`item`}isDisabled(e){return this.disabledBehavior===`all`&&(e.props?.isDisabled||this.disabledKeys.has(e.key))&&e.props?.disabledBehavior!==`selection`}findPreviousKey(e,t,n=!1){let r=e==null?this.collection.getLastKey():this.collection.getKeyBefore(e);for(;r!=null;){let e=this.collection.getItem(r);if(!e)return null;if((n||!this.isDisabled(e))&&(!t||t(e)))return r;r=this.collection.getKeyBefore(r)}return null}findNextKey(e,t,n=!1){let r=e==null?this.collection.getFirstKey():this.collection.getKeyAfter(e);for(;r!=null;){let e=this.collection.getItem(r);if(!e)return null;if((n||!this.isDisabled(e))&&(!t||t(e)))return r;if(r=this.collection.getKeyAfter(r),r==null)return null}return null}getKeyForItemInRowByIndex(e,t=0){if(t<0)return null;let n=this.collection.getItem(e);if(!n)return null;let r=0;for(let e of Hy(n,this.collection)){if(e.colSpan&&e.colSpan+r>t||(e.colSpan&&(r=r+e.colSpan-1),r===t))return e.key??null;r++}return null}getKeyBelow(e,t){let n=e,r=this.collection.getItem(n);if(!r||(this.isCell(r)&&(n=r.parentKey??null),n==null))return null;if(n=this.findNextKey(n,e=>e.type===`item`,t?.includeDisabled),n!=null){if(this.isCell(r)){let e=r.colIndex?r.colIndex:r.index;return this.getKeyForItemInRowByIndex(n,e)}if(this.focusMode===`row`)return n}return null}getKeyAbove(e,t){let n=e,r=this.collection.getItem(n);if(!r||(this.isCell(r)&&(n=r.parentKey??null),n==null))return null;if(n=this.findPreviousKey(n,e=>e.type===`item`,t?.includeDisabled),n!=null){if(this.isCell(r)){let e=r.colIndex?r.colIndex:r.index;return this.getKeyForItemInRowByIndex(n,e)}if(this.focusMode===`row`)return n}return null}getKeyRightOf(e){let t=this.collection.getItem(e);if(!t)return null;if(this.isRow(t)){let e=Hy(t,this.collection);return(this.direction===`rtl`?Gy(e)?.key:Uy(e)?.key)??null}if(this.isCell(t)&&t.parentKey!=null){let n=this.collection.getItem(t.parentKey);if(!n)return null;let r=Hy(n,this.collection),i=(this.direction===`rtl`?Wy(r,t.index-1):Wy(r,t.index+1))??null;return i?i.key??null:this.focusMode===`row`?t.parentKey??null:(this.direction===`rtl`?this.getFirstKey(e):this.getLastKey(e))??null}return null}getKeyLeftOf(e){let t=this.collection.getItem(e);if(!t)return null;if(this.isRow(t)){let e=Hy(t,this.collection);return(this.direction===`rtl`?Uy(e)?.key:Gy(e)?.key)??null}if(this.isCell(t)&&t.parentKey!=null){let n=this.collection.getItem(t.parentKey);if(!n)return null;let r=Hy(n,this.collection),i=(this.direction===`rtl`?Wy(r,t.index+1):Wy(r,t.index-1))??null;return i?i.key??null:this.focusMode===`row`?t.parentKey??null:(this.direction===`rtl`?this.getLastKey(e):this.getFirstKey(e))??null}return null}getFirstKey(e,t){let n=e??null,r;if(n!=null){if(r=this.collection.getItem(n),!r)return null;if(this.isCell(r)&&!t&&r.parentKey!=null){let e=this.collection.getItem(r.parentKey);return e?Uy(Hy(e,this.collection))?.key??null:null}}if(n=this.findNextKey(void 0,e=>e.type===`item`),n!=null&&(r&&this.isCell(r)&&t||this.focusMode===`cell`)){let e=this.collection.getItem(n);if(!e)return null;n=Uy(Hy(e,this.collection))?.key??null}return n}getLastKey(e,t){let n=e??null,r;if(n!=null){if(r=this.collection.getItem(n),!r)return null;if(this.isCell(r)&&!t&&r.parentKey!=null){let e=this.collection.getItem(r.parentKey);return e?Gy(Hy(e,this.collection))?.key??null:null}}if(n=this.findPreviousKey(void 0,e=>e.type===`item`),n!=null&&(r&&this.isCell(r)&&t||this.focusMode===`cell`)){let e=this.collection.getItem(n);if(!e)return null;n=Gy(Hy(e,this.collection))?.key??null}return n}getKeyPageAbove(e){let t=e,n=this.layoutDelegate.getItemRect(t);if(!n)return null;let r=Math.max(0,n.y+n.height-this.layoutDelegate.getVisibleRect().height);for(;n&&n.y>r&&t!=null&&(t=this.getKeyAbove(t)??null,t!=null);)n=this.layoutDelegate.getItemRect(t);return t}getKeyPageBelow(e){let t=e,n=this.layoutDelegate.getItemRect(t);if(!n)return null;let r=this.layoutDelegate.getVisibleRect().height,i=Math.min(this.layoutDelegate.getContentSize().height,n.y+r);for(;n&&n.y+n.heighte.type===`item`),n==null&&!a&&(n=this.getFirstKey(),a=!0)}return null}},sN=class{constructor(e){this.layout=e}getContentSize(){return this.layout.getContentSize()}getItemRect(e){return this.layout.getLayoutInfo(e)?.rect||null}getVisibleRect(){return this.layout.virtualizer.visibleRect}},cN=new WeakMap;function Yae(e,t,n){let{isVirtualized:r,disallowTypeAhead:i,keyboardDelegate:a,focusMode:o,scrollRef:s,getRowText:c,onRowAction:l,onCellAction:u,escapeKeyBehavior:d=`clearSelection`,shouldSelectOnPressUp:f,keyboardNavigationBehavior:p=`arrow`}=e,{selectionManager:m}=t;!e[`aria-label`]&&!e[`aria-labelledby`]&&console.warn(`An aria-label or aria-labelledby prop is required for accessibility.`);let h=Ly({usage:`search`,sensitivity:`base`}),{direction:g}=bp(),_=t.selectionManager.disabledBehavior,y=(0,v.useMemo)(()=>a||new oN({collection:t.collection,disabledKeys:t.disabledKeys,disabledBehavior:_,ref:n,direction:g,collator:h,focusMode:o}),[a,t.collection,t.disabledKeys,_,n,g,h,o]),{collectionProps:b}=Ny({ref:n,selectionManager:m,keyboardDelegate:y,isVirtualized:r,scrollRef:s,disallowTypeAhead:i,escapeKeyBehavior:d}),x=ms(e.id);cN.set(t,{keyboardDelegate:y,actions:{onRowAction:l,onCellAction:u},shouldSelectOnPressUp:f,keyboardNavigationBehavior:p});let S=fj({selectionManager:m,hasItemActions:!!(l||u)}),C=Us(e,{labelable:!0}),w=(0,v.useCallback)(e=>{if(m.isFocused){Ds(e.currentTarget,U(e))||m.setFocused(!1);return}Ds(e.currentTarget,U(e))&&m.setFocused(!0)},[m]),T=(0,v.useMemo)(()=>({onBlur:b.onBlur,onFocus:w}),[w,b.onBlur]),E=_A(n,{isDisabled:t.collection.size!==0}),D=W(C,{role:`grid`,id:x,"aria-multiselectable":m.selectionMode===`multiple`?`true`:void 0},t.isKeyboardNavigationDisabled?T:b,t.collection.size===0&&{tabIndex:E?-1:0}||void 0,S);return r&&(D[`aria-rowcount`]=t.collection.size,D[`aria-colcount`]=t.collection.columnCount),lj({getRowText:c},t),{gridProps:D}}var lN=new WeakMap;function uN(e){return typeof e==`string`?e.replace(/\s*/g,``):``+e}function dN(e,t){let n=lN.get(e);if(!n)throw Error(`Unknown grid`);return`${n}-${uN(t)}`}function fN(e,t,n){let r=lN.get(e);if(!r)throw Error(`Unknown grid`);return`${r}-${uN(t)}-${uN(n)}`}function pN(e,t){return[...e.collection.rowHeaderColumnKeys].map(n=>fN(e,t,n)).join(` `)}var mN={};mN={ascending:`تصاعدي`,ascendingSort:e=>`\u{62A}\u{631}\u{62A}\u{64A}\u{628} \u{62D}\u{633}\u{628} \u{627}\u{644}\u{639}\u{645}\u{648}\u{62F} ${e.columnName} \u{628}\u{62A}\u{631}\u{62A}\u{64A}\u{628} \u{62A}\u{635}\u{627}\u{639}\u{62F}\u{64A}`,collapse:`طي`,columnSize:e=>`${e.value} \u{628}\u{627}\u{644}\u{628}\u{643}\u{633}\u{644}`,descending:`تنازلي`,descendingSort:e=>`\u{62A}\u{631}\u{62A}\u{64A}\u{628} \u{62D}\u{633}\u{628} \u{627}\u{644}\u{639}\u{645}\u{648}\u{62F} ${e.columnName} \u{628}\u{62A}\u{631}\u{62A}\u{64A}\u{628} \u{62A}\u{646}\u{627}\u{632}\u{644}\u{64A}`,expand:`تمديد`,resizerDescription:`اضغط على مفتاح Enter لبدء تغيير الحجم`,select:`تحديد`,selectAll:`تحديد الكل`,sortable:`عمود قابل للترتيب`};var hN={};hN={ascending:`възходящ`,ascendingSort:e=>`\u{441}\u{43E}\u{440}\u{442}\u{438}\u{440}\u{430}\u{43D}\u{43E} \u{43F}\u{43E} \u{43A}\u{43E}\u{43B}\u{43E}\u{43D}\u{430} ${e.columnName} \u{432}\u{44A}\u{432} \u{432}\u{44A}\u{437}\u{445}\u{43E}\u{434}\u{44F}\u{449} \u{440}\u{435}\u{434}`,collapse:`Свиване`,columnSize:e=>`${e.value} \u{43F}\u{438}\u{43A}\u{441}\u{435}\u{43B}\u{430}`,descending:`низходящ`,descendingSort:e=>`\u{441}\u{43E}\u{440}\u{442}\u{438}\u{440}\u{430}\u{43D}\u{43E} \u{43F}\u{43E} \u{43A}\u{43E}\u{43B}\u{43E}\u{43D}\u{430} ${e.columnName} \u{432} \u{43D}\u{438}\u{437}\u{445}\u{43E}\u{434}\u{44F}\u{449} \u{440}\u{435}\u{434}`,expand:`Разширяване`,resizerDescription:`Натиснете „Enter“, за да започнете да преоразмерявате`,select:`Изберете`,selectAll:`Изберете всичко`,sortable:`сортираща колона`};var gN={};gN={ascending:`vzestupně`,ascendingSort:e=>`\u{159}azeno vzestupn\u{11B} podle sloupce ${e.columnName}`,collapse:`Sbalit`,columnSize:e=>`${e.value} pixel\u{16F}`,descending:`sestupně`,descendingSort:e=>`\u{159}azeno sestupn\u{11B} podle sloupce ${e.columnName}`,expand:`Roztáhnout`,resizerDescription:`Stisknutím klávesy Enter začnete měnit velikost`,select:`Vybrat`,selectAll:`Vybrat vše`,sortable:`sloupec s možností řazení`};var _N={};_N={ascending:`stigende`,ascendingSort:e=>`sorteret efter kolonne ${e.columnName} i stigende r\xe6kkef\xf8lge`,collapse:`Skjul`,columnSize:e=>`${e.value} pixels`,descending:`faldende`,descendingSort:e=>`sorteret efter kolonne ${e.columnName} i faldende r\xe6kkef\xf8lge`,expand:`Udvid`,resizerDescription:`Tryk på Enter for at ændre størrelse`,select:`Vælg`,selectAll:`Vælg alle`,sortable:`sorterbar kolonne`};var vN={};vN={ascending:`aufsteigend`,ascendingSort:e=>`sortiert nach Spalte ${e.columnName} in aufsteigender Reihenfolge`,collapse:`Reduzieren`,columnSize:e=>`${e.value} Pixel`,descending:`absteigend`,descendingSort:e=>`sortiert nach Spalte ${e.columnName} in absteigender Reihenfolge`,expand:`Erweitern`,resizerDescription:`Eingabetaste zum Starten der Größenänderung drücken`,select:`Auswählen`,selectAll:`Alles auswählen`,sortable:`sortierbare Spalte`};var yN={};yN={ascending:`αύξουσα`,ascendingSort:e=>`\u{3B4}\u{3B9}\u{3B1}\u{3BB}\u{3BF}\u{3B3}\u{3AE} \u{3B1}\u{3BD}\u{3AC} \u{3C3}\u{3C4}\u{3AE}\u{3BB}\u{3B7} ${e.columnName} \u{3C3}\u{3B5} \u{3B1}\u{3CD}\u{3BE}\u{3BF}\u{3C5}\u{3C3}\u{3B1} \u{3C3}\u{3B5}\u{3B9}\u{3C1}\u{3AC}`,collapse:`Σύμπτυξη`,columnSize:e=>`${e.value} pixel`,descending:`φθίνουσα`,descendingSort:e=>`\u{3B4}\u{3B9}\u{3B1}\u{3BB}\u{3BF}\u{3B3}\u{3AE} \u{3B1}\u{3BD}\u{3AC} \u{3C3}\u{3C4}\u{3AE}\u{3BB}\u{3B7} ${e.columnName} \u{3C3}\u{3B5} \u{3C6}\u{3B8}\u{3AF}\u{3BD}\u{3BF}\u{3C5}\u{3C3}\u{3B1} \u{3C3}\u{3B5}\u{3B9}\u{3C1}\u{3AC}`,expand:`Ανάπτυξη`,resizerDescription:`Πατήστε Enter για έναρξη της αλλαγής μεγέθους`,select:`Επιλογή`,selectAll:`Επιλογή όλων`,sortable:`Στήλη διαλογής`};var bN={};bN={select:`Select`,selectAll:`Select All`,sortable:`sortable column`,ascending:`ascending`,descending:`descending`,ascendingSort:e=>`sorted by column ${e.columnName} in ascending order`,descendingSort:e=>`sorted by column ${e.columnName} in descending order`,columnSize:e=>`${e.value} pixels`,resizerDescription:`Press Enter to start resizing`,expand:`Expand`,collapse:`Collapse`};var xN={};xN={ascending:`ascendente`,ascendingSort:e=>`ordenado por columna ${e.columnName} en sentido ascendente`,collapse:`Contraer`,columnSize:e=>`${e.value} p\xedxeles`,descending:`descendente`,descendingSort:e=>`ordenado por columna ${e.columnName} en orden descendente`,expand:`Ampliar`,resizerDescription:`Pulse Intro para empezar a redimensionar`,select:`Seleccionar`,selectAll:`Seleccionar todos`,sortable:`columna ordenable`};var SN={};SN={ascending:`tõusev järjestus`,ascendingSort:e=>`sorditud veeru j\xe4rgi ${e.columnName} t\xf5usvas j\xe4rjestuses`,collapse:`Ahenda`,columnSize:e=>`${e.value} pikslit`,descending:`laskuv järjestus`,descendingSort:e=>`sorditud veeru j\xe4rgi ${e.columnName} laskuvas j\xe4rjestuses`,expand:`Laienda`,resizerDescription:`Suuruse muutmise alustamiseks vajutage klahvi Enter`,select:`Vali`,selectAll:`Vali kõik`,sortable:`sorditav veerg`};var CN={};CN={ascending:`nouseva`,ascendingSort:e=>`lajiteltu sarakkeen ${e.columnName} mukaan nousevassa j\xe4rjestyksess\xe4`,collapse:`Pienennä`,columnSize:e=>`${e.value} pikseli\xe4`,descending:`laskeva`,descendingSort:e=>`lajiteltu sarakkeen ${e.columnName} mukaan laskevassa j\xe4rjestyksess\xe4`,expand:`Laajenna`,resizerDescription:`Aloita koon muutos painamalla Enter-näppäintä`,select:`Valitse`,selectAll:`Valitse kaikki`,sortable:`lajiteltava sarake`};var wN={};wN={ascending:`croissant`,ascendingSort:e=>`tri\xe9 en fonction de la colonne\xa0${e.columnName} par ordre croissant`,collapse:`Réduire`,columnSize:e=>`${e.value}\xa0pixels`,descending:`décroissant`,descendingSort:e=>`tri\xe9 en fonction de la colonne\xa0${e.columnName} par ordre d\xe9croissant`,expand:`Développer`,resizerDescription:`Appuyez sur Entrée pour commencer le redimensionnement.`,select:`Sélectionner`,selectAll:`Sélectionner tout`,sortable:`colonne triable`};var TN={};TN={ascending:`עולה`,ascendingSort:e=>`\u{5DE}\u{5D5}\u{5D9}\u{5DF} \u{5DC}\u{5E4}\u{5D9} \u{5E2}\u{5DE}\u{5D5}\u{5D3}\u{5D4} ${e.columnName} \u{5D1}\u{5E1}\u{5D3}\u{5E8} \u{5E2}\u{5D5}\u{5DC}\u{5D4}`,collapse:`כווץ`,columnSize:e=>`${e.value} \u{5E4}\u{5D9}\u{5E7}\u{5E1}\u{5DC}\u{5D9}\u{5DD}`,descending:`יורד`,descendingSort:e=>`\u{5DE}\u{5D5}\u{5D9}\u{5DF} \u{5DC}\u{5E4}\u{5D9} \u{5E2}\u{5DE}\u{5D5}\u{5D3}\u{5D4} ${e.columnName} \u{5D1}\u{5E1}\u{5D3}\u{5E8} \u{5D9}\u{5D5}\u{5E8}\u{5D3}`,expand:`הרחב`,resizerDescription:`הקש Enter כדי לשנות את הגודל`,select:`בחר`,selectAll:`בחר הכול`,sortable:`עמודה שניתן למיין`};var EN={};EN={ascending:`rastući`,ascendingSort:e=>`razvrstano po stupcima ${e.columnName} rastu\u{107}em redoslijedom`,collapse:`Sažmi`,columnSize:e=>`${e.value} piksela`,descending:`padajući`,descendingSort:e=>`razvrstano po stupcima ${e.columnName} padaju\u{107}im redoslijedom`,expand:`Proširi`,resizerDescription:`Pritisnite Enter da biste započeli promenu veličine`,select:`Odaberite`,selectAll:`Odaberite sve`,sortable:`stupac koji se može razvrstati`};var DN={};DN={ascending:`növekvő`,ascendingSort:e=>`rendezve a(z) ${e.columnName} oszlop szerint, n\xf6vekv\u{151} sorrendben`,collapse:`Összecsukás`,columnSize:e=>`${e.value} k\xe9ppont`,descending:`csökkenő`,descendingSort:e=>`rendezve a(z) ${e.columnName} oszlop szerint, cs\xf6kken\u{151} sorrendben`,expand:`Kibontás`,resizerDescription:`Nyomja le az Enter billentyűt az átméretezés megkezdéséhez`,select:`Kijelölés`,selectAll:`Összes kijelölése`,sortable:`rendezendő oszlop`};var ON={};ON={ascending:`crescente`,ascendingSort:e=>`in ordine crescente in base alla colonna ${e.columnName}`,collapse:`Comprimi`,columnSize:e=>`${e.value} pixel`,descending:`decrescente`,descendingSort:e=>`in ordine decrescente in base alla colonna ${e.columnName}`,expand:`Espandi`,resizerDescription:`Premi Invio per iniziare a ridimensionare`,select:`Seleziona`,selectAll:`Seleziona tutto`,sortable:`colonna ordinabile`};var kN={};kN={ascending:`昇順`,ascendingSort:e=>`\u{5217} ${e.columnName} \u{3092}\u{6607}\u{9806}\u{3067}\u{4E26}\u{3079}\u{66FF}\u{3048}`,collapse:`折りたたむ`,columnSize:e=>`${e.value} \u{30D4}\u{30AF}\u{30BB}\u{30EB}`,descending:`降順`,descendingSort:e=>`\u{5217} ${e.columnName} \u{3092}\u{964D}\u{9806}\u{3067}\u{4E26}\u{3079}\u{66FF}\u{3048}`,expand:`展開`,resizerDescription:`Enter キーを押してサイズ変更を開始`,select:`選択`,selectAll:`すべて選択`,sortable:`並べ替え可能な列`};var AN={};AN={ascending:`오름차순`,ascendingSort:e=>`${e.columnName} \u{C5F4}\u{C744} \u{AE30}\u{C900}\u{C73C}\u{B85C} \u{C624}\u{B984}\u{CC28}\u{C21C}\u{C73C}\u{B85C} \u{C815}\u{B82C}\u{B428}`,collapse:`접기`,columnSize:e=>`${e.value} \u{D53D}\u{C140}`,descending:`내림차순`,descendingSort:e=>`${e.columnName} \u{C5F4}\u{C744} \u{AE30}\u{C900}\u{C73C}\u{B85C} \u{B0B4}\u{B9BC}\u{CC28}\u{C21C}\u{C73C}\u{B85C} \u{C815}\u{B82C}\u{B428}`,expand:`펼치기`,resizerDescription:`크기 조정을 시작하려면 Enter를 누르세요.`,select:`선택`,selectAll:`모두 선택`,sortable:`정렬 가능한 열`};var jN={};jN={ascending:`didėjančia tvarka`,ascendingSort:e=>`surikiuota pagal stulpel\u{12F} ${e.columnName} did\u{117}jan\u{10D}ia tvarka`,collapse:`Sutraukti`,columnSize:e=>`${e.value} piks.`,descending:`mažėjančia tvarka`,descendingSort:e=>`surikiuota pagal stulpel\u{12F} ${e.columnName} ma\u{17E}\u{117}jan\u{10D}ia tvarka`,expand:`Išskleisti`,resizerDescription:`Paspauskite „Enter“, kad pradėtumėte keisti dydį`,select:`Pasirinkti`,selectAll:`Pasirinkti viską`,sortable:`rikiuojamas stulpelis`};var MN={};MN={ascending:`augošā secībā`,ascendingSort:e=>`k\u{101}rtots p\u{113}c kolonnas ${e.columnName} augo\u{161}\u{101} sec\u{12B}b\u{101}`,collapse:`Sakļaut`,columnSize:e=>`${e.value} pikse\u{13C}i`,descending:`dilstošā secībā`,descendingSort:e=>`k\u{101}rtots p\u{113}c kolonnas ${e.columnName} dilsto\u{161}\u{101} sec\u{12B}b\u{101}`,expand:`Izvērst`,resizerDescription:`Nospiediet Enter, lai sāktu izmēru mainīšanu`,select:`Atlasīt`,selectAll:`Atlasīt visu`,sortable:`kārtojamā kolonna`};var NN={};NN={ascending:`stigende`,ascendingSort:e=>`sortert etter kolonne ${e.columnName} i stigende rekkef\xf8lge`,collapse:`Skjul`,columnSize:e=>`${e.value} piksler`,descending:`synkende`,descendingSort:e=>`sortert etter kolonne ${e.columnName} i synkende rekkef\xf8lge`,expand:`Utvid`,resizerDescription:`Trykk på Enter for å starte størrelsesendring`,select:`Velg`,selectAll:`Velg alle`,sortable:`kolonne som kan sorteres`};var PN={};PN={ascending:`oplopend`,ascendingSort:e=>`gesorteerd in oplopende volgorde in kolom ${e.columnName}`,collapse:`Samenvouwen`,columnSize:e=>`${e.value} pixels`,descending:`aflopend`,descendingSort:e=>`gesorteerd in aflopende volgorde in kolom ${e.columnName}`,expand:`Uitvouwen`,resizerDescription:`Druk op Enter om het formaat te wijzigen`,select:`Selecteren`,selectAll:`Alles selecteren`,sortable:`sorteerbare kolom`};var FN={};FN={ascending:`rosnąco`,ascendingSort:e=>`posortowano wed\u{142}ug kolumny ${e.columnName} w porz\u{105}dku rosn\u{105}cym`,collapse:`Zwiń`,columnSize:e=>`Liczba pikseli: ${e.value}`,descending:`malejąco`,descendingSort:e=>`posortowano wed\u{142}ug kolumny ${e.columnName} w porz\u{105}dku malej\u{105}cym`,expand:`Rozwiń`,resizerDescription:`Naciśnij Enter, aby rozpocząć zmienianie rozmiaru`,select:`Zaznacz`,selectAll:`Zaznacz wszystko`,sortable:`kolumna z możliwością sortowania`};var IN={};IN={ascending:`crescente`,ascendingSort:e=>`classificado pela coluna ${e.columnName} em ordem crescente`,collapse:`Recolher`,columnSize:e=>`${e.value} pixels`,descending:`decrescente`,descendingSort:e=>`classificado pela coluna ${e.columnName} em ordem decrescente`,expand:`Expandir`,resizerDescription:`Pressione Enter para começar a redimensionar`,select:`Selecionar`,selectAll:`Selecionar tudo`,sortable:`coluna classificável`};var LN={};LN={ascending:`ascendente`,ascendingSort:e=>`Ordenar por coluna ${e.columnName} em ordem ascendente`,collapse:`Colapsar`,columnSize:e=>`${e.value} pixels`,descending:`descendente`,descendingSort:e=>`Ordenar por coluna ${e.columnName} em ordem descendente`,expand:`Expandir`,resizerDescription:`Prima Enter para iniciar o redimensionamento`,select:`Selecionar`,selectAll:`Selecionar tudo`,sortable:`Coluna ordenável`};var RN={};RN={ascending:`crescătoare`,ascendingSort:e=>`sortate dup\u{103} coloana ${e.columnName} \xeen ordine cresc\u{103}toare`,collapse:`Restrângeți`,columnSize:e=>`${e.value} pixeli`,descending:`descrescătoare`,descendingSort:e=>`sortate dup\u{103} coloana ${e.columnName} \xeen ordine descresc\u{103}toare`,expand:`Extindeți`,resizerDescription:`Apăsați pe Enter pentru a începe redimensionarea`,select:`Selectare`,selectAll:`Selectare totală`,sortable:`coloană sortabilă`};var zN={};zN={ascending:`возрастание`,ascendingSort:e=>`\u{441}\u{43E}\u{440}\u{442}\u{438}\u{440}\u{43E}\u{432}\u{430}\u{442}\u{44C} \u{441}\u{442}\u{43E}\u{43B}\u{431}\u{435}\u{446} ${e.columnName} \u{432} \u{43F}\u{43E}\u{440}\u{44F}\u{434}\u{43A}\u{435} \u{432}\u{43E}\u{437}\u{440}\u{430}\u{441}\u{442}\u{430}\u{43D}\u{438}\u{44F}`,collapse:`Свернуть`,columnSize:e=>`${e.value} \u{43F}\u{438}\u{43A}\u{441}.`,descending:`убывание`,descendingSort:e=>`\u{441}\u{43E}\u{440}\u{442}\u{438}\u{440}\u{43E}\u{432}\u{430}\u{442}\u{44C} \u{441}\u{442}\u{43E}\u{43B}\u{431}\u{435}\u{446} ${e.columnName} \u{432} \u{43F}\u{43E}\u{440}\u{44F}\u{434}\u{43A}\u{435} \u{443}\u{431}\u{44B}\u{432}\u{430}\u{43D}\u{438}\u{44F}`,expand:`Развернуть`,resizerDescription:`Нажмите клавишу Enter для начала изменения размеров`,select:`Выбрать`,selectAll:`Выбрать все`,sortable:`сортируемый столбец`};var BN={};BN={ascending:`vzostupne`,ascendingSort:e=>`zoraden\xe9 zostupne pod\u{13E}a st\u{13A}pca ${e.columnName}`,collapse:`Zbaliť`,columnSize:e=>`Po\u{10D}et pixelov: ${e.value}`,descending:`zostupne`,descendingSort:e=>`zoraden\xe9 zostupne pod\u{13E}a st\u{13A}pca ${e.columnName}`,expand:`Rozbaliť`,resizerDescription:`Stlačením klávesu Enter začnete zmenu veľkosti`,select:`Vybrať`,selectAll:`Vybrať všetko`,sortable:`zoraditeľný stĺpec`};var VN={};VN={ascending:`naraščajoče`,ascendingSort:e=>`razvr\u{161}\u{10D}eno po stolpcu ${e.columnName} v nara\u{161}\u{10D}ajo\u{10D}em vrstnem redu`,collapse:`Strni`,columnSize:e=>`${e.value} slikovnih pik`,descending:`padajoče`,descendingSort:e=>`razvr\u{161}\u{10D}eno po stolpcu ${e.columnName} v padajo\u{10D}em vrstnem redu`,expand:`Razširi`,resizerDescription:`Pritisnite tipko Enter da začnete spreminjati velikost`,select:`Izberite`,selectAll:`Izberite vse`,sortable:`razvrstljivi stolpec`};var HN={};HN={ascending:`rastući`,ascendingSort:e=>`sortirano po kolonama ${e.columnName} rastu\u{107}im redosledom`,collapse:`Skupi`,columnSize:e=>`${e.value} piksela`,descending:`padajući`,descendingSort:e=>`sortirano po kolonama ${e.columnName} padaju\u{107}im redosledom`,expand:`Proširi`,resizerDescription:`Pritisnite Enter da biste započeli promenu veličine`,select:`Izaberite`,selectAll:`Izaberite sve`,sortable:`kolona koja se može sortirati`};var UN={};UN={ascending:`stigande`,ascendingSort:e=>`sorterat p\xe5 kolumn ${e.columnName} i stigande ordning`,collapse:`Dölj`,columnSize:e=>`${e.value} pixlar`,descending:`fallande`,descendingSort:e=>`sorterat p\xe5 kolumn ${e.columnName} i fallande ordning`,expand:`Expandera`,resizerDescription:`Tryck på Retur för att börja ändra storlek`,select:`Markera`,selectAll:`Markera allt`,sortable:`sorterbar kolumn`};var WN={};WN={ascending:`artan sırada`,ascendingSort:e=>`${e.columnName} s\xfctuna g\xf6re artan d\xfczende s\u{131}rala`,collapse:`Daralt`,columnSize:e=>`${e.value} piksel`,descending:`azalan sırada`,descendingSort:e=>`${e.columnName} s\xfctuna g\xf6re azalan d\xfczende s\u{131}rala`,expand:`Genişlet`,resizerDescription:`Yeniden boyutlandırmak için Enter'a basın`,select:`Seç`,selectAll:`Tümünü Seç`,sortable:`Sıralanabilir sütun`};var GN={};GN={ascending:`висхідний`,ascendingSort:e=>`\u{432}\u{456}\u{434}\u{441}\u{43E}\u{440}\u{442}\u{43E}\u{432}\u{430}\u{43D}\u{43E} \u{437}\u{430} \u{441}\u{442}\u{43E}\u{432}\u{43F}\u{446}\u{435}\u{43C} ${e.columnName} \u{443} \u{432}\u{438}\u{441}\u{445}\u{456}\u{434}\u{43D}\u{43E}\u{43C}\u{443} \u{43F}\u{43E}\u{440}\u{44F}\u{434}\u{43A}\u{443}`,collapse:`Згорнути`,columnSize:e=>`${e.value} \u{43F}\u{456}\u{43A}\u{441}.`,descending:`низхідний`,descendingSort:e=>`\u{432}\u{456}\u{434}\u{441}\u{43E}\u{440}\u{442}\u{43E}\u{432}\u{430}\u{43D}\u{43E} \u{437}\u{430} \u{441}\u{442}\u{43E}\u{432}\u{43F}\u{446}\u{435}\u{43C} ${e.columnName} \u{443} \u{43D}\u{438}\u{437}\u{445}\u{456}\u{434}\u{43D}\u{43E}\u{43C}\u{443} \u{43F}\u{43E}\u{440}\u{44F}\u{434}\u{43A}\u{443}`,expand:`Розгорнути`,resizerDescription:`Натисніть Enter, щоб почати зміну розміру`,select:`Вибрати`,selectAll:`Вибрати все`,sortable:`сортувальний стовпець`};var KN={};KN={ascending:`升序`,ascendingSort:e=>`\u{6309}\u{5217} ${e.columnName} \u{5347}\u{5E8F}\u{6392}\u{5E8F}`,collapse:`折叠`,columnSize:e=>`${e.value} \u{50CF}\u{7D20}`,descending:`降序`,descendingSort:e=>`\u{6309}\u{5217} ${e.columnName} \u{964D}\u{5E8F}\u{6392}\u{5E8F}`,expand:`扩展`,resizerDescription:`按 Enter 开始调整大小。`,select:`选择`,selectAll:`全选`,sortable:`可排序的列`};var qN={};qN={ascending:`遞增`,ascendingSort:e=>`\u{5DF2}\u{4F9D}\u{64DA}\u{300C}${e.columnName}\u{300D}\u{6B04}\u{905E}\u{589E}\u{6392}\u{5E8F}`,collapse:`收合`,columnSize:e=>`${e.value} \u{50CF}\u{7D20}`,descending:`遞減`,descendingSort:e=>`\u{5DF2}\u{4F9D}\u{64DA}\u{300C}${e.columnName}\u{300D}\u{6B04}\u{905E}\u{6E1B}\u{6392}\u{5E8F}`,expand:`展開`,resizerDescription:`按 Enter 鍵以開始調整大小`,select:`選取`,selectAll:`全選`,sortable:`可排序的欄`};var JN={};JN={"ar-AE":mN,"bg-BG":hN,"cs-CZ":gN,"da-DK":_N,"de-DE":vN,"el-GR":yN,"en-US":bN,"es-ES":xN,"et-EE":SN,"fi-FI":CN,"fr-FR":wN,"he-IL":TN,"hr-HR":EN,"hu-HU":DN,"it-IT":ON,"ja-JP":kN,"ko-KR":AN,"lt-LT":jN,"lv-LV":MN,"nb-NO":NN,"nl-NL":PN,"pl-PL":FN,"pt-BR":IN,"pt-PT":LN,"ro-RO":RN,"ru-RU":zN,"sk-SK":BN,"sl-SI":VN,"sr-SP":HN,"sv-SE":UN,"tr-TR":WN,"uk-UA":GN,"zh-CN":KN,"zh-TW":qN};var Xae=class extends oN{isCell(e){return e.type===`cell`||e.type===`rowheader`||e.type===`column`}getKeyBelow(e,t){let n=this.collection.getItem(e);if(!n)return null;if(n.type===`column`){let e=Uy(Hy(n,this.collection));if(e)return e.key;let t=this.getFirstKey();return t==null||!this.collection.getItem(t)?null:super.getKeyForItemInRowByIndex(t,n.index)}return super.getKeyBelow(e,t)}getKeyAbove(e,t){let n=this.collection.getItem(e);if(!n)return null;if(n.type===`column`){let e=n.parentKey==null?null:this.collection.getItem(n.parentKey);return e&&e.type===`column`?e.key:null}let r=super.getKeyAbove(e,t),i=r==null?null:this.collection.getItem(r);return i&&i.type!==`headerrow`?r:this.isCell(n)?this.collection.columns[n.index].key:this.collection.columns[0].key}findNextColumnKey(e){let t=this.findNextKey(e.key,e=>e.type===`column`);if(t!=null)return t;let n=this.collection.headerRows[e.level];for(let e of Hy(n,this.collection))if(e.type===`column`)return e.key;return null}findPreviousColumnKey(e){let t=this.findPreviousKey(e.key,e=>e.type===`column`);if(t!=null)return t;let n=this.collection.headerRows[e.level],r=[...Hy(n,this.collection)];for(let e=r.length-1;e>=0;e--){let t=r[e];if(t.type===`column`)return t.key}return null}getKeyRightOf(e){let t=this.collection.getItem(e);return t?t.type===`column`?this.direction===`rtl`?this.findPreviousColumnKey(t):this.findNextColumnKey(t):super.getKeyRightOf(e):null}getKeyLeftOf(e){let t=this.collection.getItem(e);return t?t.type===`column`?this.direction===`rtl`?this.findNextColumnKey(t):this.findPreviousColumnKey(t):super.getKeyLeftOf(e):null}getKeyForSearch(e,t){if(!this.collator)return null;let n=this.collection,r=t??this.getFirstKey();if(r==null)return null;let i=n.getItem(r);i?.type===`cell`&&(r=i.parentKey??null);let a=!1;for(;r!=null;){let o=n.getItem(r);if(!o)return null;if(o.textValue){let t=o.textValue.slice(0,e.length);if(this.collator.compare(t,e)===0)return o.key}for(let r of Hy(o,this.collection)){let a=n.columns[r.index];if(n.rowHeaderColumnKeys.has(a.key)&&r.textValue){let a=r.textValue.slice(0,e.length);if(this.collator.compare(a,e)===0)return(t==null?i:n.getItem(t))?.type===`cell`?r.key:o.key}}r=this.getKeyBelow(r),r==null&&!a&&(r=this.getFirstKey(),a=!0)}return null}};function Zae(e){return e&&e.__esModule?e.default:e}function Qae(e,t,n){let{keyboardDelegate:r,isVirtualized:i,layoutDelegate:a,layout:o}=e,s=Ly({usage:`search`,sensitivity:`base`}),{direction:c}=bp(),l=t.selectionManager.disabledBehavior,u=(0,v.useMemo)(()=>r||new Xae({collection:t.collection,disabledKeys:t.disabledKeys,disabledBehavior:l,ref:n,direction:c,collator:s,layoutDelegate:a,layout:o}),[r,t.collection,t.disabledKeys,l,n,c,s,a,o]),d=ms(e.id);lN.set(t,d);let{gridProps:f}=Yae({...e,id:d,keyboardDelegate:u},t,n);i&&(f[`aria-rowcount`]=t.collection.size+t.collection.headerRows.length),t.treeColumn!=null&&(f.role=`treegrid`);let{column:p,direction:m}=t.sortDescriptor||{},h=s_(Zae(JN),`@react-aria/table`),g=(0,v.useMemo)(()=>{let e=t.collection.columns.find(e=>e.key===p)?.textValue??``;return m&&p?h.format(`${m}Sort`,{columnName:e}):void 0},[m,p,t.collection.columns]),_=gc(g);return ec(()=>{g&&Gp(g,`assertive`,500)},[g]),{gridProps:W(f,_,{"aria-describedby":[_[`aria-describedby`],f[`aria-describedby`]].filter(Boolean).join(` `)})}}function YN(e,t,n){let{node:r,isVirtualized:i,focusMode:a,allowsArrowNavigation:o,shouldSelectOnPressUp:s,onAction:c}=e,{direction:l}=bp(),{keyboardDelegate:u,actions:{onCellAction:d},keyboardNavigationBehavior:f}=cN.get(t),p=a??(f===`tab`?`cell`:`child`),m=(0,v.useRef)(null),h=()=>{if(n.current){let e=rg(n.current);if(p===`child`){if(As(n.current)&&n.current!==Os(vs(n.current)))return;let r=t.selectionManager.childFocusStrategy===`last`?XN(e):e.firstChild();if(r){_m(r);return}}(m.current!=null&&r.key!==m.current||!As(n.current))&&_m(n.current)}},{itemProps:g,isPressed:_}=zy({selectionManager:t.selectionManager,key:r.key,ref:n,isVirtualized:i,focus:h,shouldSelectOnPressUp:s,onAction:d?()=>d(r.key):c,isDisabled:t.collection.size===0}),y=W(g,{role:`gridcell`,onKeyDownCapture:f!==`tab`||o?e=>{let i=Os(vs(n.current));if(!Ds(e.currentTarget,U(e))||t.isKeyboardNavigationDisabled||!n.current||!i)return;let a=rg(n.current);switch(a.currentNode=i,e.key){case`ArrowLeft`:{let t=l===`rtl`?a.nextNode():a.previousNode();if(p===`child`&&t===n.current&&(t=null),e.preventDefault(),e.stopPropagation(),t)_m(t),yc(t,{containingElement:oc(n.current)});else{if(u.getKeyLeftOf?.(r.key)!==r.key){n.current.parentElement?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type,e.nativeEvent));break}p===`cell`&&l===`rtl`?(_m(n.current),yc(n.current,{containingElement:oc(n.current)})):(a.currentNode=n.current,t=l===`rtl`?a.firstChild():XN(a),t&&(_m(t),yc(t,{containingElement:oc(n.current)})))}break}case`ArrowRight`:{let t=l===`rtl`?a.previousNode():a.nextNode();if(p===`child`&&t===n.current&&(t=null),e.preventDefault(),e.stopPropagation(),t)_m(t),yc(t,{containingElement:oc(n.current)});else{if(u.getKeyRightOf?.(r.key)!==r.key){n.current.parentElement?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type,e.nativeEvent));break}p===`cell`&&l===`ltr`?(_m(n.current),yc(n.current,{containingElement:oc(n.current)})):(a.currentNode=n.current,t=l===`rtl`?XN(a):a.firstChild(),t&&(_m(t),yc(t,{containingElement:oc(n.current)})))}break}case`ArrowUp`:case`ArrowDown`:!e.altKey&&Ds(n.current,U(e))&&(e.stopPropagation(),e.preventDefault(),n.current.parentElement?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type,e.nativeEvent)))}}:void 0,onKeyDown:f===`tab`?e=>{let r=Os(vs(n.current));if(!(!Ds(e.currentTarget,U(e))||t.isKeyboardNavigationDisabled||!n.current||!r)){if(f===`tab`&&U(e)!==n.current&&e.key!==`Tab`){e.stopPropagation();return}if(e.key===`Tab`&&f===`tab`){let t=rg(n.current,{tabbable:!0});t.currentNode=r,(e.shiftKey?t.previousNode():t.nextNode())&&e.stopPropagation()}}}:void 0,"aria-colspan":r.colSpan,"aria-colindex":r.colIndex==null?void 0:r.colIndex+1,colSpan:i?void 0:r.colSpan,onFocus:e=>{if(m.current=r.key,U(e)!==n.current){fm()||t.selectionManager.setFocusedKey(r.key);return}p===`child`&&e.relatedTarget&&Ds(n.current,e.relatedTarget)||requestAnimationFrame(()=>{p===`child`&&Os(vs(n.current))===n.current&&h()})},...p===`child`&&f===`tab`?{tabIndex:-1}:{}});return i&&(y[`aria-colindex`]=(r.colIndex??r.index)+1),s&&y.tabIndex!=null&&y.onPointerDown==null&&(y.onPointerDown=e=>{let t=e.currentTarget,n=t.getAttribute(`tabindex`);t.removeAttribute(`tabindex`),requestAnimationFrame(()=>{n!=null&&t.setAttribute(`tabindex`,n)})}),{gridCellProps:y,isPressed:_}}function XN(e){let t=null,n=null;do n=e.lastChild(),n&&(t=n);while(n);return t}function $ae(e){return e&&e.__esModule?e.default:e}function eoe(e,t,n){let{node:r}=e,i=r.props.allowsSorting,{gridCellProps:a}=YN({focusMode:`child`,...e},t,n),o=r.props.isSelectionCell&&t.selectionManager.selectionMode===`single`,{pressProps:s,isPressed:c}=Fm({isDisabled:!i||o,onPress(){t.sort(r.key)},ref:n}),{focusableProps:l}=wm({},n),u,d=t.sortDescriptor?.column===r.key,f=t.sortDescriptor?.direction;r.props.allowsSorting&&!Po()&&(u=d?f:`none`);let p=s_($ae(JN),`@react-aria/table`),m;i&&(m=`${p.format(`sortable`)}`,d&&f&&Po()&&(m=`${m}, ${p.format(f)}`));let h=gc(m),g=t.collection.size===0;return(0,v.useEffect)(()=>{g&&t.selectionManager.focusedKey===r.key&&t.selectionManager.setFocusedKey(null)},[g,t.selectionManager,r.key]),{columnHeaderProps:{...W(l,a,s,h,g?{tabIndex:-1}:null),role:`columnheader`,id:dN(t,r.key),"aria-colspan":r.colSpan&&r.colSpan>1?r.colSpan:void 0,"aria-sort":u},isPressed:c}}function toe(e,t,n){let{node:r,isVirtualized:i,shouldSelectOnPressUp:a,onAction:o}=e,{actions:s,shouldSelectOnPressUp:c}=cN.get(t),l=s.onRowAction?()=>s.onRowAction?.(r.key):o,{itemProps:u,...d}=zy({selectionManager:t.selectionManager,key:r.key,ref:n,isVirtualized:i,shouldSelectOnPressUp:c||a,onAction:l||r?.props?.onAction?_s(r?.props?.onAction,l):void 0,isDisabled:t.collection.size===0}),f=t.selectionManager.isSelected(r.key),p={role:`row`,"aria-selected":t.selectionManager.selectionMode===`none`?void 0:f,"aria-disabled":d.isDisabled||void 0,...u};return i&&(p[`aria-rowindex`]=r.index+1),{rowProps:p,...d}}function noe(e){return e&&e.__esModule?e.default:e}var ZN={expand:{ltr:`ArrowRight`,rtl:`ArrowLeft`},collapse:{ltr:`ArrowLeft`,rtl:`ArrowRight`}};function roe(e,t,n){let{node:r,isVirtualized:i}=e,{rowProps:a,...o}=toe(e,t,n),{direction:s}=bp();i&&t.treeColumn==null?a[`aria-rowindex`]=r.index+1+t.collection.headerRows.length:delete a[`aria-rowindex`];let c=t.treeColumn!=null&&(t.expandedKeys===`all`||t.expandedKeys.has(r.key)),l=s_(noe(JN),`@react-aria/table`),u=Xs({"aria-label":c?l.format(`collapse`):l.format(`expand`),"aria-labelledby":pN(t,r.key)}),d={},f={};if(t.treeColumn!=null){let e=t.collection.getItem(r.key);if(e!=null){let n=QN(t.collection,r),i=e.props?.hasChildRows||e.props?.UNSTABLE_childItems||n?.type!==`cell`,a=t.collection.getItem(r.parentKey),c=a.type===`tablebody`||a.type===`body`,l=QN(t.collection,a);for(;l&&l.type!==`item`&&l.prevKey!=null;)l=t.collection.getItem(l.prevKey);d={onKeyDown:n=>{n.key===ZN.expand[s]&&t.selectionManager.focusedKey===e.key&&i&&t.expandedKeys!==`all`&&!t.expandedKeys.has(e.key)?(t.toggleKey(e.key),n.stopPropagation()):n.key===ZN.collapse[s]&&t.selectionManager.focusedKey===e.key&&(t.expandedKeys===`all`?t.expandedKeys===`all`&&(t.toggleKey(e.key),n.stopPropagation()):i&&t.expandedKeys.has(e.key)?(t.toggleKey(e.key),n.stopPropagation()):!t.expandedKeys.has(e.key)&&e.parentKey!=null&&e.level>0&&(t.selectionManager.setFocusedKey(e.parentKey),n.stopPropagation()))},"aria-expanded":i?t.expandedKeys===`all`||t.expandedKeys.has(r.key):void 0,"aria-level":e.level+1,"aria-posinset":e.index-(c?0:t.collection.columnCount)+1,"aria-setsize":l.index-(c?0:t.collection.columnCount)+1},f={isDisabled:o.isDisabled,onPress:()=>{o.isDisabled||(t.toggleKey(r.key),t.selectionManager.setFocused(!0),t.selectionManager.setFocusedKey(r.key))},excludeFromTabOrder:!0,preventFocusOnPress:!0,"data-react-aria-prevent-focus":!0,...u}}}let p=qo(r.props),m=o.hasAction?p:{};return{rowProps:{...W(a,d,m),"aria-labelledby":pN(t,r.key)},expandButtonProps:f,...o}}function QN(e,t){return`lastChildKey`in t?t.lastChildKey==null?null:e.getItem(t.lastChildKey):Array.from(t.childNodes).findLast(e=>e.parentKey===t.key)}function ioe(e,t,n){let{node:r,isVirtualized:i}=e,a={role:`row`};return i&&t.treeColumn==null&&(a[`aria-rowindex`]=r.index+1),{rowProps:a}}function aoe(e,t,n){let{gridCellProps:r,isPressed:i}=YN(e,t,n),a=e.node.column?.key;return a!=null&&t.collection.rowHeaderColumnKeys.has(a)&&(r.role=`rowheader`,r.id=fN(t,e.node.parentKey,a)),{gridCellProps:r,isPressed:i}}function ooe(e){return e&&e.__esModule?e.default:e}function soe(e,t){let{key:n}=e,{checkboxProps:r}=FM(e,t);return{checkboxProps:{...r,"aria-labelledby":`${r.id} ${pN(t,n)}`}}}function coe(e){let{isEmpty:t,isSelectAll:n,selectionMode:r}=e.selectionManager;return{checkboxProps:{"aria-label":s_(ooe(JN),`@react-aria/table`).format(r===`single`?`select`:`selectAll`),isSelected:n,isDisabled:r!==`multiple`||e.collection.size===0||e.collection.rows.length===1&&e.collection.rows[0].type===`loader`,isIndeterminate:!t&&!n,onChange:()=>e.selectionManager.toggleSelectAll()}}}function loe(e){return e&&e.__esModule?e.default:e}function uoe(e,t,n){let{column:r,triggerRef:i,isDisabled:a,onResizeStart:o,onResize:s,onResizeEnd:c,"aria-label":l}=e,u=s_(loe(JN),`@react-aria/table`),d=ms(),f=t.resizingColumn===r.key,p=(0,v.useRef)(f),m=(0,v.useRef)(null),h=(0,v.useRef)(!1),g=t.tableState.isKeyboardNavigationDisabled,[_,y]=(0,v.useState)(!1),{direction:b}=bp(),x=(0,v.useCallback)(e=>{p.current||(m.current=t.updateResizedColumns(e.key,t.getColumnWidth(e.key)),t.startResize(e.key),t.tableState.setKeyboardNavigationDisabled(!0),o?.(m.current)),p.current=!0},[t,o]),S=(0,v.useCallback)((e,n)=>{let r=t.updateResizedColumns(e.key,n);s?.(r),m.current=r},[t,s]),C=(0,v.useCallback)(e=>{p.current&&(m.current??=t.updateResizedColumns(e.key,t.getColumnWidth(e.key)),t.endResize(),t.tableState.setKeyboardNavigationDisabled(!1),c?.(m.current),p.current=!1,i?.current&&!h.current&&_m(i.current)),m.current=null},[t,i,c]),w=()=>{if(g){C(r);return}return!1},{keyboardProps:T}=Sm({shortcuts:{Escape:()=>w(),Enter:()=>{g?C(r):x(r)}," ":()=>w(),Tab:()=>w()}}),E=(0,v.useRef)(0),{moveProps:D}=Hne({onMoveStart(e){E.current=t.getColumnWidth(r.key),e.pointerType===`mouse`&&y(!0),x(r)},onMove(e){let{deltaX:t,deltaY:n,pointerType:i}=e;b===`rtl`&&(t*=-1),i===`keyboard`&&(n!==0&&t===0&&(t=n*-1),t*=10),t!==0&&(E.current+=t,S(r,E.current))},onMoveEnd(e){let{pointerType:t}=e;E.current=0,y(!1),(t===`mouse`||t===`touch`&&h.current)&&C(r)}}),O=(0,v.useCallback)(e=>{g&&D.onKeyDown?.(e)},[g,D]),k=Math.floor(t.getColumnMinWidth(r.key)),A=Math.floor(t.getColumnMaxWidth(r.key));A===1/0&&(A=2**53-1);let j=Math.floor(t.getColumnWidth(r.key)),M=hm();M===`virtual`&&typeof window<`u`&&`ontouchstart`in window&&(M=`touch`);let N=gc(i?.current==null&&(M===`keyboard`||M===`virtual`)&&!f?u.format(`resizerDescription`):void 0),P={"aria-label":l,"aria-orientation":`horizontal`,"aria-labelledby":`${d} ${dN(t.tableState,r.key)}`,"aria-valuetext":u.format(`columnSize`,{value:j}),type:`range`,min:k,max:A,value:j,...N},F=(0,v.useCallback)(()=>{n.current&&_m(n.current)},[n]),I=t.resizingColumn,L=(0,v.useRef)(null),R=$s(x);(0,v.useEffect)(()=>{if(L.current!==I&&I!=null&&I===r.key){h.current=Os()===n.current,R(r);let e=setTimeout(()=>F(),0),t=setTimeout(F,400);return()=>{clearTimeout(e),clearTimeout(t)}}L.current=I},[I,r,F,n]);let z=e=>{let n=t.getColumnWidth(r.key),i=parseFloat(U(e).value);i=i>n?n+10:n-10,S(r,i)},{pressProps:B}=Fm({preventFocusOnPress:!0,onPressStart:e=>{if(!(e.ctrlKey||e.altKey||e.metaKey||e.shiftKey||e.pointerType===`keyboard`)){if(e.pointerType===`virtual`&&t.resizingColumn!=null){C(r);return}F(),e.pointerType!==`virtual`&&x(r)}},onPress:e=>{(e.pointerType===`touch`&&h.current||e.pointerType===`mouse`)&&t.resizingColumn!=null&&C(r)}}),{visuallyHiddenProps:V}=l_();return{resizerProps:W(T,{...D,onKeyDown:O},B,{style:{touchAction:`none`}}),inputProps:W(V,{id:d,onBlur:()=>{C(r)},onChange:z,disabled:a},P),isResizing:f,isMouseResizing:_}}function doe(){return{rowGroupProps:{role:`rowgroup`}}}function $N(){return doe()}function foe(e){return e&&e.__esModule?e.default:e}var poe=class extends E_{withExpandedKeys(e){let t=this.clone();return t.expandedKeys=e,t.frozen=this.frozen,t.rows=Array.from(t.getRows()),t}addNode(e){super.addNode(e),this.columnsDirty||=e.type===`column`,e.type===`tableheader`&&(this.head=e)}getRows(){let e=[];for(let t of this)(t.type===`tablebody`||t.type===`tablefooter`)&&e.push(...this.getChildren(t.key));return e}get body(){for(let e of this)if(e.type===`tablebody`)return e;return new oP(-2)}commit(e,t,n=!1){this.updateColumns(n),this.firstKey=e,this.lastKey=t,this.rows=[];for(let e of this.getRows()){let t=e.lastChildKey;if(t!=null){let e=this.getItem(t);for(;e&&e.type!==`cell`;)e=e.prevKey==null?null:this.getItem(e.prevKey);if(e){let t=(e.colIndex??e.index)+(e.colSpan??1);if(t!==this.columns.length&&!n)throw Error(`Cell count must match column count. Found ${t} cells and ${this.columns.length} columns.`)}}this.rows.push(e)}super.commit(e,t,n)}updateColumns(e){if(!this.columnsDirty)return;this.rowHeaderColumnKeys=new Set,this.columns=[];let t=new Map,n=e=>{e.type===`column`&&(t.set(e.key,e),e.hasChildNodes||(e.index=this.columns.length,this.columns.push(e),e.props.isRowHeader&&this.rowHeaderColumnKeys.add(e.key)));for(let t of this.getChildren(e.key))n(t)};for(let e of this.getChildren(this.head.key))n(e);if(this.headerRows=GM(t,this.columns),this.columnsDirty=!1,this.rowHeaderColumnKeys.size===0&&this.columns.length>0&&!e)throw Error(`A table must have at least one Column with the isRowHeader prop set to true`)}get columnCount(){return this.columns.length}*[Symbol.iterator](){let e=this.firstKey;for(;e!=null;){let t=this.getItem(e);t&&(yield t),e=t?.nextKey??null}}getFirstKey(){for(let e of this)if(e.type===`tablebody`)return e.firstChildKey??null;return null}getLastKey(){let e=this.lastKey;if(e==null)return null;let t=this.getItem(e);for(;t?.lastChildKey!=null&&(t.type!==`item`||this.expandedKeys.has(t.key));)t=this.getItem(t.lastChildKey);return t?.key}getKeyAfter(e){let t=this.getItem(e);if(t?.type===`column`)return t.nextKey??null;if(!t)return null;if(t.type===`item`&&t.firstChildKey!=null&&this.expandedKeys.has(t.key)){let e=this.getItem(t.firstChildKey);for(;e;){if(e.type===`item`)return e.key;e=e.nextKey==null?null:this.getItem(e.nextKey)}}return super.getKeyAfter(e)}getKeyBefore(e){let t=this.getItem(e);if(t?.type===`column`)return t.prevKey??null;if(!t)return null;let n=null;if(t.prevKey!=null){for(t=this.getItem(t.prevKey);t&&(t.type!==`item`||this.expandedKeys.has(t.key))&&t.lastChildKey!=null;)t=this.getItem(t.lastChildKey);n=t?.key??null}return n??=t.parentKey,n!=null&&this.getItem(n)?.type===`tableheader`?null:n}getChildren(e){let t=this.getItem(e);if(!t){for(let t of this.headerRows)if(t.key===e)return t.childNodes}let n=this;return t?.type===`tablebody`||t?.type===`tablefooter`?{*[Symbol.iterator](){let e=t.firstChildKey,r=e==null?null:n.getItem(e);for(;r;){yield r;let e=n.getKeyAfter(r.key);if(r=e==null?null:n.getItem(e),r&&r.parentKey===t.parentKey)break}}}:{*[Symbol.iterator](){let t=n.getItem(e),r=t?.firstChildKey==null?null:n.getItem(t.firstChildKey);for(;r&&(yield r,r=r.nextKey==null?null:n.getItem(r.nextKey),t?.type!==`item`||r?.type===`cell`););}}}clone(){let e=super.clone();return e.headerRows=this.headerRows,e.columns=this.columns,e.rows=this.rows,e.rowHeaderColumnKeys=this.rowHeaderColumnKeys,e.head=this.head,e}getTextValue(e){let t=this.getItem(e);if(!t)return``;if(t.textValue)return t.textValue;let n=this.rowHeaderColumnKeys,r=[];for(let t of this.getChildren(e)){let e=this.columns[t.index];if(n.has(e.key)&&t.textValue&&r.push(t.textValue),r.length===n.size)break}return r.join(` `)}constructor(...e){super(...e),this.headerRows=[],this.columns=[],this.rows=[],this.rowHeaderColumnKeys=new Set,this.head=new iP(-1),this.columnsDirty=!0,this.expandedKeys=new Set}},eP=(0,v.createContext)(null),moe=(0,v.forwardRef)(function(e,t){let n=Zs(t),r=(0,v.useRef)(null),i=(0,v.useRef)(null),[a,o]=(0,v.useState)(0);Xo(()=>{let e=r.current;for(;e&&e!==n.current&&!ac(e);)e=e.parentElement;i.current=e},[n]),rc({ref:i,box:`border-box`,onResize(){o(i.current?.clientWidth??0)}}),Xo(()=>{o(i.current?.clientWidth??0)},[]);let s=(0,v.useMemo)(()=>({tableRef:r,scrollRef:i,tableWidth:a,useTableColumnResizeState:tN,onResizeStart:e.onResizeStart,onResize:e.onResize,onResizeEnd:e.onResizeEnd}),[r,a,e.onResizeStart,e.onResize,e.onResizeEnd]);return v.createElement(np.div,{render:e.render,...Us(e,{global:!0}),ref:n,className:e.className||`react-aria-ResizableTableContainer`,style:e.style,onScroll:e.onScroll},v.createElement(eP.Provider,{value:s},e.children))}),hoe=(0,v.createContext)(null),tP=(0,v.createContext)(null),nP=(0,v.createContext)(null),goe=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,hoe);let n=db(e),{selectionBehavior:r,selectionMode:i,disallowEmptySelection:a}=n,o=!!e.dragAndDropHooks?.useDraggableCollectionState,s=(0,v.useMemo)(()=>({selectionBehavior:i===`none`?null:r,selectionMode:i,disallowEmptySelection:a,allowsDragging:o}),[r,i,a,o]),c=v.createElement(yoe.Provider,{value:s},v.createElement(W_,e));return v.createElement(L_,{content:c,createCollection:()=>new poe},r=>v.createElement(voe,{props:e,forwardedRef:t,selectionState:n,collection:r}))}),_oe=(0,v.forwardRef)(function(e,t){let{isVirtualized:n}=(0,v.useContext)(J_);return n?v.createElement(np.div,{...e,ref:t}):v.createElement(np.table,{...e,ref:t})}),rP={expand:{ltr:`ArrowRight`,rtl:`ArrowLeft`},collapse:{ltr:`ArrowLeft`,rtl:`ArrowRight`}};function voe({props:e,forwardedRef:t,selectionState:n,collection:r}){[e,t]=Zf(e,t,Fv);let{shouldUseVirtualFocus:i,disallowTypeAhead:a,filter:o,...s}=e,c=(0,v.useContext)(eP);t=Zs((0,v.useMemo)(()=>Ns(t,c?.tableRef),[t,c?.tableRef]));let[l,u]=eh(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,e.onExpandedChange);r=(0,v.useMemo)(()=>r.withExpandedKeys(l),[r,l]);let d=iN({...s,collection:r,children:void 0,UNSAFE_selectionState:n,expandedKeys:l,onExpandedChange:u}),f=aN(d,o),{isVirtualized:p,layoutDelegate:m,dropTargetDelegate:h,CollectionRoot:g}=(0,v.useContext)(J_),{dragAndDropHooks:_}=e,{gridProps:y}=Qae({...s,layoutDelegate:m,isVirtualized:p},f,t),b=f.selectionManager,x=!!_?.useDraggableCollectionState,S=!!_?.useDroppableCollectionState;(0,v.useRef)(x),(0,v.useRef)(S),(0,v.useEffect)(()=>{},[x,S]);let C,w,T,E=!1,D=null,O=(0,v.useRef)(null),{direction:k}=bp(),[A]=(0,v.useState)(()=>new VM);if(x&&_){C=_.useDraggableCollectionState({collection:f.collection,selectionManager:b,preview:_.renderDragPreview?O:void 0}),_.useDraggableCollection({},C,t);let e=_.DragPreview;D=_.renderDragPreview?v.createElement(e,{ref:O},_.renderDragPreview):null}if(S&&_){w=_.useDroppableCollectionState({collection:f.collection,selectionManager:b});let e=new Fy({collection:f.collection,disabledKeys:b.disabledKeys,disabledBehavior:b.disabledBehavior,ref:t,layoutDelegate:m}),n=_.dropTargetDelegate||h||new _.ListDropTargetDelegate(r.rows,t);A.setup(n,d,k),T=_.useDroppableCollection({keyboardDelegate:e,dropTargetDelegate:A,onDropActivate:e=>{if(e.target.type===`item`){let t=e.target.key,n=d.collection.getItem(t),r=l.has(t);n&&n.hasChildNodes&&(!r||_?.isVirtualDragging?.())&&d.toggleKey(t)}},onKeyDown:e=>{let t=w?.target;if(t&&t.type===`item`&&t.dropPosition===`on`){let n=d.collection.getItem(t.key);(e.key===rP.expand[k]&&n?.hasChildNodes&&!d.expandedKeys.has(t.key)||e.key===rP.collapse[k]&&n?.hasChildNodes&&d.expandedKeys.has(t.key))&&d.toggleKey(t.key)}}},w,t),E=w.isDropTarget({type:`root`})}let{focusProps:j,isFocused:M,isFocusVisible:N}=Gm(),P=Jf({...e,children:void 0,defaultClassName:`react-aria-Table`,values:{isDropTarget:E,isFocused:M,isFocusVisible:N,state:f}}),F=!!(x&&!C?.isDisabled),I=P.style,L=null;c&&(L=c.useTableColumnResizeState({tableWidth:c.tableWidth},f),p||(I={...I,tableLayout:`fixed`,width:`min-content`}));let R=Us(e,{global:!0});return v.createElement(qf,{values:[[tP,f],[nP,L],[Vx,{dragAndDropHooks:_,dragState:C,dropState:w}],[Hx,{render:Poe}],[Fv,null],[Iv,null]]},v.createElement(Gh,null,v.createElement(_oe,{...W(R,P,y,j,T?.collectionProps),style:I,ref:t,slot:e.slot||void 0,onScroll:e.onScroll,"data-allows-dragging":F||void 0,"data-drop-target":E||void 0,"data-focused":M||void 0,"data-focus-visible":N||void 0},v.createElement(zv,null,v.createElement(g,{collection:f.collection,scrollRef:c?.scrollRef??t,persistedKeys:Wx(b,_,w)})))),D)}var yoe=(0,v.createContext)(null),iP=class extends x_{static{this.type=`tableheader`}},boe=(0,v.forwardRef)(function(e,t){let{isVirtualized:n}=(0,v.useContext)(J_);return n?v.createElement(np.div,{...e,ref:t}):v.createElement(np.thead,{...e,ref:t})}),xoe=V_(iP,(e,t)=>{let n=(0,v.useContext)(tP).collection,r=j_({items:n.headerRows,children:(0,v.useCallback)(e=>{switch(e.type){case`headerrow`:return v.createElement(Coe,{item:e});default:throw Error(`Unsupported node type in TableHeader: `+e.type)}},[])}),{rowGroupProps:i}=$N(),{hoverProps:a,isHovered:o}=Zm({onHoverStart:e.onHoverStart,onHoverChange:e.onHoverChange,onHoverEnd:e.onHoverEnd}),s=Jf({...e,children:void 0,defaultClassName:`react-aria-TableHeader`,values:{isHovered:o}});return v.createElement(boe,{...W(Us(e,{global:!0}),i,a),...s,ref:t,"data-hovered":o||void 0},r)},e=>v.createElement(W_,{dependencies:e.dependencies,items:e.columns},e.children)),Soe=(0,v.forwardRef)(function(e,t){let{isVirtualized:n}=(0,v.useContext)(J_);return n?v.createElement(`div`,{...e,ref:t}):v.createElement(`tr`,{...e,ref:t})});function Coe({item:e}){let t=(0,v.useRef)(null),n=(0,v.useContext)(tP),{isVirtualized:r,CollectionBranch:i}=(0,v.useContext)(J_),{rowProps:a}=ioe({node:e,isVirtualized:r},n,t),{checkboxProps:o}=coe(n);return v.createElement(Soe,{...a,ref:t},v.createElement(qf,{values:[[TS,{slots:{selection:o}}],[ES,{slots:{selection:o}}]]},v.createElement(i,{collection:n.collection,parent:e})))}var woe=class extends x_{static{this.type=`column`}},Toe=(0,v.forwardRef)(function(e,t){let{isVirtualized:n}=(0,v.useContext)(J_);return n?v.createElement(np.div,{...e,ref:t}):v.createElement(np.th,{...e,ref:t})}),Eoe=B_(woe,(e,t,n)=>{let r=Zs(t),i=(0,v.useContext)(tP),{isVirtualized:a}=(0,v.useContext)(J_),{columnHeaderProps:o,isPressed:s}=eoe({node:n,isVirtualized:a,focusMode:e.focusMode,allowsArrowNavigation:e.allowsArrowNavigation},i,r),{isFocused:c,isFocusVisible:l,focusProps:u}=Gm(),d=(0,v.useContext)(nP),f=!1;d&&(f=d.resizingColumn===n.key);let{hoverProps:p,isHovered:m}=Zm({isDisabled:!e.allowsSorting}),h=Jf({...e,id:void 0,children:n.rendered,defaultClassName:`react-aria-Column`,values:{isHovered:m,isPressed:s,isFocused:c,isFocusVisible:l,allowsSorting:n.props.allowsSorting,sortDirection:i.sortDescriptor?.column===n.key?i.sortDescriptor.direction:void 0,isResizing:f,startResize:()=>{if(d)d.startResize(n.key),i.setKeyboardNavigationDisabled(!0);else throw Error(`Wrap your in a to enable column resizing`)},sort:e=>{i.sort(n.key,e)}}}),g=h.style;d&&(g={...g,width:d.getColumnWidth(n.key)});let _=Us(e,{global:!0});return delete _.id,v.createElement(Toe,{...W(_,o,u,p),...h,style:g,ref:r,"data-hovered":m||void 0,"data-pressed":s||void 0,"data-focused":c||void 0,"data-focus-visible":l||void 0,"data-resizing":f||void 0,"data-allows-sorting":n.props.allowsSorting||void 0,"data-sort-direction":i.sortDescriptor?.column===n.key?i.sortDescriptor.direction:void 0},v.createElement(qf,{values:[[aP,{column:n,triggerRef:r}],[J_,K_]]},h.children))}),aP=(0,v.createContext)(null),Doe=(0,v.forwardRef)(function(e,t){let n=(0,v.useContext)(nP);if(!n)throw Error(`Wrap your
in a to enable column resizing`);let r=s_(foe(Bx),`react-aria-components`),{onResizeStart:i,onResize:a,onResizeEnd:o}=(0,v.useContext)(eP),{column:s,triggerRef:c}=(0,v.useContext)(aP),l=(0,v.useRef)(null),{resizerProps:u,inputProps:d,isResizing:f,isMouseResizing:p}=uoe({column:s,"aria-label":e[`aria-label`]||r.format(`tableResizer`),onResizeStart:i,onResize:a,onResizeEnd:o,triggerRef:c},n,l),{focusProps:m,isFocused:h,isFocusVisible:g}=Gm(),{hoverProps:_,isHovered:y}=Zm(e),b=n.getColumnMinWidth(s.key)>=n.getColumnWidth(s.key),x=n.getColumnMaxWidth(s.key)<=n.getColumnWidth(s.key),{direction:S}=bp(),C=`both`;C=b?S===`rtl`?`right`:`left`:x?S===`rtl`?`left`:`right`:`both`;let w=Zs(t),[T,E]=(0,v.useState)(``);(0,v.useEffect)(()=>{if(!w.current)return;let e=window.getComputedStyle(w.current);E(e.cursor)},[w,C]);let D=Jf({...e,defaultClassName:`react-aria-ColumnResizer`,values:{isFocused:h,isFocusVisible:g,isResizing:f,isHovered:y,resizableDirection:C}}),O=Us(e,{global:!0});return v.createElement(np.div,{ref:w,role:`presentation`,...W(O,D,u,_),"data-hovered":y||void 0,"data-focused":h||void 0,"data-focus-visible":g||void 0,"data-resizing":f||void 0,"data-resizable-direction":C},D.children,v.createElement(`input`,{ref:l,...W(d,m)}),f&&p&&Ec.createPortal(v.createElement(`div`,{style:{position:`fixed`,top:0,left:0,bottom:0,right:0,cursor:T},"data-testid":`cursor-overlay`}),document.body))}),oP=class extends S_{static{this.type=`tablebody`}},Ooe=(0,v.forwardRef)(function(e,t){let{isVirtualized:n}=(0,v.useContext)(J_);return n?v.createElement(np.div,{...e,ref:t}):v.createElement(np.tbody,{...e,ref:t})}),koe=V_(oP,(e,t,n)=>{let r=(0,v.useContext)(tP),{isVirtualized:i}=(0,v.useContext)(J_),a=r.collection,{CollectionBranch:o}=(0,v.useContext)(J_),{dragAndDropHooks:s,dropState:c}=(0,v.useContext)(Vx),l=!!s?.useDroppableCollectionState&&!c?.isDisabled,u=l&&!!c&&(c.isDropTarget({type:`root`})??!1),d=a.size===0,f={isDropTarget:u,isEmpty:d},p=Jf({...e,id:void 0,children:void 0,defaultClassName:`react-aria-TableBody`,values:f}),m,h=a.columnCount;if(d&&e.renderEmptyState&&r){let t={},n={},r={};i?(n[`aria-colspan`]=h,r={display:`contents`}):n.colSpan=h,m=v.createElement(cP,{role:`row`,...t,style:r},v.createElement(lP,{role:`rowheader`,...n,style:r},e.renderEmptyState(f)))}let{rowGroupProps:g}=$N(),_=Us(e,{global:!0});return v.createElement(Ooe,{...W(_,p,g),ref:t,"data-empty":d||void 0},l&&v.createElement(zoe,null),v.createElement(o,{collection:a,parent:n,renderDropIndicator:Ux(s,c)}),m)});(class extends S_{static{this.type=`tablefooter`}});var sP=(0,v.createContext)({isFocusVisibleWithinRow:!1}),Aoe=class extends x_{static{this.type=`item`}filter(e,t,n){let r=e.getChildren(this.key);for(let i of r)if(n(i.textValue,i)){let n=this.clone();return t.addDescendants(n,e),n}return null}},cP=(0,v.forwardRef)(function(e,t){let{isVirtualized:n}=(0,v.useContext)(J_);return n?v.createElement(np.div,{...e,ref:t}):v.createElement(np.tr,{...e,ref:t})}),joe=V_(Aoe,(e,t,n)=>{let r=Zs(t),i=(0,v.useContext)(tP),{dragAndDropHooks:a,dragState:o,dropState:s}=(0,v.useContext)(Vx),{isVirtualized:c,CollectionBranch:l}=(0,v.useContext)(J_),u=o&&!(o.isDisabled||o.selectionManager.isDisabled(n.key)),{rowProps:d,expandButtonProps:f,...p}=roe({node:n,shouldSelectOnPressUp:!!o,isVirtualized:c},i,r),{isFocused:m,isFocusVisible:h,focusProps:g}=Gm(),{isFocusVisible:_,focusProps:y}=Gm({within:!0}),{hoverProps:b,isHovered:x}=Zm({isDisabled:!p.allowsSelection&&!p.hasAction&&!u,onHoverStart:e.onHoverStart,onHoverChange:e.onHoverChange,onHoverEnd:e.onHoverEnd}),{checkboxProps:S}=soe({key:n.key},i),C;o&&a&&(C=a.useDraggableItem({key:n.key,hasDragButton:!0},o));let w,T=(0,v.useRef)(null),{visuallyHiddenProps:E}=l_();s&&a&&(w=a.useDropIndicator({target:{type:`item`,key:n.key,dropPosition:`on`}},s,T));let D=(0,v.useRef)(null);(0,v.useEffect)(()=>{o&&D.current},[]);let O=o&&o.isDragging(n.key),{children:k,...A}=e,j=e.hasChildItems||i.collection.getItem(n.lastChildKey)?.type!==`cell`,M=j&&i.expandedKeys.has(n.key),N=Jf({...A,id:void 0,defaultClassName:`react-aria-Row`,defaultStyle:{"--table-row-level":n.level+1},values:{...p,state:i,isHovered:x,isFocused:m,isFocusVisible:h,selectionMode:i.selectionManager.selectionMode,selectionBehavior:i.selectionManager.selectionBehavior,isDragging:O,isDropTarget:w?.isDropTarget,isFocusVisibleWithin:_,id:n.key,hasChildItems:j,isExpanded:M,level:n.level+1}}),P=Us(e,{global:!0});return delete P.id,delete P.onClick,v.createElement(v.Fragment,null,w&&!w.isHidden&&v.createElement(cP,{role:`row`,style:{height:0}},v.createElement(lP,{role:`gridcell`,colSpan:i.collection.columnCount,style:{padding:0}},v.createElement(`div`,{role:`button`,...E,...w.dropIndicatorProps,ref:T}))),v.createElement(cP,{...W(P,N,d,g,b,C?.dragProps,y),ref:r,"data-disabled":p.isDisabled||void 0,"data-selected":p.isSelected||void 0,"data-hovered":x||void 0,"data-focused":p.isFocused||void 0,"data-focus-visible":h||void 0,"data-pressed":p.isPressed||void 0,"data-dragging":O||void 0,"data-drop-target":w?.isDropTarget||void 0,"data-selection-mode":i.selectionManager.selectionMode===`none`?void 0:i.selectionManager.selectionMode,"data-focus-visible-within":_||void 0,"data-expanded":M||void 0,"data-has-child-items":j||void 0,"data-level":n.level+1},v.createElement(qf,{values:[[TS,{slots:{[Kf]:{},selection:S}}],[ES,{slots:{[Kf]:{},selection:S}}],[Qm,{slots:{[Kf]:{},chevron:f,drag:{...C?.dragButtonProps,ref:D,style:{pointerEvents:`none`}}}}],[Bv,{isSelected:p.isSelected}],[sP,{isFocusVisibleWithinRow:_}]]},v.createElement(l,{collection:i.collection,parent:n}))))},e=>{if(e.id==null&&typeof e.children==`function`)throw Error(`No id detected for the Row element. The Row element requires a id to be provided to it when the cells are rendered dynamically.`);let t=[e.value].concat(e.dependencies);return v.createElement(W_,{dependencies:t,items:e.columns,idScope:e.id},e.children)}),Moe=class extends x_{static{this.type=`cell`}},lP=(0,v.forwardRef)(function(e,t){let{isVirtualized:n}=(0,v.useContext)(J_);return n?v.createElement(np.div,{...e,ref:t}):v.createElement(np.td,{...e,ref:t})}),Noe=B_(Moe,(e,t,n)=>{let r=Zs(t),i=(0,v.useContext)(tP),{dragState:a}=(0,v.useContext)(Vx),{isVirtualized:o}=(0,v.useContext)(J_);n.column=i.collection.columns[n.index];let{gridCellProps:s,isPressed:c}=aoe({node:n,shouldSelectOnPressUp:!!a,isVirtualized:o,focusMode:e.focusMode,allowsArrowNavigation:e.allowsArrowNavigation},i,r),{isFocused:l,isFocusVisible:u,focusProps:d}=Gm(),{hoverProps:f,isHovered:p}=Zm({}),{isFocusVisibleWithinRow:m}=(0,v.useContext)(sP),h=n.parentKey!=null&&i.selectionManager.isSelected(n.parentKey),g=n.colIndex||n.index,_=i.collection.getItem(n.parentKey),y=_.props.hasChildItems||i.collection.getItem(_.lastChildKey)?.type!==`cell`,b=y&&i.expandedKeys.has(n.parentKey),x=i.selectionManager.isDisabled(n.parentKey),S=Jf({...e,id:void 0,defaultClassName:`react-aria-Cell`,values:{isFocused:l,isFocusVisible:u,isFocusVisibleWithinRow:m,isPressed:c,isHovered:p,isSelected:h,id:n.key,columnIndex:g,hasChildItems:y,isExpanded:b,isDisabled:x,level:_.level+1,isTreeColumn:n.column.key===i.treeColumn}}),C=Us(e,{global:!0});return delete C.id,v.createElement(lP,{...W(C,S,s,d,f),ref:r,"data-focused":l||void 0,"data-focus-visible":u||void 0,"data-focus-visible-within-row":m||void 0,"data-pressed":c||void 0,"data-selected":h||void 0,"data-column-index":g,"data-expanded":b||void 0,"data-has-child-items":y||void 0,"data-level":_.level+1,"data-tree-column":n.column.key===i.treeColumn||void 0,"data-disabled":x||void 0},v.createElement(J_.Provider,{value:K_},S.children))});function Poe(e,t){t=Zs(t);let{dragAndDropHooks:n,dropState:r}=(0,v.useContext)(Vx),i=(0,v.useRef)(null),{dropIndicatorProps:a,isHidden:o,isDropTarget:s}=n.useDropIndicator(e,r,i);if(o)return null;let c=r&&e.target.type===`item`?(r.collection.getItem(e.target.key)?.level||0)+1:1;return v.createElement(Roe,{...e,dropIndicatorProps:a,isDropTarget:s,buttonRef:i,level:c,ref:t})}var Foe=(0,v.forwardRef)(function(e,t){let{isVirtualized:n}=(0,v.useContext)(J_);return n?v.createElement(np.div,{...e,ref:t}):v.createElement(np.tr,{...e,ref:t})}),Ioe=(0,v.forwardRef)(function(e,t){let{isVirtualized:n}=(0,v.useContext)(J_);return n?v.createElement(np.div,{...e,ref:t}):v.createElement(np.td,{...e,ref:t})});function Loe(e,t){let{dropIndicatorProps:n,isDropTarget:r,buttonRef:i,level:a,...o}=e,s=(0,v.useContext)(tP),{visuallyHiddenProps:c}=l_(),l=Jf({...o,defaultClassName:`react-aria-DropIndicator`,defaultStyle:{"--table-row-level":a+1},values:{isDropTarget:r}});return v.createElement(Foe,{...Us(e,{global:!0}),...l,role:`row`,ref:t,"data-drop-target":r||void 0,"aria-level":a},v.createElement(Ioe,{role:`gridcell`,colSpan:s.collection.columnCount,style:{padding:0}},v.createElement(`div`,{...c,role:`button`,...n,ref:i}),l.children))}var Roe=(0,v.forwardRef)(Loe);function zoe(){let e=(0,v.useContext)(tP),{dragAndDropHooks:t,dropState:n}=(0,v.useContext)(Vx),r=(0,v.useRef)(null),{dropIndicatorProps:i}=t.useDropIndicator({target:{type:`root`}},n,r),a=n.isDropTarget({type:`root`}),{visuallyHiddenProps:o}=l_();return!a&&i[`aria-hidden`]?null:v.createElement(cP,{role:`row`,"aria-hidden":i[`aria-hidden`],style:{height:0}},v.createElement(lP,{role:`gridcell`,colSpan:e.collection.columnCount,style:{padding:0}},v.createElement(`div`,{role:`button`,...o,...i,ref:r})))}var Boe=B_(C_,function(e,t,n){let r=(0,v.useContext)(tP),{isVirtualized:i}=(0,v.useContext)(J_),{isLoading:a,onLoadMore:o,scrollOffset:s,...c}=e,l=r.collection.columns.length,u=(0,v.useRef)(null);wc((0,v.useMemo)(()=>({onLoadMore:o,collection:r?.collection,sentinelRef:u,scrollOffset:s}),[o,s,r?.collection]),u);let d=Jf({...c,id:void 0,children:n.rendered,defaultClassName:`react-aria-TableLoadingIndicator`,defaultStyle:{"--table-row-level":n.level+1},values:void 0}),f={},p={},m={};return i?(p[`aria-colspan`]=l,m={display:`contents`}):p.colSpan=l,v.createElement(v.Fragment,null,v.createElement(cP,{style:{height:0},inert:Tc(!0)},v.createElement(lP,{style:{padding:0,border:0}},v.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:u,style:{position:`relative`,height:1,width:1}}))),a&&d.children&&v.createElement(cP,{...W(Us(e,{global:!0}),f),...d,role:`row`,ref:t,"aria-level":n.level+1,"data-level":n.level+1},v.createElement(lP,{role:`rowheader`,...p,style:m},d.children)))}),uP=({...e})=>(0,G.jsx)($te,{...e}),dP=Object.assign(uP,{Root:uP}),fP=(0,v.createContext)({}),pP=({children:e,className:t,status:n,...r})=>{let i=v.useMemo(()=>tf({status:n}),[n]);return(0,G.jsx)(fP,{value:{slots:i,status:n},children:(0,G.jsx)(gh,{value:{variant:`default`},children:(0,G.jsx)(Xc.div,{className:i?.base({className:t}),"data-slot":`alert-root`,...r,children:e})})})},mP=Object.assign(pP,{Root:pP,Indicator:({children:e,className:t,...n})=>{let{slots:r,status:i}=(0,v.use)(fP),a=()=>{switch(i){case`accent`:return(0,G.jsx)(fh,{"data-slot":`alert-default-icon`});case`success`:return(0,G.jsx)(hh,{"data-slot":`alert-default-icon`});case`warning`:return(0,G.jsx)(ph,{"data-slot":`alert-default-icon`});case`danger`:return(0,G.jsx)(mh,{"data-slot":`alert-default-icon`});default:return(0,G.jsx)(fh,{"data-slot":`alert-default-icon`})}};return(0,G.jsx)(Xc.div,{className:q(r?.indicator,t),"data-slot":`alert-indicator`,...n,children:e??a()})},Content:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(fP);return(0,G.jsx)(Xc.div,{className:q(r?.content,t),"data-slot":`alert-content`,...n,children:e})},Title:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(fP);return(0,G.jsx)(Xc.p,{className:q(r?.title,t),"data-slot":`alert-title`,...n,children:e})},Description:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(fP);return(0,G.jsx)(Xc.span,{className:q(r?.description,t),"data-slot":`alert-description`,...n,children:e})}}),hP=(0,v.createContext)({}),gP=({children:e,className:t,variant:n,...r})=>{let i=v.useMemo(()=>Cf({variant:n}),[n]);return(0,G.jsx)(une,{className:K(t,i.item()),"data-slot":`list-box-item`,...r,children:t=>(0,G.jsx)(hP,{value:{slots:i,state:t},children:typeof e==`function`?e(t):e})})},_P=({children:e,className:t,...n})=>{let{slots:r,state:i}=(0,v.use)(hP),a=i?.isSelected,o=typeof e==`function`?e(i??{}):e||(0,G.jsx)(`svg`,{"aria-hidden":`true`,"data-slot":`list-box-item-indicator--checkmark`,fill:`none`,role:`presentation`,stroke:`currentColor`,strokeDasharray:22,strokeDashoffset:a?44:66,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,viewBox:`0 0 17 18`,children:(0,G.jsx)(`polyline`,{points:`1 9 7 14 15 4`})});return(0,G.jsx)(Xc.span,{"aria-hidden":`true`,className:q(r?.indicator,t),"data-slot":`list-box-item-indicator`,"data-visible":a||void 0,...n,children:o})},Voe=Object.assign(gP,{Root:gP,Indicator:_P}),Hoe=({children:e,className:t,...n})=>{let r=v.useMemo(()=>wf({class:typeof t==`string`?t:void 0}),[t]);return(0,G.jsx)(lne,{className:r,...n,children:e})};function vP({className:e,variant:t,...n}){let r=v.useMemo(()=>Sf({variant:t}),[t]);return(0,G.jsx)(sne,{className:K(e,r),"data-slot":`list-box`,...n})}var yP=Object.assign(vP,{Root:vP,Item:Voe,ItemIndicator:_P,Section:Hoe}),bP=(0,v.createContext)({}),Uoe=({children:e,className:t,variant:n,...r})=>{let i=v.useMemo(()=>Ef({variant:n}),[n]);return(0,G.jsx)(Ob,{className:K(t,i.item()),"data-slot":`menu-item`,...r,children:t=>(0,G.jsx)(bP,{value:{slots:i,state:t},children:typeof e==`function`?e(t):e})})},Woe=({children:e,className:t,type:n=`checkmark`,...r})=>{let{slots:i,state:a}=(0,v.use)(bP),o=a?.isSelected,s=typeof e==`function`?e(a??{}):e||(n===`dot`?(0,G.jsx)(`svg`,{"aria-hidden":`true`,"data-slot":`menu-item-indicator--dot`,fill:`currentColor`,fillRule:`evenodd`,role:`presentation`,viewBox:`0 0 16 16`,xmlns:`http://www.w3.org/2000/svg`,children:(0,G.jsx)(`path`,{clipRule:`evenodd`,d:`M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14`,fillRule:`evenodd`})}):(0,G.jsx)(`svg`,{"aria-hidden":`true`,"data-slot":`menu-item-indicator--checkmark`,fill:`none`,role:`presentation`,stroke:`currentColor`,strokeDasharray:22,strokeDashoffset:o?44:66,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,viewBox:`0 0 17 18`,children:(0,G.jsx)(`polyline`,{points:`1 9 7 14 15 4`})}));return(0,G.jsx)(Xc.span,{"aria-hidden":`true`,className:q(i?.indicator,t),"data-slot":`menu-item-indicator`,"data-type":n,"data-visible":o||void 0,...r,children:s})},Goe=({children:e,className:t,...n})=>{let{slots:r,state:i}=(0,v.use)(bP);if(!i?.hasSubmenu)return null;let a=e??(0,G.jsx)(uh,{});return(0,G.jsx)(Xc.span,{"aria-hidden":`true`,className:q(r?.submenuIndicator,t),"data-slot":`submenu-indicator`,...n,children:a})},Koe=({children:e,className:t,...n})=>{let r=v.useMemo(()=>Df({class:typeof t==`string`?t:void 0}),[t]);return(0,G.jsx)(Eb,{className:r,...n,children:e})},xP=(0,v.createContext)({}),SP=({children:e,...t})=>{let n=v.useMemo(()=>_f(),[]);return(0,G.jsx)(xP,{value:{slots:n},children:(0,G.jsx)(yb,{...t,children:e})})},qoe=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(xP);return(0,G.jsx)($m,{className:K(t,r?.trigger()),"data-slot":`dropdown-trigger`,...n,children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})},Joe=({children:e,className:t,placement:n,...r})=>{let{slots:i}=(0,v.use)(xP);return(0,G.jsx)(gh,{value:{variant:`default`},children:(0,G.jsx)(b_,{...r,className:K(t,i?.popover()),"data-slot":`dropdown-popover`,placement:n,children:e})})};function Yoe({className:e,...t}){let{slots:n}=(0,v.use)(xP);return(0,G.jsx)(Sb,{className:K(e,n?.menu()),"data-selection-mode":t.selectionMode,"data-slot":`dropdown-menu`,...t})}var CP=Object.assign(SP,{Root:SP,Trigger:qoe,Popover:Joe,Menu:Yoe,Section:e=>(0,G.jsx)(Koe,{...e}),Item:e=>(0,G.jsx)(Uoe,{...e}),ItemIndicator:e=>(0,G.jsx)(Woe,{...e}),SubmenuIndicator:e=>(0,G.jsx)(Goe,{...e}),SubmenuTrigger:({children:e,...t})=>(0,G.jsx)(xb,{"data-slot":`dropdown-submenu-trigger`,...t,children:e})}),wP=(0,v.createContext)({}),TP=({children:e,state:t,...n})=>{let r=(0,v.useMemo)(()=>({slots:Of(),placement:void 0}),[]),i=(0,v.useMemo)(()=>t?{isOpen:t.isOpen,onOpenChange:t.setOpen}:{},[t]);return(0,G.jsx)(wP,{value:r,children:(0,G.jsx)(Mb,{"data-slot":`modal-root`,...W(n,i),children:e})})},Y=Object.assign(TP,{Root:TP,Trigger:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(wP);return(0,G.jsx)(Bb,{children:(0,G.jsx)(Xc.div,{className:q(r?.trigger,t),"data-slot":`modal-trigger`,role:`button`,...n,children:e})})},Backdrop:({children:e,className:t,isDismissable:n=!0,onClick:r,variant:i,...a})=>{let{slots:o}=(0,v.use)(wP),s=(0,v.useMemo)(()=>Of({variant:i}),[i]),c=(0,v.useMemo)(()=>({slots:{...o,...s}}),[o,s]);return(0,G.jsx)(Rb,{className:K(t,s?.backdrop()),"data-slot":`modal-backdrop`,isDismissable:n,onClick:e=>{e.stopPropagation(),r?.(e)},...a,children:t=>(0,G.jsxs)(wP,{value:c,children:[typeof e==`function`?e(t):e,` `]})})},Container:({children:e,className:t,placement:n=`auto`,scroll:r,size:i,...a})=>{let{slots:o}=(0,v.use)(wP),s=(0,v.useMemo)(()=>Of({scroll:r,size:i}),[r,i]),c=(0,v.useMemo)(()=>({placement:n,slots:{...o,...s}}),[o,n,s]);return(0,G.jsx)(Lb,{className:K(t,s?.container()),"data-placement":n,"data-slot":`modal-container`,...a,children:t=>(0,G.jsx)(wP,{value:c,children:typeof e==`function`?e(t):e})})},Dialog:({children:e,className:t,...n})=>{let{placement:r,slots:i}=(0,v.use)(wP);return(0,G.jsx)(gh,{value:{variant:`default`},children:(0,G.jsx)(Nb,{className:q(i?.dialog,t),"data-placement":r,"data-slot":`modal-dialog`,...n,children:e})})},Header:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(wP);return(0,G.jsx)(Xc.div,{className:q(r?.header,t),"data-slot":`modal-header`,...n,children:e})},Icon:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(wP);return(0,G.jsx)(Xc.div,{className:q(r?.icon,t),"data-slot":`modal-icon`,...n,children:e})},Heading:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(wP);return(0,G.jsx)(ah,{className:q(r?.heading,t),"data-slot":`modal-heading`,slot:`title`,...n,children:e})},Body:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(wP);return(0,G.jsx)(Xc.div,{className:q(r?.body,t),"data-slot":`modal-body`,...n,children:e})},Footer:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(wP);return(0,G.jsx)(Xc.div,{className:q(r?.footer,t),"data-slot":`modal-footer`,...n,children:e})},CloseTrigger:({className:e,...t})=>{let{slots:n}=(0,v.use)(wP);return(0,G.jsx)(Hb,{className:K(e,n?.closeTrigger()),"data-slot":`modal-close-trigger`,slot:`close`,...t})}}),EP=(0,v.createContext)({}),DP=({children:e,className:t,fullWidth:n,variant:r,...i})=>{let a=v.useMemo(()=>kf({fullWidth:n,variant:r}),[n,r]);return(0,G.jsx)(EP,{value:{slots:a},children:(0,G.jsx)(RM,{"data-slot":`number-field`,...i,className:K(t,a?.base()),children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})})},OP=Object.assign(DP,{Root:DP,Group:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(EP);return(0,G.jsx)(qb,{className:K(t,r?.group()),"data-slot":`number-field-group`,...n,children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})},Input:({className:e,...t})=>{let{slots:n}=(0,v.use)(EP);return(0,G.jsx)(BS,{className:K(e,n?.input()),"data-slot":`number-field-input`,...t})},IncrementButton:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(EP);return(0,G.jsx)($m,{className:K(t,r?.incrementButton()),"data-slot":`number-field-increment-button`,slot:`increment`,...n,children:e&&v.isValidElement(e)?e:(0,G.jsx)(jee,{"data-slot":`number-field-increment-button-icon`})})},DecrementButton:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(EP);return(0,G.jsx)($m,{className:K(t,r?.decrementButton()),"data-slot":`number-field-decrement-button`,slot:`decrement`,...n,children:e&&v.isValidElement(e)?e:(0,G.jsx)(Aee,{"data-slot":`number-field-decrement-button-icon`})})}}),kP=(0,v.createContext)({}),AP=({children:e,className:t,size:n,...r})=>{let i=v.useMemo(()=>Af({size:n}),[n]);return(0,G.jsx)(kP,{value:{slots:i},children:(0,G.jsx)(Xc.nav,{"aria-label":`pagination`,"data-slot":`pagination`,role:`navigation`,...r,className:q(i.base,t),children:e})})};AP.displayName=`HeroUI.Pagination`;var jP=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(kP);return(0,G.jsx)(Xc.div,{className:q(r?.summary,t),"data-slot":`pagination-summary`,dir:`auto`,...n,children:e})};jP.displayName=`HeroUI.Pagination.Summary`;var MP=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(kP);return(0,G.jsx)(Xc.ul,{className:q(r?.content,t),"data-slot":`pagination-content`,...n,children:e})};MP.displayName=`HeroUI.Pagination.Content`;var NP=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(kP);return(0,G.jsx)(Xc.li,{className:q(r?.item,t),"data-slot":`pagination-item`,...n,children:e})};NP.displayName=`HeroUI.Pagination.Item`;var PP=({children:e,className:t,isActive:n,...r})=>{let{slots:i}=(0,v.use)(kP);return(0,G.jsx)($m,{"aria-current":n?`page`:void 0,className:K(t,i?.link()),"data-active":n?`true`:void 0,"data-slot":`pagination-link`,...r,children:e})};PP.displayName=`HeroUI.Pagination.Link`;var FP=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(kP),i=`${r?.link()??``} pagination__link--nav`.trim();return(0,G.jsx)($m,{className:K(t,i),"data-slot":`pagination-previous`,...n,children:e})};FP.displayName=`HeroUI.Pagination.Previous`;var IP=({children:e,className:t,...n})=>(0,G.jsx)(Xc.span,{"aria-hidden":`true`,className:t,"data-slot":`pagination-previous-icon`,...n,children:e??(0,G.jsx)(lh,{})});IP.displayName=`HeroUI.Pagination.PreviousIcon`;var LP=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(kP),i=`${r?.link()??``} pagination__link--nav`.trim();return(0,G.jsx)($m,{className:K(t,i),"data-slot":`pagination-next`,...n,children:e})};LP.displayName=`HeroUI.Pagination.Next`;var RP=({children:e,className:t,...n})=>(0,G.jsx)(Xc.span,{"aria-hidden":`true`,className:t,"data-slot":`pagination-next-icon`,...n,children:e??(0,G.jsx)(uh,{})});RP.displayName=`HeroUI.Pagination.NextIcon`;var zP=({className:e,...t})=>{let{slots:n}=(0,v.use)(kP);return(0,G.jsx)(Xc.span,{"aria-hidden":`true`,className:q(n?.ellipsis,e),"data-slot":`pagination-ellipsis`,...t,children:`…`})};zP.displayName=`HeroUI.Pagination.Ellipsis`;var BP=Object.assign(AP,{Content:MP,Ellipsis:zP,Item:NP,Link:PP,Next:LP,NextIcon:RP,Previous:FP,PreviousIcon:IP,Root:AP,Summary:jP}),VP=(0,v.createContext)({}),HP=({children:e,className:t,fullWidth:n,variant:r,...i})=>{let a=v.useMemo(()=>Nf({fullWidth:n,variant:r}),[n,r]);return(0,G.jsx)(cS,{children:(0,G.jsx)(VP,{value:{slots:a},children:(0,G.jsx)(iS,{"data-slot":`select`,...i,className:K(t,a?.base()),children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})})})},UP=Object.assign(HP,{Root:HP,Trigger:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(VP);return(0,G.jsx)($m,{className:K(t,r?.trigger()),"data-slot":`select-trigger`,...n,children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})},Value:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(VP);return(0,G.jsx)(oS,{className:K(t,r?.value()),"data-slot":`select-value`,...n,children:e})},Indicator:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(VP),i=(0,v.use)(rS);return e&&v.isValidElement(e)?v.cloneElement(e,{...n,className:q(r?.indicator,t),"data-slot":`select-indicator`,"data-open":oh(i?.isOpen)}):(0,G.jsx)(sh,{className:q(r?.indicator,t),"data-open":oh(i?.isOpen),"data-slot":`select-default-indicator`,...n})},Popover:({children:e,className:t,placement:n=`bottom`,...r})=>{let{slots:i}=(0,v.use)(VP);return(0,G.jsx)(gh,{value:{variant:`default`},children:(0,G.jsx)(b_,{...r,className:K(t,i?.popover()),"data-slot":`select-popover`,placement:n,children:e})})}}),WP=(0,v.createContext)({}),GP=({children:e,className:t,color:n,size:r,...i})=>{let a=v.useMemo(()=>Tf({color:n,size:r}),[n,r]);return(0,G.jsx)(iae,{"data-slot":`meter`,...i,className:K(t,a.base()),children:t=>(0,G.jsx)(WP,{value:{slots:a,state:t},children:typeof e==`function`?e(t):e})})};GP.displayName=`HeroUI.Meter`;var KP=({children:e,className:t,...n})=>{let{slots:r,state:i}=(0,v.use)(WP);return(0,G.jsx)(Xc.span,{className:q(r?.output,t),"data-slot":`meter-output`,...n,children:e??i?.valueText})};KP.displayName=`HeroUI.Meter.Output`;var qP=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(WP);return(0,G.jsx)(Xc.div,{className:q(r?.track,t),"data-slot":`meter-track`,...n,children:e})};qP.displayName=`HeroUI.Meter.Track`;var JP=({className:e,style:t,...n})=>{let{slots:r,state:i}=(0,v.use)(WP);return(0,G.jsx)(Xc.div,{className:q(r?.fill,e),"data-slot":`meter-fill`,style:{...t,width:`${i?.percentage??0}%`},...n})};JP.displayName=`HeroUI.Meter.Fill`;var YP=Object.assign(GP,{Root:GP,Output:KP,Track:qP,Fill:JP}),XP=(0,v.createContext)({}),ZP=({children:e,className:t,variant:n,...r})=>{let i=v.useMemo(()=>Lf({variant:n}),[n]);return(0,G.jsx)(XP,{value:{slots:i},children:(0,G.jsx)(Xc.div,{className:i.base({className:t}),"data-slot":`table`,...r,children:e})})};ZP.displayName=`HeroUI.Table`;var QP=({className:e,...t})=>{let{slots:n}=(0,v.use)(XP);return(0,G.jsx)(Xc.div,{className:q(n?.scrollContainer,e),"data-slot":`table-scroll-container`,...t})};QP.displayName=`HeroUI.Table.ScrollContainer`;function $P({className:e,...t}){let{slots:n}=(0,v.use)(XP);return(0,G.jsx)(goe,{className:K(e,n?.content()),"data-slot":`table-content`,...t})}$P.displayName=`HeroUI.Table.Content`;function eF({className:e,...t}){let{slots:n}=(0,v.use)(XP);return(0,G.jsx)(xoe,{className:K(e,n?.header()),"data-slot":`table-header`,...t})}eF.displayName=`HeroUI.Table.Header`;var tF=({className:e,ref:t,...n})=>{let{slots:r}=(0,v.use)(XP);return(0,G.jsx)(Eoe,{ref:t,className:K(e,r?.column()),"data-slot":`table-column`,...n})};tF.displayName=`HeroUI.Table.Column`;function nF({className:e,...t}){let{slots:n}=(0,v.use)(XP);return(0,G.jsx)(koe,{className:K(e,n?.body()),"data-slot":`table-body`,...t})}nF.displayName=`HeroUI.Table.Body`;function rF({className:e,...t}){let{slots:n}=(0,v.use)(XP);return(0,G.jsx)(joe,{className:K(e,n?.row()),"data-slot":`table-row`,...t})}rF.displayName=`HeroUI.Table.Row`;var iF=({className:e,ref:t,...n})=>{let{slots:r}=(0,v.use)(XP);return(0,G.jsx)(Noe,{ref:t,className:K(e,r?.cell()),"data-slot":`table-cell`,...n})};iF.displayName=`HeroUI.Table.Cell`;var aF=({className:e,...t})=>{let{slots:n}=(0,v.use)(XP);return(0,G.jsx)(Xc.div,{className:q(n?.footer,e),"data-slot":`table-footer`,...t})};aF.displayName=`HeroUI.Table.Footer`;var oF=({className:e,ref:t,...n})=>(0,G.jsx)(moe,{ref:t,className:$d(`table__resizable-container`,e),"data-slot":`table-resizable-container`,...n});oF.displayName=`HeroUI.Table.ResizableContainer`;var sF=({className:e,ref:t,...n})=>{let{slots:r}=(0,v.use)(XP);return(0,G.jsx)(Doe,{ref:t,className:K(e,r?.columnResizer()),"data-slot":`table-column-resizer`,...n})};sF.displayName=`HeroUI.Table.ColumnResizer`;var cF=({className:e,ref:t,...n})=>{let{slots:r}=(0,v.use)(XP);return(0,G.jsx)(Boe,{ref:t,className:q(r?.loadMore,e),"data-slot":`table-load-more`,...n})};cF.displayName=`HeroUI.Table.LoadMore`;var lF=({className:e,...t})=>{let{slots:n}=(0,v.use)(XP);return(0,G.jsx)(Xc.div,{className:q(n?.loadMoreContent,e),"data-slot":`table-load-more-content`,...t})};lF.displayName=`HeroUI.Table.LoadMoreContent`;var uF=({children:e,className:t,indicator:n,ref:r,showIndicator:i=!0,sortDirection:a,...o})=>{let{slots:s}=(0,v.use)(XP),c=i&&!!a,l=null;if(c){if(n===void 0)l=(0,G.jsx)(ch,{className:s?.sortableColumnIndicator(),"data-direction":a,"data-slot":`table-sortable-column-indicator`});else if(v.isValidElement(n)){let e=n;l=v.cloneElement(e,{className:q(s?.sortableColumnIndicator,e.props.className),"data-direction":a,"data-slot":`table-sortable-column-indicator`})}else l=n}return(0,G.jsxs)(`span`,{ref:r,className:q(s?.sortableColumnHeader,t),"data-direction":a,"data-slot":`table-sortable-column-header`,...o,children:[e,l]})};uF.displayName=`HeroUI.Table.SortableColumnHeader`;var X=Object.assign(ZP,{Body:nF,Cell:iF,Collection:W_,Column:tF,ColumnResizer:sF,Content:$P,Footer:aF,Header:eF,LoadMore:cF,LoadMoreContent:lF,ResizableContainer:oF,Root:ZP,Row:rF,ScrollContainer:QP,SortableColumnHeader:uF}),dF=(0,v.createContext)(null);function fF(){let e=(0,v.use)(dF);if(!e)throw Error(`useYearPicker must be used within a or component.`);return e}function pF(){let e=(0,v.use)(xk),t=(0,v.use)(Sk),n=e??t;if(!n)throw Error(`useCalendarOrRangeState must be used within a or component.`);return n}function mF(e){switch(e){case`buddhist`:return 543;case`ethiopic`:case`ethioaa`:return-8;case`coptic`:return-284;case`hebrew`:return 3760;case`indian`:return-78;case`islamic-civil`:case`islamic-tbla`:case`islamic-umalqura`:return-579;case`persian`:return-600;default:return 0}}function hF(e,t){let n=[];if(!e||!t)return n;let r=Nw(e);for(;r.compare(t)<=0;)n.push(r),r=Nw(r.add({years:1}));return n}function gF(e,t,n,r=`short`,i=`UTC`){let a=new Intl.DateTimeFormat(t,{weekday:r,timeZone:i}),o=Pw(e,t,n),s=[],c=o;for(let e=0;e<7;e++){s.push(a.format(c.toDate(i)));let e=c.add({days:1});if(yw(c,e))break;c=e}for(;s.length<7;)s.push(``);return s}function _F(e,t){let n=[],r=e;for(let e=0;e<7;e++){n.push(r.compare(t)>0?null:r);let e=r.add({days:1});if(yw(r,e)){for(;n.length<7;)n.push(null);return n}r=e}return n}function vF(e,t,n,r){let i=[],a=Pw(e,n,r);for(i.push(_F(a,t)),a=a.add({weeks:1});a.compare(t)<=0;){i.push(_F(a,t));let e=a.add({weeks:1});if(yw(a,e))break;a=e}return i}var yF=v.createContext(null);function bF(){let e=v.use(yF);if(!e)throw Error(`CalendarYearPicker trigger components must be used within .`);return e}var xF=({children:e,className:t,onKeyDown:n,onPress:r,...i})=>{let{isYearPickerOpen:a,setIsYearPickerOpen:o}=fF(),s=sk({},pF()),c=v.useMemo(()=>of(),[]),l=v.useCallback(()=>{o(!a)},[a,o]),u=e=>{n?.(e),!e.defaultPrevented&&e.key===`Escape`&&a&&(e.preventDefault(),o(!1))},d=v.useMemo(()=>({isOpen:a,monthYear:s,toggle:l}),[l,a,s]),f=v.useMemo(()=>({...d,slots:c}),[c,d]);return(0,G.jsx)(yF,{value:f,children:(0,G.jsx)($m,{"aria-expanded":a,"aria-label":`${s}, year selector`,className:K(t,c.trigger()),"data-open":a||void 0,"data-slot":`calendar-year-picker-trigger`,slot:null,onKeyDown:u,onPress:e=>{r?.(e),l()},...i,children:typeof e==`function`?e(d):e})})};xF.displayName=`HeroUI.CalendarYearPicker.Trigger`;var SF=({children:e,className:t,format:n,offset:r,...i})=>{let{monthYear:a,slots:o,...s}=bF(),c=pF(),l=sk({format:n,offset:r},c);return(0,G.jsx)(Xc.span,{className:q(o.triggerHeading,t),"data-slot":`calendar-year-picker-trigger-heading`,...i,children:typeof e==`function`?e({monthYear:a,...s}):e||l})};SF.displayName=`HeroUI.CalendarYearPicker.TriggerHeading`;var CF=({children:e,className:t,...n})=>{let{monthYear:r,slots:i,...a}=bF();return(0,G.jsx)(Xc.span,{"aria-hidden":`true`,className:q(i.triggerIndicator,t),"data-slot":`calendar-year-picker-trigger-indicator`,...n,children:typeof e==`function`?e({monthYear:r,...a}):e||(0,G.jsx)(uh,{height:`1em`,width:`1em`})})};CF.displayName=`HeroUI.CalendarYearPicker.TriggerIndicator`;var wF=v.createContext(null);function TF(){let e=v.use(wF);if(!e)throw Error(`CalendarYearPicker components must be used within .`);return e}var EF=({children:e,className:t,format:n,onKeyDown:r,visibleYears:i,...a})=>{let{calendarGridSlot:o,calendarRef:s,isYearPickerOpen:c,setIsYearPickerOpen:l}=fF(),u=pF(),d=v.useRef(null),f=v.useMemo(()=>of(),[]),{"aria-label":p,items:m,onChange:h,value:g}=Nie({format:n,visibleYears:v.useMemo(()=>i??(!u.minValue||!u.maxValue?20:hF(u.minValue,u.maxValue).length),[u.maxValue,u.minValue,i])},u),_=m.map(e=>`${e.id}:${e.date.year}`).join(`|`),y=m.map(e=>e.date.year),b=new Map(m.map(e=>[e.date.year,e])),x=m[g]?.date.year??u.focusedDate.year,S=v.useCallback(e=>b.get(e)?.formatted??String(e),[b]),[C,w]=v.useState(x),T=v.useRef(!1);v.useEffect(()=>{let e=d.current;if(!e)return;let t=s.current?.querySelector(`[data-slot='${o}']`);t&&(e.style.top=`${t.offsetTop}px`,e.style.height=`${t.offsetHeight}px`)},[o,s,u.focusedDate]);let E=v.useCallback(e=>{let t=d.current;if(!t)return;let n=t.querySelector(`[data-year='${e}']`);n&&n.focus()},[]);v.useEffect(()=>{let e=c&&!T.current;if(T.current=c,!e||y.length===0)return;let[t]=y;if(t==null)return;let n=y.includes(x)?x:t;w(n);let r=requestAnimationFrame(()=>{E(n)});return()=>{cancelAnimationFrame(r)}},[E,x,c,_,y.length]),v.useEffect(()=>{if(!c||y.length===0)return;let[e]=y;e!=null&&(y.includes(C)||w(e))},[C,c,_,y]);let D=v.useCallback(e=>{let t=b.get(e);t!=null&&(l(!1),h(t.id))},[b,h,l]),O=e=>{if(r?.(e),e.defaultPrevented)return;if(e.key===`Escape`&&c){e.preventDefault(),l(!1);return}if(!c||y.length===0)return;let t=y.indexOf(C);if(t===-1)return;let n=t;switch(e.key){case`ArrowRight`:n=Math.min(t+1,y.length-1);break;case`ArrowLeft`:n=Math.max(t-1,0);break;case`ArrowDown`:n=Math.min(t+3,y.length-1);break;case`ArrowUp`:n=Math.max(t-3,0);break;case`Home`:n=0;break;case`End`:n=y.length-1;break;default:return}if(n!==t){let t=y[n];if(t==null)return;e.preventDefault(),w(t),E(t)}},k=v.useMemo(()=>({activeYear:C,focusedYear:x,getFormattedYear:S,isYearPickerOpen:c,selectYear:D,setActiveYear:w,slots:f,years:y}),[C,x,S,D,c,f,y]);return(0,G.jsx)(wF,{value:k,children:(0,G.jsx)(Xc.div,{ref:d,"aria-hidden":!c,"aria-label":p,className:q(f.yearGrid,t),"data-open":c||void 0,"data-slot":`calendar-year-picker-grid`,role:`listbox`,tabIndex:-1,onKeyDown:O,...a,children:e})})};EF.displayName=`HeroUI.CalendarYearPicker.Grid`;var DF=({children:e})=>{let{focusedYear:t,getFormattedYear:n,isYearPickerOpen:r,selectYear:i,years:a}=TF(),o=new Date().getFullYear();return(0,G.jsx)(G.Fragment,{children:a.map(a=>{let s=a===t,c={formattedYear:n(a),isCurrentYear:a===o,isOpen:r,isSelected:s,selectYear:()=>i(a),year:a};return(0,G.jsx)(v.Fragment,{children:typeof e==`function`?e(c):(0,G.jsx)(OF,{year:a})},a)})})};DF.displayName=`HeroUI.CalendarYearPicker.GridBody`;var OF=({children:e,className:t,excludeFromTabOrder:n,onFocus:r,onPress:i,year:a,...o})=>{let{activeYear:s,focusedYear:c,getFormattedYear:l,isYearPickerOpen:u,selectYear:d,setActiveYear:f,slots:p}=TF(),m=a===c,h=a===s,g=l(a),_={formattedYear:g,isCurrentYear:a===new Date().getFullYear(),isOpen:u,isSelected:m,selectYear:()=>d(a),year:a};return(0,G.jsx)($m,{"aria-label":g,"aria-selected":m,className:K(t,p.yearCell()),"data-selected":m||void 0,"data-slot":`calendar-year-picker-year-cell`,"data-year":a,excludeFromTabOrder:n??!(u&&h),slot:null,onFocus:e=>{r?.(e),f(a)},onPress:e=>{i?.(e),d(a)},...o,children:typeof e==`function`?e(_):e||g})};OF.displayName=`HeroUI.CalendarYearPicker.Cell`;function kF({children:e,className:t,"data-slot":n=`calendar-grid-body`,firstDayOfWeek:r,visibleRange:i}){let{locale:a}=bp(),o=v.useMemo(()=>vF(i.start,i.end,a,r),[r,a,i.end,i.start]);return(0,G.jsx)(Xc.tbody,{className:t,"data-slot":n,children:o.map((t,n)=>(0,G.jsx)(`tr`,{children:t.map((t,n)=>t?v.cloneElement(e(t),{key:n}):(0,G.jsx)(`td`,{},n))},n))})}function AF({children:e,className:t,"data-slot":n=`calendar-grid-header`,firstDayOfWeek:r,timeZone:i=`UTC`,visibleRange:a,weekdayStyle:o=`short`}){let{locale:s}=bp(),c=v.useMemo(()=>gF(a.start,s,r,o,i),[r,s,i,a.start,o]);return(0,G.jsx)(Xc.thead,{"aria-hidden":!0,className:t,"data-slot":n,children:(0,G.jsx)(`tr`,{children:c.map((t,n)=>v.cloneElement(e(t),{key:n}))})})}var jF=(0,v.createContext)({});function MF({children:e,className:t,defaultYearPickerOpen:n=!1,firstDayOfWeek:r,isYearPickerOpen:i,maxValue:a,minValue:o,onYearPickerOpenChange:s,visibleDuration:c,...l}){let u=c?.weeks!=null,d=c?.days!=null,f=c?.days,{locale:p}=bp(),m=v.useMemo(()=>sf(),[]),h=v.useRef(null),[g,_]=eh(i,n,s),y=v.useMemo(()=>{let e=new yE(p).resolvedOptions().calendar;return _E(e)},[p]),b=v.useMemo(()=>mF(y.identifier),[y.identifier]),x=o??new wT(y,1900+b,1,1),S=a??new wT(y,2099+b,12,31);return(0,G.jsx)(dF,{value:{calendarGridSlot:`range-calendar-grid`,isYearPickerOpen:g,setIsYearPickerOpen:_,calendarRef:h},children:(0,G.jsx)(Rie,{ref:h,"data-slot":`range-calendar`,firstDayOfWeek:r,maxValue:S,minValue:x,visibleDuration:c,...l,className:K(t,$d(m.base(),u&&`range-calendar--week-view`,d&&`range-calendar--day-view`)),children:t=>(0,G.jsx)(jF,{value:{dayView:d&&f!=null?{days:f,firstDayOfWeek:r,timeZone:t.state.timeZone,visibleRange:t.state.visibleRange}:void 0,slots:m},children:typeof e==`function`?e(t):e})})})}MF.displayName=`HeroUI.RangeCalendar`;var NF=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(jF);return(0,G.jsx)(Xc.header,{className:q(r?.header,t),"data-slot":`range-calendar-header`,...n,children:e})};NF.displayName=`HeroUI.RangeCalendar.Header`;var PF=({className:e,...t})=>{let{slots:n}=(0,v.use)(jF);return(0,G.jsx)(Wie,{"data-slot":`range-calendar-heading`,...t,className:q(n?.heading,e)})};PF.displayName=`HeroUI.RangeCalendar.Heading`;var FF=({children:e,className:t,slot:n,...r})=>{let{slots:i}=(0,v.use)(jF);return(0,G.jsx)($m,{"data-slot":`range-calendar-nav-button`,slot:n,...r,className:K(t,i?.navButton()),children:e||(n===`previous`?(0,G.jsx)(lh,{className:i?.navButtonIcon(),"data-slot":`range-calendar-nav-button-icon`}):(0,G.jsx)(uh,{className:i?.navButtonIcon(),"data-slot":`range-calendar-nav-button-icon`}))})};FF.displayName=`HeroUI.RangeCalendar.NavButton`;var IF=({children:e,className:t,weekdayStyle:n=`short`,...r})=>{let i=(0,v.use)(jF),{dayView:a,slots:o}=i,s=v.useMemo(()=>({...i,dayView:a?{...a,weekdayStyle:n}:void 0}),[a,i,n]);return(0,G.jsx)(jF,{value:s,children:(0,G.jsx)(zie,{"data-slot":`range-calendar-grid`,weekdayStyle:n,...r,className:q(o?.grid,t),children:e})})};IF.displayName=`HeroUI.RangeCalendar.Grid`;var LF=({children:e,className:t,...n})=>{let{dayView:r,slots:i}=(0,v.use)(jF);return r&&r.days>=7&&typeof e==`function`?(0,G.jsx)(AF,{className:q(i?.gridHeader,t),"data-slot":`range-calendar-grid-header`,firstDayOfWeek:r.firstDayOfWeek,timeZone:r.timeZone,visibleRange:r.visibleRange,weekdayStyle:r.weekdayStyle,children:e}):(0,G.jsx)(wk,{"data-slot":`range-calendar-grid-header`,...n,className:q(i?.gridHeader,t),children:e})};LF.displayName=`HeroUI.RangeCalendar.GridHeader`;var RF=({children:e,className:t,...n})=>{let{dayView:r,slots:i}=(0,v.use)(jF);return r&&r.days>=7&&typeof e==`function`?(0,G.jsx)(kF,{className:q(i?.gridBody,t),"data-slot":`range-calendar-grid-body`,firstDayOfWeek:r.firstDayOfWeek,visibleRange:r.visibleRange,children:e}):(0,G.jsx)(Ek,{"data-slot":`range-calendar-grid-body`,...n,className:q(i?.gridBody,t),children:e})};RF.displayName=`HeroUI.RangeCalendar.GridBody`;var zF=({className:e,...t})=>{let{slots:n}=(0,v.use)(jF);return(0,G.jsx)(Tk,{"data-slot":`range-calendar-header-cell`,...t,className:q(n?.headerCell,e)})};zF.displayName=`HeroUI.RangeCalendar.HeaderCell`;var BF=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(jF);return(0,G.jsx)(Uie,{"data-slot":`range-calendar-cell`,...n,className:K(t,r?.cell()),children:t=>{let{formattedDate:n,isDisabled:r,isHovered:i,isPressed:a,isSelectionEnd:o,isSelectionStart:s}=t,c=typeof e==`function`?e(t):e||n;return(0,G.jsx)(`span`,{className:`range-calendar__cell-button`,"data-disabled":oh(r),"data-hovered":oh(i),"data-pressed":oh(a),"data-selected":oh(s||o),"data-slot":`range-calendar-cell-button`,children:c})}})};BF.displayName=`HeroUI.RangeCalendar.Cell`;var VF=({className:e,...t})=>{let{slots:n}=(0,v.use)(jF);return(0,G.jsx)(Xc.span,{"aria-hidden":`true`,className:q(n?.cellIndicator,e),"data-slot":`range-calendar-cell-indicator`,...t})};VF.displayName=`HeroUI.RangeCalendar.CellIndicator`;var HF=Object.assign(MF,{Root:MF,Header:NF,Heading:PF,NavButton:FF,Grid:IF,GridHeader:LF,GridBody:RF,HeaderCell:zF,Cell:BF,CellIndicator:VF,YearPickerTrigger:xF,YearPickerTriggerHeading:SF,YearPickerTriggerIndicator:CF,YearPickerGrid:EF,YearPickerGridBody:DF,YearPickerCell:OF}),UF={en:{brandSub:`login state gateway`,controlPlane:`control plane`,workspace:`Workspace`,develop:`Develop`,system:`System`,runtimeSnapshot:`Runtime and scheduler snapshot`,routesHint:`OpenAI / Anthropic-compatible routes`,clientConfig:`Client configuration`,clientConfigHint:`Use the same console key as Bearer token`,providerPrefixHint:`Pin a provider with a qoder/, workbuddy/, trae/, devin/, command/, codex/, zhipu/, qwenwork/, kimi/, codearts/, kiro/, or meta/ model prefix. A named API key can also limit which providers are listed and routed. Bare IDs follow the cross-provider pool setting on System.`,authentication:`Authentication`,curlExample:`curl example`,quickTestHint:`Send a real request through the selected account`,response:`Response`,providerCatalog:`Model catalog`,providerCatalogMeta:`SIGNED-IN / LIVE`,accountPool:`Account pool`,accountCreateHint:`Create an isolated runtime first, then sign in with browser or PAT.`,credentialImportHint:`Only credential bundles exported from this console, with matching user blob and machine ID.`,accountEmptyHint:`Create an account runtime to begin.`,oauthDeviceFlow:`OAuth device flow`,navOverview:`Overview`,navAuth:`Accounts`,navProviders:`Models`,navAccess:`Access & try`,navAccounts:`Accounts`,checkinDefaultsTitle:`Automatic check-in`,checkinDefaultsHint:`Set a default time for each provider. Accounts following the default pick up changes automatically; custom times stay unchanged.`,checkinDisabledAccountsTitle:`Check in disabled accounts`,checkinDisabledAccountsHint:`When enabled, accounts disabled for chat can still run their opted-in automatic check-in. Manual check-in remains unavailable for disabled accounts.`,checkinDisabledAccountsStatus:`Current status`,checkinDisabledAccountsAriaLabel:`Allow automatic check-in for disabled accounts`,checkinInherit:`Follow provider default`,checkinDefaultValue:`Provider default: {time}`,checkinCustom:`Account override`,checkinScheduleHint:`Uses the displayed timezone, normally within about 90 seconds of the chosen time; sequential account processing can take longer. Earlier failures retry once around 21:00. Disabled campaigns are skipped for the day. Chat is unaffected.`,checkinTimeInvalid:`Enter a valid check-in time (HH:mm).`,checkinRecordSkipped:`Activity unavailable`,navUsage:`Usage`,usageTitle:`Usage`,usageLead:`Requests, latency, tokens and credits by model, account and provider.`,usageByModel:`Models`,usageByAccount:`Accounts`,usageByProvider:`Providers`,usageColRequests:`Requests`,usageColSuccess:`Success`,usageColTokens:`Tokens`,usageColCacheWrite:`Cache write`,usageColCredits:`Credits`,usageRowCount:`{count} rows`,usageEmpty:`No requests in this window.`,usageStatsTab:`Stats`,usageCostTab:`Quota`,usageCostLead:`Subscription quota and token usage by model across every provider.`,usageWindow:`Window`,usageWindow24h:`24h`,usageWindow7d:`7d`,usageWindowTotal:`All retained`,usageCredits:`Quota used`,usageCreditsHint:`Subscription credits across all providers`,usageEstCost:`Equivalent cost`,usageTotalTokens:`Total tokens`,usageRequests:`Requests`,usageModelCount:`{count} models`,usageCacheHitRate:`Cache hit`,usageTokenSplitNote:`hit / miss / output`,usageChartTitle:`Usage over time`,usageChartHint:`Stacked by model. Switch between quota and tokens.`,usageChartEmpty:`No usage in this window.`,usageBreakdownTitle:`By model`,usageBreakdownHint:`Tokens and subscription credits for every model.`,usageColInputHit:`Input · cache hit`,usageColInputMiss:`Input · cache miss`,usageColOutput:`Output`,usageColCost:`Equiv. cost`,usageUnpricedCost:`no list price`,usageColSplit:`Peak / off-peak`,usageTotals:`Total`,usageRetentionHint:`Request logs are pruned on a schedule, so “All retained” covers only what is still stored.`,usageRenderNote:`Optional DeepSeek official list-price estimate in CNY. Subscription accounts do not bill this way — for comparison only.`,usagePeakNote:`Peak = Beijing time Mon–Fri 09:00–12:00 & 14:00–18:00; off-peak is half. Holidays are not handled.`,usageUnpricedHint:`No list-price row (quota and tokens only): {models}`,usageNoteTitle:`How this is calculated`,usagePriceTitle:`DeepSeek official price table`,usagePriceHit:`Cache hit`,usagePriceMiss:`Cache miss`,usagePriceOutput:`Output`,usagePriceBandOff:`Off-peak`,usagePriceBandPeak:`Peak`,usageOffPeak:`Off-peak`,usagePeak:`Peak`,usageChartMetric:`Chart metric`,usageEstimateTitle:`DeepSeek list-price estimate`,usageEstimateHint:`Optional CNY comparison for priced models. Collapsed by default.`,usageEstimateChartTitle:`List-price trend`,usageEstimateChartEmpty:`No priced DeepSeek usage in this window.`,chartMetricRequests:`Requests`,chartMetricTokens:`Tokens`,chartMetricLatency:`p95 latency`,chartInput:`Input`,chartOutput:`Output`,chartCacheRead:`Cache read`,chartTotal:`Total`,navLogs:`Logs`,navKeys:`API keys`,navSystem:`System settings`,sidebarFoot:`Gateway for CLI logins`,sidebarInFlight:`In flight: {count}`,systemSettingsTitle:`System settings`,systemSettingsLead:`Manage cross-provider routing, provider check-in defaults, updates, SQLite protection, and the console API key.`,crossProviderModelPoolTitle:`Cross-provider model pool`,crossProviderModelPoolHint:`When enabled, bare model IDs can route across matching Qoder, WorkBuddy, and Trae accounts. When disabled, bare IDs are rejected and requests must use a provider-prefixed model ID.`,crossProviderModelPoolStatus:`Current status`,crossProviderModelPoolAriaLabel:`Enable cross-provider model pool`,workbuddyCheckinSettingsTitle:`WorkBuddy check-in`,workbuddyCheckinSettingsHint:`Default first daily check-in time for new WorkBuddy accounts. Existing accounts keep their own time until you edit them.`,workbuddyCheckinSettingsFieldHint:`Uses server local time. New WorkBuddy accounts inherit this unless you set a different time on the account.`,routingStrategyTitle:`Account routing strategy`,routingStrategyHint:`Choose how ready accounts share traffic. Fill-first keeps traffic on the highest-priority account until it is unavailable. Earliest-expiry-first only ranks accounts inside the same provider by their nearest credit-package expiry; providers without package expiry keep the existing rotation.`,routingStrategy:`Strategy`,routingRoundRobin:`Round robin`,routingWeightedRoundRobin:`Weighted round robin`,routingFillFirst:`Fill first`,routingFEFO:`Earliest expiry first (FEFO)`,routingWeight:`Routing weight`,sessionAffinityTTL:`Session TTL`,sessionAffinityHits:`Sticky hits`,sessionAffinityMisses:`Sticky misses`,sessionAffinityEscapes:`Sticky escapes`,lastSessionMiss:`Last miss`,lastSessionEscape:`Last escape`,checkUpdates:`Check updates`,versionUpdate:`Version update`,latestVersionHint:`Download the latest version first, then apply it when you are ready.`,updateAvailable:`Update available`,settingsTabGeneral:`General`,settingsTabRouting:`Routing`,settingsTabSecurity:`Security & data`,settingsTabUpdates:`Updates`,sidebarNewVersion:`New version {version}`,sidebarReleaseNotes:`Release notes`,sidebarGoToUpdate:`History & rollback`,upToDate:`Up to date`,currentVersion:`Current version`,latestVersion:`Latest version`,skippedBetweenLabel:`Versions in between`,releaseNotes:`What changed`,updateNoNotes:`No notes for this version.`,versionHistory:`Version history`,versionCurrentBadge:`Current`,versionLatestBadge:`Latest`,restoreThisVersion:`Restore this version`,restoreVersionTitle:`Restore {version}?`,restoreVersionHint:`The service will switch back to this version. New requests pause only while it restarts.`,updaterReady:`Updates are ready on this host`,updaterUnavailable:`Updates are not available on this host`,updaterNeedsHost:`This process cannot replace its own container`,updaterUnavailableHint:`This page can check for new versions, but this host cannot apply them until updates are set up.`,updaterNeedInstall:`Install the host updater from deploy/install-updater.sh or deploy/install-updater.ps1 so it can talk to Docker.`,updaterNeedCompose:`Linux needs the updater socket mounted into the container. Docker Desktop uses a loopback updater URL instead of a Unix socket.`,updaterNeedRelease:`The running build must be a published GitHub release, not a local or development image.`,updateNow:`Download update`,applyUpdateNow:`Update now`,cancelUpdate:`Cancel download`,discardPreparedImage:`Discard this update`,updateReadyHint:`The update is downloaded. Apply it when you want to restart; new requests pause only then.`,updateReadyTargetHint:`Ready to switch to {version}. New requests pause only during the restart.`,updateNewerReleaseHint:`A newer version is available ({latest}). Update now, or discard this download and start again.`,updateStagedUnavailableHint:`Update the host updater first to use the staged update flow.`,updateLegacyOneShotHint:`This host will download and apply the update in one step. Later versions can download first, then wait for Update now.`,rollbackToVersion:`Restore an older version`,rollbackToVersionHint:`You can restore one of the three most recent versions before the one running now.`,updateReloadingIn:`Refreshing in {seconds}s`,updateInProgress:`Updating…`,updatePreparingImage:`Downloading update…`,updatePreparingImageHint:`Downloading the update in the background. This host stays on the current version until you tap Update now. Cancel if the download hangs.`,updateApplyingHint:`Applying the update. This page will refresh when it is ready.`,updateInProgressHint:`The service is updating and will refresh automatically when it is ready.`,updateUnavailableHint:`Updates are temporarily unavailable. Please try again later.`,updateFailedHint:`The update could not be completed. Please try again.`,updateCheckFailedHint:`Unable to check for updates. Please try again later.`,updatePreparingHint:`Getting the update ready: checking the version and saving a backup. Existing connections may be interrupted; clients can retry.`,updateRunningHint:`The update is running. This page will refresh when it is ready.`,updateReloadingHint:`Update complete. Refreshing this page…`,updateElapsed:`{seconds}s elapsed`,sqliteProtection:`SQLite protection`,sqliteProtectionHint:`Your data stays in place, and a verified backup is created before the update.`,sqliteBackupBeforeUpdate:`Verified backup before the update`,sqliteKeepFive:`Keep the five most recent backups`,sqliteRollbackTogether:`Restore the database and previous version together if the update fails`,updateStatus:`Update status`,noUpdateJob:`No update job yet`,confirmUpdate:`Update now`,confirmUpdateHint:`New requests pause briefly while a backup is created. Existing connections may be interrupted; clients can retry them.`,updateState_idle:`Idle`,updateState_unavailable:`Unavailable`,updateState_queued:`Waiting to start`,updateState_preparing:`Getting ready`,updateState_preparing_image:`Downloading update`,updateState_checking:`Checking version`,updateState_backing_up:`Saving a backup`,updateState_submitting:`Starting update`,updateState_running:`Updating`,updateState_pulling:`Downloading update`,updateState_host_binary:`Downloading update helper`,updateState_image_ready:`Download complete`,updateState_ready_to_apply:`Ready to update`,updateState_recreating:`Restarting`,updateState_health_checking:`Checking that it started`,updateState_rolling_back:`Restoring previous version`,updateState_succeeded:`Updated`,updateState_rolled_back:`Restored previous version`,updateState_failed:`Update failed`,checking:`checking`,refresh:`Refresh`,apiKey:`API key`,apiKeyPh:`API key`,needApiKey:`Sign in with the console password to load data.`,loginTitle:`Enter the console`,loginLead:`This host already has a running CLI2API proxy. Use the same API key your clients send to /v1.`,loginDesc:`Same key as Authorization: Bearer on the API.`,loginFormTitle:`Continue`,loginPassword:`Console password`,loginPasswordPh:`API key`,loginNeedKey:`Password is empty.`,loginBadKey:`That key does not match this host.`,loginSubmit:`Continue`,loggingInConsole:`Checking…`,loginHint:`Self-hosted only. Account login happens after this, on Accounts.`,showPassword:`Show password`,hidePassword:`Hide password`,signOut:`Sign out`,checkingSession:`Checking session…`,refreshing:`Refreshing`,pages:{home:{title:`Overview`,desc:`Runtime health, request volume, and ready endpoints.`},auth:{title:`Auth`,desc:`Browser device-flow login, PAT login, and session rewarm.`},providers:{title:`Models`,desc:`Models from signed-in accounts, plus per-model defaults for context and reasoning.`},access:{title:`Access & try`,desc:`Multi-turn chat in the main panel; expand Raw API below to debug.`},accounts:{title:`Accounts`,desc:`One login per account. Browser sign-in first; PAT only when needed.`},usage:{title:`Usage`,desc:`Usage by model, account and provider.`},logs:{title:`Logs`,desc:`Recent proxy requests and process output.`},keys:{title:`API keys`,desc:`Create client keys and limit their providers and concurrency.`},system:{title:`System settings`,desc:`Cross-provider routing, managed updates, SQLite protection, and the console API key.`},login:{title:`Enter the console`,desc:`Same API key as /v1.`}},logsLead:`Request history and runtime output from this host.`,logsRequests:`Request history`,logsRuntime:`Runtime logs`,logsEmptyRequests:`No requests recorded yet.`,logsEmptyRuntime:`No runtime lines captured yet.`,logsSearchRuntime:`Search runtime output…`,logsSearchRequestId:`Find a request id`,logsSearchModel:`Find a model`,logsSearchAccount:`Find an account`,logsFilterIdAll:`All request IDs`,logsNoFilterOptions:`No matching options`,logsClear:`Clear history`,logsClearConfirm:`Delete all request history on this host?`,logsColTime:`Time`,logsColAccount:`Account`,logsColApiKey:`API key`,logsColProvider:`Provider`,logsColModel:`Model`,logsColReasoning:`Reasoning`,logsColStatus:`Status`,logsColLatency:`Latency`,logsColTTFT:`First token`,logsLatencyTotal:`Total`,logsOutputTPS:`Output TPS`,logsColTokens:`Tokens`,logsTokensIn:`in`,logsTokensOut:`out`,logsTokensPoints:`{value} pts`,logsColStream:`Mode`,logsStreamYes:`stream`,logsStreamNo:`sync`,logsFilterAll:`All`,logsFilterOk:`OK`,logsFilterIncomplete:`Incomplete`,logsFilterError:`Error`,logsFilterCanceled:`Canceled`,logsFilterAccountAll:`All accounts`,logsFilterApiKeyAll:`All API keys`,logsSearchApiKey:`Find an API key`,logsFilterProviderAll:`All providers`,logsFilterModelAll:`All models`,logsFilterKindAll:`All errors`,logsFilterStreamAll:`All modes`,logsTimeRange:`Time`,logsTimeAll:`All time`,logsTime1h:`1 hour`,logsTime24h:`24 hours`,logsTime7d:`7 days`,logsTimeCustom:`Custom`,logsTimeFrom:`From`,logsTimeTo:`To`,logsKindQuota:`Quota`,logsKindRateLimit:`Rate limit`,logsKindAuth:`Auth`,logsKindNotReady:`Not ready`,logsKindUnavailable:`Unavailable`,logsKindInvalidRequest:`Invalid request`,logsKindModelNotAvailable:`Model missing`,logsPageSize:`Per page`,logsPage:`Page {page} / {pages}`,logsPrevPage:`Previous`,logsNextPage:`Next`,logsNoMatch:`No requests match these filters.`,logsLevelAll:`All`,logsLevelInfo:`Info`,logsLevelWarn:`Warn`,logsLevelError:`Error`,logsAttempts:`Attempts`,logsRouting:`Routing`,logsRouting_pool:`Pool`,logsRouting_pin:`Pinned`,logsRouting_sticky:`Session sticky`,logsRouting_sticky_escape:`Session escape`,logsNoAttempts:`No attempt details.`,logsStreamDiagnostics:`Stream diagnostics`,logsMessageShape:`Message shape`,logsMessageCount:`Messages`,logsEmptyMessageIndexes:`Empty indexes`,logsMessageRoles:`Roles`,logsCancellationSource:`Cancellation source`,logsUpstreamStatus:`Upstream status`,logsSSEEvents:`SSE events`,logsBytesRead:`Bytes read`,logsLastEvent:`Last event`,logsStreamComplete:`Completed with [DONE]`,logsUsageDetail:`Consumption`,logsCreditConsumed:`Points consumed`,logsDetailTitle:`Request detail`,logsRuntimeDetailTitle:`Runtime log detail`,logsRuntimeLevel:`Level`,logsRuntimeSource:`Source`,logsRuntimeMessage:`Message`,logsShownTotal:`{shown} / {total}`,logsAutoRefresh:`Live`,failedLogs:`Failed to load logs: {msg}`,homeEyebrow:`Runtime`,homeDisplay:`Gateway pulse`,homeLead:`Runtime health plus request volume, latency, and tokens from this host.`,metricRequests:`Requests`,metricSuccess:`Success`,metricLatency:`p95`,metricTokens:`Tokens`,statsWindow1h:`1h`,statsWindow24h:`24h`,statsWindow7d:`7d`,statsWindow30d:`30d`,statsWindowCustom:`Custom`,statsWindowToday:`Today`,statsRefreshPause:`Pause auto-refresh`,statsRefreshResume:`Resume auto-refresh`,statsRefreshAuto:`Refreshing every 30s · click to pause`,statsRefreshPaused:`Auto-refresh paused · click to resume`,statsDragHint:`Drag to open logs for a range`,statsWindowHint:`{window} window`,statsTraffic:`Traffic`,statsTrafficHint:`Completed chat requests in the selected window`,statsEmptyTraffic:`No requests in this window yet.`,statsLatencyP50:`p50`,statsLatencyP95:`p95`,statsLatencyAvg:`avg`,statsTTFB:`TTFB`,statsPool:`Account pool`,statsPoolHint:`Ready workers and remaining quota`,statsCooling:`cooling`,statsCoolingChip:`{count} cooling`,statsPoolReadyEmpty:`No ready workers right now — check cooling above or Accounts.`,statsTopModels:`Top models`,statsTopAccounts:`Top accounts`,statsTopProviders:`Providers`,statsTopProvidersHint:`Request share by account family`,statsNoProviders:`No provider traffic yet.`,statsErrorMix:`Error mix`,statsStatusMix:`Outcomes & errors`,statsStatusMixHint:`Request status, failure kinds and busiest accounts`,statsCoolingDetails:`Cooling down · reason · remaining · backoff`,statsBackoffLevel:`Restart backoff level`,statsAffinityHit:`Affinity hit`,statsAffinityHint:`{hits} hits · {misses} misses · {bindings} bindings`,metricCacheHit:`Cache hit rate`,metricCacheHitDetail:`{read} cached / {prompt} prompt`,metricStreaming:`Streaming share`,metricStreamingDetail:`{count} of {total} requests`,metricCanceled:`Canceled`,metricCanceledDetail:`{rate} of requests`,statsErrorMixHint:`Classified failures in this window`,statsNoModels:`No model traffic yet.`,statsNoAccounts:`No account traffic yet.`,statsNoErrors:`No classified errors.`,statsUnknown:`unknown`,statsUnassigned:`unassigned`,resTitle:`Resources`,resHint:`Host process memory and CPU`,resServer:`Server`,resWorkers:`Workers`,resEmpty:`No worker processes yet.`,resGoroutines:`goroutines`,resCpuLifetime:`lifetime avg`,failedStats:`Failed to load stats: {msg}`,homeNote:`Signed into the local console. Account logins live on the Accounts page.`,metricRuntime:`Runtime`,metricAccounts:`Accounts`,metricModels:`Models`,metricAuth:`Auth`,metricPort:`Port`,serviceDetail:`Service detail`,endpoints:`Endpoints`,copyBaseUrl:`Copy Base URL`,copied:`Copied`,copy:`Copy`,open:`Open`,waitingOverview:`Waiting for overview…`,signIn:`Sign in`,connectQoder:`Connect account`,rewarm:`Rewarm`,rewarming:`Rewarming`,refreshAccount:`Refresh`,refreshingAccount:`Refreshing`,stepBrowserTitle:`Browser device flow`,stepBrowserDesc:`Opens account selection. Finish in the browser, then this page polls until the session is ready.`,startBrowserLogin:`Sign in with browser`,starting:`Starting…`,quotaLoading:`Getting quota…`,quotaUnavailable:`Quota unavailable`,authUrl:`Auth URL`,openAuthUrl:`Open link`,stepPatTitle:`Personal access token`,stepPatDesc:`Optional fallback when browser flow is inconvenient.`,pat:`PAT`,pasteToken:`paste token`,loginWithPat:`Login with PAT`,loggingIn:`Logging in…`,localState:`Local state`,raw:`Raw`,noAuthSnapshot:`No auth snapshot yet.`,catalog:`Catalog`,availableModels:`Available models`,modelsPulled:`Pulled from`,filter:`Filter`,filterPh:`glm / qwen / deepseek`,providerFilterAll:`All providers`,accountStatusFilter:`Account status`,connection:`Connection`,apiPlayground:`Access & try`,apiPlaygroundHint:`Pick an account and model. Switch Chat / Raw API at the top — Raw API has JSON and curl.`,readyAccounts:`{ready} of {total} accounts ready`,baseUrl:`Base URL`,externalClients:`External clients`,protocol:`Protocol`,quickTest:`Quick test`,requestBuilder:`Request builder`,responseInspector:`Response inspector`,responseInspectorHint:`Raw JSON from the local proxy`,requestIdle:`Idle`,requestComplete:`Complete`,requestFailed:`Request failed`,responseReceived:`Response received`,responseEmptyTitle:`No response yet`,responseEmptyHint:`Choose a route, write a prompt, and send the request. The raw response appears here.`,sendRequest:`Send request`,promptPlaceholder:`Write a message for the model`,promptHelper:`This test uses a non-streaming Chat Completions request.`,accessTabChat:`Chat`,accessTabApi:`Raw API`,accessTabsLabel:`Access modes`,chatTryEmptyTitle:`No reply yet`,chatTryEmptyHint:`Write a message below. Account and model live in the composer. Session clears when you leave.`,chatTryHelper:`Enter to send · Shift+Enter for a new line`,chatTrySend:`Send`,chatTryStop:`Stop`,chatTryStreaming:`Streaming…`,chatTryUserLabel:`You`,chatTryAssistantLabel:`Assistant`,chatTryCreditsUsed:`Used {amount} credits`,chatTryUsageTokens:`{prompt} → {completion}`,chatTryUsageFoot:`{tokens} · {amount} credits`,chatHistoryTitle:`History`,chatHistoryNew:`New chat`,chatHistoryEmpty:`No chats yet`,chatHistoryUntitled:`Untitled`,chatHistoryExpand:`Show history`,chatHistoryCollapse:`Hide history`,nativeApiHint:`Non-streaming request, raw JSON response, and a matching curl command.`,rawFormatLabel:`API format`,rawFormatChat:`Chat`,rawFormatMessages:`Messages`,rawFormatResponses:`Responses`,rawFormatHint:`Chat Completions, Anthropic Messages, and OpenAI Responses are all supported.`,rawApiShow:`Show raw API`,rawApiHide:`Hide raw API`,chatAttach:`Attach file`,chatAttachRemove:`Remove attachment`,chatAttachUnsupported:`Unsupported file type: {names}`,thinkingPhaseScan:`Scanning`,thinkingPhasePlan:`Planning`,thinkingPhaseDraft:`Drafting`,thinkingDone:`Thought`,thinkingElapsed:`{n}s`,toolCallGroup:`Used {n} tools`,chatDemoLoad:`Preview sample`,thinkingChars:`{count} chars`,thinkingWorking:`Thinking`,toolCallRunning:`Running`,toolCallSuccess:`Done`,toolCallError:`Error`,toolCallUntitled:`tool`,toolCallArgs:`Arguments`,toolCallArgsEmpty:`(empty)`,autoAccountHint:`The scheduler chooses an available account.`,fixedAccountHint:`This request is pinned to the selected account.`,modelRoutingHint:`Uses the public model ID exposed by this proxy.`,accountModelHint:`Only models this account currently serves. A pinned request fails if the ID is missing here.`,noAccountModels:`This account has no models to send.`,accountModels:`Available models`,accountModelsTitle:`Models on {name}`,accountModelsHint:`Live catalog from this account. Requests pinned here only use these IDs.`,accountModelsEmpty:`This account has not published a model catalog yet.`,accountModelsError:`Could not load models: {msg}`,noAccountsForTest:`No account runtime is available. Add and sign in to an account before testing.`,curlGeneratedHint:`Generated from the current account, model, and prompt`,prompt:`Prompt`,model:`Model`,send:`Send`,waitingRequest:`Waiting for a request…`,requesting:`Requesting…`,endpointOpenAI:`OpenAI Compatible`,endpointChat:`Chat Completions`,endpointBaseHint:`Use this path as the base URL in OpenAI-compatible clients.`,endpointChatHint:`OpenAI-compatible chat. Prefix the model ID to pin one provider, for example qoder/glm-5.2.`,endpointMessages:`Anthropic Messages`,endpointMessagesHint:`Stateless Anthropic Messages. Use a provider-prefixed model ID to pin one family.`,endpointResponses:`OpenAI Responses`,endpointResponsesHint:`Stateless OpenAI Responses. Use a provider-prefixed model ID to pin one family.`,endpointModels:`Models`,endpointModelsHint:`Public model IDs. Named API keys only see models from their allowed providers.`,endpointHealth:`Health`,endpointHealthHint:`Check whether the local proxy is responding.`,endpointCount:`{count} API routes`,endpointReady:`Available now`,endpointBaseLabel:`Client base URL`,endpointAuthLabel:`Bearer API key`,hasUserBlob:`Has user blob`,userBlobBytes:`User blob bytes`,machineId:`Machine ID`,sessionHot:`Session hot`,upstreamEndpoint:`Upstream endpoint`,rewarmCount:`Rewarm count`,proxy:`Proxy`,endpoint:`Endpoint`,lastError:`Last error`,running:`Running`,down:`Down`,hot:`Hot`,up:`Up`,ready:`Ready`,missing:`Missing`,degraded:`Degraded`,error:`Error`,yes:`yes`,no:`no`,modelCol:`Model`,mappedKeyCol:`Upstream key`,requestIdCol:`Request ID`,providerCol:`Provider`,qoderKeyCol:`Upstream key`,routedTo:`Upstream model {model}`,stateCol:`State`,contextWindowCol:`Context window`,modelDefaultsCol:`Context and reasoning`,contextConfigHint:`These are defaults. If a request sets Max context or reasoning, that request wins.`,qoderContextHint:`Default context window used when the request omits context length / max input tokens.`,contextInvalid:`Context window must be an integer between 1,024 and 4,000,000 tokens.`,contextSaved:`Saved context window for {model}.`,contextReset:`Restored the default context window for {model}.`,contextMaxOn:`Enabled Max context for {model}.`,contextMaxOff:`Disabled Max context for {model}.`,contextMaxUnavailable:`This model has no Max context switch.`,maxMode:`Max context`,maxModeHint:`Trae larger context window, often 200k to 1M. Not a plan or quota. Used only when the request omits is_max_mode; an explicit request still wins. Unsupported models never send this switch.`,qoderMaxModeHint:`Qoder larger context window. Not a plan or quota. When on, requests use the model’s largest window; when off (or when a request sets its own context) the default window applies.`,catalogWindow:`Catalog size`,catalogWindowHint:`This Trae model has no Max-context switch. The number is the catalog window.`,workbuddyContextHint:`WorkBuddy desktop default and optional context budgets from the catalog. This is a local compact budget, not Trae is_max_mode. Chat requests do not send a window switch.`,reasoningLevels:`Reasoning intensity`,reasoningHint:`Default thinking effort when the request omits reasoning_effort and related flags. This does not lock every call to that level, and it does not cap a higher client value. A level the model does not allow falls back to an allowed option.`,reasoningFixed:`Fixed thinking: {type}`,noReasoningLevels:`This model has no selectable reasoning levels.`,reasoningSaved:`Saved default reasoning for {model}: {level}.`,reasoningLevel_none:`Off`,reasoningLevel_low:`Low`,reasoningLevel_medium:`Medium`,reasoningLevel_high:`High`,reasoningLevel_xhigh:`Extra high`,reasoningLevel_max:`Max effort`,modelDetails:`Details`,promptMaxTokens:`Prompt max`,maxOutputTokens:`Output max`,actions:`Actions`,save:`Save`,custom:`Custom`,defaultValue:`Default`,resetDefault:`Restore default`,fallback:`fallback`,modelFree:`(free)`,shownTotal:`{shown} shown / {total} total`,noModelsYet:`No models yet`,noModelsMatch:`No models match this filter.`,noProviders:`No providers loaded.`,failedOverview:`Failed to load overview: {msg}`,pastePatFirst:`Paste a PAT first`,patDone:`PAT login completed`,loginOpenMsg:`Open the auth URL to finish login`,idle:`idle`,menu:`Menu`,toggleSidebar:`Toggle sidebar`,accountsTitle:`Accounts`,accountsDesc:`One login per account. Chat round-robins and fails over.`,noAccounts:`No accounts yet. Add one to start serving chat.`,accountCount:`Accounts`,signedIn:`Signed in`,enabledAccounts:`Enabled`,availableAccounts:`Available`,needsAttention:`Needs attention`,searchAccounts:`Search name, ID, UID, provider, or auth type`,filterAll:`All`,shownAccounts:`{shown} / {total}`,noAccountsMatch:`No accounts match this filter.`,clearFilters:`Clear filters`,more:`More actions`,partialCooling:`Partial model cooldown`,modelCooldowns:`Model cooldowns`,modelCooldownsTitle:`Models in cooldown`,modelCooldownsEmpty:`No models are in cooldown.`,runtimeState:`Runtime state`,maxInflight:`Max concurrency`,priority:`Priority`,updatedAt:`Updated`,enabledState:`Enabled`,cooling:`Cooling down`,dead:`Recovering`,authFailed:`Auth failed`,patFallback:`PAT fallback`,usePat:`Use PAT`,account:`Account`,autoAccount:`Auto (round-robin)`,cooldown:`Cooldown`,inFlight:`In-flight`,liveConcurrency:`Concurrency`,liveRpm:`Last 60s`,liveRpmUnit:`req`,liveRpmHint:`started in the last minute`,liveTrace:`Trend`,livePeak:`peak {n}`,liveSaturated:`Saturated`,inflightTitle:`Live now`,inflightMockBadge:`mock`,inflightIdleBadge:`idle`,inflightMockToggle:`Demo`,inflightMockToggleAria:`Show mock demo when live is unavailable`,inflightLiveBadge:`live`,inflightHint:`Slots · in-flight · cooldown`,inflightCardAria:`Open live detail`,inflightOpen:`View all`,inflightExpand:`Expand`,inflightExpandFromConcurrency:`Expand live in-flight details`,inflightStickyBindings:`sticky · {n}`,inflightWaiting:`Waiting`,inflightRunning:`Running`,inflightThroughput:`Throughput`,inflightWaitP95:`P95`,inflightQueue:`Waiting`,inflightQueueEmpty:`Empty`,inflightSlots:`Slots`,inflightSticky:`sticky`,inflightDone:`Done`,inflightFailed:`Failed`,inflightDepth:`Depth`,inflightDepthHint:`{n}`,inflightRatePill:`rate limit · {remain}`,inflightRateBand:`{label} · {remain}`,inflightSlotIdle:`idle`,inflightSlotPaused:`cooling`,restarts:`Restarts`,dropSystemPrompt:`Drop system prompt`,dropSystemPromptHint:`Strip caller system prompts before sending; WorkBuddy still gets an empty leading system slot so Global does not reject the request`,dropSystemPromptTraeHint:`Keep caller system prompts. Clients such as MiMo Code put JSON instructions there; turn this on only if Trae rejects the request.`,autoCheckin:`Daily check-in`,autoCheckinHint:`Run the daily WorkBuddy credit check-in at the configured local time. Failed attempts retry around 21:00. Off by default.`,autoCheckinCreateHint:`WorkBuddy only. Enable automatic daily credit check-ins. The first attempt uses this account time, or the system default if left unchanged.`,autoCheckinTime:`Check-in time`,autoCheckinTimeHint:`Uses server local time and runs within about 14 minutes after the selected time. Failed attempts retry around 21:00. New accounts start from the system default.`,checkinNow:`Check in now`,checkinAll:`Check in all`,checkinAllEmpty:`No enabled accounts support check-in`,checkinAllDone:`All {count} accounts are already checked in today`,toastCheckingInAll:`Checking in {done} of {total}…`,toastCheckedInAll:`Checked in {checked}, skipped {skipped}`,toastCheckedInAllFailed:`Checked in {checked}, skipped {skipped}, failed {failed}`,lastCheckin:`Last check-in`,lastCheckinNone:`No check-in yet`,checkinStatus:`Check-in`,checkinToday:`Checked in today`,checkinPending:`Not checked in today`,checkinFailed:`Check-in failed`,checkinRecords:`Check-in records`,checkinRecordsTitle:`Check-in records · {name}`,checkinRecordsHint:`The latest 20 check-in attempts for this account.`,checkinRecordsEmpty:`No check-in records yet`,checkinRecordsCount:`{count} records`,checkinRecordSuccess:`Success`,checkinRecordAlready:`Already checked in`,checkinRecordFailed:`Failed`,checkinTruncated:`Message truncated · use copy for the full error`,checkinCopyError:`Copy full error`,refreshCredits:`Refresh credits`,expiryDistTitle:`Credit expiry distribution`,expiryDistHint:`Grouped by calendar day · colour marks the account · FEFO: upstream burns the soonest-expiring credits first`,expiryDistExpand:`Show all {n} days`,expiryDistCollapse:`Show less`,expiryDistDayTotal:`{n} credits expire`,expiryDistColAccount:`Account`,expiryDistColSoonest:`Soonest`,expiryDistColDaysLeft:`Days left`,expiryDistColBatch:`Expiring`,expiryDistColDaily:`Daily burn`,expiryDistDays:`{n}d`,expiryDistFoot:`"Daily burn" = credits expiring on the soonest day ÷ days until then — the pace needed to use them before they lapse.`,expiryDistExpired:`Expired`,usageColModel:`Model`,quota:`Quota`,quotaUsed:`Used`,quotaRemaining:`Remaining`,quotaDaily:`Daily quota`,quotaWeekly:`Weekly quota`,quotaMonthly:`Monthly quota`,quotaFiveHour:`5-Hour Limit`,quotaWeeklyLimit:`Weekly Limit`,quotaPlan:`Plan`,quotaMonthlyLimit:`Monthly Limit`,quotaUsedPercent:`{n}% used`,quotaResetsSoon:`Resets soon`,quotaResetsInMinutes:`Resets in {n} minutes`,quotaResetsInHours:`Resets in {n} hours`,quotaExpiresOn:`{amount}{unit} expire on {date}`,quotaAddOn:`Add-on`,quotaResourcePackage:`Resource package`,quotaExceeded:`Quota exceeded`,errorKind:`Error kind`,qoderLoginHint:`This signs in the upstream account only. It does not change the console password.`,needQoderLogin:`Needs account login`,waitingQoderLogin:`Waiting for account login…`,qoderLoginDone:`Account login completed`,rewarmDone:`Rewarm completed`,accountsSigned:`{n} / {total} accounts ready`,addAccount:`Add account`,batchImport:`Batch import`,batchImportLoading:`Importing accounts…`,batchImportUnrecognized:`Could not recognize this credential file format.`,batchImportConfirmTitle:`Confirm batch import`,batchImportConfirmHint:`Detected from {file}. Review and confirm before importing.`,batchImportConfirmHintNoFile:`Review the detected format, then confirm to import.`,batchImportRegion:`WorkBuddy region`,batchImportKiroRegion:`Kiro region`,batchImportRegionPickHint:`Region was unclear — pick CN or Global before importing.`,batchImportKiroRegionPickHint:`Region was unclear — pick US East or EU Central before importing.`,batchImportRegionMixed:`This pack mixes CN and Global domains. Split it, or pick one region to force.`,batchImportRegionUnknown:`Region not detected from domains — please confirm.`,batchImportUnknownFormat:`Unknown format field; guessed from shape.`,batchImportProviderUnsupported:`Batch import for this provider is not supported yet. Detection is ready for a future release.`,batchImportConfirmAction:`Import`,batchImportFormatUnknown:`Unknown format`,batchImportProviderUnknown:`Unknown provider`,accountName:`Account name`,accountNameRequired:`Enter an account name.`,accountCreated:`Account created. Session is starting.`,importCredential:`Import native credential`,accountImported:`Credential imported and runtime started.`,accountImportBatch:`Imported {n} accounts.`,accountImportPartial:`Imported {ok}, failed {fail}.`,credentialCopied:`Credential bundle copied.`,addAccountTitle:`Add account`,accountType:`Account type`,loginMethod:`Login method`,accountTypeHint:`Choose the upstream login family for this isolated runtime.`,accountTypeQoderGlobal:`Qoder Global`,accountTypeQoderGlobalHint:`Qoder Global via browser, PAT, or imported credential`,accountTypeQoderCN:`Qoder CN`,accountTypeQoderCNHint:`Qoder China via browser, PAT, or imported credential`,accountTypeWorkBuddyCN:`WorkBuddy CN`,accountTypeWorkBuddyCNHint:`CodeBuddy CN via browser login or imported credential`,accountTypeWorkBuddyGlobal:`WorkBuddy Global`,accountTypeWorkBuddyGlobalHint:`WorkBuddy Global via browser login or imported credential`,accountTypeTraeCN:`Trae CN Solo`,accountTypeTraeCNHint:`Trae China Solo via browser login or imported credential`,accountTypeDevinGlobal:`Devin (experimental)`,accountTypeDevinGlobalHint:`Experimental Devin Global via browser OAuth or session token import`,accountTypeCommandGlobal:`Command Code`,accountTypeCommandGlobalHint:`Command Code via a pasted user_… key. Speaks the CLI /alpha/generate protocol, so every plan works, including the $1 Go plan.`,accountTypeCodexGlobal:`Codex`,accountTypeCodexGlobalHint:`OpenAI Codex via Codex CLI OAuth, Sign in with ChatGPT, or an imported credential`,accountTypeZhipuCN:`Zhipu GLM`,accountTypeZhipuCNHint:`Zhipu GLM with an API key. Choose pay-as-you-go or Coding Plan, the same way the upstream account is billed.`,accountTypeQwenworkGlobal:`QwenWork International`,accountTypeQwenworkGlobalHint:`QwenWork international (qwenwork.ai) via browser OAuth or imported credential. The authorization link is single-use: open it directly in a browser already signed in to the target account, and do not send it through chat tools.`,accountTypeQwenworkCN:`QwenWork CN`,accountTypeQwenworkCNHint:`千问办公 China (qwenwork.cn) via browser OAuth or imported credential. The authorization link is single-use: open it directly in a browser already signed in to the target account, and do not send it through chat tools. The CN region has not yet been verified with a real account.`,accountTypeKimiCN:`Kimi Code CN`,accountTypeKimiCNHint:`Kimi Code China subscription via device-code sign-in against auth.kimi.com. Uses the same OAuth client as the official CLI, so the login you already completed with Kimi Code can be pasted in as its credential JSON.`,accountTypeCodeArtsCN:`CodeArts (码道)`,accountTypeCodeArtsCNHint:`Huawei Cloud CodeArts Agent via OAuth PKCE against codearts.huaweicloud.com. The console opens the authorization page; a pasted 127.0.0.1 callback URL also completes the login when the browser cannot reach this host.`,accountTypeKiroUS:`Kiro (US East)`,accountTypeKiroUSHint:`Personal Kiro login. Paste a Builder ID, Identity Center, or social credential JSON, or a ksk_ key. Chat goes to the Kiro runtime in us-east-1. Experimental.`,accountTypeKiroEU:`Kiro (EU Central)`,accountTypeKiroEUHint:`Personal Kiro login for the eu-central-1 runtime. Same credential shapes as US East. Experimental.`,accountTypeMetaGlobal:`Muse (Meta)`,accountTypeMetaGlobalHint:`Meta Muse Code subscription via device-code sign-in against auth.meta.com. After approval the console mints an LLM API key at api.meta.ai. You can also paste a Meta Model API key on the PAT tab.`,providerGroupSubscriptions:`Subscriptions`,providerGroupSubscriptionsHint:`stable account logins`,providerGroupExperimental:`Experimental`,providerGroupExperimentalHint:`early adapters`,providerFindPlaceholder:`Find a provider...`,providerFindEmpty:`No providers match this search.`,caiaiSoftLink:`Prefer hosted? Try CaiAI`,addAccountDesc:`Create an isolated account session. Each account keeps its own runtime home.`,tabBrowser:`Browser login`,tabPat:`PAT`,tabImport:`Import credential`,recommended:`Recommended`,wizardSettings:`Account settings`,wizardAdvanced:`Advanced options`,wizardContinue:`Continue`,wizardBack:`Back`,wizardSettingsHint:`Set these before login. You can still change them later from Edit on the account card.`,editAccount:`Edit`,editAccountTitle:`Edit {name}`,editAccountHint:`Change the display name, concurrency, routing priority, outbound proxy, model aliases, and check-in time when supported.`,accountModelAliases:`Aliases`,accountModelAliasesHint:`A name this account answers as. The request is rewritten to this account's real model after the account is picked.`,accountModelAliasTargetPlaceholder:`real model on this account`,modelAliasName:`Alias`,modelAliasTarget:`Real model`,modelAliasAdd:`Add`,modelAliasRemove:`Remove`,modelAliasPlaceholder:`kimi-k3`,enabledModels:`Models`,enabledModelsHint:`Leave unrestricted to serve the whole catalog. Restrict to choose which models this account may serve.`,restrictModels:`Only selected models`,allModels:`All models`,modelPickerSearch:`Search models`,modelPickerCount:`{selected} / {total} selected`,modelPickerSelectAll:`Select all`,modelPickerClear:`Clear`,modelPickerOffline:`Offline`,modelPickerRemove:`Remove {model}`,modelPickerNoMatch:`No matching models.`,maxInflightInvalid:`Concurrency must be an integer from 1 to 32.`,priorityInvalid:`Priority must be an integer from 1 to 100.`,wizardNamePh:`Account name`,maxInflightHint:`How many chats this account may run at once. Changing it later restarts the worker.`,priorityHint:`Higher numbers are preferred when routing later uses this field. Default 50.`,proxyUrl:`Proxy URL`,proxyUrlPlaceholder:`http://127.0.0.1:7890, direct`,proxyUrlHint:`Blank inherits the global proxy. Use direct or none to bypass proxies for this account. Qoder supports HTTP(S) only; WorkBuddy/Trae also support SOCKS5.`,proxySettingsTitle:`Outbound proxy`,proxySettingsHint:`Set the default proxy for upstream requests. Global proxies support HTTP(S) only. SOCKS5 is available for WorkBuddy/Trae account-level proxies. Account-level settings override it.`,dropSystemPromptCreateHint:`WorkBuddy only. Strip caller system prompts, then send an empty leading system slot so Global still accepts the request.`,wizardBrowserLead:`Shows the authorization URL. Open or copy it, finish in the browser, and this wizard continues automatically.`,wizardCodexBrowserLead:`Choose Codex CLI or Sign in with ChatGPT, then open the authorization URL. ChatGPT website logins need Sign in with ChatGPT; the CLI flow cannot refresh those tokens.`,codexLoginMethod:`Codex login`,codexLoginCli:`Codex CLI`,codexLoginCliHint:`Official Codex CLI OAuth. Use this for CLI-issued credentials.`,codexLoginChatGPT:`Sign in with ChatGPT`,codexLoginChatGPTHint:`ChatGPT website login. Stores a separate token that refreshes at a different endpoint.`,kiroLoginMethod:`Kiro sign-in`,kiroLoginBuilder:`Builder ID`,kiroLoginBuilderHint:`Device code. Open the link and approve it; this page finishes on its own.`,kiroLoginIDC:`Identity Center`,kiroLoginIDCHint:`Your organization portal. Paste its start URL, then approve in the browser.`,kiroLoginSSO:`SSO token`,kiroLoginSSOHint:`Paste a portal SSO bearer. It is exchanged once and not stored.`,kiroLoginMicrosoft:`Microsoft`,kiroLoginMicrosoftHint:`Enterprise SSO. Paste each localhost callback as the browser shows it.`,kiroIDCStartURL:`Identity Center start URL`,kiroIDCStartURLPh:`https://example.awsapps.com/start`,startCodexCliLogin:`Start Codex CLI login`,startCodexChatGPTLogin:`Sign in with ChatGPT`,wizardStartBrowser:`Start browser login`,wizardStartingSession:`Starting the account session…`,wizardWaitingBrowser:`Waiting for authorization in the browser…`,wizardCallbackLead:`If the browser stays on 127.0.0.1 and this console never finishes, copy the full address-bar URL here.`,wizardCallbackPh:`Paste the full http://127.0.0.1…/authorize?… URL`,wizardSubmitCallback:`Submit callback URL`,wizardStartingWorker:`Authorization received. Starting account session…`,wizardAccountReady:`Account is ready.`,wizardLoginTimeout:`Timed out waiting for browser login. You can retry from the account card.`,wizardPatLead:`Use a personal access token when the browser flow is inconvenient.`,wizardPatLeadCN:`Create a PAT at qoder.com.cn/account/integrations, then paste it here.`,wizardPatLeadCommand:`Paste your Command Code key (it looks like user_…, from commandcode.ai/settings).`,zhipuApiKey:`API key`,zhipuApiKeyPh:`Paste the key from open.bigmodel.cn`,zhipuAccountMode:`Account mode`,zhipuModePayg:`Pay as you go`,zhipuModePaygHint:`Billed by token. Uses the standard GLM endpoint.`,zhipuModeCoding:`Coding Plan`,zhipuModeCodingHint:`Subscription plan. Uses the Coding Plan endpoint and shows its quota.`,zhipuOrganization:`Organization ID`,zhipuOrganizationPh:`Optional, for a team Coding Plan`,zhipuProject:`Project ID`,zhipuProjectPh:`Optional`,zhipuCreate:`Add Zhipu account`,zhipuKeyRequired:`Paste the Zhipu API key first.`,wizardPatPh:`Paste personal access token`,wizardCreateAndLogin:`Create and sign in`,wizardImportLead:`Paste a credential JSON export. WorkBuddy hub packages import every account in the file. Kiro accepts a Builder ID, Identity Center, social, or ksk_ JSON.`,wizardImportPh:`Paste credential JSON`,wizardChooseFile:`Choose file`,wizardBadJson:`That does not look like a valid credential bundle.`,reLogin:`Sign in`,cancel:`Cancel`,close:`Close`,create:`Create`,import:`Import`,export:`Export`,enable:`Enable`,disable:`Disable`,disabled:`Disabled`,delete:`Delete`,holdToDelete:`Hold to delete`,trendHalfHint:`Second half of the window vs the first half`,toastRefreshingAccount:`Refreshing account…`,toastAccountRefreshed:`Account refreshed`,toastRefreshingCredits:`Refreshing credits…`,toastCreditsRefreshed:`Credits refreshed`,toastCreditsPartiallyRefreshed:`{failed} of {total} accounts failed to refresh`,toastAccountAdded:`Account added`,toastAccountDeleted:`Account deleted`,toastClearingLogs:`Clearing request logs…`,toastLogsCleared:`Request logs cleared`,toastKeyDeleted:`API key deleted`,toastFailed:`Operation failed`,deleteAccountConfirm:`Delete account {name}? This removes its local runtime and stored credential.`,edit:`Edit`,enabled:`Enabled`,keysLead:`Client keys call /v1. Leave providers empty to allow every family. The console key stays on System.`,keysCreate:`Create key`,keysEmpty:`No client keys yet`,keysEmptyHint:`Create a named key for OpenAI-compatible clients. It cannot sign in to this console.`,keysCreateTitle:`Create API key`,keysCreateHint:`The secret is shown once. Store it in the client that will call /v1.`,keysEditTitle:`Edit API key`,keysEditHint:`Rename the key, change which providers it may route to, or cap how many chats it may run at once.`,keysName:`Name`,keysNamePh:`CI bot`,keysNameRequired:`Name is required.`,keysProviders:`Providers`,keysProvidersHint:`Restrict this key to specific provider regions. Leave all unchecked to allow every provider.`,keysAllProviders:`All providers`,keysAllRegions:`All regions`,keysProvidersNotLoaded:`Provider list is still loading. Saving is disabled so the key permissions stay unchanged.`,keysProvidersLoadFailed:`Failed to load provider list: {message}`,keysMaxInflight:`Max concurrency`,keysMaxInflightHint:`How many /v1 chats this key may run at once. 0 means no limit. Extra requests get HTTP 429.`,keysMaxInflightInvalid:`Concurrency must be an integer from 0 to 256.`,keysMaxInflightValue:`Up to {count} at once`,keysMaxInflightUnlimited:`No concurrency limit`,keysLastUsed:`Last used {time}`,keysNeverUsed:`Not used yet`,keysSecretTitle:`Store this secret now`,keysSecretHint:`This value is not stored in plaintext. It will not be shown again.`,keysSecretOnce:`Copy the key before closing this dialog.`,keysDeleteConfirm:`Delete API key {name}? Clients using it will fail immediately.`,consoleKeyTitle:`Console API key`,consoleKeyHint:`This is the administrator key used to sign in here.`,consoleKeyLead:`It can call every provider and manage accounts, keys, and updates. Client keys live on the API keys page.`,consoleKeyRotate:`Rotate key`,consoleKeyRotateHint:`Rotating signs you out of other sessions and restarts Qoder workers so they pick up the new secret.`,consoleKeyRotateNow:`Rotate now`,consoleKeySecretTitle:`New console key`,consoleKeySecretHint:`This browser session is already updated. Copy the key for any other clients that used the old console secret.`},zh:{brandSub:`登录态网关`,controlPlane:`控制平面`,workspace:`工作区`,develop:`开发`,system:`系统`,runtimeSnapshot:`运行时与调度器快照`,routesHint:`OpenAI / Anthropic 兼容端点`,clientConfig:`客户端配置`,clientConfigHint:`使用与控制台相同的密钥作为 Bearer Token`,providerPrefixHint:`用 qoder/、workbuddy/、trae/、devin/、command/、codex/、zhipu/、qwenwork/、kimi/、codearts/、kiro/ 或 meta/ 前缀指定供应商。客户端 API 密钥也可以限制可见和可调度的供应商。不带前缀时是否跨供应商,由系统设置里的模型池决定。`,authentication:`认证方式`,curlExample:`curl 示例`,quickTestHint:`通过所选账号发送一条真实请求`,response:`响应`,providerCatalog:`模型目录`,providerCatalogMeta:`已登录 / 实时`,accountPool:`账号池`,accountCreateHint:`先创建隔离运行时,再通过浏览器或 PAT 登录。`,credentialImportHint:`仅支持从本控制台导出、且 user blob 与 machine ID 匹配的凭证包。`,accountEmptyHint:`创建一个账号运行时后即可开始。`,oauthDeviceFlow:`OAuth 浏览器登录`,navOverview:`概览`,navAuth:`账号`,navProviders:`模型`,navAccess:`接入与调试`,navAccounts:`账号`,checkinDefaultsTitle:`自动签到`,checkinDefaultsHint:`按供应商设置默认时间。跟随默认的账号会立即采用新时间,账号自定义时间不受影响。`,checkinDisabledAccountsTitle:`停用账号也自动签到`,checkinDisabledAccountsHint:`开启后,停用聊天功能的账号仍可执行已开启的自动签到;停用账号仍不可手动签到。`,checkinDisabledAccountsStatus:`当前状态`,checkinDisabledAccountsAriaLabel:`允许停用账号自动签到`,checkinInherit:`跟随供应商默认`,checkinDefaultValue:`供应商默认:{time}`,checkinCustom:`账号自定义`,checkinScheduleHint:`按显示的时区执行,通常在设定时间后的约 90 秒内开始,多账号顺序处理可能延后;较早的失败会在约 21:00 重试一次,活动未开放则当天跳过。签到不影响聊天。`,checkinTimeInvalid:`请输入有效的签到时间(HH:mm)。`,checkinRecordSkipped:`活动未开放`,navUsage:`用量`,usageTitle:`用量`,usageLead:`按模型、账号与供应商查看请求、延迟、token 与积分。`,usageByModel:`模型`,usageByAccount:`账号`,usageByProvider:`供应商`,usageColRequests:`请求`,usageColSuccess:`成功率`,usageColTokens:`Tokens`,usageColCacheWrite:`缓存写入`,usageColCredits:`积分`,usageRowCount:`{count} 行`,usageEmpty:`该时间窗口内没有请求。`,usageStatsTab:`统计`,usageCostTab:`额度`,usageCostLead:`按模型汇总各供应商的订阅额度与 token 用量。`,usageWindow:`时间范围`,usageWindow24h:`24 小时`,usageWindow7d:`7 天`,usageWindowTotal:`全部留存`,usageCredits:`已用额度`,usageCreditsHint:`所有 provider 合计消耗的订阅额度`,usageEstCost:`折合费用`,usageTotalTokens:`Token 总量`,usageRequests:`请求数`,usageModelCount:`{count} 个模型`,usageCacheHitRate:`缓存命中`,usageTokenSplitNote:`命中 / 未命中 / 输出`,usageChartTitle:`用量趋势`,usageChartHint:`按模型堆叠。可在额度与 token 之间切换。`,usageChartEmpty:`该时间范围内暂无用量。`,usageBreakdownTitle:`按模型明细`,usageBreakdownHint:`每个模型的 token 与订阅额度。`,usageColInputHit:`输入·缓存命中`,usageColInputMiss:`输入·缓存未命中`,usageColOutput:`输出`,usageColCost:`折合费用`,usageUnpricedCost:`无官方价`,usageColSplit:`高峰 / 闲时`,usageTotals:`合计`,usageRetentionHint:`请求日志按计划清理,因此「全部留存」只覆盖仍在库内的部分。`,usageRenderNote:`可选的 DeepSeek 官方列表价人民币折算。订阅账号并不按此计费——仅供对比。`,usagePeakNote:`高峰按北京时间周一至周五 09:00-12:00、14:00-18:00 估算;闲时为高峰一半。未处理法定节假日及调休。`,usageUnpricedHint:`以下模型没有列表价行,只计入额度与 token:{models}`,usageNoteTitle:`计算说明`,usagePriceTitle:`DeepSeek 官方价格表`,usagePriceHit:`缓存命中`,usagePriceMiss:`缓存未命中`,usagePriceOutput:`输出`,usagePriceBandOff:`闲时`,usagePriceBandPeak:`高峰`,usageOffPeak:`闲时`,usagePeak:`高峰`,usageChartMetric:`图表指标`,usageEstimateTitle:`DeepSeek 官方列表价折算`,usageEstimateHint:`有官方价的模型可查看人民币对比;默认折叠。`,usageEstimateChartTitle:`列表价趋势`,usageEstimateChartEmpty:`该时间范围内暂无 DeepSeek 计价用量。`,chartMetricRequests:`请求`,chartMetricTokens:`Tokens`,chartMetricLatency:`p95 延迟`,chartInput:`输入`,chartOutput:`输出`,chartCacheRead:`缓存读取`,chartTotal:`合计`,navLogs:`日志`,navKeys:`API 密钥`,navSystem:`系统设置`,sidebarFoot:`CLI 登录态网关`,sidebarInFlight:`当前并发 {count}`,systemSettingsTitle:`系统设置`,systemSettingsLead:`管理跨 Provider 路由、各供应商签到默认时间、系统更新、SQLite 保护和控制台管理员密钥。`,crossProviderModelPoolTitle:`跨 Provider 模型池`,crossProviderModelPoolHint:`开启后,不带 Provider 前缀的模型 ID 可以在匹配的 Qoder、WorkBuddy 和 Trae 账号之间调度;关闭后 bare ID 会被拒绝,必须使用带 Provider 前缀的模型 ID。`,crossProviderModelPoolStatus:`当前状态`,crossProviderModelPoolAriaLabel:`开启跨 Provider 模型池`,workbuddyCheckinSettingsTitle:`WorkBuddy 签到`,workbuddyCheckinSettingsHint:`新建 WorkBuddy 账号时使用的默认首次签到时间。已有账号会保留各自的时间,直到你单独修改。`,workbuddyCheckinSettingsFieldHint:`使用服务器本地时间。新建 WorkBuddy 账号会继承这里的时间,账号编辑页仍可单独覆盖。`,routingStrategyTitle:`账号调度策略`,routingStrategyHint:`选择就绪账号如何分担流量。填满优先会持续使用最高优先级账号,直到它不可用。最早到期优先只在同一供应商内部按最近的积分包到期日排序;没有积分包到期信息的供应商保持原有轮询。`,routingStrategy:`策略`,routingRoundRobin:`轮询`,routingWeightedRoundRobin:`加权轮询`,routingFillFirst:`填满优先`,routingFEFO:`最早到期优先(FEFO)`,routingWeight:`调度权重`,sessionAffinityTTL:`会话 TTL`,sessionAffinityHits:`粘性命中`,sessionAffinityMisses:`粘性未命中`,sessionAffinityEscapes:`粘性逃逸`,lastSessionMiss:`最近未命中`,lastSessionEscape:`最近逃逸`,checkUpdates:`检查更新`,versionUpdate:`版本更新`,latestVersionHint:`先下载最新版本,准备好后再点立即更新。`,updateAvailable:`有可用更新`,settingsTabGeneral:`常规`,settingsTabRouting:`路由调度`,settingsTabSecurity:`安全与数据`,settingsTabUpdates:`版本更新`,sidebarNewVersion:`新版本 {version}`,sidebarReleaseNotes:`更新日志`,sidebarGoToUpdate:`历史版本与回滚`,upToDate:`已是最新版本`,currentVersion:`当前版本`,latestVersion:`最新版本`,skippedBetweenLabel:`中间经过的版本`,releaseNotes:`更新内容`,updateNoNotes:`这个版本还没有说明。`,versionHistory:`历史版本`,versionCurrentBadge:`当前`,versionLatestBadge:`最新`,restoreThisVersion:`恢复此版本`,restoreVersionTitle:`恢复到 {version}?`,restoreVersionHint:`服务会切回这个版本。只有重启时才会暂停新请求。`,updaterReady:`这台机器可以更新`,updaterUnavailable:`这台机器暂时不能更新`,updaterNeedsHost:`当前进程不能替换自己的容器`,updaterUnavailableHint:`这一页可以检查新版本,但还不能在这台机器上安装更新。`,updaterNeedInstall:`用 deploy/install-updater.sh 或 deploy/install-updater.ps1 安装宿主机更新器,让它能调用 Docker。`,updaterNeedCompose:`Linux 需要把更新器 socket 挂进容器。Docker Desktop 用本机回环地址,而不是 Unix socket。`,updaterNeedRelease:`当前运行的必须是已发布的 GitHub Release,不能是本地或开发镜像。`,updateNow:`下载更新`,applyUpdateNow:`立即更新`,cancelUpdate:`取消下载`,discardPreparedImage:`放弃这次更新`,updateReadyHint:`更新已经下载好。点立即更新才会重启;在此之前不会暂停新请求。`,updateReadyTargetHint:`可以切换到 {version}。只有重启时才会暂停新请求。`,updateNewerReleaseHint:`又有更新的版本({latest})。可以先立即更新,或放弃这次下载后重新开始。`,updateStagedUnavailableHint:`请先更新宿主机更新器,才能使用分阶段更新。`,updateLegacyOneShotHint:`这台机器会一次下载并完成更新。之后的版本可以先下载,再点立即更新。`,rollbackToVersion:`恢复旧版本`,rollbackToVersionHint:`可以恢复到当前版本之前最近的三个版本。`,updateReloadingIn:`{seconds}s 后刷新`,updateInProgress:`更新中…`,updatePreparingImage:`正在下载更新…`,updatePreparingImageHint:`正在后台下载更新。当前版本会继续运行,下载完成后点立即更新才会切换。下载卡住时可以取消。`,updateApplyingHint:`正在安装更新。完成后会自动刷新这个页面。`,updateInProgressHint:`系统正在更新,准备就绪后会自动刷新页面。`,updateUnavailableHint:`暂时无法更新,请稍后重试。`,updateFailedHint:`更新未完成,请重试。`,updateCheckFailedHint:`暂时无法检查更新,请稍后重试。`,updatePreparingHint:`正在准备更新:检查版本并保存备份。现有连接可能会被中断,客户端可自行重试。`,updateRunningHint:`正在更新。完成后会自动刷新这个页面。`,updateReloadingHint:`更新完成,正在刷新页面…`,updateElapsed:`已用时 {seconds}s`,sqliteProtection:`SQLite 保护`,sqliteProtectionHint:`数据会留在原处,并在更新前创建经过校验的备份。`,sqliteBackupBeforeUpdate:`更新前创建并校验备份`,sqliteKeepFive:`保留最近 5 份备份`,sqliteRollbackTogether:`失败时同时恢复数据库和上一版本`,updateStatus:`更新状态`,noUpdateJob:`暂无更新任务`,confirmUpdate:`立即更新`,confirmUpdateHint:`系统会短暂停止接收新请求并保存备份。现有连接可能会被中断,客户端可自行重试。`,updateState_idle:`空闲`,updateState_unavailable:`不可用`,updateState_queued:`等待开始`,updateState_preparing:`准备中`,updateState_preparing_image:`正在下载更新`,updateState_checking:`正在检查版本`,updateState_backing_up:`正在保存备份`,updateState_submitting:`正在开始更新`,updateState_running:`正在更新`,updateState_pulling:`正在下载更新`,updateState_host_binary:`正在下载更新程序`,updateState_image_ready:`下载完成`,updateState_ready_to_apply:`可以立即更新`,updateState_recreating:`正在重启`,updateState_health_checking:`正在确认启动`,updateState_rolling_back:`正在恢复上一版本`,updateState_succeeded:`更新完成`,updateState_rolled_back:`已恢复上一版本`,updateState_failed:`更新失败`,checking:`检查中`,refresh:`刷新`,apiKey:`API Key`,apiKeyPh:`API Key`,needApiKey:`先用控制台密码登录才能加载数据。`,loginTitle:`进入控制台`,loginLead:`这台机器上的 CLI2API 代理已经在运行。请输入客户端访问 /v1 时使用的 API Key。`,loginDesc:`和接口 Authorization: Bearer 是同一把钥匙。`,loginFormTitle:`继续`,loginPassword:`控制台密码`,loginPasswordPh:`API Key`,loginNeedKey:`密码是空的。`,loginBadKey:`这把钥匙对不上这台机器。`,loginSubmit:`进入`,loggingInConsole:`核对中…`,loginHint:`只解锁本机控制台。账号登录在进入后的「账号」页。`,showPassword:`显示密码`,hidePassword:`隐藏密码`,signOut:`退出`,checkingSession:`正在检查登录态…`,refreshing:`刷新中`,pages:{home:{title:`概览`,desc:`查看运行状态、请求量与可用端点。`},auth:{title:`授权`,desc:`浏览器 device-flow 登录、PAT 登录,以及会话 rewarm。`},providers:{title:`模型`,desc:`已登录账号可用的模型,以及每个模型的上下文和推理默认值。`},access:{title:`接入与调试`,desc:`主区多轮对话试玩;下方可展开原始 API 调试。`},accounts:{title:`账号`,desc:`一个账号一个登录态。先走浏览器登录;浏览器不方便再用 PAT。`},usage:{title:`用量`,desc:`按模型、账号与供应商统计用量。`},logs:{title:`日志`,desc:`查看近期代理请求和进程输出。`},keys:{title:`API 密钥`,desc:`创建客户端密钥,并限制可用的供应商和并发。`},system:{title:`系统设置`,desc:`管理跨 Provider 路由、系统更新、SQLite 保护和控制台管理员密钥。`},login:{title:`进入控制台`,desc:`和 /v1 使用同一把 API Key。`}},logsLead:`本机请求历史与运行时输出。`,logsRequests:`请求历史`,logsRuntime:`运行日志`,logsEmptyRequests:`还没有请求记录。`,logsEmptyRuntime:`还没有捕获到运行输出。`,logsSearchRuntime:`搜索运行输出…`,logsSearchRequestId:`搜索请求 ID`,logsSearchModel:`搜索模型`,logsSearchAccount:`搜索账号`,logsFilterIdAll:`全部请求 ID`,logsNoFilterOptions:`没有匹配项`,logsClear:`清空历史`,logsClearConfirm:`删除本机全部请求历史?`,logsColTime:`时间`,logsColAccount:`账号`,logsColApiKey:`密钥`,logsColProvider:`供应商`,logsColModel:`模型`,logsColReasoning:`推理`,logsColStatus:`状态`,logsColLatency:`延迟`,logsColTTFT:`首字`,logsLatencyTotal:`总耗时`,logsOutputTPS:`输出 TPS`,logsColTokens:`Tokens`,logsTokensIn:`输入`,logsTokensOut:`输出`,logsTokensPoints:`{value} 点`,logsColStream:`模式`,logsStreamYes:`流式`,logsStreamNo:`同步`,logsFilterAll:`全部`,logsFilterOk:`成功`,logsFilterIncomplete:`未完成`,logsFilterError:`失败`,logsFilterCanceled:`取消`,logsFilterAccountAll:`全部账号`,logsFilterApiKeyAll:`全部密钥`,logsSearchApiKey:`搜索密钥`,logsFilterProviderAll:`全部供应商`,logsFilterModelAll:`全部模型`,logsFilterKindAll:`全部错误`,logsFilterStreamAll:`全部模式`,logsTimeRange:`时间`,logsTimeAll:`全部时间`,logsTime1h:`1 小时`,logsTime24h:`24 小时`,logsTime7d:`7 天`,logsTimeCustom:`自定义`,logsTimeFrom:`开始`,logsTimeTo:`结束`,logsKindQuota:`额度`,logsKindRateLimit:`限流`,logsKindAuth:`鉴权`,logsKindNotReady:`未就绪`,logsKindUnavailable:`不可用`,logsKindInvalidRequest:`非法请求`,logsKindModelNotAvailable:`模型不可用`,logsPageSize:`每页`,logsPage:`第 {page} / {pages} 页`,logsPrevPage:`上一页`,logsNextPage:`下一页`,logsNoMatch:`没有符合当前筛选的请求。`,logsLevelAll:`全部`,logsLevelInfo:`信息`,logsLevelWarn:`警告`,logsLevelError:`错误`,logsAttempts:`尝试记录`,logsRouting:`路由方式`,logsRouting_pool:`常规池`,logsRouting_pin:`显式指定`,logsRouting_sticky:`会话粘性`,logsRouting_sticky_escape:`粘性逃逸`,logsNoAttempts:`没有尝试详情。`,logsStreamDiagnostics:`流诊断`,logsMessageShape:`消息结构`,logsMessageCount:`消息数`,logsEmptyMessageIndexes:`空内容下标`,logsMessageRoles:`角色顺序`,logsCancellationSource:`取消来源`,logsUpstreamStatus:`上游状态`,logsSSEEvents:`SSE 事件数`,logsBytesRead:`读取字节数`,logsLastEvent:`最后事件`,logsStreamComplete:`已收到 [DONE]`,logsUsageDetail:`本次消耗`,logsCreditConsumed:`消耗点数`,logsDetailTitle:`请求详情`,logsRuntimeDetailTitle:`运行日志详情`,logsRuntimeLevel:`级别`,logsRuntimeSource:`来源`,logsRuntimeMessage:`日志内容`,logsShownTotal:`{shown} / {total}`,logsAutoRefresh:`实时`,failedLogs:`加载日志失败:{msg}`,homeEyebrow:`运行时`,homeDisplay:`网关状态`,homeLead:`运行状态之外,还能看到本机请求量、延迟和 token。`,metricRequests:`请求`,metricSuccess:`成功率`,metricLatency:`p95`,metricTokens:`Tokens`,statsWindow1h:`1小时`,statsWindow24h:`24小时`,statsWindow7d:`7天`,statsWindow30d:`30天`,statsWindowCustom:`自定义`,statsWindowToday:`今天`,statsRefreshPause:`暂停自动刷新`,statsRefreshResume:`恢复自动刷新`,statsRefreshAuto:`每 30 秒刷新 · 点击暂停`,statsRefreshPaused:`自动刷新已暂停 · 点击恢复`,statsDragHint:`拖选时间段查看日志`,statsWindowHint:`{window}窗口`,statsTraffic:`流量`,statsTrafficHint:`所选时间窗口内的已完成聊天请求`,statsEmptyTraffic:`这个时间窗口还没有请求。`,statsLatencyP50:`p50`,statsLatencyP95:`p95`,statsLatencyAvg:`平均`,statsTTFB:`TTFB`,statsPool:`账号池`,statsPoolHint:`就绪 worker 与剩余额度`,statsCooling:`冷却中`,statsCoolingChip:`{count} 冷却`,statsPoolReadyEmpty:`暂无就绪 worker — 可展开上方冷却或前往账号页。`,statsTopModels:`热门模型`,statsTopAccounts:`热门账号`,statsTopProviders:`供应商`,statsTopProvidersHint:`按账号类型统计请求量`,statsNoProviders:`还没有供应商流量。`,statsErrorMix:`错误构成`,statsStatusMix:`结果与错误`,statsStatusMixHint:`请求状态、失败类型与热门账号`,statsCoolingDetails:`冷却中 · 原因 · 剩余 · 退避`,statsBackoffLevel:`重启退避等级`,statsAffinityHit:`会话亲和命中`,statsAffinityHint:`命中 {hits} · 未命中 {misses} · 绑定 {bindings}`,metricCacheHit:`缓存命中率`,metricCacheHitDetail:`缓存 {read} / 输入 {prompt}`,metricStreaming:`流式占比`,metricStreamingDetail:`{total} 次请求中 {count} 次`,metricCanceled:`已取消`,metricCanceledDetail:`占请求 {rate}`,statsErrorMixHint:`该窗口内已分类的失败`,statsNoModels:`还没有模型流量。`,statsNoAccounts:`还没有账号流量。`,statsNoErrors:`没有分类错误。`,statsUnknown:`未知`,statsUnassigned:`未分配`,resTitle:`资源占用`,resHint:`主机进程内存与 CPU`,resServer:`主进程`,resWorkers:`Worker`,resEmpty:`还没有 worker 进程。`,resGoroutines:`个协程`,resCpuLifetime:`生命周期均值`,failedStats:`加载统计失败:{msg}`,homeNote:`已登录本机控制台。账号登录在「账号」页。`,metricRuntime:`运行状态`,metricAccounts:`账号`,metricModels:`模型`,metricAuth:`登录态`,metricPort:`端口`,serviceDetail:`服务详情`,endpoints:`可用端点`,copyBaseUrl:`复制 Base URL`,copied:`已复制`,copy:`复制`,open:`打开`,waitingOverview:`等待概览数据…`,signIn:`登录`,connectQoder:`连接账号`,rewarm:`Rewarm`,rewarming:`Rewarm 中`,refreshAccount:`刷新`,refreshingAccount:`刷新中`,stepBrowserTitle:`浏览器 Device Flow`,stepBrowserDesc:`打开账号选择页。浏览器完成授权后,本页会轮询直到会话就绪。`,startBrowserLogin:`用浏览器登录`,starting:`启动中…`,quotaLoading:`额度获取中…`,quotaUnavailable:`额度不可用`,authUrl:`授权链接`,openAuthUrl:`打开链接`,stepPatTitle:`个人访问令牌`,stepPatDesc:`浏览器流程不方便时,可用 PAT 作为备选。`,pat:`PAT`,pasteToken:`粘贴 token`,loginWithPat:`使用 PAT 登录`,loggingIn:`登录中…`,localState:`本地状态`,raw:`原始数据`,noAuthSnapshot:`暂无授权快照。`,catalog:`目录`,availableModels:`可用模型`,modelsPulled:`来源`,filter:`筛选`,filterPh:`glm / qwen / deepseek`,providerFilterAll:`全部供应商`,accountStatusFilter:`账号状态`,connection:`连接信息`,apiPlayground:`接入与调试`,apiPlaygroundHint:`选择账号与模型。顶部切换「聊天 / 原始 API」;原始 API 含 JSON 与 curl。`,readyAccounts:`{ready} / {total} 个账号就绪`,baseUrl:`Base URL`,externalClients:`外部客户端`,protocol:`协议`,quickTest:`快速测试`,requestBuilder:`请求编排`,responseInspector:`响应检查`,responseInspectorHint:`本地代理返回的原始 JSON`,requestIdle:`等待请求`,requestComplete:`请求完成`,requestFailed:`请求失败`,responseReceived:`已收到响应`,responseEmptyTitle:`还没有响应`,responseEmptyHint:`选择路由、填写提示词并发送请求,原始响应会显示在这里。`,sendRequest:`发送请求`,promptPlaceholder:`输入要发送给模型的内容`,promptHelper:`测试请求使用非流式 Chat Completions。`,accessTabChat:`聊天`,accessTabApi:`原始 API`,accessTabsLabel:`接入方式`,chatTryEmptyTitle:`还没有回复`,chatTryEmptyHint:`在下方输入消息。账号与模型在输入框底栏。离开页面后会话清空。`,chatTryHelper:`Enter 发送 · Shift+Enter 换行`,chatTrySend:`发送`,chatTryStop:`停止`,chatTryStreaming:`生成中…`,chatTryUserLabel:`你`,chatTryAssistantLabel:`助手`,chatTryCreditsUsed:`消耗 {amount} credits`,chatTryUsageTokens:`{prompt} → {completion}`,chatTryUsageFoot:`{tokens} · {amount} credits`,chatHistoryTitle:`历史`,chatHistoryNew:`新对话`,chatHistoryEmpty:`还没有对话`,chatHistoryUntitled:`未命名`,chatHistoryExpand:`展开历史`,chatHistoryCollapse:`收起历史`,nativeApiHint:`非流式请求、原始 JSON 响应,以及对应的 curl 命令。`,rawFormatLabel:`API 格式`,rawFormatChat:`Chat`,rawFormatMessages:`Messages`,rawFormatResponses:`Responses`,rawFormatHint:`支持 Chat Completions、Anthropic Messages 与 OpenAI Responses 三种格式。`,rawApiShow:`展开原始 API`,rawApiHide:`收起原始 API`,chatAttach:`添加附件`,chatAttachRemove:`移除附件`,chatAttachUnsupported:`不支持的文件类型:{names}`,thinkingPhaseScan:`检索中`,thinkingPhasePlan:`规划中`,thinkingPhaseDraft:`起草中`,thinkingDone:`已思考`,thinkingElapsed:`{n}s`,toolCallGroup:`用了 {n} 个工具`,chatDemoLoad:`预览样例`,thinkingChars:`{count} 字`,thinkingWorking:`思考中`,toolCallRunning:`进行中`,toolCallSuccess:`完成`,toolCallError:`失败`,toolCallUntitled:`工具`,toolCallArgs:`参数`,toolCallArgsEmpty:`(空)`,autoAccountHint:`由调度器选择一个可用账号。`,fixedAccountHint:`本次请求固定发送到所选账号。`,modelRoutingHint:`使用当前代理暴露的公开模型 ID。`,accountModelHint:`只列出该账号当前能提供的模型。钉死账号后,目录里没有的 ID 会请求失败。`,noAccountModels:`这个账号目前没有可发送的模型。`,accountModels:`可用模型`,accountModelsTitle:`{name} 的模型`,accountModelsHint:`该账号的实时目录。钉到此账号的请求只会使用这些 ID。`,accountModelsEmpty:`这个账号还没有公布模型目录。`,accountModelsError:`无法加载模型:{msg}`,noAccountsForTest:`暂无可用账号运行时,请先添加账号并完成登录。`,curlGeneratedHint:`根据当前账号、模型和提示词实时生成`,prompt:`提示词`,model:`模型`,send:`发送`,waitingRequest:`等待请求…`,requesting:`请求中…`,endpointOpenAI:`OpenAI 兼容`,endpointChat:`Chat Completions`,endpointBaseHint:`在 OpenAI 兼容客户端中,将此地址作为 Base URL。`,endpointChatHint:`OpenAI 兼容对话。模型 ID 加前缀即可指定供应商,例如 qoder/glm-5.2。`,endpointMessages:`Anthropic Messages`,endpointMessagesHint:`无状态 Anthropic Messages。使用带供应商前缀的模型 ID 即可钉死一家。`,endpointResponses:`OpenAI Responses`,endpointResponsesHint:`无状态 OpenAI Responses。使用带供应商前缀的模型 ID 即可钉死一家。`,endpointModels:`模型列表`,endpointModelsHint:`公开模型 ID。客户端 API 密钥只会看到其允许供应商的模型。`,endpointHealth:`健康检查`,endpointHealthHint:`检查本地代理是否正在响应。`,endpointCount:`{count} 个 API 端点`,endpointReady:`当前可用`,endpointBaseLabel:`客户端 Base URL`,endpointAuthLabel:`Bearer API Key`,hasUserBlob:`已有 user blob`,userBlobBytes:`user blob 大小`,machineId:`Machine ID`,sessionHot:`会话热状态`,upstreamEndpoint:`上游端点`,rewarmCount:`Rewarm 次数`,proxy:`Proxy`,endpoint:`端点`,lastError:`最近错误`,running:`运行中`,down:`离线`,hot:`热就绪`,up:`在线`,ready:`就绪`,missing:`缺失`,degraded:`降级`,error:`错误`,yes:`是`,no:`否`,modelCol:`模型`,mappedKeyCol:`上游 Key`,requestIdCol:`请求 ID`,providerCol:`供应商`,qoderKeyCol:`上游 Key`,routedTo:`上游模型 {model}`,stateCol:`状态`,contextWindowCol:`上下文窗口`,modelDefaultsCol:`上下文与推理`,contextConfigHint:`这里改的是默认值。请求里如果指定了更大上下文或推理强度,仍以请求为准。`,qoderContextHint:`请求没写上下文长度时使用的默认窗口。`,contextInvalid:`上下文窗口必须是 1,024 到 4,000,000 之间的整数。`,contextSaved:`已保存 {model} 的上下文窗口。`,contextReset:`已恢复 {model} 的默认上下文窗口。`,contextMaxOn:`已开启 {model} 的更大上下文。`,contextMaxOff:`已关闭 {model} 的更大上下文。`,contextMaxUnavailable:`这个模型没有更大上下文开关。`,maxMode:`更大上下文`,maxModeHint:`Trae 的更大上下文窗口,常见是 200k 提到 1M,不是套餐也不是额度。只在请求没带 is_max_mode 时使用;请求里写了仍以请求为准。模型不支持时不会发送这个开关。`,qoderMaxModeHint:`Qoder 的更大上下文窗口,不是套餐也不是额度。开启时请求使用该模型的最大窗口;关闭时(或请求自带上下文窗口时)使用默认窗口。`,catalogWindow:`目录默认窗口`,catalogWindowHint:`这个 Trae 模型没有更大上下文开关,数字是目录里的默认窗口。`,workbuddyContextHint:`WorkBuddy 桌面端目录里的默认窗口和可选窗口,用于本地压缩预算,不是 Trae 的 is_max_mode。聊天请求不会发送窗口开关。`,reasoningLevels:`推理强度`,reasoningHint:`请求没指定推理强度时使用的默认档位。选了不会强制每次都走这一档,也不会限制客户端改用其他允许档位。不在列表里的值会回退到可用档位,而不是锁死。`,reasoningFixed:`固定思考:{type}`,noReasoningLevels:`这个模型没有可选的推理档位。`,reasoningSaved:`已保存 {model} 的默认推理强度:{level}。`,reasoningLevel_none:`关闭`,reasoningLevel_low:`低`,reasoningLevel_medium:`中`,reasoningLevel_high:`高`,reasoningLevel_xhigh:`极高`,reasoningLevel_max:`最强推理`,modelDetails:`详情`,promptMaxTokens:`输入上限`,maxOutputTokens:`输出上限`,actions:`操作`,save:`保存`,custom:`自定义`,defaultValue:`默认`,resetDefault:`恢复默认`,fallback:`回退`,modelFree:`免费`,shownTotal:`显示 {shown} / 共 {total}`,noModelsYet:`暂无模型`,noModelsMatch:`没有匹配的模型。`,noProviders:`尚未加载供应商。`,failedOverview:`概览加载失败:{msg}`,pastePatFirst:`请先粘贴 PAT`,patDone:`PAT 登录完成`,loginOpenMsg:`请在浏览器打开授权链接完成登录`,idle:`空闲`,menu:`菜单`,toggleSidebar:`收起侧栏`,accountsTitle:`账号`,accountsDesc:`一个账号一个登录态。Chat 会 round-robin,失败切下一个。`,noAccounts:`还没有账号,添加一个即可开始服务。`,accountCount:`账号`,signedIn:`已登录`,enabledAccounts:`已启用`,availableAccounts:`可用`,needsAttention:`需处理`,searchAccounts:`搜索名称、账号 ID、UID、提供方或认证类型`,filterAll:`全部`,shownAccounts:`{shown} / {total}`,noAccountsMatch:`没有符合当前条件的账号。`,clearFilters:`清除筛选`,more:`更多操作`,partialCooling:`部分模型冷却`,modelCooldowns:`模型冷却`,modelCooldownsTitle:`冷却中的模型`,modelCooldownsEmpty:`当前没有模型在冷却。`,runtimeState:`运行状态`,maxInflight:`最大并发`,priority:`优先级`,updatedAt:`更新于`,enabledState:`已启用`,cooling:`冷却中`,dead:`恢复中`,authFailed:`登录失败`,patFallback:`PAT 备选`,usePat:`用 PAT`,account:`账号`,autoAccount:`自动(轮询)`,cooldown:`冷却`,inFlight:`进行中`,liveConcurrency:`当前并发`,liveRpm:`近 60 秒`,liveRpmUnit:`次`,liveRpmHint:`最近一分钟发起`,liveTrace:`走势`,livePeak:`峰值 {n}`,liveSaturated:`已满载`,inflightTitle:`实时进行中`,inflightMockBadge:`示意`,inflightIdleBadge:`空闲`,inflightMockToggle:`示意`,inflightMockToggleAria:`无实时数据时显示示意动画`,inflightLiveBadge:`实时`,inflightHint:`槽位 · 进行中 · 冷却`,inflightCardAria:`打开实时详情`,inflightOpen:`查看全部`,inflightExpand:`展开`,inflightExpandFromConcurrency:`展开实时进行中详情`,inflightStickyBindings:`粘性 · {n}`,inflightWaiting:`等待`,inflightRunning:`进行中`,inflightThroughput:`吞吐`,inflightWaitP95:`P95`,inflightQueue:`等待`,inflightQueueEmpty:`暂无`,inflightSlots:`槽位`,inflightSticky:`粘性`,inflightDone:`完成`,inflightFailed:`失败`,inflightDepth:`深度`,inflightDepthHint:`{n}`,inflightRatePill:`限流 · {remain}`,inflightRateBand:`{label} · {remain}`,inflightSlotIdle:`空闲`,inflightSlotPaused:`冷却`,restarts:`重启次数`,dropSystemPrompt:`丢弃系统提示词`,dropSystemPromptHint:`发送前剥离调用方的系统提示词;仍会补一条空的 system,避免国际版要求第一条必须是系统提示词`,dropSystemPromptTraeHint:`默认保留调用方系统提示词。MiMo Code 等客户端会把 JSON 指令放在那里;仅在 Trae 因此拒请求时再打开。`,autoCheckin:`每日签到`,autoCheckinHint:`按账号配置的本地时间自动领取 WorkBuddy 积分;失败会在约 21:00 重试。默认关闭。`,autoCheckinCreateHint:`仅 WorkBuddy。开启后按该账号的签到时间自动领取积分;未改时间时使用系统默认。`,autoCheckinTime:`签到时间`,autoCheckinTimeHint:`使用服务器本地时间,并在所选时间后的约 14 分钟内执行;首次失败会在约 21:00 重试。新建账号默认继承系统设置。`,checkinNow:`立即签到`,checkinAll:`一键签到`,checkinAllEmpty:`没有已启用且支持签到的账号`,checkinAllDone:`{count} 个账号今天都已签到`,toastCheckingInAll:`正在签到 {done}/{total}…`,toastCheckedInAll:`已签到 {checked} 个,跳过 {skipped} 个`,toastCheckedInAllFailed:`已签到 {checked} 个,跳过 {skipped} 个,失败 {failed} 个`,lastCheckin:`最近签到`,lastCheckinNone:`还没有签到记录`,checkinStatus:`签到`,checkinToday:`今日已签到`,checkinPending:`今日未签到`,checkinFailed:`签到异常`,checkinRecords:`签到记录`,checkinRecordsTitle:`签到记录 · {name}`,checkinRecordsHint:`显示该账号最近 20 次签到结果。`,checkinRecordsEmpty:`还没有签到记录`,checkinRecordsCount:`{count} 条记录`,checkinRecordSuccess:`成功`,checkinRecordAlready:`已签到`,checkinRecordFailed:`失败`,checkinTruncated:`信息已截断 · 点复制查看完整错误`,checkinCopyError:`复制完整错误`,refreshCredits:`刷新积分`,expiryDistTitle:`积分到期分布`,expiryDistHint:`按自然日聚合 · 颜色区分账号 · FEFO:上游按失效时刻先后优先扣减`,expiryDistExpand:`展开全部 {n} 天`,expiryDistCollapse:`收起`,expiryDistDayTotal:`到期 {n} 积分`,expiryDistColAccount:`账号`,expiryDistColSoonest:`最近到期`,expiryDistColDaysLeft:`距到期`,expiryDistColBatch:`该日到期`,expiryDistColDaily:`日均需耗`,expiryDistDays:`{n} 天`,expiryDistFoot:`「日均需耗」= 最近到期那天的积分 ÷ 距该日天数,即到期前需要消耗的速度。`,expiryDistExpired:`已过期`,usageColModel:`模型`,quota:`额度`,quotaUsed:`已用`,quotaRemaining:`剩余`,quotaDaily:`日额度`,quotaWeekly:`周额度`,quotaMonthly:`月额度`,quotaFiveHour:`5 小时额度`,quotaWeeklyLimit:`周额度`,quotaPlan:`订阅`,quotaMonthlyLimit:`月额度`,quotaUsedPercent:`{n}%`,quotaResetsSoon:`即将重置`,quotaResetsInMinutes:`{n} 分钟后重置`,quotaResetsInHours:`{n} 小时后重置`,quotaExpiresOn:`{amount}{unit} 将于 {date} 到期`,quotaAddOn:`附加包`,quotaResourcePackage:`资源包`,quotaExceeded:`额度已用尽`,errorKind:`错误类型`,qoderLoginHint:`这里登录的是该账号的上游登录态,不会改控制台密码。`,needQoderLogin:`需要账号登录`,waitingQoderLogin:`等待账号登录完成…`,qoderLoginDone:`账号登录完成`,rewarmDone:`Rewarm 完成`,accountsSigned:`{n} / {total} 个账号就绪`,addAccount:`添加账号`,batchImport:`批量导入`,batchImportLoading:`正在导入账号…`,batchImportUnrecognized:`无法识别此凭证文件格式。`,batchImportConfirmTitle:`确认批量导入`,batchImportConfirmHint:`已从 {file} 识别。请核对后再导入。`,batchImportConfirmHintNoFile:`请核对识别结果,确认后再导入。`,batchImportRegion:`WorkBuddy 区`,batchImportKiroRegion:`Kiro 地区`,batchImportRegionPickHint:`未能明确识别区,请先选择国内版或国际版。`,batchImportKiroRegionPickHint:`未能明确识别地区,请先选择美东或欧洲中部。`,batchImportRegionMixed:`此包同时含国内与国际域名。请拆分后导入,或强制选择一个区。`,batchImportRegionUnknown:`未从域名识别出区,请确认。`,batchImportUnknownFormat:`未知 format 字段,已按形状猜测。`,batchImportProviderUnsupported:`该供应商暂不支持批量导入。识别结果已保留,便于后续扩展。`,batchImportConfirmAction:`导入`,batchImportFormatUnknown:`未知格式`,batchImportProviderUnknown:`未知供应商`,accountName:`账号名称`,accountNameRequired:`请输入账号名称。`,accountCreated:`账号已创建,会话正在启动。`,importCredential:`导入原生凭证`,accountImported:`凭证已导入,运行时已启动。`,accountImportBatch:`已导入 {n} 个账号。`,accountImportPartial:`成功 {ok},失败 {fail}。`,credentialCopied:`凭证包已复制。`,addAccountTitle:`添加账号`,accountType:`账号类型`,loginMethod:`登录方式`,accountTypeHint:`选择这个隔离运行时使用的上游登录类型。`,accountTypeQoderGlobal:`Qoder 国际版`,accountTypeQoderGlobalHint:`Qoder 国际版:浏览器、PAT 或导入凭证`,accountTypeQoderCN:`Qoder 国内版`,accountTypeQoderCNHint:`Qoder 中国大陆版:浏览器、PAT 或导入凭证`,accountTypeWorkBuddyCN:`WorkBuddy 国内版`,accountTypeWorkBuddyCNHint:`CodeBuddy 国内版:浏览器登录或导入凭证`,accountTypeWorkBuddyGlobal:`WorkBuddy 国际版`,accountTypeWorkBuddyGlobalHint:`WorkBuddy 国际版:浏览器登录或导入凭证`,accountTypeTraeCN:`Trae 国内版(Solo)`,accountTypeTraeCNHint:`Trae 国内 Solo:浏览器登录或导入凭证`,accountTypeDevinGlobal:`Devin(实验性)`,accountTypeDevinGlobalHint:`实验性 Devin 国际版:浏览器 OAuth 或导入 session token`,accountTypeCommandGlobal:`Command Code`,accountTypeCommandGlobalHint:`粘贴 user_… 密钥接入。走 CLI 的 /alpha/generate 协议,所有档位均可用(含 $1 Go 套餐)。`,accountTypeCodexGlobal:`Codex`,accountTypeCodexGlobalHint:`OpenAI Codex:Codex CLI OAuth、Sign in with ChatGPT,或导入凭证`,accountTypeZhipuCN:`智谱 GLM`,accountTypeZhipuCNHint:`填写智谱 API Key。按量付费或 Coding Plan 与上游账号的计费方式一致。`,accountTypeQwenworkGlobal:`QwenWork 国际版`,accountTypeQwenworkGlobalHint:`QwenWork 国际版(qwenwork.ai),浏览器授权或导入凭证。授权链接只能使用一次:请在已登录目标账号的浏览器窗口里直接打开,不要经聊天工具发送。`,accountTypeQwenworkCN:`千问办公 国内版`,accountTypeQwenworkCNHint:`千问办公国内版(qwenwork.cn),浏览器授权或导入凭证。授权链接只能使用一次:请在已登录目标账号的浏览器窗口里直接打开,不要经聊天工具发送。国内版尚未经真实账号验收。`,accountTypeKimiCN:`Kimi Code 国内版`,accountTypeKimiCNHint:`Kimi Code 中国区订阅,走 auth.kimi.com 的设备码授权,与官方 CLI 使用同一个 OAuth 客户端。已在本机登录 Kimi Code 的,可直接粘贴它的凭证 JSON 导入。`,accountTypeCodeArtsCN:`CodeArts(码道)`,accountTypeCodeArtsCNHint:`华为云码道,走 codearts.huaweicloud.com 的 OAuth PKCE 授权。控制台打开授权页;浏览器回不到本机时,也可以粘贴 127.0.0.1 回调地址完成登录。`,accountTypeKiroUS:`Kiro(美东)`,accountTypeKiroUSHint:`个人 Kiro 登录。粘贴 Builder ID、Identity Center 或社交登录的凭证 JSON,也可以粘贴 ksk_ 密钥。聊天走 us-east-1 的 Kiro 运行时。实验性接入。`,accountTypeKiroEU:`Kiro(欧洲中部)`,accountTypeKiroEUHint:`个人 Kiro 登录,走 eu-central-1 运行时。凭证格式与美东相同。实验性接入。`,accountTypeMetaGlobal:`Muse (Meta)`,accountTypeMetaGlobalHint:`Meta Muse Code 订阅,走 auth.meta.com 的设备码授权;批准后控制台会在 api.meta.ai 兑换 LLM API Key。也可在 PAT 页粘贴 Meta Model API Key。`,providerGroupSubscriptions:`稳定订阅`,providerGroupSubscriptionsHint:`稳定的账号登录源`,providerGroupExperimental:`实验性`,providerGroupExperimentalHint:`早期适配器`,providerFindPlaceholder:`查找登录源...`,providerFindEmpty:`没有符合搜索的登录源。`,caiaiSoftLink:`不想自托管?用托管 Gateway → CaiAI`,addAccountDesc:`创建一个隔离会话并登录。每个账号使用独立的运行时目录。`,tabBrowser:`浏览器登录`,tabPat:`PAT`,tabImport:`导入凭证`,recommended:`推荐`,wizardSettings:`账号设置`,wizardAdvanced:`高级选项`,wizardContinue:`继续`,wizardBack:`返回`,wizardSettingsHint:`登录前先设好这些选项,之后仍可在账号卡片上点编辑修改。`,editAccount:`编辑`,editAccountTitle:`编辑 {name}`,editAccountHint:`修改显示名称、并发、调度优先级、代理出口和模型别名;支持签到的账号还可设置签到时间。`,accountModelAliases:`别名`,accountModelAliasesHint:`这个账号对外应答的名字。选中这个账号后,请求会换成它自己的真实模型。`,accountModelAliasTargetPlaceholder:`这个账号上的真实模型`,modelAliasName:`外号`,modelAliasTarget:`真实模型`,modelAliasAdd:`添加`,modelAliasRemove:`移除`,modelAliasPlaceholder:`kimi-k3`,enabledModels:`可用模型`,enabledModelsHint:`不限制时使用整个目录。限制后,这个账号只接选中的模型。`,restrictModels:`仅选中`,allModels:`全部模型`,modelPickerSearch:`搜索模型`,modelPickerCount:`已选 {selected} / 共 {total}`,modelPickerSelectAll:`全选`,modelPickerClear:`清空`,modelPickerOffline:`已下线`,modelPickerRemove:`移除 {model}`,modelPickerNoMatch:`没有匹配的模型。`,maxInflightInvalid:`并发必须是 1 到 32 之间的整数。`,priorityInvalid:`优先级必须是 1 到 100 之间的整数。`,wizardNamePh:`账号名称`,maxInflightHint:`这个账号同时能跑多少条对话。之后改并发会重启该账号的 worker。`,priorityHint:`数字越大,之后调度会越优先选这个账号。默认 50。`,proxyUrl:`代理地址`,proxyUrlPlaceholder:`http://127.0.0.1:7890、direct`,proxyUrlHint:`留空继承全局代理;填写 direct 或 none 可让此账号直连。Qoder 仅支持 HTTP(S),WorkBuddy/Trae 额外支持 SOCKS5。`,proxySettingsTitle:`统一代理出口`,proxySettingsHint:`设置所有上游请求的默认代理;全局代理支持 HTTP(S),SOCKS5 仅支持 WorkBuddy/Trae 的账号级代理;账号级代理优先于全局代理。`,dropSystemPromptCreateHint:`仅 WorkBuddy。剥离调用方系统提示词后仍补一条空的 system,避免国际版拒绝请求。`,wizardBrowserLead:`会展示授权地址。打开或复制后在浏览器完成授权,向导会自动继续。`,wizardCodexBrowserLead:`先选 Codex CLI 或 Sign in with ChatGPT,再打开授权地址。ChatGPT 网页登录必须走后者,CLI 流刷新不了那种 token。`,codexLoginMethod:`Codex 登录方式`,codexLoginCli:`Codex CLI`,codexLoginCliHint:`官方 Codex CLI OAuth,适合 CLI 签发的凭证。`,codexLoginChatGPT:`Sign in with ChatGPT`,codexLoginChatGPTHint:`ChatGPT 网页登录。凭证单独存储,刷新走另一套 token 端点。`,kiroLoginMethod:`Kiro 登录方式`,kiroLoginBuilder:`Builder ID`,kiroLoginBuilderHint:`设备码。打开链接并确认,这个页面会自己完成。`,kiroLoginIDC:`Identity Center`,kiroLoginIDCHint:`组织门户。先粘贴 start URL,再在浏览器里确认。`,kiroLoginSSO:`SSO 令牌`,kiroLoginSSOHint:`粘贴门户的 SSO bearer。只用来换凭证,不会保存。`,kiroLoginMicrosoft:`Microsoft`,kiroLoginMicrosoftHint:`企业 SSO。浏览器每次跳到 localhost 时,把回调地址粘过来。`,kiroIDCStartURL:`Identity Center start URL`,kiroIDCStartURLPh:`https://example.awsapps.com/start`,startCodexCliLogin:`开始 Codex CLI 登录`,startCodexChatGPTLogin:`Sign in with ChatGPT`,wizardStartBrowser:`开始浏览器登录`,wizardStartingSession:`正在启动账号会话…`,wizardWaitingBrowser:`正在等待浏览器完成授权…`,wizardCallbackLead:`如果浏览器停在 127.0.0.1,而控制台一直没有完成,把地址栏完整 URL 粘贴到这里。`,wizardCallbackPh:`粘贴完整的 http://127.0.0.1…/authorize?… 地址`,wizardSubmitCallback:`提交回调地址`,wizardStartingWorker:`已收到授权,正在启动账号会话…`,wizardAccountReady:`账号已就绪。`,wizardLoginTimeout:`等待浏览器登录超时,可在账号卡片重试。`,wizardPatLead:`浏览器流程不方便时,可用个人访问令牌登录。`,wizardPatLeadCN:`在 qoder.com.cn/account/integrations 创建 PAT,然后粘贴到这里。`,wizardPatLeadCommand:`粘贴你的 Command Code 密钥(形如 user_…,来自 commandcode.ai/settings)。`,zhipuApiKey:`API Key`,zhipuApiKeyPh:`粘贴 open.bigmodel.cn 的密钥`,zhipuAccountMode:`账号类型`,zhipuModePayg:`按量付费`,zhipuModePaygHint:`按 token 计费,走标准 GLM 端点。`,zhipuModeCoding:`Coding Plan`,zhipuModeCodingHint:`编程套餐。走 Coding Plan 端点,并显示套餐额度。`,zhipuOrganization:`组织 ID`,zhipuOrganizationPh:`可选,团队版 Coding Plan 才需要`,zhipuProject:`项目 ID`,zhipuProjectPh:`可选`,zhipuCreate:`添加智谱账号`,zhipuKeyRequired:`请先粘贴智谱 API Key。`,wizardPatPh:`粘贴个人访问令牌`,wizardCreateAndLogin:`创建并登录`,wizardImportLead:`粘贴凭证 JSON。WorkBuddy hub 导出包会一次性导入其中全部账号。Kiro 接受 Builder ID、Identity Center、社交登录或 ksk_ 的 JSON。`,wizardImportPh:`粘贴凭证 JSON`,wizardChooseFile:`选择文件`,wizardBadJson:`这看起来不是有效的凭证包。`,reLogin:`登录`,cancel:`取消`,close:`关闭`,create:`创建`,import:`导入`,export:`导出`,enable:`启用`,disable:`停用`,disabled:`已停用`,delete:`删除`,holdToDelete:`按住删除`,trendHalfHint:`所选时间窗口后半段对比前半段`,toastRefreshingAccount:`正在刷新账号…`,toastAccountRefreshed:`账号已刷新`,toastRefreshingCredits:`正在刷新积分…`,toastCreditsRefreshed:`积分已刷新`,toastCreditsPartiallyRefreshed:`{total} 个账号中有 {failed} 个刷新失败`,toastAccountAdded:`账号已添加`,toastAccountDeleted:`账号已删除`,toastClearingLogs:`正在清空请求日志…`,toastLogsCleared:`请求日志已清空`,toastKeyDeleted:`API Key 已删除`,toastFailed:`操作失败`,deleteAccountConfirm:`确定删除账号 {name} 吗?这会移除它的本地运行时和已保存凭据。`,edit:`编辑`,enabled:`已启用`,keysLead:`客户端密钥只用于 /v1。供应商留空表示全部可用。控制台管理员密钥在系统页。`,keysCreate:`创建密钥`,keysEmpty:`还没有客户端密钥`,keysEmptyHint:`为 OpenAI 兼容客户端创建命名密钥。它不能登录这个控制台。`,keysCreateTitle:`创建 API 密钥`,keysCreateHint:`明文密钥只显示一次,请保存在会调用 /v1 的客户端里。`,keysEditTitle:`编辑 API 密钥`,keysEditHint:`可以改名称、限制它能调度到哪些供应商,或限制它同时能跑多少条对话。`,keysName:`名称`,keysNamePh:`CI 机器人`,keysNameRequired:`请填写名称。`,keysProviders:`供应商`,keysProvidersHint:`可将 Key 限制到特定供应商区域(如国内版 / 国际版)。全部不勾选表示允许所有供应商。`,keysAllProviders:`全部供应商`,keysAllRegions:`全区域`,keysProvidersNotLoaded:`供应商列表仍在加载中。已禁用保存,以保证 Key 权限不会被意外更改。`,keysProvidersLoadFailed:`供应商列表加载失败:{message}`,keysMaxInflight:`最大并发`,keysMaxInflightHint:`这把密钥同时能跑多少条 /v1 对话。0 表示不限制。超出的请求返回 HTTP 429。`,keysMaxInflightInvalid:`并发必须是 0 到 256 之间的整数。`,keysMaxInflightValue:`同时最多 {count} 条`,keysMaxInflightUnlimited:`不限制并发`,keysLastUsed:`最近使用 {time}`,keysNeverUsed:`尚未使用`,keysSecretTitle:`请立刻保存这把密钥`,keysSecretHint:`服务端只存哈希,关闭后无法再查看明文。`,keysSecretOnce:`关闭弹窗前请先复制。`,keysDeleteConfirm:`确定删除 API 密钥 {name} 吗?正在使用它的客户端会立刻失败。`,consoleKeyTitle:`控制台 API 密钥`,consoleKeyHint:`这是登录本控制台的管理员密钥。`,consoleKeyLead:`它可以调用全部供应商,并管理账号、密钥和更新。客户端密钥在「API 密钥」页。`,consoleKeyRotate:`轮换密钥`,consoleKeyRotateHint:`轮换后其他会话会失效,并重启 Qoder worker 以使用新密钥。`,consoleKeyRotateNow:`立即轮换`,consoleKeySecretTitle:`新的控制台密钥`,consoleKeySecretHint:`当前浏览器会话已更新。如果还有客户端在用旧的控制台密钥,请把新值复制过去。`}};function Xoe(e,t,n={}){let r=UF[e]||UF.en,i=UF.en,a=r[t];return a??=i[t],typeof a==`string`?a.replace(/\{(\w+)\}/g,(e,t)=>n[t]==null?`{${t}}`:String(n[t])):t}function Zoe(e,t){return((UF[e]||UF.en).pages||UF.en.pages)[t]||{title:t,desc:``}}var WF=(0,v.createContext)(null);function Qoe({children:e}){let[t,n]=(0,v.useState)(()=>localStorage.getItem(`cli2api_lang`)===`en`?`en`:`zh`),r=(0,v.useMemo)(()=>({lang:t,setLang:e=>{let t=e===`en`?`en`:`zh`;localStorage.setItem(`cli2api_lang`,t),document.documentElement.lang=t===`zh`?`zh-CN`:`en`,n(t)},t:(e,n)=>Xoe(t,e,n),page:e=>Zoe(t,e)}),[t]);return(0,G.jsx)(WF.Provider,{value:r,children:e})}function GF(){let e=(0,v.useContext)(WF);if(!e)throw Error(`useI18n must be used within I18nProvider`);return e}var KF=`cli2api_key`,qF=(0,v.createContext)(null);function $oe({children:e}){let[t,n]=(0,v.useState)(()=>localStorage.getItem(KF)||``),r=(0,v.useMemo)(()=>({apiKey:t,setApiKey:e=>{let t=String(e||``).trim();t?localStorage.setItem(KF,t):localStorage.removeItem(KF),n(t)},signOut:()=>{localStorage.removeItem(KF),n(``)}}),[t]);return(0,G.jsx)(qF.Provider,{value:r,children:e})}function JF(){let e=(0,v.useContext)(qF);if(!e)throw Error(`useApiKey must be used within ApiKeyProvider`);return e}function YF(){return(localStorage.getItem(KF)||``).trim()}var XF=class extends Error{status;code;constructor(e,t,n){super(e),this.name=`ApiError`,this.status=t,this.code=n}};function ZF(e){if(e instanceof XF)return e.status===401||e.code===`invalid_api_key`;let t=e instanceof Error?e.message:String(e||``);return/invalid_api_key|unauthorized|Missing\/invalid API key/i.test(t)}async function QF(e,t={},n){let r=new Headers(t.headers||{});t.body&&!(t.body instanceof FormData)&&!r.has(`Content-Type`)&&r.set(`Content-Type`,`application/json`);let i=(n??YF()).trim();i&&!r.has(`Authorization`)&&r.set(`Authorization`,`Bearer ${i}`);let a=await fetch(e,{...t,headers:r}),o=await a.text(),s;try{s=o?JSON.parse(o):null}catch{s=o}if(!a.ok){let e=typeof s==`string`?s:o,t=/]/i.test(e);throw new XF(s?.error?.message||s?.message||(t?`${a.status} ${a.statusText}`:e||a.statusText),a.status,s?.error?.code)}return s}function ese(e){return QF(`/api/overview/summary`,{},e)}function $F(e=!1){return QF(`/api/accounts?refresh=${e?`1`:`0`}`)}function eI(e,t,n){if(!e)throw Error(`account id required`);let r={};return t&&(r.login_method=t),n&&(r.start_url=n),QF(`/api/accounts/${encodeURIComponent(e)}/login/device`,{method:`POST`,body:JSON.stringify(r)})}function tI(e){if(!e)throw Error(`account id required`);return QF(`/api/accounts/${encodeURIComponent(e)}/login/status`)}function nI(e,t){if(!e)throw Error(`account id required`);return QF(`/api/accounts/${encodeURIComponent(e)}/login/callback`,{method:`POST`,body:JSON.stringify({callback_url:t})})}function rI(e,t){if(!t)throw Error(`account id required`);return QF(`/api/accounts/${encodeURIComponent(t)}/login/pat`,{method:`POST`,body:JSON.stringify({pat:e})})}var tse=3e4,iI=new Map;function aI(e,t){return`${e||`*`}@${t||`merged`}`}function oI(e,t=!1,n,r){let i=new URLSearchParams;t&&i.set(`refresh`,`1`),e&&i.set(`account`,e),n&&i.set(`view`,n),r?.page!=null&&i.set(`page`,String(r.page)),r?.pageSize!=null&&i.set(`page_size`,String(r.pageSize));let a=i.toString();return QF(`/api/models${a?`?${a}`:``}`)}function nse(e,t){let n=aI(e,t),r=iI.get(n);if(r&&Date.now()-r.at(iI.set(n,{data:e,at:Date.now()}),e)).finally(()=>{let e=iI.get(n);e?.pending===i&&iI.set(n,{data:e.data,at:e.at})});return iI.set(n,{data:r?.data||{},at:r?.at||0,pending:i}),i}function sI(e,t,n){let r=aI(e,t);return iI.delete(r),oI(e,!0,t,n).then(e=>(!n?.page&&!n?.pageSize&&iI.set(r,{data:e,at:Date.now()}),e))}function rse(e,t,n,r){return QF(`/api/models/${encodeURIComponent(e)}/${encodeURIComponent(t)}`,{method:`PATCH`,body:JSON.stringify(e===`qoder`&&n&&r?{max_mode:n,context_length:r}:{max_mode:n})})}function ise(e,t,n){return QF(`/api/models/${e}/${encodeURIComponent(t)}`,{method:`PATCH`,body:JSON.stringify({reasoning_effort:n})})}function ase(e,t){if(!e)throw Error(`account id required`);let n=t?.quota?`?quota=1`:``;return QF(`/api/accounts/${encodeURIComponent(e)}/refresh${n}`,{method:`POST`,body:`{}`})}function ose(e,t,n){let r=n||`只回复OK`;return e===`responses`?{model:t,input:r,stream:!1}:e===`messages`?{model:t,max_tokens:1024,stream:!1,messages:[{role:`user`,content:r}]}:{model:t,stream:!1,messages:[{role:`user`,content:r}]}}function sse(e,t,n){let r={};return n&&(r[`X-Qoder-Account`]=n),QF(e,{method:`POST`,headers:r,body:JSON.stringify(t)})}function cse(e,t){if(!Array.isArray(t))return e;let n=e.map(e=>({...e,function:e.function?{...e.function}:void 0}));for(let e of t){if(!e||typeof e!=`object`)continue;let t=e,r=typeof t.index==`number`?t.index:n.length;for(;n.length<=r;)n.push({index:n.length,function:{name:``,arguments:``}});let i=n[r];i.index=r,typeof t.id==`string`&&t.id&&(i.id=t.id),typeof t.type==`string`&&t.type&&(i.type=t.type);let a=t.function;if(a&&typeof a==`object`){let e=a;i.function||={name:``,arguments:``},typeof e.name==`string`&&e.name&&(i.function.name=e.name),typeof e.arguments==`string`&&e.arguments&&(i.function.arguments=(i.function.arguments||``)+e.arguments)}}return n}function lse(e){return typeof e==`string`?[{role:`user`,content:e}]:e}async function use(e,t,n,r={}){let i={"Content-Type":`application/json`};n&&(i[`X-Qoder-Account`]=n);let a=YF().trim();a&&(i.Authorization=`Bearer ${a}`);let o=lse(t),s=await fetch(`/api/chat`,{method:`POST`,headers:i,body:JSON.stringify({model:e,stream:!0,messages:o}),signal:r.signal});if(!s.ok){let e=await s.text(),t;try{t=e?JSON.parse(e):null}catch{t=e}let n=typeof t==`string`?t:e,r=/]/i.test(n);throw new XF(t?.error?.message||t?.message||(r?`${s.status} ${s.statusText}`:n||s.statusText),s.status,t?.error?.code)}let c=s.body?.getReader();if(!c)throw Error(`No response body`);let l=new TextDecoder,u=``,d=``,f=``,p=[],m=e=>{for(let t of[`credits`,`credit`,`consumed_credits`,`ConsumedCredits`]){let n=e[t];if(typeof n==`number`&&Number.isFinite(n))return n}},h=e=>{let t=e.trim();if(!t.startsWith(`data:`))return!1;let n=t.slice(5).trim();if(!n)return!1;if(n===`[DONE]`)return!0;try{let e=JSON.parse(n),t=e?.usage;if(t&&typeof t==`object`){let e=t,n={prompt_tokens:typeof e.prompt_tokens==`number`?e.prompt_tokens:void 0,completion_tokens:typeof e.completion_tokens==`number`?e.completion_tokens:void 0,total_tokens:typeof e.total_tokens==`number`?e.total_tokens:void 0,credits:m(e),source:typeof e.source==`string`?e.source:void 0};r.onUsage?.(n)}let i=e?.choices?.[0]?.delta;if(!i||typeof i!=`object`)return!1;let a=i.content;typeof a==`string`&&a&&(d+=a,r.onContent?.(a,d));let o=i.reasoning_content;typeof o==`string`&&o&&(f+=o,r.onReasoning?.(o,f)),i.tool_calls&&(p=cse(p,i.tool_calls),r.onToolCalls?.(p))}catch{}return!1};for(;;){let{done:e,value:t}=await c.read();if(e)break;u+=l.decode(t,{stream:!0});let n=u.split(` +}`,document.head.prepend(i);let o=e=>{if(!(e.touches.length===2||n)){if(!t||t===document.documentElement||t===document.body){e.preventDefault();return}t.scrollHeight===t.clientHeight&&t.scrollWidth===t.clientWidth&&e.preventDefault()}},s=e=>{let t=U(e),n=e.relatedTarget;n&&uc(n)?(n.focus({preventScroll:!0}),_g(n,uc(t))):n||(t.parentElement?.closest(`[tabindex]`))?.focus({preventScroll:!0})},c=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(e){let t=Os(),n=t!=null&&uc(t);c.call(this,{...e,preventScroll:!0}),(!e||!e.preventScroll)&&_g(this,n)};let l=_s(gg(document,`touchstart`,r,{passive:!1,capture:!0}),gg(document,`touchmove`,o,{passive:!1,capture:!0}),gg(document,`blur`,s,!0));return()=>{e(),l(),i.remove(),HTMLElement.prototype.focus=c}}function hg(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function gg(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function _g(e,t){t||!dg?vg(e):dg.addEventListener(`resize`,()=>vg(e),{once:!0})}function vg(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let e=oc(n);if(e!==document.documentElement&&e!==document.body&&e!==n){let t=e.getBoundingClientRect(),r=n.getBoundingClientRect();if(r.topt.top+n.clientHeight){let n=t.bottom;dg&&(n=Math.min(n,dg.offsetTop+dg.height));let i=r.top-t.top-((n-t.top)/2-r.height/2);e.scrollTo({top:Math.max(0,Math.min(e.scrollHeight-e.clientHeight,e.scrollTop+i)),behavior:`smooth`})}}n=e.parentElement}}function ote(e,t){let{triggerRef:n,popoverRef:r,groupRef:i,isNonModal:a,isKeyboardDismissDisabled:o,shouldCloseOnInteractOutside:s,...c}=e,l=c.trigger===`SubmenuTrigger`,{overlayProps:u,underlayProps:d}=ug({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!a||l,isKeyboardDismissDisabled:o,shouldCloseOnInteractOutside:s},i??r),{overlayProps:f,arrowProps:p,placement:m,triggerAnchorPoint:h}=Vh({...c,targetRef:n,overlayRef:r,isOpen:t.isOpen,onClose:a&&!l?t.close:null,getTargetRect:c.getTargetRect??(t.point?()=>new DOMRect(t.point.x,t.point.y,0,0):void 0)});mg({isDisabled:a||!t.isOpen}),(0,v.useEffect)(()=>{if(t.isOpen&&r.current)return a?Iee(i?.current??r.current):wh([i?.current??r.current],{shouldUseInert:!0})},[a,t.isOpen,r,i]);let{focusWithinProps:g}=Wm(e);return{popoverProps:W(u,f,g),arrowProps:p,underlayProps:d,placement:m,triggerAnchorPoint:h}}var yg={};yg={dismiss:`تجاهل`};var bg={};bg={dismiss:`Отхвърляне`};var xg={};xg={dismiss:`Odstranit`};var Sg={};Sg={dismiss:`Luk`};var Cg={};Cg={dismiss:`Schließen`};var wg={};wg={dismiss:`Απόρριψη`};var Tg={};Tg={dismiss:`Dismiss`};var Eg={};Eg={dismiss:`Descartar`};var Dg={};Dg={dismiss:`Lõpeta`};var Og={};Og={dismiss:`Hylkää`};var kg={};kg={dismiss:`Rejeter`};var Ag={};Ag={dismiss:`התעלם`};var jg={};jg={dismiss:`Odbaci`};var Mg={};Mg={dismiss:`Elutasítás`};var Ng={};Ng={dismiss:`Ignora`};var Pg={};Pg={dismiss:`閉じる`};var Fg={};Fg={dismiss:`무시`};var Ig={};Ig={dismiss:`Atmesti`};var Lg={};Lg={dismiss:`Nerādīt`};var Rg={};Rg={dismiss:`Lukk`};var zg={};zg={dismiss:`Negeren`};var Bg={};Bg={dismiss:`Zignoruj`};var Vg={};Vg={dismiss:`Descartar`};var Hg={};Hg={dismiss:`Dispensar`};var Ug={};Ug={dismiss:`Revocare`};var Wg={};Wg={dismiss:`Пропустить`};var Gg={};Gg={dismiss:`Zrušiť`};var Kg={};Kg={dismiss:`Opusti`};var qg={};qg={dismiss:`Odbaci`};var Jg={};Jg={dismiss:`Avvisa`};var Yg={};Yg={dismiss:`Kapat`};var Xg={};Xg={dismiss:`Скасувати`};var Zg={};Zg={dismiss:`取消`};var Qg={};Qg={dismiss:`關閉`};var $g={};$g={"ar-AE":yg,"bg-BG":bg,"cs-CZ":xg,"da-DK":Sg,"de-DE":Cg,"el-GR":wg,"en-US":Tg,"es-ES":Eg,"et-EE":Dg,"fi-FI":Og,"fr-FR":kg,"he-IL":Ag,"hr-HR":jg,"hu-HU":Mg,"it-IT":Ng,"ja-JP":Pg,"ko-KR":Fg,"lt-LT":Ig,"lv-LV":Lg,"nb-NO":Rg,"nl-NL":zg,"pl-PL":Bg,"pt-BR":Vg,"pt-PT":Hg,"ro-RO":Ug,"ru-RU":Wg,"sk-SK":Gg,"sl-SI":Kg,"sr-SP":qg,"sv-SE":Jg,"tr-TR":Yg,"uk-UA":Xg,"zh-CN":Zg,"zh-TW":Qg};var ste=Symbol.for(`react-aria.i18n.locale`),cte=Symbol.for(`react-aria.i18n.strings`),e_=void 0,t_=class e{constructor(e,t=`en-US`){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}getStringForLocale(e,t){let n=this.getStringsForLocale(t)[e];if(!n)throw Error(`Could not find intl message ${e} in ${t} locale`);return n}getStringsForLocale(e){let t=this.strings[e];return t||(t=lte(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(t){if(typeof window>`u`)return null;let n=window[ste];if(e_===void 0){let t=window[cte];if(!t)return null;e_={};for(let r in t)e_[r]=new e({[n]:t[r]},n)}let r=e_?.[t];if(!r)throw Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}};function lte(e,t,n=`en-US`){if(t[e])return t[e];let r=ute(e),i=dte(e);if(i&&t[`${r}-${i}`])return t[`${r}-${i}`];if(t[r])return t[r];for(let e in t)if(e.startsWith(r+`-`))return t[e];return t[n]}function ute(e){return Intl.Locale?new Intl.Locale(e).language:e.split(`-`)[0]}function dte(e){if(Intl.Locale)return new Intl.Locale(e).script}var n_=new Map,r_=new Map,i_=class{constructor(e,t){this.locale=e,this.strings=t}format(e,t){let n=this.strings.getStringForLocale(e,this.locale);return typeof n==`function`?n(t,this):n}plural(e,t,n=`cardinal`){let r=t[`=`+e];if(r)return typeof r==`function`?r():r;let i=this.locale+`:`+n,a=n_.get(i);return a||(a=new Intl.PluralRules(this.locale,{type:n}),n_.set(i,a)),r=t[a.select(e)]||t.other,typeof r==`function`?r():r}number(e){let t=r_.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),r_.set(this.locale,t)),t.format(e)}select(e,t){let n=e[t]||e.other;return typeof n==`function`?n():n}},a_=new WeakMap;function fte(e){let t=a_.get(e);return t||(t=new t_(e),a_.set(e,t)),t}function o_(e,t){return t&&t_.getGlobalDictionaryForPackage(t)||fte(e)}function s_(e,t){let{locale:n}=bp(),r=o_(e,t);return(0,v.useMemo)(()=>new i_(n,r),[n,r])}var c_={border:0,clip:`rect(0 0 0 0)`,clipPath:`inset(50%)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,width:`1px`,whiteSpace:`nowrap`};function l_(e={}){let{style:t,isFocusable:n}=e,[r,i]=(0,v.useState)(!1),{focusWithinProps:a}=Wm({isDisabled:!n,onFocusWithinChange:e=>i(e)}),o=(0,v.useMemo)(()=>r?t:t?{...c_,...t}:c_,[r]);return{visuallyHiddenProps:{...a,style:o}}}function u_(e){let{children:t,elementType:n=`div`,isFocusable:r,style:i,...a}=e,{visuallyHiddenProps:o}=l_(e);return v.createElement(n,W(a,o),t)}function pte(e){return e&&e.__esModule?e.default:e}function d_(e){let{onDismiss:t,...n}=e,r=Xs(n,s_(pte($g),`@react-aria/overlays`).format(`dismiss`)),i=()=>{t&&t()};return v.createElement(u_,null,v.createElement(`button`,{...r,tabIndex:-1,onClick:i,style:{width:1,height:1}}))}var f_=v.forwardRef(({children:e,...t},n)=>{let r=(0,v.useRef)(!1),i=(0,v.useContext)(Am),a=W(i||{},{...t,register(){r.current=!0,i&&i.register()}});return a.ref=Zs(n||i?.ref),ic(i,a.ref),(0,v.useEffect)(()=>{r.current||=!0},[]),v.createElement(Am.Provider,{value:a},e)});function mte({children:e}){let t=(0,v.useMemo)(()=>({register:()=>{}}),[]);return v.createElement(Am.Provider,{value:t},e)}var hte=(0,v.createContext)({});function p_(){return(0,v.useContext)(hte)??{}}var m_=v.createContext(null);function h_(e){let t=cs(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[i,a]=(0,v.useState)(!1),o=(0,v.useMemo)(()=>({contain:i,setContain:a}),[i,a]),{getContainer:s}=p_();if(!e.portalContainer&&s&&(n=s()),!n)return null;let c=e.children;return e.disableFocusManagement||(c=v.createElement(Gh,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!r},c)),c=v.createElement(m_.Provider,{value:o},v.createElement(mte,null,v.createElement(Cm.Provider,{value:null},c))),Ec.createPortal(c,n)}function g_(){let e=(0,v.useContext)(m_)?.setContain;Xo(()=>{e?.(!0)},[e])}function __(e){let[t,n]=eh(e.isOpen,e.defaultOpen||!1,e.onOpenChange),[r,i]=(0,v.useState)(null);return{isOpen:t,setOpen:n,open:(0,v.useCallback)(()=>{n(!0)},[n]),close:(0,v.useCallback)(()=>{n(!1)},[n]),toggle:(0,v.useCallback)(()=>{n(!t)},[n,t]),point:r,setPoint:i}}var v_=(0,v.createContext)(null),y_=(0,v.createContext)(null),b_=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,v_);let n=(0,v.useContext)(jb),r=__(e),i=e.isOpen!=null||e.defaultOpen!=null||!n?r:n,a=Oc(t,i.isOpen),o=e.isExiting||!e.shouldSkipAnimation&&a||!1,s=op(),{direction:c}=bp();if(s){let t=e.children;return typeof t==`function`&&(t=t({trigger:e.trigger||null,placement:`bottom`,isEntering:!1,isExiting:!1,defaultChildren:null})),v.createElement(v.Fragment,null,t)}return i&&!i.isOpen&&!o?null:v.createElement(gte,{...e,triggerRef:e.triggerRef,state:i,popoverRef:t,isExiting:o,dir:c})});function gte({state:e,isExiting:t,UNSTABLE_portalContainer:n,clearContexts:r,...i}){let a=(0,v.useRef)(null),o=(0,v.useRef)(null),s=(0,v.useContext)(y_),c=s&&i.trigger===`SubmenuTrigger`,{popoverProps:l,underlayProps:u,arrowProps:d,placement:f,triggerAnchorPoint:p}=ote({...i,offset:i.offset??8,arrowRef:a,groupRef:c?s:o},e),m=i.popoverRef,h=Dc(m,!!f),g=i.isEntering||!i.shouldSkipAnimation&&h||!1,_=Jf({...i,defaultClassName:`react-aria-Popover`,values:{trigger:i.trigger||null,placement:f,isEntering:g,isExiting:t}}),y=!i.isNonModal||i.trigger===`SubmenuTrigger`||i.trigger===`PreviewTrigger`,[b,x]=(0,v.useState)(i.trigger===`PreviewTrigger`);Xo(()=>{m.current&&x(y&&!m.current.querySelector(`[role=dialog]`))},[m,y]),(0,v.useEffect)(()=>{b&&i.trigger!==`PreviewTrigger`&&(i.trigger!==`SubmenuTrigger`||pm()!==`pointer`)&&m.current&&!As(m.current)&&_m(m.current)},[b,m,i.trigger]);let S=(0,v.useMemo)(()=>{let e=_.children;if(r)for(let t of r)e=v.createElement(t.Provider,{value:null},e);return e},[_.children,r]),[C,w]=(0,v.useState)(null),T=(0,v.useCallback)(()=>{i.triggerRef.current&&w(i.triggerRef.current.getBoundingClientRect().width+`px`)},[i.triggerRef]);Xo(T,[T]),rc({ref:_.style?.[`--trigger-width`]?void 0:i.triggerRef,onResize:T});let E={...l.style,"--trigger-anchor-point":p?`${p.x}px ${p.y}px`:void 0,..._.style,"--trigger-width":_.style?.[`--trigger-width`]||C},D=v.createElement(np.div,{...W(Us(i,{global:!0}),l),..._,id:b?i.id:void 0,role:b?`dialog`:void 0,tabIndex:b?-1:void 0,"aria-label":i[`aria-label`],"aria-labelledby":i[`aria-labelledby`],ref:m,slot:i.slot||void 0,style:E,dir:i.dir,"data-trigger":i.trigger,"data-placement":f,"data-entering":g||void 0,"data-exiting":t||void 0},!i.isNonModal&&v.createElement(d_,{onDismiss:e.close}),v.createElement(bh.Provider,{value:{...d,placement:f,ref:a}},S),v.createElement(d_,{onDismiss:e.close}));return c?v.createElement(h_,{...i,shouldContainFocus:b&&i.trigger!==`PreviewTrigger`,isExiting:t,portalContainer:n??s?.current??void 0},D):v.createElement(h_,{...i,shouldContainFocus:b&&i.trigger!==`PreviewTrigger`,isExiting:t,portalContainer:n},!i.isNonModal&&e.isOpen&&v.createElement(`div`,{"data-testid":`underlay`,...u,style:{position:`fixed`,inset:0}}),v.createElement(`div`,{ref:o,style:{display:`contents`}},v.createElement(y_.Provider,{value:o},D)))}var x_=class{constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}},S_=class extends x_{filter(e,t,n){let[r,i]=D_(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}};(class extends x_{static{this.type=`header`}});var C_=class extends x_{static{this.type=`loader`}},w_=class extends S_{static{this.type=`item`}filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}},T_=class extends S_{static{this.type=`section`}filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}},E_=class{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey==null?void 0:this.keyMap.get(this.firstKey);for(;e;)yield e,e=e.nextKey==null?void 0:this.keyMap.get(e.nextKey)}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),r=n?.firstChildKey==null?null:t.get(n.firstChildKey);for(;r;)yield r,r=r.nextKey==null?void 0:t.get(r.nextKey)}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!==`item`&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);return t?.key??null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!==`item`&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey==null?null:this.keyMap.get(this.lastKey);for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw Error(`Not implemented`)}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t.itemCount=this.itemCount,t}addNode(e){if(this.frozen)throw Error(`Cannot add a node to a frozen collection`);e.type===`item`&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,t){this.addNode(e);let n=t.getChildren(e.key);for(let e of n)this.addDescendants(e,t)}removeNode(e){if(this.frozen)throw Error(`Cannot remove a node to a frozen collection`);let t=this.keyMap.get(e);t!=null&&t.type===`item`&&this.itemCount--,this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw Error(`Cannot commit a frozen collection`);this.firstKey=e,this.lastKey=t,this.frozen=!n}filter(e){let t=new this.constructor,[n,r]=D_(this,t,this.firstKey,e);return t?.commit(n,r),t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}};function D_(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey==null?null:e.getItem(o.nextKey)}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e==null?a=null:(a=t.getItem(e),a.nextKey=null)}return[i?.key??null,a?.key??null]}var O_=class{constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){return this.parentNode?.isConnected||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.indexthis.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}};function j_(e){let{children:t,items:n,idScope:r,addIdAndValue:i,dependencies:a=[]}=e,o=(0,v.useMemo)(()=>void 0,[t]),s=(0,v.useMemo)(()=>new WeakMap,[...a,o]);return(0,v.useMemo)(()=>{if(n&&typeof t==`function`){let e=[];for(let a of n){let n=M_(a)?a:null,o=n?s.get(n):null;if(!o){o=t(a);let c=o.props.id??a?.key??a?.id;r!=null&&o.props.id==null&&c!=null&&(c=r+`:`+c);let l=c??e.length;o=(0,v.cloneElement)(o,i?{key:l,id:c,value:a}:{key:l}),n&&s.set(n,o)}e.push(o)}return e}if(typeof t!=`function`)return t},[t,n,s,r,i])}function M_(e){switch(typeof e){case`object`:return e!=null;case`function`:case`symbol`:return!0;default:return!1}}var N_=o((e=>{var t=d();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),P_=o(((e,t)=>{t.exports=N_()})),_te=P_(),F_=(0,v.createContext)(!1),I_=(0,v.createContext)(null);function L_(e){if((0,v.useContext)(I_))return e.content;let{collection:t,document:n}=xte(e.createCollection);return v.createElement(v.Fragment,null,v.createElement(ip,null,v.createElement(I_.Provider,{value:n},e.content)),v.createElement(vte,{render:e.children,collection:t}))}function vte({collection:e,render:t}){return t(e)}function yte(e,t,n){let r=cs(),i=(0,v.useRef)(r);i.current=r;let a=(0,v.useCallback)(()=>i.current?n():t(),[t,n]);return(0,_te.useSyncExternalStore)(e,a)}var bte=typeof v.useSyncExternalStore==`function`?v.useSyncExternalStore:yte;function xte(e){let[t]=(0,v.useState)(()=>new A_(e?.()||new E_));return{collection:bte((0,v.useCallback)(e=>t.subscribe(e),[t]),(0,v.useCallback)(()=>{let e=t.getCollection();return t.isSSR&&t.resetAfterSSR(),e},[t]),(0,v.useCallback)(()=>(t.isSSR=!0,t.getCollection()),[t])),document:t}}var R_=(0,v.createContext)(null);function Ste(e){return class extends x_{static{this.type=e}}}function z_(e,t,n,r,i,a){typeof e==`string`&&(e=Ste(e));let o=(0,v.useCallback)(i=>{i?.setProps(t,n,e,r,a)},[t,n,r,a,e]),s=(0,v.useContext)(R_);if(s){let o=s.ownerDocument.nodesByProps.get(t);return o||(o=s.ownerDocument.createElement(e.type),o.setProps(t,n,e,r,a),s.appendChild(o),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(t,o)),i?v.createElement(R_.Provider,{value:o},i):null}return v.createElement(e.type,{ref:o},i)}function B_(e,t){let n=({node:e})=>t(e.props,e.props.ref,e),r=(0,v.forwardRef)((r,i)=>{let a=(0,v.useContext)(Cm);if(!(0,v.useContext)(F_)){if(t.length>=3)throw Error(t.name+` cannot be rendered outside a collection.`);return t(r,i)}return z_(e,r,i,`children`in r?r.children:null,null,e=>v.createElement(Cm.Provider,{value:a},v.createElement(n,{node:e})))});return r.displayName=t.name,r}function V_(e,t,n=H_){let r=({node:e})=>t(e.props,e.props.ref,e),i=(0,v.forwardRef)((t,i)=>z_(e,t,i,null,n(t),e=>v.createElement(r,{node:e}))??v.createElement(v.Fragment,null));return i.displayName=t.name,i}function H_(e){return j_({...e,addIdAndValue:!0})}var U_=(0,v.createContext)(null);function W_(e){let t=(0,v.useContext)(U_),n=(t?.dependencies||[]).concat(e.dependencies),r=e.idScope??t?.idScope,i=H_({...e,idScope:r,dependencies:n});return(0,v.useContext)(I_)&&(i=v.createElement(Cte,null,i)),t=(0,v.useMemo)(()=>({dependencies:n,idScope:r}),[r,...n]),v.createElement(U_.Provider,{value:t},i)}function Cte({children:e}){let t=(0,v.useContext)(I_),n=(0,v.useMemo)(()=>v.createElement(I_.Provider,{value:null},v.createElement(F_.Provider,{value:!0},e)),[e]);return cs()?v.createElement(R_.Provider,{value:t},n):(0,Ec.createPortal)(n,t)}var G_=(0,v.createContext)(null),K_={CollectionRoot({collection:e,renderDropIndicator:t}){return q_(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return q_(e,t,n)}};function q_(e,t,n){return j_({items:t?e.getChildren(t.key):e,dependencies:[n],children(t){if(t.type===`content`)return v.createElement(v.Fragment,null);let r=t.render(t);return!n||t.type!==`item`?r:v.createElement(v.Fragment,null,n({type:`item`,key:t.key,dropPosition:`before`}),r,wte(e,t,n))}})}function wte(e,t,n){let r=t.key,i=e.getKeyAfter(r),a=i==null?null:e.getItem(i);for(;a!=null&&a.type!==`item`;)i=e.getKeyAfter(a.key),a=i==null?null:e.getItem(i);let o=t.nextKey==null?null:e.getItem(t.nextKey);for(;o!=null&&o.type!==`item`;)o=o.nextKey==null?null:e.getItem(o.nextKey);let s=[];if(o==null){let r=t;for(;r?.type===`item`&&(!a||r.parentKey!==a.parentKey&&a.levele==null?null:new Set([e]),[e])}function X_(e){let t=$_(vs(e));t!==e&&(t&&Z_(t,e),e&&Q_(e,t))}function Z_(e,t){e.dispatchEvent(new FocusEvent(`blur`,{relatedTarget:t})),e.dispatchEvent(new FocusEvent(`focusout`,{bubbles:!0,relatedTarget:t}))}function Q_(e,t){e.dispatchEvent(new FocusEvent(`focus`,{relatedTarget:t})),e.dispatchEvent(new FocusEvent(`focusin`,{bubbles:!0,relatedTarget:t}))}function $_(e){let t=Os(e),n=t?.getAttribute(`aria-activedescendant`);return n&&e.getElementById(n)||t}var ev={};ev={collectionLabel:`مقترحات`};var tv={};tv={collectionLabel:`Предложения`};var nv={};nv={collectionLabel:`Návrhy`};var rv={};rv={collectionLabel:`Forslag`};var iv={};iv={collectionLabel:`Empfehlungen`};var av={};av={collectionLabel:`Προτάσεις`};var ov={};ov={collectionLabel:`Suggestions`};var sv={};sv={collectionLabel:`Sugerencias`};var cv={};cv={collectionLabel:`Soovitused`};var lv={};lv={collectionLabel:`Ehdotukset`};var uv={};uv={collectionLabel:`Suggestions`};var dv={};dv={collectionLabel:`הצעות`};var fv={};fv={collectionLabel:`Prijedlozi`};var pv={};pv={collectionLabel:`Javaslatok`};var mv={};mv={collectionLabel:`Suggerimenti`};var hv={};hv={collectionLabel:`候補`};var gv={};gv={collectionLabel:`제안`};var _v={};_v={collectionLabel:`Pasiūlymai`};var vv={};vv={collectionLabel:`Ieteikumi`};var yv={};yv={collectionLabel:`Forslag`};var bv={};bv={collectionLabel:`Suggesties`};var xv={};xv={collectionLabel:`Sugestie`};var Sv={};Sv={collectionLabel:`Sugestões`};var Cv={};Cv={collectionLabel:`Sugestões`};var wv={};wv={collectionLabel:`Sugestii`};var Tv={};Tv={collectionLabel:`Предложения`};var Ev={};Ev={collectionLabel:`Návrhy`};var Dv={};Dv={collectionLabel:`Predlogi`};var Ov={};Ov={collectionLabel:`Predlozi`};var kv={};kv={collectionLabel:`Förslag`};var Av={};Av={collectionLabel:`Öneriler`};var jv={};jv={collectionLabel:`Пропозиції`};var Mv={};Mv={collectionLabel:`建议`};var Nv={};Nv={collectionLabel:`建議`};var Pv={};Pv={"ar-AE":ev,"bg-BG":tv,"cs-CZ":nv,"da-DK":rv,"de-DE":iv,"el-GR":av,"en-US":ov,"es-ES":sv,"et-EE":cv,"fi-FI":lv,"fr-FR":uv,"he-IL":dv,"hr-HR":fv,"hu-HU":pv,"it-IT":mv,"ja-JP":hv,"ko-KR":gv,"lt-LT":_v,"lv-LV":vv,"nb-NO":yv,"nl-NL":bv,"pl-PL":xv,"pt-BR":Sv,"pt-PT":Cv,"ro-RO":wv,"ru-RU":Tv,"sk-SK":Ev,"sl-SI":Dv,"sr-SP":Ov,"sv-SE":kv,"tr-TR":Av,"uk-UA":jv,"zh-CN":Mv,"zh-TW":Nv};function Tte(e){return e&&e.__esModule?e.default:e}function Ete(e,t){let{inputRef:n,collectionRef:r,filter:i,disableAutoFocusFirst:a=!1,disableVirtualFocus:o=!1}=e,s=ms(),c=(0,v.useRef)(void 0),l=(0,v.useRef)(!1),u=(0,v.useRef)(null),d=pm()===`virtual`&&(Ao()||Po()),[f,p]=(0,v.useState)(!d&&!o),[m,h]=(0,v.useState)(!1),[g,_]=(0,v.useState)(!1);(0,v.useEffect)(()=>()=>clearTimeout(c.current),[]);let y=$s(e=>{!e.isTrusted&&f&&n.current&&Os(vs(n.current))!==n.current&&iee()!==`touch`&&n.current.focus();let i=U(e);e.isTrusted||!i||u.current===i.id||(clearTimeout(c.current),i===r.current?u.current&&!document.getElementById(u.current)&&(u.current=null,t.setFocusedNodeId(null)):l.current?(u.current=i.id,c.current=setTimeout(()=>{t.setFocusedNodeId(i.id)},500)):(u.current=i.id,t.setFocusedNodeId(i.id)),l.current=!1)}),[b,x]=(0,v.useState)(null),S=(0,v.useCallback)(e=>{x(e),e==null?h(!1):(e.getAttribute(`tabindex`)!=null&&p(!1),h(!0))},[]);Xo(()=>(b?.addEventListener(`focusin`,y),()=>{b?.removeEventListener(`focusin`,y)}),[b]);let C=Zs((0,v.useMemo)(()=>Ns(r,S),[r,S])),w=(0,v.useCallback)(()=>{if(!r.current){_(!0);return}l.current=!0,r.current?.dispatchEvent(new CustomEvent(Co,{cancelable:!0,bubbles:!0,detail:{focusStrategy:`first`}}))},[r]),T=(0,v.useCallback)(e=>{_(!1),X_(Os()),u.current=null,t.setFocusedNodeId(null);let n=new CustomEvent(So,{cancelable:!0,bubbles:!0,detail:{clearFocusKey:e}});clearTimeout(c.current),l.current=!1,r.current?.dispatchEvent(n)},[r,t]),E=(0,v.useRef)(``);_c(n,`beforeinput`,e=>{let{inputType:t}=e;E.current=t});let D=e=>{(E.current===`insertText`||E.current===`insertCompositionText`||E.current===`insertFromComposition`)&&!a?w():E.current&&(E.current.includes(`insert`)||E.current.includes(`delete`)||E.current.includes(`history`))&&(T(!0),$_(document)===n.current&&Q_(n.current,null)),t.setInputValue(e)},O=(0,v.useRef)(null),k=e=>{if(O.current=U(e),e.nativeEvent.isComposing)return;let t=u.current;switch(t!==null&&vs(n.current).getElementById(t)==null&&(u.current=null,t=null),e.key){case`a`:if(cc(e))return;break;case`Escape`:if(e.isDefaultPrevented())return;break;case` `:return;case`Tab`:`continuePropagation`in e&&e.continuePropagation();return;case`Home`:case`End`:case`PageDown`:case`PageUp`:case`ArrowUp`:case`ArrowDown`:case`ArrowRight`:case`ArrowLeft`:{if((e.key===`Home`||e.key===`End`)&&t==null&&e.shiftKey)return;if(e.key===`ArrowRight`||e.key===`ArrowLeft`){if(t==null){e.isPropagationStopped()||e.stopPropagation();return}break}e.preventDefault();let n=new CustomEvent(Co,{cancelable:!0,bubbles:!0});r.current?.dispatchEvent(n);break}}e.isPropagationStopped()||e.stopPropagation();let i=!0;if(r.current!==null){if(t==null)i=r.current?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type,e.nativeEvent))||!1;else{let n=document.getElementById(t);n&&(i=n?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type,e.nativeEvent))||!1)}}if(i)switch(e.key){case`ArrowLeft`:case`ArrowRight`:T();break;case`Enter`:t!=null&&document.getElementById(t)?.dispatchEvent(new PointerEvent(`click`,e.nativeEvent));break}else e.preventDefault()},A=$s(e=>{if(U(e)===O.current){e.stopImmediatePropagation();let t=u.current;t==null?r.current?.dispatchEvent(new KeyboardEvent(e.type,e)):document.getElementById(t)?.dispatchEvent(new KeyboardEvent(e.type,e))}});(0,v.useEffect)(()=>(document.addEventListener(`keyup`,A,!0),()=>{document.removeEventListener(`keyup`,A,!0)}),[]);let j=Xs({id:s,"aria-label":s_(Tte(Pv),`@react-aria/autocomplete`).format(`collectionLabel`)}),M=(0,v.useCallback)((e,n)=>!i||i(e,t.inputValue,n),[t.inputValue,i]),N=e=>{if(!e.isTrusted)return;let t=u.current?document.getElementById(u.current):null;t&&Z_(t,e.relatedTarget)},P=e=>{if(e.isTrusted&&u.current&&document.getElementById(u.current)){let t=U(e);queueMicrotask(()=>{Z_(t,r.current),Q_(r.current,t)})}},F=e=>{e.button===0&&e.pointerType!==`touch`&&u.current!=null&&n.current!=null&&U(e)===n.current&&T()},I={value:t.inputValue,onChange:D},L={onKeyDown:k,"aria-activedescendant":t.focusedNodeId??void 0,onBlur:N,onFocus:P,onPointerDown:F};return I={...I,...f&&m&&L,enterKeyHint:`go`,"aria-controls":m?s:void 0,"aria-autocomplete":`list`,autoCorrect:`off`,spellCheck:`false`,autoComplete:`off`},{inputProps:I,collectionProps:W(j,{shouldUseVirtualFocus:f,disallowTypeAhead:f,autoFocus:g?`first`:!1}),collectionRef:C,filter:i==null?void 0:M}}function Dte(e){let{onInputChange:t,inputValue:n,defaultInputValue:r=``}=e,i=e=>{t&&t(e)},[a,o]=(0,v.useState)(null),[s,c]=eh(n,r,i);return{inputValue:s,setInputValue:c,focusedNodeId:a,setFocusedNodeId:o}}var Ote=(0,v.createContext)(null),kte=(0,v.createContext)(null),Fv=(0,v.createContext)(null),Iv=(0,v.createContext)(null);function Ate(e){e=W(Xf(Ote,e.slot),e);let{filter:t,disableAutoFocusFirst:n}=e,r=Dte(e),i=(0,v.useRef)(null),a=(0,v.useRef)(null),{inputProps:o,collectionProps:s,collectionRef:c,filter:l}=Ete({...$f(e),filter:t,disableAutoFocusFirst:n,inputRef:i,collectionRef:a},r);return v.createElement(qf,{values:[[kte,r],[Iv,{...o,ref:i}],[Fv,{...s,filter:l,ref:c}]]},e.children)}var Lv=(0,v.createContext)({}),jte=(0,v.createContext)({}),Rv=(0,v.createContext)(null);function zv(e){let t=(0,v.useRef)({});return v.createElement(Rv.Provider,{value:t},e.children)}var Mte=(0,v.forwardRef)(function(e,t){let{name:n,isVisible:r=!0,children:i,className:a,style:o,render:s,...c}=e,[l,u]=(0,v.useState)(r?`visible`:`hidden`),d=(0,v.useContext)(Rv);if(!d)throw Error(` must be rendered inside a `);r&&l===`hidden`&&u(`visible`),t=Zs(t),Xo(()=>{let e=t.current,i=d.current,a=i[n],o=null;if(e&&r&&a){u(`visible`);let t=e.getAnimations(),r=a.style.map(([t,n])=>{let r=e.style[t];if(t===`translate`){let t=a.rect,n=e.getBoundingClientRect(),r=t.left-n?.left,i=t.top-n?.top;e.style.translate=`${r}px ${i}px`}else e.style[t]=n;return[t,r]});for(let n of e.getAnimations())t.includes(n)||n.cancel();o=requestAnimationFrame(()=>{o=null;for(let[t,n]of r)e.style[t]=n}),delete i[n]}else e&&r&&!a?(queueMicrotask(()=>(0,Ec.flushSync)(()=>u(`entering`))),o=requestAnimationFrame(()=>{o=null,u(`visible`)})):e&&!r&&queueMicrotask(()=>{i[n]?(delete i[n],(0,Ec.flushSync)(()=>u(`exiting`)),Promise.all(e.getAnimations().map(e=>e.finished)).then(()=>u(`hidden`)).catch(()=>{})):u(`hidden`)});return()=>{if(o!=null&&cancelAnimationFrame(o),e&&e.isConnected&&!e.hasAttribute(`data-exiting`)){let t=window.getComputedStyle(e);if(t.transitionProperty!==`none`){let r=t.transitionProperty.split(/\s*,\s*/);i[n]={rect:e.getBoundingClientRect(),style:r.map(e=>[e,t[e]])}}}}},[t,d,n,r]);let f=Jf({children:i,className:a,style:o,render:s,values:{isEntering:l===`entering`,isExiting:l===`exiting`}});return l===`hidden`?null:v.createElement(np.div,{...c,...f,ref:t,"data-entering":l===`entering`||void 0,"data-exiting":l===`exiting`||void 0})}),Bv=(0,v.createContext)({isSelected:!1}),Nte=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,Bv);let{isSelected:n,...r}=e;return v.createElement(Mte,{...r,ref:t,className:e.className||`react-aria-SelectionIndicator`,name:`SelectionIndicator`,isVisible:n})});function Pte(e){let t=Us(e,{labelable:!0}),n;return e.orientation===`vertical`&&(n=`vertical`),e.elementType===`hr`?{separatorProps:t}:{separatorProps:{...t,role:`separator`,"aria-orientation":n}}}var Vv=(0,v.createContext)({}),Fte=B_(class extends x_{static{this.type=`separator`}filter(e,t){let n=t.getItem(this.prevKey);if(n&&n.type!==`separator`){let n=this.clone();return t.addDescendants(n,e),n}return null}},function(e,t){[e,t]=Zf(e,t,Vv);let{elementType:n,orientation:r,style:i,className:a,slot:o,...s}=e,c=n||`hr`;c===`hr`&&r===`vertical`&&(c=`div`);let l=np[c],{separatorProps:u}=Pte({...s,elementType:n,orientation:r}),d=Us(e,{global:!0});return v.createElement(l,{render:e.render,...W(d,u),style:i,className:a??`react-aria-Separator`,ref:t,slot:o||void 0})}),Hv=(0,v.createContext)({}),Ite=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,Hv);let{elementType:n=`span`,...r}=e,i=np[n];return v.createElement(i,{className:`react-aria-Text`,...r,ref:t})}),Uv={};Uv={longPressMessage:`اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة`};var Wv={};Wv={longPressMessage:`Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто`};var Gv={};Gv={longPressMessage:`Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku`};var Kv={};Kv={longPressMessage:`Langt tryk eller tryk på Alt + pil ned for at åbne menuen`};var qv={};qv={longPressMessage:`Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen`};var Jv={};Jv={longPressMessage:`Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού`};var Yv={};Yv={longPressMessage:`Long press or press Alt + ArrowDown to open menu`};var Xv={};Xv={longPressMessage:`Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú`};var Zv={};Zv={longPressMessage:`Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool`};var Qv={};Qv={longPressMessage:`Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli`};var $v={};$v={longPressMessage:`Appuyez de manière prolongée ou appuyez sur Alt\xA0+\xA0Flèche vers le bas pour ouvrir le menu.`};var ey={};ey={longPressMessage:`לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט`};var ty={};ty={longPressMessage:`Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika`};var ny={};ny={longPressMessage:`Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához`};var ry={};ry={longPressMessage:`Premi a lungo o premi Alt + Freccia giù per aprire il menu`};var iy={};iy={longPressMessage:`長押しまたは Alt+下矢印キーでメニューを開く`};var ay={};ay={longPressMessage:`길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기`};var oy={};oy={longPressMessage:`Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“.`};var sy={};sy={longPressMessage:`Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa`};var cy={};cy={longPressMessage:`Langt trykk eller trykk Alt + PilNed for å åpne menyen`};var ly={};ly={longPressMessage:`Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen`};var uy={};uy={longPressMessage:`Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu`};var dy={};dy={longPressMessage:`Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu`};var fy={};fy={longPressMessage:`Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu`};var py={};py={longPressMessage:`Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul`};var my={};my={longPressMessage:`Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню`};var hy={};hy={longPressMessage:`Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol`};var gy={};gy={longPressMessage:`Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol`};var _y={};_y={longPressMessage:`Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni`};var vy={};vy={longPressMessage:`Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn`};var yy={};yy={longPressMessage:`Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın`};var by={};by={longPressMessage:`Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню`};var xy={};xy={longPressMessage:`长按或按 Alt + 向下方向键以打开菜单`};var Sy={};Sy={longPressMessage:`長按或按 Alt+向下鍵以開啟功能表`};var Cy={};Cy={"ar-AE":Uv,"bg-BG":Wv,"cs-CZ":Gv,"da-DK":Kv,"de-DE":qv,"el-GR":Jv,"en-US":Yv,"es-ES":Xv,"et-EE":Zv,"fi-FI":Qv,"fr-FR":$v,"he-IL":ey,"hr-HR":ty,"hu-HU":ny,"it-IT":ry,"ja-JP":iy,"ko-KR":ay,"lt-LT":oy,"lv-LV":sy,"nb-NO":cy,"nl-NL":ly,"pl-PL":uy,"pt-BR":dy,"pt-PT":fy,"ro-RO":py,"ru-RU":my,"sk-SK":hy,"sl-SI":gy,"sr-SP":_y,"sv-SE":vy,"tr-TR":yy,"uk-UA":by,"zh-CN":xy,"zh-TW":Sy};var Lte=500;function wy(e){let{isDisabled:t,pointerType:n,onLongPressStart:r,onLongPressEnd:i,onLongPress:a,threshold:o=Lte,accessibilityDescription:s}=e,c=(0,v.useRef)(void 0),{addGlobalListener:l,removeAllGlobalListeners:u}=Ys(),d=e=>n?e.pointerType===n:e.pointerType===`mouse`||e.pointerType===`touch`,{pressProps:f}=Fm({isDisabled:t,onPressStart(e){if(e.continuePropagation(),d(e)){r&&r({...e,type:`longpressstart`}),c.current=setTimeout(()=>{e.target.dispatchEvent(new PointerEvent(`pointercancel`,{bubbles:!0})),l(e.target,`click`,e=>e.preventDefault(),{once:!0}),vs(e.target).activeElement!==e.target&&Io(e.target),a&&a({...e,type:`longpress`}),c.current=void 0},o),e.pointerType===`touch`&&l(e.target,`contextmenu`,e=>e.preventDefault(),{once:!0});let t=ys(e.target);l(t,`pointerup`,()=>{setTimeout(()=>{u()},100)},{once:!0})}},onPressEnd(e){c.current&&clearTimeout(c.current),i&&d(e)&&i({...e,type:`longpressend`})}});return{longPressProps:W(f,gc(a&&!t?s:void 0))}}function Rte(e){let{onContextMenu:t}=e,n=(0,v.useRef)(!1),{longPressProps:r}=wy({onLongPressStart(){n.current=!1},onLongPress(e){n.current?n.current=!1:t?.({target:e.target,x:e.x,y:e.y})}});return t?{contextMenuProps:W(Ao()?r:{},{onContextMenu(e){e.stopPropagation(),e.preventDefault(),n.current=!0;let r=e.currentTarget.getBoundingClientRect();t({target:e.currentTarget,x:e.clientX-r.x,y:e.clientY-r.y})},onKeyDown(e){if(Do()&&e.ctrlKey&&e.key===`Enter`){n.current=!1;let r=e.currentTarget;e.stopPropagation(),setTimeout(()=>{if(n.current)n.current=!1;else{let e=r.getBoundingClientRect();t({target:r,x:e.width/2,y:e.height/2})}},10)}}})}:{contextMenuProps:{}}}function Ty(e,t,n){let{type:r}=e,{isOpen:i}=t;(0,v.useEffect)(()=>{n&&n.current&&zh.set(n.current,t.close)});let a;r===`menu`?a=!0:r===`listbox`&&(a=`listbox`);let o=ms();return{triggerProps:{"aria-haspopup":a,"aria-expanded":i,"aria-controls":i?o:void 0,onPress:t.toggle},overlayProps:{id:o}}}function zte(e){return e&&e.__esModule?e.default:e}function Ey(e,t,n){let{type:r=`menu`,isDisabled:i,trigger:a=`press`}=e,o=ms(),{triggerProps:s,overlayProps:c}=Ty({type:r},t,n),l=(e,n,r=`first`)=>{if(!e||n.isDefaultPrevented())return!1;t.toggle(r)},{keyboardProps:u}=Sm({isDisabled:i,shortcuts:{Enter:e=>l(a!==`longPress`,e,`first`)," ":e=>l(a!==`longPress`,e,`first`),ArrowDown:e=>l(a!==`longPress`,e,`first`),ArrowUp:e=>l(a!==`longPress`,e,`last`),"Alt+Enter":e=>l(a===`longPress`,e,`first`),"Alt+ ":e=>l(a===`longPress`,e,`first`),"Alt+ArrowDown":e=>l(!0,e,`first`),"Alt+ArrowUp":e=>l(!0,e,`last`)}}),d=s_(zte(Cy),`@react-aria/menu`),{longPressProps:f}=wy({isDisabled:i||a!==`longPress`,accessibilityDescription:d.format(`longPressMessage`),onLongPressStart(){t.close()},onLongPress(){t.open(`first`)}}),p={preventFocusOnPress:!0,onPressStart(e){e.pointerType!==`touch`&&e.pointerType!==`keyboard`&&!i&&(Io(e.target),t.open(e.pointerType===`virtual`?`first`:null))},onPress(e){e.pointerType===`touch`&&!i&&(Io(e.target),t.toggle())}};delete s.onPress;let{contextMenuProps:m}=Rte({onContextMenu(e){let n=e.target.getBoundingClientRect();t.setPoint({x:n.x+e.x,y:n.y+e.y}),t.open()}});(0,v.useEffect)(()=>{if(t.isOpen&&a===`contextMenu`){let e=e=>{(e.button===2||e.button===0&&e.ctrlKey===!0)&&U(e)===document.body&&t.close()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)}},[t,a]);let h;if(a===`press`)h={...p,...u};else if(a===`longPress`)h={...f,...u};else if(a===`contextMenu`){h=m;let{"aria-haspopup":e,"aria-expanded":t,"aria-controls":n,...r}=s;s=r}return{menuTriggerProps:{...s,...h,id:o},menuProps:{...c,"aria-labelledby":o,autoFocus:t.focusStrategy||!0,onClose:t.close}}}var Dy=new WeakMap;function Oy(e){return jo()?e.altKey:e.ctrlKey}function ky(e,t){let n=`[data-key="${CSS.escape(String(t))}"]`,r=e.current?.dataset.collection;return r&&(n=`[data-collection="${CSS.escape(r)}"]${n}`),e.current?.querySelector(n)}var Ay=new WeakMap;function Bte(e){let t=ms();return Ay.set(e,t),t}function Vte(e){return Ay.get(e)}var jy=1e3;function My(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,i=(0,v.useRef)({search:``,timeout:void 0});return(0,v.useEffect)(()=>{let e=i.current.timeout;return()=>{clearTimeout(e)}},[i]),{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?e=>{if(i.current.search.length>0&&e.key===` `){if(e.preventDefault(),(!(`continuePropagation`in e)||`continuePropagation`in e&&!e.isPropagationStopped())&&e.stopPropagation(),i.current.search+=` `,t.getKeyForSearch!=null){let e=t.getKeyForSearch(i.current.search,n.focusedKey);e??=t.getKeyForSearch(i.current.search),e!=null&&(n.setFocusedKey(e),r&&r(e))}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search=``},jy)}}:void 0,onKeyDown:t.getKeyForSearch?e=>{let a=Hte(e.key);if(!(!a||e.ctrlKey||e.metaKey||e.altKey||!Ds(e.currentTarget,U(e))||i.current.search.length===0&&a===` `)){if(i.current.search+=a,t.getKeyForSearch!=null){let a=t.getKeyForSearch(i.current.search,n.focusedKey);if(a??=t.getKeyForSearch(i.current.search),a!=null)n.setFocusedKey(a),r&&r(a),e.preventDefault(),`continuePropagation`in e||e.stopPropagation();else{i.current.search=``,clearTimeout(i.current.timeout),i.current.timeout=void 0;return}}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search=``},jy)}}:void 0}}}function Hte(e){return e.length===1||!/^[A-Z]/i.test(e)?e:``}function Ny(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:a=!1,disallowEmptySelection:o=!1,disallowSelectAll:s=!1,escapeKeyBehavior:c=`clearSelection`,selectOnFocus:l=t.selectionBehavior===`replace`,disallowTypeAhead:u=!1,shouldUseVirtualFocus:d,allowsTabNavigation:f=!1,scrollRef:p=r,linkBehavior:m=`action`,UNSTABLE_focusOnEntry:h}=e,{direction:g}=bp(),_=Ho(),y=(e,n,i)=>{if(n!=null){if(t.isLink(n)&&m===`selection`&&l&&!Oy(e)){(0,Ec.flushSync)(()=>{t.setFocusedKey(n,i)});let a=ky(r,n),o=t.getItemProps(n);if(a){_.open(a,e,o.href,o.routerOptions);return}return!1}if(t.setFocusedKey(n,i),t.isLink(n)&&m===`override`)return!1;if(e.shiftKey&&t.selectionMode===`multiple`){t.extendSelection(n);return}if(l&&!Oy(e)){t.replaceSelection(n);return}}return!1},b=e=>{if(n.getKeyBelow){let r=t.focusedKey==null?n.getFirstKey?.():n.getKeyBelow?.(t.focusedKey);if(r==null&&a&&(r=n.getFirstKey?.(t.focusedKey)),r!=null){y(e,r);return}}return!1},x=e=>{if(n.getKeyAbove){let r=t.focusedKey==null?n.getLastKey?.():n.getKeyAbove?.(t.focusedKey);if(r==null&&a&&(r=n.getLastKey?.(t.focusedKey)),r!=null){y(e,r);return}}return!1},S=e=>{if(n.getFirstKey){if(t.focusedKey===null&&e.shiftKey)return!1;let r=n.getFirstKey(t.focusedKey,cc(e));if(t.setFocusedKey(r),r!=null){if(cc(e)&&e.shiftKey&&t.selectionMode===`multiple`){t.extendSelection(r);return}if(l){t.replaceSelection(r);return}}}return!1},C=e=>{if(n.getKeyLeftOf){let r=t.focusedKey==null?n.getFirstKey?.():n.getKeyLeftOf?.(t.focusedKey);if(r==null&&a&&(r=g===`rtl`?n.getFirstKey?.(t.focusedKey):n.getLastKey?.(t.focusedKey)),r!=null){y(e,r,g===`rtl`?`first`:`last`);return}}return!1},w=e=>{if(n.getKeyRightOf){let r=t.focusedKey==null?n.getFirstKey?.():n.getKeyRightOf?.(t.focusedKey);if(r==null&&a&&(r=g===`rtl`?n.getLastKey?.(t.focusedKey):n.getFirstKey?.(t.focusedKey)),r!=null){y(e,r,g===`rtl`?`last`:`first`);return}}return!1},T=e=>{if(n.getLastKey){if(t.focusedKey===null&&e.shiftKey)return!1;let r=n.getLastKey(t.focusedKey,cc(e));if(t.setFocusedKey(r),r!=null){if(cc(e)&&e.shiftKey&&t.selectionMode===`multiple`){t.extendSelection(r);return}if(l){t.replaceSelection(r);return}}}return!1},E=e=>{if(n.getKeyPageBelow&&t.focusedKey!=null){let r=n.getKeyPageBelow(t.focusedKey);if(r!=null)return y(e,r)}return!1},D=e=>{if(n.getKeyPageAbove&&t.focusedKey!=null){let r=n.getKeyPageAbove(t.focusedKey);if(r!=null)return y(e,r)}return!1},O=()=>{if(t.selectionMode===`multiple`&&s!==!0){t.selectAll();return}return!1},k=()=>{if(c===`clearSelection`&&!o&&t.selectedKeys.size!==0){t.clearSelection();return}return!1},A=()=>{if(!f&&r.current){let e=rg(r.current,{tabbable:!0}),t,n;do n=e.lastChild(),n&&(t=n);while(n);let i=Os();t&&(!As(t)||i&&!Rc(i))&&Io(t)}return{shouldContinuePropagation:!0,shouldPreventDefault:!1}},j=()=>(!f&&r.current&&r.current.focus(),{shouldContinuePropagation:!0,shouldPreventDefault:!1}),M=(e,t)=>({[Do()?e+`+Shift+Alt`:e+`+Shift+Control`]:t,[e+`+Shift`]:t,[Do()?e+`+Alt`:e+`+Control`]:t,[e]:t}),{keyboardProps:N}=Sm({shortcuts:{...M(`ArrowDown`,b),...M(`ArrowUp`,x),...M(`ArrowLeft`,C),...M(`ArrowRight`,w),...M(`PageDown`,E),...M(`PageUp`,D)},allowRepeats:!0}),{keyboardProps:P}=Sm({shortcuts:{...M(`Home`,S),...M(`End`,T),"Mod+A":O,Escape:k,Tab:A,"Tab+Shift":j}}),F=(0,v.useRef)({top:0,left:0});_c(p,`scroll`,()=>{F.current={top:p.current?.scrollTop??0,left:p.current?.scrollLeft??0}});let I=e=>{if(t.isFocused){Ds(e.currentTarget,U(e))||t.setFocused(!1);return}if(!Ds(e.currentTarget,U(e)))return;let i=pm();t.setFocused(!0);let a=e=>{e!=null&&(t.setFocusedKey(e),l&&!t.isSelected(e)&&t.replaceSelection(e))};if(h&&(i===`keyboard`||i===`virtual`))a(h===`first`?n.getFirstKey?.():n.getLastKey?.());else if(t.focusedKey==null){let r=e.relatedTarget;r&&e.currentTarget.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_FOLLOWING?a(t.lastSelectedKey??n.getLastKey?.()):a(t.firstSelectedKey??n.getFirstKey?.())}else p.current&&(p.current.scrollTop=F.current.top,p.current.scrollLeft=F.current.left);if(t.focusedKey!=null&&p.current){let e=ky(r,t.focusedKey);e instanceof HTMLElement&&(!As(e)&&!d&&Io(e),(i===`keyboard`||h&&i===`virtual`)&&yc(e,{containingElement:r.current}))}},L=e=>{Ds(e.currentTarget,e.relatedTarget)||t.setFocused(!1)},R=(0,v.useRef)(!1);_c(r,Co,d?e=>{let{detail:n}=e;e.stopPropagation(),t.setFocused(!0),n?.focusStrategy===`first`&&(R.current=!0)}:void 0);let z=n.getFirstKey?.()??null;tc(()=>{if(R.current){if(z==null){let e=Os();X_(r.current),Q_(e,null),t.collection.size>0&&(R.current=!1)}else t.setFocusedKey(z),R.current=!1}},[z,t.collection.size]),tc(()=>{t.collection.size>0&&(R.current=!1)},[t.focusedKey]),_c(r,So,d?e=>{e.stopPropagation(),t.setFocused(!1),e.detail?.clearFocusKey&&t.setFocusedKey(null)}:void 0);let B=(0,v.useRef)(i),V=(0,v.useRef)(!1);(0,v.useEffect)(()=>{if(B.current){let e=null;i===`first`&&(e=n.getFirstKey?.()??null),i===`last`&&(e=n.getLastKey?.()??null);let a=t.selectedKeys;if(a.size){for(let n of a)if(t.canSelectItem(n)){e=n;break}}t.setFocused(!0),t.setFocusedKey(e),e==null&&!d&&r.current&&_m(r.current),t.collection.size>0&&(B.current=!1,V.current=!0)}});let H=(0,v.useRef)(t.focusedKey),ee=(0,v.useRef)(null);(0,v.useEffect)(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==H.current||V.current)&&p.current&&r.current){let e=pm(),n=ky(r,t.focusedKey);if(!(n instanceof HTMLElement))return;(e===`keyboard`||V.current)&&(ee.current&&cancelAnimationFrame(ee.current),ee.current=requestAnimationFrame(()=>{p.current&&(vc(p.current,n),e!==`virtual`&&yc(n,{containingElement:r.current}))}))}!d&&t.isFocused&&t.focusedKey==null&&H.current!=null&&r.current&&_m(r.current),H.current=t.focusedKey,V.current=!1}),(0,v.useEffect)(()=>()=>{ee.current&&cancelAnimationFrame(ee.current)},[]),_c(r,`react-aria-focus-scope-restore`,e=>{e.preventDefault(),t.setFocused(!0)});let te={...W(P,N),onFocus:I,onBlur:L,onMouseDown(e){p.current===U(e)&&e.preventDefault()}},{typeSelectProps:ne}=My({keyboardDelegate:n,selectionManager:t});u||(te=W(ne,te));let re;d||(re=t.focusedKey==null?0:-1);let ie=Bte(t.collection);return{collectionProps:W(te,{tabIndex:re,"data-collection":ie})}}var Py=class{constructor(e){this.ref=e}getItemRect(e){let t=this.ref.current;if(!t)return null;let n=e==null?null:ky(this.ref,e);if(!n)return null;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();return{x:i.left-r.left-t.clientLeft+t.scrollLeft,y:i.top-r.top-t.clientTop+t.scrollTop,width:i.width,height:i.height}}getContentSize(){let e=this.ref.current;return{width:e?.scrollWidth??0,height:e?.scrollHeight??0}}getVisibleRect(){let e=this.ref.current;return{x:e?.scrollLeft??0,y:e?.scrollTop??0,width:e?.clientWidth??0,height:e?.clientHeight??0}}},Fy=class{constructor(...e){if(e.length===1){let t=e[0];this.collection=t.collection,this.ref=t.ref,this.collator=t.collator,this.disabledKeys=t.disabledKeys||new Set,this.disabledBehavior=t.disabledBehavior||`all`,this.orientation=t.orientation||`vertical`,this.direction=t.direction,this.layout=t.layout||`stack`,this.layoutDelegate=t.layoutDelegate||new Py(t.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout=`stack`,this.orientation=`vertical`,this.disabledBehavior=`all`,this.layoutDelegate=new Py(this.ref);this.layout===`stack`&&this.orientation===`vertical`&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}isDisabled(e){return this.disabledBehavior===`all`&&(e.props?.isDisabled||this.disabledKeys.has(e.key))&&e.props?.disabledBehavior!==`selection`}findNextNonDisabled(e,t,n=!1){let r=e;for(;r!=null;){let e=this.collection.getItem(r);if(e?.type===`item`&&(n||!this.isDisabled(e)))return r;r=t(r)}return null}getNextKey(e,t){let n=e;return n=this.collection.getKeyAfter(n),this.findNextNonDisabled(n,e=>this.collection.getKeyAfter(e),t?.includeDisabled)}getPreviousKey(e,t){let n=e;return n=this.collection.getKeyBefore(n),this.findNextNonDisabled(n,e=>this.collection.getKeyBefore(e),t?.includeDisabled)}findKey(e,t,n){let r=e,i=this.layoutDelegate.getItemRect(r);if(!i||r==null)return null;let a=i;do{if(r=t(r),r==null)break;i=this.layoutDelegate.getItemRect(r)}while(i&&n(a,i)&&r!=null);return r}isSameRow(e,t){return e.y===t.y||e.x!==t.x}isSameColumn(e,t){return e.x===t.x||e.y!==t.y}isReversed(e){let t=this.getNextKey(e),n=ky(this.ref,e);if(t!=null){let e=ky(this.ref,t);return!n||!e?!1:n.getBoundingClientRect().top>e.getBoundingClientRect().top}let r=this.getPreviousKey(e);if(r!=null){let e=ky(this.ref,r);return!n||!e?!1:e.getBoundingClientRect().top>n.getBoundingClientRect().top}return!1}getKeyBelow(e,t){return this.layout===`grid`&&this.orientation===`vertical`?this.findKey(e,e=>this.getNextKey(e,t),this.isSameRow):this.orientation===`vertical`&&this.isReversed(e)?this.getPreviousKey(e,t):this.getNextKey(e,t)}getKeyAbove(e,t){return this.layout===`grid`&&this.orientation===`vertical`?this.findKey(e,e=>this.getPreviousKey(e,t),this.isSameRow):this.orientation===`vertical`&&this.isReversed(e)?this.getNextKey(e,t):this.getPreviousKey(e,t)}getNextColumn(e,t,n){return t?this.getPreviousKey(e,n):this.getNextKey(e,n)}getKeyRightOf(e,t){let n=this.direction===`ltr`?`getKeyRightOf`:`getKeyLeftOf`;return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,e=>this.layoutDelegate[n](e),t?.includeDisabled)):this.layout===`grid`?this.orientation===`vertical`?this.getNextColumn(e,this.direction===`rtl`,t):this.findKey(e,e=>this.getNextColumn(e,this.direction===`rtl`,t),this.isSameColumn):this.orientation===`horizontal`?this.getNextColumn(e,this.direction===`rtl`,t):null}getKeyLeftOf(e,t){let n=this.direction===`ltr`?`getKeyLeftOf`:`getKeyRightOf`;return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,e=>this.layoutDelegate[n](e),t?.includeDisabled)):this.layout===`grid`?this.orientation===`vertical`?this.getNextColumn(e,this.direction===`ltr`,t):this.findKey(e,e=>this.getNextColumn(e,this.direction===`ltr`,t),this.isSameColumn):this.orientation===`horizontal`?this.getNextColumn(e,this.direction===`ltr`,t):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,e=>this.collection.getKeyAfter(e))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,e=>this.collection.getKeyBefore(e))}getKeyPageAbove(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;let r=this.isReversed(e);if(t&&!ac(t))return this.getFirstKey();let i=e;if(this.orientation===`horizontal`){let e=Math.max(0,n.x+n.width-this.layoutDelegate.getVisibleRect().width);for(;n&&n.x>e&&i!=null;)i=this.getKeyAbove(i),n=i==null?null:this.layoutDelegate.getItemRect(i)}else{let e=this.layoutDelegate.getVisibleRect(),t=r?n.y-e.height:Math.max(0,n.y+n.height-e.height);for(;n&&n.y>t&&i!=null;)i=this.getKeyAbove(i),n=i==null?null:this.layoutDelegate.getItemRect(i)}return i??(r?this.getLastKey():this.getFirstKey())}getKeyPageBelow(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;let r=this.isReversed(e);if(t&&!ac(t))return this.getLastKey();let i=e;if(this.orientation===`horizontal`){let e=Math.min(this.layoutDelegate.getContentSize().width,n.x-n.width+this.layoutDelegate.getVisibleRect().width);for(;n&&n.xe[0]a||new Fy({collection:n,disabledKeys:r,disabledBehavior:l,ref:i,collator:c,layoutDelegate:o,orientation:s}),[a,o,n,r,i,c,l,s]),{collectionProps:d}=Ny({...e,ref:i,selectionManager:t,keyboardDelegate:u});return{listProps:d}}function Ute(e,t,n){let{shouldFocusWrap:r=!0,onKeyDown:i,onKeyUp:a,...o}=e;!e[`aria-label`]&&e[`aria-labelledby`];let s=Us(e,{labelable:!0}),{listProps:c}=Ry({...o,ref:n,selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,shouldFocusWrap:r,linkBehavior:`override`});return Dy.set(t,{onClose:e.onClose,onAction:e.onAction,shouldUseVirtualFocus:e.shouldUseVirtualFocus}),{menuProps:W(s,{onKeyDown:i,onKeyUp:a},{role:`menu`,...c,onKeyDown:t=>{(t.key!==`Escape`||e.shouldUseVirtualFocus)&&c.onKeyDown?.(t)}})}}function zy(e){let{id:t,selectionManager:n,key:r,ref:i,shouldSelectOnPressUp:a,shouldUseVirtualFocus:o,focus:s,isDisabled:c,onAction:l,allowsDifferentPressOrigin:u,linkBehavior:d=`action`}=e,f=Ho();t=ms(t);let p=e=>{if(e.pointerType===`keyboard`&&Oy(e))n.toggleSelection(r);else{if(n.selectionMode===`none`)return;if(n.isLink(r)){if(d===`selection`&&i.current){let t=n.getItemProps(r);f.open(i.current,e,t.href,t.routerOptions),n.setSelectedKeys(n.selectedKeys);return}if(d===`override`||d===`none`)return}n.selectionMode===`single`?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):e&&e.shiftKey?n.extendSelection(r):n.selectionBehavior===`toggle`||e&&(cc(e)||e.pointerType===`touch`||e.pointerType===`virtual`)?n.toggleSelection(r):n.replaceSelection(r)}};(0,v.useEffect)(()=>{r===n.focusedKey&&n.isFocused&&(o?X_(i.current):s?s():Os()!==i.current&&i.current&&_m(i.current))},[i,r,n.focusedKey,n.childFocusStrategy,n.isFocused,o]),c||=n.isDisabled(r);let m={};!o&&!c?m={tabIndex:r===n.focusedKey?0:-1,onFocus(e){U(e)===i.current&&n.setFocusedKey(r)}}:c&&(m.onMouseDown=e=>{e.preventDefault()}),(0,v.useEffect)(()=>{c&&n.focusedKey===r&&n.setFocusedKey(null)},[n,c,r]);let h=n.isLink(r)&&d===`override`,g=l&&e.UNSTABLE_itemBehavior===`action`,_=n.isLink(r)&&d!==`selection`&&d!==`none`,y=!c&&n.canSelectItem(r)&&!h&&!g,b=(l||_)&&!c,x=b&&(n.selectionBehavior===`replace`?!y:!y||n.isEmpty),S=b&&y&&n.selectionBehavior===`replace`,C=x||S,w=(0,v.useRef)(null),T=C&&y,E=(0,v.useRef)(!1),D=(0,v.useRef)(!1),O=n.getItemProps(r),k=e=>{l&&(l(),i.current?.dispatchEvent(new CustomEvent(`react-aria-item-action`,{bubbles:!0}))),_&&i.current&&f.open(i.current,e,O.href,O.routerOptions)},A={ref:i};a?(A.onPressStart=e=>{w.current=e.pointerType,E.current=T,e.pointerType===`keyboard`&&(!C||Vy(e.key))&&p(e)},u?(A.onPressUp=x?void 0:e=>{e.pointerType===`mouse`&&y&&p(e)},A.onPress=x?k:e=>{e.pointerType!==`keyboard`&&e.pointerType!==`mouse`&&y&&p(e)}):A.onPress=e=>{if(x||S&&e.pointerType!==`mouse`){if(e.pointerType===`keyboard`&&!By(e.key))return;k(e)}else e.pointerType!==`keyboard`&&y&&p(e)}):(A.onPressStart=e=>{w.current=e.pointerType,E.current=T,D.current=x,y&&(e.pointerType===`mouse`&&!x||e.pointerType===`keyboard`&&(!b||Vy(e.key)))&&p(e)},A.onPress=e=>{(e.pointerType===`touch`||e.pointerType===`pen`||e.pointerType===`virtual`||e.pointerType===`keyboard`&&C&&By(e.key)||e.pointerType===`mouse`&&D.current)&&(C?k(e):y&&p(e))});let j=Vte(n.collection);if(m[`data-collection`]=j,m[`data-key`]=r,A.preventFocusOnPress=o,o&&(A=W(A,{onPressStart(e){e.pointerType!==`touch`&&(n.setFocused(!0),n.setFocusedKey(r))},onPress(e){e.pointerType===`touch`&&(n.setFocused(!0),n.setFocusedKey(r))}})),O)for(let e of[`onPressStart`,`onPressEnd`,`onPressChange`,`onPress`,`onPressUp`,`onClick`])O[e]&&(A[e]=_s(A[e],O[e]));let{pressProps:M,isPressed:N}=Fm(A),P=S?e=>{w.current===`mouse`&&(e.stopPropagation(),e.preventDefault(),k(e))}:void 0,{longPressProps:F}=wy({isDisabled:!T,onLongPress(e){e.pointerType===`touch`&&(p(e),n.setSelectionBehavior(`toggle`))}}),I=e=>{w.current===`touch`&&E.current&&e.preventDefault()},L=d!==`none`&&n.isLink(r)?e=>{Wo.isOpening||e.preventDefault()}:void 0,R=W(m,y||x||o&&!c?M:{},T?F:{},{onDoubleClick:P,onDragStartCapture:I,onClick:L,id:t},o?{onMouseDown:e=>e.preventDefault()}:void 0),z=e=>{let t=e;for(;t&&t!==i.current;){let e=t.getAttribute(`data-collection`);if(e!=null)return e!==j;t=t.parentElement}return Rc(e)},B=R.onPointerDown;R.onPointerDown=e=>{let t=U(e);if(t&&t!==i.current&&z(t)){e.stopPropagation();return}B?.(e)};let V=R.onMouseDown;return R.onMouseDown=e=>{let t=U(e);if(t&&t!==i.current&&z(t)){e.stopPropagation();return}V?.(e)},{itemProps:R,isPressed:N,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:c,allowsSelection:y,hasAction:C}}function By(e){return e===`Enter`}function Vy(e){return e===` `}function Hy(e,t){return typeof t.getChildren==`function`?t.getChildren(e.key):e.childNodes}function Uy(e){return Wy(e,0)}function Wy(e,t){if(t<0)return;let n=0;for(let r of e){if(n===t)return r;n++}}function Gy(e){let t;for(let n of e)t=n;return t}function Ky(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...qy(e,t),t],i=[...qy(e,n),n],a=r.slice(0,i.length).findIndex((e,t)=>e!==i[t]);return a===-1?r.findIndex(e=>e===n)>=0?1:(i.findIndex(e=>e===t),-1):(t=r[a],n=i[a],t.index-n.index)}function qy(e,t){let n=[],r=t;for(;r?.parentKey!=null;)r=e.getItem(r.parentKey),r&&n.unshift(r);return n}var Jy=new WeakMap;function Yy(e){let t=Jy.get(e);if(t!=null)return t;let n=0,r=t=>{for(let i of t)i.type===`section`?r(Hy(i,e)):i.type===`item`&&n++};return r(e),Jy.set(e,n),n}function Wte(e,t,n){let{id:r,key:i,closeOnSelect:a,shouldCloseOnSelect:o,isVirtualized:s,"aria-haspopup":c,onPressStart:l,onPressUp:u,onPress:d,onPressChange:f,onPressEnd:p,onClick:m,onHoverStart:h,onHoverChange:g,onHoverEnd:_,onKeyDown:y,onKeyUp:b,onFocus:x,onFocusChange:S,onBlur:C,selectionManager:w=t.selectionManager}=e,T=!!c,E=T&&e[`aria-expanded`]===`true`,D=e.isDisabled??w.isDisabled(i),O=e.isSelected??w.isSelected(i),k=Dy.get(t),A=t.collection.getItem(i),j=e.onClose||k.onClose,M=Ho(),N=()=>{if(!T&&(A?.props?.onAction?A.props.onAction():e.onAction&&e.onAction(i),k.onAction)){let e=k.onAction;e(i,A?.value)}},P=`menuitem`;T||(w.selectionMode===`single`?P=`menuitemradio`:w.selectionMode===`multiple`&&(P=`menuitemcheckbox`));let F=gs(),I=gs(),L=gs(),R={id:r,"aria-disabled":D||void 0,role:P,"aria-label":e[`aria-label`],"aria-labelledby":F,"aria-describedby":[e[`aria-describedby`],I,L].filter(Boolean).join(` `)||void 0,"aria-controls":e[`aria-controls`],"aria-haspopup":c,"aria-expanded":e[`aria-expanded`]};if(w.selectionMode!==`none`&&!T&&(R[`aria-checked`]=O),s){let e=Number(A?.index);R[`aria-posinset`]=Number.isNaN(e)?void 0:e+1,R[`aria-setsize`]=Yy(t.collection)}let z=(0,v.useRef)(!1),B=e=>{f?.(e),z.current=e},V=(0,v.useRef)(null),H=e=>{e.pointerType!==`keyboard`&&(V.current={pointerType:e.pointerType}),e.pointerType===`mouse`&&(z.current||e.target.click()),u?.(e)},ee=e=>{m?.(e),N(),Yo(e,M,A.props.href,A?.props.routerOptions);let t=V.current?.pointerType===`keyboard`?V.current?.key===`Enter`||w.selectionMode===`none`||w.isLink(i):w.selectionMode!==`multiple`||w.isLink(i);t=o??a??t,j&&!T&&t&&j(),V.current=null},{itemProps:te,isFocused:ne}=zy({id:r,selectionManager:w,key:i,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:`none`,shouldUseVirtualFocus:k.shouldUseVirtualFocus}),{pressProps:re,isPressed:ie}=Fm({onPressStart:l,onPress:d,onPressUp:H,onPressChange:B,onPressEnd:p,isDisabled:D}),{hoverProps:ae}=Zm({isDisabled:D,onHoverStart(e){!fm()&&!(E&&c)&&(w.setFocused(!0),w.setFocusedKey(i)),h?.(e)},onHoverChange:g,onHoverEnd:_}),{keyboardProps:oe}=Sm({shortcuts:{" ":e=>{V.current={pointerType:`keyboard`,key:` `},U(e).click(),mm(`keyboard`)},Enter:e=>{V.current={pointerType:`keyboard`,key:`Enter`};let t=U(e);if(t.tagName!==`A`){t.click(),mm(`keyboard`);return}return mm(`keyboard`),{shouldPreventDefault:!1,shouldContinuePropagation:!1}}},onKeyDown:y,onKeyUp:b}),{focusableProps:se}=wm({onBlur:C,onFocus:x,onFocusChange:S},n),ce=Us(A?.props);delete ce.id;let le=Jo(A?.props);return{menuItemProps:{...R,...W(ce,le,T?{onFocus:te.onFocus,"data-collection":te[`data-collection`],"data-key":te[`data-key`]}:te,re,ae,oe,se,k.shouldUseVirtualFocus||T?{onMouseDown:e=>e.preventDefault()}:void 0,D?void 0:{onClick:ee}),tabIndex:te.tabIndex!=null&&E&&!k.shouldUseVirtualFocus?-1:te.tabIndex},labelProps:{id:F},descriptionProps:{id:I},keyboardShortcutProps:{id:L},isFocused:ne,isFocusVisible:ne&&w.isFocused&&fm()&&!E,isSelected:O,isPressed:ie,isDisabled:D}}function Gte(e){let{heading:t,"aria-label":n}=e,r=ms();return{itemProps:{role:`presentation`},headingProps:t?{id:r,role:`presentation`}:{},groupProps:{role:`group`,"aria-label":n,"aria-labelledby":t?r:void 0}}}var Xy=2,Kte=50,qte=1e3,Zy=Math.PI/12;function Qy(e){let{menuRef:t,submenuRef:n,isOpen:r,isDisabled:i}=e,a=(0,v.useRef)(void 0),o=(0,v.useRef)(void 0),s=(0,v.useRef)(0),c=(0,v.useRef)(void 0),l=(0,v.useRef)(void 0),u=(0,v.useRef)(void 0),d=(0,v.useRef)(2),[f,p]=(0,v.useState)(!1);rc({ref:r?n:void 0,onResize:()=>{n.current&&(o.current=n.current.getBoundingClientRect(),u.current=void 0)}});let m=()=>{p(!1),d.current=Xy,a.current=void 0},h=hm(),g=$s(e=>{f&&e.preventDefault()});(0,v.useEffect)(()=>{f&&t.current?t.current.style.pointerEvents=`none`:t.current.style.pointerEvents=``},[t,f]),Xo(()=>{let e=n.current,f=t.current;if(i||!e||!r||h!==`pointer`||!f){m();return}o.current=e.getBoundingClientRect();let _=e=>{if(e.pointerType===`touch`||e.pointerType===`pen`)return;let t=Date.now();if(t-s.currento.current.right?`left`:`right`,nf.getBoundingClientRect().right||rf.getBoundingClientRect().bottom){m();return}let i=a.current.x,h=a.current.y,g=u.current===`right`?o.current.left-i:i-o.current.right,_=Math.atan2(h-o.current.top,g)+Zy,v=Math.atan2(h-o.current.bottom,g)-Zy,y=Math.atan2(h-r,u.current===`left`?-(n-i):n-i),b=y<_&&y>v;d.current=b?Math.min(d.current+1,Xy):Math.max(d.current-1,0),d.current>=Xy?p(!0):p(!1),s.current=t,a.current={x:n,y:r},b&&(c.current=setTimeout(()=>{m(),l.current=setTimeout(()=>{let e=document.elementFromPoint(n,r);e&&Ds(f,e)&&e.dispatchEvent(new PointerEvent(`pointerover`,{bubbles:!0,cancelable:!0}))},100)},qte))};return window.addEventListener(`pointermove`,_),window.addEventListener(`pointerdown`,g,!0),()=>{window.removeEventListener(`pointermove`,_),window.removeEventListener(`pointerdown`,g,!0),clearTimeout(c.current),clearTimeout(l.current),d.current=Xy}},[i,r,t,h,p,n])}function $y(e,t,n){let{parentMenuRef:r,submenuRef:i,type:a=`menu`,isDisabled:o,delay:s=200,shouldUseVirtualFocus:c}=e,l=ms(),u=ms(),{direction:d}=bp(),f=(0,v.useRef)(void 0),p=(0,v.useCallback)(()=>{f.current&&=(clearTimeout(f.current),void 0)},[f]),m=(0,v.useCallback)(e=>{p(),t.open(e)},[t,p]),h=(0,v.useCallback)(()=>{p(),t.close()},[t,p]);Xo(()=>()=>{p()},[p]);let{keyboardProps:g}=Sm({shortcuts:{ArrowLeft:e=>{if(!As(e.currentTarget))return!1;if(d===`ltr`&&Ds(e.currentTarget,U(e))){h(),!c&&n.current&&Io(n.current);return}return!1},ArrowRight:e=>{if(!As(e.currentTarget))return!1;if(d===`rtl`&&Ds(e.currentTarget,U(e))){h(),!c&&n.current&&Io(n.current);return}return!1},Escape:e=>{if(!As(e.currentTarget))return!1;if(Ds(i.current,U(e))){h(),!c&&n.current&&Io(n.current);return}return!1}}}),_={id:u,"aria-labelledby":l,submenuLevel:t.submenuLevel,...a===`menu`&&{onClose:t.closeAll,autoFocus:t.focusStrategy??void 0,...g}},{keyboardProps:y}=Sm({shortcuts:{ArrowRight:()=>{if(!o){if(d===`ltr`){t.isOpen||m(`first`),a===`menu`&&i?.current&&Os()===n?.current&&Io(i.current);return}if(t.isOpen){h();return}return!1}return!1},ArrowLeft:()=>{if(!o){if(d===`rtl`){t.isOpen||m(`first`),a===`menu`&&i?.current&&Os()===n?.current&&Io(i.current);return}if(t.isOpen){h();return}return!1}return!1}}});return _c(r,`focusin`,e=>{t.isOpen&&Ds(r.current,U(e))&&U(e)!==n.current&&h()}),Qy({menuRef:r,submenuRef:i,isOpen:t.isOpen,isDisabled:o}),{submenuTriggerProps:{onKeyDown:y.onKeyDown,onKeyUp:y.onKeyUp,id:l,"aria-controls":t.isOpen?u:void 0,"aria-haspopup":o?void 0:a,"aria-expanded":t.isOpen?`true`:`false`,onPressStart:e=>{!o&&(e.pointerType===`virtual`||e.pointerType===`keyboard`)&&m(`first`)},onPress:e=>{!o&&(e.pointerType===`touch`||e.pointerType===`mouse`)&&m()},onHoverChange:e=>{o||(e&&!t.isOpen?f.current||=setTimeout(()=>{m()},s):e||p())},isOpen:t.isOpen},submenuProps:_,popoverProps:{isNonModal:!0,shouldCloseOnInteractOutside:e=>e!==n.current}}}function eb(e){let t=__(e),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)([]),o=()=>{a([]),t.close()},s=(e,t)=>{a(n=>t>n.length?n:[...n.slice(0,t),e])},c=(e,t)=>{a(n=>n[t]===e?n.slice(0,t):n)};return{focusStrategy:n,...t,open(e=null){r(e),t.open()},toggle(e=null){r(e),t.toggle()},close(){o()},expandedKeysStack:i,openSubmenu:s,closeSubmenu:c}}function tb(e,t){let{triggerKey:n}=e,{expandedKeysStack:r,openSubmenu:i,closeSubmenu:a,close:o}=t,[s]=(0,v.useState)(r?.length),c=(0,v.useMemo)(()=>r[s]===n,[r,n,s]),[l,u]=(0,v.useState)(null),d=(0,v.useCallback)(e=>{u(e??null),i(n,s)},[i,s,n]),f=(0,v.useCallback)(()=>{u(null),a(n,s)},[a,s,n]),p=(0,v.useCallback)(e=>{u(e??null),c?f():d(e)},[f,d,c]);return(0,v.useMemo)(()=>({focusStrategy:l,isOpen:c,open:d,close:f,closeAll:o,submenuLevel:s,setOpen:()=>{},toggle:p,point:null,setPoint:()=>{}}),[c,d,f,o,l,p,s])}var nb=class e extends Set{constructor(t,n,r){super(t),t instanceof e?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}},rb=class e{constructor(e,t,n){this.collection=e,this.state=t,this.allowsCellSelection=n?.allowsCellSelection??!1,this._isSelectAll=null,this.layoutDelegate=n?.layoutDelegate||null,this.fullCollection=n?.fullCollection||null}get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,t){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,t)}get selectedKeys(){return this.state.selectedKeys===`all`?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode===`none`)return!1;let t=this.getKey(e);return t==null?!1:this.state.selectedKeys===`all`?this.canSelectItem(t):this.state.selectedKeys.has(t)}get isEmpty(){return this.state.selectedKeys!==`all`&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys===`all`)return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),t=this.state.selectedKeys;return this._isSelectAll=e.every(e=>t.has(e)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);(!e||n&&Ky(this.collection,n,e)<0)&&(e=n)}return e?.key??null}get lastSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);(!e||n&&Ky(this.collection,n,e)>0)&&(e=n)}return e?.key??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode===`none`)return;if(this.selectionMode===`single`){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n;if(this.state.selectedKeys===`all`)n=new nb([t],t,t);else{let e=this.state.selectedKeys,r=e.anchorKey??t;n=new nb(e,r,t);for(let i of this.getKeyRange(r,e.currentKey??t))n.delete(i);for(let e of this.getKeyRange(t,r))this.canSelectItem(e)&&n.add(e)}this.state.setSelectedKeys(n)}getKeyRange(e,t){let n=this.collection.getItem(e),r=this.collection.getItem(t);return n&&r?Ky(this.collection,n,r)<=0?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){if(this.layoutDelegate?.getKeyRange)return this.layoutDelegate.getKeyRange(e,t);let n=[],r=e;for(;r!=null;){let e=this.collection.getItem(r);if(e&&(e.type===`item`||e.type===`cell`&&this.allowsCellSelection)&&n.push(r),r===t)return n;r=this.collection.getKeyAfter(r)}return[]}getKey(e){let t=this.collection.getItem(e);if(!t||t.type===`cell`&&this.allowsCellSelection)return e;for(;t&&t.type!==`item`&&t.parentKey!=null;)t=this.collection.getItem(t.parentKey);return!t||t.type!==`item`?null:t.key}toggleSelection(e){if(this.selectionMode===`none`)return;if(this.selectionMode===`single`&&!this.isSelected(e)){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n=new nb(this.state.selectedKeys===`all`?this.getSelectAllKeys():this.state.selectedKeys);n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode===`none`)return;let t=this.getKey(e);if(t==null)return;let n=this.canSelectItem(t)?new nb([t],t,t):new nb;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode===`none`)return;let t=new nb;for(let n of e){let e=this.getKey(n);if(e!=null&&(t.add(e),this.selectionMode===`single`))break}this.state.setSelectedKeys(t)}getSelectAllKeys(){let e=this.fullCollection??this.collection,t=[],n=r=>{for(;r!=null;){if(this.canSelectItemIn(r,e)){let i=e.getItem(r);i?.type===`item`&&t.push(r),i?.hasChildNodes&&(this.allowsCellSelection||i.type!==`item`)&&n(Uy(Hy(i,e))?.key??null)}r=e.getKeyAfter(r)}};return n(e.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode===`multiple`&&this.state.setSelectedKeys(`all`)}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys===`all`||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new nb)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode!==`none`&&(this.selectionMode===`single`?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior===`toggle`||t&&(t.pointerType===`touch`||t.pointerType===`virtual`)?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let t=this.selectedKeys;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;for(let n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){return this.canSelectItemIn(e,this.collection)}canSelectItemIn(e,t){if(this.state.selectionMode===`none`||this.state.disabledKeys.has(e))return!1;let n=t.getItem(e);return!(!n||n?.props?.isDisabled||n.type===`cell`&&!this.allowsCellSelection)}isDisabled(e){let t=this.collection.getItem(e);return this.state.disabledBehavior===`all`&&(this.state.disabledKeys.has(e)||!!t?.props?.isDisabled)&&t?.props?.disabledBehavior!==`selection`}isLink(e){return!!this.collection.getItem(e)?.props?.href}getItemProps(e){return this.collection.getItem(e)?.props}withCollection(t){return new e(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0,fullCollection:this.fullCollection??this.collection})}},ib=class{constructor(e,{expandedKeys:t}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,t||=new Set;let n=e=>{if(this.keyMap.set(e.key,e),e.childNodes&&(e.type===`section`||t.has(e.key)))for(let t of e.childNodes)n(t)};for(let t of e)n(t);let r=null,i=0;for(let[e,t]of this.keyMap)r?(r.nextKey=e,t.prevKey=r.key):(this.firstKey=e,t.prevKey=void 0),t.type===`item`&&(t.index=i++),r=t,r.nextKey=void 0;this.lastKey=r?.key??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);return t?t.prevKey??null:null}getKeyAfter(e){let t=this.keyMap.get(e);return t?t.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){let t=[...this.getKeys()];return this.getItem(t[e])}},ab=class{build(e,t){return this.context=t,ob(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:t,items:n}=e;if(v.isValidElement(t)&&t.type===v.Fragment)yield*this.iterateCollection({children:t.props.children,items:n});else if(typeof t==`function`){if(!n)throw Error(`props.children was a function but props.items is missing`);let e=0;for(let r of n)yield*this.getFullNode({value:r,index:e},{renderer:t}),e++}else{let e=[];v.Children.forEach(t,t=>{t&&e.push(t)});let n=0;for(let t of e){let e=this.getFullNode({element:t,index:n},{});for(let t of e)n++,yield t}}}getKey(e,t,n,r){if(e.key!=null)return e.key;if(t.type===`cell`&&t.key!=null)return`${r}${t.key}`;let i=t.value;if(i!=null){let e=i.key??i.id;if(e==null)throw Error(`No key found for item`);return e}return r?`${r}.${t.index}`:`$.${t.index}`}getChildState(e,t){return{renderer:t.renderer||e.renderer}}*getFullNode(e,t,n,r){if(v.isValidElement(e.element)&&e.element.type===v.Fragment){let i=[];v.Children.forEach(e.element.props.children,e=>{i.push(e)});let a=e.index??0;for(let e of i)yield*this.getFullNode({element:e,index:a++},t,n,r);return}let i=e.element;if(!i&&e.value&&t&&t.renderer){let n=this.cache.get(e.value);if(n&&(!n.shouldInvalidate||!n.shouldInvalidate(this.context))){n.index=e.index,n.parentKey=r?r.key:null,yield n;return}i=t.renderer(e.value)}if(v.isValidElement(i)){let a=i.type;if(typeof a!=`function`&&typeof a.getCollectionNode!=`function`){let e=i.type;throw Error(`Unknown element <${e}> in collection.`)}let o=a.getCollectionNode(i.props,this.context),s=e.index??0,c=o.next();for(;!c.done&&c.value;){let a=c.value;e.index=s;let l=a.key??null;l??=a.element?null:this.getKey(i,e,t,n);let u=[...this.getFullNode({...a,key:l,index:s,wrapper:sb(e.wrapper,a.wrapper)},this.getChildState(t,a),n?`${n}${i.key}`:i.key,r)];for(let t of u){if(t.value=a.value??e.value??null,t.value&&this.cache.set(t.value,t),e.type&&t.type!==e.type)throw Error(`Unsupported type <${cb(t.type)}> in <${cb(r?.type??`unknown parent type`)}>. Only <${cb(e.type)}> is supported.`);s++,yield t}c=o.next(u)}return}if(e.key==null||e.type==null)return;let a=this,o={type:e.type,props:e.props,key:e.key,parentKey:r?r.key:null,value:e.value??null,level:(r?.level??0)+ +(r?.type===`item`),index:e.index,rendered:e.rendered,textValue:e.textValue??``,"aria-label":e[`aria-label`],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:ob(function*(){if(!e.hasChildNodes||!e.childNodes)return;let n=0;for(let r of e.childNodes()){r.key!=null&&(r.key=`${o.key}${r.key}`);let e=a.getFullNode({...r,index:n},a.getChildState(t,r),o.key,o);for(let t of e)n++,yield t}})};yield o}constructor(){this.cache=new WeakMap}};function ob(e){let t=[],n=null;return{*[Symbol.iterator](){for(let e of t)yield e;n||=e();for(let e of n)t.push(e),yield e}}}function sb(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function cb(e){return e[0].toUpperCase()+e.slice(1)}function lb(e,t,n){let r=(0,v.useMemo)(()=>new ab,[]),{children:i,items:a,collection:o}=e;return(0,v.useMemo)(()=>o||t(r.build({children:i,items:a},n)),[r,i,a,o,n,t])}function ub(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function db(e){let{selectionMode:t=`none`,disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i=`toggle`,disabledBehavior:a=`all`}=e,o=(0,v.useRef)(!1),[,s]=(0,v.useState)(!1),c=(0,v.useRef)(null),l=(0,v.useRef)(null),[,u]=(0,v.useState)(null),[d,f]=eh((0,v.useMemo)(()=>fb(e.selectedKeys),[e.selectedKeys]),(0,v.useMemo)(()=>fb(e.defaultSelectedKeys,new nb),[e.defaultSelectedKeys]),e.onSelectionChange),p=(0,v.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[m,h]=(0,v.useState)(i);i===`replace`&&m===`toggle`&&typeof d==`object`&&d.size===0&&h(`replace`);let g=(0,v.useRef)(i);return(0,v.useEffect)(()=>{i!==g.current&&(h(i),g.current=i)},[i]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:m,setSelectionBehavior:h,get isFocused(){return o.current},setFocused(e){o.current=e,s(e)},get focusedKey(){return c.current},get childFocusStrategy(){return l.current},setFocusedKey(e,t=`first`){c.current=e,l.current=t,u(e)},selectedKeys:d,setSelectedKeys(e){(r||!ub(e,d))&&f(e)},disabledKeys:p,disabledBehavior:a}}function fb(e,t){return e?e===`all`?`all`:new nb(e):t}function pb(e){let{onExpandedChange:t}=e,[n,r]=eh(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),i=db(e),a=(0,v.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),o=lb(e,(0,v.useCallback)(e=>new ib(e,{expandedKeys:n}),[n]),null);return(0,v.useEffect)(()=>{i.focusedKey!=null&&!o.getItem(i.focusedKey)&&i.setFocusedKey(null)},[o,i.focusedKey]),{collection:o,expandedKeys:n,disabledKeys:a,toggleKey:e=>{r(mb(n,e))},setExpandedKeys:r,selectionManager:new rb(o,i)}}function mb(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}var hb=(0,v.createContext)(null),gb=(0,v.createContext)(null),_b=(0,v.createContext)(null),vb=(0,v.createContext)(null);function yb(e){let t=eb(e),n=(0,v.useRef)(null),{menuTriggerProps:r,menuProps:i}=Ey({...e,type:`menu`},t,n),a=(0,v.useRef)(null);return op()?null:v.createElement(qf,{values:[[hb,{...i,ref:a}],[jb,t],[_b,t],[v_,{trigger:`MenuTrigger`,triggerRef:n,scrollRef:a,placement:`bottom start`,"aria-labelledby":i[`aria-labelledby`],offset:e.trigger===`contextMenu`?0:void 0}]]},v.createElement(f_,{...r,ref:n,isPressed:t.isOpen},e.children))}var bb=(0,v.createContext)(null),xb=V_(class extends x_{static{this.type=`submenutrigger`}filter(e,t,n){let r=e.getItem(this.firstChildKey);if(r&&n(r.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}},(e,t,n)=>{let{CollectionBranch:r}=(0,v.useContext)(J_),i=(0,v.useContext)(gb),a=(0,v.useContext)(_b),o=tb({triggerKey:n.key},a),s=(0,v.useRef)(null),c=Zs(t),{parentMenuRef:l,shouldUseVirtualFocus:u}=(0,v.useContext)(bb),{submenuTriggerProps:d,submenuProps:f,popoverProps:p}=$y({parentMenuRef:l,submenuRef:s,delay:e.delay,shouldUseVirtualFocus:u},o,c);return v.createElement(qf,{values:[[Db,{...d,onAction:void 0,ref:c}],[hb,{ref:s,...f}],[jb,o],[v_,{trigger:`SubmenuTrigger`,triggerRef:c,placement:`end top`,"aria-labelledby":f[`aria-labelledby`],...p}]]},v.createElement(r,{collection:i.collection,parent:n}),e.children[1])},e=>e.children[0]),Sb=(0,v.forwardRef)(function(e,t){return[e,t]=Zf(e,t,hb),v.createElement(L_,{content:v.createElement(W_,e)},n=>v.createElement(Cb,{props:e,collection:n,menuRef:t}))});function Cb({props:e,collection:t,menuRef:n}){[e,n]=Zf(e,n,Fv);let{filter:r,...i}=e,a=(0,v.useMemo)(()=>r?t.filter(r):t,[t,r]),o=pb({...e,collection:a,children:void 0}),s=(0,v.useContext)(_b),{isVirtualized:c,CollectionRoot:l}=(0,v.useContext)(J_),{menuProps:u}=Ute({...e,isVirtualized:c,onClose:e.onClose||s?.close},o,n),d=Jf({...e,children:void 0,defaultClassName:`react-aria-Menu`,values:{isEmpty:o.collection.size===0}}),f=null;o.collection.size===0&&e.renderEmptyState&&(f=v.createElement(`div`,{role:`menuitem`,style:{display:`contents`}},e.renderEmptyState()));let p=Us(e,{global:!0});return v.createElement(Gh,null,v.createElement(np.div,{...W(p,d,u),ref:n,slot:e.slot||void 0,"data-empty":o.collection.size===0||void 0,onScroll:e.onScroll},v.createElement(qf,{values:[[gb,o],[Vv,{elementType:`div`}],[G_,{name:`MenuSection`,render:Tb}],[bb,{parentMenuRef:n,shouldUseVirtualFocus:i?.shouldUseVirtualFocus}],[Db,{shouldCloseOnSelect:e.shouldCloseOnSelect}],[Fv,null],[Iv,null],[vb,o.selectionManager],[_b,s??eb({})]]},v.createElement(zv,null,v.createElement(l,{collection:o.collection,persistedKeys:Y_(o.selectionManager.focusedKey),scrollRef:n}))),f))}var wb=class extends rb{constructor(e,t){super(e.collection,t),this.parent=e}get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,t){return this.parent.setFocusedKey(e,t)}setFocused(e){this.parent.setFocused(e)}get childFocusStrategy(){return this.parent.childFocusStrategy}};function Tb(e,t,n,r=`react-aria-MenuSection`){let i=(0,v.useContext)(gb),{CollectionBranch:a}=(0,v.useContext)(J_),[o,s]=Qf(),{headingProps:c,groupProps:l}=Gte({heading:s,"aria-label":n.props[`aria-label`]??void 0}),u=Jf({...e,id:void 0,children:void 0,defaultClassName:r,className:n.props?.className,style:n.props?.style,values:void 0}),d=(0,v.useContext)(vb),f=db(e),p=e.selectionMode==null?d:new wb(d,f),m=Xf(Db)?.shouldCloseOnSelect,h=Us(e,{global:!0});return delete h.id,v.createElement(np.section,{...W(h,u,l),ref:t},v.createElement(qf,{values:[[Lv,{...c,ref:o}],[vb,p],[Db,{shouldCloseOnSelect:e.shouldCloseOnSelect??m}]]},v.createElement(a,{collection:i.collection,parent:n})))}var Eb=V_(T_,Tb),Db=(0,v.createContext)(null),Ob=B_(w_,function(e,t,n){[e,t]=Zf(e,t,Db);let r=Xf(Db)?.id,i=(0,v.useContext)(gb),a=Zs(t),o=(0,v.useContext)(vb),{isVirtualized:s}=(0,v.useContext)(J_),{menuItemProps:c,labelProps:l,descriptionProps:u,keyboardShortcutProps:d,...f}=Wte({...e,id:r,key:n.key,selectionManager:o,isVirtualized:s},i,a),{hoverProps:p,isHovered:m}=Zm({isDisabled:f.isDisabled}),h=Jf({...e,id:void 0,children:n.rendered,defaultClassName:`react-aria-MenuItem`,values:{...f,isHovered:m,isFocusVisible:f.isFocusVisible,selectionMode:o.selectionMode,selectionBehavior:o.selectionBehavior,hasSubmenu:!!e[`aria-haspopup`],isOpen:e[`aria-expanded`]===`true`}}),g=e.href?np.a:np.div,_=Us(e,{global:!0});return delete _.id,delete _.onClick,v.createElement(g,{...W(_,h,c,p),ref:a,"data-disabled":f.isDisabled||void 0,"data-hovered":m||void 0,"data-focused":f.isFocused||void 0,"data-focus-visible":f.isFocusVisible||void 0,"data-pressed":f.isPressed||void 0,"data-selected":f.isSelected||void 0,"data-selection-mode":o.selectionMode===`none`?void 0:o.selectionMode,"data-has-submenu":!!e[`aria-haspopup`]||void 0,"data-open":e[`aria-expanded`]===`true`||void 0},v.createElement(qf,{values:[[Hv,{slots:{[Kf]:l,label:l,description:u}}],[jte,d],[Bv,{isSelected:f.isSelected}]]},h.children))});function kb(e,t){let{role:n=`dialog`}=e,r=gs();r=e[`aria-label`]?void 0:r;let i=gs();i=n===`alertdialog`&&!e[`aria-describedby`]?i:void 0;let a=(0,v.useRef)(!1);(0,v.useEffect)(()=>{if(t.current&&!As(t.current)){_m(t.current);let e=setTimeout(()=>{(Os()===t.current||Os()===document.body)&&(a.current=!0,t.current&&(t.current.blur(),_m(t.current)),a.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),g_(),(0,v.useRef)(!1),(0,v.useEffect)(()=>{});let o=e[`aria-describedby`]??i;return{dialogProps:{...Us(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e[`aria-labelledby`]??r,"aria-describedby":o,onBlur:e=>{a.current&&e.stopPropagation()}},titleProps:{id:r},contentProps:{id:i}}}var Ab=(0,v.createContext)(null),jb=(0,v.createContext)(null);function Mb(e){let t=eb(e),n=(0,v.useRef)(null),{triggerProps:r,overlayProps:i}=Ty({type:`dialog`},t,n);return r.id=ms(),i[`aria-labelledby`]=r.id,v.createElement(qf,{values:[[jb,t],[_b,t],[Ab,i],[v_,{trigger:`DialogTrigger`,triggerRef:n,id:i.id,"aria-labelledby":i[`aria-labelledby`]}]]},v.createElement(f_,{...r,ref:n,isPressed:t.isOpen},e.children))}var Nb=(0,v.forwardRef)(function(e,t){let n=e[`aria-labelledby`];[e,t]=Zf(e,t,Ab);let{dialogProps:r,titleProps:i,contentProps:a}=kb({...e,"aria-labelledby":n},t),o=(0,v.useContext)(jb);!r[`aria-label`]&&!r[`aria-labelledby`]&&e[`aria-labelledby`]&&(r[`aria-labelledby`]=e[`aria-labelledby`]);let s=Jf({defaultClassName:`react-aria-Dialog`,className:e.className,style:e.style,children:e.children,values:{close:o?.close||(()=>{})}}),c=Us(e,{global:!0});return v.createElement(np.section,{...W(c,s,r),render:e.render,ref:t,slot:e.slot||void 0},v.createElement(qf,{values:[[ih,{slots:{[Kf]:{},title:{...i,level:2}}}],[Hv,{slots:{[Kf]:{},description:a}}],[Qm,{slots:{[Kf]:{},close:{onPress:()=>o?.close()}}}]]},s.children))});function Pb(e,t,n){let{overlayProps:r,underlayProps:i}=ug({...e,isOpen:t.isOpen,onClose:t.close},n);return mg({isDisabled:!t.isOpen}),g_(),(0,v.useEffect)(()=>{if(t.isOpen&&n.current)return wh([n.current],{shouldUseInert:!0})},[t.isOpen,n]),{modalProps:W(r),underlayProps:i}}var Fb=(0,v.createContext)(null),Ib=(0,v.createContext)(null),Lb=(0,v.forwardRef)(function(e,t){if((0,v.useContext)(Ib))return v.createElement(zb,{...e,modalRef:t},e.children);let{isDismissable:n,isKeyboardDismissDisabled:r,isOpen:i,defaultOpen:a,onOpenChange:o,children:s,isEntering:c,isExiting:l,UNSTABLE_portalContainer:u,shouldCloseOnInteractOutside:d,...f}=e;return v.createElement(Rb,{isDismissable:n,isKeyboardDismissDisabled:r,isOpen:i,defaultOpen:a,onOpenChange:o,isEntering:c,isExiting:l,UNSTABLE_portalContainer:u,shouldCloseOnInteractOutside:d},v.createElement(zb,{...f,modalRef:t},s))});function Jte(e,t){[e,t]=Zf(e,t,Fb);let n=(0,v.useContext)(jb),r=__(e),i=e.isOpen!=null||e.defaultOpen!=null||!n?r:n,a=Zs(t),o=(0,v.useRef)(null),s=Oc(a,i.isOpen),c=Oc(o,i.isOpen),l=s||c||e.isExiting||!1,u=cs();return!i.isOpen&&!l||u?null:v.createElement(Yte,{...e,state:i,isExiting:l,overlayRef:a,modalRef:o})}var Rb=(0,v.forwardRef)(Jte);function Yte({UNSTABLE_portalContainer:e,...t}){let n=t.modalRef,{state:r}=t,{modalProps:i,underlayProps:a}=Pb(t,r,n),o=Dc(t.overlayRef)||t.isEntering||!1,s=Jf({...t,defaultClassName:`react-aria-ModalOverlay`,values:{isEntering:o,isExiting:t.isExiting,state:r}}),c=fc(),l,u;if(typeof document<`u`){let e=ac(document.body)?document.body:document.scrollingElement||document.documentElement,t=e.getBoundingClientRect().width%1,n=e.getBoundingClientRect().height%1;l=e.scrollWidth-t,u=e.scrollHeight-n}let d={...s.style,"--visual-viewport-width":c.width+`px`,"--visual-viewport-height":c.height+`px`,"--page-width":l===void 0?void 0:l+`px`,"--page-height":u===void 0?void 0:u+`px`};return v.createElement(h_,{isExiting:t.isExiting,portalContainer:e},v.createElement(np.div,{...W(Us(t,{global:!0}),a),...s,style:d,ref:t.overlayRef,"data-entering":o||void 0,"data-exiting":t.isExiting||void 0},v.createElement(qf,{values:[[Ib,{modalProps:i,modalRef:n,isExiting:t.isExiting,isDismissable:t.isDismissable}],[jb,r]]},s.children)))}function zb(e){let{modalProps:t,modalRef:n,isExiting:r,isDismissable:i}=(0,v.useContext)(Ib),a=(0,v.useContext)(jb),o=Zs((0,v.useMemo)(()=>Ns(e.modalRef,n),[e.modalRef,n])),s=Dc(o),c=Jf({...e,defaultClassName:`react-aria-Modal`,values:{isEntering:s,isExiting:r,state:a}});return v.createElement(np.div,{...W(Us(e,{global:!0}),t),...c,ref:o,"data-entering":s||void 0,"data-exiting":r||void 0},i&&v.createElement(d_,{onDismiss:a.close}),c.children)}var Bb=v.forwardRef(({children:e,...t},n)=>{n=Zs(n);let{pressProps:r}=Fm({...t,ref:n}),{focusableProps:i}=wm(t,n),a=v.Children.only(e);(0,v.useEffect)(()=>{},[n,t.isDisabled]);let o=a.props.ref;return v.cloneElement(a,{...W(r,i,a.props),ref:Ns(o,n)})}),Vb=({children:e,className:t,slot:n,style:r,variant:i,...a})=>{let o=(0,v.useMemo)(()=>df({variant:i}),[i]);return(0,G.jsx)($m,{"aria-label":`Close`,className:K(t,o),"data-slot":`close-button`,slot:n,style:r,type:`button`,...a,children:t=>typeof e==`function`?e(t):e??(0,G.jsx)(dh,{"data-slot":`close-button-icon`})})},Hb=Object.assign(Vb,{Root:Vb}),Ub=(0,v.createContext)({}),Wb=({children:e,...t})=>{let n=(0,v.useMemo)(()=>({slots:nf(),placement:void 0}),[]);return(0,G.jsx)(Ub,{value:n,children:(0,G.jsx)(Mb,{"data-slot":`alert-dialog-root`,...t,children:e})})},Gb=Object.assign(Wb,{Root:Wb,Trigger:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Ub);return(0,G.jsx)(Bb,{children:(0,G.jsx)(`div`,{className:q(r?.trigger,t),"data-slot":`alert-dialog-trigger`,role:`button`,...n,children:e})})},Backdrop:({children:e,className:t,isDismissable:n=!1,isKeyboardDismissDisabled:r=!0,onClick:i,variant:a,...o})=>{let{slots:s}=(0,v.use)(Ub),c=(0,v.useMemo)(()=>nf({variant:a}),[a]),l=(0,v.useMemo)(()=>({slots:{...s,...c}}),[s,c]);return(0,G.jsx)(Rb,{className:K(t,c?.backdrop()),"data-slot":`alert-dialog-backdrop`,isDismissable:n,isKeyboardDismissDisabled:r,onClick:e=>{e.stopPropagation(),i?.(e)},...o,children:t=>(0,G.jsxs)(Ub,{value:l,children:[typeof e==`function`?e(t):e,` `]})})},Container:({children:e,className:t,placement:n=`auto`,size:r,...i})=>{let{slots:a}=(0,v.use)(Ub),o=(0,v.useMemo)(()=>nf({size:r}),[r]),s=(0,v.useMemo)(()=>({placement:n,slots:{...a,...o}}),[n,a,o]);return(0,G.jsx)(Lb,{className:K(t,o?.container()),"data-placement":n,"data-slot":`alert-dialog-container`,...i,children:t=>(0,G.jsx)(Ub,{value:s,children:typeof e==`function`?e(t):e})})},Dialog:({children:e,className:t,...n})=>{let{placement:r,slots:i}=(0,v.use)(Ub);return(0,G.jsx)(Nb,{className:q(i?.dialog,t),"data-placement":r,"data-slot":`alert-dialog-dialog`,role:`alertdialog`,...n,children:e})},Header:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Ub);return(0,G.jsx)(`div`,{className:q(r?.header,t),"data-slot":`alert-dialog-header`,...n,children:e})},Heading:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Ub);return(0,G.jsx)(ah,{className:q(r?.heading,t),"data-slot":`alert-dialog-heading`,slot:`title`,...n,children:e})},Body:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Ub);return(0,G.jsx)(`div`,{className:q(r?.body,t),"data-slot":`alert-dialog-body`,...n,children:e})},Footer:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Ub);return(0,G.jsx)(`div`,{className:q(r?.footer,t),"data-slot":`alert-dialog-footer`,...n,children:e})},Icon:({children:e,className:t,status:n=`danger`,...r})=>{let i=(0,v.useMemo)(()=>nf({status:n}),[n]),a=()=>{switch(n){case`default`:return(0,G.jsx)(fh,{"data-slot":`alert-dialog-default-icon`});case`accent`:return(0,G.jsx)(fh,{"data-slot":`alert-dialog-default-icon`});case`success`:return(0,G.jsx)(hh,{"data-slot":`alert-dialog-default-icon`});case`warning`:return(0,G.jsx)(ph,{"data-slot":`alert-dialog-default-icon`});case`danger`:return(0,G.jsx)(mh,{"data-slot":`alert-dialog-default-icon`});default:return(0,G.jsx)(mh,{"data-slot":`alert-dialog-default-icon`})}};return(0,G.jsx)(Xc.div,{className:i?.icon({className:t}),"data-slot":`alert-dialog-icon`,...r,children:e??a()})},CloseTrigger:({className:e,...t})=>{let{slots:n}=(0,v.use)(Ub);return(0,G.jsx)(Hb,{className:K(e,n?.closeTrigger()),"data-slot":`alert-dialog-close-trigger`,slot:`close`,...t})}});function Xte(e){let t=Ly({usage:`search`,...e}),n=(0,v.useCallback)((e,n)=>n.length===0||(e=e.normalize(`NFC`),n=n.normalize(`NFC`),t.compare(e.slice(0,n.length),n)===0),[t]),r=(0,v.useCallback)((e,n)=>n.length===0||(e=e.normalize(`NFC`),n=n.normalize(`NFC`),t.compare(e.slice(-n.length),n)===0),[t]),i=(0,v.useCallback)((e,n)=>{if(n.length===0)return!0;e=e.normalize(`NFC`),n=n.normalize(`NFC`);let r=0,i=n.length;for(;r+i<=e.length;r++){let a=e.slice(r,r+i);if(t.compare(n,a)===0)return!0}return!1},[t]);return(0,v.useMemo)(()=>({startsWith:n,endsWith:r,contains:i}),[n,r,i])}var Kb=(0,v.createContext)({}),qb=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,Kb);let{isDisabled:n,isInvalid:r,isReadOnly:i,onHoverStart:a,onHoverChange:o,onHoverEnd:s,...c}=e;n??=!!e[`aria-disabled`]&&e[`aria-disabled`]!==`false`,r??=!!e[`aria-invalid`]&&e[`aria-invalid`]!==`false`;let{hoverProps:l,isHovered:u}=Zm({onHoverStart:a,onHoverChange:o,onHoverEnd:s,isDisabled:n}),{isFocused:d,isFocusVisible:f,focusProps:p}=Gm({within:!0}),m=Jf({...e,values:{isHovered:u,isFocusWithin:d,isFocusVisible:f,isDisabled:n,isInvalid:r},defaultClassName:`react-aria-Group`});return v.createElement(np.div,{...W(c,p,l),...m,ref:t,role:e.role??`group`,slot:e.slot??void 0,"data-focus-within":d||void 0,"data-hovered":u||void 0,"data-focus-visible":f||void 0,"data-disabled":n||void 0,"data-invalid":r||void 0,"data-readonly":i||void 0},m.children)}),Jb=(0,v.createContext)(null),Yb={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},Xb={...Yb,customError:!0,valid:!1},Zb={isInvalid:!1,validationDetails:Yb,validationErrors:[]},Qb=(0,v.createContext)({}),$b=`__reactAriaFormValidationState`;function ex(e){if(e.__reactAriaFormValidationState){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}=e[$b];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}}return Zte(e)}function Zte(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:a,validate:o,validationBehavior:s=`aria`}=e;n&&(t||=n===`invalid`);let c=t===void 0?null:{isInvalid:t,validationErrors:[],validationDetails:Xb},l=(0,v.useMemo)(()=>!o||i==null?null:nx(Qte(o,i)),[o,i]);a?.validationDetails.valid&&(a=void 0);let u=(0,v.useContext)(Qb),d=(0,v.useMemo)(()=>r?Array.isArray(r)?r.flatMap(e=>tx(u[e])):tx(u[r]):[],[u,r]),[f,p]=(0,v.useState)(u),[m,h]=(0,v.useState)(!1);u!==f&&(p(u),h(!1));let g=(0,v.useMemo)(()=>nx(m?[]:d),[m,d]),_=(0,v.useRef)(Zb),[y,b]=(0,v.useState)(Zb),x=(0,v.useRef)(Zb),S=()=>{if(!C)return;w(!1);let e=l||a||_.current;rx(e,x.current)||(x.current=e,b(e))},[C,w]=(0,v.useState)(!1);return(0,v.useEffect)(S),{realtimeValidation:c||g||l||a||Zb,displayValidation:s===`native`?c||g||y:c||g||l||a||y,updateValidation(e){s===`aria`&&!rx(y,e)?b(e):_.current=e},resetValidation(){let e=Zb;rx(e,x.current)||(x.current=e,b(e)),s===`native`&&w(!1),h(!0)},commitValidation(){s===`native`&&w(!0),h(!0)}}}function tx(e){return e?Array.isArray(e)?e:[e]:[]}function Qte(e,t){if(typeof e==`function`){let n=e(t);if(n&&typeof n!=`boolean`)return tx(n)}return[]}function nx(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:Xb}:null}function rx(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,n)=>e===t.validationErrors[n])&&Object.entries(e.validationDetails).every(([e,n])=>t.validationDetails[e]===n)}function ix(...e){let t=new Set,n=!1,r={...Yb};for(let i of e){for(let e of i.validationErrors)t.add(e);n||=i.isInvalid;for(let e in r)r[e]||=i.validationDetails[e]}return r.valid=!n,{isInvalid:n,validationErrors:[...t],validationDetails:r}}var ax=(0,v.createContext)(null),$te=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,ax);let{validationErrors:n,validationBehavior:r=`native`,children:i,className:a,...o}=e;return v.createElement(np.form,{noValidate:r!==`native`,...o,ref:t,className:a||`react-aria-Form`},v.createElement(ax.Provider,{value:{...e,validationBehavior:r}},v.createElement(Qb.Provider,{value:n??{}},i)))}),ox={};ox={colorSwatchPicker:`تغييرات الألوان`,dropzoneLabel:`DropZone`,selectPlaceholder:`حدد عنصرًا`,tableResizer:`أداة تغيير الحجم`};var sx={};sx={colorSwatchPicker:`Цветови мостри`,dropzoneLabel:`DropZone`,selectPlaceholder:`Изберете предмет`,tableResizer:`Преоразмерител`};var cx={};cx={colorSwatchPicker:`Vzorky barev`,dropzoneLabel:`Místo pro přetažení`,selectPlaceholder:`Vyberte položku`,tableResizer:`Změna velikosti`};var lx={};lx={colorSwatchPicker:`Farveprøver`,dropzoneLabel:`DropZone`,selectPlaceholder:`Vælg et element`,tableResizer:`Størrelsesændring`};var ux={};ux={colorSwatchPicker:`Farbfelder`,dropzoneLabel:`Ablegebereich`,selectPlaceholder:`Element wählen`,tableResizer:`Größenanpassung`};var dx={};dx={colorSwatchPicker:`Χρωματικά δείγματα`,dropzoneLabel:`DropZone`,selectPlaceholder:`Επιλέξτε ένα αντικείμενο`,tableResizer:`Αλλαγή μεγέθους`};var fx={};fx={selectPlaceholder:`Select an item`,tableResizer:`Resizer`,dropzoneLabel:`DropZone`,colorSwatchPicker:`Color swatches`};var px={};px={colorSwatchPicker:`Muestras de colores`,dropzoneLabel:`DropZone`,selectPlaceholder:`Seleccionar un artículo`,tableResizer:`Cambiador de tamaño`};var mx={};mx={colorSwatchPicker:`Värvinäidised`,dropzoneLabel:`DropZone`,selectPlaceholder:`Valige üksus`,tableResizer:`Suuruse muutja`};var hx={};hx={colorSwatchPicker:`Värimallit`,dropzoneLabel:`DropZone`,selectPlaceholder:`Valitse kohde`,tableResizer:`Koon muuttaja`};var gx={};gx={colorSwatchPicker:`Échantillons de couleurs`,dropzoneLabel:`DropZone`,selectPlaceholder:`Sélectionner un élément`,tableResizer:`Redimensionneur`};var _x={};_x={colorSwatchPicker:`דוגמיות צבע`,dropzoneLabel:`DropZone`,selectPlaceholder:`בחר פריט`,tableResizer:`שינוי גודל`};var vx={};vx={colorSwatchPicker:`Uzorci boja`,dropzoneLabel:`Zona spuštanja`,selectPlaceholder:`Odaberite stavku`,tableResizer:`Promjena veličine`};var yx={};yx={colorSwatchPicker:`Színtárak`,dropzoneLabel:`DropZone`,selectPlaceholder:`Válasszon ki egy elemet`,tableResizer:`Átméretező`};var bx={};bx={colorSwatchPicker:`Campioni di colore`,dropzoneLabel:`Zona di rilascio`,selectPlaceholder:`Seleziona un elemento`,tableResizer:`Ridimensionamento`};var xx={};xx={colorSwatchPicker:`カラースウォッチ`,dropzoneLabel:`ドロップゾーン`,selectPlaceholder:`項目を選択`,tableResizer:`サイズ変更ツール`};var Sx={};Sx={colorSwatchPicker:`색상 견본`,dropzoneLabel:`드롭 영역`,selectPlaceholder:`항목 선택`,tableResizer:`크기 조정기`};var Cx={};Cx={colorSwatchPicker:`Spalvų pavyzdžiai`,dropzoneLabel:`„DropZone“`,selectPlaceholder:`Pasirinkite elementą`,tableResizer:`Dydžio keitiklis`};var wx={};wx={colorSwatchPicker:`Krāsu paraugi`,dropzoneLabel:`DropZone`,selectPlaceholder:`Izvēlēties vienumu`,tableResizer:`Izmēra mainītājs`};var Tx={};Tx={colorSwatchPicker:`Fargekart`,dropzoneLabel:`Droppsone`,selectPlaceholder:`Velg et element`,tableResizer:`Størrelsesendrer`};var Ex={};Ex={colorSwatchPicker:`kleurstalen`,dropzoneLabel:`DropZone`,selectPlaceholder:`Selecteer een item`,tableResizer:`Resizer`};var Dx={};Dx={colorSwatchPicker:`Próbki kolorów`,dropzoneLabel:`Strefa upuszczania`,selectPlaceholder:`Wybierz element`,tableResizer:`Zmiana rozmiaru`};var Ox={};Ox={colorSwatchPicker:`Amostras de cores`,dropzoneLabel:`DropZone`,selectPlaceholder:`Selecione um item`,tableResizer:`Redimensionador`};var kx={};kx={colorSwatchPicker:`Amostras de cores`,dropzoneLabel:`DropZone`,selectPlaceholder:`Selecione um item`,tableResizer:`Redimensionador`};var Ax={};Ax={colorSwatchPicker:`Specimene de culoare`,dropzoneLabel:`Zonă de plasare`,selectPlaceholder:`Selectați un element`,tableResizer:`Instrument de redimensionare`};var jx={};jx={colorSwatchPicker:`Цветовые образцы`,dropzoneLabel:`DropZone`,selectPlaceholder:`Выберите элемент`,tableResizer:`Средство изменения размера`};var Mx={};Mx={colorSwatchPicker:`Vzorkovníky farieb`,dropzoneLabel:`DropZone`,selectPlaceholder:`Vyberte položku`,tableResizer:`Nástroj na zmenu veľkosti`};var Nx={};Nx={colorSwatchPicker:`Barvne palete`,dropzoneLabel:`DropZone`,selectPlaceholder:`Izberite element`,tableResizer:`Spreminjanje velikosti`};var Px={};Px={colorSwatchPicker:`Uzorci boje`,dropzoneLabel:`DropZone`,selectPlaceholder:`Izaberite stavku`,tableResizer:`Promena veličine`};var Fx={};Fx={colorSwatchPicker:`Färgrutor`,dropzoneLabel:`DropZone`,selectPlaceholder:`Välj en artikel`,tableResizer:`Storleksändrare`};var Ix={};Ix={colorSwatchPicker:`Renk örnekleri`,dropzoneLabel:`Bırakma Bölgesi`,selectPlaceholder:`Bir öğe seçin`,tableResizer:`Yeniden boyutlandırıcı`};var Lx={};Lx={colorSwatchPicker:`Зразки кольорів`,dropzoneLabel:`DropZone`,selectPlaceholder:`Виберіть елемент`,tableResizer:`Засіб змінення розміру`};var Rx={};Rx={colorSwatchPicker:`颜色色板`,dropzoneLabel:`放置区域`,selectPlaceholder:`选择一个项目`,tableResizer:`尺寸调整器`};var zx={};zx={colorSwatchPicker:`色票`,dropzoneLabel:`放置區`,selectPlaceholder:`選取項目`,tableResizer:`大小調整器`};var Bx={};Bx={"ar-AE":ox,"bg-BG":sx,"cs-CZ":cx,"da-DK":lx,"de-DE":ux,"el-GR":dx,"en-US":fx,"es-ES":px,"et-EE":mx,"fi-FI":hx,"fr-FR":gx,"he-IL":_x,"hr-HR":vx,"hu-HU":yx,"it-IT":bx,"ja-JP":xx,"ko-KR":Sx,"lt-LT":Cx,"lv-LV":wx,"nb-NO":Tx,"nl-NL":Ex,"pl-PL":Dx,"pt-BR":Ox,"pt-PT":kx,"ro-RO":Ax,"ru-RU":jx,"sk-SK":Mx,"sl-SI":Nx,"sr-SP":Px,"sv-SE":Fx,"tr-TR":Ix,"uk-UA":Lx,"zh-CN":Rx,"zh-TW":zx};var Vx=(0,v.createContext)({}),Hx=(0,v.createContext)(null),ene=(0,v.forwardRef)(function(e,t){let{render:n}=(0,v.useContext)(Hx);return v.createElement(v.Fragment,null,n(e,t))});function Ux(e,t){let n=e?.renderDropIndicator,r=e?.isVirtualDragging?.(),i=(0,v.useCallback)(e=>{if(r||t?.isDropTarget(e))return n?n(e):v.createElement(ene,{target:e})},[t?.target,r,n]);return e?.useDropIndicator?i:void 0}function Wx(e,t,n){let r=e.focusedKey,i=null;if(t?.isVirtualDragging?.()&&n?.target?.type===`item`&&(i=n.target.key,n.target.dropPosition===`after`)){let e=n.collection.getKeyAfter(i),t=null;if(e!=null){let r=n.collection.getItem(i)?.level??0;for(;e!=null;){let i=n.collection.getItem(e);if(!i)break;if(i.type!==`item`){e=n.collection.getKeyAfter(e);continue}if((i.level??0)<=r)break;t=e,e=n.collection.getKeyAfter(e)}}i=e??t??i}return(0,v.useMemo)(()=>new Set([r,i].filter(e=>e!=null)),[r,i])}var Gx=new WeakMap;function tne(e){return typeof e==`string`?e.replace(/\s*/g,``):``+e}function nne(e,t){let n=Gx.get(e);if(!n)throw Error(`Unknown list`);return`${n.id}-option-${tne(t)}`}function rne(e,t,n){let r=Us(e,{labelable:!0}),i=e.selectionBehavior||`toggle`,a=e.orientation||`vertical`,o=e.linkBehavior||(i===`replace`?`action`:`override`);i===`toggle`&&o===`action`&&(o=`override`);let{listProps:s}=Ry({...e,ref:n,selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,linkBehavior:o}),{focusWithinProps:c}=Wm({onFocusWithin:e.onFocus,onBlurWithin:e.onBlur,onFocusWithinChange:e.onFocusChange}),l=ms(e.id);Gx.set(t,{id:l,shouldUseVirtualFocus:e.shouldUseVirtualFocus,shouldSelectOnPressUp:e.shouldSelectOnPressUp,shouldFocusOnHover:e.shouldFocusOnHover,isVirtualized:e.isVirtualized,onAction:e.onAction,linkBehavior:o,UNSTABLE_itemBehavior:e.UNSTABLE_itemBehavior});let{labelProps:u,fieldProps:d}=lp({...e,id:l,labelElementType:`span`});return{labelProps:u,listBoxProps:W(r,c,t.selectionManager.selectionMode===`multiple`?{"aria-multiselectable":`true`}:{},{role:`listbox`,"aria-orientation":a,...W(d,s)})}}function ine(e,t,n){let{key:r}=e,i=Gx.get(t),a=e.isDisabled??t.selectionManager.isDisabled(r),o=e.isSelected??t.selectionManager.isSelected(r),s=e.shouldSelectOnPressUp??i?.shouldSelectOnPressUp,c=e.shouldFocusOnHover??i?.shouldFocusOnHover,l=e.shouldUseVirtualFocus??i?.shouldUseVirtualFocus,u=e.isVirtualized??i?.isVirtualized,d=gs(),f=gs(),p={role:`option`,"aria-disabled":a||void 0,"aria-selected":t.selectionManager.selectionMode===`none`?void 0:o,"aria-label":e[`aria-label`],"aria-labelledby":d,"aria-describedby":f},m=t.collection.getItem(r);if(u){let e=Number(m?.index);p[`aria-posinset`]=Number.isNaN(e)?void 0:e+1,p[`aria-setsize`]=Yy(t.collection)}let h=i?.onAction?()=>i?.onAction?.(r):void 0,g=nne(t,r),{itemProps:_,isPressed:v,isFocused:y,hasAction:b,allowsSelection:x}=zy({selectionManager:t.selectionManager,key:r,ref:n,shouldSelectOnPressUp:s,allowsDifferentPressOrigin:s&&c,isVirtualized:u,shouldUseVirtualFocus:l,isDisabled:a,onAction:h||m?.props?.onAction?_s(m?.props?.onAction,h):void 0,linkBehavior:i?.linkBehavior,UNSTABLE_itemBehavior:i?.UNSTABLE_itemBehavior,id:g}),{hoverProps:S}=Zm({isDisabled:a||!c,onHoverStart(){fm()||(t.selectionManager.setFocused(!0),t.selectionManager.setFocusedKey(r))}}),C=Us(m?.props);delete C.id;let w=Jo(m?.props);return{optionProps:{...p,...W(C,_,S,w),id:g},labelProps:{id:d},descriptionProps:{id:f},isFocused:y,isFocusVisible:y&&t.selectionManager.isFocused&&fm(),isSelected:o,isDisabled:a,isPressed:v,allowsSelection:x,hasAction:b}}function ane(e){let{heading:t,"aria-label":n}=e,r=ms();return{itemProps:{role:`presentation`},headingProps:t?{id:r,role:`presentation`,onMouseDown:e=>{e.preventDefault()}}:{},groupProps:{role:`group`,"aria-label":n,"aria-labelledby":t?r:void 0}}}var Kx=class{constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let t=e=>{if(this.keyMap.set(e.key,e),e.childNodes&&e.type===`section`)for(let n of e.childNodes)t(n)};for(let n of e)t(n);let n=null,r=0,i=0;for(let[e,t]of this.keyMap)n?(n.nextKey=e,t.prevKey=n.key):(this.firstKey=e,t.prevKey=void 0),t.type===`item`&&(t.index=r++),(t.type===`section`||t.type===`item`)&&i++,n=t,n.nextKey=void 0;this._size=i,this.lastKey=n?.key??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);return t?t.prevKey??null:null}getKeyAfter(e){let t=this.keyMap.get(e);return t?t.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){let t=[...this.getKeys()];return this.getItem(t[e])}getChildren(e){return this.keyMap.get(e)?.childNodes||[]}};function qx(e){let{filter:t,layoutDelegate:n}=e,r=db(e),i=(0,v.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),a=lb(e,(0,v.useCallback)(e=>t?new Kx(t(e)):new Kx(e),[t]),(0,v.useMemo)(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning])),o=(0,v.useMemo)(()=>new rb(a,r,{layoutDelegate:n}),[a,r,n]);return Jx(a,o),{collection:a,disabledKeys:i,selectionManager:o}}function one(e,t){let n=(0,v.useMemo)(()=>t?e.collection.filter(t):e.collection,[e.collection,t]),r=e.selectionManager.withCollection(n);return Jx(n,r),{collection:n,selectionManager:r,disabledKeys:e.disabledKeys}}function Jx(e,t){let n=(0,v.useRef)(null);(0,v.useEffect)(()=>{if(t.focusedKey!=null&&!e.getItem(t.focusedKey)&&n.current){let r=n.current.getKeyAfter(t.focusedKey),i=null;for(;r!=null;){let a=e.getItem(r);if(a&&a.type===`item`&&!t.isDisabled(r)){i=r;break}r=n.current.getKeyAfter(r)}if(i==null)for(r=n.current.getKeyBefore(t.focusedKey);r!=null;){let a=e.getItem(r);if(a&&a.type===`item`&&!t.isDisabled(r)){i=r;break}r=n.current.getKeyBefore(r)}t.setFocusedKey(i)}n.current=e},[e,t])}var Yx=(0,v.createContext)(null),Xx=(0,v.createContext)(null),sne=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,Yx);let n=(0,v.useContext)(Xx);return n?v.createElement(Zx,{state:n,props:e,listBoxRef:t}):v.createElement(L_,{content:v.createElement(W_,e)},n=>v.createElement(cne,{props:e,listBoxRef:t,collection:n}))});function cne({props:e,listBoxRef:t,collection:n}){e={...e,collection:n,children:null,items:null};let{layoutDelegate:r}=(0,v.useContext)(J_),i=qx({...e,layoutDelegate:r});return v.createElement(Zx,{state:i,props:e,listBoxRef:t})}function Zx({state:e,props:t,listBoxRef:n}){[t,n]=Zf(t,n,Fv);let{dragAndDropHooks:r,layout:i=`stack`,orientation:a=`vertical`,filter:o}=t,s=one(e,o),{collection:c,selectionManager:l}=s,u=!!r?.useDraggableCollectionState,d=!!r?.useDroppableCollectionState,{direction:f}=bp(),{disabledBehavior:p,disabledKeys:m}=l,h=Ly({usage:`search`,sensitivity:`base`}),{isVirtualized:g,layoutDelegate:_,dropTargetDelegate:y,CollectionRoot:b}=(0,v.useContext)(J_),x=(0,v.useMemo)(()=>t.keyboardDelegate||new Fy({collection:c,collator:h,ref:n,disabledKeys:m,disabledBehavior:p,layout:i,orientation:a,direction:f,layoutDelegate:_}),[c,h,n,p,m,a,f,t.keyboardDelegate,i,_]),{listBoxProps:S}=rne({...t,shouldSelectOnPressUp:u||t.shouldSelectOnPressUp,keyboardDelegate:x,isVirtualized:g},s,n);(0,v.useRef)(u),(0,v.useRef)(d),(0,v.useEffect)(()=>{},[u,d]);let C,w,T,E=!1,D=null,O=(0,v.useRef)(null);if(u&&r){C=r.useDraggableCollectionState({collection:c,selectionManager:l,preview:r.renderDragPreview?O:void 0}),r.useDraggableCollection({},C,n);let e=r.DragPreview;D=r.renderDragPreview?v.createElement(e,{ref:O},r.renderDragPreview):null}if(d&&r){w=r.useDroppableCollectionState({collection:c,selectionManager:l});let e=r.dropTargetDelegate||y||new r.ListDropTargetDelegate(c,n,{orientation:a,layout:i,direction:f});T=r.useDroppableCollection({keyboardDelegate:x,dropTargetDelegate:e},w,n),E=w.isDropTarget({type:`root`})}let{focusProps:k,isFocused:A,isFocusVisible:j}=Gm(),M=s.collection.size===0,N={isDropTarget:E,isEmpty:M,isFocused:A,isFocusVisible:j,layout:t.layout||`stack`,orientation:a,state:s},P=Jf({...t,children:void 0,defaultClassName:`react-aria-ListBox`,values:N}),F=null;M&&t.renderEmptyState&&(F=v.createElement(`div`,{role:`option`,style:{display:`contents`}},t.renderEmptyState(N)));let I=Us(t,{global:!0});return v.createElement(Gh,null,v.createElement(np.div,{...W(I,P,S,k,T?.collectionProps),ref:n,slot:t.slot||void 0,onScroll:t.onScroll,"data-drop-target":E||void 0,"data-empty":M||void 0,"data-focused":A||void 0,"data-focus-visible":j||void 0,"data-layout":t.layout||`stack`,"data-orientation":a},v.createElement(qf,{values:[[Yx,t],[Xx,s],[Vx,{dragAndDropHooks:r,dragState:C,dropState:w}],[Vv,{elementType:`div`}],[Hx,{render:dne}],[G_,{name:`ListBoxSection`,render:Qx}]]},v.createElement(zv,null,v.createElement(b,{collection:c,scrollRef:n,persistedKeys:Wx(l,r,w),renderDropIndicator:Ux(r,w)}))),F,D))}function Qx(e,t,n,r=`react-aria-ListBoxSection`){let i=(0,v.useContext)(Xx),{dragAndDropHooks:a,dropState:o}=(0,v.useContext)(Vx),{CollectionBranch:s}=(0,v.useContext)(J_),[c,l]=Qf(),{headingProps:u,groupProps:d}=ane({heading:l,"aria-label":e[`aria-label`]??void 0}),f=Jf({...e,id:void 0,children:void 0,defaultClassName:r,values:void 0}),p=Us(e,{global:!0});return delete p.id,v.createElement(np.section,{...W(p,f,d),ref:t},v.createElement(Lv.Provider,{value:{...u,ref:c}},v.createElement(s,{collection:i.collection,parent:n,renderDropIndicator:Ux(a,o)})))}var lne=V_(T_,Qx),une=B_(w_,function(e,t,n){let r=Zs(t),i=(0,v.useContext)(Xx),{dragAndDropHooks:a,dragState:o,dropState:s}=(0,v.useContext)(Vx),c=o&&!(o.isDisabled||o.selectionManager.isDisabled(n.key)),{optionProps:l,labelProps:u,descriptionProps:d,...f}=ine({key:n.key,"aria-label":e?.[`aria-label`]},i,r),{hoverProps:p,isHovered:m}=Zm({isDisabled:!f.allowsSelection&&!f.hasAction&&!c,onHoverStart:n.props.onHoverStart,onHoverChange:n.props.onHoverChange,onHoverEnd:n.props.onHoverEnd}),{keyboardProps:h}=Sm(e),{focusProps:g}=vm(e),_=null;o&&a&&(_=a.useDraggableItem({key:n.key,hasAction:f.hasAction},o));let y=null;s&&a&&(y=a.useDroppableItem({target:{type:`item`,key:n.key,dropPosition:`on`}},s,r));let b=o&&o.isDragging(n.key),x=Jf({...e,id:void 0,children:e.children,defaultClassName:`react-aria-ListBoxItem`,values:{...f,isHovered:m,selectionMode:i.selectionManager.selectionMode,selectionBehavior:i.selectionManager.selectionBehavior,allowsDragging:!!o,isDragging:b,isDropTarget:y?.isDropTarget}});(0,v.useEffect)(()=>{n.textValue},[n.textValue]);let S=e.href?np.a:np.div,C=Us(e,{global:!0});return delete C.id,delete C.onClick,e.href&&l.tabIndex==null&&(l.tabIndex=-1),v.createElement(S,{...W(C,x,l,p,h,g,_?.dragProps,y?.dropProps),ref:r,"data-allows-dragging":!!o||void 0,"data-selected":f.isSelected||void 0,"data-disabled":f.isDisabled||void 0,"data-hovered":m||void 0,"data-focused":f.isFocused||void 0,"data-focus-visible":f.isFocusVisible||void 0,"data-pressed":f.isPressed||void 0,"data-dragging":b||void 0,"data-drop-target":y?.isDropTarget||void 0,"data-selection-mode":i.selectionManager.selectionMode===`none`?void 0:i.selectionManager.selectionMode},v.createElement(qf,{values:[[Hv,{slots:{[Kf]:u,label:u,description:d}}],[Bv,{isSelected:f.isSelected}]]},x.children))});function dne(e,t){t=Zs(t);let{dragAndDropHooks:n,dropState:r}=(0,v.useContext)(Vx),{dropIndicatorProps:i,isHidden:a,isDropTarget:o}=n.useDropIndicator(e,r,t);return a?null:v.createElement(pne,{...e,dropIndicatorProps:i,isDropTarget:o,ref:t})}function fne(e,t){let{dropIndicatorProps:n,isDropTarget:r,...i}=e,a=Jf({...i,defaultClassName:`react-aria-DropIndicator`,values:{isDropTarget:r}});return v.createElement(v.Fragment,null,v.createElement(np.div,{...n,...a,role:`option`,ref:t,"data-drop-target":r||void 0}))}var pne=(0,v.forwardRef)(fne);B_(C_,function(e,t,n){let r=(0,v.useContext)(Xx),{isLoading:i,onLoadMore:a,scrollOffset:o,...s}=e,c=(0,v.useRef)(null);wc((0,v.useMemo)(()=>({onLoadMore:a,collection:r?.collection,sentinelRef:c,scrollOffset:o}),[a,o,r?.collection]),c);let l=Jf({...s,id:void 0,children:n.rendered,defaultClassName:`react-aria-ListBoxLoadingIndicator`,values:void 0});return v.createElement(v.Fragment,null,v.createElement(`div`,{style:{position:`relative`,width:0,height:0},inert:Tc(!0)},v.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:c,style:{position:`absolute`,height:1,width:1}})),i&&l.children&&v.createElement(v.Fragment,null,v.createElement(np.div,{...W(Us(e,{global:!0}),{tabIndex:-1}),...l,role:`option`,ref:t},l.children)))});function $x(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:a,fieldProps:o}=lp(e),s=gs([!!t,!!n,r,i]),c=gs([!!t,!!n,r,i]);return o=W(o,{"aria-describedby":[s,c,e[`aria-describedby`]].filter(Boolean).join(` `)||void 0}),{labelProps:a,fieldProps:o,descriptionProps:{id:s},errorMessageProps:{id:c}}}var eS=new WeakMap;function mne(e,t,n){let{keyboardDelegate:r,isDisabled:i,isRequired:a,name:o,form:s,validationBehavior:c=`aria`}=e,l=Ly({usage:`search`,sensitivity:`base`}),u=(0,v.useMemo)(()=>r||new Fy(t.collection,t.disabledKeys,n,l),[r,t.collection,t.disabledKeys,l,n]),{menuTriggerProps:d,menuProps:f}=Ey({isDisabled:i,type:`listbox`},t,n),{keyboardProps:p}=Sm({shortcuts:{ArrowLeft:()=>{if(t.selectionManager.selectionMode===`multiple`)return!1;let e=t.selectedKey==null?u.getFirstKey?.():u.getKeyAbove?.(t.selectedKey);e!=null&&t.setSelectedKey(e)},ArrowRight:()=>{if(t.selectionManager.selectionMode===`multiple`)return!1;let e=t.selectedKey==null?u.getFirstKey?.():u.getKeyBelow?.(t.selectedKey);e!=null&&t.setSelectedKey(e)}},allowRepeats:!0,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp}),{typeSelectProps:m}=My({keyboardDelegate:u,selectionManager:t.selectionManager,onTypeSelect(e){t.setSelectedKey(e)}}),{isInvalid:h,validationErrors:g,validationDetails:_}=t.displayValidation,{labelProps:y,fieldProps:b,descriptionProps:x,errorMessageProps:S}=$x({...e,labelElementType:`span`,isInvalid:h,errorMessage:e.errorMessage||g});t.selectionManager.selectionMode===`multiple`&&(m={});let C=Us(e,{labelable:!0}),w=W(m,d,b),T=ms();return eS.set(t,{isDisabled:i,isRequired:a,name:o,form:s,validationBehavior:c}),{labelProps:{...y,onClick:()=>{e.isDisabled||(n.current?.focus(),mm(`keyboard`))}},triggerProps:W(C,{...w,isDisabled:i,onKeyDown:_s(w.onKeyDown,p.onKeyDown),onKeyUp:p.onKeyUp,"aria-labelledby":[T,w[`aria-labelledby`],w[`aria-label`]&&!w[`aria-labelledby`]?w.id:null].filter(Boolean).join(` `),onFocus(n){t.isFocused||(e.onFocus&&e.onFocus(n),e.onFocusChange&&e.onFocusChange(!0),t.setFocused(!0))},onBlur(n){t.isOpen||(e.onBlur&&e.onBlur(n),e.onFocusChange&&e.onFocusChange(!1),t.setFocused(!1))}}),valueProps:{id:T},menuProps:{...f,onAction:void 0,autoFocus:t.focusStrategy||!0,shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,disallowEmptySelection:!0,linkBehavior:`selection`,onBlur:n=>{Ds(n.currentTarget,n.relatedTarget)||(e.onBlur&&e.onBlur(n),e.onFocusChange&&e.onFocusChange(!1),t.setFocused(!1))},"aria-labelledby":[b[`aria-labelledby`],w[`aria-label`]&&!b[`aria-labelledby`]?w.id:null].filter(Boolean).join(` `)},descriptionProps:x,errorMessageProps:S,isInvalid:h,validationErrors:g,validationDetails:_,hiddenSelectProps:{isDisabled:i,name:o,label:e.label,state:t,triggerRef:n,form:s}}}function tS(e,t,n){let{validationBehavior:r,focus:i}=e;Xo(()=>{if(r===`native`&&n?.current&&`setCustomValidity`in n.current&&!n.current.disabled){let e=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(` `)||`Invalid value.`:``;n.current.setCustomValidity(e),n.current.hasAttribute(`title`)||(n.current.title=``),t.realtimeValidation.isInvalid||t.updateValidation(gne(n.current))}});let a=(0,v.useRef)(!1),o=$s(()=>{a.current||t.resetValidation()}),s=$s(e=>{t.displayValidation.isInvalid||t.commitValidation();let r=n?.current?.form;!e.defaultPrevented&&n&&r&&_ne(r)===n.current&&(i?i():n.current?.focus(),mm(`keyboard`)),e.preventDefault()}),c=$s(()=>{t.commitValidation()});(0,v.useEffect)(()=>{let e=n?.current;if(!e)return;let t=e.form,r=t?.reset;return t&&(t.reset=()=>{a.current=!window.event||window.event.type===`message`&&U(window.event)instanceof MessagePort,r?.call(t),a.current=!1}),e.addEventListener(`invalid`,s),e.addEventListener(`change`,c),t?.addEventListener(`reset`,o),()=>{e.removeEventListener(`invalid`,s),e.removeEventListener(`change`,c),t?.removeEventListener(`reset`,o),t&&(t.reset=r)}},[n,r])}function hne(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function gne(e){return{isInvalid:!e.validity.valid,validationDetails:hne(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function _ne(e){for(let t=0;tn.current?.focus()},t,e.selectRef);let d=t.setValue,f=(0,v.useCallback)(e=>{let t=U(e);t.multiple?d(Array.from(t.selectedOptions,e=>e.value)):d(e.currentTarget.value)},[d]);return{containerProps:{...u,"aria-hidden":!0,"data-react-aria-prevent-focus":!0,"data-a11y-ignore":`aria-hidden-focus`},inputProps:{style:{display:`none`}},selectProps:{tabIndex:-1,autoComplete:i,disabled:s,multiple:t.selectionManager.selectionMode===`multiple`,required:c===`native`&&l,name:a,form:o,value:t.value??``,onChange:f,onInput:f}}}function yne(e){let{state:t,triggerRef:n,label:r,name:i,form:a,isDisabled:o}=e,s=(0,v.useRef)(null),c=(0,v.useRef)(null),{containerProps:l,selectProps:u}=vne({...e,selectRef:t.collection.size<=300?s:c},t,n),d=Array.isArray(t.value)?t.value:[t.value];if(t.collection.size<=300)return v.createElement(`div`,{...l,"data-testid":`hidden-select-container`},v.createElement(`label`,null,r,v.createElement(`select`,{...u,ref:s},v.createElement(`option`,{value:``,label:`\xA0`},`\xA0`),[...t.collection.getKeys()].map(e=>{let n=t.collection.getItem(e);if(n&&n.type===`item`)return v.createElement(`option`,{key:n.key,value:n.key},n.textValue)}),t.collection.size===0&&i&&d.map((e,t)=>v.createElement(`option`,{key:t,value:e??``})))));if(i){let{validationBehavior:e}=eS.get(t)||{};d.length===0&&(d=[null]);let n=d.map((t,n)=>{let r={type:`hidden`,autoComplete:u.autoComplete,name:i,form:a,disabled:o,value:t??``};return e===`native`?v.createElement(`input`,{key:n,...r,ref:n===0?c:null,style:{display:`none`},type:`text`,required:n===0&&u.required,onChange:()=>{}}):v.createElement(`input`,{key:n,...r,ref:n===0?c:null})});return v.createElement(v.Fragment,null,n)}return null}function bne(e){let{selectionMode:t=`single`,shouldCloseOnSelect:n=t===`single`}=e,r=__(e),[i,a]=(0,v.useState)(null),o=(0,v.useMemo)(()=>e.defaultValue===void 0?t===`single`?e.defaultSelectedKey??null:[]:e.defaultValue,[e.defaultValue,e.defaultSelectedKey,t]),[s,c]=eh((0,v.useMemo)(()=>e.value===void 0?t===`single`?e.selectedKey:void 0:e.value,[e.value,e.selectedKey,t]),o,e.onChange),l=t===`single`&&Array.isArray(s)?s[0]:s,u=n=>{if(t===`single`){let t=Array.isArray(n)?n[0]??null:n;c(t),t!==l&&e.onSelectionChange?.(t)}else{let e=[];Array.isArray(n)?e=n:n!=null&&(e=[n]),c(e)}},d=qx({...e,selectionMode:t,disallowEmptySelection:t===`single`,allowDuplicateSelectionEvents:!0,selectedKeys:(0,v.useMemo)(()=>xne(l),[l]),onSelectionChange:e=>{if(e!==`all`){if(t===`single`){let t=e.values().next().value??null;u(t)}else u([...e]);n&&r.close(),m.commitValidation()}}}),f=d.selectionManager.firstSelectedKey,p=(0,v.useMemo)(()=>[...d.selectionManager.selectedKeys].map(e=>d.collection.getItem(e)).filter(e=>e!=null),[d.selectionManager.selectedKeys,d.collection]),m=ex({...e,value:Array.isArray(l)&&l.length===0?null:l}),[h,g]=(0,v.useState)(!1),[_]=(0,v.useState)(l);return{...m,...d,...r,value:l,defaultValue:o??_,setValue:u,selectedKey:f,setSelectedKey:u,selectedItem:p[0]??null,selectedItems:p,defaultSelectedKey:e.defaultSelectedKey??(e.selectionMode===`single`?_:null),focusStrategy:i,open(t=null){(d.collection.size!==0||e.allowsEmptyCollection)&&(a(t),r.open())},toggle(t=null){(d.collection.size!==0||e.allowsEmptyCollection)&&(a(t),r.toggle())},isFocused:h,setFocused:g}}function xne(e){if(e!==void 0)return e===null?[]:Array.isArray(e)?e:[e]}function Sne(e={}){let{locale:t}=bp();return(0,v.useMemo)(()=>new Intl.ListFormat(t,e),[t,e])}function Cne(e){return e&&e.__esModule?e.default:e}var nS=(0,v.createContext)(null),rS=(0,v.createContext)(null),iS=ap(function(e,t){[e,t]=Zf(e,t,nS);let{children:n,isDisabled:r=!1,isInvalid:i=!1,isRequired:a=!1}=e,o=(0,v.useMemo)(()=>typeof n==`function`?n({isOpen:!1,isDisabled:r,isInvalid:i,isRequired:a,isFocused:!1,isFocusVisible:!1,defaultChildren:null}):n,[n,r,i,a]);return v.createElement(L_,{content:o},n=>v.createElement(Tne,{props:e,collection:n,selectRef:t}))}),wne=[sp,Qm,Hv];function Tne({props:e,selectRef:t,collection:n}){let{validationBehavior:r}=Xf(ax)||{},i=e.validationBehavior??r??`native`,a=bne({...e,collection:n,children:void 0,validationBehavior:i}),{isFocusVisible:o,focusProps:s}=Gm({within:!0}),c=(0,v.useRef)(null),[l,u]=Qf(!e[`aria-label`]&&!e[`aria-labelledby`]),{labelProps:d,triggerProps:f,valueProps:p,menuProps:m,descriptionProps:h,errorMessageProps:g,hiddenSelectProps:_,...y}=mne({...$f(e),label:u,validationBehavior:i},a,c),b=(0,v.useMemo)(()=>({isOpen:a.isOpen,isFocused:a.isFocused,isFocusVisible:o,isDisabled:e.isDisabled||!1,isInvalid:y.isInvalid||!1,isRequired:e.isRequired||!1}),[a.isOpen,a.isFocused,o,e.isDisabled,y.isInvalid,e.isRequired]),x=Jf({...e,values:b,defaultClassName:`react-aria-Select`}),S=Us(e,{global:!0});delete S.id;let C=(0,v.useRef)(null);return v.createElement(qf,{values:[[nS,e],[rS,a],[aS,p],[sp,{...d,ref:l,elementType:`span`}],[Qm,{...f,ref:c,isPressed:a.isOpen,autoFocus:e.autoFocus}],[jb,a],[v_,{trigger:`Select`,triggerRef:c,scrollRef:C,placement:`bottom start`,"aria-labelledby":m[`aria-labelledby`],clearContexts:wne}],[Yx,{...m,ref:C}],[Xx,a],[Hv,{slots:{description:h,errorMessage:g}}],[Jb,y]]},v.createElement(np.div,{...W(S,x,s),ref:t,slot:e.slot||void 0,"data-focused":a.isFocused||void 0,"data-focus-visible":o||void 0,"data-open":a.isOpen||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":y.isInvalid||void 0,"data-required":e.isRequired||void 0},x.children,v.createElement(yne,{..._,autoComplete:e.autoComplete})))}var aS=(0,v.createContext)(null),oS=ap(function(e,t){[e,t]=Zf(e,t,aS);let n=(0,v.useContext)(rS),{placeholder:r}=Xf(nS),i=n.selectedItems.map(e=>{let t=e.props?.children;return typeof t==`function`&&(t=t({isHovered:!1,isPressed:!1,isSelected:!1,isFocused:!1,isFocusVisible:!1,isDisabled:!1,selectionMode:`single`,selectionBehavior:`toggle`})),t}),a=Sne(),o=(0,v.useMemo)(()=>n.selectedItems.map(e=>e?.textValue),[n.selectedItems]),s=n.selectionManager.selectionMode,c=(0,v.useMemo)(()=>s===`single`?o[0]??``:a.format(o),[s,a,o]),l=(0,v.useMemo)(()=>{if(s===`single`)return i[0];let e=a.formatToParts(o);if(e.length===0)return null;let t=0;return e.map(e=>e.type===`element`?v.createElement(v.Fragment,{key:t},i[t++]):e.value)},[s,a,o,i]),u=s_(Cne(Bx),`react-aria-components`),d=Jf({...e,defaultChildren:l??r??u.format(`selectPlaceholder`),defaultClassName:`react-aria-SelectValue`,values:{selectedItem:n.selectedItems[0]?.value??null,selectedItems:(0,v.useMemo)(()=>n.selectedItems.map(e=>e.value??null),[n.selectedItems]),selectedText:c,isPlaceholder:n.selectedItems.length===0,state:n}}),f=Us(e,{global:!0});return v.createElement(np.span,{ref:t,...f,...d,"data-placeholder":n.selectedItems.length===0||void 0},v.createElement(Hv.Provider,{value:void 0},d.children))}),sS=(0,v.createContext)(!1),Ene=e=>{let t=(0,v.use)(sS),n=(0,v.use)(Hv);return!t||n?.slots?.[e]!=null},cS=({children:e})=>(0,G.jsx)(sS,{value:!0,children:e}),lS=(0,v.createContext)({triggerRef:{current:null},clearButtonRef:{current:null},isDisabled:!1}),uS=({children:e,className:t,fullWidth:n,isDisabled:r,onClear:i,variant:a,...o})=>{let s=v.useMemo(()=>rf({fullWidth:n,variant:a}),[n,a]),c=(0,v.useRef)(null),l=(0,v.useRef)(null);return(0,G.jsx)(cS,{children:(0,G.jsx)(lS,{value:{slots:s,triggerRef:c,clearButtonRef:l,onClear:i,isDisabled:r},children:(0,G.jsx)(iS,{"data-slot":`autocomplete`,...o,className:K(t,s?.base()),isDisabled:r,children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})})})},dS=({children:e,className:t,isDisabled:n,onClick:r,ref:i,...a})=>{let{clearButtonRef:o,isDisabled:s,slots:c,triggerRef:l}=(0,v.use)(lS),u=(0,v.use)(rS),d=n??s??!1,f=op(),p=Ns(v.useCallback(e=>{l.current=e},[l]),i);return f?null:(0,G.jsx)(qb,{ref:p,className:K(t,c?.trigger()),"data-slot":`autocomplete-trigger`,isDisabled:d,onClick:e=>{o.current?.contains(e.target)||(r?.(e),u?.toggle())},...a,children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})};dS.displayName=`AutocompleteTrigger`;var fS=Object.assign(uS,{Root:uS,Trigger:dS,Value:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(lS);return(0,G.jsx)(oS,{className:K(t,r?.value()),"data-slot":`autocomplete-value`,...n,children:e})},Indicator:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(lS),i=(0,v.use)(rS),a=e&&v.isValidElement(e)?v.cloneElement(e,{...n,className:q(r?.indicator,t),"data-slot":`autocomplete-indicator`,"data-open":oh(i?.isOpen)}):(0,G.jsx)(sh,{className:q(r?.indicator,t),"data-open":oh(i?.isOpen),"data-slot":`autocomplete-default-indicator`,...n});return(0,G.jsx)($m,{children:a})},Popover:({children:e,className:t,placement:n=`bottom`,style:r,...i})=>{let{slots:a,triggerRef:o}=(0,v.use)(lS),[s,c]=(0,v.useState)(null);return rc({ref:o,onResize:(0,v.useCallback)(()=>{o.current&&c(o.current.offsetWidth+`px`)},[o])}),(0,G.jsx)(gh,{value:{variant:`default`},children:(0,G.jsx)(b_,{...i,className:K(t,a?.popover()),"data-slot":`autocomplete-popover`,placement:n,triggerRef:o,style:{"--trigger-width":s,...typeof r==`object`&&r?r:{}},children:e})})},Filter:({children:e,...t})=>(0,G.jsx)(Ate,{"data-slot":`autocomplete-filter`,...t,children:e}),ClearButton:({className:e,onClick:t,ref:n,...r})=>{let{clearButtonRef:i,isDisabled:a,onClear:o,slots:s}=(0,v.use)(lS),c=(0,v.use)(rS),l=Ns(v.useCallback(e=>{i.current=e},[i]),n),u=e=>{c?.selectionManager.setSelectedKeys(new Set),o?.(),t?.(e)},d=c?.selectionManager.selectedKeys.size===0;return(0,G.jsx)(Xc.button,{ref:l,"aria-hidden":d||void 0,"aria-label":`Clear selection`,className:s?.clearButton({className:e}),"data-empty":oh(d),"data-slot":`autocomplete-clear-button`,disabled:a??!1,tabIndex:-1,type:`button`,onClick:u,...r,children:(0,G.jsx)(dh,{"data-slot":`autocomplete-clear-button-icon`})})}});function pS(e,t,n){let{isSelected:r}=t,{isPressed:i,buttonProps:a}=Um({...e,onPress:_s(t.toggle,e.onPress)},n);return{isPressed:i,isSelected:r,isDisabled:e.isDisabled||!1,buttonProps:W(a,{"aria-pressed":r})}}function mS(e,t){let{"aria-label":n,"aria-labelledby":r,orientation:i=`horizontal`}=e,[a,o]=(0,v.useState)(!1);Xo(()=>{o(!!(t.current&&t.current.parentElement?.closest(`[role="toolbar"]`)))});let{direction:s}=bp(),c=s===`rtl`&&i===`horizontal`,l=ig(t),u=e=>{if(Ds(e.currentTarget,U(e))){if(i===`horizontal`&&e.key===`ArrowRight`||i===`vertical`&&e.key===`ArrowDown`)c?l.focusPrevious():l.focusNext();else if(i===`horizontal`&&e.key===`ArrowLeft`||i===`vertical`&&e.key===`ArrowUp`)c?l.focusNext():l.focusPrevious();else if(e.key===`Tab`){d.current=Os(),e.shiftKey?l.focusFirst():l.focusLast();return}else return;e.stopPropagation(),e.preventDefault()}},d=(0,v.useRef)(null),f=e=>{!Ds(e.currentTarget,e.relatedTarget)&&!d.current&&(d.current=U(e))},p=e=>{d.current&&!Ds(e.currentTarget,e.relatedTarget)&&Ds(t.current,U(e))&&(d.current?.focus(),d.current=null)};return{toolbarProps:{...Us(e,{labelable:!0}),role:a?`group`:`toolbar`,"aria-orientation":i,"aria-label":n,"aria-labelledby":n==null?r:void 0,onKeyDownCapture:a?void 0:u,onFocusCapture:a?void 0:p,onBlurCapture:a?void 0:f}}}function Dne(e,t,n){let{isDisabled:r}=e,{toolbarProps:i}=mS(e,n);return{groupProps:{...i,role:t.selectionMode===`single`?`radiogroup`:i.role,"aria-disabled":r}}}function One(e,t,n){let r={isSelected:t.selectedKeys.has(e.id),defaultSelected:!1,setSelected(n){t.setSelected(e.id,n)},toggle(){t.toggleKey(e.id)}},{isPressed:i,isSelected:a,isDisabled:o,buttonProps:s}=pS({...e,id:void 0,isDisabled:e.isDisabled||t.isDisabled},r,n);return t.selectionMode===`single`&&(s.role=`radio`,s[`aria-checked`]=r.isSelected,delete s[`aria-pressed`]),{isPressed:i,isSelected:a,isDisabled:o,buttonProps:s}}function kne(e){let{selectionMode:t=`single`,disallowEmptySelection:n,isDisabled:r=!1}=e,[i,a]=eh((0,v.useMemo)(()=>e.selectedKeys?new Set(e.selectedKeys):void 0,[e.selectedKeys]),(0,v.useMemo)(()=>e.defaultSelectedKeys?new Set(e.defaultSelectedKeys):new Set,[e.defaultSelectedKeys]),e.onSelectionChange);return{selectionMode:t,isDisabled:r,selectedKeys:i,setSelectedKeys:a,toggleKey(e){let r;t===`multiple`?(r=new Set(i),r.has(e)&&(!n||r.size>1)?r.delete(e):r.add(e)):r=new Set(i.has(e)&&!n?[]:[e]),a(r)},setSelected(e,t){t!==i.has(e)&&this.toggleKey(e)}}}var hS=(0,v.createContext)({}),gS=(0,v.createContext)(null),Ane=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,hS);let n=kne(e),{groupProps:r}=Dne(e,n,t),i=Jf({...e,values:{orientation:e.orientation||`horizontal`,isDisabled:n.isDisabled,state:n},defaultClassName:`react-aria-ToggleButtonGroup`}),a=Us(e,{global:!0});return v.createElement(np.div,{...W(a,i,r),ref:t,slot:e.slot||void 0,"data-orientation":e.orientation||`horizontal`,"data-disabled":e.isDisabled||void 0},v.createElement(gS.Provider,{value:n},v.createElement(zv,null,i.children)))});function _S(e={}){let{isReadOnly:t}=e,[n,r]=eh(e.isSelected,e.defaultSelected||!1,e.onChange),[i]=(0,v.useState)(n);function a(e){t||r(e)}function o(){t||r(!n)}return{isSelected:n,defaultSelected:e.defaultSelected??i,setSelected:a,toggle:o}}var jne=(0,v.createContext)({}),Mne=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,jne);let n=(0,v.useContext)(gS),r=_S(n&&e.id!=null?{isSelected:n.selectedKeys.has(e.id),onChange(t){n.setSelected(e.id,t)}}:e),{buttonProps:i,isPressed:a,isSelected:o,isDisabled:s}=n&&e.id!=null?One({...e,id:e.id},n,t):pS({...e,id:e.id==null?void 0:String(e.id)},r,t),{focusProps:c,isFocused:l,isFocusVisible:u}=Gm(e),{hoverProps:d,isHovered:f}=Zm({...e,isDisabled:s}),p=Jf({...e,id:void 0,values:{isHovered:f,isPressed:a,isFocused:l,isSelected:r.isSelected,isFocusVisible:u,isDisabled:s,state:r},defaultClassName:`react-aria-ToggleButton`}),m=Us(e,{global:!0});return delete m.id,delete m.onClick,v.createElement(np.button,{...W(m,p,i,c,d),ref:t,slot:e.slot||void 0,"data-focused":l||void 0,"data-disabled":s||void 0,"data-pressed":a||void 0,"data-selected":o||void 0,"data-hovered":f||void 0,"data-focus-visible":u||void 0},v.createElement(Bv.Provider,{value:{isSelected:o}},p.children))}),Nne=(0,v.createContext)({}),Pne=`__button_group_child`,vS=({children:e,className:t,fullWidth:n,isDisabled:r,isIconOnly:i,size:a,slot:o,style:s,variant:c,[Pne]:l,...u})=>{let d=(0,v.use)(Nne),f=l===!0,p=a??(f?d?.size:void 0),m=c??(f?d?.variant:void 0),h=r??(f?d?.isDisabled:void 0),g=af({fullWidth:n??(f?d?.fullWidth:void 0),isIconOnly:i,size:p,variant:m});return(0,G.jsx)($m,{className:K(t,g),"data-slot":`button`,isDisabled:h,slot:o,style:s,...u,children:t=>typeof e==`function`?e(t):e})},J=Object.assign(vS,{Root:vS}),yS=(0,v.createContext)({}),bS=({children:e,className:t,variant:n=`default`,...r})=>{let i=v.useMemo(()=>cf({variant:n}),[n]),a=(0,G.jsx)(Xc.div,{className:i.base({className:t}),"data-slot":`card`,...r,children:e});return(0,G.jsx)(yS,{value:{slots:i},children:n===`transparent`?a:(0,G.jsx)(gh,{value:{variant:n},children:a})})},xS=Object.assign(bS,{Root:bS,Header:({className:e,...t})=>{let{slots:n}=(0,v.use)(yS);return(0,G.jsx)(Xc.div,{className:q(n?.header,e),"data-slot":`card-header`,...t})},Title:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(yS);return(0,G.jsx)(Xc.h3,{className:q(r?.title,t),"data-slot":`card-title`,...n,children:e})},Description:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(yS);return(0,G.jsx)(Xc.p,{className:q(r?.description,t),"data-slot":`card-description`,...n,children:e})},Content:({className:e,...t})=>{let{slots:n}=(0,v.use)(yS);return(0,G.jsx)(Xc.div,{className:q(n?.content,e),"data-slot":`card-content`,...t})},Footer:({className:e,...t})=>{let{slots:n}=(0,v.use)(yS);return(0,G.jsx)(Xc.div,{className:q(n?.footer,e),"data-slot":`card-footer`,...t})}}),Fne=new WeakMap;function Ine(e=!0){let[t,n]=(0,v.useState)(e),r=(0,v.useRef)(!1),i=(0,v.useCallback)(e=>{r.current=!0,n(!!e)},[]);return Xo(()=>{r.current||n(!1)},[]),[i,t]}function SS(e=!0){let t=ms(),[n,r]=Ine(e);return{id:r?t:void 0,ref:n}}function CS(e,t,n){let{isDisabled:r=!1,isReadOnly:i=!1,value:a,name:o,form:s,children:c,isRequired:l,validationBehavior:u=`aria`,"aria-label":d,"aria-labelledby":f,"aria-describedby":p,onPressStart:m,onPressEnd:h,onPressChange:g,onPress:_,onPressUp:y,onClick:b}=e,x=ex({...e,value:t.isSelected}),{isInvalid:S,validationErrors:C,validationDetails:w}=x.displayValidation;tS(e,x,n);let T=e=>{e.stopPropagation(),t.setSelected(U(e).checked)},{pressProps:E,isPressed:D}=Fm({onPressStart:m,onPressEnd:h,onPressChange:g,onPress:_,onPressUp:y,onClick:b,isDisabled:r}),[O,k]=(0,v.useState)(!1),{pressProps:A}=Fm({onPressStart(e){if(e.pointerType===`keyboard`||e.pointerType===`virtual`){e.continuePropagation();return}m?.(e),g?.(!0),k(!0)},onPressEnd(e){if(e.pointerType===`keyboard`||e.pointerType===`virtual`){e.continuePropagation();return}h?.(e),g?.(!1),k(!1)},onPressUp(e){if(e.pointerType===`keyboard`||e.pointerType===`virtual`){e.continuePropagation();return}y?.(e)},onClick:b,onPress(r){if(r.pointerType===`keyboard`||r.pointerType===`virtual`){r.continuePropagation();return}_?.(r),t.toggle(),n.current?.focus();let{[$b]:i}=e,{commitValidation:a}=i||x;a()},isDisabled:r||i}),{focusableProps:j}=wm(e,n),M=W(E,j),N=Us(e,{labelable:!0});Cc(n,t.defaultSelected,t.setSelected);let P=SS(),F=SS();return{labelProps:W(A,{onClick:e=>e.preventDefault()}),inputProps:W(N,{checked:t.isSelected,"aria-required":l&&u===`aria`||void 0,required:l&&u===`native`,"aria-invalid":S||e.validationState===`invalid`||void 0,"aria-errormessage":e[`aria-errormessage`],"aria-controls":e[`aria-controls`],"aria-readonly":i||void 0,"aria-describedby":[P.id,F.id,p].filter(Boolean).join(` `)||void 0,onChange:T,disabled:r,...a==null?{}:{value:a},name:o,form:s,type:`checkbox`,...M}),descriptionProps:P,errorMessageProps:F,isSelected:t.isSelected,isPressed:D||O,isDisabled:r,isReadOnly:i,isInvalid:S||e.validationState===`invalid`,validationErrors:C,validationDetails:w}}function wS(e,t,n){let{labelProps:r,inputProps:i,descriptionProps:a,errorMessageProps:o,isSelected:s,isPressed:c,isDisabled:l,isReadOnly:u,isInvalid:d,validationErrors:f,validationDetails:p}=CS(e,t,n),{isIndeterminate:m}=e;return(0,v.useEffect)(()=>{n.current&&(n.current.indeterminate=!!m)}),{labelProps:W(r,(0,v.useMemo)(()=>({onMouseDown:e=>e.preventDefault()}),[])),inputProps:i,descriptionProps:a,errorMessageProps:o,isSelected:s,isPressed:c,isDisabled:l,isReadOnly:u,isInvalid:d,validationErrors:f,validationDetails:p}}function Lne(e,t,n){let r=_S({isReadOnly:e.isReadOnly||t.isReadOnly,isSelected:t.isSelected(e.value),defaultSelected:t.defaultValue.includes(e.value),onChange(n){n?t.addValue(e.value):t.removeValue(e.value),e.onChange&&e.onChange(n)}}),{name:i,form:a,descriptionId:o,errorMessageId:s,validationBehavior:c}=Fne.get(t);c=e.validationBehavior??c;let{realtimeValidation:l}=ex({...e,value:r.isSelected,name:void 0,validationBehavior:`aria`}),u=(0,v.useRef)(Zb),d=()=>{t.setInvalid(e.value,l.isInvalid?l:u.current)};(0,v.useEffect)(d);let f=t.realtimeValidation.isInvalid?t.realtimeValidation:l,p=c===`native`?t.displayValidation:f,m=wS({...e,isReadOnly:e.isReadOnly||t.isReadOnly,isDisabled:e.isDisabled||t.isDisabled,name:e.name||i,form:e.form||a,isRequired:e.isRequired??t.isRequired,validationBehavior:c,[$b]:{realtimeValidation:f,displayValidation:p,resetValidation:t.resetValidation,commitValidation:t.commitValidation,updateValidation(e){u.current=e,d()}}},r,n);return{...m,inputProps:{...m.inputProps,"aria-describedby":[m.inputProps[`aria-describedby`],t.isInvalid?s:null,o].filter(Boolean).join(` `)||void 0}}}var TS=(0,v.createContext)(null),ES=(0,v.createContext)(null),DS=(0,v.createContext)(null),OS=(0,v.createContext)(null),Rne=(0,v.forwardRef)(function(e,t){let{inputRef:n=null,...r}=e;[e,t]=Zf(r,t,ES);let i=(0,v.useContext)(DS),[a,o]=zne(e,n),{descriptionProps:s,errorMessageProps:c,isSelected:l,isDisabled:u,isReadOnly:d,isInvalid:f,validationDetails:p,validationErrors:m}=a,h=Jf({...e,defaultClassName:`react-aria-CheckboxField`,values:{isSelected:l,isIndeterminate:e.isIndeterminate||!1,isDisabled:u,isReadOnly:d,isInvalid:f,isRequired:e.isRequired||!1}}),g=Us(e,{global:!0});return delete g.id,delete g.onClick,v.createElement(np.div,{...W(g,h),ref:t,slot:e.slot||void 0,"data-selected":l||void 0,"data-indeterminate":e.isIndeterminate||void 0,"data-disabled":u||void 0,"data-readonly":d||void 0,"data-invalid":f||void 0,"data-required":e.isRequired||void 0},v.createElement(qf,{values:[[OS,{...a,inputRef:o,defaultClassName:`react-aria-CheckboxButton`,isIndeterminate:e.isIndeterminate,isRequired:e.isRequired}],[Hv,{slots:{description:s,errorMessage:c}}],[Jb,i?null:{isInvalid:f,validationDetails:p,validationErrors:m}]]},h.children))});function zne(e,t){let{validationBehavior:n}=Xf(ax)||{},r=e.validationBehavior??n??`native`,i=(0,v.useContext)(DS),a=Zs((0,v.useMemo)(()=>Ns(t,e.inputRef===void 0?null:e.inputRef),[t,e.inputRef])),o={...$f(e),children:typeof e.children==`function`||e.children,value:e.value,validationBehavior:r};return[i?Lne(o,i,a):wS(o,_S(e),a),a]}var Bne=(0,v.forwardRef)(function(e,t){let{labelProps:n,inputProps:r,isSelected:i,isDisabled:a,isReadOnly:o,isPressed:s,isInvalid:c,inputRef:l,defaultClassName:u,isIndeterminate:d,isRequired:f}=(0,v.useContext)(OS),{isFocused:p,isFocusVisible:m,focusProps:h}=Gm(),g=a||o,{hoverProps:_,isHovered:y}=Zm({...e,isDisabled:g}),b=Jf({...e,defaultClassName:u,values:{isSelected:i,isIndeterminate:d||!1,isPressed:s,isHovered:y,isFocused:p,isFocusVisible:m,isDisabled:a,isReadOnly:o,isInvalid:c,isRequired:f||!1}}),x=Us(e,{global:!0});return delete x.id,delete x.onClick,v.createElement(np.label,{...W(x,n,_,b),ref:t,slot:e.slot||void 0,"data-selected":i||void 0,"data-indeterminate":d||void 0,"data-pressed":s||void 0,"data-hovered":y||void 0,"data-focused":p||void 0,"data-focus-visible":m||void 0,"data-disabled":a||void 0,"data-readonly":o||void 0,"data-invalid":c||void 0,"data-required":f||void 0},v.createElement(u_,{elementType:`span`},v.createElement(`input`,{...W(r,h),ref:l})),b.children)}),Vne=(0,v.createContext)({}),kS=(0,v.createContext)({}),AS=({children:e,className:t,variant:n,...r})=>{let i=(0,v.use)(Vne),a=n??i.variant,o=v.useMemo(()=>lf({variant:a}),[a]);return(0,G.jsx)(Rne,{"data-slot":`checkbox`,...r,className:K(t,o.base()),children:t=>(0,G.jsx)(kS,{value:{slots:o,state:t},children:typeof e==`function`?e(t):e})})};AS.displayName=`HeroUI.Checkbox`;var jS=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(kS);return(0,G.jsx)(Bne,{"data-slot":`checkbox-content`,...n,className:K(t,r?.content()),children:e})};jS.displayName=`HeroUI.Checkbox.Content`;var MS=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(kS);return(0,G.jsx)(Xc.span,{className:q(r?.control,t),"data-slot":`checkbox-control`,...n,children:e})};MS.displayName=`HeroUI.Checkbox.Control`;var NS=({children:e,className:t,...n})=>{let{slots:r,state:i}=(0,v.use)(kS),a=i?.isSelected,o=i?.isIndeterminate,s=typeof e==`function`?e(i??{}):e||(o?(0,G.jsx)(`svg`,{"aria-hidden":`true`,"data-slot":`checkbox-default-indicator--indeterminate`,fill:`none`,role:`presentation`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:3,viewBox:`0 0 24 24`,children:(0,G.jsx)(`line`,{x1:`21`,x2:`3`,y1:`12`,y2:`12`})}):(0,G.jsx)(`svg`,{"aria-hidden":`true`,"data-slot":`checkbox-default-indicator--checkmark`,fill:`none`,role:`presentation`,stroke:`currentColor`,strokeDasharray:22,strokeDashoffset:a?44:66,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,viewBox:`0 0 17 18`,children:(0,G.jsx)(`polyline`,{points:`1 9 7 14 15 4`})}));return(0,G.jsx)(Xc.span,{"aria-hidden":`true`,className:q(r?.indicator,t),"data-slot":`checkbox-indicator`,...n,children:s})};NS.displayName=`HeroUI.Checkbox.Indicator`;var PS=Object.assign(AS,{Root:AS,Content:jS,Control:MS,Indicator:NS}),FS=(0,v.createContext)({}),IS=({children:e,className:t,color:n,size:r,variant:i,...a})=>{let o=v.useMemo(()=>uf({color:n,size:r,variant:i}),[n,r,i]),s=v.useMemo(()=>typeof e==`string`||typeof e==`number`?(0,G.jsx)(LS,{children:e}):e,[e]);return(0,G.jsx)(FS,{value:{slots:o},children:(0,G.jsx)(Xc.span,{...a,className:q(o.base,t),"data-slot":`chip`,children:s})})},LS=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(FS);return(0,G.jsx)(Xc.span,{className:q(r?.label,t),"data-slot":`chip-label`,...n,children:e})},RS=Object.assign(IS,{Root:IS,Label:LS});function Hne(e){let{onMoveStart:t,onMove:n,onMoveEnd:r}=e,i=(0,v.useRef)({didMove:!1,lastPosition:null,id:null}),{addGlobalListener:a,removeGlobalListener:o}=Ys(),s=$s((0,v.useCallback)((e,r,a,o)=>{(a!==0||o!==0)&&(i.current.didMove||(i.current.didMove=!0,t?.({type:`movestart`,pointerType:r,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey})),n?.({type:`move`,pointerType:r,deltaX:a,deltaY:o,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey}))},[t,n,i])),c=$s((0,v.useCallback)((e,t)=>{km(),i.current.didMove&&r?.({type:`moveend`,pointerType:t,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey})},[r,i]));return{moveProps:(0,v.useMemo)(()=>{let e={},t=()=>{Om(),i.current.didMove=!1};{let n=e=>{if(e.pointerId===i.current.id){let t=e.pointerType||`mouse`;s(e,t,e.pageX-(i.current.lastPosition?.pageX??0),e.pageY-(i.current.lastPosition?.pageY??0)),i.current.lastPosition={pageX:e.pageX,pageY:e.pageY}}},r=e=>{if(e.pointerId===i.current.id){let t=e.pointerType||`mouse`;c(e,t),i.current.id=null;let a=ys(U(e));o(a,`pointermove`,n,!1),o(a,`pointerup`,r,!1),o(a,`pointercancel`,r,!1)}};e.onPointerDown=e=>{if(e.button===0&&i.current.id==null){t(),e.stopPropagation(),e.preventDefault(),i.current.lastPosition={pageX:e.pageX,pageY:e.pageY},i.current.id=e.pointerId;let o=ys(U(e));a(o,`pointermove`,n,!1),a(o,`pointerup`,r,!1),a(o,`pointercancel`,r,!1)}}}let n=(e,n,r)=>{t(),s(e,`keyboard`,n,r),c(e,`keyboard`)};return e.onKeyDown=e=>{switch(e.key){case`Left`:case`ArrowLeft`:e.preventDefault(),e.stopPropagation(),n(e,-1,0);break;case`Right`:case`ArrowRight`:e.preventDefault(),e.stopPropagation(),n(e,1,0);break;case`Up`:case`ArrowUp`:e.preventDefault(),e.stopPropagation(),n(e,0,-1);break;case`Down`:case`ArrowDown`:e.preventDefault(),e.stopPropagation(),n(e,0,1)}},e},[a,o,i])}}var zS=(0,v.createContext)({}),Une=e=>{let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,...i}=e;return i},BS=ap(function(e,t){[e,t]=Zf(e,t,zS);let{hoverProps:n,isHovered:r}=Zm({...e,isDisabled:e.disabled}),{isFocused:i,isFocusVisible:a,focusProps:o}=Gm({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e[`aria-invalid`]&&e[`aria-invalid`]!==`false`,c=Jf({...e,values:{isHovered:r,isFocused:i,isFocusVisible:a,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:`react-aria-Input`});return v.createElement(np.input,{...W(Une(e),o,n),...c,ref:t,"data-focused":i||void 0,"data-disabled":e.disabled||void 0,"data-hovered":r||void 0,"data-focus-visible":a||void 0,"data-invalid":s||void 0})});function VS(e,t){let{inputElementType:n=`input`,isDisabled:r=!1,isRequired:i=!1,isReadOnly:a=!1,type:o=`text`,validationBehavior:s=`aria`}=e,[c,l]=eh(e.value,e.defaultValue||``,e.onChange),{focusableProps:u}=wm(e,t),d=ex({...e,value:c}),{isInvalid:f,validationErrors:p,validationDetails:m}=d.displayValidation,{labelProps:h,fieldProps:g,descriptionProps:_,errorMessageProps:y}=$x({...e,isInvalid:f,errorMessage:e.errorMessage||p}),b=Us(e,{labelable:!0}),x={type:o,pattern:e.pattern},[S]=(0,v.useState)(c);return Cc(t,e.defaultValue??S,l),tS(e,d,t),{labelProps:h,inputProps:W(b,n===`input`?x:void 0,{disabled:r,readOnly:a,required:i&&s===`native`,"aria-required":i&&s===`aria`||void 0,"aria-invalid":f||void 0,"aria-errormessage":e[`aria-errormessage`],"aria-activedescendant":e[`aria-activedescendant`],"aria-autocomplete":e[`aria-autocomplete`],"aria-haspopup":e[`aria-haspopup`],"aria-controls":e[`aria-controls`],value:c,onChange:e=>l(U(e).value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,form:e.form,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,enterKeyHint:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...u,...g}),descriptionProps:_,errorMessageProps:y,isInvalid:f,validationErrors:p,validationDetails:m}}function HS(){return typeof window<`u`&&window.InputEvent&&typeof InputEvent.prototype.getTargetRanges==`function`}function Wne(e,t,n){let r=$s(e=>{let r=n.current;if(!r)return;let i=null;switch(e.inputType){case`historyUndo`:case`historyRedo`:return;case`insertLineBreak`:return;case`deleteContent`:case`deleteByCut`:case`deleteByDrag`:i=r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case`deleteContentForward`:i=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd+1):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case`deleteContentBackward`:i=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart-1)+r.value.slice(r.selectionStart):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case`deleteSoftLineBackward`:case`deleteHardLineBackward`:i=r.value.slice(r.selectionStart);break;default:e.data!=null&&(i=r.value.slice(0,r.selectionStart)+e.data+r.value.slice(r.selectionEnd))}(i==null||!t.validate(i))&&e.preventDefault()});(0,v.useEffect)(()=>{if(!HS()||!n.current)return;let e=n.current;return e.addEventListener(`beforeinput`,r,!1),()=>{e.removeEventListener(`beforeinput`,r,!1)}},[n]);let i=HS()?null:e=>{let n=U(e).value.slice(0,U(e).selectionStart)+e.data+U(e).value.slice(U(e).selectionEnd);t.validate(n)||e.preventDefault()},{labelProps:a,inputProps:o,descriptionProps:s,errorMessageProps:c,...l}=VS(e,n),u=(0,v.useRef)(null);return{inputProps:W(o,{onBeforeInput:i,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:r}=n.current;u.current={value:e,selectionStart:t,selectionEnd:r}},onCompositionEnd(){if(n.current&&!t.validate(n.current.value)){let{value:e,selectionStart:r,selectionEnd:i}=u.current;n.current.value=e,n.current.setSelectionRange(r,i),t.setInputValue(e)}}}),labelProps:a,descriptionProps:s,errorMessageProps:c,...l}}function Gne(e,t){let{onScroll:n,isDisabled:r}=e,i=(0,v.useCallback)(e=>{e.ctrlKey||(e.preventDefault(),e.stopPropagation(),n&&n({deltaX:e.deltaX,deltaY:e.deltaY}))},[n]);_c(t,`wheel`,r?void 0:i)}var US={};US={Empty:`فارغ`};var WS={};WS={Empty:`Изпразни`};var GS={};GS={Empty:`Prázdné`};var KS={};KS={Empty:`Tom`};var qS={};qS={Empty:`Leer`};var JS={};JS={Empty:`Άδειο`};var YS={};YS={Empty:`Empty`};var XS={};XS={Empty:`Vacío`};var ZS={};ZS={Empty:`Tühjenda`};var QS={};QS={Empty:`Tyhjä`};var $S={};$S={Empty:`Vide`};var eC={};eC={Empty:`ריק`};var tC={};tC={Empty:`Prazno`};var nC={};nC={Empty:`Üres`};var rC={};rC={Empty:`Vuoto`};var iC={};iC={Empty:`空`};var aC={};aC={Empty:`비어 있음`};var oC={};oC={Empty:`Tuščias`};var sC={};sC={Empty:`Tukšs`};var cC={};cC={Empty:`Tom`};var lC={};lC={Empty:`Leeg`};var uC={};uC={Empty:`Pusty`};var dC={};dC={Empty:`Vazio`};var fC={};fC={Empty:`Vazio`};var pC={};pC={Empty:`Gol`};var mC={};mC={Empty:`Не заполнено`};var hC={};hC={Empty:`Prázdne`};var gC={};gC={Empty:`Prazen`};var _C={};_C={Empty:`Prazno`};var vC={};vC={Empty:`Tomt`};var yC={};yC={Empty:`Boş`};var bC={};bC={Empty:`Пусто`};var xC={};xC={Empty:`空`};var SC={};SC={Empty:`空白`};var CC={};CC={"ar-AE":US,"bg-BG":WS,"cs-CZ":GS,"da-DK":KS,"de-DE":qS,"el-GR":JS,"en-US":YS,"es-ES":XS,"et-EE":ZS,"fi-FI":QS,"fr-FR":$S,"he-IL":eC,"hr-HR":tC,"hu-HU":nC,"it-IT":rC,"ja-JP":iC,"ko-KR":aC,"lt-LT":oC,"lv-LV":sC,"nb-NO":cC,"nl-NL":lC,"pl-PL":uC,"pt-BR":dC,"pt-PT":fC,"ro-RO":pC,"ru-RU":mC,"sk-SK":hC,"sl-SI":gC,"sr-SP":_C,"sv-SE":vC,"tr-TR":yC,"uk-UA":bC,"zh-CN":xC,"zh-TW":SC};function wC(e){return e&&e.__esModule?e.default:e}var TC=()=>{};function EC(e){let t=(0,v.useRef)(void 0),{value:n,textValue:r,minValue:i,maxValue:a,isDisabled:o,isReadOnly:s,isRequired:c,onIncrement:l,onIncrementPage:u,onDecrement:d,onDecrementPage:f,onDecrementToMin:p,onIncrementToMax:m}=e,h=s_(wC(CC),`@react-aria/spinbutton`),g=(0,v.useRef)(!1),_=(0,v.useCallback)(()=>{clearTimeout(t.current),g.current=!1},[]),y=$s(()=>{_()});(0,v.useEffect)(()=>()=>y(),[]);let{keyboardProps:b}=Sm({isDisabled:o||s,shortcuts:{PageUp:()=>{if(u){u();return}if(l){l();return}return!1},ArrowUp:()=>{if(l){l();return}return!1},PageDown:()=>{if(f){f();return}if(d){d();return}return!1},ArrowDown:()=>{if(d){d();return}return!1},Home:()=>{if(p){p();return}return!1},End:()=>{if(m){m();return}return!1}},allowRepeats:!0}),x=(0,v.useRef)(!1),S=()=>{x.current=!0},C=()=>{x.current=!1},w=r===``?h.format(`Empty`):(r||`${n}`).replace(`-`,`−`);(0,v.useEffect)(()=>{x.current&&(Kp(`assertive`),Gp(w,`assertive`))},[w]);let T=(0,v.useCallback)(()=>{_()},[_]),E=$s(l??TC),D=$s(d??TC),O=$s(()=>{(a===void 0||isNaN(a)||n===void 0||isNaN(n)||n{y(),g.current=!0,t.current=window.setTimeout(O,e)}),A=$s(()=>{(i===void 0||isNaN(i)||n===void 0||isNaN(n)||n>i)&&(D(),j(60))}),j=$s(e=>{y(),g.current=!0,t.current=window.setTimeout(A,e)}),M=e=>{e.preventDefault()},{addGlobalListener:N,removeAllGlobalListeners:P}=Ys(),F=(0,v.useRef)(!1),[I,L]=(0,v.useState)(null);(0,v.useEffect)(()=>{I===`touch`?k(600):I?k(400):I||y()},[I]);let[R,z]=(0,v.useState)(null);return(0,v.useEffect)(()=>{R===`touch`?j(600):R?j(400):R||y()},[R]),{spinButtonProps:{role:`spinbutton`,"aria-valuenow":n!==void 0&&!isNaN(n)?n:void 0,"aria-valuetext":w,"aria-valuemin":i,"aria-valuemax":a,"aria-disabled":o||void 0,"aria-readonly":s||void 0,"aria-required":c||void 0,...b,onFocus:S,onBlur:C},incrementButtonProps:{onPressStart:e=>{_(),e.pointerType===`touch`?(N(window,`pointercancel`,T,{capture:!0}),F.current=!1,L(`touch`)):(l?.(),L(`mouse`)),N(window,`contextmenu`,M)},onPressUp:e=>{_(),e.pointerType===`touch`&&(F.current=!0),P(),L(null)},onPressEnd:e=>{_(),e.pointerType===`touch`&&!g.current&&F.current&&l?.(),F.current=!1,L(null)},onFocus:S,onBlur:C},decrementButtonProps:{onPressStart:e=>{_(),e.pointerType===`touch`?(N(window,`pointercancel`,T,{capture:!0}),F.current=!1,z(`touch`)):(d?.(),z(`mouse`))},onPressUp:e=>{_(),e.pointerType===`touch`&&(F.current=!0),P(),z(null)},onPressEnd:e=>{_(),e.pointerType===`touch`&&!g.current&&F.current&&d?.(),F.current=!1,z(null)},onFocus:S,onBlur:C}}}var DC={};DC={decrease:e=>`\u{62E}\u{641}\u{636} ${e.fieldLabel}`,increase:e=>`\u{632}\u{64A}\u{627}\u{62F}\u{629} ${e.fieldLabel}`,numberField:`حقل رقمي`};var OC={};OC={decrease:e=>`\u{41D}\u{430}\u{43C}\u{430}\u{43B}\u{44F}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{441}\u{438}\u{43B}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,numberField:`Номер на полето`};var kC={};kC={decrease:e=>`Sn\xed\u{17E}it ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}it ${e.fieldLabel}`,numberField:`Číselné pole`};var AC={};AC={decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`\xd8g ${e.fieldLabel}`,numberField:`Talfelt`};var jC={};jC={decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erh\xf6hen`,numberField:`Nummernfeld`};var MC={};MC={decrease:e=>`\u{39C}\u{3B5}\u{3AF}\u{3C9}\u{3C3}\u{3B7} ${e.fieldLabel}`,increase:e=>`\u{391}\u{3CD}\u{3BE}\u{3B7}\u{3C3}\u{3B7} ${e.fieldLabel}`,numberField:`Πεδίο αριθμού`};var NC={};NC={decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:`Number field`};var PC={};PC={decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:`Campo de número`};var FC={};FC={decrease:e=>`V\xe4henda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:`Numbri väli`};var IC={};IC={decrease:e=>`V\xe4henn\xe4 ${e.fieldLabel}`,increase:e=>`Lis\xe4\xe4 ${e.fieldLabel}`,numberField:`Numerokenttä`};var LC={};LC={decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:`Champ de nombre`};var RC={};RC={decrease:e=>`\u{5D4}\u{5E7}\u{5D8}\u{5DF} ${e.fieldLabel}`,increase:e=>`\u{5D4}\u{5D2}\u{5D3}\u{5DC} ${e.fieldLabel}`,numberField:`שדה מספר`};var zC={};zC={decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:`Polje broja`};var BC={};BC={decrease:e=>`${e.fieldLabel} cs\xf6kkent\xe9se`,increase:e=>`${e.fieldLabel} n\xf6vel\xe9se`,numberField:`Számmező`};var VC={};VC={decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:`Campo numero`};var HC={};HC={decrease:e=>`${e.fieldLabel}\u{3092}\u{7E2E}\u{5C0F}`,increase:e=>`${e.fieldLabel}\u{3092}\u{62E1}\u{5927}`,numberField:`数値フィールド`};var UC={};UC={decrease:e=>`${e.fieldLabel} \u{AC10}\u{C18C}`,increase:e=>`${e.fieldLabel} \u{C99D}\u{AC00}`,numberField:`번호 필드`};var WC={};WC={decrease:e=>`Suma\u{17E}inti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:`Numerio laukas`};var GC={};GC={decrease:e=>`Samazin\u{101}\u{161}ana ${e.fieldLabel}`,increase:e=>`Palielin\u{101}\u{161}ana ${e.fieldLabel}`,numberField:`Skaitļu lauks`};var KC={};KC={decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`\xd8k ${e.fieldLabel}`,numberField:`Tallfelt`};var qC={};qC={decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:`Getalveld`};var JC={};JC={decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwi\u{119}ksz ${e.fieldLabel}`,numberField:`Pole numeru`};var YC={};YC={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:`Campo de número`};var XC={};XC={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:`Campo numérico`};var ZC={};ZC={decrease:e=>`Sc\u{103}dere ${e.fieldLabel}`,increase:e=>`Cre\u{219}tere ${e.fieldLabel}`,numberField:`Câmp numeric`};var QC={};QC={decrease:e=>`\u{423}\u{43C}\u{435}\u{43D}\u{44C}\u{448}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{432}\u{435}\u{43B}\u{438}\u{447}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,numberField:`Числовое поле`};var $C={};$C={decrease:e=>`Zn\xed\u{17E}i\u{165} ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}i\u{165} ${e.fieldLabel}`,numberField:`Číselné pole`};var ew={};ew={decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Pove\u{10D}ajte ${e.fieldLabel}`,numberField:`Številčno polje`};var tw={};tw={decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:`Polje broja`};var nw={};nw={decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`\xd6ka ${e.fieldLabel}`,numberField:`Nummerfält`};var rw={};rw={decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} artt\u{131}r`,numberField:`Sayı alanı`};var iw={};iw={decrease:e=>`\u{417}\u{43C}\u{435}\u{43D}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,increase:e=>`\u{417}\u{431}\u{456}\u{43B}\u{44C}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,numberField:`Поле номера`};var aw={};aw={decrease:e=>`\u{964D}\u{4F4E} ${e.fieldLabel}`,increase:e=>`\u{63D0}\u{9AD8} ${e.fieldLabel}`,numberField:`数字字段`};var ow={};ow={decrease:e=>`\u{7E2E}\u{5C0F} ${e.fieldLabel}`,increase:e=>`\u{653E}\u{5927} ${e.fieldLabel}`,numberField:`數字欄位`};var sw={};sw={"ar-AE":DC,"bg-BG":OC,"cs-CZ":kC,"da-DK":AC,"de-DE":jC,"el-GR":MC,"en-US":NC,"es-ES":PC,"et-EE":FC,"fi-FI":IC,"fr-FR":LC,"he-IL":RC,"hr-HR":zC,"hu-HU":BC,"it-IT":VC,"ja-JP":HC,"ko-KR":UC,"lt-LT":WC,"lv-LV":GC,"nb-NO":KC,"nl-NL":qC,"pl-PL":JC,"pt-BR":YC,"pt-PT":XC,"ro-RO":ZC,"ru-RU":QC,"sk-SK":$C,"sl-SI":ew,"sr-SP":tw,"sv-SE":nw,"tr-TR":rw,"uk-UA":iw,"zh-CN":aw,"zh-TW":ow};function Kne(e){return e&&e.__esModule?e.default:e}function qne(e,t,n){let{id:r,decrementAriaLabel:i,incrementAriaLabel:a,isDisabled:o,isReadOnly:s,isRequired:c,minValue:l,maxValue:u,autoFocus:d,label:f,formatOptions:p,onBlur:m=()=>{},onFocus:h,onFocusChange:g,onKeyDown:_,onKeyUp:y,description:b,errorMessage:x,isWheelDisabled:S,...C}=e,{increment:w,incrementToMax:T,decrement:E,decrementToMin:D,numberValue:O,inputValue:k,commit:A,commitValidation:j}=t,M=s_(Kne(sw),`@react-aria/numberfield`),N=(0,v.useCallback)(()=>{let e=n.current?.value??``;(0,Ec.flushSync)(()=>{A()}),n.current?.value!==e&&Gp(n.current?.value??``,`assertive`)},[A,n]),P=ms(r),{focusProps:F}=vm({onBlur(){N()}}),I=Bp(p),L=(0,v.useMemo)(()=>I.resolvedOptions(),[I]),R=Bp({...p,currencySign:void 0}),{spinButtonProps:z,incrementButtonProps:B,decrementButtonProps:V}=EC({isDisabled:o,isReadOnly:s,isRequired:c,maxValue:u,minValue:l,onIncrement:w,onIncrementToMax:T,onDecrement:E,onDecrementToMin:D,value:O,textValue:(0,v.useMemo)(()=>isNaN(O)?``:R.format(O),[R,O])}),[H,ee]=(0,v.useState)(!1),{focusWithinProps:te}=Wm({isDisabled:o,onFocusWithinChange:ee});Gne({onScroll:(0,v.useCallback)(e=>{Math.abs(e.deltaY)<=Math.abs(e.deltaX)||(e.deltaY>0?w():e.deltaY<0&&E())},[E,w]),isDisabled:S||o||s||!H},n);let ne=(L.maximumFractionDigits??0)>0,re=t.minValue===void 0||isNaN(t.minValue)||t.minValue<0,ie=`numeric`;Oo()?re?ie=`text`:ne&&(ie=`decimal`):Po()&&(re?ie=`numeric`:ne&&(ie=`decimal`));let ae=e=>{t.validate(e)&&t.setInputValue(e)},oe=t=>{e.onPaste?.(t);let n=U(t);n&&(n.selectionEnd??-1)-(n.selectionStart??0)===n.value.length&&(t.preventDefault(),A(t.clipboardData?.getData?.(`text/plain`)?.trim()??``))},se=Us(e),{keyboardProps:ce}=Sm({isDisabled:o||s,shortcuts:{Enter:()=>((0,Ec.flushSync)(()=>{A()}),j(),{shouldPreventDefault:!1})},onKeyDown:_,onKeyUp:y}),{isInvalid:le,validationErrors:ue,validationDetails:de}=t.displayValidation,{labelProps:fe,inputProps:pe,descriptionProps:me,errorMessageProps:he}=Wne({...C,...se,name:void 0,form:void 0,label:f,autoFocus:d,isDisabled:o,isReadOnly:s,isRequired:c,validate:void 0,[$b]:t,value:k,defaultValue:`!`,autoComplete:`off`,"aria-label":e[`aria-label`]||void 0,"aria-labelledby":e[`aria-labelledby`]||void 0,id:P,type:`text`,inputMode:ie,onChange:ae,onBlur:m,onFocus:h,onFocusChange:g,onPaste:oe,description:b,errorMessage:x},t,n),ge=W(ce,pe);Cc(n,t.defaultNumberValue,t.setNumberValue),Jne(t,e.validationBehavior,e.commitBehavior,n,t.minValue,t.maxValue,e.step,t.numberValue);let _e=W(z,F,ge,{role:null,"aria-roledescription":Ao()?null:M.format(`numberField`),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:`off`,spellCheck:`false`});e.validationBehavior===`native`&&(_e[`aria-required`]=void 0);let ve=e=>{Os()!==n.current&&(e.pointerType===`mouse`?n.current?.focus():e.target.focus())},ye=e[`aria-label`]||(typeof e.label==`string`?e.label:``),be;ye||(be=e.label==null?e[`aria-labelledby`]:fe.id);let xe=ms(),Se=ms(),Ce=W(B,{"aria-label":a||M.format(`increase`,{fieldLabel:ye}).trim(),id:be&&!a?xe:null,"aria-labelledby":be&&!a?`${xe} ${be}`:null,"aria-controls":P,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:ve}),we=W(V,{"aria-label":i||M.format(`decrease`,{fieldLabel:ye}).trim(),id:be&&!i?Se:null,"aria-labelledby":be&&!i?`${Se} ${be}`:null,"aria-controls":P,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:ve});return{groupProps:{...te,role:`group`,"aria-disabled":o,"aria-invalid":le?`true`:void 0},labelProps:fe,inputProps:_e,incrementButtonProps:Ce,decrementButtonProps:we,errorMessageProps:he,descriptionProps:me,isInvalid:le,validationErrors:ue,validationDetails:de}}var cw=null;function Jne(e,t,n,r,i,a,o,s){Xo(()=>{let c=r.current;if(n!==`validate`||e.realtimeValidation.isInvalid||!c||c.disabled||(!cw&&typeof document<`u`&&(cw=document.createElement(`input`),cw.type=`number`),!cw))return;cw.min=i!=null&&!isNaN(i)?String(i):``,cw.max=a!=null&&!isNaN(a)?String(a):``,cw.step=o!=null&&!isNaN(o)?String(o):``,cw.value=s!=null&&!isNaN(s)?String(s):``;let l=c.validity.valid&&cw.validity.valid,u=c.validationMessage||cw.validationMessage,d={isInvalid:!l,validationErrors:u?[u]:[],validationDetails:{badInput:c.validity.badInput,customError:c.validity.customError,patternMismatch:c.validity.patternMismatch,rangeOverflow:cw.validity.rangeOverflow,rangeUnderflow:cw.validity.rangeUnderflow,stepMismatch:cw.validity.stepMismatch,tooLong:c.validity.tooLong,tooShort:c.validity.tooShort,typeMismatch:c.validity.typeMismatch,valueMissing:c.validity.valueMissing,valid:l}};e.updateValidation(d),t===`native`&&!cw.validity.valid&&c.setCustomValidity(cw.validationMessage)})}function Yne(e){let{minValue:t,maxValue:n,step:r,formatOptions:i,value:a,defaultValue:o=NaN,onChange:s,locale:c,isDisabled:l,isReadOnly:u,commitBehavior:d=`snap`}=e;a===null&&(a=NaN);let f=(0,v.useCallback)(e=>r===void 0||isNaN(r)?Uc(e,t,n):Gc(e,t,n,r),[r,t,n]);a!==void 0&&!isNaN(a)&&d===`snap`&&(a=f(a)),!isNaN(o)&&d===`snap`&&(o=f(o));let[p,m]=eh(a,isNaN(o)?NaN:o,s),[h]=(0,v.useState)(p),[g,_]=(0,v.useState)(()=>isNaN(p)?``:new Tp(c,i).format(p)),y=(0,v.useMemo)(()=>new Ap(c,i),[c,i]),b=(0,v.useMemo)(()=>y.getNumberingSystem(g),[y,g]),x=(0,v.useMemo)(()=>new Tp(c,{...i,numberingSystem:b}),[c,i,b]),S=(0,v.useMemo)(()=>x.resolvedOptions(),[x]),C=(0,v.useCallback)(e=>isNaN(e)||e===null?``:x.format(e),[x]),w=ex({...e,value:p}),T=r!==void 0&&!isNaN(r)?r:1;S.style===`percent`&&(r===void 0||isNaN(r))&&(T=.01);let[E,D]=(0,v.useState)(p),[O,k]=(0,v.useState)(c),[A,j]=(0,v.useState)(i);(!Object.is(p,E)||c!==O||!Xne(i,A))&&(_(C(p)),D(p),k(c),j(i));let M=(0,v.useMemo)(()=>y.parse(g),[y,g]),N=e=>{let t=e===void 0?g:e,n=M;if(e!==void 0&&(n=y.parse(t)),!t.length){m(NaN),_(a===void 0?``:C(p));return}if(isNaN(n)){_(C(p));return}let r=d===`snap`?f(n):n;r=y.parse(C(r));let i=r!==p;m(r),_(C(a===void 0?r:p)),i&&w.commitValidation()},P=(e,r=0)=>{let i=M;if(isNaN(i))return Gc(isNaN(r)?0:r,t,n,T);{let r=Gc(i,t,n,T);return e===`+`&&r>i||e===`-`&&r{let e=P(`+`,t);e===p&&_(C(e)),m(e),w.commitValidation()},I=()=>{let e=P(`-`,n);e===p&&_(C(e)),m(e),w.commitValidation()},L=()=>{n!=null&&(m(Gc(n,t,n,T)),w.commitValidation())},R=()=>{t!=null&&(m(t),w.commitValidation())},z=(0,v.useMemo)(()=>!l&&!u&&(isNaN(M)||n===void 0||isNaN(n)||Gc(M,t,n,T)>M||lw(`+`,M,T)<=n),[l,u,t,n,T,M]),B=(0,v.useMemo)(()=>!l&&!u&&(isNaN(M)||t===void 0||isNaN(t)||Gc(M,t,n,T)=t),[l,u,t,n,T,M]),V=e=>y.isValidPartialNumber(e,t,n);return{...w,validate:V,increment:F,incrementToMax:L,decrement:I,decrementToMin:R,canIncrement:z,canDecrement:B,minValue:t,maxValue:n,numberValue:M,defaultNumberValue:isNaN(o)?h:o,setNumberValue:m,setInputValue:_,inputValue:g,commit:N}}function Xne(e,t){if(e===t)return!0;if(!e||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(t[r]!==e[r])return!1;return!0}function lw(e,t,n){let r=e===`+`?t+n:t-n;if(t%1!=0||n%1!=0){let i=t.toString().split(`.`),a=n.toString().split(`.`),o=i[1]&&i[1].length||0,s=a[1]&&a[1].length||0,c=10**Math.max(o,s);t=Math.round(t*c),n=Math.round(n*c),r=e===`+`?t+n:t-n,r/=c}return r}var uw={blue:`\x1B[34m`,green:`\x1B[32m`,magenta:`\x1B[35m`,red:`\x1B[31m`,reset:`\x1B[0m`,yellow:`\x1B[33m`},Zne={debug:uw.magenta,error:uw.red,info:uw.blue,success:uw.green,warn:uw.yellow},Qne={debug:`🔍`,error:`❌`,info:`ℹ️`,success:`✅`,warn:`⚠️`},$ne=new class{constructor(e={}){this.enabled=e.enabled??!0,this.prefix=e.prefix??`HeroUI`}formatMessage(e,t){let n=Zne[e],r=Qne[e];return`${n}[${this.prefix}]${uw.reset} ${r} ${t}`}log(e,t,...n){if(!this.enabled)return;let r=this.formatMessage(e,t);switch(e){case`error`:console.error(r,...n);break;case`warn`:console.warn(r,...n);break;default:console.log(r,...n)}}info(e,...t){this.log(`info`,e,...t)}success(e,...t){this.log(`success`,e,...t)}warn(e,...t){this.log(`warn`,e,...t)}error(e,...t){this.log(`error`,e,...t)}debug(e,...t){this.log(`debug`,e,...t)}divider(e=`=`,t=80){this.enabled&&console.log(e.repeat(t))}newline(){this.enabled&&console.log()}}({prefix:`HeroUI`}),dw,ere=typeof process<`u`&&!1,fw=e=>{ere&&(dw??=new Set,dw.has(e)&&$ne.warn(`Duplicate collection slot "${e}". Use a unique, namespaced name (e.g. "tabs.listContainer", "menu.popover").`),dw.add(e));let t=`$$heroui.collection.${e}`,n=(0,v.createContext)(void 0),r=(e,n)=>v.Children.map(e,e=>(0,v.isValidElement)(e)?v.cloneElement(e,{[t]:n}):e),i=e=>{let{[t]:n,...r}=e;return[n,r]},a=e=>{let[t,r]=i(e),a=(0,v.useContext)(n);return[t??a,r]},o=({children:e,...t})=>(0,G.jsx)(n.Provider,{value:t,children:r(e,t)});return o.displayName=`HeroUI.CollectionSlot(${e})`,{key:t,inject:r,consume:i,useSlot:a,Injector:o,withSlot:(t,n)=>{let r=(0,v.forwardRef)(function(r,i){let[o,s]=a(r),{children:c,...l}=s;if(!o)return(0,G.jsx)(t,{...l,ref:i,children:c});if(n)return n({...l,children:c},o,i);let{className:u,render:d,...f}=o;return(0,G.jsx)(t,{...l,ref:i,children:d?d({children:c,className:u,...f}):(0,G.jsx)(`div`,{className:u,"data-slot":`${e}-container`,...f,children:c})})});return r.displayName=`HeroUI.withCollectionSlot(${t.displayName||t.name||e})`,r},Context:n}},tre=(0,v.createContext)({});fw(`combo-box.inputGroup`);function pw(e,t){return e-t*Math.floor(e/t)}var nre=1721426;function mw(e,t,n,r){t=gw(e,t);let i=t-1,a=-2;return n<=2?a=0:hw(t)&&(a=-1),1721425+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+r)}function hw(e){return e%4==0&&(e%100!=0||e%400==0)}function gw(e,t){return e===`BC`?1-t:t}function _w(e){let t=`AD`;return e<=0&&(t=`BC`,e=1-e),[t,e]}var rre={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]},vw=class{fromJulianDay(e){let t=e,n=t-nre,r=Math.floor(n/146097),i=pw(n,146097),a=Math.floor(i/36524),o=pw(i,36524),s=Math.floor(o/1461),c=pw(o,1461),l=Math.floor(c/365),[u,d]=_w(r*400+a*100+s*4+l+ +(a!==4&&l!==4)),f=t-mw(u,d,1,1),p=2;t=0?e:t:e||t}function zw(e){return e=Zw(e,new vw),Bw(gw(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Bw(e,t,n,r,i,a,o){let s=new Date;return s.setUTCHours(r,i,a,o),s.setUTCFullYear(e,t-1,n),s.getTime()}function Vw(e,t){if(t===`UTC`)return 0;if(e>0&&t===kw()&&!Aw())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:r,day:i,hour:a,minute:o,second:s}=Uw(e,t);return Bw(n,r,i,a,o,s,0)-Math.floor(e/1e3)*1e3}var Hw=new Map;function Uw(e,t){let n=Hw.get(t);n||(n=new Intl.DateTimeFormat(`en-US`,{timeZone:t,hour12:!1,era:`short`,year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`}),Hw.set(t,n));let r=n.formatToParts(new Date(e)),i={};for(let e of r)e.type!==`literal`&&(i[e.type]=e.value);return{year:i.era===`BC`||i.era===`B`?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour===`24`?0:+i.hour,minute:+i.minute,second:+i.second}}var Ww=864e5;function mre(e,t,n,r){return(n===r?[n]:[n,r]).filter(n=>hre(e,t,n))}function hre(e,t,n){let r=Uw(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}function Gw(e,t,n=`compatible`){let r=Yw(e);if(t===`UTC`)return zw(r);if(t===kw()&&n===`compatible`&&!Aw()){r=Zw(r,new vw);let e=new Date,t=gw(r.era,r.year);return e.setFullYear(t,r.month-1,r.day),e.setHours(r.hour,r.minute,r.second,r.millisecond),e.getTime()}let i=zw(r),a=Vw(i-Ww,t),o=Vw(i+Ww,t),s=mre(r,t,i-a,i-o);if(s.length===1)return s[0];if(s.length>1)switch(n){case`compatible`:case`earlier`:return s[0];case`later`:return s[s.length-1];case`reject`:throw RangeError(`Multiple possible absolute times found`)}switch(n){case`earlier`:return Math.min(i-a,i-o);case`compatible`:case`later`:return Math.max(i-a,i-o);case`reject`:throw RangeError(`No such absolute time found`)}}function Kw(e,t,n=`compatible`){return new Date(Gw(e,t,n))}function qw(e,t){let n=Vw(e,t),r=new Date(e+n),i=r.getUTCFullYear(),a=r.getUTCMonth()+1,o=r.getUTCDate(),s=r.getUTCHours(),c=r.getUTCMinutes(),l=r.getUTCSeconds(),u=r.getUTCMilliseconds();return new DT(i<1?`BC`:`AD`,i<1?-i+1:i,a,o,t,n,s,c,l,u)}function Jw(e){return new wT(e.calendar,e.era,e.year,e.month,e.day)}function Yw(e,t){let n=0,r=0,i=0,a=0;if(`timeZone`in e)({hour:n,minute:r,second:i,millisecond:a}=e);else if(`hour`in e&&!t)return e;return t&&({hour:n,minute:r,second:i,millisecond:a}=t),new ET(e.calendar,e.era,e.year,e.month,e.day,n,r,i,a)}function Xw(e){return new TT(e.hour,e.minute,e.second,e.millisecond)}function Zw(e,t){if(bw(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,aT(r),r}function Qw(e,t,n){return e instanceof DT?e.timeZone===t?e:$w(e,t):qw(Gw(e,t,n),t)}function gre(e){let t=zw(e)-e.offset;return new Date(t)}function $w(e,t){return Zw(qw(zw(e)-e.offset,t),e.calendar)}function _re(e){return $w(e,kw())}var eT=36e5;function tT(e,t){let n=e.copy(),r=`hour`in n?fT(n,t):0;nT(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,rT(n),iT(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=r,vre(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){let e=n.calendar.isInverseEra?.(n);n.year=i,n.month=e?1:n.calendar.getMonthsInYear(n),n.day=e?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let a=n.calendar.getMonthsInYear(n);return n.month>a&&(n.month=a,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function nT(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function rT(e){for(;e.month<1;)nT(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,nT(e,1)}function vre(e){for(;e.day<1;)e.month--,rT(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,rT(e)}function iT(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function aT(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),iT(e)}function oT(e){let t={};for(let n in e)typeof e[n]==`number`&&(t[n]=-e[n]);return t}function sT(e,t){return tT(e,oT(t))}function cT(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),aT(n),n}function lT(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),uT(n),n}function yre(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=dT(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=dT(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=dT(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=dT(e.hour,24),t}function uT(e){e.millisecond=Math.max(0,Math.min(e.millisecond,999)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function dT(e,t){let n=e%t;return n<0&&(n+=t),n}function fT(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,yre(e)}function pT(e,t){let n=e.copy();return fT(n,t),n}function bre(e,t){return pT(e,oT(t))}function mT(e,t,n,r){let i=e.copy();switch(t){case`era`:{let t=e.calendar.getEras(),a=t.indexOf(e.era);if(a<0)throw Error(`Invalid era: `+e.era);a=gT(a,n,0,t.length-1,r?.round),i.era=t[a],aT(i);break}case`year`:i.calendar.isInverseEra?.(i)&&(n=-n),i.year=gT(e.year,n,-1/0,9999,r?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case`month`:i.month=gT(e.month,n,1,e.calendar.getMonthsInYear(e),r?.round);break;case`day`:i.day=gT(e.day,n,1,e.calendar.getDaysInMonth(e),r?.round);break;default:throw Error(`Unsupported field `+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),aT(i),i}function hT(e,t,n,r){let i=e.copy();switch(t){case`hour`:{let t=e.hour,a=0,o=23;if(r?.hourCycle===12){let e=t>=12;a=e?12:0,o=e?23:11}i.hour=gT(t,n,a,o,r?.round);break}case`minute`:i.minute=gT(e.minute,n,0,59,r?.round);break;case`second`:i.second=gT(e.second,n,0,59,r?.round);break;case`millisecond`:i.millisecond=gT(e.millisecond,n,0,999,r?.round);break;default:throw Error(`Unsupported field `+t)}return i}function gT(e,t,n,r,i=!1){if(i){e+=Math.sign(t),e0?Math.ceil(e/i)*i:Math.floor(e/i)*i,e>r&&(e=n)}else e+=t,er&&(e=n+(e-r-1));return e}function _T(e,t){let n;return n=t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0?Gw(tT(Yw(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):zw(e)-e.offset,n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5,Zw(qw(n,e.timeZone),e.calendar)}function xre(e,t){return _T(e,oT(t))}function Sre(e,t,n,r){switch(t){case`hour`:{let t=0,i=23;if(r?.hourCycle===12){let n=e.hour>=12;t=n?12:0,i=n?23:11}let a=Yw(e),o=Zw(lT(a,{hour:t}),new vw),s=[Gw(o,e.timeZone,`earlier`),Gw(o,e.timeZone,`later`)].filter(t=>qw(t,e.timeZone).day===o.day)[0],c=Zw(lT(a,{hour:i}),new vw),l=[Gw(c,e.timeZone,`earlier`),Gw(c,e.timeZone,`later`)].filter(t=>qw(t,e.timeZone).day===c.day).pop(),u=zw(e)-e.offset,d=Math.floor(u/eT),f=u%eT;return u=gT(d,n,Math.floor(s/eT),Math.floor(l/eT),r?.round)*eT+f,Zw(qw(u,e.timeZone),e.calendar)}case`minute`:case`second`:case`millisecond`:return hT(e,t,n,r);case`era`:case`year`:case`month`:case`day`:return Zw(qw(Gw(mT(Yw(e),t,n,r),e.timeZone),e.timeZone),e.calendar);default:throw Error(`Unsupported field `+t)}}function Cre(e,t,n){let r=Yw(e),i=lT(cT(r,t),t);return i.compare(r)===0?e:Zw(qw(Gw(i,e.timeZone,n),e.timeZone),e.calendar)}var wre=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,Tre=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,vT=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function Ere(e){let t=e.match(wre);if(!t)throw vT.test(e)?Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):Error(`Invalid ISO 8601 date string: `+e);let n=new wT(yT(t[1],0,9999),yT(t[2],1,12),1);return n.day=yT(t[3],1,n.calendar.getDaysInMonth(n)),n}function Dre(e){let t=e.match(Tre);if(!t)throw vT.test(e)?Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`):Error(`Invalid ISO 8601 date time string: `+e);let n=yT(t[1],-9999,9999),r=new ET(n<1?`BC`:`AD`,n<1?-n+1:n,yT(t[2],1,12),1,t[4]?yT(t[4],0,23):0,t[5]?yT(t[5],0,59):0,t[6]?yT(t[6],0,59):0,t[7]?yT(t[7],0,1/0)*1e3:0);return r.day=yT(t[3],0,r.calendar.getDaysInMonth(r)),r}function Ore(e,t){let n=e.match(vT);if(!n)throw Error(`Invalid ISO 8601 date time string: `+e);let r=yT(n[1],-9999,9999),i=new DT(r<1?`BC`:`AD`,r<1?-r+1:r,yT(n[2],1,12),1,t,0,n[4]?yT(n[4],0,23):0,n[5]?yT(n[5],0,59):0,n[6]?yT(n[6],0,59):0,n[7]?yT(n[7],0,1/0)*1e3:0);return i.day=yT(n[3],0,i.calendar.getDaysInMonth(i)),n[8]&&(i.offset=yT(n[8],-23,23)*36e5+yT(n[9]??`0`,0,59)*6e4),$w(i,t)}function kre(e){return Ore(e,kw())}function yT(e,t,n){let r=Number(e);if(rn)throw RangeError(`Value out of range: ${t} <= ${r} <= ${n}`);return r}function bT(e){return`${String(e.hour).padStart(2,`0`)}:${String(e.minute).padStart(2,`0`)}:${String(e.second).padStart(2,`0`)}${e.millisecond?String(e.millisecond/1e3).slice(1):``}`}function xT(e){let t=Zw(e,new vw),n;return n=t.era===`BC`?t.year===1?`0000`:`-`+String(Math.abs(1-t.year)).padStart(6,`00`):String(t.year).padStart(4,`0`),`${n}-${String(t.month).padStart(2,`0`)}-${String(t.day).padStart(2,`0`)}`}function ST(e){return`${xT(e)}T${bT(e)}`}function Are(e){let t=Math.sign(e)<0?`-`:`+`;e=Math.abs(e);let n=Math.floor(e/36e5),r=Math.floor(e%36e5/6e4),i=Math.floor(e%36e5%6e4/1e3),a=`${t}${String(n).padStart(2,`0`)}:${String(r).padStart(2,`0`)}`;return i!==0&&(a+=`:${String(i).padStart(2,`0`)}`),a}function jre(e){return`${ST(e)}${Are(e.offset)}[${e.timeZone}]`}function CT(e){let t=typeof e[0]==`object`?e.shift():new vw,n;if(typeof e[0]==`string`)n=e.shift();else{let e=t.getEras();n=e[e.length-1]}let r=e.shift(),i=e.shift(),a=e.shift();return[t,n,r,i,a]}var wT=class e{constructor(...e){let[t,n,r,i,a]=CT(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,aT(this)}copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day):new e(this.calendar,this.year,this.month,this.day)}add(e){return tT(this,e)}subtract(e){return sT(this,e)}set(e){return cT(this,e)}cycle(e,t,n){return mT(this,e,t,n)}toDate(e){return Kw(this,e)}toString(){return xT(this)}compare(e){return Tw(this,e)}},TT=class e{constructor(e=0,t=0,n=0,r=0){this.hour=e,this.minute=t,this.second=n,this.millisecond=r,uT(this)}copy(){return new e(this.hour,this.minute,this.second,this.millisecond)}add(e){return pT(this,e)}subtract(e){return bre(this,e)}set(e){return lT(this,e)}cycle(e,t,n){return hT(this,e,t,n)}toString(){return bT(this)}compare(e){return Ew(this,e)}},ET=class e{constructor(...e){let[t,n,r,i,a]=CT(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,aT(this)}copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return tT(this,e)}subtract(e){return sT(this,e)}set(e){return cT(lT(this,e),e)}cycle(e,t,n){switch(e){case`era`:case`year`:case`month`:case`day`:return mT(this,e,t,n);default:return hT(this,e,t,n)}}toDate(e,t){return Kw(this,e,t)}toString(){return ST(this)}compare(e){let t=Tw(this,e);return t===0?Ew(this,Yw(e)):t}},DT=class e{constructor(...e){let[t,n,r,i,a]=CT(e),o=e.shift(),s=e.shift();this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.timeZone=o,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,aT(this)}copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return _T(this,e)}subtract(e){return xre(this,e)}set(e,t){return Cre(this,e,t)}cycle(e,t,n){return Sre(this,e,t,n)}toDate(){return gre(this)}toString(){return jre(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-Qw(e,this.timeZone).toDate().getTime()}},OT=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],Mre=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],kT=[1867,1911,1925,1988,2018],AT=[`meiji`,`taisho`,`showa`,`heisei`,`reiwa`];function jT(e){let t=OT.findIndex(([t,n,r])=>e.year=0){let[,n,r]=OT[t];e.month=Math.max(n,e.month),e.month===n&&(e.day=Math.max(r,e.day))}}getEras(){return AT}getYearsInEra(e){let t=AT.indexOf(e.era),n=OT[t],r=OT[t+1];if(r==null)return 9999-n[0]+1;let i=r[0]-n[0];return(e.month0?[`minguo`,t]:[`before_minguo`,1-t]}var Fre=class extends vw{fromJulianDay(e){let t=super.fromJulianDay(e),[n,r]=RT(gw(t.era,t.year));return new wT(this,n,r,t.month,t.day)}toJulianDay(e){return super.toJulianDay(zT(e))}getEras(){return[`before_minguo`,`minguo`]}balanceDate(e){let[t,n]=RT(LT(e));e.era=t,e.year=n}isInverseEra(e){return e.era===`before_minguo`}getDaysInMonth(e){return super.getDaysInMonth(zT(e))}getYearsInEra(e){return e.era===`before_minguo`?9999:8088}constructor(...e){super(...e),this.identifier=`roc`}};function zT(e){let[t,n]=_w(LT(e));return new wT(t,n,e.month,e.day)}var Ire=1948320,BT=[0,31,62,93,124,155,186,216,246,276,306,336],Lre=class{fromJulianDay(e){let t=e-Ire,n=1+Math.floor((33*t+3)/12053),r=t-(365*(n-1)+Math.floor((8*n+21)/33)),i=Math.floor(r<216?r/31:(r-6)/30),a=r-BT[i]+1;return new wT(this,n,i+1,a)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=BT[e.month-1],t+=e.day,t}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||pw(25*e.year+11,33)<8?30:29}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getEras(){return[`AP`]}getYearsInEra(){return 9377}constructor(){this.identifier=`persian`}},VT=78,HT=80,Rre=class extends vw{fromJulianDay(e){let t=super.fromJulianDay(e),n=t.year-VT,r=e-mw(t.era,t.year,1,1),i;r=8&&(i+=(e.month-7)*30),i+=e.day-1,i)}getDaysInMonth(e){return e.month===1&&hw(e.year+VT)||e.month>=2&&e.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return[`saka`]}balanceDate(){}constructor(...e){super(...e),this.identifier=`indian`}},UT=1948440,WT=1948439,GT=1300,KT=1600,zre=460322;function qT(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function JT(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),i=Math.min(12,Math.ceil((n-(29+qT(t,r,1,1)))/29.5)+1);return new wT(e,r,i,n-qT(t,r,i,1)+1)}function YT(e){return(14+11*e)%30<11}var XT=class{fromJulianDay(e){return JT(this,UT,e)}toJulianDay(e){return qT(UT,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return e.month===12&&YT(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return YT(e.year)?355:354}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9665}getEras(){return[`AH`]}constructor(){this.identifier=`islamic-civil`}},Bre=class extends XT{fromJulianDay(e){return JT(this,WT,e)}toJulianDay(e){return qT(WT,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier=`islamic-tbla`}},Vre=`qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=`,ZT,QT;function $T(e){return zre+QT[e-GT]}function eE(e,t){let n=e-GT,r=1<<11-(t-1);return(ZT[n]&r)===0?29:30}function tE(e,t){let n=$T(e);for(let r=1;re.charCodeAt(0)).buffer),!QT){QT=new Uint32Array(301);let e=0;for(let t=GT;t<=KT;t++){QT[t-GT]=e;for(let n=1;n<=12;n++)e+=eE(t,n)}}}fromJulianDay(e){let t=e-UT,n=$T(GT),r=$T(KT);if(tr)return super.fromJulianDay(e);{let e=1299,n=1,r=1;for(;r>0;){e++,r=t-$T(e)+1;let i=nE(e);if(r===i){n=12;break}if(rt;)r-=t,n++,t=eE(e,n);break}}return new wT(this,e,n,t-tE(e,n)+1)}}toJulianDay(e){return e.yearKT?super.toJulianDay(e):UT+tE(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.yearKT?super.getDaysInMonth(e):eE(e.year,e.month)}getDaysInYear(e){return e.yearKT?super.getDaysInYear(e):nE(e.year)}},rE=347997,Ure=25920,Wre=765433;function iE(e){return pw(e*7+1,19)<7}function aE(e){let t=Math.floor((235*e-234)/19),n=12084+13753*t,r=t*29+Math.floor(n/25920);return pw(3*(r+1),7)<3&&(r+=1),r}function Gre(e){let t=aE(e-1),n=aE(e);return aE(e+1)-n===356?2:+(n-t===382)}function oE(e){return aE(e)+Gre(e)}function sE(e){return oE(e+1)-oE(e)}function Kre(e){let t=sE(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}function cE(e,t){if(t>=6&&!iE(e)&&t++,t===4||t===7||t===9||t===11||t===13)return 29;let n=Kre(e);return t===2?n===2?30:29:t===3?n===0?29:30:t===6?iE(e)?30:0:30}var qre=class{fromJulianDay(e){let t=e-rE,n=t*Ure/Wre,r=Math.floor((19*n+234)/235)+1,i=oE(r),a=Math.floor(t-i);for(;a<1;)r--,i=oE(r),a=Math.floor(t-i);let o=1,s=0;for(;s6?e.month--:!iE(t.year)&&iE(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier=`hebrew`}},lE=1723856,uE=1824665,dE=5500;function fE(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function pE(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-fE(e,n,1,1))/30);return[n,r,t+1-fE(e,n,r,1)]}function mE(e){return Math.floor(e%4/3)}function hE(e,t){return t%13==0?mE(e)+5:30}var gE=class{fromJulianDay(e){let[t,n,r]=pE(lE,e),i=`AM`;return t<=0&&(i=`AA`,t+=dE),new wT(this,i,t,n,r)}toJulianDay(e){let t=e.year;return e.era===`AA`&&(t-=dE),fE(lE,t,e.month,e.day)}getDaysInMonth(e){return hE(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+mE(e.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(e){return e.era===`AA`?9999:9991}getEras(){return[`AA`,`AM`]}constructor(){this.identifier=`ethiopic`}},Jre=class extends gE{fromJulianDay(e){let[t,n,r]=pE(lE,e);return t+=dE,new wT(this,`AA`,t,n,r)}getEras(){return[`AA`]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier=`ethioaa`}},Yre=class extends gE{fromJulianDay(e){let[t,n,r]=pE(uE,e),i=`CE`;return t<=0&&(i=`BCE`,t=1-t),new wT(this,i,t,n,r)}toJulianDay(e){let t=e.year;return e.era===`BCE`&&(t=1-t),fE(uE,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return e.era===`BCE`&&(t=1-t),hE(t,e.month)}isInverseEra(e){return e.era===`BCE`}balanceDate(e){e.year<=0&&(e.era=e.era===`BCE`?`CE`:`BCE`,e.year=1-e.year)}getEras(){return[`BCE`,`CE`]}getYearsInEra(e){return e.era===`BCE`?9999:9715}constructor(...e){super(...e),this.identifier=`coptic`}};function _E(e){switch(e){case`buddhist`:return new Pre;case`ethiopic`:return new gE;case`ethioaa`:return new Jre;case`coptic`:return new Yre;case`hebrew`:return new qre;case`indian`:return new Rre;case`islamic-civil`:return new XT;case`islamic-tbla`:return new Bre;case`islamic-umalqura`:return new Hre;case`japanese`:return new Nre;case`persian`:return new Lre;case`roc`:return new Fre;default:return new vw}}var vE=new Map,yE=class{constructor(e,t={}){this.formatter=bE(e,t),this.options=t}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if(typeof this.formatter.formatRange==`function`)return this.formatter.formatRange(e,t);if(t= start date`);return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(t)}`}formatRangeToParts(e,t){if(typeof this.formatter.formatRangeToParts==`function`)return this.formatter.formatRangeToParts(e,t);if(t= start date`);let n=this.formatter.formatToParts(e),r=this.formatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return Qre()&&(this.resolvedHourCycle||=$re(e.locale,this.options),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle===`h11`||this.resolvedHourCycle===`h12`),e.calendar===`ethiopic-amete-alem`&&(e.calendar=`ethioaa`),e}},Xre={true:{ja:`h11`},false:{}};function bE(e,t={}){if(typeof t.hour12==`boolean`&&Zre()){t={...t};let n=Xre[String(t.hour12)][e.split(`-`)[0]],r=t.hour12?`h12`:`h23`;t.hourCycle=n??r,delete t.hour12}let n=e+(t?Object.entries(t).sort((e,t)=>e[0]e.type===`hour`).value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(e=>e.type===`hour`).value,10);if(r===0&&i===23)return`h23`;if(r===24&&i===23)return`h24`;if(r===0&&i===11)return`h11`;if(r===12&&i===11)return`h12`;throw Error(`Unexpected hour cycle result`)}var eie=[`day`,`month`,`year`],tie={hour:1,minute:2,second:3};function nie(e,t){let{autoComplete:n,isDisabled:r,name:i}=e,{visuallyHiddenProps:a}=l_({style:{position:`fixed`,top:0,left:0}}),o=60;t.granularity===`second`?o=1:t.granularity===`hour`&&(o=3600);let s=``;t.value&&(s=t.granularity===`day`?Jw(t.value).toString():Yw(`timeZone`in t.value?_re(t.value):t.value).toString());let c=t.granularity===`day`?`date`:`datetime-local`,l=[`hour`,`minute`,`second`],u=0;return l.includes(t.granularity)&&(u=tie[t.granularity],l=l.slice(0,u)),{containerProps:{...a,"aria-hidden":!0,"data-react-aria-prevent-focus":!0,"data-a11y-ignore":`aria-hidden-focus`},inputProps:{tabIndex:-1,autoComplete:n,disabled:r,type:c,form:``,name:i,step:o,value:s,onChange:e=>{let n=U(e).value.toString();if(n)try{let e=Dre(n);if(t.granularity===`day`&&(e=Ere(n)),`setSegment`in t)for(let n in e)eie.includes(n)&&t.setSegment(n,e[n]),l.includes(n)&&t.setSegment(n,e[n]);t.setValue(e)}catch{}}}}}function rie(e){let{state:t}=e,{containerProps:n,inputProps:r}=nie({...e},t);return v.createElement(`div`,{...n,"data-testid":`hidden-dateinput-container`},v.createElement(`input`,r))}var CE={};CE={calendar:`التقويم`,day:`يوم`,dayPeriod:`ص/م`,endDate:`تاريخ الانتهاء`,era:`العصر`,hour:`الساعات`,minute:`الدقائق`,month:`الشهر`,second:`الثواني`,selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,selectedTimeDescription:e=>`\u{627}\u{644}\u{648}\u{642}\u{62A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.time}`,startDate:`تاريخ البدء`,timeZoneName:`التوقيت`,weekday:`اليوم`,year:`السنة`};var wE={};wE={calendar:`Календар`,day:`ден`,dayPeriod:`пр.об./сл.об.`,endDate:`Крайна дата`,era:`ера`,hour:`час`,minute:`минута`,month:`месец`,second:`секунда`,selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{434}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{432}\u{440}\u{435}\u{43C}\u{435}: ${e.time}`,startDate:`Начална дата`,timeZoneName:`часова зона`,weekday:`ден от седмицата`,year:`година`};var TE={};TE={calendar:`Kalendář`,day:`den`,dayPeriod:`část dne`,endDate:`Konečné datum`,era:`letopočet`,hour:`hodina`,minute:`minuta`,month:`měsíc`,second:`sekunda`,selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.startDate} a\u{17E} ${e.endDate}`,selectedTimeDescription:e=>`Vybran\xfd \u{10D}as: ${e.time}`,startDate:`Počáteční datum`,timeZoneName:`časové pásmo`,weekday:`den v týdnu`,year:`rok`};var EE={};EE={calendar:`Kalender`,day:`dag`,dayPeriod:`AM/PM`,endDate:`Slutdato`,era:`æra`,hour:`time`,minute:`minut`,month:`måned`,second:`sekund`,selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tidspunkt: ${e.time}`,startDate:`Startdato`,timeZoneName:`tidszone`,weekday:`ugedag`,year:`år`};var DE={};DE={calendar:`Kalender`,day:`Tag`,dayPeriod:`Tageshälfte`,endDate:`Enddatum`,era:`Epoche`,hour:`Stunde`,minute:`Minute`,month:`Monat`,second:`Sekunde`,selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.startDate} bis ${e.endDate}`,selectedTimeDescription:e=>`Ausgew\xe4hlte Zeit: ${e.time}`,startDate:`Startdatum`,timeZoneName:`Zeitzone`,weekday:`Wochentag`,year:`Jahr`};var OE={};OE={calendar:`Ημερολόγιο`,day:`ημέρα`,dayPeriod:`π.μ./μ.μ.`,endDate:`Ημερομηνία λήξης`,era:`περίοδος`,hour:`ώρα`,minute:`λεπτό`,month:`μήνας`,second:`δευτερόλεπτο`,selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,selectedTimeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3CE}\u{3C1}\u{3B1}: ${e.time}`,startDate:`Ημερομηνία έναρξης`,timeZoneName:`ζώνη ώρας`,weekday:`καθημερινή`,year:`έτος`};var kE={};kE={era:`era`,year:`year`,month:`month`,day:`day`,hour:`hour`,minute:`minute`,second:`second`,dayPeriod:`AM/PM`,calendar:`Calendar`,startDate:`Start Date`,endDate:`End Date`,weekday:`day of the week`,timeZoneName:`time zone`,selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.startDate} to ${e.endDate}`,selectedTimeDescription:e=>`Selected Time: ${e.time}`};var AE={};AE={calendar:`Calendario`,day:`día`,dayPeriod:`a.\xA0m./p.\xA0m.`,endDate:`Fecha final`,era:`era`,hour:`hora`,minute:`minuto`,month:`mes`,second:`segundo`,selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Rango seleccionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora seleccionada: ${e.time}`,startDate:`Fecha de inicio`,timeZoneName:`zona horaria`,weekday:`día de la semana`,year:`año`};var jE={};jE={calendar:`Kalender`,day:`päev`,dayPeriod:`enne/pärast lõunat`,endDate:`Lõppkuupäev`,era:`ajastu`,hour:`tund`,minute:`minut`,month:`kuu`,second:`sekund`,selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.startDate} kuni ${e.endDate}`,selectedTimeDescription:e=>`Valitud aeg: ${e.time}`,startDate:`Alguskuupäev`,timeZoneName:`ajavöönd`,weekday:`nädalapäev`,year:`aasta`};var ME={};ME={calendar:`Kalenteri`,day:`päivä`,dayPeriod:`vuorokaudenaika`,endDate:`Päättymispäivä`,era:`aikakausi`,hour:`tunti`,minute:`minuutti`,month:`kuukausi`,second:`sekunti`,selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.startDate} \u{2013} ${e.endDate}`,selectedTimeDescription:e=>`Valittu aika: ${e.time}`,startDate:`Alkamispäivä`,timeZoneName:`aikavyöhyke`,weekday:`viikonpäivä`,year:`vuosi`};var NE={};NE={calendar:`Calendrier`,day:`jour`,dayPeriod:`cadran`,endDate:`Date de fin`,era:`ère`,hour:`heure`,minute:`minute`,month:`mois`,second:`seconde`,selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.startDate} au ${e.endDate}`,selectedTimeDescription:e=>`Heure choisie\xa0: ${e.time}`,startDate:`Date de début`,timeZoneName:`fuseau horaire`,weekday:`jour de la semaine`,year:`année`};var PE={};PE={calendar:`לוח שנה`,day:`יום`,dayPeriod:`לפנה״צ/אחה״צ`,endDate:`תאריך סיום`,era:`תקופה`,hour:`שעה`,minute:`דקה`,month:`חודש`,second:`שנייה`,selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,selectedTimeDescription:e=>`\u{5D6}\u{5DE}\u{5DF} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.time}`,startDate:`תאריך התחלה`,timeZoneName:`אזור זמן`,weekday:`יום בשבוע`,year:`שנה`};var FE={};FE={calendar:`Kalendar`,day:`dan`,dayPeriod:`AM/PM`,endDate:`Datum završetka`,era:`era`,hour:`sat`,minute:`minuta`,month:`mjesec`,second:`sekunda`,selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Odabrano vrijeme: ${e.time}`,startDate:`Datum početka`,timeZoneName:`vremenska zona`,weekday:`dan u tjednu`,year:`godina`};var IE={};IE={calendar:`Naptár`,day:`nap`,dayPeriod:`napszak`,endDate:`Befejező dátum`,era:`éra`,hour:`óra`,minute:`perc`,month:`hónap`,second:`másodperc`,selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.startDate}\u{2013}${e.endDate}`,selectedTimeDescription:e=>`Kijel\xf6lt id\u{151}: ${e.time}`,startDate:`Kezdő dátum`,timeZoneName:`időzóna`,weekday:`hét napja`,year:`év`};var LE={};LE={calendar:`Calendario`,day:`giorno`,dayPeriod:`AM/PM`,endDate:`Data finale`,era:`era`,hour:`ora`,minute:`minuto`,month:`mese`,second:`secondo`,selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: da ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Ora selezionata: ${e.time}`,startDate:`Data iniziale`,timeZoneName:`fuso orario`,weekday:`giorno della settimana`,year:`anno`};var RE={};RE={calendar:`カレンダー`,day:`日`,dayPeriod:`午前/午後`,endDate:`終了日`,era:`時代`,hour:`時`,minute:`分`,month:`月`,second:`秒`,selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.startDate} \u{304B}\u{3089} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{6642}\u{9593} : ${e.time}`,startDate:`開始日`,timeZoneName:`タイムゾーン`,weekday:`曜日`,year:`年`};var zE={};zE={calendar:`달력`,day:`일`,dayPeriod:`오전/오후`,endDate:`종료일`,era:`연호`,hour:`시`,minute:`분`,month:`월`,second:`초`,selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.startDate} ~ ${e.endDate}`,selectedTimeDescription:e=>`\u{C120}\u{D0DD} \u{C2DC}\u{AC04}: ${e.time}`,startDate:`시작일`,timeZoneName:`시간대`,weekday:`요일`,year:`년`};var BE={};BE={calendar:`Kalendorius`,day:`diena`,dayPeriod:`iki pietų / po pietų`,endDate:`Pabaigos data`,era:`era`,hour:`valanda`,minute:`minutė`,month:`mėnuo`,second:`sekundė`,selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:`Pradžios data`,timeZoneName:`laiko juosta`,weekday:`savaitės diena`,year:`metai`};var VE={};VE={calendar:`Kalendārs`,day:`diena`,dayPeriod:`priekšpusdienā/pēcpusdienā`,endDate:`Beigu datums`,era:`ēra`,hour:`stundas`,minute:`minūtes`,month:`mēnesis`,second:`sekundes`,selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: no ${e.startDate} l\u{12B}dz ${e.endDate}`,selectedTimeDescription:e=>`Atlas\u{12B}tais laiks: ${e.time}`,startDate:`Sākuma datums`,timeZoneName:`laika josla`,weekday:`nedēļas diena`,year:`gads`};var HE={};HE={calendar:`Kalender`,day:`dag`,dayPeriod:`a.m./p.m.`,endDate:`Sluttdato`,era:`tidsalder`,hour:`time`,minute:`minutt`,month:`måned`,second:`sekund`,selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tid: ${e.time}`,startDate:`Startdato`,timeZoneName:`tidssone`,weekday:`ukedag`,year:`år`};var UE={};UE={calendar:`Kalender`,day:`dag`,dayPeriod:`a.m./p.m.`,endDate:`Einddatum`,era:`tijdperk`,hour:`uur`,minute:`minuut`,month:`maand`,second:`seconde`,selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.startDate} tot ${e.endDate}`,selectedTimeDescription:e=>`Geselecteerde tijd: ${e.time}`,startDate:`Startdatum`,timeZoneName:`tijdzone`,weekday:`dag van de week`,year:`jaar`};var WE={};WE={calendar:`Kalendarz`,day:`dzień`,dayPeriod:`rano / po południu / wieczorem`,endDate:`Data końcowa`,era:`era`,hour:`godzina`,minute:`minuta`,month:`miesiąc`,second:`sekunda`,selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Wybrany czas: ${e.time}`,startDate:`Data początkowa`,timeZoneName:`strefa czasowa`,weekday:`dzień tygodnia`,year:`rok`};var GE={};GE={calendar:`Calendário`,day:`dia`,dayPeriod:`AM/PM`,endDate:`Data final`,era:`era`,hour:`hora`,minute:`minuto`,month:`mês`,second:`segundo`,selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:`Data inicial`,timeZoneName:`fuso horário`,weekday:`dia da semana`,year:`ano`};var KE={};KE={calendar:`Calendário`,day:`dia`,dayPeriod:`am/pm`,endDate:`Data de Término`,era:`era`,hour:`hora`,minute:`minuto`,month:`mês`,second:`segundo`,selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:`Data de Início`,timeZoneName:`fuso horário`,weekday:`dia da semana`,year:`ano`};var qE={};qE={calendar:`Calendar`,day:`zi`,dayPeriod:`a.m/p.m.`,endDate:`Dată final`,era:`eră`,hour:`oră`,minute:`minut`,month:`lună`,second:`secundă`,selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: de la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,selectedTimeDescription:e=>`Ora selectat\u{103}: ${e.time}`,startDate:`Dată început`,timeZoneName:`fus orar`,weekday:`ziua din săptămână`,year:`an`};var JE={};JE={calendar:`Календарь`,day:`день`,dayPeriod:`AM/PM`,endDate:`Дата окончания`,era:`эра`,hour:`час`,minute:`минута`,month:`месяц`,second:`секунда`,selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: \u{441} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{43E}\u{435} \u{432}\u{440}\u{435}\u{43C}\u{44F}: ${e.time}`,startDate:`Дата начала`,timeZoneName:`часовой пояс`,weekday:`день недели`,year:`год`};var YE={};YE={calendar:`Kalendár`,day:`deň`,dayPeriod:`AM/PM`,endDate:`Dátum ukončenia`,era:`letopočet`,hour:`hodina`,minute:`minúta`,month:`mesiac`,second:`sekunda`,selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Vybrat\xfd \u{10D}as: ${e.time}`,startDate:`Dátum začatia`,timeZoneName:`časové pásmo`,weekday:`deň týždňa`,year:`rok`};var XE={};XE={calendar:`Koledar`,day:`dan`,dayPeriod:`dop/pop`,endDate:`Datum konca`,era:`doba`,hour:`ura`,minute:`minuta`,month:`mesec`,second:`sekunda`,selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izbrani \u{10D}as: ${e.time}`,startDate:`Datum začetka`,timeZoneName:`časovni pas`,weekday:`dan v tednu`,year:`leto`};var ZE={};ZE={calendar:`Kalendar`,day:`дан`,dayPeriod:`пре подне/по подне`,endDate:`Datum završetka`,era:`ера`,hour:`сат`,minute:`минут`,month:`месец`,second:`секунд`,selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani opseg: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izabrano vreme: ${e.time}`,startDate:`Datum početka`,timeZoneName:`временска зона`,weekday:`дан у недељи`,year:`година`};var QE={};QE={calendar:`Kalender`,day:`dag`,dayPeriod:`fm/em`,endDate:`Slutdatum`,era:`era`,hour:`timme`,minute:`minut`,month:`månad`,second:`sekund`,selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.startDate} till ${e.endDate}`,selectedTimeDescription:e=>`Vald tid: ${e.time}`,startDate:`Startdatum`,timeZoneName:`tidszon`,weekday:`veckodag`,year:`år`};var $E={};$E={calendar:`Takvim`,day:`gün`,dayPeriod:`ÖÖ/ÖS`,endDate:`Bitiş Tarihi`,era:`çağ`,hour:`saat`,minute:`dakika`,month:`ay`,second:`saniye`,selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.startDate} - ${e.endDate}`,selectedTimeDescription:e=>`Se\xe7ilen Zaman: ${e.time}`,startDate:`Başlangıç Tarihi`,timeZoneName:`saat dilimi`,weekday:`haftanın günü`,year:`yıl`};var eD={};eD={calendar:`Календар`,day:`день`,dayPeriod:`дп/пп`,endDate:`Дата завершення`,era:`ера`,hour:`година`,minute:`хвилина`,month:`місяць`,second:`секунда`,selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{2014} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{447}\u{430}\u{441}: ${e.time}`,startDate:`Дата початку`,timeZoneName:`часовий пояс`,weekday:`день тижня`,year:`рік`};var tD={};tD={calendar:`日历`,day:`日`,dayPeriod:`上午/下午`,endDate:`结束日期`,era:`纪元`,hour:`小时`,minute:`分钟`,month:`月`,second:`秒`,selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65F6}\u{95F4}\u{FF1A}${e.time}`,startDate:`开始日期`,timeZoneName:`时区`,weekday:`工作日`,year:`年`};var nD={};nD={calendar:`日曆`,day:`日`,dayPeriod:`上午/下午`,endDate:`結束日期`,era:`纪元`,hour:`小时`,minute:`分钟`,month:`月`,second:`秒`,selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{6642}\u{9593}\u{FF1A}${e.time}`,startDate:`開始日期`,timeZoneName:`时区`,weekday:`工作日`,year:`年`};var rD={};rD={"ar-AE":CE,"bg-BG":wE,"cs-CZ":TE,"da-DK":EE,"de-DE":DE,"el-GR":OE,"en-US":kE,"es-ES":AE,"et-EE":jE,"fi-FI":ME,"fr-FR":NE,"he-IL":PE,"hr-HR":FE,"hu-HU":IE,"it-IT":LE,"ja-JP":RE,"ko-KR":zE,"lt-LT":BE,"lv-LV":VE,"nb-NO":HE,"nl-NL":UE,"pl-PL":WE,"pt-BR":GE,"pt-PT":KE,"ro-RO":qE,"ru-RU":JE,"sk-SK":YE,"sl-SI":XE,"sr-SP":ZE,"sv-SE":QE,"tr-TR":$E,"uk-UA":eD,"zh-CN":tD,"zh-TW":nD};function iD(e,t,n){let{direction:r}=bp(),i=(0,v.useMemo)(()=>ig(t),[t]),{keyboardProps:a}=Sm({shortcuts:{"Alt+ArrowDown":()=>{if(`setOpen`in e){e.setOpen(!0);return}return!1},"Alt+ArrowUp":()=>{if(`setOpen`in e){e.setOpen(!0);return}return!1},ArrowLeft:e=>{if(n)return!1;if(r===`rtl`){if(t.current){let n=U(e),r=aD(t.current,n.getBoundingClientRect().left,-1);if(r){r.focus();return}}}else{i.focusPrevious();return}return!1},ArrowRight:e=>{if(n)return!1;if(r===`rtl`){if(t.current){let n=U(e),r=aD(t.current,n.getBoundingClientRect().left,1);if(r){r.focus();return}}}else{i.focusNext();return}return!1}},allowRepeats:!0}),o=()=>{if(!t.current)return;let e=window.event?U(window.event):null,n=rg(t.current,{tabbable:!0});if(e&&=(n.currentNode=e,n.previousNode()),!e){let t;do t=n.lastChild(),t&&(e=t);while(t)}for(;e?.hasAttribute(`data-placeholder`);){let t=n.previousNode();if(t&&t.hasAttribute(`data-placeholder`))e=t;else break}e&&e.focus()},{pressProps:s}=Fm({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){e.pointerType===`mouse`&&o()},onPress(e){(e.pointerType===`touch`||e.pointerType===`pen`)&&o()}});return W(s,a)}function aD(e,t,n){let r=rg(e,{tabbable:!0}),i=r.nextNode(),a=null,o=1/0;for(;i;){let e=i.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===n&&s{t.confirmPlaceholder(),t.value!==u.current&&t.commitValidation(),e.onBlur?.(n)},onFocusWithinChange:e.onFocusChange}),f=s_(iie(rD),`@react-aria/datepicker`),p=t.maxGranularity===`hour`?`selectedTimeDescription`:`selectedDateDescription`,m=t.maxGranularity===`hour`?`time`:`date`,h=gc(t.value?f.format(p,{[m]:t.formatValue({month:`long`})}):``),g=e.__reactAriaDateFieldRole===`presentation`?s[`aria-describedby`]:[h[`aria-describedby`],s[`aria-describedby`]].filter(Boolean).join(` `)||void 0,_=e[cD],y=(0,v.useMemo)(()=>_||ig(n),[_,n]),b=iD(t,n,e[sD]===`presentation`);oD.set(t,{ariaLabel:e[`aria-label`],ariaLabelledBy:[o.id,e[`aria-labelledby`]].filter(Boolean).join(` `)||void 0,ariaDescribedBy:g,focusManager:y});let x=(0,v.useRef)(e.autoFocus),S;S=e.__reactAriaDateFieldRole===`presentation`?{role:`presentation`}:W(s,{role:`group`,"aria-disabled":e.isDisabled||void 0,"aria-describedby":g}),(0,v.useEffect)(()=>{x.current&&y.focusFirst(),x.current=!1},[y]),Cc(e.inputRef,t.defaultValue,t.setValue),tS({...e,focus(){y.focusFirst()}},t,e.inputRef);let C={type:`hidden`,name:e.name,form:e.form,value:t.value?.toString()||``,disabled:e.isDisabled};e.validationBehavior===`native`&&(C.type=`text`,C.hidden=!0,C.required=e.isRequired,C.onChange=()=>{});let w=Us(e);return{labelProps:{...o,onClick:()=>{y.focusFirst()}},fieldProps:W(w,S,b,d,{onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,style:{unicodeBidi:`isolate`}}),inputProps:C,descriptionProps:c,errorMessageProps:l,isInvalid:r,validationErrors:i,validationDetails:a}}function aie(e,t,n){let r=lD(e,t,n);return r.inputProps.value=t.timeValue?.toString()||``,r}function uD(e){e=Sc(e??{},oie);let{locale:t}=bp();return(0,v.useMemo)(()=>new yE(t,e),[t,e])}function oie(e,t){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(t[r]!==e[r])return!1;return!0}function sie(e){return e&&e.__esModule?e.default:e}function cie(){let{locale:e}=bp(),t=o_(sie(rD),`@react-aria/datepicker`);return(0,v.useMemo)(()=>{try{return new Intl.DisplayNames(e,{type:`dateTimeField`})}catch{return new lie(e,t)}},[e,t])}var lie=class{constructor(e,t){this.locale=e,this.dictionary=t}of(e){return this.dictionary.getStringForLocale(e,this.locale)}};function uie(e,t,n){let r=(0,v.useRef)(``),{locale:i,direction:a}=bp(),o=cie(),{ariaLabel:s,ariaLabelledBy:c,ariaDescribedBy:l,focusManager:u}=oD.get(t),d=e.isPlaceholder?``:e.text,f=(0,v.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),p=uD({month:`long`,timeZone:f.timeZone}),m=uD({hour:`numeric`,hour12:f.hour12,timeZone:f.timeZone});if(e.type===`month`&&!e.isPlaceholder){let e=p.format(t.dateValue);d=e===d?e:`${d} \u{2013} ${e}`}else e.type===`hour`&&!e.isPlaceholder&&(d=m.format(t.dateValue));let{spinButtonProps:h}=EC({value:e.value??void 0,textValue:d,minValue:e.minValue,maxValue:e.maxValue,isDisabled:t.isDisabled,isReadOnly:t.isReadOnly||!e.isEditable,isRequired:t.isRequired,onIncrement:()=>{r.current=``,t.increment(e.type)},onDecrement:()=>{r.current=``,t.decrement(e.type)},onIncrementPage:()=>{r.current=``,t.incrementPage(e.type)},onDecrementPage:()=>{r.current=``,t.decrementPage(e.type)},onIncrementToMax:()=>{r.current=``,t.incrementToMax(e.type)},onDecrementToMin:()=>{r.current=``,t.decrementToMin(e.type)}}),g=(0,v.useMemo)(()=>new Ap(i,{maximumFractionDigits:0}),[i]),_=()=>{if(e.text===e.placeholder&&u.focusPrevious(),g.isValidPartialNumber(e.text)&&!t.isReadOnly&&!e.isPlaceholder){let n=e.text.slice(0,-1),i=g.parse(n);n=i===0?``:n,n.length===0||i===0?t.clearSegment(e.type):t.setSegment(e.type,i),r.current=n}else(e.type===`dayPeriod`||e.type===`era`)&&t.clearSegment(e.type)},{keyboardProps:y}=Sm({shortcuts:{Backspace:()=>{_()},Delete:()=>{_()},"Mod+a":()=>{}},allowRepeats:!0}),{startsWith:b}=Xte({sensitivity:`base`}),x=uD({hour:`numeric`,hour12:!0}),S=(0,v.useMemo)(()=>{let e=new Date;return e.setHours(0),x.formatToParts(e).find(e=>e.type===`dayPeriod`).value},[x]),C=(0,v.useMemo)(()=>{let e=new Date;return e.setHours(12),x.formatToParts(e).find(e=>e.type===`dayPeriod`).value},[x]),w=uD({year:`numeric`,era:`narrow`,timeZone:`UTC`}),T=(0,v.useMemo)(()=>{if(e.type!==`era`)return[];let n=Zw(new wT(1,1,1),t.calendar),r=t.calendar.getEras().map(e=>{let t=n.set({year:1,month:1,day:1,era:e}).toDate(`UTC`);return{era:e,formatted:w.formatToParts(t).find(e=>e.type===`era`).value}}),i=die(r.map(e=>e.formatted));if(i)for(let e of r)e.formatted=e.formatted.slice(i);return r},[w,t.calendar,e.type]),E=n=>{if(t.isDisabled||t.isReadOnly)return;let i=r.current+n;switch(e.type){case`dayPeriod`:if(b(S,n))t.setSegment(`dayPeriod`,0);else if(b(C,n))t.setSegment(`dayPeriod`,1);else break;u.focusNext();break;case`era`:{let e=T.find(e=>b(e.formatted,n));e&&(t.setSegment(`era`,e.era),u.focusNext());break}case`day`:case`hour`:case`minute`:case`second`:case`month`:case`year`:{if(!g.isValidPartialNumber(i))return;let a=g.parse(i),o=a;if(e.maxValue!==void 0&&a>e.maxValue&&(o=g.parse(n)),isNaN(a))return;t.setSegment(e.type,o),e.maxValue!==void 0&&(Number(a+`0`)>e.maxValue||i.length>=String(e.maxValue).length)?(r.current=``,u.focusNext()):r.current=i;break}}},D=()=>{r.current=``,n.current&&yc(n.current,{containingElement:oc(n.current)}),window.getSelection()?.collapse(n.current)};_c((0,v.useRef)(typeof document<`u`?document:null),`selectionchange`,()=>{let e=window.getSelection();e?.anchorNode&&Ds(n.current,e?.anchorNode)&&Os()===n.current&&e.collapse(n.current)});let O=(0,v.useRef)(``);_c(n,`beforeinput`,r=>{if(n.current)switch(r.preventDefault(),r.inputType){case`deleteContentBackward`:case`deleteContentForward`:g.isValidPartialNumber(e.text)&&!t.isReadOnly&&_();break;case`insertCompositionText`:O.current=n.current.textContent,n.current.textContent=n.current.textContent;break;default:r.data!=null&&E(r.data)}}),_c(n,`input`,e=>{let{inputType:t,data:r}=e;t===`insertCompositionText`&&(n.current&&(n.current.textContent=O.current),r!=null&&(b(S,r)||b(C,r))&&E(r))}),Xo(()=>{let e=n.current;return()=>{Os()===e&&(u.focusPrevious()||u.focusNext())}},[n,u]);let k=Ao()||e.type===`timeZoneName`?{role:`textbox`,"aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e!==(0,v.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])&&!t.isInvalid&&(l=void 0);let A=ms(),j=!t.isDisabled&&!t.isReadOnly&&e.isEditable,M=Xs({"aria-label":`${e.type===`literal`?``:o.of(e.type)}${s?`, ${s}`:``}${c?`, `:``}`,"aria-labelledby":c});if(e.type===`literal`)return{segmentProps:{"aria-hidden":!0}};let N={caretColor:`transparent`};if(a===`rtl`){N.unicodeBidi=`embed`;let t=f[e.type];(t===`numeric`||t===`2-digit`)&&(N.direction=`ltr`)}return{segmentProps:W(h,M,{id:A,...k,...y,"aria-invalid":t.isInvalid?`true`:void 0,"aria-describedby":l,"aria-readonly":t.isReadOnly||!e.isEditable?`true`:void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:j,suppressContentEditableWarning:j,spellCheck:j?`false`:void 0,autoCorrect:j?`off`:void 0,enterKeyHint:j?`next`:void 0,inputMode:t.isDisabled||e.type===`dayPeriod`||e.type===`era`||!j?void 0:`numeric`,tabIndex:t.isDisabled?void 0:0,onFocus:D,style:N,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}function die(e){e.sort();let t=e[0],n=e[e.length-1];for(let e=0;e`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.maxValue} \u{623}\u{648} \u{642}\u{628}\u{644} \u{630}\u{644}\u{643}.`,rangeReversed:`تاريخ البدء يجب أن يكون قبل تاريخ الانتهاء.`,rangeUnderflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.minValue} \u{623}\u{648} \u{628}\u{639}\u{62F} \u{630}\u{644}\u{643}.`,unavailableDate:`البيانات المحددة غير متاحة.`};var fD={};fD={rangeOverflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.maxValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{440}\u{430}\u{43D}\u{43D}\u{430}.`,rangeReversed:`Началната дата трябва да е преди крайната.`,rangeUnderflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.minValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{43A}\u{44A}\u{441}\u{43D}\u{43E}.`,unavailableDate:`Избраната дата не е налична.`};var pD={};pD={rangeOverflow:e=>`Hodnota mus\xed b\xfdt ${e.maxValue} nebo d\u{159}\xedv\u{11B}j\u{161}\xed.`,rangeReversed:`Datum zahájení musí předcházet datu ukončení.`,rangeUnderflow:e=>`Hodnota mus\xed b\xfdt ${e.minValue} nebo pozd\u{11B}j\u{161}\xed.`,unavailableDate:`Vybrané datum není k dispozici.`};var mD={};mD={rangeOverflow:e=>`V\xe6rdien skal v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:`Startdatoen skal være før slutdatoen.`,rangeUnderflow:e=>`V\xe6rdien skal v\xe6re ${e.minValue} eller nyere.`,unavailableDate:`Den valgte dato er ikke tilgængelig.`};var hD={};hD={rangeOverflow:e=>`Der Wert muss ${e.maxValue} oder fr\xfcher sein.`,rangeReversed:`Das Startdatum muss vor dem Enddatum liegen.`,rangeUnderflow:e=>`Der Wert muss ${e.minValue} oder sp\xe4ter sein.`,unavailableDate:`Das ausgewählte Datum ist nicht verfügbar.`};var gD={};gD={rangeOverflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.maxValue} \u{3AE} \u{3C0}\u{3B1}\u{3BB}\u{3B1}\u{3B9}\u{3CC}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,rangeReversed:`Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης.`,rangeUnderflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.minValue} \u{3AE} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3B3}\u{3B5}\u{3BD}\u{3AD}\u{3C3}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,unavailableDate:`Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη.`};var _D={};_D={rangeUnderflow:e=>`Value must be ${e.minValue} or later.`,rangeOverflow:e=>`Value must be ${e.maxValue} or earlier.`,rangeReversed:`Start date must be before end date.`,unavailableDate:`Selected date unavailable.`};var vD={};vD={rangeOverflow:e=>`El valor debe ser ${e.maxValue} o anterior.`,rangeReversed:`La fecha de inicio debe ser anterior a la fecha de finalización.`,rangeUnderflow:e=>`El valor debe ser ${e.minValue} o posterior.`,unavailableDate:`Fecha seleccionada no disponible.`};var yD={};yD={rangeOverflow:e=>`V\xe4\xe4rtus peab olema ${e.maxValue} v\xf5i varasem.`,rangeReversed:`Alguskuupäev peab olema enne lõppkuupäeva.`,rangeUnderflow:e=>`V\xe4\xe4rtus peab olema ${e.minValue} v\xf5i hilisem.`,unavailableDate:`Valitud kuupäev pole saadaval.`};var bD={};bD={rangeOverflow:e=>`Arvon on oltava ${e.maxValue} tai sit\xe4 aikaisempi.`,rangeReversed:`Aloituspäivän on oltava ennen lopetuspäivää.`,rangeUnderflow:e=>`Arvon on oltava ${e.minValue} tai sit\xe4 my\xf6h\xe4isempi.`,unavailableDate:`Valittu päivämäärä ei ole käytettävissä.`};var xD={};xD={rangeOverflow:e=>`La valeur doit \xeatre ${e.maxValue} ou ant\xe9rieure.`,rangeReversed:`La date de début doit être antérieure à la date de fin.`,rangeUnderflow:e=>`La valeur doit \xeatre ${e.minValue} ou ult\xe9rieure.`,unavailableDate:`La date sélectionnée n’est pas disponible.`};var SD={};SD={rangeOverflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.maxValue} \u{5D0}\u{5D5} \u{5DE}\u{5D5}\u{5E7}\u{5D3}\u{5DD} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,rangeReversed:`תאריך ההתחלה חייב להיות לפני תאריך הסיום.`,rangeUnderflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.minValue} \u{5D0}\u{5D5} \u{5DE}\u{5D0}\u{5D5}\u{5D7}\u{5E8} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,unavailableDate:`התאריך הנבחר אינו זמין.`};var CD={};CD={rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:`Datum početka mora biti prije datuma završetka.`,rangeUnderflow:e=>`Vrijednost mora biti ${e.minValue} ili kasnije.`,unavailableDate:`Odabrani datum nije dostupan.`};var wD={};wD={rangeOverflow:e=>`Az \xe9rt\xe9knek ${e.maxValue} vagy kor\xe1bbinak kell lennie.`,rangeReversed:`A kezdő dátumnak a befejező dátumnál korábbinak kell lennie.`,rangeUnderflow:e=>`Az \xe9rt\xe9knek ${e.minValue} vagy k\xe9s\u{151}bbinek kell lennie.`,unavailableDate:`A kiválasztott dátum nem érhető el.`};var TD={};TD={rangeOverflow:e=>`Il valore deve essere ${e.maxValue} o precedente.`,rangeReversed:`La data di inizio deve essere antecedente alla data di fine.`,rangeUnderflow:e=>`Il valore deve essere ${e.minValue} o successivo.`,unavailableDate:`Data selezionata non disponibile.`};var ED={};ED={rangeOverflow:e=>`\u{5024}\u{306F} ${e.maxValue} \u{4EE5}\u{4E0B}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,rangeReversed:`開始日は終了日より前にする必要があります。`,rangeUnderflow:e=>`\u{5024}\u{306F} ${e.minValue} \u{4EE5}\u{4E0A}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,unavailableDate:`選択した日付は使用できません。`};var DD={};DD={rangeOverflow:e=>`\u{AC12}\u{C740} ${e.maxValue} \u{C774}\u{C804}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,rangeReversed:`시작일은 종료일 이전이어야 합니다.`,rangeUnderflow:e=>`\u{AC12}\u{C740} ${e.minValue} \u{C774}\u{D6C4}\u{C5EC}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,unavailableDate:`선택한 날짜를 사용할 수 없습니다.`};var OD={};OD={rangeOverflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.maxValue} arba ankstesn\u{117}.`,rangeReversed:`Pradžios data turi būti ankstesnė nei pabaigos data.`,rangeUnderflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.minValue} arba naujesn\u{117}.`,unavailableDate:`Pasirinkta data nepasiekiama.`};var kD={};kD={rangeOverflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.maxValue} vai agr\u{101}kai.`,rangeReversed:`Sākuma datumam ir jābūt pirms beigu datuma.`,rangeUnderflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.minValue} vai v\u{113}l\u{101}kai.`,unavailableDate:`Atlasītais datums nav pieejams.`};var AD={};AD={rangeOverflow:e=>`Verdien m\xe5 v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:`Startdatoen må være før sluttdatoen.`,rangeUnderflow:e=>`Verdien m\xe5 v\xe6re ${e.minValue} eller senere.`,unavailableDate:`Valgt dato utilgjengelig.`};var jD={};jD={rangeOverflow:e=>`Waarde moet ${e.maxValue} of eerder zijn.`,rangeReversed:`De startdatum moet voor de einddatum liggen.`,rangeUnderflow:e=>`Waarde moet ${e.minValue} of later zijn.`,unavailableDate:`Geselecteerde datum niet beschikbaar.`};var MD={};MD={rangeOverflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.maxValue} lub wcze\u{15B}niejsz\u{105}.`,rangeReversed:`Data rozpoczęcia musi być wcześniejsza niż data zakończenia.`,rangeUnderflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.minValue} lub p\xf3\u{17A}niejsz\u{105}.`,unavailableDate:`Wybrana data jest niedostępna.`};var ND={};ND={rangeOverflow:e=>`O valor deve ser ${e.maxValue} ou anterior.`,rangeReversed:`A data inicial deve ser anterior à data final.`,rangeUnderflow:e=>`O valor deve ser ${e.minValue} ou posterior.`,unavailableDate:`Data selecionada indisponível.`};var PD={};PD={rangeOverflow:e=>`O valor tem de ser ${e.maxValue} ou anterior.`,rangeReversed:`A data de início deve ser anterior à data de fim.`,rangeUnderflow:e=>`O valor tem de ser ${e.minValue} ou posterior.`,unavailableDate:`Data selecionada indisponível.`};var FD={};FD={rangeOverflow:e=>`Valoarea trebuie s\u{103} fie ${e.maxValue} sau anterioar\u{103}.`,rangeReversed:`Data de început trebuie să fie anterioară datei de sfârșit.`,rangeUnderflow:e=>`Valoarea trebuie s\u{103} fie ${e.minValue} sau ulterioar\u{103}.`,unavailableDate:`Data selectată nu este disponibilă.`};var ID={};ID={rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{43F}\u{43E}\u{437}\u{436}\u{435} ${e.maxValue}.`,rangeReversed:`Дата начала должна предшествовать дате окончания.`,rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{44C}\u{448}\u{435} ${e.minValue}.`,unavailableDate:`Выбранная дата недоступна.`};var LD={};LD={rangeOverflow:e=>`Hodnota mus\xed by\u{165} ${e.maxValue} alebo skor\u{161}ia.`,rangeReversed:`Dátum začiatku musí byť skorší ako dátum konca.`,rangeUnderflow:e=>`Hodnota mus\xed by\u{165} ${e.minValue} alebo neskor\u{161}ia.`,unavailableDate:`Vybratý dátum je nedostupný.`};var RD={};RD={rangeOverflow:e=>`Vrednost mora biti ${e.maxValue} ali starej\u{161}a.`,rangeReversed:`Začetni datum mora biti pred končnim datumom.`,rangeUnderflow:e=>`Vrednost mora biti ${e.minValue} ali novej\u{161}a.`,unavailableDate:`Izbrani datum ni na voljo.`};var zD={};zD={rangeOverflow:e=>`Vrednost mora da bude ${e.maxValue} ili starija.`,rangeReversed:`Datum početka mora biti pre datuma završetka.`,rangeUnderflow:e=>`Vrednost mora da bude ${e.minValue} ili novija.`,unavailableDate:`Izabrani datum nije dostupan.`};var BD={};BD={rangeOverflow:e=>`V\xe4rdet m\xe5ste vara ${e.maxValue} eller tidigare.`,rangeReversed:`Startdatumet måste vara före slutdatumet.`,rangeUnderflow:e=>`V\xe4rdet m\xe5ste vara ${e.minValue} eller senare.`,unavailableDate:`Det valda datumet är inte tillgängligt.`};var VD={};VD={rangeOverflow:e=>`De\u{11F}er, ${e.maxValue} veya \xf6ncesi olmal\u{131}d\u{131}r.`,rangeReversed:`Başlangıç tarihi bitiş tarihinden önce olmalıdır.`,rangeUnderflow:e=>`De\u{11F}er, ${e.minValue} veya sonras\u{131} olmal\u{131}d\u{131}r.`,unavailableDate:`Seçilen tarih kullanılamıyor.`};var HD={};HD={rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{43F}\u{456}\u{437}\u{43D}\u{456}\u{448}\u{435} ${e.maxValue}.`,rangeReversed:`Дата початку має передувати даті завершення.`,rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{456}\u{448}\u{435} ${e.minValue}.`,unavailableDate:`Вибрана дата недоступна.`};var UD={};UD={rangeOverflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{65E5}\u{671F}\u{3002}`,rangeReversed:`开始日期必须早于结束日期。`,rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{65E5}\u{671F}\u{3002}`,unavailableDate:`所选日期不可用。`};var WD={};WD={rangeOverflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{3002}`,rangeReversed:`開始日期必須在結束日期之前。`,rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{3002}`,unavailableDate:`所選日期無法使用。`};var GD={};GD={"ar-AE":dD,"bg-BG":fD,"cs-CZ":pD,"da-DK":mD,"de-DE":hD,"el-GR":gD,"en-US":_D,"es-ES":vD,"et-EE":yD,"fi-FI":bD,"fr-FR":xD,"he-IL":SD,"hr-HR":CD,"hu-HU":wD,"it-IT":TD,"ja-JP":ED,"ko-KR":DD,"lt-LT":OD,"lv-LV":kD,"nb-NO":AD,"nl-NL":jD,"pl-PL":MD,"pt-BR":ND,"pt-PT":PD,"ro-RO":FD,"ru-RU":ID,"sk-SK":LD,"sl-SI":RD,"sr-SP":zD,"sv-SE":BD,"tr-TR":VD,"uk-UA":HD,"zh-CN":UD,"zh-TW":WD};function fie(e){return e&&e.__esModule?e.default:e}var KD=new t_(fie(GD));function qD(){let e=typeof navigator<`u`&&(navigator.language||navigator.userLanguage)||`en-US`;try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e=`en-US`}return e}function JD(e,t,n,r,i){let a=e!=null&&n!=null&&e.compare(n)>0,o=e!=null&&t!=null&&e.compare(t)<0,s=e!=null&&r?.(e)||!1,c=a||o||s,l=[];if(c){let e=qD(),r=new i_(e,t_.getGlobalDictionaryForPackage(`@react-stately/datepicker`)||KD),c=new yE(e,YD({},i)),u=c.resolvedOptions().timeZone;o&&t!=null&&l.push(r.format(`rangeUnderflow`,{minValue:c.format(t.toDate(u))})),a&&n!=null&&l.push(r.format(`rangeOverflow`,{maxValue:c.format(n.toDate(u))})),s&&l.push(r.format(`unavailableDate`))}return{isInvalid:c,validationErrors:l,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:a,rangeUnderflow:o,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!c}}}function pie(e,t,n,r,i){let a=ix(JD(e?.start??null,t,n,r,i),JD(e?.end??null,t,n,r,i));if(e?.end!=null&&e.start!=null&&e.end.compare(e.start)<0){let e=t_.getGlobalDictionaryForPackage(`@react-stately/datepicker`)||KD;a=ix(a,{isInvalid:!0,validationErrors:[e.getStringForLocale(`rangeReversed`,qD())],validationDetails:{...Yb,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})}return a}var mie={year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`2-digit`,second:`2-digit`},hie={year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`};function YD(e,t){e={...t.shouldForceLeadingZeros?hie:mie,...e};let n=t.granularity||`minute`,r=Object.keys(e),i=r.indexOf(t.maxGranularity??`year`);i<0&&(i=0);let a=r.indexOf(n);if(a<0&&(a=2),i>a)throw Error(`maxGranularity must be greater than granularity`);let o=r.slice(i,a+1).reduce((t,n)=>(t[n]=e[n],t),{});return t.hourCycle!=null&&(o.hour12=t.hourCycle===12),o.timeZone=t.timeZone||`UTC`,(n===`hour`||n===`minute`||n===`second`)&&t.timeZone&&!t.hideTimeZone&&(o.timeZoneName=`short`),t.showEra&&i===0&&(o.era=`short`),o}function XD(e){return e&&`hour`in e?e:new TT}function ZD(e,t){if(e===null)return null;if(e)return Zw(e,t)}function gie(e,t,n,r){if(e)return ZD(e,n);let i=Zw(Cw(r??kw()).set({hour:0,minute:0,second:0,millisecond:0}),n);return t===`year`||t===`month`||t===`day`?Jw(i):r?i:Yw(i)}function QD(e,t){let n=e&&`timeZone`in e?e.timeZone:void 0,r=e&&`minute`in e?`minute`:`day`;if(e&&t&&!(t in e))throw Error(`Invalid granularity `+t+` for value `+e.toString());let[i,a]=(0,v.useState)([r,n]);e&&(i[0]!==r||i[1]!==n)&&a([r,n]),t||=e?r:i[0];let o=e?n:i[1];return[t,o]}var _ie=new t_({ach:{year:`mwaka`,month:`dwe`,day:`nino`},af:{year:`jjjj`,month:`mm`,day:`dd`},am:{year:`ዓዓዓዓ`,month:`ሚሜ`,day:`ቀቀ`},an:{year:`aaaa`,month:`mm`,day:`dd`},ar:{year:`سنة`,month:`شهر`,day:`يوم`},ast:{year:`aaaa`,month:`mm`,day:`dd`},az:{year:`iiii`,month:`aa`,day:`gg`},be:{year:`гггг`,month:`мм`,day:`дд`},bg:{year:`гггг`,month:`мм`,day:`дд`},bn:{year:`yyyy`,month:`মিমি`,day:`dd`},br:{year:`bbbb`,month:`mm`,day:`dd`},bs:{year:`gggg`,month:`mm`,day:`dd`},ca:{year:`aaaa`,month:`mm`,day:`dd`},cak:{year:`jjjj`,month:`ii`,day:`q'q'`},ckb:{year:`ساڵ`,month:`مانگ`,day:`ڕۆژ`},cs:{year:`rrrr`,month:`mm`,day:`dd`},cy:{year:`bbbb`,month:`mm`,day:`dd`},da:{year:`åååå`,month:`mm`,day:`dd`},de:{year:`jjjj`,month:`mm`,day:`tt`},dsb:{year:`llll`,month:`mm`,day:`źź`},el:{year:`εεεε`,month:`μμ`,day:`ηη`},en:{year:`yyyy`,month:`mm`,day:`dd`},eo:{year:`jjjj`,month:`mm`,day:`tt`},es:{year:`aaaa`,month:`mm`,day:`dd`},et:{year:`aaaa`,month:`kk`,day:`pp`},eu:{year:`uuuu`,month:`hh`,day:`ee`},fa:{year:`سال`,month:`ماه`,day:`روز`},ff:{year:`hhhh`,month:`ll`,day:`ññ`},fi:{year:`vvvv`,month:`kk`,day:`pp`},fr:{year:`aaaa`,month:`mm`,day:`jj`},fy:{year:`jjjj`,month:`mm`,day:`dd`},ga:{year:`bbbb`,month:`mm`,day:`ll`},gd:{year:`bbbb`,month:`mm`,day:`ll`},gl:{year:`aaaa`,month:`mm`,day:`dd`},he:{year:`שנה`,month:`חודש`,day:`יום`},hr:{year:`gggg`,month:`mm`,day:`dd`},hsb:{year:`llll`,month:`mm`,day:`dd`},hu:{year:`éééé`,month:`hh`,day:`nn`},ia:{year:`aaaa`,month:`mm`,day:`dd`},id:{year:`tttt`,month:`bb`,day:`hh`},is:{year:`áááá`,month:`mm`,day:`dd`},it:{year:`aaaa`,month:`mm`,day:`gg`},ja:{year:`年`,month:`月`,day:`日`},ka:{year:`წწწწ`,month:`თთ`,day:`რრ`},kk:{year:`жжжж`,month:`аа`,day:`кк`},kn:{year:`ವವವವ`,month:`ಮಿಮೀ`,day:`ದಿದಿ`},ko:{year:`연도`,month:`월`,day:`일`},lb:{year:`jjjj`,month:`mm`,day:`dd`},lo:{year:`ປປປປ`,month:`ດດ`,day:`ວວ`},lt:{year:`mmmm`,month:`mm`,day:`dd`},lv:{year:`gggg`,month:`mm`,day:`dd`},meh:{year:`aaaa`,month:`mm`,day:`dd`},ml:{year:`വർഷം`,month:`മാസം`,day:`തീയതി`},ms:{year:`tttt`,month:`mm`,day:`hh`},nb:{year:`åååå`,month:`mm`,day:`dd`},nl:{year:`jjjj`,month:`mm`,day:`dd`},nn:{year:`åååå`,month:`mm`,day:`dd`},no:{year:`åååå`,month:`mm`,day:`dd`},oc:{year:`aaaa`,month:`mm`,day:`jj`},pl:{year:`rrrr`,month:`mm`,day:`dd`},pt:{year:`aaaa`,month:`mm`,day:`dd`},rm:{year:`oooo`,month:`mm`,day:`dd`},ro:{year:`aaaa`,month:`ll`,day:`zz`},ru:{year:`гггг`,month:`мм`,day:`дд`},sc:{year:`aaaa`,month:`mm`,day:`dd`},scn:{year:`aaaa`,month:`mm`,day:`jj`},sk:{year:`rrrr`,month:`mm`,day:`dd`},sl:{year:`llll`,month:`mm`,day:`dd`},sr:{year:`гггг`,month:`мм`,day:`дд`},"sr-Latn":{year:`gggg`,month:`mm`,day:`dd`},sv:{year:`åååå`,month:`mm`,day:`dd`},szl:{year:`rrrr`,month:`mm`,day:`dd`},tg:{year:`сссс`,month:`мм`,day:`рр`},th:{year:`ปปปป`,month:`ดด`,day:`วว`},tr:{year:`yyyy`,month:`aa`,day:`gg`},uk:{year:`рррр`,month:`мм`,day:`дд`},"zh-CN":{year:`年`,month:`月`,day:`日`},"zh-TW":{year:`年`,month:`月`,day:`日`}},`en`);function vie(e,t,n){return e===`era`||e===`dayPeriod`?t:e===`year`||e===`month`||e===`day`?_ie.getStringForLocale(e,n):`––`}var $D=class e{constructor(e,t,n){if(this.era=n?.era??null,this.calendar=e,this.year=n?.year??null,this.month=n?.month??null,this.day=n?.day??null,this.hour=n?.hour??null,this.hourCycle=t,this.dayPeriod=null,this.minute=n?.minute??null,this.second=n?.second??null,this.millisecond=n?.millisecond??null,this.offset=`offset`in(n??{})?n.offset:null,this.hour!=null){let[e,n]=tO(this.hour,t);this.dayPeriod=e,this.hour=n}}copy(){let t=new e(this.calendar,this.hourCycle);return t.era=this.era,t.year=this.year,t.month=this.month,t.day=this.day,t.hour=this.hour,t.dayPeriod=this.dayPeriod,t.minute=this.minute,t.second=this.second,t.millisecond=this.millisecond,t.offset=this.offset,t}isComplete(e){return e.every(e=>this[e]!=null)}validate(e,t){return t.every(t=>{if((t===`hour`||t===`dayPeriod`)&&`hour`in e){let[t,n]=tO(e.hour,this.hourCycle);return this.dayPeriod===t&&this.hour===n}return this[t]===e[t]})}isCleared(e){return e.every(e=>this[e]===null)}set(e,t,n){let r=this.copy();return r[e]=t,e===`hour`&&r.dayPeriod==null&&`hour`in n&&(r.dayPeriod=tO(n.hour,this.hourCycle)[0]),e===`year`&&r.era==null&&(r.era=n.era),e!==`second`&&e!==`literal`&&e!==`timeZoneName`&&(r.offset=null),r}clear(e){let t=this.copy();return t[e]=null,e===`year`&&(t.era=null),t.offset=null,t}cycle(e,t,n,r){let i=this.copy();if(i[e]==null&&e!==`dayPeriod`&&e!==`era`){if(e===`hour`&&`hour`in n){let[e,t]=tO(n.hour,this.hourCycle);i.dayPeriod=e,i.hour=t}else i[e]=n[e];return e===`year`&&i.era==null&&(i.era=n.era),i}switch(e){case`era`:{let e=this.calendar.getEras(),n=e.indexOf(i.era);n=eO(n,t,0,e.length-1),i.era=e[n];break}case`year`:{let r=new wT(this.calendar,this.era??n.era,this.year??n.year,this.month??1,this.day??1);r=r.cycle(e,t,{round:e===`year`}),i.era=r.era,i.year=r.year;break}case`month`:i.month=eO(i.month??1,t,1,this.calendar.getMaximumMonthsInYear());break;case`day`:i.day=eO(i.day??1,t,1,this.calendar.getMaximumDaysInMonth());break;case`hour`:{let e=r.some(e=>[`year`,`month`,`day`].includes(e));if(`timeZone`in n&&(!e||i.year!=null&&i.month!=null&&i.day!=null)){let e=this.toValue(n);e=e.cycle(`hour`,t,{hourCycle:this.hourCycle===`h12`?12:24,round:!1});let[r,a]=tO(e.hour,this.hourCycle);i.hour=a,i.dayPeriod=r,i.offset=e.offset}else{let e=i.hour??0,r=this.getSegmentLimits(`hour`);i.hour=eO(e,t,r.minValue,r.maxValue),i.dayPeriod==null&&`hour`in n&&(i.dayPeriod=tO(n.hour,this.hourCycle)[0])}break}case`dayPeriod`:i.dayPeriod=eO(i.dayPeriod??0,t,0,1);break;case`minute`:i.minute=eO(i.minute??0,t,0,59,!0);break;case`second`:i.second=eO(i.second??0,t,0,59,!0)}return i}toValue(e){if(`hour`in e){let t=this.hour;t==null?(this.hourCycle===`h12`||this.hourCycle===`h11`)&&(t=this.dayPeriod===1?12:0):t=yie(t,this.dayPeriod??0,this.hourCycle);let n=e.set({era:this.era??e.era,year:this.year??e.year,month:this.month??e.month,day:this.day??e.day,hour:t??e.hour,minute:this.minute??e.minute,second:this.second??e.second,millisecond:this.millisecond??e.millisecond});return`offset`in n&&this.offset!=null&&n.offset!==this.offset&&(n=n.add({milliseconds:n.offset-this.offset})),n}return e.set({era:this.era??e.era,year:this.year??e.year,month:this.month??e.month,day:this.day??e.day})}getSegmentLimits(e){switch(e){case`era`:{let e=this.calendar.getEras();return{value:this.era==null?e.length-1:e.indexOf(this.era),minValue:0,maxValue:e.length-1}}case`year`:return{value:this.year,minValue:1,maxValue:9999};case`month`:return{value:this.month,minValue:1,maxValue:this.calendar.getMaximumMonthsInYear()};case`day`:return{value:this.day,minValue:1,maxValue:this.calendar.getMaximumDaysInMonth()};case`dayPeriod`:return{value:this.dayPeriod,minValue:0,maxValue:1};case`hour`:{let e=0,t=23;return this.hourCycle===`h12`?(e=1,t=12):this.hourCycle===`h11`&&(e=0,t=11),{value:this.hour,minValue:e,maxValue:t}}case`minute`:return{value:this.minute,minValue:0,maxValue:59};case`second`:return{value:this.second,minValue:0,maxValue:59}}}};function eO(e,t,n,r,i=!1){if(i){e+=Math.sign(t),e0?Math.ceil(e/i)*i:Math.floor(e/i)*i,e>r&&(e=n)}else e+=t,er&&(e=n+(e-r-1));return e}function tO(e,t){let n=+(e>=12);switch(t){case`h11`:e>=12&&(e-=12);break;case`h12`:e===0?e=12:e>12&&(e-=12);break;case`h23`:n=null;break;case`h24`:e+=1,n=null}return[n,e]}function yie(e,t,n){switch(n){case`h11`:t===1&&(e+=12);break;case`h12`:e===12&&(e=0),t===1&&(e+=12);break;case`h24`:--e}return e}var nO={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},rO={year:5,month:2,day:7,hour:2,minute:15,second:15},bie={dayperiod:`dayPeriod`,relatedYear:`year`,yearName:`literal`,unknown:`literal`};function iO(e){let{locale:t,createCalendar:n,hideTimeZone:r,isDisabled:i=!1,isReadOnly:a=!1,isRequired:o=!1,minValue:s,maxValue:c,isDateUnavailable:l}=e,u=e.value||e.defaultValue||e.placeholderValue||null,[d,f]=QD(u,e.granularity),p=f||`UTC`;if(u&&!(d in u))throw Error(`Invalid granularity `+d+` for value `+u.toString());let[m,h]=(0,v.useMemo)(()=>{let r=new yE(t,{dateStyle:`short`,timeStyle:`short`,hour12:e.hourCycle==null?void 0:e.hourCycle===12}).resolvedOptions();return[n(r.calendar),r.hourCycle]},[t,e.hourCycle,n]),[g,_]=eh(e.value,e.defaultValue??null,e.onChange),[y]=(0,v.useState)(g),b=(0,v.useMemo)(()=>ZD(g,m)??null,[g,m]),[x,S]=(0,v.useState)(()=>new $D(m,h,b)),C=m.identifier===`gregory`&&x.era===`BC`,w=(0,v.useMemo)(()=>({granularity:d,maxGranularity:e.maxGranularity??`year`,timeZone:f,hideTimeZone:r,hourCycle:e.hourCycle,showEra:C,shouldForceLeadingZeros:e.shouldForceLeadingZeros}),[e.maxGranularity,d,e.hourCycle,e.shouldForceLeadingZeros,f,r,C]),T=(0,v.useMemo)(()=>YD({},w),[w]),E=(0,v.useMemo)(()=>new yE(t,T),[t,T]),D=(0,v.useMemo)(()=>E.resolvedOptions(),[E]),O=(0,v.useMemo)(()=>gie(e.placeholderValue,d,m,f),[e.placeholderValue,d,m,f]),k=(0,v.useMemo)(()=>{let t=h===`h11`||h===`h12`,n=[`era`,`year`,`month`,`day`,`hour`,...t?[`dayPeriod`]:[],`minute`,`second`],r=n.indexOf(e.maxGranularity||`era`),i=n.indexOf(d===`hour`&&t?`dayPeriod`:d);return n.slice(r,i+1)},[e.maxGranularity,d,h]),[A,j]=(0,v.useState)(b),[M,N]=(0,v.useState)(m),[P,F]=(0,v.useState)(h);(b!==A||h!==P||!bw(m,M))&&(x=new $D(m,h,b),j(b),N(m),F(h),S(x));let I=t=>{if(!(e.isDisabled||e.isReadOnly)){if(t==null||t instanceof $D&&t.isCleared(k))S(new $D(m,h,b)),_(null);else if(!(t instanceof $D))t=Zw(t,u?.calendar||new vw),S(new $D(m,h,b)),_(t);else{if(t.isComplete(k)){let e=t.toValue(b??O);if(t.validate(e,k)){let t=Zw(e,u?.calendar||new vw);if(!g||t.compare(g)!==0){S(new $D(m,h,b)),_(t);return}}}S(t)}}},L=(0,v.useMemo)(()=>x.toValue(b??O).toDate(p),[x,p,b,O]),R=(0,v.useMemo)(()=>xie(L,x,E,D,m,t,d),[L,E,D,x,m,t,d]),z=(e,t)=>{I(x.cycle(e,t,O,k))},B=(0,v.useMemo)(()=>JD(g,s,c,l,w),[g,s,c,l,w]),V=ex({...e,value:g,builtinValidation:B}),H=V.displayValidation.isInvalid,ee=e.validationState||(H?`invalid`:null);return{...V,value:b,defaultValue:e.defaultValue??y,dateValue:L,calendar:m,setValue:I,segments:R,dateFormatter:E,validationState:ee,isInvalid:H,granularity:d,maxGranularity:e.maxGranularity??`year`,isDisabled:i,isReadOnly:a,isRequired:o,increment(e){z(e,1)},decrement(e){z(e,-1)},incrementPage(e){z(e,rO[e]||1)},decrementPage(e){z(e,-(rO[e]||1))},incrementToMax(e){let t=e===`hour`&&h===`h12`?11:x.getSegmentLimits(e).maxValue;I(x.set(e,t,O))},decrementToMin(e){let t=e===`hour`&&h===`h12`?12:x.getSegmentLimits(e).minValue;I(x.set(e,t,O))},setSegment(e,t){I(x.set(e,t,O))},confirmPlaceholder(){if(!(e.isDisabled||e.isReadOnly)&&x.isComplete(k)){let e=Zw(x.toValue(b??O),u?.calendar||new vw);(!g||e.compare(g)!==0)&&_(e),S(new $D(m,h,b))}},clearSegment(e){let t=x;e!==`timeZoneName`&&e!==`literal`&&(t=x.clear(e)),I(t)},formatValue(e){if(!b)return``;let n=YD(e,w);return new yE(t,n).format(L)},getDateFormatter(e,t){return new yE(e,YD({},{...w,...t}))}}}function xie(e,t,n,r,i,a,o){let s=[`hour`,`minute`,`second`],c=n.formatToParts(e),l=new Tp(a,{useGrouping:!1}),u=new Tp(a,{useGrouping:!1,minimumIntegerDigits:2});for(let e of c)if(e.type===`year`||e.type===`month`||e.type===`day`||e.type===`hour`){let n=t[e.type]??0;e.value=r[e.type]===`2-digit`?u.format(n):l.format(n)}let d=[];for(let e of c){let n=bie[e.type]||e.type,r=nO[n];n===`era`&&i.getEras().length===1&&(r=!1);let c=nO[n]&&t[e.type]==null,l=nO[n]?vie(n,e.value,a):null,u={type:n,text:c?l:e.value,...t.getSegmentLimits(n),isPlaceholder:c,placeholder:l,isEditable:r};n===`hour`?(d.push({type:`literal`,text:`⁦`,isPlaceholder:!1,placeholder:``,isEditable:!1}),d.push(u),n===o&&d.push({type:`literal`,text:`⁩`,isPlaceholder:!1,placeholder:``,isEditable:!1})):s.includes(n)&&n===o?(d.push(u),d.push({type:`literal`,text:`⁩`,isPlaceholder:!1,placeholder:``,isEditable:!1})):d.push(u)}return d}function Sie(e){let{placeholderValue:t=new TT,minValue:n,maxValue:r,defaultValue:i,granularity:a,validate:o}=e,[s,c]=eh(e.value,i??null,e.onChange),l=s||t,u=l&&`day`in l?l:void 0,d=i&&`timeZone`in i?i.timeZone:void 0,f=(0,v.useMemo)(()=>{let e=l&&`timeZone`in l?l.timeZone:void 0;return(e||d)&&t?Qw(aO(t),e||d):aO(t)},[t,l,d]),p=(0,v.useMemo)(()=>aO(n,u),[n,u]),m=(0,v.useMemo)(()=>aO(r,u),[r,u]),h=(0,v.useMemo)(()=>s&&`day`in s?Xw(s):s,[s]),g=(0,v.useMemo)(()=>s==null?null:aO(s),[s]),_=(0,v.useMemo)(()=>i==null?null:aO(i),[i]),y=e=>{c(u||d?e:e&&Xw(e))};return{...iO({...e,value:g,defaultValue:_,minValue:p,maxValue:m,onChange:y,granularity:a||`minute`,maxGranularity:`hour`,placeholderValue:f??void 0,createCalendar:()=>new vw,validate:(0,v.useCallback)(()=>o?.(s),[o,s])}),timeValue:h}}function aO(e,t=ww(kw())){return e?`day`in e?e:Yw(t,e):null}var oO=(0,v.createContext)(null),Cie=(0,v.createContext)(null),sO=(0,v.createContext)(null),cO=(0,v.createContext)(null),wie=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,oO);let{validationBehavior:n}=Xf(ax)||{},r=e.validationBehavior??n??`native`,{locale:i}=bp(),a=iO({...e,locale:i,createCalendar:_E,validationBehavior:r}),o=(0,v.useRef)(null),[s,c]=Qf(!e[`aria-label`]&&!e[`aria-labelledby`]),l=(0,v.useRef)(null),{labelProps:u,fieldProps:d,inputProps:f,descriptionProps:p,errorMessageProps:m,...h}=lD({...$f(e),label:c,inputRef:l,validationBehavior:r},a,o),g=Jf({...$f(e),values:{state:a,isInvalid:a.isInvalid,isDisabled:a.isDisabled,isReadOnly:a.isReadOnly,isRequired:e.isRequired||!1},defaultClassName:`react-aria-DateField`}),_=Us(e,{global:!0});return delete _.id,v.createElement(qf,{values:[[sO,a],[Kb,{...d,ref:o,isInvalid:a.isInvalid,isDisabled:a.isDisabled}],[zS,{...f,ref:l}],[sp,{...u,ref:s,elementType:`span`}],[Hv,{slots:{description:p,errorMessage:m}}],[Jb,h]]},v.createElement(np.div,{..._,...g,ref:t,slot:e.slot||void 0,"data-invalid":a.isInvalid||void 0,"data-disabled":a.isDisabled||void 0,"data-readonly":a.isReadOnly||void 0,"data-required":e.isRequired||void 0}),v.createElement(rie,{autoComplete:e.autoComplete,name:e.name,isDisabled:e.isDisabled,state:a}))}),Tie=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,Cie);let{validationBehavior:n}=Xf(ax)||{},r=e.validationBehavior??n??`native`,{locale:i}=bp(),a=Sie({...e,locale:i,validationBehavior:r}),o=(0,v.useRef)(null),[s,c]=Qf(!e[`aria-label`]&&!e[`aria-labelledby`]),l=(0,v.useRef)(null),{labelProps:u,fieldProps:d,inputProps:f,descriptionProps:p,errorMessageProps:m,...h}=aie({...$f(e),label:c,inputRef:l,validationBehavior:r},a,o),g=Jf({...e,values:{state:a,isInvalid:a.isInvalid,isDisabled:a.isDisabled,isReadOnly:a.isReadOnly,isRequired:e.isRequired||!1},defaultClassName:`react-aria-TimeField`}),_=Us(e,{global:!0});return delete _.id,v.createElement(qf,{values:[[cO,a],[Kb,{...d,ref:o,isInvalid:a.isInvalid,isDisabled:a.isDisabled}],[zS,{...f,ref:l}],[sp,{...u,ref:s,elementType:`span`}],[Hv,{slots:{description:p,errorMessage:m}}],[Jb,h]]},v.createElement(np.div,{..._,...g,ref:t,slot:e.slot||void 0,"data-invalid":a.isInvalid||void 0,"data-disabled":a.isDisabled||void 0,"data-readonly":a.isReadOnly||void 0,"data-required":e.isRequired||void 0}))}),Eie=(0,v.forwardRef)(function(e,t){let n=(0,v.useContext)(sO),r=(0,v.useContext)(cO);return n||r?v.createElement(lO,{...e,ref:t}):v.createElement(Die,{...e,ref:t})}),Die=(0,v.forwardRef)((e,t)=>{let[n,r]=Zf({slot:e.slot},t,oO),{locale:i}=bp(),a=iO({...n,locale:i,createCalendar:_E}),o=(0,v.useRef)(null),{fieldProps:s,inputProps:c}=lD({...n,inputRef:o},a,r);return v.createElement(qf,{values:[[sO,a],[zS,{...c,ref:o}],[Kb,{...s,ref:r,isInvalid:a.isInvalid,isDisabled:a.isDisabled}]]},v.createElement(lO,e))}),lO=(0,v.forwardRef)((e,t)=>{let{className:n,children:r}=e,i=(0,v.useContext)(sO),a=(0,v.useContext)(cO),o=i??a;return v.createElement(v.Fragment,null,v.createElement(qb,{...e,ref:t,slot:e.slot||void 0,className:n??`react-aria-DateInput`,isReadOnly:o.isReadOnly,isInvalid:o.isInvalid,isDisabled:o.isDisabled},o.segments.map((e,t)=>(0,v.cloneElement)(r(e),{key:t}))),v.createElement(BS,{className:``}))}),Oie=(0,v.forwardRef)(function({segment:e,...t},n){let r=(0,v.useContext)(sO),i=(0,v.useContext)(cO),a=r??i,o=Zs(n),{segmentProps:s}=uie(e,a,o),{focusProps:c,isFocused:l,isFocusVisible:u}=Gm(),{hoverProps:d,isHovered:f}=Zm({...t,isDisabled:a.isDisabled||e.type===`literal`}),p=Jf({...t,values:{...e,isReadOnly:a.isReadOnly,isInvalid:a.isInvalid,isDisabled:a.isDisabled,isHovered:f,isFocused:l,isFocusVisible:u},defaultChildren:e.text,defaultClassName:`react-aria-DateSegment`});return v.createElement(np.span,{...W(Us(t,{global:!0}),s,c,d),...p,style:s.style,ref:o,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":a.isInvalid||void 0,"data-readonly":a.isReadOnly||void 0,"data-disabled":a.isDisabled||void 0,"data-type":e.type,"data-hovered":f||void 0,"data-focused":l||void 0,"data-focus-visible":u||void 0})}),uO=(0,v.createContext)({}),dO=({children:e,className:t,fullWidth:n,variant:r,...i})=>{let a=v.useMemo(()=>mf({fullWidth:n,variant:r}),[n,r]);return(0,G.jsx)(uO,{value:{slots:a},children:(0,G.jsx)(qb,{className:K(t,a?.base()),"data-slot":`date-input-group`,...i,children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})})},fO=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(uO);return(0,G.jsx)(Xc.div,{className:q(r?.prefix,t),"data-slot":`date-input-group-prefix`,...n,children:e})},pO=({className:e,...t})=>{let{slots:n}=(0,v.use)(uO);return(0,G.jsx)(Eie,{className:K(e,n?.input()),"data-slot":`date-input-group-input`,...t})},mO=({className:e,segment:t,...n})=>{let{slots:r}=(0,v.use)(uO);return(0,G.jsx)(Oie,{className:q(r?.segment,e),"data-slot":`date-input-group-segment`,segment:t,...n})},hO=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(uO);return(0,G.jsx)(Xc.div,{className:q(r?.inputContainer,t),"data-slot":`date-input-group-input-container`,...n,children:e})},gO=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(uO);return(0,G.jsx)(Xc.div,{className:q(r?.suffix,t),"data-slot":`date-input-group-suffix`,...n,children:e})};function _O({children:e,className:t,fullWidth:n,...r}){let i=v.useMemo(()=>ff({fullWidth:n}),[n]);return(0,G.jsx)(wie,{"data-required":oh(r.isRequired),"data-slot":`date-field`,...r,className:K(t,i),children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})}var vO=Object.assign(_O,{Root:_O,Group:dO,Input:pO,InputContainer:hO,Segment:mO,Prefix:fO,Suffix:gO}),yO={};yO={dateRange:e=>`${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,dateSelected:e=>`${e.date} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`,finishRangeSelectionPrompt:`انقر لإنهاء عملية تحديد نطاق التاريخ`,maximumDate:`آخر تاريخ متاح`,minimumDate:`أول تاريخ متاح`,next:`التالي`,previous:`السابق`,selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.dateRange}`,startRangeSelectionPrompt:`انقر لبدء عملية تحديد نطاق التاريخ`,todayDate:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date}`,todayDateSelected:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date} \u{645}\u{62D}\u{62F}\u{62F}`};var bO={};bO={dateRange:e=>`${e.startDate} \u{434}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{435} ${e.date}`,finishRangeSelectionPrompt:`Натиснете, за да довършите избора на времеви интервал`,maximumDate:`Последна налична дата`,minimumDate:`Първа налична дата`,next:`Напред`,previous:`Назад`,selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:`Натиснете, за да пристъпите към избора на времеви интервал`,todayDate:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date}`,todayDateSelected:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date} \u{441}\u{430} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438}`};var xO={};xO={dateRange:e=>`${e.startDate} a\u{17E} ${e.endDate}`,dateSelected:e=>`Vybr\xe1no ${e.date}`,finishRangeSelectionPrompt:`Kliknutím dokončíte výběr rozsahu dat`,maximumDate:`Poslední dostupné datum`,minimumDate:`První dostupné datum`,next:`Další`,previous:`Předchozí`,selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknutím zahájíte výběr rozsahu dat`,todayDate:e=>`Dnes, ${e.date}`,todayDateSelected:e=>`Dnes, vybr\xe1no ${e.date}`};var SO={};SO={dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:`Klik for at fuldføre valg af datoområde`,maximumDate:`Sidste ledige dato`,minimumDate:`Første ledige dato`,next:`Næste`,previous:`Forrige`,selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.dateRange}`,startRangeSelectionPrompt:`Klik for at starte valg af datoområde`,todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`};var CO={};CO={dateRange:e=>`${e.startDate} bis ${e.endDate}`,dateSelected:e=>`${e.date} ausgew\xe4hlt`,finishRangeSelectionPrompt:`Klicken, um die Auswahl des Datumsbereichs zu beenden`,maximumDate:`Letztes verfügbares Datum`,minimumDate:`Erstes verfügbares Datum`,next:`Weiter`,previous:`Zurück`,selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.dateRange}`,startRangeSelectionPrompt:`Klicken, um die Auswahl des Datumsbereichs zu beginnen`,todayDate:e=>`Heute, ${e.date}`,todayDateSelected:e=>`Heute, ${e.date} ausgew\xe4hlt`};var wO={};wO={dateRange:e=>`${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,dateSelected:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} ${e.date}`,finishRangeSelectionPrompt:`Κάντε κλικ για να ολοκληρώσετε την επιλογή εύρους ημερομηνιών`,maximumDate:`Τελευταία διαθέσιμη ημερομηνία`,minimumDate:`Πρώτη διαθέσιμη ημερομηνία`,next:`Επόμενο`,previous:`Προηγούμενο`,selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.dateRange}`,startRangeSelectionPrompt:`Κάντε κλικ για να ξεκινήσετε την επιλογή εύρους ημερομηνιών`,todayDate:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, ${e.date}`,todayDateSelected:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3C4}\u{3B7}\u{3BA}\u{3B5} ${e.date}`};var TO={};TO={previous:`Previous`,next:`Next`,selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.dateRange}`,todayDate:e=>`Today, ${e.date}`,todayDateSelected:e=>`Today, ${e.date} selected`,dateSelected:e=>`${e.date} selected`,startRangeSelectionPrompt:`Click to start selecting date range`,finishRangeSelectionPrompt:`Click to finish selecting date range`,minimumDate:`First available date`,maximumDate:`Last available date`,dateRange:e=>`${e.startDate} to ${e.endDate}`};var EO={};EO={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} seleccionado`,finishRangeSelectionPrompt:`Haga clic para terminar de seleccionar rango de fechas`,maximumDate:`Última fecha disponible`,minimumDate:`Primera fecha disponible`,next:`Siguiente`,previous:`Anterior`,selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo seleccionado: ${e.dateRange}`,startRangeSelectionPrompt:`Haga clic para comenzar a seleccionar un rango de fechas`,todayDate:e=>`Hoy, ${e.date}`,todayDateSelected:e=>`Hoy, ${e.date} seleccionado`};var DO={};DO={dateRange:e=>`${e.startDate} kuni ${e.endDate}`,dateSelected:e=>`${e.date} valitud`,finishRangeSelectionPrompt:`Klõpsake kuupäevavahemiku valimise lõpetamiseks`,maximumDate:`Viimane saadaolev kuupäev`,minimumDate:`Esimene saadaolev kuupäev`,next:`Järgmine`,previous:`Eelmine`,selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.dateRange}`,startRangeSelectionPrompt:`Klõpsake kuupäevavahemiku valimiseks`,todayDate:e=>`T\xe4na, ${e.date}`,todayDateSelected:e=>`T\xe4na, ${e.date} valitud`};var OO={};OO={dateRange:e=>`${e.startDate} \u{2013} ${e.endDate}`,dateSelected:e=>`${e.date} valittu`,finishRangeSelectionPrompt:`Lopeta päivämääräalueen valinta napsauttamalla tätä.`,maximumDate:`Viimeinen varattavissa oleva päivämäärä`,minimumDate:`Ensimmäinen varattavissa oleva päivämäärä`,next:`Seuraava`,previous:`Edellinen`,selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.dateRange}`,startRangeSelectionPrompt:`Aloita päivämääräalueen valinta napsauttamalla tätä.`,todayDate:e=>`T\xe4n\xe4\xe4n, ${e.date}`,todayDateSelected:e=>`T\xe4n\xe4\xe4n, ${e.date} valittu`};var kO={};kO={dateRange:e=>`${e.startDate} \xe0 ${e.endDate}`,dateSelected:e=>`${e.date} s\xe9lectionn\xe9`,finishRangeSelectionPrompt:`Cliquer pour finir de sélectionner la plage de dates`,maximumDate:`Dernière date disponible`,minimumDate:`Première date disponible`,next:`Suivant`,previous:`Précédent`,selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.dateRange}`,startRangeSelectionPrompt:`Cliquer pour commencer à sélectionner la plage de dates`,todayDate:e=>`Aujourd'hui, ${e.date}`,todayDateSelected:e=>`Aujourd\u{2019}hui, ${e.date} s\xe9lectionn\xe9`};var AO={};AO={dateRange:e=>`${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,dateSelected:e=>`${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`,finishRangeSelectionPrompt:`חץ כדי לסיים את בחירת טווח התאריכים`,maximumDate:`תאריך פנוי אחרון`,minimumDate:`תאריך פנוי ראשון`,next:`הבא`,previous:`הקודם`,selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.dateRange}`,startRangeSelectionPrompt:`לחץ כדי להתחיל בבחירת טווח התאריכים`,todayDate:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date}`,todayDateSelected:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`};var jO={};jO={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} odabran`,finishRangeSelectionPrompt:`Kliknite da dovršite raspon odabranih datuma`,maximumDate:`Posljednji raspoloživi datum`,minimumDate:`Prvi raspoloživi datum`,next:`Sljedeći`,previous:`Prethodni`,selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknite da započnete raspon odabranih datuma`,todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, odabran ${e.date}`};var MO={};MO={dateRange:e=>`${e.startDate}\u{2013}${e.endDate}`,dateSelected:e=>`${e.date} kiv\xe1lasztva`,finishRangeSelectionPrompt:`Kattintson a dátumtartomány kijelölésének befejezéséhez`,maximumDate:`Utolsó elérhető dátum`,minimumDate:`Az első elérhető dátum`,next:`Következő`,previous:`Előző`,selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.dateRange}`,startRangeSelectionPrompt:`Kattintson a dátumtartomány kijelölésének indításához`,todayDate:e=>`Ma, ${e.date}`,todayDateSelected:e=>`Ma, ${e.date} kijel\xf6lve`};var NO={};NO={dateRange:e=>`Da ${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selezionata`,finishRangeSelectionPrompt:`Fai clic per completare la selezione dell’intervallo di date`,maximumDate:`Ultima data disponibile`,minimumDate:`Prima data disponibile`,next:`Successivo`,previous:`Precedente`,selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: ${e.dateRange}`,startRangeSelectionPrompt:`Fai clic per selezionare l’intervallo di date`,todayDate:e=>`Oggi, ${e.date}`,todayDateSelected:e=>`Oggi, ${e.date} selezionata`};var PO={};PO={dateRange:e=>`${e.startDate} \u{304B}\u{3089} ${e.endDate}`,dateSelected:e=>`${e.date} \u{3092}\u{9078}\u{629E}`,finishRangeSelectionPrompt:`クリックして日付範囲の選択を終了`,maximumDate:`最終利用可能日`,minimumDate:`最初の利用可能日`,next:`次へ`,previous:`前へ`,selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.dateRange}`,startRangeSelectionPrompt:`クリックして日付範囲の選択を開始`,todayDate:e=>`\u{672C}\u{65E5}\u{3001}${e.date}`,todayDateSelected:e=>`\u{672C}\u{65E5}\u{3001}${e.date} \u{3092}\u{9078}\u{629E}`};var FO={};FO={dateRange:e=>`${e.startDate} ~ ${e.endDate}`,dateSelected:e=>`${e.date} \u{C120}\u{D0DD}\u{B428}`,finishRangeSelectionPrompt:`날짜 범위 선택을 완료하려면 클릭하십시오.`,maximumDate:`마지막으로 사용 가능한 일자`,minimumDate:`처음으로 사용 가능한 일자`,next:`다음`,previous:`이전`,selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.dateRange}`,startRangeSelectionPrompt:`날짜 범위 선택을 시작하려면 클릭하십시오.`,todayDate:e=>`\u{C624}\u{B298}, ${e.date}`,todayDateSelected:e=>`\u{C624}\u{B298}, ${e.date} \u{C120}\u{D0DD}\u{B428}`};var IO={};IO={dateRange:e=>`Nuo ${e.startDate} iki ${e.endDate}`,dateSelected:e=>`Pasirinkta ${e.date}`,finishRangeSelectionPrompt:`Spustelėkite, kad baigtumėte pasirinkti datų intervalą`,maximumDate:`Paskutinė galima data`,minimumDate:`Pirmoji galima data`,next:`Paskesnis`,previous:`Ankstesnis`,selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:`Spustelėkite, kad pradėtumėte pasirinkti datų intervalą`,todayDate:e=>`\u{160}iandien, ${e.date}`,todayDateSelected:e=>`\u{160}iandien, pasirinkta ${e.date}`};var LO={};LO={dateRange:e=>`No ${e.startDate} l\u{12B}dz ${e.endDate}`,dateSelected:e=>`Atlas\u{12B}ts: ${e.date}`,finishRangeSelectionPrompt:`Noklikšķiniet, lai pabeigtu datumu diapazona atlasi`,maximumDate:`Pēdējais pieejamais datums`,minimumDate:`Pirmais pieejamais datums`,next:`Tālāk`,previous:`Atpakaļ`,selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:`Noklikšķiniet, lai sāktu datumu diapazona atlasi`,todayDate:e=>`\u{160}odien, ${e.date}`,todayDateSelected:e=>`Atlas\u{12B}ta \u{161}odiena, ${e.date}`};var RO={};RO={dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:`Klikk for å fullføre valg av datoområde`,maximumDate:`Siste tilgjengelige dato`,minimumDate:`Første tilgjengelige dato`,next:`Neste`,previous:`Forrige`,selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.dateRange}`,startRangeSelectionPrompt:`Klikk for å starte valg av datoområde`,todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`};var zO={};zO={dateRange:e=>`${e.startDate} tot ${e.endDate}`,dateSelected:e=>`${e.date} geselecteerd`,finishRangeSelectionPrompt:`Klik om de selectie van het datumbereik te voltooien`,maximumDate:`Laatste beschikbare datum`,minimumDate:`Eerste beschikbare datum`,next:`Volgende`,previous:`Vorige`,selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.dateRange}`,startRangeSelectionPrompt:`Klik om het datumbereik te selecteren`,todayDate:e=>`Vandaag, ${e.date}`,todayDateSelected:e=>`Vandaag, ${e.date} geselecteerd`};var BO={};BO={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`Wybrano ${e.date}`,finishRangeSelectionPrompt:`Kliknij, aby zakończyć wybór zakresu dat`,maximumDate:`Ostatnia dostępna data`,minimumDate:`Pierwsza dostępna data`,next:`Dalej`,previous:`Wstecz`,selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknij, aby rozpocząć wybór zakresu dat`,todayDate:e=>`Dzisiaj, ${e.date}`,todayDateSelected:e=>`Dzisiaj wybrano ${e.date}`};var VO={};VO={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:`Clique para concluir a seleção do intervalo de datas`,maximumDate:`Última data disponível`,minimumDate:`Primeira data disponível`,next:`Próximo`,previous:`Anterior`,selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:`Clique para iniciar a seleção do intervalo de datas`,todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`};var HO={};HO={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:`Clique para terminar de selecionar o intervalo de datas`,maximumDate:`Última data disponível`,minimumDate:`Primeira data disponível`,next:`Próximo`,previous:`Anterior`,selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:`Clique para começar a selecionar o intervalo de datas`,todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`};var UO={};UO={dateRange:e=>`De la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,dateSelected:e=>`${e.date} selectat\u{103}`,finishRangeSelectionPrompt:`Apăsaţi pentru a finaliza selecţia razei pentru dată`,maximumDate:`Ultima dată disponibilă`,minimumDate:`Prima dată disponibilă`,next:`Următorul`,previous:`Înainte`,selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:`Apăsaţi pentru a începe selecţia razei pentru dată`,todayDate:e=>`Ast\u{103}zi, ${e.date}`,todayDateSelected:e=>`Azi, ${e.date} selectat\u{103}`};var WO={};WO={dateRange:e=>`\u{421} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:`Щелкните, чтобы завершить выбор диапазона дат`,maximumDate:`Последняя доступная дата`,minimumDate:`Первая доступная дата`,next:`Далее`,previous:`Назад`,selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:`Щелкните, чтобы начать выбор диапазона дат`,todayDate:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`};var GO={};GO={dateRange:e=>`Od ${e.startDate} do ${e.endDate}`,dateSelected:e=>`Vybrat\xfd d\xe1tum ${e.date}`,finishRangeSelectionPrompt:`Kliknutím dokončíte výber rozsahu dátumov`,maximumDate:`Posledný dostupný dátum`,minimumDate:`Prvý dostupný dátum`,next:`Nasledujúce`,previous:`Predchádzajúce`,selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknutím spustíte výber rozsahu dátumov`,todayDate:e=>`Dnes ${e.date}`,todayDateSelected:e=>`Vybrat\xfd dne\u{161}n\xfd d\xe1tum ${e.date}`};var KO={};KO={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izbrano`,finishRangeSelectionPrompt:`Kliknite za dokončanje izbire datumskega obsega`,maximumDate:`Zadnji razpoložljivi datum`,minimumDate:`Prvi razpoložljivi datum`,next:`Naprej`,previous:`Nazaj`,selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknite za začetek izbire datumskega obsega`,todayDate:e=>`Danes, ${e.date}`,todayDateSelected:e=>`Danes, ${e.date} izbrano`};var qO={};qO={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izabran`,finishRangeSelectionPrompt:`Kliknite da dovršite opseg izabranih datuma`,maximumDate:`Zadnji raspoloživi datum`,minimumDate:`Prvi raspoloživi datum`,next:`Sledeći`,previous:`Prethodni`,selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknite da započnete opseg izabranih datuma`,todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, izabran ${e.date}`};var JO={};JO={dateRange:e=>`${e.startDate} till ${e.endDate}`,dateSelected:e=>`${e.date} har valts`,finishRangeSelectionPrompt:`Klicka för att avsluta val av datumintervall`,maximumDate:`Sista tillgängliga datum`,minimumDate:`Första tillgängliga datum`,next:`Nästa`,previous:`Föregående`,selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.dateRange}`,startRangeSelectionPrompt:`Klicka för att välja datumintervall`,todayDate:e=>`Idag, ${e.date}`,todayDateSelected:e=>`Idag, ${e.date} har valts`};var YO={};YO={dateRange:e=>`${e.startDate} - ${e.endDate}`,dateSelected:e=>`${e.date} se\xe7ildi`,finishRangeSelectionPrompt:`Tarih aralığı seçimini tamamlamak için tıklayın`,maximumDate:`Son müsait tarih`,minimumDate:`İlk müsait tarih`,next:`Sonraki`,previous:`Önceki`,selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.dateRange}`,startRangeSelectionPrompt:`Tarih aralığı seçimini başlatmak için tıklayın`,todayDate:e=>`Bug\xfcn, ${e.date}`,todayDateSelected:e=>`Bug\xfcn, ${e.date} se\xe7ildi`};var XO={};XO={dateRange:e=>`${e.startDate} \u{2014} ${e.endDate}`,dateSelected:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:`Натисніть, щоб завершити вибір діапазону дат`,maximumDate:`Остання доступна дата`,minimumDate:`Перша доступна дата`,next:`Наступний`,previous:`Попередній`,selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:`Натисніть, щоб почати вибір діапазону дат`,todayDate:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`};var ZO={};ZO={dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9009}\u{62E9} ${e.date}`,finishRangeSelectionPrompt:`单击以完成选择日期范围`,maximumDate:`最后一个可用日期`,minimumDate:`第一个可用日期`,next:`下一页`,previous:`上一页`,selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:`单击以开始选择日期范围`,todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9009}\u{62E9}\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`};var QO={};QO={dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9078}\u{53D6} ${e.date}`,finishRangeSelectionPrompt:`按一下以完成選取日期範圍`,maximumDate:`最後一個可用日期`,minimumDate:`第一個可用日期`,next:`下一頁`,previous:`上一頁`,selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:`按一下以開始選取日期範圍`,todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9078}\u{53D6}\u{4ECA}\u{5929}\u{FF0C}${e.date}`};var $O={};$O={"ar-AE":yO,"bg-BG":bO,"cs-CZ":xO,"da-DK":SO,"de-DE":CO,"el-GR":wO,"en-US":TO,"es-ES":EO,"et-EE":DO,"fi-FI":OO,"fr-FR":kO,"he-IL":AO,"hr-HR":jO,"hu-HU":MO,"it-IT":NO,"ja-JP":PO,"ko-KR":FO,"lt-LT":IO,"lv-LV":LO,"nb-NO":RO,"nl-NL":zO,"pl-PL":BO,"pt-BR":VO,"pt-PT":HO,"ro-RO":UO,"ru-RU":WO,"sk-SK":GO,"sl-SI":KO,"sr-SP":qO,"sv-SE":JO,"tr-TR":YO,"uk-UA":XO,"zh-CN":ZO,"zh-TW":QO};function ek(e){return e&&e.__esModule?e.default:e}var tk=new WeakMap;function nk(e){return e?.calendar.identifier===`gregory`&&e.era===`BC`?`short`:void 0}function kie(e){let t=s_(ek($O),`@react-aria/calendar`),n,r;`highlightedRange`in e?{start:n,end:r}=e.highlightedRange||{}:(n=Array.isArray(e.value)?e.value[0]:e.value??void 0,r=Array.isArray(e.value)?e.value.at(-1):e.value??void 0);let i=uD({weekday:`long`,month:`long`,year:`numeric`,day:`numeric`,era:nk(n)||nk(r),timeZone:e.timeZone}),{locale:a}=bp(),o=(0,v.useMemo)(()=>new Intl.ListFormat(a),[a]),s=`anchorDate`in e?e.anchorDate:null;return(0,v.useMemo)(()=>{if(!s&&n&&r){if(yw(n,r)){let r=i.format(n.toDate(e.timeZone));return t.format(`selectedDateDescription`,{date:r})}if(`highlightedRange`in e){let a=ik(i,t,n,r,e.timeZone);return t.format(`selectedRangeDescription`,{dateRange:a})}if(Array.isArray(e.value)){let n=e.value.map(t=>i.format(t.toDate(e.timeZone))),r=o.format(n);return t.format(`selectedDateDescription`,{date:r})}}return``},[n,r,s,e,t,i,o])}function rk(e,t,n,r){let i=s_(ek($O),`@react-aria/calendar`),a=nk(e)||nk(t),o=uD({month:`long`,year:`numeric`,era:a,calendar:e.calendar.identifier,timeZone:n}),s=uD({month:`long`,year:`numeric`,day:`numeric`,era:a,calendar:e.calendar.identifier,timeZone:n});return(0,v.useMemo)(()=>{if(yw(e,jw(e))){let a=e,s=t;if(e.calendar.getFormattableMonth&&(a=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),yw(t,Mw(e)))return o.format(a.toDate(n));if(yw(t,Mw(t)))return r?ik(o,i,a,s,n):o.formatRange(a.toDate(n),s.toDate(n))}return r?ik(s,i,e,t,n):s.formatRange(e.toDate(n),t.toDate(n))},[e,t,o,s,i,n,r])}function ik(e,t,n,r,i){let a=e.formatRangeToParts(n.toDate(i),r.toDate(i)),o=-1;for(let e=0;eo&&(c+=a[e].value);return t.format(`dateRange`,{startDate:s,endDate:c})}function Aie(e){return e&&e.__esModule?e.default:e}function jie(e,t){let n=s_(Aie($O),`@react-aria/calendar`),r=Us(e),i=rk(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),a=rk(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);ec(()=>{t.isFocused||Gp(a)},[a]);let o=kie(t);ec(()=>{o&&Gp(o,`polite`,4e3)},[o]);let s=gs([!!e.errorMessage,e.isInvalid,e.validationState]);tk.set(t,{ariaLabel:e[`aria-label`],ariaLabelledBy:e[`aria-labelledby`],errorMessageId:s,selectedDateDescription:o});let[c,l]=(0,v.useState)(!1),u=e.isDisabled||t.isNextVisibleRangeInvalid();u&&c&&(l(!1),t.setFocused(!0));let[d,f]=(0,v.useState)(!1),p=e.isDisabled||t.isPreviousVisibleRangeInvalid();return p&&d&&(f(!1),t.setFocused(!0)),{calendarProps:W(r,Xs({id:e.id,"aria-label":[e[`aria-label`],a].filter(Boolean).join(`, `),"aria-labelledby":e[`aria-labelledby`]}),{role:`application`,"aria-details":e[`aria-details`]||void 0,"aria-describedby":e[`aria-describedby`]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":n.format(`next`),isDisabled:u,onFocusChange:l},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":n.format(`previous`),isDisabled:p,onFocusChange:f},errorMessageProps:{id:s},title:i}}function ak(e,t){let{startDate:n=t.visibleRange.start,endDate:r=t.visibleRange.end,firstDayOfWeek:i}=e,{direction:a}=bp(),{keyboardProps:o}=Sm({shortcuts:{End:()=>{t.focusSectionEnd()},Home:()=>{t.focusSectionStart()},Escape:()=>(`setAnchorDate`in t&&t.setAnchorDate(null),!1)}}),{keyboardProps:s}=Sm({shortcuts:{Enter:()=>{t.selectFocusedDate()}," ":()=>{t.selectFocusedDate()},PageUp:()=>{t.focusPreviousSection()},"Shift+PageUp":()=>{t.focusPreviousSection(!0)},PageDown:()=>{t.focusNextSection()},"Shift+PageDown":()=>{t.focusNextSection(!0)},ArrowLeft:()=>{a===`rtl`?t.focusNextDay():t.focusPreviousDay()},ArrowUp:()=>{t.focusPreviousRow()},ArrowRight:()=>{a===`rtl`?t.focusPreviousDay():t.focusNextDay()},ArrowDown:()=>{t.focusNextRow()}},allowRepeats:!0}),c=rk(n,r,t.timeZone,!0),{ariaLabel:l,ariaLabelledBy:u}=tk.get(t),d=Xs({"aria-label":[l,c].filter(Boolean).join(`, `),"aria-labelledby":u}),f=uD({weekday:e.weekdayStyle||`narrow`,timeZone:t.timeZone}),{locale:p}=bp(),m=(0,v.useMemo)(()=>{let e=t.visibleDuration.days&&t.visibleDuration.days<7,r=e?n:Pw(ww(t.timeZone),p,i),a=e?t.visibleDuration.days:7;return[...Array(a).keys()].map(e=>{let n=r.add({days:e}).toDate(t.timeZone);return f.format(n)})},[p,t.timeZone,f,i,n,t.visibleDuration.days]),h=t.getWeeksInMonth(n);return{gridProps:W(d,{role:`grid`,"aria-readonly":t.isReadOnly||void 0,"aria-disabled":t.isDisabled||void 0,"aria-multiselectable":`highlightedRange`in t||t.selectionMode===`multiple`||void 0,onFocus:()=>t.setFocused(!0),onBlur:()=>t.setFocused(!1)},o,s),headerProps:{"aria-hidden":!0},weekDays:m,weeksInMonth:h}}function ok(e){return e&&e.__esModule?e.default:e}function Mie(e,t,n){let{date:r,isDisabled:i}=e,{errorMessageId:a,selectedDateDescription:o}=tk.get(t),s=s_(ok($O),`@react-aria/calendar`),c=uD({weekday:`long`,day:`numeric`,month:`long`,year:`numeric`,era:nk(r),timeZone:t.timeZone}),l=t.isCellFocused(r)&&!e.isOutsideMonth;i=i||t.isCellDisabled(r)||!!e.isOutsideMonth;let u=t.isCellUnavailable(r),d=!i&&!u,f=t.isSelected(r)&&d,p=!1;t.isValueInvalid&&(`highlightedRange`in t?p=!t.anchorDate&&t.highlightedRange!=null&&r.compare(t.highlightedRange.start)>=0&&r.compare(t.highlightedRange.end)<=0:Array.isArray(t.value)?p=t.value.some(e=>yw(e,r)):t.value&&(p=yw(t.value,r))),p&&!i&&(f=!0),r=Sc(r,sre);let m=(0,v.useMemo)(()=>r.toDate(t.timeZone),[r,t.timeZone]),h=xw(r,t.timeZone),g=(0,v.useMemo)(()=>{let e=``;return`highlightedRange`in t&&t.value&&!t.anchorDate&&(yw(r,t.value.start)||yw(r,t.value.end))&&(e=o+`, `),e+=c.format(m),h?e=s.format(f?`todayDateSelected`:`todayDate`,{date:e}):f&&(e=s.format(`dateSelected`,{date:e})),t.minValue&&yw(r,t.minValue)?e+=`, `+s.format(`minimumDate`):t.maxValue&&yw(r,t.maxValue)&&(e+=`, `+s.format(`maximumDate`)),e},[c,m,s,f,h,r,t,o]),_=``;`anchorDate`in t&&l&&!t.isReadOnly&&d&&(_=t.anchorDate?s.format(`finishRangeSelectionPrompt`):s.format(`startRangeSelectionPrompt`));let y=gc(_),b=(0,v.useRef)(!1),x=(0,v.useRef)(!1),S=(0,v.useRef)(void 0),{pressProps:C,isPressed:w}=Fm({shouldCancelOnPointerExit:`anchorDate`in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!d||t.isReadOnly,onPressStart(e){if(t.isReadOnly){t.setFocusedDate(r),t.setFocused(!0);return}if(`highlightedRange`in t&&!t.anchorDate&&(e.pointerType===`mouse`||e.pointerType===`touch`)){if(t.highlightedRange&&!p){if(yw(r,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(r),t.setFocused(!0),t.setDragging(!0),x.current=!0;return}if(yw(r,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(r),t.setFocused(!0),t.setDragging(!0),x.current=!0;return}}let n=()=>{t.setDragging(!0),S.current=void 0,t.selectDate(r),t.setFocusedDate(r),t.setFocused(!0),b.current=!0};e.pointerType===`touch`?S.current=setTimeout(n,200):n()}},onPressEnd(){x.current=!1,b.current=!1,clearTimeout(S.current),S.current=void 0},onPress(){!(`anchorDate`in t)&&!t.isReadOnly&&(t.selectDate(r),t.setFocusedDate(r),t.setFocused(!0))},onPressUp(e){t.isReadOnly||(`anchorDate`in t&&S.current&&(t.selectDate(r),t.setFocusedDate(r),t.setFocused(!0)),`anchorDate`in t&&(x.current?t.setAnchorDate(r):t.anchorDate&&!b.current?(t.selectDate(r),t.setFocusedDate(r),t.setFocused(!0)):e.pointerType===`keyboard`&&!t.anchorDate?(t.selectDate(r),t.focusNearestAvailableDate(r)):e.pointerType===`virtual`&&(t.selectDate(r),t.setFocusedDate(r),t.setFocused(!0))))}}),T;i||(T=yw(r,t.focusedDate)?0:-1),(0,v.useEffect)(()=>{l&&n.current&&(Io(n.current),pm()!==`pointer`&&Os()===n.current&&yc(n.current,{containingElement:oc(n.current)}))},[l,n]);let E=uD({day:`numeric`,timeZone:t.timeZone,calendar:r.calendar.identifier}),D=(0,v.useMemo)(()=>E.formatToParts(m).find(e=>e.type===`day`).value,[E,m]);return{cellProps:{role:`gridcell`,"aria-disabled":!d||void 0,"aria-selected":f||void 0,"aria-invalid":p||void 0},buttonProps:W(C,{onFocus(){i||(t.setFocusedDate(r),t.setFocused(!0))},tabIndex:T,role:`button`,"aria-disabled":!d||void 0,"aria-label":g,"aria-invalid":p||void 0,"aria-describedby":[p?a:void 0,y[`aria-describedby`]].filter(Boolean).join(` `)||void 0,onPointerEnter(e){`highlightDate`in t&&(e.pointerType!==`touch`||t.isDragging)&&d&&t.highlightDate(r)},onPointerDown(e){let t=U(e);t instanceof HTMLElement&&`releasePointerCapture`in t&&(`hasPointerCapture`in t?t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId):t.releasePointerCapture(e.pointerId))},onContextMenu(e){e.preventDefault()}}),isPressed:w,isFocused:l,isSelected:f,isDisabled:i,isUnavailable:u,isOutsideVisibleRange:r.compare(t.visibleRange.start)<0||r.compare(t.visibleRange.end)>0,isInvalid:p,formattedDate:D}}function Nie(e,t){let n=uD({year:e.format?.year||`numeric`,era:e.format?.era||(t.focusedDate.calendar.identifier===`gregory`&&t.focusedDate.era===`BC`?`short`:void 0),calendar:t.focusedDate.calendar.identifier,timeZone:t.timeZone}),r=e.visibleYears||20,i=t.focusedDate.subtract({years:Math.floor(r/2)}),a=t.focusedDate.add({years:Math.ceil(r/2)-1});t.maxValue&&a.compare(t.maxValue)>0&&(a=Jw(t.maxValue),i=a.subtract({years:r-1})),t.minValue&&i.compare(t.minValue)<0&&(i=Jw(t.minValue),a=i.add({years:r-1}),t.maxValue&&a.compare(t.maxValue)>0&&(a=Jw(t.maxValue)));let o=[],s=i,c=0;for(;s.compare(a)<=0;)ore(s,t.focusedDate)&&(c=o.length),o.push({id:o.length,date:s,formatted:n.format(s.toDate(t.timeZone))}),s=s.add({years:1});let{locale:l}=bp();return{"aria-label":(0,v.useMemo)(()=>new Intl.DisplayNames(l,{type:`dateTimeField`}).of(`year`),[l]),value:c,onChange:e=>{e!=null&&t.setFocusedDate(o[e].date)},items:o}}function sk(e,t){let n=(0,v.useMemo)(()=>{let n=t.visibleRange.start;return e.offset&&(n=n.add(e.offset)),n},[t.visibleRange.start,e.offset]),r=t.visibleDuration.days||t.visibleDuration.weeks,i=uD({day:e.format?.day||(r?`numeric`:void 0),month:e.format?.month||`long`,year:e.format?.year||`numeric`,era:e.format?.era||n&&n.calendar.identifier===`gregory`&&n.era===`BC`?`short`:void 0,calendar:t.visibleRange?.start.calendar.identifier,timeZone:t.timeZone});return(0,v.useMemo)(()=>{if(r)return i.formatRange(n.toDate(t.timeZone),t.visibleRange.end.toDate(t.timeZone));let e=n.calendar.getFormattableMonth?n.calendar.getFormattableMonth(n):n;return i.format(e.toDate(t.timeZone))},[i,r,n,t.timeZone,t.visibleRange.end])}function Pie(e,t,n){let{commitBehavior:r=`select`,...i}=e,a=jie(i,t),o=(0,v.useRef)(!1),s=(0,v.useRef)(typeof window<`u`?window:null);_c(s,`pointerdown`,e=>{o.current=e.width===0&&e.height===0});let c={clear:()=>t.clearSelection(),reset:()=>t.setAnchorDate(null),select:()=>t.commitSelection()};return _c(s,`pointerup`,e=>{if(o.current){o.current=!1;return}if(t.setDragging(!1),!t.anchorDate)return;let i=e.target;n.current&&As(n.current)&&(!Ds(n.current,i)||!i.closest(`button, [role="button"]`))&&c[r]()}),a.calendarProps.onBlur=e=>{n.current&&(!e.relatedTarget||!Ds(n.current,e.relatedTarget))&&t.anchorDate&&c[r]()},_c(n,`touchmove`,e=>{t.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),a}function ck(e,t,n){return t!=null&&e.compare(t)<0||n!=null&&e.compare(n)>0}function lk(e,t,n,r,i){let a={};for(let e in t)a[e]=Math.floor(t[e]/2),a[e]>0&&t[e]%2==0&&a[e]--;return fk(e,uk(e,t,n).subtract(a),t,n,r,i)}function uk(e,t,n,r,i){let a=e;return t.years?a=Nw(e):t.months?a=jw(e):(t.weeks||t.days&&t.days>7)&&(a=Pw(e,n)),fk(e,a,t,n,r,i)}function dk(e,t,n,r,i){let a={...t};return a.days?a.days--:a.weeks?a.weeks--:a.months?a.months--:a.years&&a.years--,fk(e,uk(e,t,n).subtract(a),t,n,r,i)}function fk(e,t,n,r,i,a){if(i&&e.compare(i)>=0){let e=Rw(t,uk(Jw(i),n,r));e&&(t=e)}if(a&&e.compare(a)<=0){let e=Lw(t,dk(Jw(a),n,r));e&&(t=e)}return t}function pk(e,t,n){if(t){let n=Rw(e,Jw(t));n&&(e=n)}if(n){let t=Lw(e,Jw(n));t&&(e=t)}return e}function mk(e,t,n){if(!n)return e;for(;e.compare(t)>=0&&n(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}function Fie(e,t){return e===t||e.days===t.days&&e.weeks===t.weeks&&e.months===t.months&&e.years===t.years}function Iie(e){let t=(0,v.useMemo)(()=>new yE(e.locale),[e.locale]),n=(0,v.useMemo)(()=>t.resolvedOptions(),[t]),{locale:r,createCalendar:i,visibleDuration:a={months:1},minValue:o,maxValue:s,selectionAlignment:c,isDateUnavailable:l,pageBehavior:u=`visible`,selectionMode:d=`single`,firstDayOfWeek:f,weeksInMonth:p}=e,m=(0,v.useMemo)(()=>i(n.calendar),[i,n.calendar]),[h,g]=eh(e.value,e.defaultValue??null,e.onChange),_=(0,v.useMemo)(()=>Array.isArray(h)?h.map(e=>Zw(Jw(e),m)):h?Zw(Jw(h),m):null,[h,m]),y=(0,v.useMemo)(()=>{let e=Array.isArray(h)?h[0]:h;return e&&`timeZone`in e?e.timeZone:n.timeZone},[h,n.timeZone]),[b,x]=eh((0,v.useMemo)(()=>e.focusedValue?pk(Zw(Jw(e.focusedValue),m),o,s):void 0,[e.focusedValue,m,o,s]),(0,v.useMemo)(()=>e.defaultFocusedValue?pk(Zw(Jw(e.defaultFocusedValue),m),o,s):pk(_?Array.isArray(_)?_[0]:_:Zw(ww(y),m),o,s),[e.defaultFocusedValue,_,y,m,o,s]),e.onFocusChange),S=()=>{switch(c){case`start`:return uk(b,a,r,o,s);case`end`:return dk(b,a,r,o,s);default:return lk(b,a,r,o,s)}},[C,w]=(0,v.useState)(S),[T,E]=(0,v.useState)(e.autoFocus||!1),[D,O]=(0,v.useState)(a);Fie(a,D)||(O(a),w(S()));let k=(0,v.useMemo)(()=>{let e={...a};return e.days?e.days--:e.days=-1,C.add(e)},[C,a]),[A,j]=(0,v.useState)(m);if(!bw(m,A)){let e=Zw(b,m);w(lk(e,a,r,o,s)),x(e),j(m)}ck(b,o,s)?x(pk(b,o,s)):b.compare(C)<0?w(dk(b,a,r,o,s)):b.compare(k)>0&&w(uk(b,a,r,o,s));function M(e){e=pk(e,o,s),x(e)}function N(e){let t=mk(pk(e,o,s),C,l);if(!t)return null;let n=Array.isArray(h)?h[0]:h,r=Zw(t,n?.calendar||new vw);return n&&`hour`in n?n.set(r):r}function P(t){if(!e.isDisabled&&!e.isReadOnly){if(t===null){g(d===`multiple`?[]:null);return}if(Array.isArray(t))g(t.map(N).filter(Boolean));else{let e=N(t);e&&g(e)}}}let F=(0,v.useMemo)(()=>_?Array.isArray(_)?_.some(e=>l?.(e)||ck(e,o,s)):l?.(_)||ck(_,o,s):!1,[_,l,o,s]),I=e.isInvalid||e.validationState===`invalid`||F,L=I?`invalid`:null,R=(0,v.useMemo)(()=>u===`visible`?a:hk(a),[u,a]);return{isDisabled:e.isDisabled??!1,isReadOnly:e.isReadOnly??!1,value:_,setValue:P,selectionMode:d,visibleDuration:a,visibleRange:{start:C,end:k},minValue:o,maxValue:s,focusedDate:b,timeZone:y,validationState:L,isValueInvalid:I,setFocusedDate(e){M(e)},focusNextDay(){M(b.add({days:1}))},focusPreviousDay(){M(b.subtract({days:1}))},focusNextRow(){a.days?this.focusNextPage():(a.weeks||a.months||a.years)&&M(b.add({weeks:1}))},focusPreviousRow(){a.days?this.focusPreviousPage():(a.weeks||a.months||a.years)&&M(b.subtract({weeks:1}))},focusNextPage(){let e=C.add(R);x(pk(b.add(R),o,s)),w(uk(fk(b,e,R,r,o,s),R,r))},focusPreviousPage(){let e=C.subtract(R);x(pk(b.subtract(R),o,s)),w(uk(fk(b,e,R,r,o,s),R,r))},focusSectionStart(){a.days?M(C):a.weeks?M(Pw(b,r)):(a.months||a.years)&&M(jw(b))},focusSectionEnd(){a.days?M(k):a.weeks?M(ure(b,r)):(a.months||a.years)&&M(Mw(b))},focusNextSection(e){if(!e&&!a.days){M(b.add(hk(a)));return}a.days?this.focusNextPage():a.weeks?M(b.add({months:1})):(a.months||a.years)&&M(b.add({years:1}))},focusPreviousSection(e){if(!e&&!a.days){M(b.subtract(hk(a)));return}a.days?this.focusPreviousPage():a.weeks?M(b.subtract({months:1})):(a.months||a.years)&&M(b.subtract({years:1}))},selectFocusedDate(){l&&l(b)||this.selectDate(b)},selectDate(t){if(!(e.isDisabled||e.isReadOnly)){if(d===`multiple`&&t!=null){let e=N(t);if(!e)return;let n=[];Array.isArray(h)?n=h:h!=null&&(n=[h]);let r=n.findIndex(t=>yw(t,e)),i=r>=0?n.slice(0,r).concat(n.slice(r+1)):[...n,e];g(i)}else P(t)}},isFocused:T,setFocused:E,isInvalid(e){return ck(e,o,s)},isSelected(e){return!_||this.isCellDisabled(e)||this.isCellUnavailable(e)?!1:Array.isArray(_)?_.some(t=>yw(t,e)):yw(e,_)},isCellFocused(e){return T&&b&&yw(e,b)},isCellDisabled(t){return e.isDisabled||t.compare(C)<0||t.compare(k)>0||this.isInvalid(t)},isCellUnavailable(t){return e.isDateUnavailable?e.isDateUnavailable(t):!1},isPreviousVisibleRangeInvalid(){let e=C.subtract({days:1});return yw(e,C)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=k.add({days:1});return yw(e,k)||this.isInvalid(e)},getDatesInWeek(e,t=C){let n=t.add({weeks:e}),i=[],o=a.days&&a.days<7?a.days:7;if(o===7){n=Pw(n,r,f);let e=Sw(n,r,f);for(let t=0;t0&&(m=`start`)}let h=(0,v.useMemo)(()=>{let t=e.isDateUnavailable;if(t)return e=>t(e,f)},[e.isDateUnavailable,f]),g=(0,v.useCallback)(t=>t&&h&&!e.allowsNonContiguousRanges?{start:vk(t,h,o,-1),end:vk(t,h,o,1)}:null,[h,o,e.allowsNonContiguousRanges]),_=(0,v.useMemo)(()=>g(f),[g,f]),y=(0,v.useMemo)(()=>Rw(s,_?.start),[s,_]),b=(0,v.useMemo)(()=>Lw(c,_?.end),[c,_]),x=Iie({...l,value:u&&u.start,createCalendar:i,locale:a,visibleDuration:o,minValue:y,maxValue:b,selectionAlignment:e.selectionAlignment||m,isDateUnavailable:h}),S=f?gk(f,x.focusedDate):u&&gk(u.start,u.end),C=t=>{if(e.isReadOnly)return;let n=mk(pk(t,y,b),x.visibleRange.start,h);if(n){if(!f)p(n);else{let e=gk(f,n);e&&d({start:_k(e.start,u?.start),end:_k(e.end,u?.end)}),p(null)}}},[w,T]=(0,v.useState)(!1),E=(0,v.useMemo)(()=>!u||f?!1:h&&(h(u.start)||h(u.end))?!0:ck(u.start,s,c)||ck(u.end,s,c),[h,u,f,s,c]),D=e.isInvalid||e.validationState===`invalid`||E,O=D?`invalid`:null;return{...x,value:u,setValue:d,anchorDate:f,setAnchorDate:p,highlightedRange:S,validationState:O,isValueInvalid:D,selectFocusedDate(){x.isCellUnavailable(x.focusedDate)||C(x.focusedDate)},commitSelection(){C(x.focusedDate)},selectDate:C,highlightDate(e){f&&x.setFocusedDate(e)},isSelected(e){return!!(S&&e.compare(S.start)>=0&&e.compare(S.end)<=0&&!x.isCellDisabled(e)&&!x.isCellUnavailable(e))},isInvalid(e){return x.isInvalid(e)||ck(e,_?.start,_?.end)},isDragging:w,setDragging:T,clearSelection(){p(null),d(null)},focusNearestAvailableDate(e){let t=g(e),n=e=>this.isInvalid(e)||ck(e,t?.start,t?.end),r=e.add({days:1});n(r)&&(r=e.subtract({days:1})),n(r)||(this.setFocusedDate(r),this.setFocused(!0))}}}function gk(e,t){return!e||!t?null:(t.compare(e)<0&&([e,t]=[t,e]),{start:Jw(e),end:Jw(t)})}function _k(e,t){return e=Zw(e,t?.calendar||new vw),t&&`hour`in t?t.set(e):e}function vk(e,t,n,r){let i=e.add({days:r}),a=e.subtract(n),o=e.add(n);for(;(r<0?i.compare(a)>=0:i.compare(o)<=0)&&!t(i);)i=i.add({days:r});if(t(i))return i.add({days:-r})}var yk=(0,v.createContext)(null),bk=(0,v.createContext)(null),xk=(0,v.createContext)(null),Sk=(0,v.createContext)(null),Rie=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,bk);let{locale:n}=bp(),r=Lie({...e,locale:n,createCalendar:e.createCalendar||_E}),{calendarProps:i,prevButtonProps:a,nextButtonProps:o,errorMessageProps:s,title:c}=Pie(e,r,t),l=Jf({...e,values:{state:r,isDisabled:e.isDisabled||!1,isInvalid:r.isValueInvalid},defaultClassName:`react-aria-RangeCalendar`}),u=Us(e,{global:!0});return v.createElement(np.div,{...W(l,u,i),ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":r.isValueInvalid||void 0},v.createElement(qf,{values:[[Qm,{slots:{previous:a,next:o}}],[ih,{"aria-hidden":!0,level:2,children:c}],[Sk,r],[bk,e],[Hv,{slots:{errorMessage:s}}]]},v.createElement(u_,null,v.createElement(`h2`,null,i[`aria-label`])),l.children,v.createElement(u_,null,v.createElement(`button`,{"aria-label":o[`aria-label`],disabled:o.isDisabled,onClick:()=>r.focusNextPage(),tabIndex:-1}))))}),Ck=(0,v.createContext)(null),zie=(0,v.forwardRef)(function(e,t){let n=(0,v.useContext)(xk),r=(0,v.useContext)(Sk),i=Xf(yk),a=Xf(bk),o=n??r,s=o.visibleRange.start;e.offset&&(s=s.add(e.offset));let c=i?.firstDayOfWeek??a?.firstDayOfWeek,{gridProps:l,headerProps:u,weekDays:d,weeksInMonth:f}=ak({startDate:s,endDate:Mw(s),weekdayStyle:e.weekdayStyle,firstDayOfWeek:c},o),p=Us(e,{global:!0});return v.createElement(Ck.Provider,{value:{headerProps:u,weekDays:d,startDate:s,weeksInMonth:f}},v.createElement(np.table,{render:e.render,...W(p,l),ref:t,style:e.style,cellPadding:0,className:e.className??`react-aria-CalendarGrid`},typeof e.children==`function`?v.createElement(v.Fragment,null,v.createElement(wk,null,e=>v.createElement(Tk,null,e)),v.createElement(Ek,null,e.children)):e.children))});function Bie(e,t){let{children:n,style:r,className:i}=e,{headerProps:a,weekDays:o}=(0,v.useContext)(Ck),s=Us(e,{global:!0});return v.createElement(np.thead,{render:e.render,...W(s,a),ref:t,style:r,className:i??`react-aria-CalendarGridHeader`},v.createElement(`tr`,null,o.map((e,t)=>v.cloneElement(n(e),{key:t}))))}var wk=(0,v.forwardRef)(Bie);function Vie(e,t){let{children:n,style:r,className:i}=e,a=Us(e,{global:!0});return v.createElement(np.th,{render:e.render,...a,ref:t,style:r,className:i||`react-aria-CalendarHeaderCell`},n)}var Tk=(0,v.forwardRef)(Vie);function Hie(e,t){let{children:n,style:r,className:i}=e,a=(0,v.useContext)(xk),o=(0,v.useContext)(Sk),s=a??o,{startDate:c,weeksInMonth:l}=(0,v.useContext)(Ck),u=Us(e,{global:!0});return v.createElement(np.tbody,{render:e.render,...u,ref:t,style:r,className:i??`react-aria-CalendarGridBody`},[...Array(l).keys()].map(e=>v.createElement(`tr`,{key:e},s.getDatesInWeek(e,c).map((e,t)=>e?v.cloneElement(n(e),{key:t}):v.createElement(`td`,{key:t})))))}var Ek=(0,v.forwardRef)(Hie),Uie=(0,v.forwardRef)(function({date:e,...t},n){let r=(0,v.useContext)(xk),i=(0,v.useContext)(Sk),a=r??i,{startDate:o}=(0,v.useContext)(Ck)??{startDate:a.visibleRange.start},s=a.visibleDuration.days||a.visibleDuration.weeks?!1:!are(o,e),c=xw(e,a.timeZone),l=(0,v.useRef)(null),{cellProps:u,buttonProps:d,...f}=Mie({date:e,isOutsideMonth:s},a,l),{hoverProps:p,isHovered:m}=Zm({...t,isDisabled:f.isDisabled||f.isUnavailable}),{focusProps:h,isFocusVisible:g}=Gm();g&&=f.isFocused;let _=!1,y=!1;`highlightedRange`in a&&a.highlightedRange&&(_=yw(e,a.highlightedRange.start),y=yw(e,a.highlightedRange.end));let b=Jf({...t,defaultChildren:f.formattedDate,defaultClassName:`react-aria-CalendarCell`,values:{date:e,isHovered:m,isOutsideMonth:s,isFocusVisible:g,isSelectionStart:_,isSelectionEnd:y,isToday:c,...f}}),x={"data-focused":f.isFocused||void 0,"data-hovered":m||void 0,"data-pressed":f.isPressed||void 0,"data-unavailable":f.isUnavailable||void 0,"data-disabled":f.isDisabled||void 0,"data-focus-visible":g||void 0,"data-outside-visible-range":f.isOutsideVisibleRange||void 0,"data-outside-month":s||void 0,"data-selected":f.isSelected||void 0,"data-selection-start":_||void 0,"data-selection-end":y||void 0,"data-invalid":f.isInvalid||void 0,"data-today":c||void 0},S=Us(t,{global:!0});return v.createElement(`td`,{...u,ref:n},v.createElement(np.div,{...W(S,d,h,p,x,b),ref:l}))}),Wie=(0,v.forwardRef)(function(e,t){let{offset:n,format:r,className:i=`react-aria-CalendarHeading`,...a}=e,o=v.useContext(xk),s=v.useContext(Sk),c=sk({offset:n,format:r},o||s);return v.createElement(ah,{...a,className:i,ref:t},c)});function Gie(e){return e&&e.__esModule?e.default:e}function Kie(e,t,n){let r=s_(Gie(rD),`@react-aria/datepicker`),{isInvalid:i,validationErrors:a,validationDetails:o}=t.displayValidation,{labelProps:s,fieldProps:c,descriptionProps:l,errorMessageProps:u}=$x({...e,labelElementType:`span`,isInvalid:i,errorMessage:e.errorMessage||a}),d=c[`aria-labelledby`]||c.id,{locale:f}=bp(),p=t.formatValue(f,{month:`long`}),m=gc(p?r.format(`selectedRangeDescription`,{startDate:p.start,endDate:p.end}):``),h={"aria-label":r.format(`startDate`),"aria-labelledby":d},g={"aria-label":r.format(`endDate`),"aria-labelledby":d},_=ms(),y=ms(),b=iD(t,n),x=[m[`aria-describedby`],c[`aria-describedby`]].filter(Boolean).join(` `)||void 0,S=(0,v.useMemo)(()=>ig(n,{accept:e=>e.id!==_}),[n,_]),C={[cD]:S,[sD]:`presentation`,"aria-describedby":x,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},w=Us(e),T=(0,v.useRef)(!1),{focusWithinProps:E}=Wm({...e,isDisabled:t.isOpen,onBlurWithin:t=>{Ds(document.getElementById(y),t.relatedTarget)||(T.current=!1,e.onBlur?.(t),e.onFocusChange?.(!1))},onFocusWithin:t=>{T.current||(T.current=!0,e.onFocus?.(t),e.onFocusChange?.(!0))}}),D=(0,v.useRef)(Zb),O=(0,v.useRef)(Zb);return{groupProps:W(w,b,c,m,E,{role:`group`,"aria-disabled":e.isDisabled||null,"aria-describedby":x,onKeyDown(n){t.isOpen||e.onKeyDown&&e.onKeyDown(n)},onKeyUp(n){t.isOpen||e.onKeyUp&&e.onKeyUp(n)}}),labelProps:{...s,onClick:()=>{S.focusFirst()}},buttonProps:{...m,id:_,"aria-haspopup":`dialog`,"aria-label":r.format(`calendar`),"aria-labelledby":`${_} ${d}`,"aria-describedby":x,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:y,"aria-labelledby":`${_} ${d}`},startFieldProps:{...h,...C,value:t.value?.start??null,defaultValue:t.defaultValue?.start,onChange:e=>t.setDateTime(`start`,e),autoFocus:e.autoFocus,name:e.startName,form:e.form,[$b]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){D.current=e,t.updateValidation(ix(e,O.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...g,...C,value:t.value?.end??null,defaultValue:t.defaultValue?.end,onChange:e=>t.setDateTime(`end`,e),name:e.endName,form:e.form,[$b]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){O.current=e,t.updateValidation(ix(D.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:l,errorMessageProps:u,calendarProps:{autoFocus:!0,value:t.dateRange?.start&&t.dateRange.end?t.dateRange:null,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:typeof e.errorMessage==`function`?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(` `),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:i,validationErrors:a,validationDetails:o}}function qie(e){let t=__(e),[n,r]=eh(e.value,e.defaultValue||null,e.onChange),[i]=(0,v.useState)(n),[a,o]=(0,v.useState)(()=>n||{start:null,end:null});n==null&&a.start&&a.end&&(a={start:null,end:null},o(a));let s=n||a,c=e=>{s=e||{start:null,end:null},o(s),Dk(s)?r(s):r(null)},[l,u]=QD(s?.start||s?.end||e.placeholderValue||null,e.granularity),d=l===`hour`||l===`minute`||l===`second`,f=e.shouldCloseOnSelect??!0,[p,m]=(0,v.useState)(null),[h,g]=(0,v.useState)(null);s&&Dk(s)&&(p=s,`hour`in s.start&&(h=s));let _=(e,t)=>{c({start:`timeZone`in t.start?t.start.set(Jw(e.start)):Yw(e.start,t.start),end:`timeZone`in t.end?t.end.set(Jw(e.end)):Yw(e.end,t.end)}),m(null),g(null),D.commitValidation()},y=n=>{let r=typeof f==`function`?f():f;d?Dk(n)&&(r||h?.start&&h?.end)?_(n,{start:h?.start||XD(e.placeholderValue),end:h?.end||XD(e.placeholderValue)}):m(n):Dk(n)?(c(n),D.commitValidation()):m(n),r&&t.setOpen(!1)},b=e=>{Dk(p)&&Dk(e)?_(p,e):g(e)},x=s?.start?.calendar.identifier===`gregory`&&s.start.era===`BC`||s?.end?.calendar.identifier===`gregory`&&s.end.era===`BC`,S=(0,v.useMemo)(()=>({granularity:l,timeZone:u,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:x}),[l,e.hourCycle,e.shouldForceLeadingZeros,u,e.hideTimeZone,x]),{minValue:C,maxValue:w,isDateUnavailable:T}=e,E=(0,v.useMemo)(()=>pie(s,C,w,T?e=>T(e,null):void 0,S),[s,C,w,T,S]),D=ex({...e,value:n,name:(0,v.useMemo)(()=>[e.startName,e.endName].filter(e=>e!=null),[e.startName,e.endName]),builtinValidation:E}),O=D.displayValidation.isInvalid,k=e.validationState||(O?`invalid`:null);return{...D,value:s,defaultValue:e.defaultValue??i,setValue:c,dateRange:p,timeRange:h,granularity:l,hasTime:d,setDate(e,t){y(e===`start`?{start:t,end:p?.end??null}:{start:p?.start??null,end:t})},setTime(e,t){b(e===`start`?{start:t,end:h?.end??null}:{start:h?.start??null,end:t})},setDateTime(e,t){c(e===`start`?{start:t,end:s?.end??null}:{start:s?.start??null,end:t})},setDateRange:y,setTimeRange:b,...t,setOpen(n){!n&&!(s?.start&&s?.end)&&Dk(p)&&d&&_(p,{start:h?.start||XD(e.placeholderValue),end:h?.end||XD(e.placeholderValue)}),t.setOpen(n)},validationState:k,isInvalid:O,formatValue(t,n){if(!s||!s.start||!s.end)return null;let r=`timeZone`in s.start?s.start.timeZone:void 0,i=e.granularity||(s.start&&`minute`in s.start?`minute`:`day`),a=`timeZone`in s.end?s.end.timeZone:void 0,o=e.granularity||(s.end&&`minute`in s.end?`minute`:`day`),c=YD(n,{granularity:i,timeZone:r,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:s.start.calendar.identifier===`gregory`&&s.start.era===`BC`||s.end.calendar.identifier===`gregory`&&s.end.era===`BC`}),l=s.start.toDate(r||`UTC`),u=s.end.toDate(a||`UTC`),d=new yE(t,c),f;if(r===a&&i===o&&s.start.compare(s.end)!==0){try{let e=d.formatRangeToParts(l,u),t=-1;for(let n=0;nt&&(r+=e[i].value);return{start:n,end:r}}catch{}f=d}else f=new yE(t,YD(n,{granularity:o,timeZone:a,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:d.format(l),end:f.format(u)}},getDateFormatter(e,t){return new yE(e,YD({},{...S,...t}))}}}function Dk(e){return e?.start!=null&&e.end!=null}var Jie=(0,v.createContext)(null),Yie=(0,v.createContext)(null),Xie=[Kb,Qm,sp,Hv],Zie=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,Jie);let{validationBehavior:n}=Xf(ax)||{},r=e.validationBehavior??n??`native`,i=qie({...e,validationBehavior:r}),a=(0,v.useRef)(null),[o,s]=Qf(!e[`aria-label`]&&!e[`aria-labelledby`]),{groupProps:c,labelProps:l,startFieldProps:u,endFieldProps:d,buttonProps:f,dialogProps:p,calendarProps:m,descriptionProps:h,errorMessageProps:g,..._}=Kie({...$f(e),label:s,validationBehavior:r},i,a),{focusProps:y,isFocused:b,isFocusVisible:x}=Gm({within:!0}),S=Jf({...e,values:{state:i,isFocusWithin:b,isFocusVisible:x,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1},defaultClassName:`react-aria-DateRangePicker`}),C=Us(e,{global:!0});return delete C.id,v.createElement(qf,{values:[[Yie,i],[Kb,{...c,ref:a,isInvalid:i.isInvalid}],[Qm,{...f,isPressed:i.isOpen}],[sp,{...l,ref:o,elementType:`span`}],[bk,m],[jb,i],[v_,{trigger:`DateRangePicker`,triggerRef:a,placement:`bottom start`,clearContexts:Xie}],[Ab,p],[oO,{slots:{start:u,end:d}}],[Hv,{slots:{description:h,errorMessage:g}}],[Jb,_]]},v.createElement(np.div,{...W(C,S,y),ref:t,slot:e.slot||void 0,"data-focus-within":b||void 0,"data-invalid":i.isInvalid||void 0,"data-focus-visible":x||void 0,"data-disabled":e.isDisabled||void 0,"data-readonly":e.isReadOnly||void 0,"data-required":e.isRequired||void 0,"data-open":i.isOpen||void 0}))}),Ok=(0,v.createContext)({triggerRef:{current:null}}),kk=({children:e,className:t,onOpenChange:n,...r})=>{let i=v.useMemo(()=>pf(),[]),a=(0,v.useRef)(null),[o,s]=v.useState(!1),c=(0,v.useRef)(!1);(0,v.useEffect)(()=>{if(!o)return;let e=e=>{!e.metaKey&&!e.ctrlKey&&!e.altKey&&(c.current=!0)};return window.addEventListener(`keydown`,e,!0),()=>{window.removeEventListener(`keydown`,e,!0)}},[o]);let l=e=>{s(e),!e&&c.current&&window.requestAnimationFrame(()=>{a.current?.focus()}),c.current=!1,n?.(e)};return(0,G.jsx)(Ok,{value:{slots:i,triggerRef:a},children:(0,G.jsx)(Zie,{"data-required":oh(r.isRequired),"data-slot":`date-range-picker`,...r,className:K(t,i?.base()),onOpenChange:l,children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})})};kk.displayName=`HeroUI.DateRangePicker`;var Ak=({children:e,className:t,ref:n,...r})=>{let{slots:i,triggerRef:a}=(0,v.use)(Ok),o=Ns(v.useCallback(e=>{a.current=e},[a]),n);return(0,G.jsx)($m,{ref:o,className:K(t,i?.trigger()),"data-slot":`date-range-picker-trigger`,...r,children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})};Ak.displayName=`HeroUI.DateRangePicker.Trigger`;var jk=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Ok);return(0,G.jsx)(Xc.span,{"aria-hidden":`true`,className:q(r?.triggerIndicator,t),"data-slot":`date-range-picker-trigger-indicator`,...n,children:e||(0,G.jsx)(Nee,{})})};jk.displayName=`HeroUI.DateRangePicker.TriggerIndicator`;var Mk=({children:e=` - `,className:t,...n})=>{let{slots:r}=(0,v.use)(Ok);return(0,G.jsx)(Xc.span,{"aria-hidden":`true`,className:q(r?.rangeSeparator,t),"data-slot":`date-range-picker-range-separator`,...n,children:e})};Mk.displayName=`HeroUI.DateRangePicker.RangeSeparator`;var Nk=({children:e,className:t,placement:n=`bottom`,...r})=>{let{slots:i}=(0,v.use)(Ok);return(0,G.jsx)(gh,{value:{variant:`default`},children:(0,G.jsx)(b_,{...r,className:K(t,i?.popover()),"data-slot":`date-range-picker-popover`,placement:n,children:e})})};Nk.displayName=`HeroUI.DateRangePicker.Popover`;var Pk=Object.assign(kk,{Root:kk,Trigger:Ak,TriggerIndicator:jk,RangeSeparator:Mk,Popover:Nk}),Qie=8,$ie=.3,eae=.5;function tae(e,t){let n=(0,v.use)(jb),r=(0,v.useRef)(null),i=(0,v.useRef)(!1),a=(0,v.useRef)(!1),o=(0,v.useRef)(0),s=(0,v.useRef)(0),c=(0,v.useRef)(0),l=(0,v.useRef)(0),u=(0,v.useRef)(0),d=e===`top`||e===`bottom`,f=(0,v.useCallback)(e=>d?e.clientY:e.clientX,[d]),p=(0,v.useCallback)(t=>{switch(e){case`bottom`:return Math.max(0,t);case`top`:return Math.min(0,t);case`right`:return Math.max(0,t);case`left`:return Math.min(0,t);default:return t}},[e]),m=(0,v.useCallback)(e=>{t&&e.button===0&&(e.target.closest(`input, textarea, button, [role='button'], select, a, [data-slot='drawer-body']`)||(i.current=!0,a.current=!1,o.current=f(e),u.current=o.current,l.current=Date.now(),s.current=0,c.current=0))},[f,t]),h=(0,v.useCallback)(e=>{if(!i.current||!r.current)return;let t=f(e),n=t-o.current,m=p(n);if(!a.current){if(Math.abs(n)0&&(c.current=(t-u.current)/g,l.current=h,u.current=t);let _=d?`Y`:`X`;r.current.style.transform=`translate${_}(${m}px)`},[f,p,d]),g=(0,v.useCallback)(e=>{if(!i.current)return;i.current=!1;let t=r.current;if(!t||!a.current){a.current=!1;return}a.current=!1;try{t.releasePointerCapture(e.pointerId)}catch{}let o=d?t.offsetHeight:t.offsetWidth,l=Math.abs(s.current),u=Math.abs(c.current);(l>o*$ie||u>eae)&&n?n.close():(t.style.transition=`transform 300ms cubic-bezier(0.32, 0.72, 0, 1)`,t.style.transform=``,t.addEventListener(`transitionend`,()=>{t.style.transition=``},{once:!0})),s.current=0,c.current=0},[d,n]);return{dialogRef:r,dragHandlers:t?{onPointerDown:m,onPointerMove:h,onPointerUp:g}:{}}}var Fk=(0,v.createContext)({}),Ik=({children:e,state:t,...n})=>{let r=(0,v.useMemo)(()=>({slots:gf(),placement:void 0,isDismissable:!0}),[]),i=(0,v.useMemo)(()=>t?{isOpen:t.isOpen,onOpenChange:t.setOpen}:{},[t]);return(0,G.jsx)(Fk,{value:r,children:(0,G.jsx)(Mb,{"data-slot":`drawer-root`,...W(n,i),children:e})})};Ik.displayName=`HeroUI.Drawer`;var Lk=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Fk);return(0,G.jsx)($m,{className:K(t,r?.trigger()),"data-slot":`drawer-trigger`,...n,children:e})};Lk.displayName=`HeroUI.Drawer.Trigger`;var Rk=({children:e,className:t,isDismissable:n=!0,variant:r,...i})=>{let{slots:a}=(0,v.use)(Fk),o=(0,v.useMemo)(()=>gf({variant:r}),[r]),s=(0,v.useMemo)(()=>({slots:{...a,...o},isDismissable:n}),[a,o,n]);return(0,G.jsx)(Rb,{className:K(t,o?.backdrop()),"data-slot":`drawer-backdrop`,isDismissable:n,...i,children:t=>(0,G.jsx)(Fk,{value:s,children:typeof e==`function`?e(t):e})})};Rk.displayName=`HeroUI.Drawer.Backdrop`;var zk=({children:e,className:t,placement:n=`bottom`,...r})=>{let{isDismissable:i,slots:a}=(0,v.use)(Fk),o=(0,v.useMemo)(()=>gf({placement:n}),[n]),s=(0,v.useMemo)(()=>({placement:n,isDismissable:i,slots:{...a,...o}}),[a,n,i,o]);return(0,G.jsx)(Lb,{className:K(t,o?.content()),"data-placement":n,"data-slot":`drawer-content`,...r,children:t=>(0,G.jsx)(Fk,{value:s,children:typeof e==`function`?e(t):e})})};zk.displayName=`HeroUI.Drawer.Content`;var Bk=({children:e,className:t,...n})=>{let{isDismissable:r=!0,placement:i,slots:a}=(0,v.use)(Fk),{dialogRef:o,dragHandlers:s}=tae(i,r);return(0,G.jsx)(gh,{value:{variant:`default`},children:(0,G.jsx)(Nb,{ref:o,className:q(a?.dialog,t),"data-placement":i,"data-slot":`drawer-dialog`,style:r?{touchAction:`none`}:void 0,...s,...n,children:e})})};Bk.displayName=`HeroUI.Drawer.Dialog`;var Vk=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Fk);return(0,G.jsx)(Xc.div,{className:q(r?.header,t),"data-slot":`drawer-header`,...n,children:e})};Vk.displayName=`HeroUI.Drawer.Header`;var Hk=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Fk);return(0,G.jsx)(Xc.div,{className:q(r?.body,t),"data-slot":`drawer-body`,style:{touchAction:`pan-y`},...n,children:e})};Hk.displayName=`HeroUI.Drawer.Body`;var Uk=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Fk);return(0,G.jsx)(Xc.div,{className:q(r?.footer,t),"data-slot":`drawer-footer`,...n,children:e})};Uk.displayName=`HeroUI.Drawer.Footer`;var Wk=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Fk);return(0,G.jsx)(ah,{className:q(r?.heading,t),"data-slot":`drawer-heading`,slot:`title`,...n,children:e})};Wk.displayName=`HeroUI.Drawer.Heading`;var Gk=({className:e,...t})=>{let{slots:n}=(0,v.use)(Fk);return(0,G.jsx)(Xc.div,{"aria-hidden":`true`,className:q(n?.handle,e),"data-slot":`drawer-handle`,...t,children:(0,G.jsx)(`div`,{"data-slot":`drawer-handle-bar`})})};Gk.displayName=`HeroUI.Drawer.Handle`;var Kk=({className:e,...t})=>{let{slots:n}=(0,v.use)(Fk);return(0,G.jsx)(Hb,{className:K(e,n?.closeTrigger()),"data-slot":`drawer-close-trigger`,slot:`close`,...t})};Kk.displayName=`HeroUI.Drawer.CloseTrigger`;var qk=Object.assign(Ik,{Root:Ik,Trigger:Lk,Backdrop:Rk,Content:zk,Dialog:Bk,Header:Vk,Heading:Wk,Body:Hk,Footer:Uk,Handle:Gk,CloseTrigger:Kk});function nae(e){let{progressBarProps:t,labelProps:n}=Vp(e);return{meterProps:{...t,role:`meter progressbar`},labelProps:n}}var rae=(0,v.createContext)(null),iae=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,rae);let{value:n=0,minValue:r=0,maxValue:i=100}=e;n=Uc(n,r,i);let a=i-r,[o,s]=Qf(!e[`aria-label`]&&!e[`aria-labelledby`]),{meterProps:c,labelProps:l}=nae({...e,label:s}),u=a===0?0:(n-r)/a*100,d=Jf({...e,defaultClassName:`react-aria-Meter`,values:{percentage:u,valueText:c[`aria-valuetext`]}}),f=Us(e,{global:!0});return v.createElement(np.div,{...W(f,d,c),ref:t,slot:e.slot||void 0},v.createElement(sp.Provider,{value:{...l,ref:o,elementType:`span`}},d.children))});function Jk({children:e,className:t,fullWidth:n,...r}){let i=v.useMemo(()=>Vf({fullWidth:n}),[n]);return(0,G.jsx)(Tie,{"data-required":oh(r.isRequired),"data-slot":`time-field`,...r,className:K(t,i),children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})}var Yk=Object.assign(Jk,{Root:Jk,Group:dO,Input:pO,InputContainer:hO,Segment:mO,Prefix:fO,Suffix:gO}),aae=e=>{let{containerRef:t,isEnabled:n,offset:r,onVisibilityChange:i,orientation:a,visibility:o}=e,s=(0,v.useRef)(null),c=(0,v.useRef)(null),l=(0,v.useCallback)(()=>{let e=t.current;if(!e)return;let n=a===`vertical`,o=n?e.scrollTop:Math.abs(e.scrollLeft),l=n?e.scrollHeight:e.scrollWidth,u=n?e.clientHeight:e.clientWidth,d=o>r,f=o+u+r{c.current=null,n?d&&f?(e.dataset.topBottomScroll=`true`,delete e.dataset.topScroll,delete e.dataset.bottomScroll,i?.(`both`)):(e.dataset.topScroll=String(d),e.dataset.bottomScroll=String(f),delete e.dataset.topBottomScroll,i&&i(d?`top`:f?`bottom`:`none`)):d&&f?(e.dataset.leftRightScroll=`true`,delete e.dataset.leftScroll,delete e.dataset.rightScroll,i?.(`both`)):(e.dataset.leftScroll=String(d),e.dataset.rightScroll=String(f),delete e.dataset.leftRightScroll,i&&i(d?`left`:f?`right`:`none`))}))},[t,a,r,i]);(0,v.useEffect)(()=>{let e=t.current;if(!e||!n||o!==`auto`)return;l(),e.addEventListener(`scroll`,l,{passive:!0});let r=new ResizeObserver(l);return r.observe(e),()=>{e.removeEventListener(`scroll`,l),r.disconnect(),c.current!==null&&(cancelAnimationFrame(c.current),c.current=null),s.current=null}},[t,o,n,l])},oae=globalThis?.document?v.useLayoutEffect:v.useEffect,Xk=({children:e,className:t,hideScrollBar:n=!1,isEnabled:r=!0,offset:i=0,onVisibilityChange:a,orientation:o=`vertical`,ref:s,size:c=40,variant:l=`fade`,visibility:u=`auto`,...d})=>{let f=(0,v.useRef)(null);aae({containerRef:f,isEnabled:r,offset:i,onVisibilityChange:a,orientation:o,visibility:u}),oae(()=>{let e=f.current;!e||u===`auto`||(delete e.dataset.topScroll,delete e.dataset.bottomScroll,delete e.dataset.topBottomScroll,delete e.dataset.leftScroll,delete e.dataset.rightScroll,delete e.dataset.leftRightScroll,u===`both`?e.dataset[o===`vertical`?`topBottomScroll`:`leftRightScroll`]=`true`:u!==`none`&&(e.dataset[`${u}Scroll`]=`true`))},[u,o]);let p=(0,v.useMemo)(()=>jf({hideScrollBar:n,orientation:o,variant:l}),[o,n,l]),m={"--scroll-shadow-size":`${c}px`,...d.style};return(0,G.jsx)(`div`,{ref:Ns(f,s),className:p.base({className:t}),"data-orientation":o,"data-scroll-shadow-size":c,"data-slot":`scroll-shadow`,style:m,...d,children:e})};Xk.displayName=`HeroUI.ScrollShadow`;var sae=Object.assign(Xk,{Root:Xk}),Zk=({className:e,orientation:t,variant:n,...r})=>{let i=Xf(Vv),a=t??i?.orientation??`horizontal`;return(0,G.jsx)(Fte,{"data-orientation":a,"data-slot":`separator`,orientation:a,className:Pf({orientation:a,variant:n,className:e}),...r})},cae=Object.assign(Zk,{Root:Zk}),Qk=new Map;function $k(e,t,n=!0){let r=cs();return v.useMemo(()=>{if(t!==void 0)return t;if(!r){if(n&&Qk.has(e))return Qk.get(e);try{let t=document.documentElement,r=getComputedStyle(t).getPropertyValue(e).trim()||void 0;return n&&Qk.set(e,r),r}catch{return}}},[e,t,r,n])}var eA=({animationType:e,className:t,...n})=>{let r=$k(`--skeleton-animation`,e),i=v.useMemo(()=>Ff({animationType:r}),[r]);return(0,G.jsx)(Xc.div,{className:i.base({className:t}),...n})},tA=Object.assign(eA,{Root:eA}),nA=(0,v.createContext)({}),rA=({children:e,className:t,fullWidth:n,isDetached:r=!1,isDisabled:i,orientation:a,size:o,...s})=>{let c=Xf(hS),l=a??c?.orientation??`horizontal`,u=v.useMemo(()=>Uf({fullWidth:n,isDetached:r,orientation:l}),[n,r,l]);return(0,G.jsx)(nA,{value:{slots:u,size:o,isDisabled:i},children:(0,G.jsx)(Ane,{className:K(t,u.base()),"data-slot":`toggle-button-group`,isDisabled:i,orientation:l,...s,children:e})})},lae=({className:e,...t})=>{let{slots:n}=(0,v.use)(nA);return(0,G.jsx)(Xc.span,{"aria-hidden":`true`,className:q(n?.separator,e),"data-slot":`toggle-button-group-separator`,...t})},iA=({children:e,className:t,isIconOnly:n,size:r,style:i,variant:a,...o})=>{let s=(0,v.use)(nA),c=Hf({isIconOnly:n,size:r??s?.size,variant:a});return(0,G.jsx)(Mne,{className:K(t,c),"data-slot":`toggle-button`,style:i,...o,children:t=>typeof e==`function`?e(t):e})},aA=Object.assign(iA,{Root:iA});function uae(e,t,n){let{labelProps:r,inputProps:i,isSelected:a,...o}=CS(e,t,n);return{labelProps:r,inputProps:{...i,role:`switch`,checked:a},isSelected:a,...o}}var dae=(0,v.createContext)(null),oA=(0,v.createContext)(null),sA=(0,v.createContext)(null),fae=(0,v.forwardRef)(function(e,t){let{inputRef:n=null,...r}=e;[e,t]=Zf(r,t,dae);let{validationBehavior:i}=Xf(ax)||{},a=e.validationBehavior??i??`native`,o=Zs(Ns(n,e.inputRef===void 0?null:e.inputRef)),s=_S(e),c=uae({...$f(e),children:typeof e.children==`function`||e.children,validationBehavior:a},s,o),{descriptionProps:l,errorMessageProps:u,isSelected:d,isDisabled:f,isReadOnly:p,isInvalid:m,validationDetails:h,validationErrors:g}=c,_=Jf({...e,defaultClassName:`react-aria-SwitchField`,values:{isSelected:d,isDisabled:f,isReadOnly:p,isInvalid:m,isRequired:e.isRequired||!1,state:s}}),y=Us(e,{global:!0});return delete y.id,delete y.onClick,v.createElement(np.div,{...W(y,_),ref:t,slot:e.slot||void 0,"data-selected":d||void 0,"data-disabled":f||void 0,"data-readonly":p||void 0,"data-invalid":m||void 0,"data-required":e.isRequired||void 0},v.createElement(qf,{values:[[oA,s],[sA,{...c,inputRef:o,defaultClassName:`react-aria-SwitchButton`,isRequired:e.isRequired}],[Hv,{slots:{description:l,errorMessage:u}}],[Jb,{isInvalid:m,validationDetails:h,validationErrors:g}]]},_.children))}),pae=(0,v.forwardRef)(function(e,t){let{labelProps:n,inputProps:r,isSelected:i,isDisabled:a,isReadOnly:o,isPressed:s,isInvalid:c,inputRef:l,defaultClassName:u,isRequired:d}=(0,v.useContext)(sA),{isFocused:f,isFocusVisible:p,focusProps:m}=Gm(),h=a||o,g=(0,v.useContext)(oA),{hoverProps:_,isHovered:y}=Zm({...e,isDisabled:h}),b=Jf({...e,defaultClassName:u,values:{isSelected:i,isPressed:s,isHovered:y,isFocused:f,isFocusVisible:p,isDisabled:a,isReadOnly:o,isInvalid:c,isRequired:d||!1,state:g}}),x=Us(e,{global:!0});return delete x.id,delete x.onClick,v.createElement(np.label,{...W(x,n,_,b),ref:t,slot:e.slot||void 0,"data-selected":i||void 0,"data-pressed":s||void 0,"data-hovered":y||void 0,"data-focused":f||void 0,"data-focus-visible":p||void 0,"data-disabled":a||void 0,"data-readonly":o||void 0,"data-invalid":c||void 0,"data-required":d||void 0},v.createElement(u_,{elementType:`span`},v.createElement(`input`,{...W(r,m),ref:l})),b.children)}),cA=(0,v.createContext)({}),lA=({children:e,className:t,size:n,...r})=>{let i=v.useMemo(()=>If({size:n}),[n]);return(0,G.jsx)(fae,{"data-slot":`switch`,...r,className:K(t,i.base()),children:t=>(0,G.jsx)(cA,{value:{slots:i,state:t},children:typeof e==`function`?e(t):e})})};lA.displayName=`HeroUI.Switch`;var uA=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(cA);return(0,G.jsx)(pae,{"data-slot":`switch-content`,...n,className:K(t,r?.content()),children:e})};uA.displayName=`HeroUI.Switch.Content`;var dA=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(cA);return(0,G.jsx)(Xc.span,{className:q(r?.control,t),"data-slot":`switch-control`,...n,children:e})};dA.displayName=`HeroUI.Switch.Control`;var fA=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(cA);return(0,G.jsx)(Xc.span,{className:q(r?.thumb,t),"data-slot":`switch-thumb`,...n,children:e})};fA.displayName=`HeroUI.Switch.Thumb`;var pA=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(cA);return(0,G.jsx)(Xc.span,{className:q(r?.icon,t),"data-slot":`switch-icon`,...n,children:e})};pA.displayName=`HeroUI.Switch.Icon`;var mA=Object.assign(lA,{Root:lA,Content:uA,Control:dA,Thumb:fA,Icon:pA}),hA=new WeakMap;function gA(e,t,n){return e?(typeof t==`string`&&(t=t.replace(/\s+/g,``)),`${hA.get(e)}-${n}-${t}`):``}function mae(e,t,n){let{key:r,isDisabled:i,shouldSelectOnPressUp:a}=e,{selectionManager:o,selectedKey:s}=t,c=r===s,l=i||t.isDisabled||t.selectionManager.isDisabled(r),u=t.collection.getItem(r),{itemProps:d,isPressed:f}=zy({selectionManager:o,key:r,ref:n,isDisabled:l,shouldSelectOnPressUp:a??u?.props.href!=null,linkBehavior:`selection`}),p=gA(t,r,`tab`),m=gA(t,r,`tabpanel`),{tabIndex:h}=d,g=Us(u?.props,{labelable:!0});delete g.id;let _=Jo(u?.props),{focusableProps:v}=wm({...u?.props,isDisabled:l},n);return{tabProps:W(g,v,_,d,{id:p,"aria-selected":c,"aria-disabled":l||void 0,"aria-controls":c?m:void 0,tabIndex:l?void 0:h,role:`tab`}),isSelected:c,isDisabled:l,isPressed:f}}function _A(e,t){let n=t?.isDisabled,[r,i]=(0,v.useState)(!1);return Xo(()=>{if(e?.current&&!n){let t=()=>{if(e.current){let t=rg(e.current,{tabbable:!0});i(!!t.nextNode())}};t();let n=new MutationObserver(t);return n.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`tabIndex`,`disabled`]}),()=>{n.disconnect()}}}),!n&&r}function hae(e,t,n){let r=_A(n)?void 0:0,i=gA(t,e.id??t?.selectedKey,`tabpanel`);return{tabPanelProps:W(Xs({...e,id:i,"aria-labelledby":gA(t,t?.selectedKey,`tab`)}),{tabIndex:r,role:`tabpanel`,"aria-describedby":e[`aria-describedby`],"aria-details":e[`aria-details`]})}}var gae=class{constructor(e,t,n,r=new Set){this.collection=e,this.flipDirection=t===`rtl`&&n===`horizontal`,this.disabledKeys=r,this.tabDirection=n===`horizontal`}getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){return this.disabledKeys.has(e)||!!this.collection.getItem(e)?.props?.isDisabled}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){let t=e;do t=this.collection.getKeyAfter(t),t??=this.collection.getFirstKey();while(t!=null&&this.isDisabled(t)&&t!==e);return t}getPreviousKey(e){let t=e;do t=this.collection.getKeyBefore(t),t??=this.collection.getLastKey();while(t!=null&&this.isDisabled(t)&&t!==e);return t}};function _ae(e,t,n){let{orientation:r=`horizontal`,keyboardActivation:i=`automatic`}=e,{collection:a,selectionManager:o,disabledKeys:s}=t,{direction:c}=bp(),{collectionProps:l}=Ny({ref:n,selectionManager:o,keyboardDelegate:(0,v.useMemo)(()=>new gae(a,c,r,s),[a,s,r,c]),selectOnFocus:i===`automatic`,disallowEmptySelection:!0,scrollRef:n,linkBehavior:`selection`}),u=ms();return hA.set(t,u),{tabListProps:{...W(l,Xs({...e,id:u})),role:`tablist`,"aria-orientation":r,tabIndex:void 0}}}function vae(e){let[t,n]=eh(e.selectedKey,e.defaultSelectedKey??null,e.onSelectionChange),r=(0,v.useMemo)(()=>t==null?[]:[t],[t]),{collection:i,disabledKeys:a,selectionManager:o}=qx({...e,selectionMode:`single`,disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:r,onSelectionChange:r=>{if(r===`all`)return;let i=r.values().next().value??null;i===t&&e.onSelectionChange&&e.onSelectionChange(i),n(i)}});return{collection:i,disabledKeys:a,selectionManager:o,selectedKey:t,setSelectedKey:n,selectedItem:t==null?null:i.getItem(t)}}function yae(e){let t=vae({...e,onSelectionChange:e.onSelectionChange?t=>{t!=null&&e.onSelectionChange?.(t)}:void 0,suppressTextValueWarning:!0,defaultSelectedKey:e.defaultSelectedKey??vA(e.collection,e.disabledKeys?new Set(e.disabledKeys):new Set)??void 0}),{selectionManager:n,collection:r,selectedKey:i}=t,a=(0,v.useRef)(i);return(0,v.useEffect)(()=>{let o=i;e.selectedKey==null&&(n.isEmpty||o==null||!r.getItem(o))&&(o=vA(r,t.disabledKeys),o!=null&&n.setSelectedKeys([o])),(o!=null&&n.focusedKey==null||!n.isFocused&&o!==a.current)&&n.setFocusedKey(o),a.current=o}),{...t,isDisabled:e.isDisabled||!1}}function vA(e,t){let n=null;if(e){for(n=e.getFirstKey();n!=null&&(t.has(n)||e.getItem(n)?.props?.isDisabled)&&n!==e.getLastKey();)n=e.getKeyAfter(n);n!=null&&(t.has(n)||e.getItem(n)?.props?.isDisabled)&&n===e.getLastKey()&&(n=e.getFirstKey())}return n}var yA=(0,v.createContext)(null),bA=(0,v.createContext)(null),bae=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,yA);let{children:n,orientation:r=`horizontal`}=e;return n=(0,v.useMemo)(()=>typeof n==`function`?n({orientation:r,defaultChildren:null}):n,[n,r]),v.createElement(L_,{content:n},n=>v.createElement(xae,{props:e,collection:n,tabsRef:t}))});function xae({props:e,tabsRef:t,collection:n}){let{orientation:r=`horizontal`}=e,i=yae({...e,collection:n,children:void 0}),{focusProps:a,isFocused:o,isFocusVisible:s}=Gm({within:!0}),c=(0,v.useMemo)(()=>({orientation:r,isFocusWithin:o,isFocusVisible:s}),[r,o,s]),l=Jf({...e,defaultClassName:`react-aria-Tabs`,values:c}),u=Us(e,{global:!0});return v.createElement(np.div,{...W(u,l,a),ref:t,slot:e.slot||void 0,"data-focused":o||void 0,"data-orientation":r,"data-focus-visible":s||void 0,"data-disabled":i.isDisabled||void 0},v.createElement(qf,{values:[[yA,e],[bA,i]]},l.children))}var xA=(0,v.forwardRef)(function(e,t){return(0,v.useContext)(bA)?v.createElement(Sae,{props:e,forwardedRef:t}):v.createElement(W_,e)});function Sae({props:e,forwardedRef:t}){let n=(0,v.useContext)(bA),{CollectionRoot:r}=(0,v.useContext)(J_),{orientation:i=`horizontal`,keyboardActivation:a=`automatic`}=Xf(yA),o=Zs(t),{tabListProps:s}=_ae({...e,orientation:i,keyboardActivation:a},n,o),c=Jf({...e,children:null,defaultClassName:`react-aria-TabList`,values:{orientation:i,state:n}}),l=Us(e,{global:!0});return delete l.id,v.createElement(np.div,{...W(l,c,s),ref:o,"data-orientation":i||void 0},v.createElement(zv,null,v.createElement(r,{collection:n.collection,persistedKeys:Y_(n.selectionManager.focusedKey)})))}var Cae=B_(class extends x_{static{this.type=`item`}},(e,t,n)=>{let r=(0,v.useContext)(bA),i=Zs(t),{tabProps:a,isSelected:o,isDisabled:s,isPressed:c}=mae({key:n.key,...e},r,i),{focusProps:l,isFocused:u,isFocusVisible:d}=Gm(),{hoverProps:f,isHovered:p}=Zm({isDisabled:s,onHoverStart:e.onHoverStart,onHoverEnd:e.onHoverEnd,onHoverChange:e.onHoverChange}),m=Jf({...e,id:void 0,children:n.rendered,defaultClassName:`react-aria-Tab`,values:{isSelected:o,isDisabled:s,isFocused:u,isFocusVisible:d,isPressed:c,isHovered:p}}),h=n.props.href?np.a:np.div,g=Us(e,{global:!0});return delete g.id,delete g.onClick,v.createElement(h,{...W(g,m,a,l,f),ref:i,"data-selected":o||void 0,"data-disabled":s||void 0,"data-focused":u||void 0,"data-focus-visible":d||void 0,"data-pressed":c||void 0,"data-hovered":p||void 0},v.createElement(Bv.Provider,{value:{isSelected:o}},m.children))}),wae=ap(function(e,t){let n=(0,v.useContext)(bA),r=Zs(t),i=n.selectedKey===e.id,[a,o]=(0,v.useState)(n.selectedKey==null?null:i);a==null&&n.selectedKey!=null?o(i):!i&&a&&o(!1);let s=Oc(r,i);return!i&&!e.shouldForceMount&&!s?null:v.createElement(Tae,{...e,tabPanelRef:r,isInitiallySelected:a||!1,isExiting:s})});function Tae(e){let t=(0,v.useContext)(bA),{id:n,tabPanelRef:r,isInitiallySelected:i,isExiting:a,...o}=e,{tabPanelProps:s}=hae(e,t,r),{focusProps:c,isFocused:l,isFocusVisible:u}=Gm(),d=t.selectedKey===e.id,f=Dc(r)&&!i,p=Jf({...e,defaultClassName:`react-aria-TabPanel`,values:{isFocused:l,isFocusVisible:u,isInert:Tc(!d),isEntering:f,isExiting:a,state:t}}),m=Us(o,{global:!0});delete m.id;let h=d?W(m,s,c,p):W(m,p);return v.createElement(np.div,{...h,ref:r,"data-focused":l||void 0,"data-focus-visible":u||void 0,inert:Tc(!d||e.inert),"data-inert":d?void 0:`true`,"data-entering":f||void 0,"data-exiting":a||void 0},v.createElement(qf,{values:[[yA,null],[bA,null]]},v.createElement(J_.Provider,{value:K_},p.children)))}var SA=(0,v.createContext)({}),CA=fw(`tabs.listContainer`),wA=({children:e,className:t,orientation:n=`horizontal`,variant:r,...i})=>{let a=v.useMemo(()=>Rf({variant:r}),[r]);return(0,G.jsx)(SA,{value:{orientation:n,slots:a},children:(0,G.jsx)(bae,{...i,className:K(t,a.base()),"data-slot":`tabs`,orientation:n,children:e})})},Eae=({children:e,className:t,render:n,...r})=>(0,G.jsx)(CA.Injector,{...r,className:t,render:n,children:e}),Dae=({children:e,className:t,...n})=>{let{orientation:r=`horizontal`,slots:i}=(0,v.use)(SA),a=(0,v.useRef)(null),o=r===`vertical`,[s,c]=CA.useSlot(n),l=(0,v.useCallback)(e=>{let t=a.current;if(!t)return;let n=o?t.clientHeight:t.clientWidth,r=o?t.scrollHeight:t.scrollWidth,i=Math.max(0,r-n),s=!o&&getComputedStyle(t).direction===`rtl`,c=e*n*.8*(s?-1:1),l=o?t.scrollTop:t.scrollLeft,u=Math.min(s?0:i,Math.max(s?-i:0,l+c));u!==l&&t.scrollTo({behavior:`smooth`,[o?`top`:`left`]:u})},[o]);if(!s)return(0,G.jsx)(xA,{...c,className:K(t,i?.tabList()),"data-slot":`tabs-list`,children:e});let{className:u,render:d,...f}=s;return(0,G.jsx)(xA,{...c,className:K(t,i?.tabList()),"data-slot":`tabs-list`,render:e=>{let{children:t,className:n,ref:s,...c}=e;return(0,G.jsxs)(Xc.div,{className:q(i?.tabListContainer,u),"data-slot":`tabs-list-container`,render:d,...f,children:[(0,G.jsx)(sae,{ref:a,hideScrollBar:!0,className:q(i?.scroller),orientation:r,size:64,children:(0,G.jsx)(`div`,{...c,ref:s,className:n,children:t})}),(0,G.jsx)(`button`,{"aria-label":o?`Scroll tabs up`:`Scroll tabs left`,className:q(i?.scrollPrev),tabIndex:-1,type:`button`,onClick:()=>l(-1),children:o?(0,G.jsx)(ch,{}):(0,G.jsx)(lh,{})}),(0,G.jsx)(`button`,{"aria-label":o?`Scroll tabs down`:`Scroll tabs right`,className:q(i?.scrollNext),tabIndex:-1,type:`button`,onClick:()=>l(1),children:o?(0,G.jsx)(sh,{}):(0,G.jsx)(uh,{})})]})},children:e})},TA=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(SA);return(0,G.jsx)(Cae,{...n,className:K(t,r?.tab()),"data-slot":`tabs-tab`,children:e})},EA=Object.assign(wA,{Root:wA,ListContainer:Eae,List:Dae,Tab:TA,Indicator:({className:e,...t})=>{let{slots:n}=(0,v.use)(SA);return(0,G.jsx)(Nte,{className:q(n?.tabIndicator,e),"data-slot":`tabs-indicator`,...t})},Separator:({className:e,...t})=>{let{slots:n}=(0,v.use)(SA);return(0,G.jsx)(Xc.span,{"aria-hidden":`true`,className:q(n?.separator,e),"data-slot":`tabs-separator`,...t})},Panel:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(SA);return(0,G.jsx)(wae,{...n,className:K(t,r?.tabPanel()),"data-slot":`tabs-panel`,children:e})}}),DA={};DA={deselectedItem:e=>`${e.item} \u{63A}\u{64A}\u{631} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`,longPressToSelect:`اضغط مطولًا للدخول إلى وضع التحديد.`,select:`تحديد`,selectedAll:`جميع العناصر المحددة.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`لم يتم تحديد عناصر`,one:()=>`${t.number(e.count)} \u{639}\u{646}\u{635}\u{631} \u{645}\u{62D}\u{62F}\u{62F}`,other:()=>`${t.number(e.count)} \u{639}\u{646}\u{635}\u{631} \u{645}\u{62D}\u{62F}\u{62F}`})}.`,selectedItem:e=>`${e.item} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`};var OA={};OA={deselectedItem:e=>`${e.item} \u{43D}\u{435} \u{435} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}.`,longPressToSelect:`Натиснете и задръжте за да влезете в избирателен режим.`,select:`Изберете`,selectedAll:`Всички елементи са избрани.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Няма избрани елементи`,one:()=>`${t.number(e.count)} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}`,other:()=>`${t.number(e.count)} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{438}`})}.`,selectedItem:e=>`${e.item} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}.`};var kA={};kA={deselectedItem:e=>`Polo\u{17E}ka ${e.item} nen\xed vybr\xe1na.`,longPressToSelect:`Dlouhým stisknutím přejdete do režimu výběru.`,select:`Vybrat`,selectedAll:`Vybrány všechny položky.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nevybrány žádné položky`,one:()=>`Vybr\xe1na ${t.number(e.count)} polo\u{17E}ka`,other:()=>`Vybr\xe1no ${t.number(e.count)} polo\u{17E}ek`})}.`,selectedItem:e=>`Vybr\xe1na polo\u{17E}ka ${e.item}.`};var AA={};AA={deselectedItem:e=>`${e.item} ikke valgt.`,longPressToSelect:`Lav et langt tryk for at aktivere valgtilstand.`,select:`Vælg`,selectedAll:`Alle elementer valgt.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Ingen elementer valgt`,one:()=>`${t.number(e.count)} element valgt`,other:()=>`${t.number(e.count)} elementer valgt`})}.`,selectedItem:e=>`${e.item} valgt.`};var jA={};jA={deselectedItem:e=>`${e.item} nicht ausgew\xe4hlt.`,longPressToSelect:`Gedrückt halten, um Auswahlmodus zu öffnen.`,select:`Auswählen`,selectedAll:`Alle Elemente ausgewählt.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Keine Elemente ausgewählt`,one:()=>`${t.number(e.count)} Element ausgew\xe4hlt`,other:()=>`${t.number(e.count)} Elemente ausgew\xe4hlt`})}.`,selectedItem:e=>`${e.item} ausgew\xe4hlt.`};var MA={};MA={deselectedItem:e=>`\u{394}\u{3B5}\u{3BD} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} \u{3C4}\u{3BF} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF} ${e.item}.`,longPressToSelect:`Πατήστε παρατεταμένα για να μπείτε σε λειτουργία επιλογής.`,select:`Επιλογή`,selectedAll:`Επιλέχθηκαν όλα τα στοιχεία.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Δεν επιλέχθηκαν στοιχεία`,one:()=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} ${t.number(e.count)} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF}`,other:()=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B1}\u{3BD} ${t.number(e.count)} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3B1}`})}.`,selectedItem:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} \u{3C4}\u{3BF} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF} ${e.item}.`};var NA={};NA={deselectedItem:e=>`${e.item} not selected.`,select:`Select`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`No items selected`,one:()=>`${t.number(e.count)} item selected`,other:()=>`${t.number(e.count)} items selected`})}.`,selectedAll:`All items selected.`,selectedItem:e=>`${e.item} selected.`,longPressToSelect:`Long press to enter selection mode.`};var PA={};PA={deselectedItem:e=>`${e.item} no seleccionado.`,longPressToSelect:`Mantenga pulsado para abrir el modo de selección.`,select:`Seleccionar`,selectedAll:`Todos los elementos seleccionados.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Ningún elemento seleccionado`,one:()=>`${t.number(e.count)} elemento seleccionado`,other:()=>`${t.number(e.count)} elementos seleccionados`})}.`,selectedItem:e=>`${e.item} seleccionado.`};var FA={};FA={deselectedItem:e=>`${e.item} pole valitud.`,longPressToSelect:`Valikurežiimi sisenemiseks vajutage pikalt.`,select:`Vali`,selectedAll:`Kõik üksused valitud.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Üksusi pole valitud`,one:()=>`${t.number(e.count)} \xfcksus valitud`,other:()=>`${t.number(e.count)} \xfcksust valitud`})}.`,selectedItem:e=>`${e.item} valitud.`};var IA={};IA={deselectedItem:e=>`Kohdetta ${e.item} ei valittu.`,longPressToSelect:`Siirry valintatilaan painamalla pitkään.`,select:`Valitse`,selectedAll:`Kaikki kohteet valittu.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Ei yhtään kohdetta valittu`,one:()=>`${t.number(e.count)} kohde valittu`,other:()=>`${t.number(e.count)} kohdetta valittu`})}.`,selectedItem:e=>`${e.item} valittu.`};var LA={};LA={deselectedItem:e=>`${e.item} non s\xe9lectionn\xe9.`,longPressToSelect:`Appuyez de manière prolongée pour passer en mode de sélection.`,select:`Sélectionner`,selectedAll:`Tous les éléments sélectionnés.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Aucun élément sélectionné`,one:()=>`${t.number(e.count)} \xe9l\xe9ment s\xe9lectionn\xe9`,other:()=>`${t.number(e.count)} \xe9l\xe9ments s\xe9lectionn\xe9s`})}.`,selectedItem:e=>`${e.item} s\xe9lectionn\xe9.`};var RA={};RA={deselectedItem:e=>`${e.item} \u{5DC}\u{5D0} \u{5E0}\u{5D1}\u{5D7}\u{5E8}.`,longPressToSelect:`הקשה ארוכה לכניסה למצב בחירה.`,select:`בחר`,selectedAll:`כל הפריטים נבחרו.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`לא נבחרו פריטים`,one:()=>`\u{5E4}\u{5E8}\u{5D9}\u{5D8} ${t.number(e.count)} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`,other:()=>`${t.number(e.count)} \u{5E4}\u{5E8}\u{5D9}\u{5D8}\u{5D9}\u{5DD} \u{5E0}\u{5D1}\u{5D7}\u{5E8}\u{5D5}`})}.`,selectedItem:e=>`${e.item} \u{5E0}\u{5D1}\u{5D7}\u{5E8}.`};var zA={};zA={deselectedItem:e=>`Stavka ${e.item} nije odabrana.`,longPressToSelect:`Dugo pritisnite za ulazak u način odabira.`,select:`Odaberite`,selectedAll:`Odabrane su sve stavke.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nije odabrana nijedna stavka`,one:()=>`Odabrana je ${t.number(e.count)} stavka`,other:()=>`Odabrano je ${t.number(e.count)} stavki`})}.`,selectedItem:e=>`Stavka ${e.item} je odabrana.`};var BA={};BA={deselectedItem:e=>`${e.item} nincs kijel\xf6lve.`,longPressToSelect:`Nyomja hosszan a kijelöléshez.`,select:`Kijelölés`,selectedAll:`Az összes elem kijelölve.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Egy elem sincs kijelölve`,one:()=>`${t.number(e.count)} elem kijel\xf6lve`,other:()=>`${t.number(e.count)} elem kijel\xf6lve`})}.`,selectedItem:e=>`${e.item} kijel\xf6lve.`};var VA={};VA={deselectedItem:e=>`${e.item} non selezionato.`,longPressToSelect:`Premi a lungo per passare alla modalità di selezione.`,select:`Seleziona`,selectedAll:`Tutti gli elementi selezionati.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nessun elemento selezionato`,one:()=>`${t.number(e.count)} elemento selezionato`,other:()=>`${t.number(e.count)} elementi selezionati`})}.`,selectedItem:e=>`${e.item} selezionato.`};var HA={};HA={deselectedItem:e=>`${e.item} \u{304C}\u{9078}\u{629E}\u{3055}\u{308C}\u{3066}\u{3044}\u{307E}\u{305B}\u{3093}\u{3002}`,longPressToSelect:`長押しして選択モードを開きます。`,select:`選択`,selectedAll:`すべての項目を選択しました。`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`項目が選択されていません`,one:()=>`${t.number(e.count)} \u{9805}\u{76EE}\u{3092}\u{9078}\u{629E}\u{3057}\u{307E}\u{3057}\u{305F}`,other:()=>`${t.number(e.count)} \u{9805}\u{76EE}\u{3092}\u{9078}\u{629E}\u{3057}\u{307E}\u{3057}\u{305F}`})}\u{3002}`,selectedItem:e=>`${e.item} \u{3092}\u{9078}\u{629E}\u{3057}\u{307E}\u{3057}\u{305F}\u{3002}`};var UA={};UA={deselectedItem:e=>`${e.item}\u{C774}(\u{AC00}) \u{C120}\u{D0DD}\u{B418}\u{C9C0} \u{C54A}\u{C558}\u{C2B5}\u{B2C8}\u{B2E4}.`,longPressToSelect:`선택 모드로 들어가려면 길게 누르십시오.`,select:`선택`,selectedAll:`모든 항목이 선택되었습니다.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`선택된 항목이 없습니다`,one:()=>`${t.number(e.count)}\u{AC1C} \u{D56D}\u{BAA9}\u{C774} \u{C120}\u{D0DD}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}`,other:()=>`${t.number(e.count)}\u{AC1C} \u{D56D}\u{BAA9}\u{C774} \u{C120}\u{D0DD}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}`})}.`,selectedItem:e=>`${e.item}\u{C774}(\u{AC00}) \u{C120}\u{D0DD}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}.`};var WA={};WA={deselectedItem:e=>`${e.item} nepasirinkta.`,longPressToSelect:`Norėdami įjungti pasirinkimo režimą, paspauskite ir palaikykite.`,select:`Pasirinkti`,selectedAll:`Pasirinkti visi elementai.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nepasirinktas nė vienas elementas`,one:()=>`Pasirinktas ${t.number(e.count)} elementas`,other:()=>`Pasirinkta element\u{173}: ${t.number(e.count)}`})}.`,selectedItem:e=>`Pasirinkta: ${e.item}.`};var GA={};GA={deselectedItem:e=>`Vienums ${e.item} nav atlas\u{12B}ts.`,longPressToSelect:`Ilgi turiet nospiestu. lai ieslēgtu atlases režīmu.`,select:`Atlasīt`,selectedAll:`Atlasīti visi vienumi.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nav atlasīts neviens vienums`,one:()=>`Atlas\u{12B}to vienumu skaits: ${t.number(e.count)}`,other:()=>`Atlas\u{12B}to vienumu skaits: ${t.number(e.count)}`})}.`,selectedItem:e=>`Atlas\u{12B}ts vienums ${e.item}.`};var KA={};KA={deselectedItem:e=>`${e.item} er ikke valgt.`,longPressToSelect:`Bruk et langt trykk for å gå inn i valgmodus.`,select:`Velg`,selectedAll:`Alle elementer er valgt.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Ingen elementer er valgt`,one:()=>`${t.number(e.count)} element er valgt`,other:()=>`${t.number(e.count)} elementer er valgt`})}.`,selectedItem:e=>`${e.item} er valgt.`};var qA={};qA={deselectedItem:e=>`${e.item} niet geselecteerd.`,longPressToSelect:`Druk lang om de selectiemodus te openen.`,select:`Selecteren`,selectedAll:`Alle items geselecteerd.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Geen items geselecteerd`,one:()=>`${t.number(e.count)} item geselecteerd`,other:()=>`${t.number(e.count)} items geselecteerd`})}.`,selectedItem:e=>`${e.item} geselecteerd.`};var JA={};JA={deselectedItem:e=>`Nie zaznaczono ${e.item}.`,longPressToSelect:`Naciśnij i przytrzymaj, aby wejść do trybu wyboru.`,select:`Zaznacz`,selectedAll:`Wszystkie zaznaczone elementy.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nie zaznaczono żadnych elementów`,one:()=>`${t.number(e.count)} zaznaczony element`,other:()=>`${t.number(e.count)} zaznaczonych element\xf3w`})}.`,selectedItem:e=>`Zaznaczono ${e.item}.`};var YA={};YA={deselectedItem:e=>`${e.item} n\xe3o selecionado.`,longPressToSelect:`Mantenha pressionado para entrar no modo de seleção.`,select:`Selecionar`,selectedAll:`Todos os itens selecionados.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nenhum item selecionado`,one:()=>`${t.number(e.count)} item selecionado`,other:()=>`${t.number(e.count)} itens selecionados`})}.`,selectedItem:e=>`${e.item} selecionado.`};var XA={};XA={deselectedItem:e=>`${e.item} n\xe3o selecionado.`,longPressToSelect:`Prima continuamente para entrar no modo de seleção.`,select:`Selecionar`,selectedAll:`Todos os itens selecionados.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nenhum item selecionado`,one:()=>`${t.number(e.count)} item selecionado`,other:()=>`${t.number(e.count)} itens selecionados`})}.`,selectedItem:e=>`${e.item} selecionado.`};var ZA={};ZA={deselectedItem:e=>`${e.item} neselectat.`,longPressToSelect:`Apăsați lung pentru a intra în modul de selectare.`,select:`Selectare`,selectedAll:`Toate elementele selectate.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Niciun element selectat`,one:()=>`${t.number(e.count)} element selectat`,other:()=>`${t.number(e.count)} elemente selectate`})}.`,selectedItem:e=>`${e.item} selectat.`};var QA={};QA={deselectedItem:e=>`${e.item} \u{43D}\u{435} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`,longPressToSelect:`Нажмите и удерживайте для входа в режим выбора.`,select:`Выбрать`,selectedAll:`Выбраны все элементы.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Нет выбранных элементов`,one:()=>`${t.number(e.count)} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}`,other:()=>`${t.number(e.count)} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{43E}\u{432} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E}`})}.`,selectedItem:e=>`${e.item} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`};var $A={};$A={deselectedItem:e=>`Nevybrat\xe9 polo\u{17E}ky: ${e.item}.`,longPressToSelect:`Dlhším stlačením prejdite do režimu výberu.`,select:`Vybrať`,selectedAll:`Všetky vybraté položky.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Žiadne vybraté položky`,one:()=>`${t.number(e.count)} vybrat\xe1 polo\u{17E}ka`,other:()=>`Po\u{10D}et vybrat\xfdch polo\u{17E}iek:${t.number(e.count)}`})}.`,selectedItem:e=>`Vybrat\xe9 polo\u{17E}ky: ${e.item}.`};var ej={};ej={deselectedItem:e=>`Element ${e.item} ni izbran.`,longPressToSelect:`Za izbirni način pritisnite in dlje časa držite.`,select:`Izberite`,selectedAll:`Vsi elementi so izbrani.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Noben element ni izbran`,one:()=>`${t.number(e.count)} element je izbran`,other:()=>`${t.number(e.count)} elementov je izbranih`})}.`,selectedItem:e=>`Element ${e.item} je izbran.`};var tj={};tj={deselectedItem:e=>`${e.item} nije izabrano.`,longPressToSelect:`Dugo pritisnite za ulazak u režim biranja.`,select:`Izaberite`,selectedAll:`Izabrane su sve stavke.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nije izabrana nijedna stavka`,one:()=>`Izabrana je ${t.number(e.count)} stavka`,other:()=>`Izabrano je ${t.number(e.count)} stavki`})}.`,selectedItem:e=>`${e.item} je izabrano.`};var nj={};nj={deselectedItem:e=>`${e.item} ej markerat.`,longPressToSelect:`Tryck länge när du vill öppna väljarläge.`,select:`Markera`,selectedAll:`Alla markerade objekt.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Inga markerade objekt`,one:()=>`${t.number(e.count)} markerat objekt`,other:()=>`${t.number(e.count)} markerade objekt`})}.`,selectedItem:e=>`${e.item} markerat.`};var rj={};rj={deselectedItem:e=>`${e.item} se\xe7ilmedi.`,longPressToSelect:`Seçim moduna girmek için uzun basın.`,select:`Seç`,selectedAll:`Tüm ögeler seçildi.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Hiçbir öge seçilmedi`,one:()=>`${t.number(e.count)} \xf6ge se\xe7ildi`,other:()=>`${t.number(e.count)} \xf6ge se\xe7ildi`})}.`,selectedItem:e=>`${e.item} se\xe7ildi.`};var ij={};ij={deselectedItem:e=>`${e.item} \u{43D}\u{435} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`,longPressToSelect:`Виконайте довге натиснення, щоб перейти в режим вибору.`,select:`Вибрати`,selectedAll:`Усі елементи вибрано.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Жодних елементів не вибрано`,one:()=>`${t.number(e.count)} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E}`,other:()=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{456}\u{432}: ${t.number(e.count)}`})}.`,selectedItem:e=>`${e.item} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`};var aj={};aj={deselectedItem:e=>`\u{672A}\u{9009}\u{62E9} ${e.item}\u{3002}`,longPressToSelect:`长按以进入选择模式。`,select:`选择`,selectedAll:`已选择所有项目。`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`未选择项目`,one:()=>`\u{5DF2}\u{9009}\u{62E9} ${t.number(e.count)} \u{4E2A}\u{9879}\u{76EE}`,other:()=>`\u{5DF2}\u{9009}\u{62E9} ${t.number(e.count)} \u{4E2A}\u{9879}\u{76EE}`})}\u{3002}`,selectedItem:e=>`\u{5DF2}\u{9009}\u{62E9} ${e.item}\u{3002}`};var oj={};oj={deselectedItem:e=>`\u{672A}\u{9078}\u{53D6}\u{300C}${e.item}\u{300D}\u{3002}`,longPressToSelect:`長按以進入選擇模式。`,select:`選取`,selectedAll:`已選取所有項目。`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`未選取任何項目`,one:()=>`\u{5DF2}\u{9078}\u{53D6} ${t.number(e.count)} \u{500B}\u{9805}\u{76EE}`,other:()=>`\u{5DF2}\u{9078}\u{53D6} ${t.number(e.count)} \u{500B}\u{9805}\u{76EE}`})}\u{3002}`,selectedItem:e=>`\u{5DF2}\u{9078}\u{53D6}\u{300C}${e.item}\u{300D}\u{3002}`};var sj={};sj={"ar-AE":DA,"bg-BG":OA,"cs-CZ":kA,"da-DK":AA,"de-DE":jA,"el-GR":MA,"en-US":NA,"es-ES":PA,"et-EE":FA,"fi-FI":IA,"fr-FR":LA,"he-IL":RA,"hr-HR":zA,"hu-HU":BA,"it-IT":VA,"ja-JP":HA,"ko-KR":UA,"lt-LT":WA,"lv-LV":GA,"nb-NO":KA,"nl-NL":qA,"pl-PL":JA,"pt-BR":YA,"pt-PT":XA,"ro-RO":ZA,"ru-RU":QA,"sk-SK":$A,"sl-SI":ej,"sr-SP":tj,"sv-SE":nj,"tr-TR":rj,"uk-UA":ij,"zh-CN":aj,"zh-TW":oj};function cj(e){return e&&e.__esModule?e.default:e}function lj(e,t){let{getRowText:n=e=>t.collection.getTextValue?.(e)??t.collection.getItem(e)?.textValue}=e,r=s_(cj(sj),`@react-aria/grid`),i=t.selectionManager.rawSelection,a=(0,v.useRef)(i),o=(0,v.useCallback)(()=>{if(!t.selectionManager.isFocused||i===a.current){a.current=i;return}let e=uj(i,a.current),o=uj(a.current,i),s=t.selectionManager.selectionBehavior===`replace`,c=[];if(t.selectionManager.selectedKeys.size===1&&s){let e=t.selectionManager.selectedKeys.keys().next().value;if(e!=null&&t.collection.getItem(e)){let t=n(e);t&&c.push(r.format(`selectedItem`,{item:t}))}}else if(e.size===1&&o.size===0){let t=e.keys().next().value;if(t!=null){let e=n(t);e&&c.push(r.format(`selectedItem`,{item:e}))}}else if(o.size===1&&e.size===0){let e=o.keys().next().value;if(e!=null&&t.collection.getItem(e)){let t=n(e);t&&c.push(r.format(`deselectedItem`,{item:t}))}}t.selectionManager.selectionMode===`multiple`&&(c.length===0||i===`all`||i.size>1||a.current===`all`||a.current?.size>1)&&c.push(i===`all`?r.format(`selectedAll`):r.format(`selectedCount`,{count:i.size})),c.length>0&&Gp(c.join(` `)),a.current=i},[i,t.selectionManager.selectedKeys,t.selectionManager.isFocused,t.selectionManager.selectionBehavior,t.selectionManager.selectionMode,t.collection,n,r]);ec(()=>{if(t.selectionManager.isFocused)o();else{let e=requestAnimationFrame(o);return()=>cancelAnimationFrame(e)}},[i,t.selectionManager.isFocused])}function uj(e,t){let n=new Set;if(e===`all`||t===`all`)return n;for(let r of e.keys())t.has(r)||n.add(r);return n}function dj(e){return e&&e.__esModule?e.default:e}function fj(e){let t=s_(dj(sj),`@react-aria/grid`),n=hm(),r=(n===`pointer`||n===`virtual`||n==null)&&typeof window<`u`&&`ontouchstart`in window;return gc((0,v.useMemo)(()=>{let n=e.selectionManager.selectionMode,i=e.selectionManager.selectionBehavior,a;return r&&(a=t.format(`longPressToSelect`)),i===`replace`&&n!==`none`&&e.hasItemActions?a:void 0},[e.selectionManager.selectionMode,e.selectionManager.selectionBehavior,e.hasItemActions,t,r]))}var pj=Object.assign(rA,{Root:rA,Separator:lae}),mj=(0,v.createContext)({}),hj=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,mj);let{toolbarProps:n}=mS(e,t),r=Jf({...e,values:{orientation:e.orientation||`horizontal`},defaultClassName:`react-aria-Toolbar`}),i=Us(e,{global:!0});return delete i.id,v.createElement(np.div,{...W(i,r,n),ref:t,slot:e.slot||void 0,"data-orientation":e.orientation||`horizontal`},r.children)}),gj=({children:e,className:t,isAttached:n,orientation:r=`horizontal`,...i})=>{let a=v.useMemo(()=>Wf({isAttached:n,orientation:r}),[n,r]);return(0,G.jsx)(hS.Provider,{value:{orientation:r},children:(0,G.jsx)(Vv.Provider,{value:{orientation:r===`horizontal`?`vertical`:`horizontal`},children:(0,G.jsx)(hj,{className:K(t,a),"data-slot":`toolbar`,orientation:r,...i,children:e})})})};gj.displayName=`HeroUI.Toolbar`;var _j=Object.assign(gj,{Root:gj}),vj=v.createContext(null);function Oae(e){let{children:t}=e,n=(0,v.useContext)(vj),[r,i]=(0,v.useState)(0),a=(0,v.useMemo)(()=>({parent:n,modalCount:r,addModal(){i(e=>e+1),n&&n.addModal()},removeModal(){i(e=>e-1),n&&n.removeModal()}}),[n,r]);return v.createElement(vj.Provider,{value:a},t)}function kae(){let e=(0,v.useContext)(vj);return{modalProviderProps:{"aria-hidden":e&&e.modalCount>0?!0:void 0}}}function Aae(e){let{modalProviderProps:t}=kae();return v.createElement(`div`,{"data-overlay-container":!0,...e,...t})}function jae(e){return v.createElement(Oae,null,v.createElement(Aae,e))}function Mae(e){let t=cs(),{portalContainer:n=t?null:document.body,...r}=e,{getContainer:i}=p_();if(!e.portalContainer&&i&&(n=i()),v.useEffect(()=>{if(n?.closest(`[data-overlay-container]`))throw Error(`An OverlayContainer must not be inside another container. Please change the portalContainer prop.`)},[n]),!n)return null;let a=v.createElement(jae,r);return Ec.createPortal(a,n)}var Nae=1500,yj=500,bj={},Pae=0,xj=!1,Sj=null,Cj=null;function wj(e={}){let{delay:t=Nae,closeDelay:n=yj}=e,{isOpen:r,open:i,close:a}=__(e),[o,s]=(0,v.useState)(!1),c=(0,v.useMemo)(()=>`${++Pae}`,[]),l=(0,v.useRef)(null),u=(0,v.useRef)(a),d=()=>{bj[c]=m},f=()=>{for(let e in bj)e!==c&&(bj[e](!0,!0),delete bj[e])},p=e=>{l.current&&clearTimeout(l.current),l.current=null,f(),d(),s(!!e),xj=!0,i(),Sj&&=(clearTimeout(Sj),null),Cj&&=(clearTimeout(Cj),null)},m=(e,t)=>{s(!!t),e||n<=0?(l.current&&clearTimeout(l.current),l.current=null,u.current()):l.current||=setTimeout(()=>{l.current=null,u.current()},n),Sj&&=(clearTimeout(Sj),null),xj&&(Cj&&clearTimeout(Cj),Cj=setTimeout(()=>{delete bj[c],Cj=null,xj=!1},Math.max(yj,n)))},h=()=>{f(),d(),!r&&!xj?(Sj&&clearTimeout(Sj),Sj=setTimeout(()=>{Sj=null,xj=!0,p(!1)},t)):r||p(!0)};return(0,v.useEffect)(()=>{u.current=a},[a]),(0,v.useEffect)(()=>()=>{l.current&&clearTimeout(l.current),bj[c]&&delete bj[c]},[c]),{isOpen:r,shouldSkipAnimation:o,open:e=>{!e&&t>0&&!l.current?h():p(xj)},close:m}}function Fae(e,t){let n=Us(e,{labelable:!0}),{hoverProps:r}=Zm({onHoverStart:()=>t?.open(!0),onHoverEnd:()=>t?.close()});return{tooltipProps:W(n,r,{role:`tooltip`})}}function Iae(e,t,n){let{isDisabled:r,trigger:i,shouldCloseOnPress:a=!0}=e,o=ms(),s=(0,v.useRef)(!1),c=(0,v.useRef)(!1),l=()=>{(s.current||c.current)&&t.open(c.current)},u=e=>{!s.current&&!c.current&&t.close(e)};(0,v.useEffect)(()=>{let e=e=>{n&&n.current&&e.key===`Escape`&&(e.stopPropagation(),t.close(!0))};if(t.isOpen)return document.addEventListener(`keydown`,e,!0),()=>{document.removeEventListener(`keydown`,e,!0)}},[n,t]);let d=()=>{i!==`focus`&&(pm()===`pointer`?s.current=!0:s.current=!1,l())},f=()=>{i!==`focus`&&(c.current=!1,s.current=!1,u())},p=()=>{a&&(c.current=!1,s.current=!1,u(!0))},m=()=>{fm()&&(c.current=!0,l())},h=()=>{c.current=!1,s.current=!1,u(!0)},{hoverProps:g}=Zm({isDisabled:r,onHoverStart:d,onHoverEnd:f}),{focusableProps:_}=wm({isDisabled:r,onFocus:m,onBlur:h},n);return{triggerProps:{"aria-describedby":t.isOpen?o:void 0,...W(_,g,{onPointerDown:p,onKeyDown:p}),tabIndex:void 0},tooltipProps:{id:o}}}var Tj=(0,v.createContext)(null),Ej=(0,v.createContext)(null);function Lae(e){let t=wj(e),n=(0,v.useRef)(null),{triggerProps:r,tooltipProps:i}=Iae(e,t,n);return v.createElement(qf,{values:[[Tj,t],[Ej,{...i,triggerRef:n}]]},v.createElement(vee,{...r,ref:n},e.children))}var Rae=(0,v.forwardRef)(function({UNSTABLE_portalContainer:e,...t},n){[t,n]=Zf(t,n,Ej);let r=(0,v.useContext)(Tj),i=wj(t),a=t.isOpen!=null||t.defaultOpen!=null||!r?i:r,o=Oc(n,a.isOpen),s=t.isExiting||!a.shouldSkipAnimation&&o||!1;return!a.isOpen&&!s?null:v.createElement(Mae,{portalContainer:e},v.createElement(zae,{...t,tooltipRef:n,isExiting:s}))});function zae(e){let t=(0,v.useContext)(Tj),n=(0,v.useRef)(null),{overlayProps:r,arrowProps:i,placement:a,triggerAnchorPoint:o}=Vh({placement:e.placement||`top`,targetRef:e.triggerRef,overlayRef:e.tooltipRef,arrowRef:n,offset:e.offset,crossOffset:e.crossOffset,isOpen:t.isOpen,arrowBoundaryOffset:e.arrowBoundaryOffset,shouldFlip:e.shouldFlip,containerPadding:e.containerPadding,onClose:()=>t.close(!0)}),s=Dc(e.tooltipRef,!!a),c=e.isEntering||!t.shouldSkipAnimation&&s||!1,l=Jf({...e,defaultClassName:`react-aria-Tooltip`,values:{placement:a,isEntering:c,isExiting:e.isExiting,state:t}});e=W(e,r);let{tooltipProps:u}=Fae(e,t),d=Us(e,{global:!0});return v.createElement(np.div,{...W(d,l,u),ref:e.tooltipRef,style:{...r.style,"--trigger-anchor-point":o?`${o.x}px ${o.y}px`:void 0,...l.style},"data-placement":a??void 0,"data-entering":c||void 0,"data-exiting":e.isExiting||void 0},v.createElement(bh.Provider,{value:{...i,placement:a,ref:n}},l.children))}var Dj=e=>{if(!e)return;let t=e.trim(),n=parseFloat(t);if(!Number.isNaN(n))return t.endsWith(`ms`)?n:t.endsWith(`s`)?n*1e3:n},Oj=(0,v.createContext)({}),Bae=({children:e,shouldSkipAnimation:t})=>{let n=(0,v.use)(Tj);return!n||t?e:(0,G.jsx)(Tj,{value:{...n,shouldSkipAnimation:!1},children:e})},kj=({children:e,closeDelay:t,delay:n,shouldSkipAnimation:r=!1,...i})=>{let a=v.useMemo(()=>Gf(),[]),o=$k(`--tooltip-delay`),s=$k(`--tooltip-close-delay`),c=n??Dj(o),l=t??Dj(s);return(0,G.jsx)(Oj,{value:{slots:a},children:(0,G.jsx)(Lae,{closeDelay:l,"data-slot":`tooltip-root`,delay:c,...i,children:(0,G.jsx)(Bae,{shouldSkipAnimation:r,children:e})})})},Aj=Object.assign(kj,{Root:kj,Trigger:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Oj),i=(0,v.useRef)(null),{focusableProps:a}=wm({},i);return(0,G.jsx)(Xc.div,{ref:i,className:q(r?.trigger,t),"data-slot":`tooltip-trigger`,role:`button`,...W(a,n),children:e})},Content:({children:e,className:t,offset:n,showArrow:r=!1,...i})=>{let{slots:a}=(0,v.use)(Oj),o=n||(r?7:3);return(0,G.jsx)(Rae,{...i,className:K(t,a?.base()),offset:o,children:e})},Arrow:({children:e,className:t,...n})=>{let r=(0,G.jsx)(`svg`,{"data-slot":`overlay-arrow`,fill:`none`,height:`12`,viewBox:`0 0 12 12`,width:`12`,xmlns:`http://www.w3.org/2000/svg`,children:(0,G.jsx)(`path`,{d:`M0 0C5.48483 8 6.5 8 12 0Z`})}),i=v.isValidElement(e)?v.cloneElement(e,{"data-slot":`overlay-arrow`}):r;return(0,G.jsx)(Pee,{"data-slot":`tooltip-arrow`,...n,className:t,children:i})}}),jj=(0,v.createContext)({}),Vae=e=>{let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,...i}=e;return i},Mj=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,jj);let{hoverProps:n,isHovered:r}=Zm(e),{isFocused:i,isFocusVisible:a,focusProps:o}=Gm({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e[`aria-invalid`]&&e[`aria-invalid`]!==`false`,c=Jf({...e,values:{isHovered:r,isFocused:i,isFocusVisible:a,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:`react-aria-TextArea`});return v.createElement(np.textarea,{...W(Vae(e),o,n),...c,ref:t,"data-focused":i||void 0,"data-disabled":e.disabled||void 0,"data-hovered":r||void 0,"data-focus-visible":a||void 0,"data-invalid":s||void 0})}),Hae=(0,v.createContext)(null),Uae=ap(function(e,t){[e,t]=Zf(e,t,Hae);let{validationBehavior:n}=Xf(ax)||{},r=e.validationBehavior??n??`native`,i=(0,v.useRef)(null);[e,i]=Zf(e,i,Iv);let[a,o]=Qf(!e[`aria-label`]&&!e[`aria-labelledby`]),[s,c]=(0,v.useState)(`input`),{labelProps:l,inputProps:u,descriptionProps:d,errorMessageProps:f,...p}=VS({...$f(e),inputElementType:s,label:o,validationBehavior:r},i),m=(0,v.useCallback)(e=>{i.current=e,e&&c(e instanceof HTMLTextAreaElement?`textarea`:`input`)},[i]),h=Jf({...e,values:{isDisabled:e.isDisabled||!1,isInvalid:p.isInvalid,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1},defaultClassName:`react-aria-TextField`}),g=Us(e,{global:!0});return delete g.id,v.createElement(np.div,{...g,...h,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":p.isInvalid||void 0,"data-readonly":e.isReadOnly||void 0,"data-required":e.isRequired||void 0},v.createElement(qf,{values:[[sp,{...l,ref:a}],[zS,{...u,ref:m}],[jj,{...u,ref:m}],[Kb,{role:`presentation`,isInvalid:p.isInvalid,isDisabled:e.isDisabled||!1}],[Hv,{slots:{description:d,errorMessage:f}}],[Jb,p]]},h.children))}),Nj=(0,v.createContext)({}),Pj=({children:e,className:t,fullWidth:n,variant:r,...i})=>{let a=v.useMemo(()=>zf({fullWidth:n}),[n]);return(0,G.jsx)(Uae,{"data-slot":`textfield`,...i,className:K(t,a),children:t=>(0,G.jsx)(Nj,{value:{variant:r},children:(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})})},Fj=({className:e,fullWidth:t,variant:n,...r})=>{let i=(0,v.use)(Nj),a=(0,v.use)(tre),o=n??i.variant??a.variant;return(0,G.jsx)(BS,{className:K(e,yf({fullWidth:t,variant:o})),"data-slot":`input`,...r})},Ij=Object.assign(Fj,{Root:Fj}),Lj=(0,v.createContext)({}),Rj=({children:e,className:t,fullWidth:n,onClick:r,variant:i,...a})=>{let o=(0,v.use)(Nj),s=i??o?.variant,c=v.useRef(null),l=v.useMemo(()=>bf({fullWidth:n,variant:s}),[n,s]),u=e=>{let t=e.target,n=c.current?.querySelector(`input`);n&&t!==n&&!n.contains(t)&&n.focus(),r?.(e)};return(0,G.jsx)(Lj,{value:{slots:l},children:(0,G.jsx)(qb,{...a,ref:c,className:K(t,l?.base()),"data-slot":`input-group`,onClick:u,children:t=>typeof e==`function`?e(t):e})})},zj=Object.assign(Rj,{Root:Rj,Input:({className:e,...t})=>{let{slots:n}=(0,v.use)(Lj);return(0,G.jsx)(BS,{className:K(e,n?.input()),"data-slot":`input-group-input`,...t})},TextArea:({className:e,...t})=>{let{slots:n}=(0,v.use)(Lj);return(0,G.jsx)(Mj,{className:K(e,n?.input()),"data-slot":`input-group-textarea`,...t})},Prefix:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Lj);return(0,G.jsx)(`div`,{className:q(r?.prefix,t),"data-slot":`input-group-prefix`,...n,children:e})},Suffix:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(Lj);return(0,G.jsx)(`div`,{className:q(r?.suffix,t),"data-slot":`input-group-suffix`,...n,children:e})}}),Bj=({className:e,fullWidth:t,variant:n,...r})=>{let i=(0,v.use)(Nj),a=n??i?.variant;return(0,G.jsx)(Mj,{"data-slot":`textarea`,className:K(e,Bf({fullWidth:t,variant:a})),...r})},Vj=Object.assign(Bj,{Root:Bj}),Hj=Object.assign(Pj,{Root:Pj}),Uj={};Uj={"Clear search":`مسح البحث`};var Wj={};Wj={"Clear search":`Изчистване на търсене`};var Gj={};Gj={"Clear search":`Vymazat hledání`};var Kj={};Kj={"Clear search":`Ryd søgning`};var qj={};qj={"Clear search":`Suche zurücksetzen`};var Jj={};Jj={"Clear search":`Απαλοιφή αναζήτησης`};var Yj={};Yj={"Clear search":`Clear search`};var Xj={};Xj={"Clear search":`Borrar búsqueda`};var Zj={};Zj={"Clear search":`Tühjenda otsing`};var Qj={};Qj={"Clear search":`Tyhjennä haku`};var $j={};$j={"Clear search":`Effacer la recherche`};var eM={};eM={"Clear search":`נקה חיפוש`};var tM={};tM={"Clear search":`Obriši pretragu`};var nM={};nM={"Clear search":`Keresés törlése`};var rM={};rM={"Clear search":`Cancella ricerca`};var iM={};iM={"Clear search":`検索をクリア`};var aM={};aM={"Clear search":`검색 지우기`};var oM={};oM={"Clear search":`Išvalyti iešką`};var sM={};sM={"Clear search":`Notīrīt meklēšanu`};var cM={};cM={"Clear search":`Tøm søk`};var lM={};lM={"Clear search":`Zoekactie wissen`};var uM={};uM={"Clear search":`Wyczyść zawartość wyszukiwania`};var dM={};dM={"Clear search":`Limpar pesquisa`};var fM={};fM={"Clear search":`Limpar pesquisa`};var pM={};pM={"Clear search":`Ştergeţi căutarea`};var mM={};mM={"Clear search":`Очистить поиск`};var hM={};hM={"Clear search":`Vymazať vyhľadávanie`};var gM={};gM={"Clear search":`Počisti iskanje`};var _M={};_M={"Clear search":`Obriši pretragu`};var vM={};vM={"Clear search":`Rensa sökning`};var yM={};yM={"Clear search":`Aramayı temizle`};var bM={};bM={"Clear search":`Очистити пошук`};var xM={};xM={"Clear search":`清除搜索`};var SM={};SM={"Clear search":`清除搜尋條件`};var CM={};CM={"ar-AE":Uj,"bg-BG":Wj,"cs-CZ":Gj,"da-DK":Kj,"de-DE":qj,"el-GR":Jj,"en-US":Yj,"es-ES":Xj,"et-EE":Zj,"fi-FI":Qj,"fr-FR":$j,"he-IL":eM,"hr-HR":tM,"hu-HU":nM,"it-IT":rM,"ja-JP":iM,"ko-KR":aM,"lt-LT":oM,"lv-LV":sM,"nb-NO":cM,"nl-NL":lM,"pl-PL":uM,"pt-BR":dM,"pt-PT":fM,"ro-RO":pM,"ru-RU":mM,"sk-SK":hM,"sl-SI":gM,"sr-SP":_M,"sv-SE":vM,"tr-TR":yM,"uk-UA":bM,"zh-CN":xM,"zh-TW":SM};function Wae(e){return e&&e.__esModule?e.default:e}function Gae(e,t,n){let r=s_(Wae(CM),`@react-aria/searchfield`),{isDisabled:i,isReadOnly:a,onSubmit:o,onClear:s,type:c=`search`}=e,{keyboardProps:l}=Sm({isDisabled:i||a,shortcuts:{Enter:()=>{if(o){o(t.value);return}return!1},Escape:()=>{if(t.value===``&&(!n.current||n.current.value===``))return!1;t.setValue(``),s?.()}}}),u=()=>{t.setValue(``),s&&s()},d=()=>{n.current?.focus()},{labelProps:f,inputProps:p,descriptionProps:m,errorMessageProps:h,...g}=VS({...e,value:t.value,onChange:t.setValue,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,type:c},n);return{labelProps:f,inputProps:W(l,{...p,defaultValue:void 0}),clearButtonProps:{"aria-label":r.format(`Clear search`),excludeFromTabOrder:!0,preventFocusOnPress:!0,isDisabled:i||a,onPress:u,onPressStart:d},descriptionProps:m,errorMessageProps:h,...g}}function Kae(e){let[t,n]=eh(wM(e.value),wM(e.defaultValue)||``,e.onChange);return{value:t,setValue:n}}function wM(e){if(e!=null)return e.toString()}var qae=(0,v.createContext)(null),Jae=ap(function(e,t){[e,t]=Zf(e,t,qae);let{validationBehavior:n}=Xf(ax)||{},r=e.validationBehavior??n??`native`,i=(0,v.useRef)(null);[e,i]=Zf(e,i,Iv);let[a,o]=Qf(!e[`aria-label`]&&!e[`aria-labelledby`]),s=Kae({...e,validationBehavior:r}),{labelProps:c,inputProps:l,clearButtonProps:u,descriptionProps:d,errorMessageProps:f,...p}=Gae({...$f(e),label:o,validationBehavior:r},s,i),m=Jf({...e,values:{isEmpty:s.value===``,isDisabled:e.isDisabled||!1,isInvalid:p.isInvalid||!1,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1,state:s},defaultClassName:`react-aria-SearchField`}),h=Us(e,{global:!0});return delete h.id,v.createElement(np.div,{...h,...m,ref:t,slot:e.slot||void 0,"data-empty":s.value===``||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":p.isInvalid||void 0,"data-readonly":e.isReadOnly||void 0,"data-required":e.isRequired||void 0},v.createElement(qf,{values:[[sp,{...c,ref:a}],[zS,{...l,ref:i}],[Qm,u],[Hv,{slots:{description:d,errorMessage:f}}],[Kb,{isInvalid:p.isInvalid,isDisabled:e.isDisabled||!1}],[Jb,p]]},m.children))}),TM=(0,v.createContext)({}),EM=({children:e,className:t,fullWidth:n,variant:r,...i})=>{let a=v.useMemo(()=>Mf({fullWidth:n,variant:r}),[n,r]);return(0,G.jsx)(TM,{value:{slots:a},children:(0,G.jsx)(Jae,{"data-slot":`search-field`,...i,className:K(t,a?.base()),children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})})},DM=Object.assign(EM,{Root:EM,Group:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(TM);return(0,G.jsx)(qb,{className:K(t,r?.group()),"data-slot":`search-field-group`,...n,children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})},Input:({className:e,...t})=>{let{slots:n}=(0,v.use)(TM);return(0,G.jsx)(BS,{className:K(e,n?.input()),"data-slot":`search-field-input`,...t})},SearchIcon:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(TM);return e&&v.isValidElement(e)?v.cloneElement(e,{...n,className:q(r?.searchIcon,t),"data-slot":`search-field-search-icon`}):(0,G.jsx)(Mee,{className:q(r?.searchIcon,t),"data-slot":`search-field-search-icon`,...n})},ClearButton:({className:e,...t})=>{let{slots:n}=(0,v.use)(TM);return(0,G.jsx)(Hb,{className:K(e,n?.clearButton()),"data-slot":`search-field-clear-button`,slot:`clear`,...t})}}),OM=({children:e,className:t,isDisabled:n,isInvalid:r,isRequired:i,...a})=>(0,G.jsx)(cp,{className:xf({isRequired:i,isDisabled:n,isInvalid:r,className:t}),"data-slot":`label`,...a,children:e}),kM=Object.assign(OM,{Root:OM}),AM=({children:e,className:t,...n})=>Ene(`description`)?(0,G.jsx)(Ite,{className:hf({className:t}),"data-slot":`description`,slot:`description`,...n,children:e}):null,jM=Object.assign(AM,{Root:AM}),MM=({children:e,className:t,...n})=>(0,G.jsx)(Xc.div,{className:vf({className:t}),"data-slot":`empty-state`,...n,children:e||`No results found`}),NM=Object.assign(MM,{Root:MM});function PM(e){return e&&e.__esModule?e.default:e}function FM(e,t){let{key:n}=e,r=t.selectionManager,i=ms(),a=!t.selectionManager.canSelectItem(n),o=t.selectionManager.isSelected(n);return{checkboxProps:{id:i,"aria-label":s_(PM(sj),`@react-aria/grid`).format(`select`),isSelected:o,isDisabled:a,onChange:()=>r.toggleSelection(n)}}}for(var IM=(0,v.createContext)(null),LM=(0,v.createContext)(null),RM=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,IM);let{validationBehavior:n}=Xf(ax)||{},r=e.validationBehavior??n??`native`,{locale:i}=bp(),a=Yne({...e,locale:i,validationBehavior:r}),o=(0,v.useRef)(null),[s,c]=Qf(!e[`aria-label`]&&!e[`aria-labelledby`]),{labelProps:l,groupProps:u,inputProps:d,incrementButtonProps:f,decrementButtonProps:p,descriptionProps:m,errorMessageProps:h,...g}=qne({...$f(e),label:c,validationBehavior:r},a,o),_=Jf({...e,values:{state:a,isDisabled:e.isDisabled||!1,isInvalid:g.isInvalid||!1,isRequired:e.isRequired||!1,isReadOnly:e.isReadOnly||!1},defaultClassName:`react-aria-NumberField`}),y=Us(e,{global:!0});return delete y.id,v.createElement(qf,{values:[[LM,a],[Kb,u],[zS,{...d,ref:o}],[sp,{...l,ref:s}],[Qm,{slots:{increment:f,decrement:p}}],[Hv,{slots:{description:m,errorMessage:h}}],[Jb,g]]},v.createElement(np.div,{...y,..._,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-readonly":e.isReadOnly||void 0,"data-required":e.isRequired||void 0,"data-invalid":g.isInvalid||void 0}),e.name&&v.createElement(`input`,{type:`hidden`,name:e.name,form:e.form,value:isNaN(a.numberValue)?``:a.numberValue,disabled:e.isDisabled||void 0}))}),zM=10,BM=5,VM=class{setup(e,t,n){this.delegate=e,this.state=t,this.direction=n}getDropTargetFromPoint(e,t,n){let r=this.delegate.getDropTargetFromPoint(e,t,n);return!r||r.type===`root`?r:this.resolveDropTarget(r,e,t,n)}resolveDropTarget(e,t,n,r){let i=this.pointerTracking,a=n-i.lastY,o=t-i.lastX,s=i.yDirection,c=i.xDirection;if(Math.abs(a)>BM&&(s=a>0?`down`:`up`,i.yDirection=s,i.lastY=n),Math.abs(o)>zM&&(c=o>0?`right`:`left`,i.xDirection=c,i.lastX=t),e.dropPosition===`before`){let t=this.state.collection.getKeyBefore(e.key);for(;t!=null;){let e=this.state.collection.getItem(t);if(e?.type===`item`)break;t=e?.parentKey??null}if(t!=null){let n={type:`item`,key:t,dropPosition:`after`};r(n)&&(e=n)}}let l=this.getPotentialTargets(e,r);if(l.length===0)return{type:`root`};let u;return l.length>1?u=this.selectTarget(l,e,t,n,s,c):(u=l[0],i.boundaryContext=null),u}getPotentialTargets(e,t){if(e.dropPosition===`on`)return[e];let n=e,r=this.state.collection,i=r.getItem(n.key);for(;i&&i?.type!==`item`&&i.nextKey!=null;)n.key=i.nextKey,i=r.getItem(i.nextKey);let a=[n];if(i&&i.hasChildNodes&&this.state.expandedKeys.has(i.key)&&r.getChildren&&n.dropPosition===`after`){let e=i.firstChildKey==null?null:r.getItem(i.firstChildKey);for(;e&&e.type!==`item`;)e=e.nextKey==null?null:r.getItem(e.nextKey);if(e?.type===`item`){let n={type:`item`,key:e.key,dropPosition:`before`};return t(n)?[n]:[]}}if(i?.nextKey!=null)return[e];let o=i?.parentKey,s=[];for(;o!=null;){let e=r.getItem(o),n=e?.nextKey==null?null:r.getItem(e.nextKey);if(!n||n.parentKey!==o){let e={type:`item`,key:o,dropPosition:`after`};if(t(e)&&s.push(e),n)break}o=e?.parentKey}if(s.length>0&&a.push(...s),a.length===1){let e=r.getKeyAfter(n.key),a=e==null?null:r.getItem(e);if(e!=null&&a&&i&&a.level!=null&&i.level!=null&&a.level>i.level){let n={type:`item`,key:e,dropPosition:`before`};if(t(n))return[n]}}return a.filter(t)}selectTarget(e,t,n,r,i,a){if(e.length<2)return e[0];let o=this.pointerTracking,s=this.state.collection.getItem(t.key)?.parentKey;if(s==null)return e[0];(!o.boundaryContext||o.boundaryContext.parentKey!==s)&&(o.boundaryContext={parentKey:s,preferredTargetIndex:o.yDirection===`up`?e.length-1:0,lastSwitchY:r,lastSwitchX:n});let c=o.boundaryContext,l=Math.abs(n-c.lastSwitchX);if(Math.abs(r-c.lastSwitchY)>BM&&i){let t=c.preferredTargetIndex||0;i===`down`&&t===0?c.preferredTargetIndex=e.length-1:i===`up`&&t===e.length-1&&(c.preferredTargetIndex=0),o.xDirection=null}if(l>zM&&a){let t=c.preferredTargetIndex||0;a===`left`?this.direction===`ltr`?t0&&(c.preferredTargetIndex=t-1,c.lastSwitchX=n):a===`right`&&(this.direction===`ltr`?t>0&&(c.preferredTargetIndex=t-1,c.lastSwitchX=n):t{let i=this.keyMap.get(r.key);e.visitNode&&(r=e.visitNode(r)),this.keyMap.set(r.key,r);let a=new Set,o=null,s=!1;if(r.type===`item`){for(let e of r.childNodes)if(e.props?.colSpan!==void 0){s=!0;break}}for(let e of r.childNodes)e.type===`cell`&&s&&(e.colspan=e.props?.colSpan,e.colSpan=e.props?.colSpan,e.colIndex=o?(o.colIndex??o.index)+(o.colSpan??1):e.index),e.type===`cell`&&e.parentKey==null&&(e.parentKey=r.key),a.add(e.key),o?(o.nextKey=e.key,e.prevKey=o.key):e.prevKey=null,t(e),o=e;if(o&&(o.nextKey=null),i)for(let e of i.childNodes)a.has(e.key)||n(e)},n=e=>{this.keyMap.delete(e.key);for(let t of e.childNodes)this.keyMap.get(t.key)===t&&n(t)},r=null;for(let[n,i]of e.items.entries()){let e={...i,level:i.level??0,key:i.key??`row-`+n,type:i.type??`row`,value:i.value??null,hasChildNodes:!0,childNodes:[...i.childNodes],rendered:i.rendered,textValue:i.textValue??``,index:i.index??n};r?(r.nextKey=e.key,e.prevKey=r.key):e.prevKey=null,this.rows.push(e),t(e),r=e}r&&(r.nextKey=null)}*[Symbol.iterator](){yield*[...this.rows]}get size(){return[...this.rows].length}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);return t?t.prevKey??null:null}getKeyAfter(e){let t=this.keyMap.get(e);return t?t.nextKey??null:null}getFirstKey(){return[...this.rows][0]?.key}getLastKey(){let e=[...this.rows];return e[e.length-1]?.key}getItem(e){return this.keyMap.get(e)??null}at(e){let t=[...this.getKeys()];return this.getItem(t[e])}getChildren(e){return this.keyMap.get(e)?.childNodes||[]}},UM=`row-header-column-`+Math.random().toString(36).slice(2),WM=`row-header-column-`+Math.random().toString(36).slice(2);UM===WM;)WM=`row-header-column-`+Math.random().toString(36).slice(2);function GM(e,t){if(t.length===0)return[];let n=[],r=new Map;for(let i of t){let t=i.parentKey,a=[i];for(;t!=null;){let n=e.get(t);if(!n)break;if(r.has(n)){n.colSpan??=0,n.colSpan++,n.colspan=n.colSpan;let{column:e,index:t}=r.get(n);if(t>a.length)break;for(let n=t;ne.length)),a=Array(i).fill(0).map(()=>[]),o=0;for(let e of n){let t=i-1;for(let n of e){if(n){let e=a[t],r=e.reduce((e,t)=>e+(t.colSpan??1),0);if(r0&&(e[e.length-1].nextKey=i.key,i.prevKey=e[e.length-1].key),e.push(i)}e.length>0&&(e[e.length-1].nextKey=n.key,n.prevKey=e[e.length-1].key),n.level=t,n.colIndex=o,e.push(n)}t--}o++}let s=0;for(let e of a){let n=e.reduce((e,t)=>e+(t.colSpan??1),0);if(n({type:`headerrow`,key:`headerrow-`+t,index:t,value:null,rendered:null,level:0,hasChildNodes:!0,childNodes:e,textValue:``}))}var KM=class extends HM{constructor(e,t,n){let r=new Set,i=null,a=[];if(n?.showSelectionCheckboxes){let e={type:`column`,key:UM,value:null,textValue:``,level:0,index:+!!n?.showDragButtons,hasChildNodes:!1,rendered:null,childNodes:[],props:{isSelectionCell:!0}};a.unshift(e)}if(n?.showDragButtons){let e={type:`column`,key:WM,value:null,textValue:``,level:0,index:0,hasChildNodes:!1,rendered:null,childNodes:[],props:{isDragButtonCell:!0}};a.unshift(e)}let o=[],s=new Map,c=e=>{switch(e.type){case`body`:i=e;break;case`column`:s.set(e.key,e),e.hasChildNodes||(a.push(e),e.props.isRowHeader&&r.add(e.key));break;case`item`:o.push(e);return}for(let t of e.childNodes)c(t)};for(let t of e)c(t);let l=GM(s,a);if(l.forEach((e,t)=>o.splice(t,0,e)),super({columnCount:a.length,items:o,visitNode:e=>(e.column=a[e.index],e)}),this._size=0,this.columns=a,this.rowHeaderColumnKeys=r,this.body=i,this.headerRows=l,this._size=[...i.childNodes].length,this.rowHeaderColumnKeys.size===0){let e=this.columns.find(e=>!e.props?.isDragButtonCell&&!e.props?.isSelectionCell);e&&this.rowHeaderColumnKeys.add(e.key)}}*[Symbol.iterator](){yield*this.body.childNodes}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){return this.keyMap.get(e)?.prevKey??null}getKeyAfter(e){return this.keyMap.get(e)?.nextKey??null}getFirstKey(){return Uy(this.body.childNodes)?.key??null}getLastKey(){return Gy(this.body.childNodes)?.key??null}getItem(e){return e===this.body.key?this.body:this.keyMap.get(e)??null}at(e){let t=[...this.getKeys()];return this.getItem(t[e])}getChildren(e){if(e===this.body.key)return this.body.childNodes;let t=this.getItem(e);return t?.type===`item`?[...t.childNodes].filter(e=>e.type===`cell`):super.getChildren(e)}getTextValue(e){let t=this.getItem(e);if(!t)return``;if(t.textValue)return t.textValue;let n=this.rowHeaderColumnKeys;if(n){let e=[];for(let r of t.childNodes){let t=this.columns[r.index];if(n.has(t.key)&&r.textValue&&e.push(r.textValue),e.length===n.size)break}return e.join(` `)}return``}};function qM(e){return e!=null&&(!isNaN(e)||String(e).match(/^(\d+)(?=%$)/)!==null)}function JM(e){if(!e||typeof e==`number`)return 1;let t=e.match(/^(.+)(?=fr$)/);return t?parseFloat(t[0]):1}function YM(e,t){if(typeof e==`string`){let n=e.match(/^(\d+)(?=%$)/);if(!n)throw Error(`Only percentages or numbers are supported for static column widths`);return t*(parseFloat(n[0])/100)}return e}function XM(e,t){return e==null?2**53-1:YM(e,t)}function ZM(e,t){return e==null?0:YM(e,t)}function QM(e,t,n,r,i){let a=e,o=Math.floor(e),s=e-o>0;e=o;let c=!1,l=t.map((t,a)=>{let o=n.get(t.key)==null?t.width??t.defaultWidth??r?.(a)??`1fr`:n.get(t.key)??`1fr`,s=!1,l=0,u=0,d=0;qM(o)?(l=YM(o,e),s=!0):(u=JM(o),u<=0&&(s=!0));let f=ZM(t.minWidth??i?.(a)??0,e),p=XM(t.maxWidth,e),m=Math.max(f,Math.min(l,p));return s?d=m:l>m&&(s=!0,d=m),s||(c=!0),{frozen:s,baseSize:l,hypotheticalMainSize:m,min:f,max:p,flex:u,targetMainSize:d,violation:0}});for(;c;){let t=0,n=0;l.forEach(e=>{e.frozen?t+=e.targetMainSize:(t+=e.baseSize,n+=e.flex)});let r=e-t;r>0&&l.forEach(e=>{if(!e.frozen){let t=e.flex/n;e.targetMainSize=e.baseSize+t*r}});let i=0;l.forEach(e=>{if(e.violation=0,!e.frozen){let{min:t,max:n,targetMainSize:r}=e;e.targetMainSize=Math.max(t,Math.min(r,n)),e.violation=e.targetMainSize-r,i+=e.violation}}),c=!1,l.forEach(e=>{i===0||Math.sign(i)===Math.sign(e.violation)?e.frozen=!0:e.frozen||(c=!0)})}let u=$M(l);if(s&&u.length>0){let e=a.toString().split(`.`)[1],t=u[u.length-1].toString();u[u.length-1]=Number(t+`.`+e)}return u}function $M(e){let t=0,n=0,r=[];return e.forEach(function(e){let i=e.targetMainSize,a=Math.round(i+t)-n;t+=i,n+=a,r.push(a)}),r}var eN=class{constructor(e){this.columnWidths=new Map,this.columnMinWidths=new Map,this.columnMaxWidths=new Map,this.getDefaultWidth=e?.getDefaultWidth??(()=>`1fr`),this.getDefaultMinWidth=e?.getDefaultMinWidth??(()=>75)}splitColumnsIntoControlledAndUncontrolled(e){return e.reduce((e,t)=>(t.props.width==null?e[1].set(t.key,t):e[0].set(t.key,t),e),[new Map,new Map])}recombineColumns(e,t,n,r){return new Map(e.map(e=>n.has(e.key)?[e.key,t.get(e.key)]:[e.key,r.get(e.key).props.width]))}getInitialUncontrolledWidths(e){return new Map(Array.from(e).map(([e,t])=>[e,t.props.defaultWidth??this.getDefaultWidth?.(t)??`1fr`]))}getColumnWidth(e){return this.columnWidths.get(e)??0}getColumnMinWidth(e){return this.columnMinWidths.get(e)??0}getColumnMaxWidth(e){return this.columnMaxWidths.get(e)??0}resizeColumnWidth(e,t,n,r){let i=this.columnWidths,a=!0,o=new Map;return r=Math.max(this.getColumnMinWidth(n),Math.min(this.getColumnMaxWidth(n),Math.floor(r))),e.columns.forEach(e=>{e.key===n?(o.set(e.key,r),a=!1):a?o.set(e.key,i.get(e.key)??0):o.set(e.key,e.props.width??t.get(e.key))}),o}buildColumnWidths(e,t,n){return this.columnWidths=new Map,this.columnMinWidths=new Map,this.columnMaxWidths=new Map,QM(e,t.columns.map(e=>({...e.props,key:e.key})),n,e=>this.getDefaultWidth(t.columns[e]),e=>this.getDefaultMinWidth(t.columns[e])).forEach((n,r)=>{let i=t.columns[r].key,a=t.columns[r];this.columnWidths.set(i,n),this.columnMinWidths.set(i,ZM(a.props.minWidth??this.getDefaultMinWidth(a),e)),this.columnMaxWidths.set(i,XM(a.props.maxWidth,e))}),this.columnWidths}};function tN(e,t){let{getDefaultWidth:n,getDefaultMinWidth:r,tableWidth:i=0}=e,[a,o]=(0,v.useState)(null),s=(0,v.useMemo)(()=>new eN({getDefaultWidth:n,getDefaultMinWidth:r}),[n,r]),[c,l]=(0,v.useMemo)(()=>s.splitColumnsIntoControlledAndUncontrolled(t.collection.columns),[t.collection.columns,s]),[u,d]=(0,v.useState)(()=>s.getInitialUncontrolledWidths(l)),[f,p]=(0,v.useState)(t.collection.columns);t.collection.columns!==f&&((t.collection.columns.length!==f.length||t.collection.columns.some((e,t)=>e.key!==f[t].key))&&d(s.getInitialUncontrolledWidths(l)),p(t.collection.columns));let m=(0,v.useMemo)(()=>s.recombineColumns(t.collection.columns,u,l,c),[t.collection.columns,u,l,c,s]),h=(0,v.useCallback)(e=>{o(e)},[o]),g=(0,v.useCallback)((e,n)=>{let r=s.resizeColumnWidth(t.collection,u,e,n),i=new Map(Array.from(l).map(([e])=>[e,r.get(e)]));return i.set(e,n),d(i),r},[l,d,s,t.collection,u]),_=(0,v.useCallback)(()=>{o(null)},[o]),y=(0,v.useMemo)(()=>s.buildColumnWidths(i,t.collection,m),[i,t.collection,m,s]);return(0,v.useMemo)(()=>({resizingColumn:a,updateResizedColumns:g,startResize:h,endResize:_,getColumnWidth:e=>s.getColumnWidth(e),getColumnMinWidth:e=>s.getColumnMinWidth(e),getColumnMaxWidth:e=>s.getColumnMaxWidth(e),tableState:t,columnWidths:y}),[s,y,a,g,h,_,t])}function nN(e){let{collection:t,focusMode:n}=e,r=e.UNSAFE_selectionState||db(e),i=(0,v.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),a=r.setFocusedKey;r.setFocusedKey=(e,r)=>{if(n===`cell`&&e!=null){let n=t.getItem(e);if(n?.type===`item`){let i=Hy(n,t);e=r===`last`?Gy(i)?.key??null:Uy(i)?.key??null}}a(e,r)};let o=(0,v.useMemo)(()=>new rb(t,r),[t,r]),s=(0,v.useRef)(null);return(0,v.useEffect)(()=>{if(r.focusedKey!=null&&s.current&&!t.getItem(r.focusedKey)){let e=s.current.getItem(r.focusedKey),n=e?.parentKey!=null&&(e.type===`cell`||e.type===`rowheader`||e.type===`column`)?s.current.getItem(e.parentKey):e;if(!n){r.setFocusedKey(null);return}let i=s.current.rows,a=t.rows,c=i.length-a.length,l=Math.min(c>1?Math.max(n.index-c+1,0):n.index,a.length-1),u=null;for(let e=Math.max(0,l);e=0;e--)if(!o.isDisabled(a[e].key)&&a[e].type!==`headerrow`){u=a[e];break}}if(u){let i=u.hasChildNodes?[...Hy(u,t)]:[],a=u.hasChildNodes&&n!==e&&e&&e.index({showSelectionCheckboxes:i&&r!==`none`,showDragButtons:a,selectionMode:r,columns:[]}),[e.children,i,r,a]),c=lb(e,(0,v.useCallback)(e=>new KM(e,null,s),[s]),s),{disabledKeys:l,selectionManager:u}=nN({...e,collection:c,disabledBehavior:e.disabledBehavior||`selection`}),[d,f]=eh(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,e.onExpandedChange);return{collection:c,disabledKeys:l,selectionManager:u,showSelectionCheckboxes:e.showSelectionCheckboxes||!1,sortDescriptor:e.sortDescriptor??null,isKeyboardNavigationDisabled:c.size===0||t,setKeyboardNavigationDisabled:n,sort(t,n){e.onSortChange?.({column:t,direction:n??(e.sortDescriptor?.column===t?rN[e.sortDescriptor.direction]:`ascending`)})},expandedKeys:d,toggleKey(e){f(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},treeColumn:o}}function aN(e,t){let n=(0,v.useMemo)(()=>t?e.collection.filter(t):e.collection,[e.collection,t]),r=e.selectionManager.withCollection(n);return{...e,collection:n,selectionManager:r}}var oN=class{constructor(e){if(this.collection=e.collection,this.disabledKeys=e.disabledKeys,this.disabledBehavior=e.disabledBehavior||`all`,this.direction=e.direction,this.collator=e.collator,!e.layout&&!e.ref)throw Error(`Either a layout or a ref must be specified.`);this.layoutDelegate=e.layoutDelegate||(e.layout?new sN(e.layout):new Py(e.ref)),this.focusMode=e.focusMode??`row`}isCell(e){return e.type===`cell`}isRow(e){return e.type===`row`||e.type===`item`}isDisabled(e){return this.disabledBehavior===`all`&&(e.props?.isDisabled||this.disabledKeys.has(e.key))&&e.props?.disabledBehavior!==`selection`}findPreviousKey(e,t,n=!1){let r=e==null?this.collection.getLastKey():this.collection.getKeyBefore(e);for(;r!=null;){let e=this.collection.getItem(r);if(!e)return null;if((n||!this.isDisabled(e))&&(!t||t(e)))return r;r=this.collection.getKeyBefore(r)}return null}findNextKey(e,t,n=!1){let r=e==null?this.collection.getFirstKey():this.collection.getKeyAfter(e);for(;r!=null;){let e=this.collection.getItem(r);if(!e)return null;if((n||!this.isDisabled(e))&&(!t||t(e)))return r;if(r=this.collection.getKeyAfter(r),r==null)return null}return null}getKeyForItemInRowByIndex(e,t=0){if(t<0)return null;let n=this.collection.getItem(e);if(!n)return null;let r=0;for(let e of Hy(n,this.collection)){if(e.colSpan&&e.colSpan+r>t||(e.colSpan&&(r=r+e.colSpan-1),r===t))return e.key??null;r++}return null}getKeyBelow(e,t){let n=e,r=this.collection.getItem(n);if(!r||(this.isCell(r)&&(n=r.parentKey??null),n==null))return null;if(n=this.findNextKey(n,e=>e.type===`item`,t?.includeDisabled),n!=null){if(this.isCell(r)){let e=r.colIndex?r.colIndex:r.index;return this.getKeyForItemInRowByIndex(n,e)}if(this.focusMode===`row`)return n}return null}getKeyAbove(e,t){let n=e,r=this.collection.getItem(n);if(!r||(this.isCell(r)&&(n=r.parentKey??null),n==null))return null;if(n=this.findPreviousKey(n,e=>e.type===`item`,t?.includeDisabled),n!=null){if(this.isCell(r)){let e=r.colIndex?r.colIndex:r.index;return this.getKeyForItemInRowByIndex(n,e)}if(this.focusMode===`row`)return n}return null}getKeyRightOf(e){let t=this.collection.getItem(e);if(!t)return null;if(this.isRow(t)){let e=Hy(t,this.collection);return(this.direction===`rtl`?Gy(e)?.key:Uy(e)?.key)??null}if(this.isCell(t)&&t.parentKey!=null){let n=this.collection.getItem(t.parentKey);if(!n)return null;let r=Hy(n,this.collection),i=(this.direction===`rtl`?Wy(r,t.index-1):Wy(r,t.index+1))??null;return i?i.key??null:this.focusMode===`row`?t.parentKey??null:(this.direction===`rtl`?this.getFirstKey(e):this.getLastKey(e))??null}return null}getKeyLeftOf(e){let t=this.collection.getItem(e);if(!t)return null;if(this.isRow(t)){let e=Hy(t,this.collection);return(this.direction===`rtl`?Uy(e)?.key:Gy(e)?.key)??null}if(this.isCell(t)&&t.parentKey!=null){let n=this.collection.getItem(t.parentKey);if(!n)return null;let r=Hy(n,this.collection),i=(this.direction===`rtl`?Wy(r,t.index+1):Wy(r,t.index-1))??null;return i?i.key??null:this.focusMode===`row`?t.parentKey??null:(this.direction===`rtl`?this.getLastKey(e):this.getFirstKey(e))??null}return null}getFirstKey(e,t){let n=e??null,r;if(n!=null){if(r=this.collection.getItem(n),!r)return null;if(this.isCell(r)&&!t&&r.parentKey!=null){let e=this.collection.getItem(r.parentKey);return e?Uy(Hy(e,this.collection))?.key??null:null}}if(n=this.findNextKey(void 0,e=>e.type===`item`),n!=null&&(r&&this.isCell(r)&&t||this.focusMode===`cell`)){let e=this.collection.getItem(n);if(!e)return null;n=Uy(Hy(e,this.collection))?.key??null}return n}getLastKey(e,t){let n=e??null,r;if(n!=null){if(r=this.collection.getItem(n),!r)return null;if(this.isCell(r)&&!t&&r.parentKey!=null){let e=this.collection.getItem(r.parentKey);return e?Gy(Hy(e,this.collection))?.key??null:null}}if(n=this.findPreviousKey(void 0,e=>e.type===`item`),n!=null&&(r&&this.isCell(r)&&t||this.focusMode===`cell`)){let e=this.collection.getItem(n);if(!e)return null;n=Gy(Hy(e,this.collection))?.key??null}return n}getKeyPageAbove(e){let t=e,n=this.layoutDelegate.getItemRect(t);if(!n)return null;let r=Math.max(0,n.y+n.height-this.layoutDelegate.getVisibleRect().height);for(;n&&n.y>r&&t!=null&&(t=this.getKeyAbove(t)??null,t!=null);)n=this.layoutDelegate.getItemRect(t);return t}getKeyPageBelow(e){let t=e,n=this.layoutDelegate.getItemRect(t);if(!n)return null;let r=this.layoutDelegate.getVisibleRect().height,i=Math.min(this.layoutDelegate.getContentSize().height,n.y+r);for(;n&&n.y+n.heighte.type===`item`),n==null&&!a&&(n=this.getFirstKey(),a=!0)}return null}},sN=class{constructor(e){this.layout=e}getContentSize(){return this.layout.getContentSize()}getItemRect(e){return this.layout.getLayoutInfo(e)?.rect||null}getVisibleRect(){return this.layout.virtualizer.visibleRect}},cN=new WeakMap;function Yae(e,t,n){let{isVirtualized:r,disallowTypeAhead:i,keyboardDelegate:a,focusMode:o,scrollRef:s,getRowText:c,onRowAction:l,onCellAction:u,escapeKeyBehavior:d=`clearSelection`,shouldSelectOnPressUp:f,keyboardNavigationBehavior:p=`arrow`}=e,{selectionManager:m}=t;!e[`aria-label`]&&!e[`aria-labelledby`]&&console.warn(`An aria-label or aria-labelledby prop is required for accessibility.`);let h=Ly({usage:`search`,sensitivity:`base`}),{direction:g}=bp(),_=t.selectionManager.disabledBehavior,y=(0,v.useMemo)(()=>a||new oN({collection:t.collection,disabledKeys:t.disabledKeys,disabledBehavior:_,ref:n,direction:g,collator:h,focusMode:o}),[a,t.collection,t.disabledKeys,_,n,g,h,o]),{collectionProps:b}=Ny({ref:n,selectionManager:m,keyboardDelegate:y,isVirtualized:r,scrollRef:s,disallowTypeAhead:i,escapeKeyBehavior:d}),x=ms(e.id);cN.set(t,{keyboardDelegate:y,actions:{onRowAction:l,onCellAction:u},shouldSelectOnPressUp:f,keyboardNavigationBehavior:p});let S=fj({selectionManager:m,hasItemActions:!!(l||u)}),C=Us(e,{labelable:!0}),w=(0,v.useCallback)(e=>{if(m.isFocused){Ds(e.currentTarget,U(e))||m.setFocused(!1);return}Ds(e.currentTarget,U(e))&&m.setFocused(!0)},[m]),T=(0,v.useMemo)(()=>({onBlur:b.onBlur,onFocus:w}),[w,b.onBlur]),E=_A(n,{isDisabled:t.collection.size!==0}),D=W(C,{role:`grid`,id:x,"aria-multiselectable":m.selectionMode===`multiple`?`true`:void 0},t.isKeyboardNavigationDisabled?T:b,t.collection.size===0&&{tabIndex:E?-1:0}||void 0,S);return r&&(D[`aria-rowcount`]=t.collection.size,D[`aria-colcount`]=t.collection.columnCount),lj({getRowText:c},t),{gridProps:D}}var lN=new WeakMap;function uN(e){return typeof e==`string`?e.replace(/\s*/g,``):``+e}function dN(e,t){let n=lN.get(e);if(!n)throw Error(`Unknown grid`);return`${n}-${uN(t)}`}function fN(e,t,n){let r=lN.get(e);if(!r)throw Error(`Unknown grid`);return`${r}-${uN(t)}-${uN(n)}`}function pN(e,t){return[...e.collection.rowHeaderColumnKeys].map(n=>fN(e,t,n)).join(` `)}var mN={};mN={ascending:`تصاعدي`,ascendingSort:e=>`\u{62A}\u{631}\u{62A}\u{64A}\u{628} \u{62D}\u{633}\u{628} \u{627}\u{644}\u{639}\u{645}\u{648}\u{62F} ${e.columnName} \u{628}\u{62A}\u{631}\u{62A}\u{64A}\u{628} \u{62A}\u{635}\u{627}\u{639}\u{62F}\u{64A}`,collapse:`طي`,columnSize:e=>`${e.value} \u{628}\u{627}\u{644}\u{628}\u{643}\u{633}\u{644}`,descending:`تنازلي`,descendingSort:e=>`\u{62A}\u{631}\u{62A}\u{64A}\u{628} \u{62D}\u{633}\u{628} \u{627}\u{644}\u{639}\u{645}\u{648}\u{62F} ${e.columnName} \u{628}\u{62A}\u{631}\u{62A}\u{64A}\u{628} \u{62A}\u{646}\u{627}\u{632}\u{644}\u{64A}`,expand:`تمديد`,resizerDescription:`اضغط على مفتاح Enter لبدء تغيير الحجم`,select:`تحديد`,selectAll:`تحديد الكل`,sortable:`عمود قابل للترتيب`};var hN={};hN={ascending:`възходящ`,ascendingSort:e=>`\u{441}\u{43E}\u{440}\u{442}\u{438}\u{440}\u{430}\u{43D}\u{43E} \u{43F}\u{43E} \u{43A}\u{43E}\u{43B}\u{43E}\u{43D}\u{430} ${e.columnName} \u{432}\u{44A}\u{432} \u{432}\u{44A}\u{437}\u{445}\u{43E}\u{434}\u{44F}\u{449} \u{440}\u{435}\u{434}`,collapse:`Свиване`,columnSize:e=>`${e.value} \u{43F}\u{438}\u{43A}\u{441}\u{435}\u{43B}\u{430}`,descending:`низходящ`,descendingSort:e=>`\u{441}\u{43E}\u{440}\u{442}\u{438}\u{440}\u{430}\u{43D}\u{43E} \u{43F}\u{43E} \u{43A}\u{43E}\u{43B}\u{43E}\u{43D}\u{430} ${e.columnName} \u{432} \u{43D}\u{438}\u{437}\u{445}\u{43E}\u{434}\u{44F}\u{449} \u{440}\u{435}\u{434}`,expand:`Разширяване`,resizerDescription:`Натиснете „Enter“, за да започнете да преоразмерявате`,select:`Изберете`,selectAll:`Изберете всичко`,sortable:`сортираща колона`};var gN={};gN={ascending:`vzestupně`,ascendingSort:e=>`\u{159}azeno vzestupn\u{11B} podle sloupce ${e.columnName}`,collapse:`Sbalit`,columnSize:e=>`${e.value} pixel\u{16F}`,descending:`sestupně`,descendingSort:e=>`\u{159}azeno sestupn\u{11B} podle sloupce ${e.columnName}`,expand:`Roztáhnout`,resizerDescription:`Stisknutím klávesy Enter začnete měnit velikost`,select:`Vybrat`,selectAll:`Vybrat vše`,sortable:`sloupec s možností řazení`};var _N={};_N={ascending:`stigende`,ascendingSort:e=>`sorteret efter kolonne ${e.columnName} i stigende r\xe6kkef\xf8lge`,collapse:`Skjul`,columnSize:e=>`${e.value} pixels`,descending:`faldende`,descendingSort:e=>`sorteret efter kolonne ${e.columnName} i faldende r\xe6kkef\xf8lge`,expand:`Udvid`,resizerDescription:`Tryk på Enter for at ændre størrelse`,select:`Vælg`,selectAll:`Vælg alle`,sortable:`sorterbar kolonne`};var vN={};vN={ascending:`aufsteigend`,ascendingSort:e=>`sortiert nach Spalte ${e.columnName} in aufsteigender Reihenfolge`,collapse:`Reduzieren`,columnSize:e=>`${e.value} Pixel`,descending:`absteigend`,descendingSort:e=>`sortiert nach Spalte ${e.columnName} in absteigender Reihenfolge`,expand:`Erweitern`,resizerDescription:`Eingabetaste zum Starten der Größenänderung drücken`,select:`Auswählen`,selectAll:`Alles auswählen`,sortable:`sortierbare Spalte`};var yN={};yN={ascending:`αύξουσα`,ascendingSort:e=>`\u{3B4}\u{3B9}\u{3B1}\u{3BB}\u{3BF}\u{3B3}\u{3AE} \u{3B1}\u{3BD}\u{3AC} \u{3C3}\u{3C4}\u{3AE}\u{3BB}\u{3B7} ${e.columnName} \u{3C3}\u{3B5} \u{3B1}\u{3CD}\u{3BE}\u{3BF}\u{3C5}\u{3C3}\u{3B1} \u{3C3}\u{3B5}\u{3B9}\u{3C1}\u{3AC}`,collapse:`Σύμπτυξη`,columnSize:e=>`${e.value} pixel`,descending:`φθίνουσα`,descendingSort:e=>`\u{3B4}\u{3B9}\u{3B1}\u{3BB}\u{3BF}\u{3B3}\u{3AE} \u{3B1}\u{3BD}\u{3AC} \u{3C3}\u{3C4}\u{3AE}\u{3BB}\u{3B7} ${e.columnName} \u{3C3}\u{3B5} \u{3C6}\u{3B8}\u{3AF}\u{3BD}\u{3BF}\u{3C5}\u{3C3}\u{3B1} \u{3C3}\u{3B5}\u{3B9}\u{3C1}\u{3AC}`,expand:`Ανάπτυξη`,resizerDescription:`Πατήστε Enter για έναρξη της αλλαγής μεγέθους`,select:`Επιλογή`,selectAll:`Επιλογή όλων`,sortable:`Στήλη διαλογής`};var bN={};bN={select:`Select`,selectAll:`Select All`,sortable:`sortable column`,ascending:`ascending`,descending:`descending`,ascendingSort:e=>`sorted by column ${e.columnName} in ascending order`,descendingSort:e=>`sorted by column ${e.columnName} in descending order`,columnSize:e=>`${e.value} pixels`,resizerDescription:`Press Enter to start resizing`,expand:`Expand`,collapse:`Collapse`};var xN={};xN={ascending:`ascendente`,ascendingSort:e=>`ordenado por columna ${e.columnName} en sentido ascendente`,collapse:`Contraer`,columnSize:e=>`${e.value} p\xedxeles`,descending:`descendente`,descendingSort:e=>`ordenado por columna ${e.columnName} en orden descendente`,expand:`Ampliar`,resizerDescription:`Pulse Intro para empezar a redimensionar`,select:`Seleccionar`,selectAll:`Seleccionar todos`,sortable:`columna ordenable`};var SN={};SN={ascending:`tõusev järjestus`,ascendingSort:e=>`sorditud veeru j\xe4rgi ${e.columnName} t\xf5usvas j\xe4rjestuses`,collapse:`Ahenda`,columnSize:e=>`${e.value} pikslit`,descending:`laskuv järjestus`,descendingSort:e=>`sorditud veeru j\xe4rgi ${e.columnName} laskuvas j\xe4rjestuses`,expand:`Laienda`,resizerDescription:`Suuruse muutmise alustamiseks vajutage klahvi Enter`,select:`Vali`,selectAll:`Vali kõik`,sortable:`sorditav veerg`};var CN={};CN={ascending:`nouseva`,ascendingSort:e=>`lajiteltu sarakkeen ${e.columnName} mukaan nousevassa j\xe4rjestyksess\xe4`,collapse:`Pienennä`,columnSize:e=>`${e.value} pikseli\xe4`,descending:`laskeva`,descendingSort:e=>`lajiteltu sarakkeen ${e.columnName} mukaan laskevassa j\xe4rjestyksess\xe4`,expand:`Laajenna`,resizerDescription:`Aloita koon muutos painamalla Enter-näppäintä`,select:`Valitse`,selectAll:`Valitse kaikki`,sortable:`lajiteltava sarake`};var wN={};wN={ascending:`croissant`,ascendingSort:e=>`tri\xe9 en fonction de la colonne\xa0${e.columnName} par ordre croissant`,collapse:`Réduire`,columnSize:e=>`${e.value}\xa0pixels`,descending:`décroissant`,descendingSort:e=>`tri\xe9 en fonction de la colonne\xa0${e.columnName} par ordre d\xe9croissant`,expand:`Développer`,resizerDescription:`Appuyez sur Entrée pour commencer le redimensionnement.`,select:`Sélectionner`,selectAll:`Sélectionner tout`,sortable:`colonne triable`};var TN={};TN={ascending:`עולה`,ascendingSort:e=>`\u{5DE}\u{5D5}\u{5D9}\u{5DF} \u{5DC}\u{5E4}\u{5D9} \u{5E2}\u{5DE}\u{5D5}\u{5D3}\u{5D4} ${e.columnName} \u{5D1}\u{5E1}\u{5D3}\u{5E8} \u{5E2}\u{5D5}\u{5DC}\u{5D4}`,collapse:`כווץ`,columnSize:e=>`${e.value} \u{5E4}\u{5D9}\u{5E7}\u{5E1}\u{5DC}\u{5D9}\u{5DD}`,descending:`יורד`,descendingSort:e=>`\u{5DE}\u{5D5}\u{5D9}\u{5DF} \u{5DC}\u{5E4}\u{5D9} \u{5E2}\u{5DE}\u{5D5}\u{5D3}\u{5D4} ${e.columnName} \u{5D1}\u{5E1}\u{5D3}\u{5E8} \u{5D9}\u{5D5}\u{5E8}\u{5D3}`,expand:`הרחב`,resizerDescription:`הקש Enter כדי לשנות את הגודל`,select:`בחר`,selectAll:`בחר הכול`,sortable:`עמודה שניתן למיין`};var EN={};EN={ascending:`rastući`,ascendingSort:e=>`razvrstano po stupcima ${e.columnName} rastu\u{107}em redoslijedom`,collapse:`Sažmi`,columnSize:e=>`${e.value} piksela`,descending:`padajući`,descendingSort:e=>`razvrstano po stupcima ${e.columnName} padaju\u{107}im redoslijedom`,expand:`Proširi`,resizerDescription:`Pritisnite Enter da biste započeli promenu veličine`,select:`Odaberite`,selectAll:`Odaberite sve`,sortable:`stupac koji se može razvrstati`};var DN={};DN={ascending:`növekvő`,ascendingSort:e=>`rendezve a(z) ${e.columnName} oszlop szerint, n\xf6vekv\u{151} sorrendben`,collapse:`Összecsukás`,columnSize:e=>`${e.value} k\xe9ppont`,descending:`csökkenő`,descendingSort:e=>`rendezve a(z) ${e.columnName} oszlop szerint, cs\xf6kken\u{151} sorrendben`,expand:`Kibontás`,resizerDescription:`Nyomja le az Enter billentyűt az átméretezés megkezdéséhez`,select:`Kijelölés`,selectAll:`Összes kijelölése`,sortable:`rendezendő oszlop`};var ON={};ON={ascending:`crescente`,ascendingSort:e=>`in ordine crescente in base alla colonna ${e.columnName}`,collapse:`Comprimi`,columnSize:e=>`${e.value} pixel`,descending:`decrescente`,descendingSort:e=>`in ordine decrescente in base alla colonna ${e.columnName}`,expand:`Espandi`,resizerDescription:`Premi Invio per iniziare a ridimensionare`,select:`Seleziona`,selectAll:`Seleziona tutto`,sortable:`colonna ordinabile`};var kN={};kN={ascending:`昇順`,ascendingSort:e=>`\u{5217} ${e.columnName} \u{3092}\u{6607}\u{9806}\u{3067}\u{4E26}\u{3079}\u{66FF}\u{3048}`,collapse:`折りたたむ`,columnSize:e=>`${e.value} \u{30D4}\u{30AF}\u{30BB}\u{30EB}`,descending:`降順`,descendingSort:e=>`\u{5217} ${e.columnName} \u{3092}\u{964D}\u{9806}\u{3067}\u{4E26}\u{3079}\u{66FF}\u{3048}`,expand:`展開`,resizerDescription:`Enter キーを押してサイズ変更を開始`,select:`選択`,selectAll:`すべて選択`,sortable:`並べ替え可能な列`};var AN={};AN={ascending:`오름차순`,ascendingSort:e=>`${e.columnName} \u{C5F4}\u{C744} \u{AE30}\u{C900}\u{C73C}\u{B85C} \u{C624}\u{B984}\u{CC28}\u{C21C}\u{C73C}\u{B85C} \u{C815}\u{B82C}\u{B428}`,collapse:`접기`,columnSize:e=>`${e.value} \u{D53D}\u{C140}`,descending:`내림차순`,descendingSort:e=>`${e.columnName} \u{C5F4}\u{C744} \u{AE30}\u{C900}\u{C73C}\u{B85C} \u{B0B4}\u{B9BC}\u{CC28}\u{C21C}\u{C73C}\u{B85C} \u{C815}\u{B82C}\u{B428}`,expand:`펼치기`,resizerDescription:`크기 조정을 시작하려면 Enter를 누르세요.`,select:`선택`,selectAll:`모두 선택`,sortable:`정렬 가능한 열`};var jN={};jN={ascending:`didėjančia tvarka`,ascendingSort:e=>`surikiuota pagal stulpel\u{12F} ${e.columnName} did\u{117}jan\u{10D}ia tvarka`,collapse:`Sutraukti`,columnSize:e=>`${e.value} piks.`,descending:`mažėjančia tvarka`,descendingSort:e=>`surikiuota pagal stulpel\u{12F} ${e.columnName} ma\u{17E}\u{117}jan\u{10D}ia tvarka`,expand:`Išskleisti`,resizerDescription:`Paspauskite „Enter“, kad pradėtumėte keisti dydį`,select:`Pasirinkti`,selectAll:`Pasirinkti viską`,sortable:`rikiuojamas stulpelis`};var MN={};MN={ascending:`augošā secībā`,ascendingSort:e=>`k\u{101}rtots p\u{113}c kolonnas ${e.columnName} augo\u{161}\u{101} sec\u{12B}b\u{101}`,collapse:`Sakļaut`,columnSize:e=>`${e.value} pikse\u{13C}i`,descending:`dilstošā secībā`,descendingSort:e=>`k\u{101}rtots p\u{113}c kolonnas ${e.columnName} dilsto\u{161}\u{101} sec\u{12B}b\u{101}`,expand:`Izvērst`,resizerDescription:`Nospiediet Enter, lai sāktu izmēru mainīšanu`,select:`Atlasīt`,selectAll:`Atlasīt visu`,sortable:`kārtojamā kolonna`};var NN={};NN={ascending:`stigende`,ascendingSort:e=>`sortert etter kolonne ${e.columnName} i stigende rekkef\xf8lge`,collapse:`Skjul`,columnSize:e=>`${e.value} piksler`,descending:`synkende`,descendingSort:e=>`sortert etter kolonne ${e.columnName} i synkende rekkef\xf8lge`,expand:`Utvid`,resizerDescription:`Trykk på Enter for å starte størrelsesendring`,select:`Velg`,selectAll:`Velg alle`,sortable:`kolonne som kan sorteres`};var PN={};PN={ascending:`oplopend`,ascendingSort:e=>`gesorteerd in oplopende volgorde in kolom ${e.columnName}`,collapse:`Samenvouwen`,columnSize:e=>`${e.value} pixels`,descending:`aflopend`,descendingSort:e=>`gesorteerd in aflopende volgorde in kolom ${e.columnName}`,expand:`Uitvouwen`,resizerDescription:`Druk op Enter om het formaat te wijzigen`,select:`Selecteren`,selectAll:`Alles selecteren`,sortable:`sorteerbare kolom`};var FN={};FN={ascending:`rosnąco`,ascendingSort:e=>`posortowano wed\u{142}ug kolumny ${e.columnName} w porz\u{105}dku rosn\u{105}cym`,collapse:`Zwiń`,columnSize:e=>`Liczba pikseli: ${e.value}`,descending:`malejąco`,descendingSort:e=>`posortowano wed\u{142}ug kolumny ${e.columnName} w porz\u{105}dku malej\u{105}cym`,expand:`Rozwiń`,resizerDescription:`Naciśnij Enter, aby rozpocząć zmienianie rozmiaru`,select:`Zaznacz`,selectAll:`Zaznacz wszystko`,sortable:`kolumna z możliwością sortowania`};var IN={};IN={ascending:`crescente`,ascendingSort:e=>`classificado pela coluna ${e.columnName} em ordem crescente`,collapse:`Recolher`,columnSize:e=>`${e.value} pixels`,descending:`decrescente`,descendingSort:e=>`classificado pela coluna ${e.columnName} em ordem decrescente`,expand:`Expandir`,resizerDescription:`Pressione Enter para começar a redimensionar`,select:`Selecionar`,selectAll:`Selecionar tudo`,sortable:`coluna classificável`};var LN={};LN={ascending:`ascendente`,ascendingSort:e=>`Ordenar por coluna ${e.columnName} em ordem ascendente`,collapse:`Colapsar`,columnSize:e=>`${e.value} pixels`,descending:`descendente`,descendingSort:e=>`Ordenar por coluna ${e.columnName} em ordem descendente`,expand:`Expandir`,resizerDescription:`Prima Enter para iniciar o redimensionamento`,select:`Selecionar`,selectAll:`Selecionar tudo`,sortable:`Coluna ordenável`};var RN={};RN={ascending:`crescătoare`,ascendingSort:e=>`sortate dup\u{103} coloana ${e.columnName} \xeen ordine cresc\u{103}toare`,collapse:`Restrângeți`,columnSize:e=>`${e.value} pixeli`,descending:`descrescătoare`,descendingSort:e=>`sortate dup\u{103} coloana ${e.columnName} \xeen ordine descresc\u{103}toare`,expand:`Extindeți`,resizerDescription:`Apăsați pe Enter pentru a începe redimensionarea`,select:`Selectare`,selectAll:`Selectare totală`,sortable:`coloană sortabilă`};var zN={};zN={ascending:`возрастание`,ascendingSort:e=>`\u{441}\u{43E}\u{440}\u{442}\u{438}\u{440}\u{43E}\u{432}\u{430}\u{442}\u{44C} \u{441}\u{442}\u{43E}\u{43B}\u{431}\u{435}\u{446} ${e.columnName} \u{432} \u{43F}\u{43E}\u{440}\u{44F}\u{434}\u{43A}\u{435} \u{432}\u{43E}\u{437}\u{440}\u{430}\u{441}\u{442}\u{430}\u{43D}\u{438}\u{44F}`,collapse:`Свернуть`,columnSize:e=>`${e.value} \u{43F}\u{438}\u{43A}\u{441}.`,descending:`убывание`,descendingSort:e=>`\u{441}\u{43E}\u{440}\u{442}\u{438}\u{440}\u{43E}\u{432}\u{430}\u{442}\u{44C} \u{441}\u{442}\u{43E}\u{43B}\u{431}\u{435}\u{446} ${e.columnName} \u{432} \u{43F}\u{43E}\u{440}\u{44F}\u{434}\u{43A}\u{435} \u{443}\u{431}\u{44B}\u{432}\u{430}\u{43D}\u{438}\u{44F}`,expand:`Развернуть`,resizerDescription:`Нажмите клавишу Enter для начала изменения размеров`,select:`Выбрать`,selectAll:`Выбрать все`,sortable:`сортируемый столбец`};var BN={};BN={ascending:`vzostupne`,ascendingSort:e=>`zoraden\xe9 zostupne pod\u{13E}a st\u{13A}pca ${e.columnName}`,collapse:`Zbaliť`,columnSize:e=>`Po\u{10D}et pixelov: ${e.value}`,descending:`zostupne`,descendingSort:e=>`zoraden\xe9 zostupne pod\u{13E}a st\u{13A}pca ${e.columnName}`,expand:`Rozbaliť`,resizerDescription:`Stlačením klávesu Enter začnete zmenu veľkosti`,select:`Vybrať`,selectAll:`Vybrať všetko`,sortable:`zoraditeľný stĺpec`};var VN={};VN={ascending:`naraščajoče`,ascendingSort:e=>`razvr\u{161}\u{10D}eno po stolpcu ${e.columnName} v nara\u{161}\u{10D}ajo\u{10D}em vrstnem redu`,collapse:`Strni`,columnSize:e=>`${e.value} slikovnih pik`,descending:`padajoče`,descendingSort:e=>`razvr\u{161}\u{10D}eno po stolpcu ${e.columnName} v padajo\u{10D}em vrstnem redu`,expand:`Razširi`,resizerDescription:`Pritisnite tipko Enter da začnete spreminjati velikost`,select:`Izberite`,selectAll:`Izberite vse`,sortable:`razvrstljivi stolpec`};var HN={};HN={ascending:`rastući`,ascendingSort:e=>`sortirano po kolonama ${e.columnName} rastu\u{107}im redosledom`,collapse:`Skupi`,columnSize:e=>`${e.value} piksela`,descending:`padajući`,descendingSort:e=>`sortirano po kolonama ${e.columnName} padaju\u{107}im redosledom`,expand:`Proširi`,resizerDescription:`Pritisnite Enter da biste započeli promenu veličine`,select:`Izaberite`,selectAll:`Izaberite sve`,sortable:`kolona koja se može sortirati`};var UN={};UN={ascending:`stigande`,ascendingSort:e=>`sorterat p\xe5 kolumn ${e.columnName} i stigande ordning`,collapse:`Dölj`,columnSize:e=>`${e.value} pixlar`,descending:`fallande`,descendingSort:e=>`sorterat p\xe5 kolumn ${e.columnName} i fallande ordning`,expand:`Expandera`,resizerDescription:`Tryck på Retur för att börja ändra storlek`,select:`Markera`,selectAll:`Markera allt`,sortable:`sorterbar kolumn`};var WN={};WN={ascending:`artan sırada`,ascendingSort:e=>`${e.columnName} s\xfctuna g\xf6re artan d\xfczende s\u{131}rala`,collapse:`Daralt`,columnSize:e=>`${e.value} piksel`,descending:`azalan sırada`,descendingSort:e=>`${e.columnName} s\xfctuna g\xf6re azalan d\xfczende s\u{131}rala`,expand:`Genişlet`,resizerDescription:`Yeniden boyutlandırmak için Enter'a basın`,select:`Seç`,selectAll:`Tümünü Seç`,sortable:`Sıralanabilir sütun`};var GN={};GN={ascending:`висхідний`,ascendingSort:e=>`\u{432}\u{456}\u{434}\u{441}\u{43E}\u{440}\u{442}\u{43E}\u{432}\u{430}\u{43D}\u{43E} \u{437}\u{430} \u{441}\u{442}\u{43E}\u{432}\u{43F}\u{446}\u{435}\u{43C} ${e.columnName} \u{443} \u{432}\u{438}\u{441}\u{445}\u{456}\u{434}\u{43D}\u{43E}\u{43C}\u{443} \u{43F}\u{43E}\u{440}\u{44F}\u{434}\u{43A}\u{443}`,collapse:`Згорнути`,columnSize:e=>`${e.value} \u{43F}\u{456}\u{43A}\u{441}.`,descending:`низхідний`,descendingSort:e=>`\u{432}\u{456}\u{434}\u{441}\u{43E}\u{440}\u{442}\u{43E}\u{432}\u{430}\u{43D}\u{43E} \u{437}\u{430} \u{441}\u{442}\u{43E}\u{432}\u{43F}\u{446}\u{435}\u{43C} ${e.columnName} \u{443} \u{43D}\u{438}\u{437}\u{445}\u{456}\u{434}\u{43D}\u{43E}\u{43C}\u{443} \u{43F}\u{43E}\u{440}\u{44F}\u{434}\u{43A}\u{443}`,expand:`Розгорнути`,resizerDescription:`Натисніть Enter, щоб почати зміну розміру`,select:`Вибрати`,selectAll:`Вибрати все`,sortable:`сортувальний стовпець`};var KN={};KN={ascending:`升序`,ascendingSort:e=>`\u{6309}\u{5217} ${e.columnName} \u{5347}\u{5E8F}\u{6392}\u{5E8F}`,collapse:`折叠`,columnSize:e=>`${e.value} \u{50CF}\u{7D20}`,descending:`降序`,descendingSort:e=>`\u{6309}\u{5217} ${e.columnName} \u{964D}\u{5E8F}\u{6392}\u{5E8F}`,expand:`扩展`,resizerDescription:`按 Enter 开始调整大小。`,select:`选择`,selectAll:`全选`,sortable:`可排序的列`};var qN={};qN={ascending:`遞增`,ascendingSort:e=>`\u{5DF2}\u{4F9D}\u{64DA}\u{300C}${e.columnName}\u{300D}\u{6B04}\u{905E}\u{589E}\u{6392}\u{5E8F}`,collapse:`收合`,columnSize:e=>`${e.value} \u{50CF}\u{7D20}`,descending:`遞減`,descendingSort:e=>`\u{5DF2}\u{4F9D}\u{64DA}\u{300C}${e.columnName}\u{300D}\u{6B04}\u{905E}\u{6E1B}\u{6392}\u{5E8F}`,expand:`展開`,resizerDescription:`按 Enter 鍵以開始調整大小`,select:`選取`,selectAll:`全選`,sortable:`可排序的欄`};var JN={};JN={"ar-AE":mN,"bg-BG":hN,"cs-CZ":gN,"da-DK":_N,"de-DE":vN,"el-GR":yN,"en-US":bN,"es-ES":xN,"et-EE":SN,"fi-FI":CN,"fr-FR":wN,"he-IL":TN,"hr-HR":EN,"hu-HU":DN,"it-IT":ON,"ja-JP":kN,"ko-KR":AN,"lt-LT":jN,"lv-LV":MN,"nb-NO":NN,"nl-NL":PN,"pl-PL":FN,"pt-BR":IN,"pt-PT":LN,"ro-RO":RN,"ru-RU":zN,"sk-SK":BN,"sl-SI":VN,"sr-SP":HN,"sv-SE":UN,"tr-TR":WN,"uk-UA":GN,"zh-CN":KN,"zh-TW":qN};var Xae=class extends oN{isCell(e){return e.type===`cell`||e.type===`rowheader`||e.type===`column`}getKeyBelow(e,t){let n=this.collection.getItem(e);if(!n)return null;if(n.type===`column`){let e=Uy(Hy(n,this.collection));if(e)return e.key;let t=this.getFirstKey();return t==null||!this.collection.getItem(t)?null:super.getKeyForItemInRowByIndex(t,n.index)}return super.getKeyBelow(e,t)}getKeyAbove(e,t){let n=this.collection.getItem(e);if(!n)return null;if(n.type===`column`){let e=n.parentKey==null?null:this.collection.getItem(n.parentKey);return e&&e.type===`column`?e.key:null}let r=super.getKeyAbove(e,t),i=r==null?null:this.collection.getItem(r);return i&&i.type!==`headerrow`?r:this.isCell(n)?this.collection.columns[n.index].key:this.collection.columns[0].key}findNextColumnKey(e){let t=this.findNextKey(e.key,e=>e.type===`column`);if(t!=null)return t;let n=this.collection.headerRows[e.level];for(let e of Hy(n,this.collection))if(e.type===`column`)return e.key;return null}findPreviousColumnKey(e){let t=this.findPreviousKey(e.key,e=>e.type===`column`);if(t!=null)return t;let n=this.collection.headerRows[e.level],r=[...Hy(n,this.collection)];for(let e=r.length-1;e>=0;e--){let t=r[e];if(t.type===`column`)return t.key}return null}getKeyRightOf(e){let t=this.collection.getItem(e);return t?t.type===`column`?this.direction===`rtl`?this.findPreviousColumnKey(t):this.findNextColumnKey(t):super.getKeyRightOf(e):null}getKeyLeftOf(e){let t=this.collection.getItem(e);return t?t.type===`column`?this.direction===`rtl`?this.findNextColumnKey(t):this.findPreviousColumnKey(t):super.getKeyLeftOf(e):null}getKeyForSearch(e,t){if(!this.collator)return null;let n=this.collection,r=t??this.getFirstKey();if(r==null)return null;let i=n.getItem(r);i?.type===`cell`&&(r=i.parentKey??null);let a=!1;for(;r!=null;){let o=n.getItem(r);if(!o)return null;if(o.textValue){let t=o.textValue.slice(0,e.length);if(this.collator.compare(t,e)===0)return o.key}for(let r of Hy(o,this.collection)){let a=n.columns[r.index];if(n.rowHeaderColumnKeys.has(a.key)&&r.textValue){let a=r.textValue.slice(0,e.length);if(this.collator.compare(a,e)===0)return(t==null?i:n.getItem(t))?.type===`cell`?r.key:o.key}}r=this.getKeyBelow(r),r==null&&!a&&(r=this.getFirstKey(),a=!0)}return null}};function Zae(e){return e&&e.__esModule?e.default:e}function Qae(e,t,n){let{keyboardDelegate:r,isVirtualized:i,layoutDelegate:a,layout:o}=e,s=Ly({usage:`search`,sensitivity:`base`}),{direction:c}=bp(),l=t.selectionManager.disabledBehavior,u=(0,v.useMemo)(()=>r||new Xae({collection:t.collection,disabledKeys:t.disabledKeys,disabledBehavior:l,ref:n,direction:c,collator:s,layoutDelegate:a,layout:o}),[r,t.collection,t.disabledKeys,l,n,c,s,a,o]),d=ms(e.id);lN.set(t,d);let{gridProps:f}=Yae({...e,id:d,keyboardDelegate:u},t,n);i&&(f[`aria-rowcount`]=t.collection.size+t.collection.headerRows.length),t.treeColumn!=null&&(f.role=`treegrid`);let{column:p,direction:m}=t.sortDescriptor||{},h=s_(Zae(JN),`@react-aria/table`),g=(0,v.useMemo)(()=>{let e=t.collection.columns.find(e=>e.key===p)?.textValue??``;return m&&p?h.format(`${m}Sort`,{columnName:e}):void 0},[m,p,t.collection.columns]),_=gc(g);return ec(()=>{g&&Gp(g,`assertive`,500)},[g]),{gridProps:W(f,_,{"aria-describedby":[_[`aria-describedby`],f[`aria-describedby`]].filter(Boolean).join(` `)})}}function YN(e,t,n){let{node:r,isVirtualized:i,focusMode:a,allowsArrowNavigation:o,shouldSelectOnPressUp:s,onAction:c}=e,{direction:l}=bp(),{keyboardDelegate:u,actions:{onCellAction:d},keyboardNavigationBehavior:f}=cN.get(t),p=a??(f===`tab`?`cell`:`child`),m=(0,v.useRef)(null),h=()=>{if(n.current){let e=rg(n.current);if(p===`child`){if(As(n.current)&&n.current!==Os(vs(n.current)))return;let r=t.selectionManager.childFocusStrategy===`last`?XN(e):e.firstChild();if(r){_m(r);return}}(m.current!=null&&r.key!==m.current||!As(n.current))&&_m(n.current)}},{itemProps:g,isPressed:_}=zy({selectionManager:t.selectionManager,key:r.key,ref:n,isVirtualized:i,focus:h,shouldSelectOnPressUp:s,onAction:d?()=>d(r.key):c,isDisabled:t.collection.size===0}),y=W(g,{role:`gridcell`,onKeyDownCapture:f!==`tab`||o?e=>{let i=Os(vs(n.current));if(!Ds(e.currentTarget,U(e))||t.isKeyboardNavigationDisabled||!n.current||!i)return;let a=rg(n.current);switch(a.currentNode=i,e.key){case`ArrowLeft`:{let t=l===`rtl`?a.nextNode():a.previousNode();if(p===`child`&&t===n.current&&(t=null),e.preventDefault(),e.stopPropagation(),t)_m(t),yc(t,{containingElement:oc(n.current)});else{if(u.getKeyLeftOf?.(r.key)!==r.key){n.current.parentElement?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type,e.nativeEvent));break}p===`cell`&&l===`rtl`?(_m(n.current),yc(n.current,{containingElement:oc(n.current)})):(a.currentNode=n.current,t=l===`rtl`?a.firstChild():XN(a),t&&(_m(t),yc(t,{containingElement:oc(n.current)})))}break}case`ArrowRight`:{let t=l===`rtl`?a.previousNode():a.nextNode();if(p===`child`&&t===n.current&&(t=null),e.preventDefault(),e.stopPropagation(),t)_m(t),yc(t,{containingElement:oc(n.current)});else{if(u.getKeyRightOf?.(r.key)!==r.key){n.current.parentElement?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type,e.nativeEvent));break}p===`cell`&&l===`ltr`?(_m(n.current),yc(n.current,{containingElement:oc(n.current)})):(a.currentNode=n.current,t=l===`rtl`?XN(a):a.firstChild(),t&&(_m(t),yc(t,{containingElement:oc(n.current)})))}break}case`ArrowUp`:case`ArrowDown`:!e.altKey&&Ds(n.current,U(e))&&(e.stopPropagation(),e.preventDefault(),n.current.parentElement?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type,e.nativeEvent)))}}:void 0,onKeyDown:f===`tab`?e=>{let r=Os(vs(n.current));if(!(!Ds(e.currentTarget,U(e))||t.isKeyboardNavigationDisabled||!n.current||!r)){if(f===`tab`&&U(e)!==n.current&&e.key!==`Tab`){e.stopPropagation();return}if(e.key===`Tab`&&f===`tab`){let t=rg(n.current,{tabbable:!0});t.currentNode=r,(e.shiftKey?t.previousNode():t.nextNode())&&e.stopPropagation()}}}:void 0,"aria-colspan":r.colSpan,"aria-colindex":r.colIndex==null?void 0:r.colIndex+1,colSpan:i?void 0:r.colSpan,onFocus:e=>{if(m.current=r.key,U(e)!==n.current){fm()||t.selectionManager.setFocusedKey(r.key);return}p===`child`&&e.relatedTarget&&Ds(n.current,e.relatedTarget)||requestAnimationFrame(()=>{p===`child`&&Os(vs(n.current))===n.current&&h()})},...p===`child`&&f===`tab`?{tabIndex:-1}:{}});return i&&(y[`aria-colindex`]=(r.colIndex??r.index)+1),s&&y.tabIndex!=null&&y.onPointerDown==null&&(y.onPointerDown=e=>{let t=e.currentTarget,n=t.getAttribute(`tabindex`);t.removeAttribute(`tabindex`),requestAnimationFrame(()=>{n!=null&&t.setAttribute(`tabindex`,n)})}),{gridCellProps:y,isPressed:_}}function XN(e){let t=null,n=null;do n=e.lastChild(),n&&(t=n);while(n);return t}function $ae(e){return e&&e.__esModule?e.default:e}function eoe(e,t,n){let{node:r}=e,i=r.props.allowsSorting,{gridCellProps:a}=YN({focusMode:`child`,...e},t,n),o=r.props.isSelectionCell&&t.selectionManager.selectionMode===`single`,{pressProps:s,isPressed:c}=Fm({isDisabled:!i||o,onPress(){t.sort(r.key)},ref:n}),{focusableProps:l}=wm({},n),u,d=t.sortDescriptor?.column===r.key,f=t.sortDescriptor?.direction;r.props.allowsSorting&&!Po()&&(u=d?f:`none`);let p=s_($ae(JN),`@react-aria/table`),m;i&&(m=`${p.format(`sortable`)}`,d&&f&&Po()&&(m=`${m}, ${p.format(f)}`));let h=gc(m),g=t.collection.size===0;return(0,v.useEffect)(()=>{g&&t.selectionManager.focusedKey===r.key&&t.selectionManager.setFocusedKey(null)},[g,t.selectionManager,r.key]),{columnHeaderProps:{...W(l,a,s,h,g?{tabIndex:-1}:null),role:`columnheader`,id:dN(t,r.key),"aria-colspan":r.colSpan&&r.colSpan>1?r.colSpan:void 0,"aria-sort":u},isPressed:c}}function toe(e,t,n){let{node:r,isVirtualized:i,shouldSelectOnPressUp:a,onAction:o}=e,{actions:s,shouldSelectOnPressUp:c}=cN.get(t),l=s.onRowAction?()=>s.onRowAction?.(r.key):o,{itemProps:u,...d}=zy({selectionManager:t.selectionManager,key:r.key,ref:n,isVirtualized:i,shouldSelectOnPressUp:c||a,onAction:l||r?.props?.onAction?_s(r?.props?.onAction,l):void 0,isDisabled:t.collection.size===0}),f=t.selectionManager.isSelected(r.key),p={role:`row`,"aria-selected":t.selectionManager.selectionMode===`none`?void 0:f,"aria-disabled":d.isDisabled||void 0,...u};return i&&(p[`aria-rowindex`]=r.index+1),{rowProps:p,...d}}function noe(e){return e&&e.__esModule?e.default:e}var ZN={expand:{ltr:`ArrowRight`,rtl:`ArrowLeft`},collapse:{ltr:`ArrowLeft`,rtl:`ArrowRight`}};function roe(e,t,n){let{node:r,isVirtualized:i}=e,{rowProps:a,...o}=toe(e,t,n),{direction:s}=bp();i&&t.treeColumn==null?a[`aria-rowindex`]=r.index+1+t.collection.headerRows.length:delete a[`aria-rowindex`];let c=t.treeColumn!=null&&(t.expandedKeys===`all`||t.expandedKeys.has(r.key)),l=s_(noe(JN),`@react-aria/table`),u=Xs({"aria-label":c?l.format(`collapse`):l.format(`expand`),"aria-labelledby":pN(t,r.key)}),d={},f={};if(t.treeColumn!=null){let e=t.collection.getItem(r.key);if(e!=null){let n=QN(t.collection,r),i=e.props?.hasChildRows||e.props?.UNSTABLE_childItems||n?.type!==`cell`,a=t.collection.getItem(r.parentKey),c=a.type===`tablebody`||a.type===`body`,l=QN(t.collection,a);for(;l&&l.type!==`item`&&l.prevKey!=null;)l=t.collection.getItem(l.prevKey);d={onKeyDown:n=>{n.key===ZN.expand[s]&&t.selectionManager.focusedKey===e.key&&i&&t.expandedKeys!==`all`&&!t.expandedKeys.has(e.key)?(t.toggleKey(e.key),n.stopPropagation()):n.key===ZN.collapse[s]&&t.selectionManager.focusedKey===e.key&&(t.expandedKeys===`all`?t.expandedKeys===`all`&&(t.toggleKey(e.key),n.stopPropagation()):i&&t.expandedKeys.has(e.key)?(t.toggleKey(e.key),n.stopPropagation()):!t.expandedKeys.has(e.key)&&e.parentKey!=null&&e.level>0&&(t.selectionManager.setFocusedKey(e.parentKey),n.stopPropagation()))},"aria-expanded":i?t.expandedKeys===`all`||t.expandedKeys.has(r.key):void 0,"aria-level":e.level+1,"aria-posinset":e.index-(c?0:t.collection.columnCount)+1,"aria-setsize":l.index-(c?0:t.collection.columnCount)+1},f={isDisabled:o.isDisabled,onPress:()=>{o.isDisabled||(t.toggleKey(r.key),t.selectionManager.setFocused(!0),t.selectionManager.setFocusedKey(r.key))},excludeFromTabOrder:!0,preventFocusOnPress:!0,"data-react-aria-prevent-focus":!0,...u}}}let p=qo(r.props),m=o.hasAction?p:{};return{rowProps:{...W(a,d,m),"aria-labelledby":pN(t,r.key)},expandButtonProps:f,...o}}function QN(e,t){return`lastChildKey`in t?t.lastChildKey==null?null:e.getItem(t.lastChildKey):Array.from(t.childNodes).findLast(e=>e.parentKey===t.key)}function ioe(e,t,n){let{node:r,isVirtualized:i}=e,a={role:`row`};return i&&t.treeColumn==null&&(a[`aria-rowindex`]=r.index+1),{rowProps:a}}function aoe(e,t,n){let{gridCellProps:r,isPressed:i}=YN(e,t,n),a=e.node.column?.key;return a!=null&&t.collection.rowHeaderColumnKeys.has(a)&&(r.role=`rowheader`,r.id=fN(t,e.node.parentKey,a)),{gridCellProps:r,isPressed:i}}function ooe(e){return e&&e.__esModule?e.default:e}function soe(e,t){let{key:n}=e,{checkboxProps:r}=FM(e,t);return{checkboxProps:{...r,"aria-labelledby":`${r.id} ${pN(t,n)}`}}}function coe(e){let{isEmpty:t,isSelectAll:n,selectionMode:r}=e.selectionManager;return{checkboxProps:{"aria-label":s_(ooe(JN),`@react-aria/table`).format(r===`single`?`select`:`selectAll`),isSelected:n,isDisabled:r!==`multiple`||e.collection.size===0||e.collection.rows.length===1&&e.collection.rows[0].type===`loader`,isIndeterminate:!t&&!n,onChange:()=>e.selectionManager.toggleSelectAll()}}}function loe(e){return e&&e.__esModule?e.default:e}function uoe(e,t,n){let{column:r,triggerRef:i,isDisabled:a,onResizeStart:o,onResize:s,onResizeEnd:c,"aria-label":l}=e,u=s_(loe(JN),`@react-aria/table`),d=ms(),f=t.resizingColumn===r.key,p=(0,v.useRef)(f),m=(0,v.useRef)(null),h=(0,v.useRef)(!1),g=t.tableState.isKeyboardNavigationDisabled,[_,y]=(0,v.useState)(!1),{direction:b}=bp(),x=(0,v.useCallback)(e=>{p.current||(m.current=t.updateResizedColumns(e.key,t.getColumnWidth(e.key)),t.startResize(e.key),t.tableState.setKeyboardNavigationDisabled(!0),o?.(m.current)),p.current=!0},[t,o]),S=(0,v.useCallback)((e,n)=>{let r=t.updateResizedColumns(e.key,n);s?.(r),m.current=r},[t,s]),C=(0,v.useCallback)(e=>{p.current&&(m.current??=t.updateResizedColumns(e.key,t.getColumnWidth(e.key)),t.endResize(),t.tableState.setKeyboardNavigationDisabled(!1),c?.(m.current),p.current=!1,i?.current&&!h.current&&_m(i.current)),m.current=null},[t,i,c]),w=()=>{if(g){C(r);return}return!1},{keyboardProps:T}=Sm({shortcuts:{Escape:()=>w(),Enter:()=>{g?C(r):x(r)}," ":()=>w(),Tab:()=>w()}}),E=(0,v.useRef)(0),{moveProps:D}=Hne({onMoveStart(e){E.current=t.getColumnWidth(r.key),e.pointerType===`mouse`&&y(!0),x(r)},onMove(e){let{deltaX:t,deltaY:n,pointerType:i}=e;b===`rtl`&&(t*=-1),i===`keyboard`&&(n!==0&&t===0&&(t=n*-1),t*=10),t!==0&&(E.current+=t,S(r,E.current))},onMoveEnd(e){let{pointerType:t}=e;E.current=0,y(!1),(t===`mouse`||t===`touch`&&h.current)&&C(r)}}),O=(0,v.useCallback)(e=>{g&&D.onKeyDown?.(e)},[g,D]),k=Math.floor(t.getColumnMinWidth(r.key)),A=Math.floor(t.getColumnMaxWidth(r.key));A===1/0&&(A=2**53-1);let j=Math.floor(t.getColumnWidth(r.key)),M=hm();M===`virtual`&&typeof window<`u`&&`ontouchstart`in window&&(M=`touch`);let N=gc(i?.current==null&&(M===`keyboard`||M===`virtual`)&&!f?u.format(`resizerDescription`):void 0),P={"aria-label":l,"aria-orientation":`horizontal`,"aria-labelledby":`${d} ${dN(t.tableState,r.key)}`,"aria-valuetext":u.format(`columnSize`,{value:j}),type:`range`,min:k,max:A,value:j,...N},F=(0,v.useCallback)(()=>{n.current&&_m(n.current)},[n]),I=t.resizingColumn,L=(0,v.useRef)(null),R=$s(x);(0,v.useEffect)(()=>{if(L.current!==I&&I!=null&&I===r.key){h.current=Os()===n.current,R(r);let e=setTimeout(()=>F(),0),t=setTimeout(F,400);return()=>{clearTimeout(e),clearTimeout(t)}}L.current=I},[I,r,F,n]);let z=e=>{let n=t.getColumnWidth(r.key),i=parseFloat(U(e).value);i=i>n?n+10:n-10,S(r,i)},{pressProps:B}=Fm({preventFocusOnPress:!0,onPressStart:e=>{if(!(e.ctrlKey||e.altKey||e.metaKey||e.shiftKey||e.pointerType===`keyboard`)){if(e.pointerType===`virtual`&&t.resizingColumn!=null){C(r);return}F(),e.pointerType!==`virtual`&&x(r)}},onPress:e=>{(e.pointerType===`touch`&&h.current||e.pointerType===`mouse`)&&t.resizingColumn!=null&&C(r)}}),{visuallyHiddenProps:V}=l_();return{resizerProps:W(T,{...D,onKeyDown:O},B,{style:{touchAction:`none`}}),inputProps:W(V,{id:d,onBlur:()=>{C(r)},onChange:z,disabled:a},P),isResizing:f,isMouseResizing:_}}function doe(){return{rowGroupProps:{role:`rowgroup`}}}function $N(){return doe()}function foe(e){return e&&e.__esModule?e.default:e}var poe=class extends E_{withExpandedKeys(e){let t=this.clone();return t.expandedKeys=e,t.frozen=this.frozen,t.rows=Array.from(t.getRows()),t}addNode(e){super.addNode(e),this.columnsDirty||=e.type===`column`,e.type===`tableheader`&&(this.head=e)}getRows(){let e=[];for(let t of this)(t.type===`tablebody`||t.type===`tablefooter`)&&e.push(...this.getChildren(t.key));return e}get body(){for(let e of this)if(e.type===`tablebody`)return e;return new oP(-2)}commit(e,t,n=!1){this.updateColumns(n),this.firstKey=e,this.lastKey=t,this.rows=[];for(let e of this.getRows()){let t=e.lastChildKey;if(t!=null){let e=this.getItem(t);for(;e&&e.type!==`cell`;)e=e.prevKey==null?null:this.getItem(e.prevKey);if(e){let t=(e.colIndex??e.index)+(e.colSpan??1);if(t!==this.columns.length&&!n)throw Error(`Cell count must match column count. Found ${t} cells and ${this.columns.length} columns.`)}}this.rows.push(e)}super.commit(e,t,n)}updateColumns(e){if(!this.columnsDirty)return;this.rowHeaderColumnKeys=new Set,this.columns=[];let t=new Map,n=e=>{e.type===`column`&&(t.set(e.key,e),e.hasChildNodes||(e.index=this.columns.length,this.columns.push(e),e.props.isRowHeader&&this.rowHeaderColumnKeys.add(e.key)));for(let t of this.getChildren(e.key))n(t)};for(let e of this.getChildren(this.head.key))n(e);if(this.headerRows=GM(t,this.columns),this.columnsDirty=!1,this.rowHeaderColumnKeys.size===0&&this.columns.length>0&&!e)throw Error(`A table must have at least one Column with the isRowHeader prop set to true`)}get columnCount(){return this.columns.length}*[Symbol.iterator](){let e=this.firstKey;for(;e!=null;){let t=this.getItem(e);t&&(yield t),e=t?.nextKey??null}}getFirstKey(){for(let e of this)if(e.type===`tablebody`)return e.firstChildKey??null;return null}getLastKey(){let e=this.lastKey;if(e==null)return null;let t=this.getItem(e);for(;t?.lastChildKey!=null&&(t.type!==`item`||this.expandedKeys.has(t.key));)t=this.getItem(t.lastChildKey);return t?.key}getKeyAfter(e){let t=this.getItem(e);if(t?.type===`column`)return t.nextKey??null;if(!t)return null;if(t.type===`item`&&t.firstChildKey!=null&&this.expandedKeys.has(t.key)){let e=this.getItem(t.firstChildKey);for(;e;){if(e.type===`item`)return e.key;e=e.nextKey==null?null:this.getItem(e.nextKey)}}return super.getKeyAfter(e)}getKeyBefore(e){let t=this.getItem(e);if(t?.type===`column`)return t.prevKey??null;if(!t)return null;let n=null;if(t.prevKey!=null){for(t=this.getItem(t.prevKey);t&&(t.type!==`item`||this.expandedKeys.has(t.key))&&t.lastChildKey!=null;)t=this.getItem(t.lastChildKey);n=t?.key??null}return n??=t.parentKey,n!=null&&this.getItem(n)?.type===`tableheader`?null:n}getChildren(e){let t=this.getItem(e);if(!t){for(let t of this.headerRows)if(t.key===e)return t.childNodes}let n=this;return t?.type===`tablebody`||t?.type===`tablefooter`?{*[Symbol.iterator](){let e=t.firstChildKey,r=e==null?null:n.getItem(e);for(;r;){yield r;let e=n.getKeyAfter(r.key);if(r=e==null?null:n.getItem(e),r&&r.parentKey===t.parentKey)break}}}:{*[Symbol.iterator](){let t=n.getItem(e),r=t?.firstChildKey==null?null:n.getItem(t.firstChildKey);for(;r&&(yield r,r=r.nextKey==null?null:n.getItem(r.nextKey),t?.type!==`item`||r?.type===`cell`););}}}clone(){let e=super.clone();return e.headerRows=this.headerRows,e.columns=this.columns,e.rows=this.rows,e.rowHeaderColumnKeys=this.rowHeaderColumnKeys,e.head=this.head,e}getTextValue(e){let t=this.getItem(e);if(!t)return``;if(t.textValue)return t.textValue;let n=this.rowHeaderColumnKeys,r=[];for(let t of this.getChildren(e)){let e=this.columns[t.index];if(n.has(e.key)&&t.textValue&&r.push(t.textValue),r.length===n.size)break}return r.join(` `)}constructor(...e){super(...e),this.headerRows=[],this.columns=[],this.rows=[],this.rowHeaderColumnKeys=new Set,this.head=new iP(-1),this.columnsDirty=!0,this.expandedKeys=new Set}},eP=(0,v.createContext)(null),moe=(0,v.forwardRef)(function(e,t){let n=Zs(t),r=(0,v.useRef)(null),i=(0,v.useRef)(null),[a,o]=(0,v.useState)(0);Xo(()=>{let e=r.current;for(;e&&e!==n.current&&!ac(e);)e=e.parentElement;i.current=e},[n]),rc({ref:i,box:`border-box`,onResize(){o(i.current?.clientWidth??0)}}),Xo(()=>{o(i.current?.clientWidth??0)},[]);let s=(0,v.useMemo)(()=>({tableRef:r,scrollRef:i,tableWidth:a,useTableColumnResizeState:tN,onResizeStart:e.onResizeStart,onResize:e.onResize,onResizeEnd:e.onResizeEnd}),[r,a,e.onResizeStart,e.onResize,e.onResizeEnd]);return v.createElement(np.div,{render:e.render,...Us(e,{global:!0}),ref:n,className:e.className||`react-aria-ResizableTableContainer`,style:e.style,onScroll:e.onScroll},v.createElement(eP.Provider,{value:s},e.children))}),hoe=(0,v.createContext)(null),tP=(0,v.createContext)(null),nP=(0,v.createContext)(null),goe=(0,v.forwardRef)(function(e,t){[e,t]=Zf(e,t,hoe);let n=db(e),{selectionBehavior:r,selectionMode:i,disallowEmptySelection:a}=n,o=!!e.dragAndDropHooks?.useDraggableCollectionState,s=(0,v.useMemo)(()=>({selectionBehavior:i===`none`?null:r,selectionMode:i,disallowEmptySelection:a,allowsDragging:o}),[r,i,a,o]),c=v.createElement(yoe.Provider,{value:s},v.createElement(W_,e));return v.createElement(L_,{content:c,createCollection:()=>new poe},r=>v.createElement(voe,{props:e,forwardedRef:t,selectionState:n,collection:r}))}),_oe=(0,v.forwardRef)(function(e,t){let{isVirtualized:n}=(0,v.useContext)(J_);return n?v.createElement(np.div,{...e,ref:t}):v.createElement(np.table,{...e,ref:t})}),rP={expand:{ltr:`ArrowRight`,rtl:`ArrowLeft`},collapse:{ltr:`ArrowLeft`,rtl:`ArrowRight`}};function voe({props:e,forwardedRef:t,selectionState:n,collection:r}){[e,t]=Zf(e,t,Fv);let{shouldUseVirtualFocus:i,disallowTypeAhead:a,filter:o,...s}=e,c=(0,v.useContext)(eP);t=Zs((0,v.useMemo)(()=>Ns(t,c?.tableRef),[t,c?.tableRef]));let[l,u]=eh(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,e.onExpandedChange);r=(0,v.useMemo)(()=>r.withExpandedKeys(l),[r,l]);let d=iN({...s,collection:r,children:void 0,UNSAFE_selectionState:n,expandedKeys:l,onExpandedChange:u}),f=aN(d,o),{isVirtualized:p,layoutDelegate:m,dropTargetDelegate:h,CollectionRoot:g}=(0,v.useContext)(J_),{dragAndDropHooks:_}=e,{gridProps:y}=Qae({...s,layoutDelegate:m,isVirtualized:p},f,t),b=f.selectionManager,x=!!_?.useDraggableCollectionState,S=!!_?.useDroppableCollectionState;(0,v.useRef)(x),(0,v.useRef)(S),(0,v.useEffect)(()=>{},[x,S]);let C,w,T,E=!1,D=null,O=(0,v.useRef)(null),{direction:k}=bp(),[A]=(0,v.useState)(()=>new VM);if(x&&_){C=_.useDraggableCollectionState({collection:f.collection,selectionManager:b,preview:_.renderDragPreview?O:void 0}),_.useDraggableCollection({},C,t);let e=_.DragPreview;D=_.renderDragPreview?v.createElement(e,{ref:O},_.renderDragPreview):null}if(S&&_){w=_.useDroppableCollectionState({collection:f.collection,selectionManager:b});let e=new Fy({collection:f.collection,disabledKeys:b.disabledKeys,disabledBehavior:b.disabledBehavior,ref:t,layoutDelegate:m}),n=_.dropTargetDelegate||h||new _.ListDropTargetDelegate(r.rows,t);A.setup(n,d,k),T=_.useDroppableCollection({keyboardDelegate:e,dropTargetDelegate:A,onDropActivate:e=>{if(e.target.type===`item`){let t=e.target.key,n=d.collection.getItem(t),r=l.has(t);n&&n.hasChildNodes&&(!r||_?.isVirtualDragging?.())&&d.toggleKey(t)}},onKeyDown:e=>{let t=w?.target;if(t&&t.type===`item`&&t.dropPosition===`on`){let n=d.collection.getItem(t.key);(e.key===rP.expand[k]&&n?.hasChildNodes&&!d.expandedKeys.has(t.key)||e.key===rP.collapse[k]&&n?.hasChildNodes&&d.expandedKeys.has(t.key))&&d.toggleKey(t.key)}}},w,t),E=w.isDropTarget({type:`root`})}let{focusProps:j,isFocused:M,isFocusVisible:N}=Gm(),P=Jf({...e,children:void 0,defaultClassName:`react-aria-Table`,values:{isDropTarget:E,isFocused:M,isFocusVisible:N,state:f}}),F=!!(x&&!C?.isDisabled),I=P.style,L=null;c&&(L=c.useTableColumnResizeState({tableWidth:c.tableWidth},f),p||(I={...I,tableLayout:`fixed`,width:`min-content`}));let R=Us(e,{global:!0});return v.createElement(qf,{values:[[tP,f],[nP,L],[Vx,{dragAndDropHooks:_,dragState:C,dropState:w}],[Hx,{render:Poe}],[Fv,null],[Iv,null]]},v.createElement(Gh,null,v.createElement(_oe,{...W(R,P,y,j,T?.collectionProps),style:I,ref:t,slot:e.slot||void 0,onScroll:e.onScroll,"data-allows-dragging":F||void 0,"data-drop-target":E||void 0,"data-focused":M||void 0,"data-focus-visible":N||void 0},v.createElement(zv,null,v.createElement(g,{collection:f.collection,scrollRef:c?.scrollRef??t,persistedKeys:Wx(b,_,w)})))),D)}var yoe=(0,v.createContext)(null),iP=class extends x_{static{this.type=`tableheader`}},boe=(0,v.forwardRef)(function(e,t){let{isVirtualized:n}=(0,v.useContext)(J_);return n?v.createElement(np.div,{...e,ref:t}):v.createElement(np.thead,{...e,ref:t})}),xoe=V_(iP,(e,t)=>{let n=(0,v.useContext)(tP).collection,r=j_({items:n.headerRows,children:(0,v.useCallback)(e=>{switch(e.type){case`headerrow`:return v.createElement(Coe,{item:e});default:throw Error(`Unsupported node type in TableHeader: `+e.type)}},[])}),{rowGroupProps:i}=$N(),{hoverProps:a,isHovered:o}=Zm({onHoverStart:e.onHoverStart,onHoverChange:e.onHoverChange,onHoverEnd:e.onHoverEnd}),s=Jf({...e,children:void 0,defaultClassName:`react-aria-TableHeader`,values:{isHovered:o}});return v.createElement(boe,{...W(Us(e,{global:!0}),i,a),...s,ref:t,"data-hovered":o||void 0},r)},e=>v.createElement(W_,{dependencies:e.dependencies,items:e.columns},e.children)),Soe=(0,v.forwardRef)(function(e,t){let{isVirtualized:n}=(0,v.useContext)(J_);return n?v.createElement(`div`,{...e,ref:t}):v.createElement(`tr`,{...e,ref:t})});function Coe({item:e}){let t=(0,v.useRef)(null),n=(0,v.useContext)(tP),{isVirtualized:r,CollectionBranch:i}=(0,v.useContext)(J_),{rowProps:a}=ioe({node:e,isVirtualized:r},n,t),{checkboxProps:o}=coe(n);return v.createElement(Soe,{...a,ref:t},v.createElement(qf,{values:[[TS,{slots:{selection:o}}],[ES,{slots:{selection:o}}]]},v.createElement(i,{collection:n.collection,parent:e})))}var woe=class extends x_{static{this.type=`column`}},Toe=(0,v.forwardRef)(function(e,t){let{isVirtualized:n}=(0,v.useContext)(J_);return n?v.createElement(np.div,{...e,ref:t}):v.createElement(np.th,{...e,ref:t})}),Eoe=B_(woe,(e,t,n)=>{let r=Zs(t),i=(0,v.useContext)(tP),{isVirtualized:a}=(0,v.useContext)(J_),{columnHeaderProps:o,isPressed:s}=eoe({node:n,isVirtualized:a,focusMode:e.focusMode,allowsArrowNavigation:e.allowsArrowNavigation},i,r),{isFocused:c,isFocusVisible:l,focusProps:u}=Gm(),d=(0,v.useContext)(nP),f=!1;d&&(f=d.resizingColumn===n.key);let{hoverProps:p,isHovered:m}=Zm({isDisabled:!e.allowsSorting}),h=Jf({...e,id:void 0,children:n.rendered,defaultClassName:`react-aria-Column`,values:{isHovered:m,isPressed:s,isFocused:c,isFocusVisible:l,allowsSorting:n.props.allowsSorting,sortDirection:i.sortDescriptor?.column===n.key?i.sortDescriptor.direction:void 0,isResizing:f,startResize:()=>{if(d)d.startResize(n.key),i.setKeyboardNavigationDisabled(!0);else throw Error(`Wrap your
in a to enable column resizing`)},sort:e=>{i.sort(n.key,e)}}}),g=h.style;d&&(g={...g,width:d.getColumnWidth(n.key)});let _=Us(e,{global:!0});return delete _.id,v.createElement(Toe,{...W(_,o,u,p),...h,style:g,ref:r,"data-hovered":m||void 0,"data-pressed":s||void 0,"data-focused":c||void 0,"data-focus-visible":l||void 0,"data-resizing":f||void 0,"data-allows-sorting":n.props.allowsSorting||void 0,"data-sort-direction":i.sortDescriptor?.column===n.key?i.sortDescriptor.direction:void 0},v.createElement(qf,{values:[[aP,{column:n,triggerRef:r}],[J_,K_]]},h.children))}),aP=(0,v.createContext)(null),Doe=(0,v.forwardRef)(function(e,t){let n=(0,v.useContext)(nP);if(!n)throw Error(`Wrap your
in a to enable column resizing`);let r=s_(foe(Bx),`react-aria-components`),{onResizeStart:i,onResize:a,onResizeEnd:o}=(0,v.useContext)(eP),{column:s,triggerRef:c}=(0,v.useContext)(aP),l=(0,v.useRef)(null),{resizerProps:u,inputProps:d,isResizing:f,isMouseResizing:p}=uoe({column:s,"aria-label":e[`aria-label`]||r.format(`tableResizer`),onResizeStart:i,onResize:a,onResizeEnd:o,triggerRef:c},n,l),{focusProps:m,isFocused:h,isFocusVisible:g}=Gm(),{hoverProps:_,isHovered:y}=Zm(e),b=n.getColumnMinWidth(s.key)>=n.getColumnWidth(s.key),x=n.getColumnMaxWidth(s.key)<=n.getColumnWidth(s.key),{direction:S}=bp(),C=`both`;C=b?S===`rtl`?`right`:`left`:x?S===`rtl`?`left`:`right`:`both`;let w=Zs(t),[T,E]=(0,v.useState)(``);(0,v.useEffect)(()=>{if(!w.current)return;let e=window.getComputedStyle(w.current);E(e.cursor)},[w,C]);let D=Jf({...e,defaultClassName:`react-aria-ColumnResizer`,values:{isFocused:h,isFocusVisible:g,isResizing:f,isHovered:y,resizableDirection:C}}),O=Us(e,{global:!0});return v.createElement(np.div,{ref:w,role:`presentation`,...W(O,D,u,_),"data-hovered":y||void 0,"data-focused":h||void 0,"data-focus-visible":g||void 0,"data-resizing":f||void 0,"data-resizable-direction":C},D.children,v.createElement(`input`,{ref:l,...W(d,m)}),f&&p&&Ec.createPortal(v.createElement(`div`,{style:{position:`fixed`,top:0,left:0,bottom:0,right:0,cursor:T},"data-testid":`cursor-overlay`}),document.body))}),oP=class extends S_{static{this.type=`tablebody`}},Ooe=(0,v.forwardRef)(function(e,t){let{isVirtualized:n}=(0,v.useContext)(J_);return n?v.createElement(np.div,{...e,ref:t}):v.createElement(np.tbody,{...e,ref:t})}),koe=V_(oP,(e,t,n)=>{let r=(0,v.useContext)(tP),{isVirtualized:i}=(0,v.useContext)(J_),a=r.collection,{CollectionBranch:o}=(0,v.useContext)(J_),{dragAndDropHooks:s,dropState:c}=(0,v.useContext)(Vx),l=!!s?.useDroppableCollectionState&&!c?.isDisabled,u=l&&!!c&&(c.isDropTarget({type:`root`})??!1),d=a.size===0,f={isDropTarget:u,isEmpty:d},p=Jf({...e,id:void 0,children:void 0,defaultClassName:`react-aria-TableBody`,values:f}),m,h=a.columnCount;if(d&&e.renderEmptyState&&r){let t={},n={},r={};i?(n[`aria-colspan`]=h,r={display:`contents`}):n.colSpan=h,m=v.createElement(cP,{role:`row`,...t,style:r},v.createElement(lP,{role:`rowheader`,...n,style:r},e.renderEmptyState(f)))}let{rowGroupProps:g}=$N(),_=Us(e,{global:!0});return v.createElement(Ooe,{...W(_,p,g),ref:t,"data-empty":d||void 0},l&&v.createElement(zoe,null),v.createElement(o,{collection:a,parent:n,renderDropIndicator:Ux(s,c)}),m)});(class extends S_{static{this.type=`tablefooter`}});var sP=(0,v.createContext)({isFocusVisibleWithinRow:!1}),Aoe=class extends x_{static{this.type=`item`}filter(e,t,n){let r=e.getChildren(this.key);for(let i of r)if(n(i.textValue,i)){let n=this.clone();return t.addDescendants(n,e),n}return null}},cP=(0,v.forwardRef)(function(e,t){let{isVirtualized:n}=(0,v.useContext)(J_);return n?v.createElement(np.div,{...e,ref:t}):v.createElement(np.tr,{...e,ref:t})}),joe=V_(Aoe,(e,t,n)=>{let r=Zs(t),i=(0,v.useContext)(tP),{dragAndDropHooks:a,dragState:o,dropState:s}=(0,v.useContext)(Vx),{isVirtualized:c,CollectionBranch:l}=(0,v.useContext)(J_),u=o&&!(o.isDisabled||o.selectionManager.isDisabled(n.key)),{rowProps:d,expandButtonProps:f,...p}=roe({node:n,shouldSelectOnPressUp:!!o,isVirtualized:c},i,r),{isFocused:m,isFocusVisible:h,focusProps:g}=Gm(),{isFocusVisible:_,focusProps:y}=Gm({within:!0}),{hoverProps:b,isHovered:x}=Zm({isDisabled:!p.allowsSelection&&!p.hasAction&&!u,onHoverStart:e.onHoverStart,onHoverChange:e.onHoverChange,onHoverEnd:e.onHoverEnd}),{checkboxProps:S}=soe({key:n.key},i),C;o&&a&&(C=a.useDraggableItem({key:n.key,hasDragButton:!0},o));let w,T=(0,v.useRef)(null),{visuallyHiddenProps:E}=l_();s&&a&&(w=a.useDropIndicator({target:{type:`item`,key:n.key,dropPosition:`on`}},s,T));let D=(0,v.useRef)(null);(0,v.useEffect)(()=>{o&&D.current},[]);let O=o&&o.isDragging(n.key),{children:k,...A}=e,j=e.hasChildItems||i.collection.getItem(n.lastChildKey)?.type!==`cell`,M=j&&i.expandedKeys.has(n.key),N=Jf({...A,id:void 0,defaultClassName:`react-aria-Row`,defaultStyle:{"--table-row-level":n.level+1},values:{...p,state:i,isHovered:x,isFocused:m,isFocusVisible:h,selectionMode:i.selectionManager.selectionMode,selectionBehavior:i.selectionManager.selectionBehavior,isDragging:O,isDropTarget:w?.isDropTarget,isFocusVisibleWithin:_,id:n.key,hasChildItems:j,isExpanded:M,level:n.level+1}}),P=Us(e,{global:!0});return delete P.id,delete P.onClick,v.createElement(v.Fragment,null,w&&!w.isHidden&&v.createElement(cP,{role:`row`,style:{height:0}},v.createElement(lP,{role:`gridcell`,colSpan:i.collection.columnCount,style:{padding:0}},v.createElement(`div`,{role:`button`,...E,...w.dropIndicatorProps,ref:T}))),v.createElement(cP,{...W(P,N,d,g,b,C?.dragProps,y),ref:r,"data-disabled":p.isDisabled||void 0,"data-selected":p.isSelected||void 0,"data-hovered":x||void 0,"data-focused":p.isFocused||void 0,"data-focus-visible":h||void 0,"data-pressed":p.isPressed||void 0,"data-dragging":O||void 0,"data-drop-target":w?.isDropTarget||void 0,"data-selection-mode":i.selectionManager.selectionMode===`none`?void 0:i.selectionManager.selectionMode,"data-focus-visible-within":_||void 0,"data-expanded":M||void 0,"data-has-child-items":j||void 0,"data-level":n.level+1},v.createElement(qf,{values:[[TS,{slots:{[Kf]:{},selection:S}}],[ES,{slots:{[Kf]:{},selection:S}}],[Qm,{slots:{[Kf]:{},chevron:f,drag:{...C?.dragButtonProps,ref:D,style:{pointerEvents:`none`}}}}],[Bv,{isSelected:p.isSelected}],[sP,{isFocusVisibleWithinRow:_}]]},v.createElement(l,{collection:i.collection,parent:n}))))},e=>{if(e.id==null&&typeof e.children==`function`)throw Error(`No id detected for the Row element. The Row element requires a id to be provided to it when the cells are rendered dynamically.`);let t=[e.value].concat(e.dependencies);return v.createElement(W_,{dependencies:t,items:e.columns,idScope:e.id},e.children)}),Moe=class extends x_{static{this.type=`cell`}},lP=(0,v.forwardRef)(function(e,t){let{isVirtualized:n}=(0,v.useContext)(J_);return n?v.createElement(np.div,{...e,ref:t}):v.createElement(np.td,{...e,ref:t})}),Noe=B_(Moe,(e,t,n)=>{let r=Zs(t),i=(0,v.useContext)(tP),{dragState:a}=(0,v.useContext)(Vx),{isVirtualized:o}=(0,v.useContext)(J_);n.column=i.collection.columns[n.index];let{gridCellProps:s,isPressed:c}=aoe({node:n,shouldSelectOnPressUp:!!a,isVirtualized:o,focusMode:e.focusMode,allowsArrowNavigation:e.allowsArrowNavigation},i,r),{isFocused:l,isFocusVisible:u,focusProps:d}=Gm(),{hoverProps:f,isHovered:p}=Zm({}),{isFocusVisibleWithinRow:m}=(0,v.useContext)(sP),h=n.parentKey!=null&&i.selectionManager.isSelected(n.parentKey),g=n.colIndex||n.index,_=i.collection.getItem(n.parentKey),y=_.props.hasChildItems||i.collection.getItem(_.lastChildKey)?.type!==`cell`,b=y&&i.expandedKeys.has(n.parentKey),x=i.selectionManager.isDisabled(n.parentKey),S=Jf({...e,id:void 0,defaultClassName:`react-aria-Cell`,values:{isFocused:l,isFocusVisible:u,isFocusVisibleWithinRow:m,isPressed:c,isHovered:p,isSelected:h,id:n.key,columnIndex:g,hasChildItems:y,isExpanded:b,isDisabled:x,level:_.level+1,isTreeColumn:n.column.key===i.treeColumn}}),C=Us(e,{global:!0});return delete C.id,v.createElement(lP,{...W(C,S,s,d,f),ref:r,"data-focused":l||void 0,"data-focus-visible":u||void 0,"data-focus-visible-within-row":m||void 0,"data-pressed":c||void 0,"data-selected":h||void 0,"data-column-index":g,"data-expanded":b||void 0,"data-has-child-items":y||void 0,"data-level":_.level+1,"data-tree-column":n.column.key===i.treeColumn||void 0,"data-disabled":x||void 0},v.createElement(J_.Provider,{value:K_},S.children))});function Poe(e,t){t=Zs(t);let{dragAndDropHooks:n,dropState:r}=(0,v.useContext)(Vx),i=(0,v.useRef)(null),{dropIndicatorProps:a,isHidden:o,isDropTarget:s}=n.useDropIndicator(e,r,i);if(o)return null;let c=r&&e.target.type===`item`?(r.collection.getItem(e.target.key)?.level||0)+1:1;return v.createElement(Roe,{...e,dropIndicatorProps:a,isDropTarget:s,buttonRef:i,level:c,ref:t})}var Foe=(0,v.forwardRef)(function(e,t){let{isVirtualized:n}=(0,v.useContext)(J_);return n?v.createElement(np.div,{...e,ref:t}):v.createElement(np.tr,{...e,ref:t})}),Ioe=(0,v.forwardRef)(function(e,t){let{isVirtualized:n}=(0,v.useContext)(J_);return n?v.createElement(np.div,{...e,ref:t}):v.createElement(np.td,{...e,ref:t})});function Loe(e,t){let{dropIndicatorProps:n,isDropTarget:r,buttonRef:i,level:a,...o}=e,s=(0,v.useContext)(tP),{visuallyHiddenProps:c}=l_(),l=Jf({...o,defaultClassName:`react-aria-DropIndicator`,defaultStyle:{"--table-row-level":a+1},values:{isDropTarget:r}});return v.createElement(Foe,{...Us(e,{global:!0}),...l,role:`row`,ref:t,"data-drop-target":r||void 0,"aria-level":a},v.createElement(Ioe,{role:`gridcell`,colSpan:s.collection.columnCount,style:{padding:0}},v.createElement(`div`,{...c,role:`button`,...n,ref:i}),l.children))}var Roe=(0,v.forwardRef)(Loe);function zoe(){let e=(0,v.useContext)(tP),{dragAndDropHooks:t,dropState:n}=(0,v.useContext)(Vx),r=(0,v.useRef)(null),{dropIndicatorProps:i}=t.useDropIndicator({target:{type:`root`}},n,r),a=n.isDropTarget({type:`root`}),{visuallyHiddenProps:o}=l_();return!a&&i[`aria-hidden`]?null:v.createElement(cP,{role:`row`,"aria-hidden":i[`aria-hidden`],style:{height:0}},v.createElement(lP,{role:`gridcell`,colSpan:e.collection.columnCount,style:{padding:0}},v.createElement(`div`,{role:`button`,...o,...i,ref:r})))}var Boe=B_(C_,function(e,t,n){let r=(0,v.useContext)(tP),{isVirtualized:i}=(0,v.useContext)(J_),{isLoading:a,onLoadMore:o,scrollOffset:s,...c}=e,l=r.collection.columns.length,u=(0,v.useRef)(null);wc((0,v.useMemo)(()=>({onLoadMore:o,collection:r?.collection,sentinelRef:u,scrollOffset:s}),[o,s,r?.collection]),u);let d=Jf({...c,id:void 0,children:n.rendered,defaultClassName:`react-aria-TableLoadingIndicator`,defaultStyle:{"--table-row-level":n.level+1},values:void 0}),f={},p={},m={};return i?(p[`aria-colspan`]=l,m={display:`contents`}):p.colSpan=l,v.createElement(v.Fragment,null,v.createElement(cP,{style:{height:0},inert:Tc(!0)},v.createElement(lP,{style:{padding:0,border:0}},v.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:u,style:{position:`relative`,height:1,width:1}}))),a&&d.children&&v.createElement(cP,{...W(Us(e,{global:!0}),f),...d,role:`row`,ref:t,"aria-level":n.level+1,"data-level":n.level+1},v.createElement(lP,{role:`rowheader`,...p,style:m},d.children)))}),uP=({...e})=>(0,G.jsx)($te,{...e}),dP=Object.assign(uP,{Root:uP}),fP=(0,v.createContext)({}),pP=({children:e,className:t,status:n,...r})=>{let i=v.useMemo(()=>tf({status:n}),[n]);return(0,G.jsx)(fP,{value:{slots:i,status:n},children:(0,G.jsx)(gh,{value:{variant:`default`},children:(0,G.jsx)(Xc.div,{className:i?.base({className:t}),"data-slot":`alert-root`,...r,children:e})})})},mP=Object.assign(pP,{Root:pP,Indicator:({children:e,className:t,...n})=>{let{slots:r,status:i}=(0,v.use)(fP),a=()=>{switch(i){case`accent`:return(0,G.jsx)(fh,{"data-slot":`alert-default-icon`});case`success`:return(0,G.jsx)(hh,{"data-slot":`alert-default-icon`});case`warning`:return(0,G.jsx)(ph,{"data-slot":`alert-default-icon`});case`danger`:return(0,G.jsx)(mh,{"data-slot":`alert-default-icon`});default:return(0,G.jsx)(fh,{"data-slot":`alert-default-icon`})}};return(0,G.jsx)(Xc.div,{className:q(r?.indicator,t),"data-slot":`alert-indicator`,...n,children:e??a()})},Content:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(fP);return(0,G.jsx)(Xc.div,{className:q(r?.content,t),"data-slot":`alert-content`,...n,children:e})},Title:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(fP);return(0,G.jsx)(Xc.p,{className:q(r?.title,t),"data-slot":`alert-title`,...n,children:e})},Description:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(fP);return(0,G.jsx)(Xc.span,{className:q(r?.description,t),"data-slot":`alert-description`,...n,children:e})}}),hP=(0,v.createContext)({}),gP=({children:e,className:t,variant:n,...r})=>{let i=v.useMemo(()=>Cf({variant:n}),[n]);return(0,G.jsx)(une,{className:K(t,i.item()),"data-slot":`list-box-item`,...r,children:t=>(0,G.jsx)(hP,{value:{slots:i,state:t},children:typeof e==`function`?e(t):e})})},_P=({children:e,className:t,...n})=>{let{slots:r,state:i}=(0,v.use)(hP),a=i?.isSelected,o=typeof e==`function`?e(i??{}):e||(0,G.jsx)(`svg`,{"aria-hidden":`true`,"data-slot":`list-box-item-indicator--checkmark`,fill:`none`,role:`presentation`,stroke:`currentColor`,strokeDasharray:22,strokeDashoffset:a?44:66,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,viewBox:`0 0 17 18`,children:(0,G.jsx)(`polyline`,{points:`1 9 7 14 15 4`})});return(0,G.jsx)(Xc.span,{"aria-hidden":`true`,className:q(r?.indicator,t),"data-slot":`list-box-item-indicator`,"data-visible":a||void 0,...n,children:o})},Voe=Object.assign(gP,{Root:gP,Indicator:_P}),Hoe=({children:e,className:t,...n})=>{let r=v.useMemo(()=>wf({class:typeof t==`string`?t:void 0}),[t]);return(0,G.jsx)(lne,{className:r,...n,children:e})};function vP({className:e,variant:t,...n}){let r=v.useMemo(()=>Sf({variant:t}),[t]);return(0,G.jsx)(sne,{className:K(e,r),"data-slot":`list-box`,...n})}var yP=Object.assign(vP,{Root:vP,Item:Voe,ItemIndicator:_P,Section:Hoe}),bP=(0,v.createContext)({}),Uoe=({children:e,className:t,variant:n,...r})=>{let i=v.useMemo(()=>Ef({variant:n}),[n]);return(0,G.jsx)(Ob,{className:K(t,i.item()),"data-slot":`menu-item`,...r,children:t=>(0,G.jsx)(bP,{value:{slots:i,state:t},children:typeof e==`function`?e(t):e})})},Woe=({children:e,className:t,type:n=`checkmark`,...r})=>{let{slots:i,state:a}=(0,v.use)(bP),o=a?.isSelected,s=typeof e==`function`?e(a??{}):e||(n===`dot`?(0,G.jsx)(`svg`,{"aria-hidden":`true`,"data-slot":`menu-item-indicator--dot`,fill:`currentColor`,fillRule:`evenodd`,role:`presentation`,viewBox:`0 0 16 16`,xmlns:`http://www.w3.org/2000/svg`,children:(0,G.jsx)(`path`,{clipRule:`evenodd`,d:`M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14`,fillRule:`evenodd`})}):(0,G.jsx)(`svg`,{"aria-hidden":`true`,"data-slot":`menu-item-indicator--checkmark`,fill:`none`,role:`presentation`,stroke:`currentColor`,strokeDasharray:22,strokeDashoffset:o?44:66,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,viewBox:`0 0 17 18`,children:(0,G.jsx)(`polyline`,{points:`1 9 7 14 15 4`})}));return(0,G.jsx)(Xc.span,{"aria-hidden":`true`,className:q(i?.indicator,t),"data-slot":`menu-item-indicator`,"data-type":n,"data-visible":o||void 0,...r,children:s})},Goe=({children:e,className:t,...n})=>{let{slots:r,state:i}=(0,v.use)(bP);if(!i?.hasSubmenu)return null;let a=e??(0,G.jsx)(uh,{});return(0,G.jsx)(Xc.span,{"aria-hidden":`true`,className:q(r?.submenuIndicator,t),"data-slot":`submenu-indicator`,...n,children:a})},Koe=({children:e,className:t,...n})=>{let r=v.useMemo(()=>Df({class:typeof t==`string`?t:void 0}),[t]);return(0,G.jsx)(Eb,{className:r,...n,children:e})},xP=(0,v.createContext)({}),SP=({children:e,...t})=>{let n=v.useMemo(()=>_f(),[]);return(0,G.jsx)(xP,{value:{slots:n},children:(0,G.jsx)(yb,{...t,children:e})})},qoe=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(xP);return(0,G.jsx)($m,{className:K(t,r?.trigger()),"data-slot":`dropdown-trigger`,...n,children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})},Joe=({children:e,className:t,placement:n,...r})=>{let{slots:i}=(0,v.use)(xP);return(0,G.jsx)(gh,{value:{variant:`default`},children:(0,G.jsx)(b_,{...r,className:K(t,i?.popover()),"data-slot":`dropdown-popover`,placement:n,children:e})})};function Yoe({className:e,...t}){let{slots:n}=(0,v.use)(xP);return(0,G.jsx)(Sb,{className:K(e,n?.menu()),"data-selection-mode":t.selectionMode,"data-slot":`dropdown-menu`,...t})}var CP=Object.assign(SP,{Root:SP,Trigger:qoe,Popover:Joe,Menu:Yoe,Section:e=>(0,G.jsx)(Koe,{...e}),Item:e=>(0,G.jsx)(Uoe,{...e}),ItemIndicator:e=>(0,G.jsx)(Woe,{...e}),SubmenuIndicator:e=>(0,G.jsx)(Goe,{...e}),SubmenuTrigger:({children:e,...t})=>(0,G.jsx)(xb,{"data-slot":`dropdown-submenu-trigger`,...t,children:e})}),wP=(0,v.createContext)({}),TP=({children:e,state:t,...n})=>{let r=(0,v.useMemo)(()=>({slots:Of(),placement:void 0}),[]),i=(0,v.useMemo)(()=>t?{isOpen:t.isOpen,onOpenChange:t.setOpen}:{},[t]);return(0,G.jsx)(wP,{value:r,children:(0,G.jsx)(Mb,{"data-slot":`modal-root`,...W(n,i),children:e})})},Y=Object.assign(TP,{Root:TP,Trigger:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(wP);return(0,G.jsx)(Bb,{children:(0,G.jsx)(Xc.div,{className:q(r?.trigger,t),"data-slot":`modal-trigger`,role:`button`,...n,children:e})})},Backdrop:({children:e,className:t,isDismissable:n=!0,onClick:r,variant:i,...a})=>{let{slots:o}=(0,v.use)(wP),s=(0,v.useMemo)(()=>Of({variant:i}),[i]),c=(0,v.useMemo)(()=>({slots:{...o,...s}}),[o,s]);return(0,G.jsx)(Rb,{className:K(t,s?.backdrop()),"data-slot":`modal-backdrop`,isDismissable:n,onClick:e=>{e.stopPropagation(),r?.(e)},...a,children:t=>(0,G.jsxs)(wP,{value:c,children:[typeof e==`function`?e(t):e,` `]})})},Container:({children:e,className:t,placement:n=`auto`,scroll:r,size:i,...a})=>{let{slots:o}=(0,v.use)(wP),s=(0,v.useMemo)(()=>Of({scroll:r,size:i}),[r,i]),c=(0,v.useMemo)(()=>({placement:n,slots:{...o,...s}}),[o,n,s]);return(0,G.jsx)(Lb,{className:K(t,s?.container()),"data-placement":n,"data-slot":`modal-container`,...a,children:t=>(0,G.jsx)(wP,{value:c,children:typeof e==`function`?e(t):e})})},Dialog:({children:e,className:t,...n})=>{let{placement:r,slots:i}=(0,v.use)(wP);return(0,G.jsx)(gh,{value:{variant:`default`},children:(0,G.jsx)(Nb,{className:q(i?.dialog,t),"data-placement":r,"data-slot":`modal-dialog`,...n,children:e})})},Header:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(wP);return(0,G.jsx)(Xc.div,{className:q(r?.header,t),"data-slot":`modal-header`,...n,children:e})},Icon:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(wP);return(0,G.jsx)(Xc.div,{className:q(r?.icon,t),"data-slot":`modal-icon`,...n,children:e})},Heading:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(wP);return(0,G.jsx)(ah,{className:q(r?.heading,t),"data-slot":`modal-heading`,slot:`title`,...n,children:e})},Body:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(wP);return(0,G.jsx)(Xc.div,{className:q(r?.body,t),"data-slot":`modal-body`,...n,children:e})},Footer:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(wP);return(0,G.jsx)(Xc.div,{className:q(r?.footer,t),"data-slot":`modal-footer`,...n,children:e})},CloseTrigger:({className:e,...t})=>{let{slots:n}=(0,v.use)(wP);return(0,G.jsx)(Hb,{className:K(e,n?.closeTrigger()),"data-slot":`modal-close-trigger`,slot:`close`,...t})}}),EP=(0,v.createContext)({}),DP=({children:e,className:t,fullWidth:n,variant:r,...i})=>{let a=v.useMemo(()=>kf({fullWidth:n,variant:r}),[n,r]);return(0,G.jsx)(EP,{value:{slots:a},children:(0,G.jsx)(RM,{"data-slot":`number-field`,...i,className:K(t,a?.base()),children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})})},OP=Object.assign(DP,{Root:DP,Group:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(EP);return(0,G.jsx)(qb,{className:K(t,r?.group()),"data-slot":`number-field-group`,...n,children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})},Input:({className:e,...t})=>{let{slots:n}=(0,v.use)(EP);return(0,G.jsx)(BS,{className:K(e,n?.input()),"data-slot":`number-field-input`,...t})},IncrementButton:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(EP);return(0,G.jsx)($m,{className:K(t,r?.incrementButton()),"data-slot":`number-field-increment-button`,slot:`increment`,...n,children:e&&v.isValidElement(e)?e:(0,G.jsx)(jee,{"data-slot":`number-field-increment-button-icon`})})},DecrementButton:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(EP);return(0,G.jsx)($m,{className:K(t,r?.decrementButton()),"data-slot":`number-field-decrement-button`,slot:`decrement`,...n,children:e&&v.isValidElement(e)?e:(0,G.jsx)(Aee,{"data-slot":`number-field-decrement-button-icon`})})}}),kP=(0,v.createContext)({}),AP=({children:e,className:t,size:n,...r})=>{let i=v.useMemo(()=>Af({size:n}),[n]);return(0,G.jsx)(kP,{value:{slots:i},children:(0,G.jsx)(Xc.nav,{"aria-label":`pagination`,"data-slot":`pagination`,role:`navigation`,...r,className:q(i.base,t),children:e})})};AP.displayName=`HeroUI.Pagination`;var jP=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(kP);return(0,G.jsx)(Xc.div,{className:q(r?.summary,t),"data-slot":`pagination-summary`,dir:`auto`,...n,children:e})};jP.displayName=`HeroUI.Pagination.Summary`;var MP=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(kP);return(0,G.jsx)(Xc.ul,{className:q(r?.content,t),"data-slot":`pagination-content`,...n,children:e})};MP.displayName=`HeroUI.Pagination.Content`;var NP=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(kP);return(0,G.jsx)(Xc.li,{className:q(r?.item,t),"data-slot":`pagination-item`,...n,children:e})};NP.displayName=`HeroUI.Pagination.Item`;var PP=({children:e,className:t,isActive:n,...r})=>{let{slots:i}=(0,v.use)(kP);return(0,G.jsx)($m,{"aria-current":n?`page`:void 0,className:K(t,i?.link()),"data-active":n?`true`:void 0,"data-slot":`pagination-link`,...r,children:e})};PP.displayName=`HeroUI.Pagination.Link`;var FP=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(kP),i=`${r?.link()??``} pagination__link--nav`.trim();return(0,G.jsx)($m,{className:K(t,i),"data-slot":`pagination-previous`,...n,children:e})};FP.displayName=`HeroUI.Pagination.Previous`;var IP=({children:e,className:t,...n})=>(0,G.jsx)(Xc.span,{"aria-hidden":`true`,className:t,"data-slot":`pagination-previous-icon`,...n,children:e??(0,G.jsx)(lh,{})});IP.displayName=`HeroUI.Pagination.PreviousIcon`;var LP=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(kP),i=`${r?.link()??``} pagination__link--nav`.trim();return(0,G.jsx)($m,{className:K(t,i),"data-slot":`pagination-next`,...n,children:e})};LP.displayName=`HeroUI.Pagination.Next`;var RP=({children:e,className:t,...n})=>(0,G.jsx)(Xc.span,{"aria-hidden":`true`,className:t,"data-slot":`pagination-next-icon`,...n,children:e??(0,G.jsx)(uh,{})});RP.displayName=`HeroUI.Pagination.NextIcon`;var zP=({className:e,...t})=>{let{slots:n}=(0,v.use)(kP);return(0,G.jsx)(Xc.span,{"aria-hidden":`true`,className:q(n?.ellipsis,e),"data-slot":`pagination-ellipsis`,...t,children:`…`})};zP.displayName=`HeroUI.Pagination.Ellipsis`;var BP=Object.assign(AP,{Content:MP,Ellipsis:zP,Item:NP,Link:PP,Next:LP,NextIcon:RP,Previous:FP,PreviousIcon:IP,Root:AP,Summary:jP}),VP=(0,v.createContext)({}),HP=({children:e,className:t,fullWidth:n,variant:r,...i})=>{let a=v.useMemo(()=>Nf({fullWidth:n,variant:r}),[n,r]);return(0,G.jsx)(cS,{children:(0,G.jsx)(VP,{value:{slots:a},children:(0,G.jsx)(iS,{"data-slot":`select`,...i,className:K(t,a?.base()),children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})})})},UP=Object.assign(HP,{Root:HP,Trigger:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(VP);return(0,G.jsx)($m,{className:K(t,r?.trigger()),"data-slot":`select-trigger`,...n,children:t=>(0,G.jsx)(G.Fragment,{children:typeof e==`function`?e(t):e})})},Value:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(VP);return(0,G.jsx)(oS,{className:K(t,r?.value()),"data-slot":`select-value`,...n,children:e})},Indicator:({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(VP),i=(0,v.use)(rS);return e&&v.isValidElement(e)?v.cloneElement(e,{...n,className:q(r?.indicator,t),"data-slot":`select-indicator`,"data-open":oh(i?.isOpen)}):(0,G.jsx)(sh,{className:q(r?.indicator,t),"data-open":oh(i?.isOpen),"data-slot":`select-default-indicator`,...n})},Popover:({children:e,className:t,placement:n=`bottom`,...r})=>{let{slots:i}=(0,v.use)(VP);return(0,G.jsx)(gh,{value:{variant:`default`},children:(0,G.jsx)(b_,{...r,className:K(t,i?.popover()),"data-slot":`select-popover`,placement:n,children:e})})}}),WP=(0,v.createContext)({}),GP=({children:e,className:t,color:n,size:r,...i})=>{let a=v.useMemo(()=>Tf({color:n,size:r}),[n,r]);return(0,G.jsx)(iae,{"data-slot":`meter`,...i,className:K(t,a.base()),children:t=>(0,G.jsx)(WP,{value:{slots:a,state:t},children:typeof e==`function`?e(t):e})})};GP.displayName=`HeroUI.Meter`;var KP=({children:e,className:t,...n})=>{let{slots:r,state:i}=(0,v.use)(WP);return(0,G.jsx)(Xc.span,{className:q(r?.output,t),"data-slot":`meter-output`,...n,children:e??i?.valueText})};KP.displayName=`HeroUI.Meter.Output`;var qP=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(WP);return(0,G.jsx)(Xc.div,{className:q(r?.track,t),"data-slot":`meter-track`,...n,children:e})};qP.displayName=`HeroUI.Meter.Track`;var JP=({className:e,style:t,...n})=>{let{slots:r,state:i}=(0,v.use)(WP);return(0,G.jsx)(Xc.div,{className:q(r?.fill,e),"data-slot":`meter-fill`,style:{...t,width:`${i?.percentage??0}%`},...n})};JP.displayName=`HeroUI.Meter.Fill`;var YP=Object.assign(GP,{Root:GP,Output:KP,Track:qP,Fill:JP}),XP=(0,v.createContext)({}),ZP=({children:e,className:t,variant:n,...r})=>{let i=v.useMemo(()=>Lf({variant:n}),[n]);return(0,G.jsx)(XP,{value:{slots:i},children:(0,G.jsx)(Xc.div,{className:i.base({className:t}),"data-slot":`table`,...r,children:e})})};ZP.displayName=`HeroUI.Table`;var QP=({className:e,...t})=>{let{slots:n}=(0,v.use)(XP);return(0,G.jsx)(Xc.div,{className:q(n?.scrollContainer,e),"data-slot":`table-scroll-container`,...t})};QP.displayName=`HeroUI.Table.ScrollContainer`;function $P({className:e,...t}){let{slots:n}=(0,v.use)(XP);return(0,G.jsx)(goe,{className:K(e,n?.content()),"data-slot":`table-content`,...t})}$P.displayName=`HeroUI.Table.Content`;function eF({className:e,...t}){let{slots:n}=(0,v.use)(XP);return(0,G.jsx)(xoe,{className:K(e,n?.header()),"data-slot":`table-header`,...t})}eF.displayName=`HeroUI.Table.Header`;var tF=({className:e,ref:t,...n})=>{let{slots:r}=(0,v.use)(XP);return(0,G.jsx)(Eoe,{ref:t,className:K(e,r?.column()),"data-slot":`table-column`,...n})};tF.displayName=`HeroUI.Table.Column`;function nF({className:e,...t}){let{slots:n}=(0,v.use)(XP);return(0,G.jsx)(koe,{className:K(e,n?.body()),"data-slot":`table-body`,...t})}nF.displayName=`HeroUI.Table.Body`;function rF({className:e,...t}){let{slots:n}=(0,v.use)(XP);return(0,G.jsx)(joe,{className:K(e,n?.row()),"data-slot":`table-row`,...t})}rF.displayName=`HeroUI.Table.Row`;var iF=({className:e,ref:t,...n})=>{let{slots:r}=(0,v.use)(XP);return(0,G.jsx)(Noe,{ref:t,className:K(e,r?.cell()),"data-slot":`table-cell`,...n})};iF.displayName=`HeroUI.Table.Cell`;var aF=({className:e,...t})=>{let{slots:n}=(0,v.use)(XP);return(0,G.jsx)(Xc.div,{className:q(n?.footer,e),"data-slot":`table-footer`,...t})};aF.displayName=`HeroUI.Table.Footer`;var oF=({className:e,ref:t,...n})=>(0,G.jsx)(moe,{ref:t,className:$d(`table__resizable-container`,e),"data-slot":`table-resizable-container`,...n});oF.displayName=`HeroUI.Table.ResizableContainer`;var sF=({className:e,ref:t,...n})=>{let{slots:r}=(0,v.use)(XP);return(0,G.jsx)(Doe,{ref:t,className:K(e,r?.columnResizer()),"data-slot":`table-column-resizer`,...n})};sF.displayName=`HeroUI.Table.ColumnResizer`;var cF=({className:e,ref:t,...n})=>{let{slots:r}=(0,v.use)(XP);return(0,G.jsx)(Boe,{ref:t,className:q(r?.loadMore,e),"data-slot":`table-load-more`,...n})};cF.displayName=`HeroUI.Table.LoadMore`;var lF=({className:e,...t})=>{let{slots:n}=(0,v.use)(XP);return(0,G.jsx)(Xc.div,{className:q(n?.loadMoreContent,e),"data-slot":`table-load-more-content`,...t})};lF.displayName=`HeroUI.Table.LoadMoreContent`;var uF=({children:e,className:t,indicator:n,ref:r,showIndicator:i=!0,sortDirection:a,...o})=>{let{slots:s}=(0,v.use)(XP),c=i&&!!a,l=null;if(c){if(n===void 0)l=(0,G.jsx)(ch,{className:s?.sortableColumnIndicator(),"data-direction":a,"data-slot":`table-sortable-column-indicator`});else if(v.isValidElement(n)){let e=n;l=v.cloneElement(e,{className:q(s?.sortableColumnIndicator,e.props.className),"data-direction":a,"data-slot":`table-sortable-column-indicator`})}else l=n}return(0,G.jsxs)(`span`,{ref:r,className:q(s?.sortableColumnHeader,t),"data-direction":a,"data-slot":`table-sortable-column-header`,...o,children:[e,l]})};uF.displayName=`HeroUI.Table.SortableColumnHeader`;var X=Object.assign(ZP,{Body:nF,Cell:iF,Collection:W_,Column:tF,ColumnResizer:sF,Content:$P,Footer:aF,Header:eF,LoadMore:cF,LoadMoreContent:lF,ResizableContainer:oF,Root:ZP,Row:rF,ScrollContainer:QP,SortableColumnHeader:uF}),dF=(0,v.createContext)(null);function fF(){let e=(0,v.use)(dF);if(!e)throw Error(`useYearPicker must be used within a or component.`);return e}function pF(){let e=(0,v.use)(xk),t=(0,v.use)(Sk),n=e??t;if(!n)throw Error(`useCalendarOrRangeState must be used within a or component.`);return n}function mF(e){switch(e){case`buddhist`:return 543;case`ethiopic`:case`ethioaa`:return-8;case`coptic`:return-284;case`hebrew`:return 3760;case`indian`:return-78;case`islamic-civil`:case`islamic-tbla`:case`islamic-umalqura`:return-579;case`persian`:return-600;default:return 0}}function hF(e,t){let n=[];if(!e||!t)return n;let r=Nw(e);for(;r.compare(t)<=0;)n.push(r),r=Nw(r.add({years:1}));return n}function gF(e,t,n,r=`short`,i=`UTC`){let a=new Intl.DateTimeFormat(t,{weekday:r,timeZone:i}),o=Pw(e,t,n),s=[],c=o;for(let e=0;e<7;e++){s.push(a.format(c.toDate(i)));let e=c.add({days:1});if(yw(c,e))break;c=e}for(;s.length<7;)s.push(``);return s}function _F(e,t){let n=[],r=e;for(let e=0;e<7;e++){n.push(r.compare(t)>0?null:r);let e=r.add({days:1});if(yw(r,e)){for(;n.length<7;)n.push(null);return n}r=e}return n}function vF(e,t,n,r){let i=[],a=Pw(e,n,r);for(i.push(_F(a,t)),a=a.add({weeks:1});a.compare(t)<=0;){i.push(_F(a,t));let e=a.add({weeks:1});if(yw(a,e))break;a=e}return i}var yF=v.createContext(null);function bF(){let e=v.use(yF);if(!e)throw Error(`CalendarYearPicker trigger components must be used within .`);return e}var xF=({children:e,className:t,onKeyDown:n,onPress:r,...i})=>{let{isYearPickerOpen:a,setIsYearPickerOpen:o}=fF(),s=sk({},pF()),c=v.useMemo(()=>of(),[]),l=v.useCallback(()=>{o(!a)},[a,o]),u=e=>{n?.(e),!e.defaultPrevented&&e.key===`Escape`&&a&&(e.preventDefault(),o(!1))},d=v.useMemo(()=>({isOpen:a,monthYear:s,toggle:l}),[l,a,s]),f=v.useMemo(()=>({...d,slots:c}),[c,d]);return(0,G.jsx)(yF,{value:f,children:(0,G.jsx)($m,{"aria-expanded":a,"aria-label":`${s}, year selector`,className:K(t,c.trigger()),"data-open":a||void 0,"data-slot":`calendar-year-picker-trigger`,slot:null,onKeyDown:u,onPress:e=>{r?.(e),l()},...i,children:typeof e==`function`?e(d):e})})};xF.displayName=`HeroUI.CalendarYearPicker.Trigger`;var SF=({children:e,className:t,format:n,offset:r,...i})=>{let{monthYear:a,slots:o,...s}=bF(),c=pF(),l=sk({format:n,offset:r},c);return(0,G.jsx)(Xc.span,{className:q(o.triggerHeading,t),"data-slot":`calendar-year-picker-trigger-heading`,...i,children:typeof e==`function`?e({monthYear:a,...s}):e||l})};SF.displayName=`HeroUI.CalendarYearPicker.TriggerHeading`;var CF=({children:e,className:t,...n})=>{let{monthYear:r,slots:i,...a}=bF();return(0,G.jsx)(Xc.span,{"aria-hidden":`true`,className:q(i.triggerIndicator,t),"data-slot":`calendar-year-picker-trigger-indicator`,...n,children:typeof e==`function`?e({monthYear:r,...a}):e||(0,G.jsx)(uh,{height:`1em`,width:`1em`})})};CF.displayName=`HeroUI.CalendarYearPicker.TriggerIndicator`;var wF=v.createContext(null);function TF(){let e=v.use(wF);if(!e)throw Error(`CalendarYearPicker components must be used within .`);return e}var EF=({children:e,className:t,format:n,onKeyDown:r,visibleYears:i,...a})=>{let{calendarGridSlot:o,calendarRef:s,isYearPickerOpen:c,setIsYearPickerOpen:l}=fF(),u=pF(),d=v.useRef(null),f=v.useMemo(()=>of(),[]),{"aria-label":p,items:m,onChange:h,value:g}=Nie({format:n,visibleYears:v.useMemo(()=>i??(!u.minValue||!u.maxValue?20:hF(u.minValue,u.maxValue).length),[u.maxValue,u.minValue,i])},u),_=m.map(e=>`${e.id}:${e.date.year}`).join(`|`),y=m.map(e=>e.date.year),b=new Map(m.map(e=>[e.date.year,e])),x=m[g]?.date.year??u.focusedDate.year,S=v.useCallback(e=>b.get(e)?.formatted??String(e),[b]),[C,w]=v.useState(x),T=v.useRef(!1);v.useEffect(()=>{let e=d.current;if(!e)return;let t=s.current?.querySelector(`[data-slot='${o}']`);t&&(e.style.top=`${t.offsetTop}px`,e.style.height=`${t.offsetHeight}px`)},[o,s,u.focusedDate]);let E=v.useCallback(e=>{let t=d.current;if(!t)return;let n=t.querySelector(`[data-year='${e}']`);n&&n.focus()},[]);v.useEffect(()=>{let e=c&&!T.current;if(T.current=c,!e||y.length===0)return;let[t]=y;if(t==null)return;let n=y.includes(x)?x:t;w(n);let r=requestAnimationFrame(()=>{E(n)});return()=>{cancelAnimationFrame(r)}},[E,x,c,_,y.length]),v.useEffect(()=>{if(!c||y.length===0)return;let[e]=y;e!=null&&(y.includes(C)||w(e))},[C,c,_,y]);let D=v.useCallback(e=>{let t=b.get(e);t!=null&&(l(!1),h(t.id))},[b,h,l]),O=e=>{if(r?.(e),e.defaultPrevented)return;if(e.key===`Escape`&&c){e.preventDefault(),l(!1);return}if(!c||y.length===0)return;let t=y.indexOf(C);if(t===-1)return;let n=t;switch(e.key){case`ArrowRight`:n=Math.min(t+1,y.length-1);break;case`ArrowLeft`:n=Math.max(t-1,0);break;case`ArrowDown`:n=Math.min(t+3,y.length-1);break;case`ArrowUp`:n=Math.max(t-3,0);break;case`Home`:n=0;break;case`End`:n=y.length-1;break;default:return}if(n!==t){let t=y[n];if(t==null)return;e.preventDefault(),w(t),E(t)}},k=v.useMemo(()=>({activeYear:C,focusedYear:x,getFormattedYear:S,isYearPickerOpen:c,selectYear:D,setActiveYear:w,slots:f,years:y}),[C,x,S,D,c,f,y]);return(0,G.jsx)(wF,{value:k,children:(0,G.jsx)(Xc.div,{ref:d,"aria-hidden":!c,"aria-label":p,className:q(f.yearGrid,t),"data-open":c||void 0,"data-slot":`calendar-year-picker-grid`,role:`listbox`,tabIndex:-1,onKeyDown:O,...a,children:e})})};EF.displayName=`HeroUI.CalendarYearPicker.Grid`;var DF=({children:e})=>{let{focusedYear:t,getFormattedYear:n,isYearPickerOpen:r,selectYear:i,years:a}=TF(),o=new Date().getFullYear();return(0,G.jsx)(G.Fragment,{children:a.map(a=>{let s=a===t,c={formattedYear:n(a),isCurrentYear:a===o,isOpen:r,isSelected:s,selectYear:()=>i(a),year:a};return(0,G.jsx)(v.Fragment,{children:typeof e==`function`?e(c):(0,G.jsx)(OF,{year:a})},a)})})};DF.displayName=`HeroUI.CalendarYearPicker.GridBody`;var OF=({children:e,className:t,excludeFromTabOrder:n,onFocus:r,onPress:i,year:a,...o})=>{let{activeYear:s,focusedYear:c,getFormattedYear:l,isYearPickerOpen:u,selectYear:d,setActiveYear:f,slots:p}=TF(),m=a===c,h=a===s,g=l(a),_={formattedYear:g,isCurrentYear:a===new Date().getFullYear(),isOpen:u,isSelected:m,selectYear:()=>d(a),year:a};return(0,G.jsx)($m,{"aria-label":g,"aria-selected":m,className:K(t,p.yearCell()),"data-selected":m||void 0,"data-slot":`calendar-year-picker-year-cell`,"data-year":a,excludeFromTabOrder:n??!(u&&h),slot:null,onFocus:e=>{r?.(e),f(a)},onPress:e=>{i?.(e),d(a)},...o,children:typeof e==`function`?e(_):e||g})};OF.displayName=`HeroUI.CalendarYearPicker.Cell`;function kF({children:e,className:t,"data-slot":n=`calendar-grid-body`,firstDayOfWeek:r,visibleRange:i}){let{locale:a}=bp(),o=v.useMemo(()=>vF(i.start,i.end,a,r),[r,a,i.end,i.start]);return(0,G.jsx)(Xc.tbody,{className:t,"data-slot":n,children:o.map((t,n)=>(0,G.jsx)(`tr`,{children:t.map((t,n)=>t?v.cloneElement(e(t),{key:n}):(0,G.jsx)(`td`,{},n))},n))})}function AF({children:e,className:t,"data-slot":n=`calendar-grid-header`,firstDayOfWeek:r,timeZone:i=`UTC`,visibleRange:a,weekdayStyle:o=`short`}){let{locale:s}=bp(),c=v.useMemo(()=>gF(a.start,s,r,o,i),[r,s,i,a.start,o]);return(0,G.jsx)(Xc.thead,{"aria-hidden":!0,className:t,"data-slot":n,children:(0,G.jsx)(`tr`,{children:c.map((t,n)=>v.cloneElement(e(t),{key:n}))})})}var jF=(0,v.createContext)({});function MF({children:e,className:t,defaultYearPickerOpen:n=!1,firstDayOfWeek:r,isYearPickerOpen:i,maxValue:a,minValue:o,onYearPickerOpenChange:s,visibleDuration:c,...l}){let u=c?.weeks!=null,d=c?.days!=null,f=c?.days,{locale:p}=bp(),m=v.useMemo(()=>sf(),[]),h=v.useRef(null),[g,_]=eh(i,n,s),y=v.useMemo(()=>{let e=new yE(p).resolvedOptions().calendar;return _E(e)},[p]),b=v.useMemo(()=>mF(y.identifier),[y.identifier]),x=o??new wT(y,1900+b,1,1),S=a??new wT(y,2099+b,12,31);return(0,G.jsx)(dF,{value:{calendarGridSlot:`range-calendar-grid`,isYearPickerOpen:g,setIsYearPickerOpen:_,calendarRef:h},children:(0,G.jsx)(Rie,{ref:h,"data-slot":`range-calendar`,firstDayOfWeek:r,maxValue:S,minValue:x,visibleDuration:c,...l,className:K(t,$d(m.base(),u&&`range-calendar--week-view`,d&&`range-calendar--day-view`)),children:t=>(0,G.jsx)(jF,{value:{dayView:d&&f!=null?{days:f,firstDayOfWeek:r,timeZone:t.state.timeZone,visibleRange:t.state.visibleRange}:void 0,slots:m},children:typeof e==`function`?e(t):e})})})}MF.displayName=`HeroUI.RangeCalendar`;var NF=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(jF);return(0,G.jsx)(Xc.header,{className:q(r?.header,t),"data-slot":`range-calendar-header`,...n,children:e})};NF.displayName=`HeroUI.RangeCalendar.Header`;var PF=({className:e,...t})=>{let{slots:n}=(0,v.use)(jF);return(0,G.jsx)(Wie,{"data-slot":`range-calendar-heading`,...t,className:q(n?.heading,e)})};PF.displayName=`HeroUI.RangeCalendar.Heading`;var FF=({children:e,className:t,slot:n,...r})=>{let{slots:i}=(0,v.use)(jF);return(0,G.jsx)($m,{"data-slot":`range-calendar-nav-button`,slot:n,...r,className:K(t,i?.navButton()),children:e||(n===`previous`?(0,G.jsx)(lh,{className:i?.navButtonIcon(),"data-slot":`range-calendar-nav-button-icon`}):(0,G.jsx)(uh,{className:i?.navButtonIcon(),"data-slot":`range-calendar-nav-button-icon`}))})};FF.displayName=`HeroUI.RangeCalendar.NavButton`;var IF=({children:e,className:t,weekdayStyle:n=`short`,...r})=>{let i=(0,v.use)(jF),{dayView:a,slots:o}=i,s=v.useMemo(()=>({...i,dayView:a?{...a,weekdayStyle:n}:void 0}),[a,i,n]);return(0,G.jsx)(jF,{value:s,children:(0,G.jsx)(zie,{"data-slot":`range-calendar-grid`,weekdayStyle:n,...r,className:q(o?.grid,t),children:e})})};IF.displayName=`HeroUI.RangeCalendar.Grid`;var LF=({children:e,className:t,...n})=>{let{dayView:r,slots:i}=(0,v.use)(jF);return r&&r.days>=7&&typeof e==`function`?(0,G.jsx)(AF,{className:q(i?.gridHeader,t),"data-slot":`range-calendar-grid-header`,firstDayOfWeek:r.firstDayOfWeek,timeZone:r.timeZone,visibleRange:r.visibleRange,weekdayStyle:r.weekdayStyle,children:e}):(0,G.jsx)(wk,{"data-slot":`range-calendar-grid-header`,...n,className:q(i?.gridHeader,t),children:e})};LF.displayName=`HeroUI.RangeCalendar.GridHeader`;var RF=({children:e,className:t,...n})=>{let{dayView:r,slots:i}=(0,v.use)(jF);return r&&r.days>=7&&typeof e==`function`?(0,G.jsx)(kF,{className:q(i?.gridBody,t),"data-slot":`range-calendar-grid-body`,firstDayOfWeek:r.firstDayOfWeek,visibleRange:r.visibleRange,children:e}):(0,G.jsx)(Ek,{"data-slot":`range-calendar-grid-body`,...n,className:q(i?.gridBody,t),children:e})};RF.displayName=`HeroUI.RangeCalendar.GridBody`;var zF=({className:e,...t})=>{let{slots:n}=(0,v.use)(jF);return(0,G.jsx)(Tk,{"data-slot":`range-calendar-header-cell`,...t,className:q(n?.headerCell,e)})};zF.displayName=`HeroUI.RangeCalendar.HeaderCell`;var BF=({children:e,className:t,...n})=>{let{slots:r}=(0,v.use)(jF);return(0,G.jsx)(Uie,{"data-slot":`range-calendar-cell`,...n,className:K(t,r?.cell()),children:t=>{let{formattedDate:n,isDisabled:r,isHovered:i,isPressed:a,isSelectionEnd:o,isSelectionStart:s}=t,c=typeof e==`function`?e(t):e||n;return(0,G.jsx)(`span`,{className:`range-calendar__cell-button`,"data-disabled":oh(r),"data-hovered":oh(i),"data-pressed":oh(a),"data-selected":oh(s||o),"data-slot":`range-calendar-cell-button`,children:c})}})};BF.displayName=`HeroUI.RangeCalendar.Cell`;var VF=({className:e,...t})=>{let{slots:n}=(0,v.use)(jF);return(0,G.jsx)(Xc.span,{"aria-hidden":`true`,className:q(n?.cellIndicator,e),"data-slot":`range-calendar-cell-indicator`,...t})};VF.displayName=`HeroUI.RangeCalendar.CellIndicator`;var HF=Object.assign(MF,{Root:MF,Header:NF,Heading:PF,NavButton:FF,Grid:IF,GridHeader:LF,GridBody:RF,HeaderCell:zF,Cell:BF,CellIndicator:VF,YearPickerTrigger:xF,YearPickerTriggerHeading:SF,YearPickerTriggerIndicator:CF,YearPickerGrid:EF,YearPickerGridBody:DF,YearPickerCell:OF}),UF={en:{brandSub:`login state gateway`,controlPlane:`control plane`,workspace:`Workspace`,develop:`Develop`,system:`System`,runtimeSnapshot:`Runtime and scheduler snapshot`,routesHint:`OpenAI / Anthropic-compatible routes`,clientConfig:`Client configuration`,clientConfigHint:`Use the same console key as Bearer token`,providerPrefixHint:`Pin a provider with a qoder/, workbuddy/, trae/, devin/, command/, codex/, zhipu/, qwenwork/, kimi/, codearts/, kiro/, or meta/ model prefix. A named API key can also limit which providers are listed and routed. Bare IDs follow the cross-provider pool setting on System.`,authentication:`Authentication`,curlExample:`curl example`,quickTestHint:`Send a real request through the selected account`,response:`Response`,providerCatalog:`Model catalog`,providerCatalogMeta:`SIGNED-IN / LIVE`,accountPool:`Account pool`,accountCreateHint:`Create an isolated runtime first, then sign in with browser or PAT.`,credentialImportHint:`Only credential bundles exported from this console, with matching user blob and machine ID.`,accountEmptyHint:`Create an account runtime to begin.`,oauthDeviceFlow:`OAuth device flow`,navOverview:`Overview`,navAuth:`Accounts`,navProviders:`Models`,navAccess:`Access & try`,navAccounts:`Accounts`,checkinDefaultsTitle:`Automatic check-in`,checkinDefaultsHint:`Set a default time for each provider. Accounts following the default pick up changes automatically; custom times stay unchanged.`,checkinDisabledAccountsTitle:`Check in disabled accounts`,checkinDisabledAccountsHint:`When enabled, accounts disabled for chat can still run their opted-in automatic check-in. Manual check-in remains unavailable for disabled accounts.`,checkinDisabledAccountsStatus:`Current status`,checkinDisabledAccountsAriaLabel:`Allow automatic check-in for disabled accounts`,checkinInherit:`Follow provider default`,checkinDefaultValue:`Provider default: {time}`,checkinCustom:`Account override`,checkinScheduleHint:`Uses the displayed timezone, normally within about 90 seconds of the chosen time; sequential account processing can take longer. Earlier failures retry once around 21:00. Disabled campaigns are skipped for the day. Chat is unaffected.`,checkinTimeInvalid:`Enter a valid check-in time (HH:mm).`,checkinRecordSkipped:`Activity unavailable`,navUsage:`Usage`,usageTitle:`Usage`,usageLead:`Requests, latency, tokens and credits by model, account and provider.`,usageByModel:`Models`,usageByAccount:`Accounts`,usageByProvider:`Providers`,usageColRequests:`Requests`,usageColSuccess:`Success`,usageColTokens:`Tokens`,usageColCacheWrite:`Cache write`,usageColCredits:`Credits`,usageRowCount:`{count} rows`,usageEmpty:`No requests in this window.`,usageStatsTab:`Stats`,usageCostTab:`Quota`,usageCostLead:`Subscription quota and token usage by model across every provider.`,usageWindow:`Window`,usageWindow24h:`24h`,usageWindow7d:`7d`,usageWindowTotal:`All retained`,usageCredits:`Quota used`,usageCreditsHint:`Subscription credits across all providers`,usageEstCost:`Equivalent cost`,usageTotalTokens:`Total tokens`,usageRequests:`Requests`,usageModelCount:`{count} models`,usageCacheHitRate:`Cache hit`,usageTokenSplitNote:`hit / miss / output`,usageChartTitle:`Usage over time`,usageChartHint:`Stacked by model. Switch between quota and tokens.`,usageChartEmpty:`No usage in this window.`,usageBreakdownTitle:`By model`,usageBreakdownHint:`Tokens and subscription credits for every model.`,usageColInputHit:`Input · cache hit`,usageColInputMiss:`Input · cache miss`,usageColOutput:`Output`,usageColCost:`Equiv. cost`,usageUnpricedCost:`no list price`,usageColSplit:`Peak / off-peak`,usageTotals:`Total`,usageRetentionHint:`Request logs are pruned on a schedule, so “All retained” covers only what is still stored.`,usageRenderNote:`Optional DeepSeek official list-price estimate in CNY. Subscription accounts do not bill this way — for comparison only.`,usagePeakNote:`Peak = Beijing time Mon–Fri 09:00–12:00 & 14:00–18:00; off-peak is half. Holidays are not handled.`,usageUnpricedHint:`No list-price row (quota and tokens only): {models}`,usageNoteTitle:`How this is calculated`,usagePriceTitle:`DeepSeek official price table`,usagePriceHit:`Cache hit`,usagePriceMiss:`Cache miss`,usagePriceOutput:`Output`,usagePriceBandOff:`Off-peak`,usagePriceBandPeak:`Peak`,usageOffPeak:`Off-peak`,usagePeak:`Peak`,usageChartMetric:`Chart metric`,usageEstimateTitle:`DeepSeek list-price estimate`,usageEstimateHint:`Optional CNY comparison for priced models. Collapsed by default.`,usageEstimateChartTitle:`List-price trend`,usageEstimateChartEmpty:`No priced DeepSeek usage in this window.`,chartMetricRequests:`Requests`,chartMetricTokens:`Tokens`,chartMetricLatency:`p95 latency`,chartInput:`Input`,chartOutput:`Output`,chartCacheRead:`Cache read`,chartTotal:`Total`,navLogs:`Logs`,navKeys:`API keys`,navSystem:`System settings`,sidebarFoot:`Gateway for CLI logins`,sidebarInFlight:`In flight: {count}`,systemSettingsTitle:`System settings`,systemSettingsLead:`Manage cross-provider routing, provider check-in defaults, updates, SQLite protection, and the console API key.`,crossProviderModelPoolTitle:`Cross-provider model pool`,crossProviderModelPoolHint:`When enabled, bare model IDs can route across matching Qoder, WorkBuddy, and Trae accounts. When disabled, bare IDs are rejected and requests must use a provider-prefixed model ID.`,crossProviderModelPoolStatus:`Current status`,crossProviderModelPoolAriaLabel:`Enable cross-provider model pool`,workbuddyCheckinSettingsTitle:`WorkBuddy check-in`,workbuddyCheckinSettingsHint:`Default first daily check-in time for new WorkBuddy accounts. Existing accounts keep their own time until you edit them.`,workbuddyCheckinSettingsFieldHint:`Uses server local time. New WorkBuddy accounts inherit this unless you set a different time on the account.`,routingStrategyTitle:`Account routing strategy`,routingStrategyHint:`Choose how ready accounts share traffic. Fill-first keeps traffic on the highest-priority account until it is unavailable. Earliest-expiry-first only ranks accounts inside the same provider by their nearest credit-package expiry; providers without package expiry keep the existing rotation.`,routingStrategy:`Strategy`,routingRoundRobin:`Round robin`,routingWeightedRoundRobin:`Weighted round robin`,routingFillFirst:`Fill first`,routingFEFO:`Earliest expiry first (FEFO)`,routingWeight:`Routing weight`,sessionAffinityTTL:`Session TTL`,sessionAffinityHits:`Sticky hits`,sessionAffinityMisses:`Sticky misses`,sessionAffinityEscapes:`Sticky escapes`,lastSessionMiss:`Last miss`,lastSessionEscape:`Last escape`,checkUpdates:`Check updates`,versionUpdate:`Version update`,latestVersionHint:`Download the latest version first, then apply it when you are ready.`,updateAvailable:`Update available`,settingsTabGeneral:`General`,settingsTabRouting:`Routing`,settingsTabSecurity:`Security & data`,settingsTabUpdates:`Updates`,sidebarNewVersion:`New version {version}`,sidebarReleaseNotes:`Release notes`,sidebarGoToUpdate:`History & rollback`,upToDate:`Up to date`,currentVersion:`Current version`,latestVersion:`Latest version`,skippedBetweenLabel:`Versions in between`,releaseNotes:`What changed`,updateNoNotes:`No notes for this version.`,versionHistory:`Version history`,versionCurrentBadge:`Current`,versionLatestBadge:`Latest`,restoreThisVersion:`Restore this version`,restoreVersionTitle:`Restore {version}?`,restoreVersionHint:`The service will switch back to this version. New requests pause only while it restarts.`,updaterReady:`Updates are ready on this host`,updaterUnavailable:`Updates are not available on this host`,updaterNeedsHost:`This process cannot replace its own container`,updaterUnavailableHint:`This page can check for new versions, but this host cannot apply them until updates are set up.`,updaterNeedInstall:`Install the host updater from deploy/install-updater.sh or deploy/install-updater.ps1 so it can talk to Docker.`,updaterNeedCompose:`Linux needs the updater socket mounted into the container. Docker Desktop uses a loopback updater URL instead of a Unix socket.`,updaterNeedRelease:`The running build must be a published GitHub release, not a local or development image.`,updateNow:`Download update`,applyUpdateNow:`Update now`,cancelUpdate:`Cancel download`,discardPreparedImage:`Discard this update`,updateReadyHint:`The update is downloaded. Apply it when you want to restart; new requests pause only then.`,updateReadyTargetHint:`Ready to switch to {version}. New requests pause only during the restart.`,updateNewerReleaseHint:`A newer version is available ({latest}). Update now, or discard this download and start again.`,updateStagedUnavailableHint:`Update the host updater first to use the staged update flow.`,updateLegacyOneShotHint:`This host will download and apply the update in one step. Later versions can download first, then wait for Update now.`,rollbackToVersion:`Restore an older version`,rollbackToVersionHint:`You can restore one of the three most recent versions before the one running now.`,updateReloadingIn:`Refreshing in {seconds}s`,updateInProgress:`Updating…`,updatePreparingImage:`Downloading update…`,updatePreparingImageHint:`Downloading the update in the background. This host stays on the current version until you tap Update now. Cancel if the download hangs.`,updateApplyingHint:`Applying the update. This page will refresh when it is ready.`,updateInProgressHint:`The service is updating and will refresh automatically when it is ready.`,updateUnavailableHint:`Updates are temporarily unavailable. Please try again later.`,updateFailedHint:`The update could not be completed. Please try again.`,updateCheckFailedHint:`Unable to check for updates. Please try again later.`,updatePreparingHint:`Getting the update ready: checking the version and saving a backup. Existing connections may be interrupted; clients can retry.`,updateRunningHint:`The update is running. This page will refresh when it is ready.`,updateReloadingHint:`Update complete. Refreshing this page…`,updateElapsed:`{seconds}s elapsed`,sqliteProtection:`SQLite protection`,sqliteProtectionHint:`Your data stays in place, and a verified backup is created before the update.`,sqliteBackupBeforeUpdate:`Verified backup before the update`,sqliteKeepFive:`Keep the five most recent backups`,sqliteRollbackTogether:`Restore the database and previous version together if the update fails`,updateStatus:`Update status`,noUpdateJob:`No update job yet`,confirmUpdate:`Update now`,confirmUpdateHint:`New requests pause briefly while a backup is created. Existing connections may be interrupted; clients can retry them.`,updateState_idle:`Idle`,updateState_unavailable:`Unavailable`,updateState_queued:`Waiting to start`,updateState_preparing:`Getting ready`,updateState_preparing_image:`Downloading update`,updateState_checking:`Checking version`,updateState_backing_up:`Saving a backup`,updateState_submitting:`Starting update`,updateState_running:`Updating`,updateState_pulling:`Downloading update`,updateState_host_binary:`Downloading update helper`,updateState_image_ready:`Download complete`,updateState_ready_to_apply:`Ready to update`,updateState_recreating:`Restarting`,updateState_health_checking:`Checking that it started`,updateState_rolling_back:`Restoring previous version`,updateState_succeeded:`Updated`,updateState_rolled_back:`Restored previous version`,updateState_failed:`Update failed`,checking:`checking`,refresh:`Refresh`,apiKey:`API key`,apiKeyPh:`API key`,needApiKey:`Sign in with the console password to load data.`,loginTitle:`Enter the console`,loginLead:`This host already has a running CLI2API proxy. Use the same API key your clients send to /v1.`,loginDesc:`Same key as Authorization: Bearer on the API.`,loginFormTitle:`Continue`,loginPassword:`Console password`,loginPasswordPh:`API key`,loginNeedKey:`Password is empty.`,loginBadKey:`That key does not match this host.`,loginSubmit:`Continue`,loggingInConsole:`Checking…`,loginHint:`Self-hosted only. Account login happens after this, on Accounts.`,showPassword:`Show password`,hidePassword:`Hide password`,signOut:`Sign out`,checkingSession:`Checking session…`,refreshing:`Refreshing`,pages:{home:{title:`Overview`,desc:`Runtime health, request volume, and ready endpoints.`},auth:{title:`Auth`,desc:`Browser device-flow login, PAT login, and session rewarm.`},providers:{title:`Models`,desc:`Models from signed-in accounts, plus per-model defaults for context and reasoning.`},access:{title:`Access & try`,desc:`Multi-turn chat in the main panel; expand Raw API below to debug.`},accounts:{title:`Accounts`,desc:`One login per account. Browser sign-in first; PAT only when needed.`},usage:{title:`Usage`,desc:`Usage by model, account and provider.`},logs:{title:`Logs`,desc:`Recent proxy requests and process output.`},keys:{title:`API keys`,desc:`Create client keys and limit their providers and concurrency.`},system:{title:`System settings`,desc:`Cross-provider routing, managed updates, SQLite protection, and the console API key.`},login:{title:`Enter the console`,desc:`Same API key as /v1.`}},logsLead:`Request history and runtime output from this host.`,logsRequests:`Request history`,logsRuntime:`Runtime logs`,logsEmptyRequests:`No requests recorded yet.`,logsEmptyRuntime:`No runtime lines captured yet.`,logsSearchRuntime:`Search runtime output…`,logsSearchRequestId:`Find a request id`,logsSearchModel:`Find a model`,logsSearchAccount:`Find an account`,logsFilterIdAll:`All request IDs`,logsNoFilterOptions:`No matching options`,logsClear:`Clear history`,logsClearConfirm:`Delete all request history on this host?`,logsColTime:`Time`,logsColAccount:`Account`,logsColApiKey:`API key`,logsColProvider:`Provider`,logsColModel:`Model`,logsColReasoning:`Reasoning`,logsColStatus:`Status`,logsColLatency:`Latency`,logsColTTFT:`First token`,logsLatencyTotal:`Total`,logsOutputTPS:`Output TPS`,logsColTokens:`Tokens`,logsTokensIn:`in`,logsTokensOut:`out`,logsTokensPoints:`{value} pts`,logsColStream:`Mode`,logsStreamYes:`stream`,logsStreamNo:`sync`,logsFilterAll:`All`,logsFilterOk:`OK`,logsFilterIncomplete:`Incomplete`,logsFilterError:`Error`,logsFilterCanceled:`Canceled`,logsFilterAccountAll:`All accounts`,logsFilterApiKeyAll:`All API keys`,logsSearchApiKey:`Find an API key`,logsFilterProviderAll:`All providers`,logsFilterModelAll:`All models`,logsFilterKindAll:`All errors`,logsFilterStreamAll:`All modes`,logsTimeRange:`Time`,logsTimeAll:`All time`,logsTime1h:`1 hour`,logsTime24h:`24 hours`,logsTime7d:`7 days`,logsTimeCustom:`Custom`,logsTimeFrom:`From`,logsTimeTo:`To`,logsKindQuota:`Quota`,logsKindRateLimit:`Rate limit`,logsKindAuth:`Auth`,logsKindNotReady:`Not ready`,logsKindUnavailable:`Unavailable`,logsKindInvalidRequest:`Invalid request`,logsKindModelNotAvailable:`Model missing`,logsPageSize:`Per page`,logsPage:`Page {page} / {pages}`,logsPrevPage:`Previous`,logsNextPage:`Next`,logsNoMatch:`No requests match these filters.`,logsLevelAll:`All`,logsLevelInfo:`Info`,logsLevelWarn:`Warn`,logsLevelError:`Error`,logsAttempts:`Attempts`,logsRouting:`Routing`,logsRouting_pool:`Pool`,logsRouting_pin:`Pinned`,logsRouting_sticky:`Session sticky`,logsRouting_sticky_escape:`Session escape`,logsNoAttempts:`No attempt details.`,logsStreamDiagnostics:`Stream diagnostics`,logsMessageShape:`Message shape`,logsMessageCount:`Messages`,logsEmptyMessageIndexes:`Empty indexes`,logsMessageRoles:`Roles`,logsCancellationSource:`Cancellation source`,logsUpstreamStatus:`Upstream status`,logsSSEEvents:`SSE events`,logsBytesRead:`Bytes read`,logsLastEvent:`Last event`,logsStreamComplete:`Completed with [DONE]`,logsUsageDetail:`Consumption`,logsCreditConsumed:`Points consumed`,logsDetailTitle:`Request detail`,logsRuntimeDetailTitle:`Runtime log detail`,logsRuntimeLevel:`Level`,logsRuntimeSource:`Source`,logsRuntimeMessage:`Message`,logsShownTotal:`{shown} / {total}`,logsAutoRefresh:`Live`,failedLogs:`Failed to load logs: {msg}`,homeEyebrow:`Runtime`,homeDisplay:`Gateway pulse`,homeLead:`Runtime health plus request volume, latency, and tokens from this host.`,metricRequests:`Requests`,metricSuccess:`Success`,metricLatency:`p95`,metricTokens:`Tokens`,statsWindow1h:`1h`,statsWindow24h:`24h`,statsWindow7d:`7d`,statsWindow30d:`30d`,statsWindowCustom:`Custom`,statsWindowToday:`Today`,statsRefreshPause:`Pause auto-refresh`,statsRefreshResume:`Resume auto-refresh`,statsRefreshAuto:`Refreshing every 30s · click to pause`,statsRefreshPaused:`Auto-refresh paused · click to resume`,statsDragHint:`Drag to open logs for a range`,statsWindowHint:`{window} window`,statsTraffic:`Traffic`,statsTrafficHint:`Completed chat requests in the selected window`,statsEmptyTraffic:`No requests in this window yet.`,statsLatencyP50:`p50`,statsLatencyP95:`p95`,statsLatencyAvg:`avg`,statsTTFB:`TTFB`,statsPool:`Account pool`,statsPoolHint:`Ready workers and remaining quota`,statsCooling:`cooling`,statsCoolingChip:`{count} cooling`,statsPoolReadyEmpty:`No ready workers right now — check cooling above or Accounts.`,statsTopModels:`Top models`,statsTopAccounts:`Top accounts`,statsTopProviders:`Providers`,statsTopProvidersHint:`Request share by account family`,statsNoProviders:`No provider traffic yet.`,statsErrorMix:`Error mix`,statsStatusMix:`Outcomes & errors`,statsStatusMixHint:`Request status, failure kinds and busiest accounts`,statsCoolingDetails:`Cooling down · reason · remaining · backoff`,statsBackoffLevel:`Restart backoff level`,statsAffinityHit:`Affinity hit`,statsAffinityHint:`{hits} hits · {misses} misses · {bindings} bindings`,metricCacheHit:`Cache hit rate`,metricCacheHitDetail:`{read} cached / {prompt} prompt`,metricStreaming:`Streaming share`,metricStreamingDetail:`{count} of {total} requests`,metricCanceled:`Canceled`,metricCanceledDetail:`{rate} of requests`,statsErrorMixHint:`Classified failures in this window`,statsNoModels:`No model traffic yet.`,statsNoAccounts:`No account traffic yet.`,statsNoErrors:`No classified errors.`,statsUnknown:`unknown`,statsUnassigned:`unassigned`,resTitle:`Resources`,resHint:`Host process memory and CPU`,resServer:`Server`,resWorkers:`Workers`,resEmpty:`No worker processes yet.`,resGoroutines:`goroutines`,resCpuLifetime:`lifetime avg`,failedStats:`Failed to load stats: {msg}`,homeNote:`Signed into the local console. Account logins live on the Accounts page.`,metricRuntime:`Runtime`,metricAccounts:`Accounts`,metricModels:`Models`,metricAuth:`Auth`,metricPort:`Port`,serviceDetail:`Service detail`,endpoints:`Endpoints`,copyBaseUrl:`Copy Base URL`,copied:`Copied`,copy:`Copy`,open:`Open`,waitingOverview:`Waiting for overview…`,signIn:`Sign in`,connectQoder:`Connect account`,rewarm:`Rewarm`,rewarming:`Rewarming`,refreshAccount:`Refresh`,refreshingAccount:`Refreshing`,stepBrowserTitle:`Browser device flow`,stepBrowserDesc:`Opens account selection. Finish in the browser, then this page polls until the session is ready.`,startBrowserLogin:`Sign in with browser`,starting:`Starting…`,quotaLoading:`Getting quota…`,quotaUnavailable:`Quota unavailable`,authUrl:`Auth URL`,openAuthUrl:`Open link`,stepPatTitle:`Personal access token`,stepPatDesc:`Optional fallback when browser flow is inconvenient.`,pat:`PAT`,pasteToken:`paste token`,loginWithPat:`Login with PAT`,loggingIn:`Logging in…`,localState:`Local state`,raw:`Raw`,noAuthSnapshot:`No auth snapshot yet.`,catalog:`Catalog`,availableModels:`Available models`,modelsPulled:`Pulled from`,filter:`Filter`,filterPh:`glm / qwen / deepseek`,providerFilterAll:`All providers`,accountStatusFilter:`Account status`,connection:`Connection`,apiPlayground:`Access & try`,apiPlaygroundHint:`Pick an account and model. Switch Chat / Raw API at the top — Raw API has JSON and curl.`,readyAccounts:`{ready} of {total} accounts ready`,baseUrl:`Base URL`,externalClients:`External clients`,protocol:`Protocol`,quickTest:`Quick test`,requestBuilder:`Request builder`,responseInspector:`Response inspector`,responseInspectorHint:`Raw JSON from the local proxy`,requestIdle:`Idle`,requestComplete:`Complete`,requestFailed:`Request failed`,responseReceived:`Response received`,responseEmptyTitle:`No response yet`,responseEmptyHint:`Choose a route, write a prompt, and send the request. The raw response appears here.`,sendRequest:`Send request`,promptPlaceholder:`Write a message for the model`,promptHelper:`This test uses a non-streaming Chat Completions request.`,accessTabChat:`Chat`,accessTabApi:`Raw API`,accessTabsLabel:`Access modes`,chatTryEmptyTitle:`No reply yet`,chatTryEmptyHint:`Write a message below. Account and model live in the composer. Session clears when you leave.`,chatTryHelper:`Enter to send · Shift+Enter for a new line`,chatTrySend:`Send`,chatTryStop:`Stop`,chatTryStreaming:`Streaming…`,chatTryUserLabel:`You`,chatTryAssistantLabel:`Assistant`,chatTryCreditsUsed:`Used {amount} credits`,chatTryUsageTokens:`{prompt} → {completion}`,chatTryUsageFoot:`{tokens} · {amount} credits`,chatHistoryTitle:`History`,chatHistoryNew:`New chat`,chatHistoryEmpty:`No chats yet`,chatHistoryUntitled:`Untitled`,chatHistoryExpand:`Show history`,chatHistoryCollapse:`Hide history`,nativeApiHint:`Non-streaming request, raw JSON response, and a matching curl command.`,rawFormatLabel:`API format`,rawFormatChat:`Chat`,rawFormatMessages:`Messages`,rawFormatResponses:`Responses`,rawFormatHint:`Chat Completions, Anthropic Messages, and OpenAI Responses are all supported.`,rawApiShow:`Show raw API`,rawApiHide:`Hide raw API`,chatAttach:`Attach file`,chatAttachRemove:`Remove attachment`,chatAttachUnsupported:`Unsupported file type: {names}`,thinkingPhaseScan:`Scanning`,thinkingPhasePlan:`Planning`,thinkingPhaseDraft:`Drafting`,thinkingDone:`Thought`,thinkingElapsed:`{n}s`,toolCallGroup:`Used {n} tools`,chatDemoLoad:`Preview sample`,thinkingChars:`{count} chars`,thinkingWorking:`Thinking`,toolCallRunning:`Running`,toolCallSuccess:`Done`,toolCallError:`Error`,toolCallUntitled:`tool`,toolCallArgs:`Arguments`,toolCallArgsEmpty:`(empty)`,autoAccountHint:`The scheduler chooses an available account.`,fixedAccountHint:`This request is pinned to the selected account.`,modelRoutingHint:`Uses the public model ID exposed by this proxy.`,accountModelHint:`Only models this account currently serves. A pinned request fails if the ID is missing here.`,noAccountModels:`This account has no models to send.`,accountModels:`Available models`,accountModelsTitle:`Models on {name}`,accountModelsHint:`Live catalog from this account. Requests pinned here only use these IDs.`,accountModelsEmpty:`This account has not published a model catalog yet.`,accountModelsError:`Could not load models: {msg}`,noAccountsForTest:`No account runtime is available. Add and sign in to an account before testing.`,curlGeneratedHint:`Generated from the current account, model, and prompt`,prompt:`Prompt`,model:`Model`,send:`Send`,waitingRequest:`Waiting for a request…`,requesting:`Requesting…`,endpointOpenAI:`OpenAI Compatible`,endpointChat:`Chat Completions`,endpointBaseHint:`Use this path as the base URL in OpenAI-compatible clients.`,endpointChatHint:`OpenAI-compatible chat. Prefix the model ID to pin one provider, for example qoder/glm-5.2.`,endpointMessages:`Anthropic Messages`,endpointMessagesHint:`Stateless Anthropic Messages. Use a provider-prefixed model ID to pin one family.`,endpointResponses:`OpenAI Responses`,endpointResponsesHint:`Stateless OpenAI Responses. Use a provider-prefixed model ID to pin one family.`,endpointModels:`Models`,endpointModelsHint:`Public model IDs. Named API keys only see models from their allowed providers.`,endpointHealth:`Health`,endpointHealthHint:`Check whether the local proxy is responding.`,endpointCount:`{count} API routes`,endpointReady:`Available now`,endpointBaseLabel:`Client base URL`,endpointAuthLabel:`Bearer API key`,hasUserBlob:`Has user blob`,userBlobBytes:`User blob bytes`,machineId:`Machine ID`,sessionHot:`Session hot`,upstreamEndpoint:`Upstream endpoint`,rewarmCount:`Rewarm count`,proxy:`Proxy`,endpoint:`Endpoint`,lastError:`Last error`,running:`Running`,down:`Down`,hot:`Hot`,up:`Up`,ready:`Ready`,missing:`Missing`,degraded:`Degraded`,error:`Error`,yes:`yes`,no:`no`,modelCol:`Model`,mappedKeyCol:`Upstream key`,requestIdCol:`Request ID`,providerCol:`Provider`,qoderKeyCol:`Upstream key`,routedTo:`Upstream model {model}`,stateCol:`State`,contextWindowCol:`Context window`,modelDefaultsCol:`Context and reasoning`,contextConfigHint:`These are defaults. If a request sets Max context or reasoning, that request wins.`,qoderContextHint:`Default context window used when the request omits context length / max input tokens.`,contextInvalid:`Context window must be an integer between 1,024 and 4,000,000 tokens.`,contextSaved:`Saved context window for {model}.`,contextReset:`Restored the default context window for {model}.`,contextMaxOn:`Enabled Max context for {model}.`,contextMaxOff:`Disabled Max context for {model}.`,contextMaxUnavailable:`This model has no Max context switch.`,maxMode:`Max context`,maxModeHint:`Trae larger context window, often 200k to 1M. Not a plan or quota. Used only when the request omits is_max_mode; an explicit request still wins. Unsupported models never send this switch.`,qoderMaxModeHint:`Qoder larger context window. Not a plan or quota. When on, requests use the model’s largest window; when off (or when a request sets its own context) the default window applies.`,catalogWindow:`Catalog size`,catalogWindowHint:`This Trae model has no Max-context switch. The number is the catalog window.`,workbuddyContextHint:`WorkBuddy desktop default and optional context budgets from the catalog. This is a local compact budget, not Trae is_max_mode. Chat requests do not send a window switch.`,reasoningLevels:`Reasoning intensity`,reasoningHint:`Default thinking effort when the request omits reasoning_effort and related flags. This does not lock every call to that level, and it does not cap a higher client value. A level the model does not allow falls back to an allowed option.`,reasoningFixed:`Fixed thinking: {type}`,noReasoningLevels:`This model has no selectable reasoning levels.`,reasoningSaved:`Saved default reasoning for {model}: {level}.`,reasoningLevel_none:`Off`,reasoningLevel_low:`Low`,reasoningLevel_medium:`Medium`,reasoningLevel_high:`High`,reasoningLevel_xhigh:`Extra high`,reasoningLevel_max:`Max effort`,modelDetails:`Details`,promptMaxTokens:`Prompt max`,maxOutputTokens:`Output max`,actions:`Actions`,save:`Save`,custom:`Custom`,defaultValue:`Default`,resetDefault:`Restore default`,fallback:`fallback`,modelFree:`(free)`,shownTotal:`{shown} shown / {total} total`,noModelsYet:`No models yet`,noModelsMatch:`No models match this filter.`,noProviders:`No providers loaded.`,failedOverview:`Failed to load overview: {msg}`,pastePatFirst:`Paste a PAT first`,patDone:`PAT login completed`,loginOpenMsg:`Open the auth URL to finish login`,idle:`idle`,menu:`Menu`,toggleSidebar:`Toggle sidebar`,accountsTitle:`Accounts`,accountsDesc:`One login per account. Chat round-robins and fails over.`,noAccounts:`No accounts yet. Add one to start serving chat.`,accountCount:`Accounts`,signedIn:`Signed in`,enabledAccounts:`Enabled`,availableAccounts:`Available`,needsAttention:`Needs attention`,searchAccounts:`Search name, ID, UID, provider, or auth type`,filterAll:`All`,shownAccounts:`{shown} / {total}`,noAccountsMatch:`No accounts match this filter.`,clearFilters:`Clear filters`,more:`More actions`,partialCooling:`Partial model cooldown`,modelCooldowns:`Model cooldowns`,modelCooldownsTitle:`Models in cooldown`,modelCooldownsEmpty:`No models are in cooldown.`,runtimeState:`Runtime state`,maxInflight:`Max concurrency`,priority:`Priority`,updatedAt:`Updated`,enabledState:`Enabled`,cooling:`Cooling down`,dead:`Recovering`,authFailed:`Auth failed`,patFallback:`PAT fallback`,usePat:`Use PAT`,account:`Account`,autoAccount:`Auto (round-robin)`,cooldown:`Cooldown`,inFlight:`In-flight`,liveConcurrency:`Concurrency`,liveRpm:`Last 60s`,liveRpmUnit:`req`,liveRpmHint:`started in the last minute`,liveTrace:`Trend`,livePeak:`peak {n}`,liveSaturated:`Saturated`,inflightTitle:`Live now`,inflightMockBadge:`mock`,inflightIdleBadge:`idle`,inflightMockToggle:`Demo`,inflightMockToggleAria:`Show mock demo when live is unavailable`,inflightLiveBadge:`live`,inflightHint:`Slots · in-flight · cooldown`,inflightCardAria:`Open live detail`,inflightOpen:`View all`,inflightExpand:`Expand`,inflightExpandFromConcurrency:`Expand live in-flight details`,inflightStickyBindings:`sticky · {n}`,inflightWaiting:`Waiting`,inflightRunning:`Running`,inflightThroughput:`Throughput`,inflightWaitP95:`P95`,inflightQueue:`Waiting`,inflightQueueEmpty:`Empty`,inflightSlots:`Slots`,inflightSticky:`sticky`,inflightDone:`Done`,inflightFailed:`Failed`,inflightDepth:`Depth`,inflightDepthHint:`{n}`,inflightRatePill:`rate limit · {remain}`,inflightRateBand:`{label} · {remain}`,inflightSlotIdle:`idle`,inflightSlotPaused:`cooling`,restarts:`Restarts`,dropSystemPrompt:`Drop system prompt`,dropSystemPromptHint:`Strip caller system prompts before sending; WorkBuddy still gets an empty leading system slot so Global does not reject the request`,dropSystemPromptTraeHint:`Keep caller system prompts. Clients such as MiMo Code put JSON instructions there; turn this on only if Trae rejects the request.`,autoCheckin:`Daily check-in`,autoCheckinHint:`Run the daily WorkBuddy credit check-in at the configured local time. Failed attempts retry around 21:00. Off by default.`,autoCheckinCreateHint:`WorkBuddy only. Enable automatic daily credit check-ins. The first attempt uses this account time, or the system default if left unchanged.`,autoCheckinTime:`Check-in time`,autoCheckinTimeHint:`Uses server local time and runs within about 14 minutes after the selected time. Failed attempts retry around 21:00. New accounts start from the system default.`,checkinNow:`Check in now`,checkinAll:`Check in all`,checkinAllEmpty:`No enabled accounts support check-in`,checkinAllDone:`All {count} accounts are already checked in today`,toastCheckingInAll:`Checking in {done} of {total}…`,toastCheckedInAll:`Checked in {checked}, skipped {skipped}`,toastCheckedInAllFailed:`Checked in {checked}, skipped {skipped}, failed {failed}`,lastCheckin:`Last check-in`,lastCheckinNone:`No check-in yet`,checkinStatus:`Check-in`,checkinToday:`Checked in today`,checkinPending:`Not checked in today`,checkinFailed:`Check-in failed`,checkinRecords:`Check-in records`,checkinRecordsTitle:`Check-in records · {name}`,checkinRecordsHint:`The latest 20 check-in attempts for this account.`,checkinRecordsEmpty:`No check-in records yet`,checkinRecordsCount:`{count} records`,checkinRecordSuccess:`Success`,checkinRecordAlready:`Already checked in`,checkinRecordFailed:`Failed`,checkinTruncated:`Message truncated · use copy for the full error`,checkinCopyError:`Copy full error`,refreshCredits:`Refresh credits`,expiryDistTitle:`Credit expiry distribution`,expiryDistHint:`Grouped by calendar day · colour marks the account · FEFO: upstream burns the soonest-expiring credits first`,expiryDistExpand:`Show all {n} days`,expiryDistCollapse:`Show less`,expiryDistDayTotal:`{n} credits expire`,expiryDistColAccount:`Account`,expiryDistColSoonest:`Soonest`,expiryDistColDaysLeft:`Days left`,expiryDistColBatch:`Expiring`,expiryDistColDaily:`Daily burn`,expiryDistDays:`{n}d`,expiryDistFoot:`"Daily burn" = credits expiring on the soonest day ÷ days until then — the pace needed to use them before they lapse.`,expiryDistExpired:`Expired`,usageColModel:`Model`,quota:`Quota`,quotaUsed:`Used`,quotaRemaining:`Remaining`,quotaDaily:`Daily quota`,quotaWeekly:`Weekly quota`,quotaMonthly:`Monthly quota`,quotaFiveHour:`5-Hour Limit`,quotaWeeklyLimit:`Weekly Limit`,quotaPlan:`Plan`,quotaMonthlyLimit:`Monthly Limit`,quotaUsedPercent:`{n}% used`,quotaResetsSoon:`Resets soon`,quotaResetsInMinutes:`Resets in {n} minutes`,quotaResetsInHours:`Resets in {n} hours`,quotaExpiresOn:`{amount}{unit} expire on {date}`,quotaAddOn:`Add-on`,quotaResourcePackage:`Resource package`,quotaExceeded:`Quota exceeded`,errorKind:`Error kind`,qoderLoginHint:`This signs in the upstream account only. It does not change the console password.`,needQoderLogin:`Needs account login`,waitingQoderLogin:`Waiting for account login…`,qoderLoginDone:`Account login completed`,rewarmDone:`Rewarm completed`,accountsSigned:`{n} / {total} accounts ready`,addAccount:`Add account`,batchImport:`Batch import`,batchImportLoading:`Importing WorkBuddy accounts…`,batchImportUnrecognized:`Could not recognize this credential file format.`,batchImportConfirmTitle:`Confirm batch import`,batchImportConfirmHint:`Detected from {file}. Review and confirm before importing.`,batchImportConfirmHintNoFile:`Review the detected format, then confirm to import.`,batchImportRegion:`WorkBuddy region`,batchImportRegionPickHint:`Region was unclear — pick CN or Global before importing.`,batchImportRegionMixed:`This pack mixes CN and Global domains. Split it, or pick one region to force.`,batchImportRegionUnknown:`Region not detected from domains — please confirm.`,batchImportUnknownFormat:`Unknown format field; guessed from shape.`,batchImportProviderUnsupported:`Batch import for this provider is not supported yet. Detection is ready for a future release.`,batchImportConfirmAction:`Import`,batchImportFormatUnknown:`Unknown format`,batchImportProviderUnknown:`Unknown provider`,accountName:`Account name`,accountNameRequired:`Enter an account name.`,accountCreated:`Account created. Session is starting.`,importCredential:`Import native credential`,accountImported:`Credential imported and runtime started.`,accountImportBatch:`Imported {n} accounts.`,accountImportPartial:`Imported {ok}, failed {fail}.`,credentialCopied:`Credential bundle copied.`,addAccountTitle:`Add account`,accountType:`Account type`,loginMethod:`Login method`,accountTypeHint:`Choose the upstream login family for this isolated runtime.`,accountTypeQoderGlobal:`Qoder Global`,accountTypeQoderGlobalHint:`Qoder Global via browser, PAT, or imported credential`,accountTypeQoderCN:`Qoder CN`,accountTypeQoderCNHint:`Qoder China via browser, PAT, or imported credential`,accountTypeWorkBuddyCN:`WorkBuddy CN`,accountTypeWorkBuddyCNHint:`CodeBuddy CN via browser login or imported credential`,accountTypeWorkBuddyGlobal:`WorkBuddy Global`,accountTypeWorkBuddyGlobalHint:`WorkBuddy Global via browser login or imported credential`,accountTypeTraeCN:`Trae CN Solo`,accountTypeTraeCNHint:`Trae China Solo via browser login or imported credential`,accountTypeDevinGlobal:`Devin (experimental)`,accountTypeDevinGlobalHint:`Experimental Devin Global via browser OAuth or session token import`,accountTypeCommandGlobal:`Command Code`,accountTypeCommandGlobalHint:`Command Code via a pasted user_… key. Speaks the CLI /alpha/generate protocol, so every plan works, including the $1 Go plan.`,accountTypeCodexGlobal:`Codex`,accountTypeCodexGlobalHint:`OpenAI Codex via Codex CLI OAuth, Sign in with ChatGPT, or an imported credential`,accountTypeZhipuCN:`Zhipu GLM`,accountTypeZhipuCNHint:`Zhipu GLM with an API key. Choose pay-as-you-go or Coding Plan, the same way the upstream account is billed.`,accountTypeQwenworkGlobal:`QwenWork International`,accountTypeQwenworkGlobalHint:`QwenWork international (qwenwork.ai) via browser OAuth or imported credential. The authorization link is single-use: open it directly in a browser already signed in to the target account, and do not send it through chat tools.`,accountTypeQwenworkCN:`QwenWork CN`,accountTypeQwenworkCNHint:`千问办公 China (qwenwork.cn) via browser OAuth or imported credential. The authorization link is single-use: open it directly in a browser already signed in to the target account, and do not send it through chat tools. The CN region has not yet been verified with a real account.`,accountTypeKimiCN:`Kimi Code CN`,accountTypeKimiCNHint:`Kimi Code China subscription via device-code sign-in against auth.kimi.com. Uses the same OAuth client as the official CLI, so the login you already completed with Kimi Code can be pasted in as its credential JSON.`,accountTypeCodeArtsCN:`CodeArts (码道)`,accountTypeCodeArtsCNHint:`Huawei Cloud CodeArts Agent via OAuth PKCE against codearts.huaweicloud.com. The console opens the authorization page; a pasted 127.0.0.1 callback URL also completes the login when the browser cannot reach this host.`,accountTypeKiroUS:`Kiro (US East)`,accountTypeKiroUSHint:`Personal Kiro login. Paste a Builder ID, Identity Center, or social credential JSON, or a ksk_ key. Chat goes to the Kiro runtime in us-east-1. Experimental.`,accountTypeKiroEU:`Kiro (EU Central)`,accountTypeKiroEUHint:`Personal Kiro login for the eu-central-1 runtime. Same credential shapes as US East. Experimental.`,accountTypeMetaGlobal:`Muse (Meta)`,accountTypeMetaGlobalHint:`Meta Muse Code subscription via device-code sign-in against auth.meta.com. After approval the console mints an LLM API key at api.meta.ai. You can also paste a Meta Model API key on the PAT tab.`,providerGroupSubscriptions:`Subscriptions`,providerGroupSubscriptionsHint:`stable account logins`,providerGroupExperimental:`Experimental`,providerGroupExperimentalHint:`early adapters`,providerFindPlaceholder:`Find a provider...`,providerFindEmpty:`No providers match this search.`,caiaiSoftLink:`Prefer hosted? Try CaiAI`,addAccountDesc:`Create an isolated account session. Each account keeps its own runtime home.`,tabBrowser:`Browser login`,tabPat:`PAT`,tabImport:`Import credential`,recommended:`Recommended`,wizardSettings:`Account settings`,wizardAdvanced:`Advanced options`,wizardContinue:`Continue`,wizardBack:`Back`,wizardSettingsHint:`Set these before login. You can still change them later from Edit on the account card.`,editAccount:`Edit`,editAccountTitle:`Edit {name}`,editAccountHint:`Change the display name, concurrency, routing priority, outbound proxy, model aliases, and check-in time when supported.`,accountModelAliases:`Aliases`,accountModelAliasesHint:`A name this account answers as. The request is rewritten to this account's real model after the account is picked.`,accountModelAliasTargetPlaceholder:`real model on this account`,modelAliasName:`Alias`,modelAliasTarget:`Real model`,modelAliasAdd:`Add`,modelAliasRemove:`Remove`,modelAliasPlaceholder:`kimi-k3`,enabledModels:`Models`,enabledModelsHint:`Leave unrestricted to serve the whole catalog. Restrict to choose which models this account may serve.`,restrictModels:`Only selected models`,allModels:`All models`,modelPickerSearch:`Search models`,modelPickerCount:`{selected} / {total} selected`,modelPickerSelectAll:`Select all`,modelPickerClear:`Clear`,modelPickerOffline:`Offline`,modelPickerRemove:`Remove {model}`,modelPickerNoMatch:`No matching models.`,maxInflightInvalid:`Concurrency must be an integer from 1 to 32.`,priorityInvalid:`Priority must be an integer from 1 to 100.`,wizardNamePh:`Account name`,maxInflightHint:`How many chats this account may run at once. Changing it later restarts the worker.`,priorityHint:`Higher numbers are preferred when routing later uses this field. Default 50.`,creditFloor:`Credit floor`,creditFloorHint:`When enabled, paid models are skipped once the sampled credit balance reaches this value; free models still work. Only accounts reporting credits are affected.`,creditFloorCustom:`Override global floor for this account`,creditFloorInheritHint:`Inherits CLI2API_CREDIT_FLOOR. Set 0 here to explicitly disable the floor for this account.`,creditFloorInvalid:`Credit floor must be zero or a positive number.`,percentFloor:`Percent floor`,percentFloorHint:`For accounts reporting remaining percentage (Devin, Kimi, Zhipu): skip paid models once remaining percent reaches this value. Independent of the credit floor; free models still work.`,percentFloorCustom:`Override global percent floor for this account`,percentFloorInheritHint:`Inherits CLI2API_PERCENT_FLOOR. Set 0 here to explicitly disable the floor for this account.`,percentFloorInvalid:`Percent floor must be a number between 0 and 100.`,proxyUrl:`Proxy URL`,proxyUrlPlaceholder:`http://127.0.0.1:7890, direct`,proxyUrlHint:`Blank inherits the global proxy. Use direct or none to bypass proxies for this account. Qoder supports HTTP(S) only; WorkBuddy/Trae also support SOCKS5.`,proxySettingsTitle:`Outbound proxy`,proxySettingsHint:`Set the default proxy for upstream requests. Global proxies support HTTP(S) only. SOCKS5 is available for WorkBuddy/Trae account-level proxies. Account-level settings override it.`,dropSystemPromptCreateHint:`WorkBuddy only. Strip caller system prompts, then send an empty leading system slot so Global still accepts the request.`,wizardBrowserLead:`Shows the authorization URL. Open or copy it, finish in the browser, and this wizard continues automatically.`,wizardCodexBrowserLead:`Choose Codex CLI or Sign in with ChatGPT, then open the authorization URL. ChatGPT website logins need Sign in with ChatGPT; the CLI flow cannot refresh those tokens.`,codexLoginMethod:`Codex login`,codexLoginCli:`Codex CLI`,codexLoginCliHint:`Official Codex CLI OAuth. Use this for CLI-issued credentials.`,codexLoginChatGPT:`Sign in with ChatGPT`,codexLoginChatGPTHint:`ChatGPT website login. Stores a separate token that refreshes at a different endpoint.`,kiroLoginMethod:`Kiro sign-in`,kiroLoginBuilder:`Builder ID`,kiroLoginBuilderHint:`Device code. Open the link and approve it; this page finishes on its own.`,kiroLoginIDC:`Identity Center`,kiroLoginIDCHint:`Your organization portal. Paste its start URL, then approve in the browser.`,kiroLoginSSO:`SSO token`,kiroLoginSSOHint:`Paste a portal SSO bearer. It is exchanged once and not stored.`,kiroLoginMicrosoft:`Microsoft`,kiroLoginMicrosoftHint:`Enterprise SSO. Paste each localhost callback as the browser shows it.`,kiroIDCStartURL:`Identity Center start URL`,kiroIDCStartURLPh:`https://example.awsapps.com/start`,startCodexCliLogin:`Start Codex CLI login`,startCodexChatGPTLogin:`Sign in with ChatGPT`,wizardStartBrowser:`Start browser login`,wizardStartingSession:`Starting the account session…`,wizardWaitingBrowser:`Waiting for authorization in the browser…`,wizardCallbackLead:`If the browser stays on 127.0.0.1 and this console never finishes, copy the full address-bar URL here.`,wizardCallbackPh:`Paste the full http://127.0.0.1…/authorize?… URL`,wizardSubmitCallback:`Submit callback URL`,wizardStartingWorker:`Authorization received. Starting account session…`,wizardAccountReady:`Account is ready.`,wizardLoginTimeout:`Timed out waiting for browser login. You can retry from the account card.`,wizardPatLead:`Use a personal access token when the browser flow is inconvenient.`,wizardPatLeadCN:`Create a PAT at qoder.com.cn/account/integrations, then paste it here.`,wizardPatLeadCommand:`Paste your Command Code key (it looks like user_…, from commandcode.ai/settings).`,zhipuApiKey:`API key`,zhipuApiKeyPh:`Paste the key from open.bigmodel.cn`,zhipuAccountMode:`Account mode`,zhipuModePayg:`Pay as you go`,zhipuModePaygHint:`Billed by token. Uses the standard GLM endpoint.`,zhipuModeCoding:`Coding Plan`,zhipuModeCodingHint:`Subscription plan. Uses the Coding Plan endpoint and shows its quota.`,zhipuOrganization:`Organization ID`,zhipuOrganizationPh:`Optional, for a team Coding Plan`,zhipuProject:`Project ID`,zhipuProjectPh:`Optional`,zhipuCreate:`Add Zhipu account`,zhipuKeyRequired:`Paste the Zhipu API key first.`,wizardPatPh:`Paste personal access token`,wizardCreateAndLogin:`Create and sign in`,wizardImportLead:`Paste a credential JSON export. WorkBuddy hub packages import every account in the file.`,wizardImportPh:`Paste credential JSON`,wizardChooseFile:`Choose file`,wizardBadJson:`That does not look like a valid credential bundle.`,reLogin:`Sign in`,cancel:`Cancel`,close:`Close`,create:`Create`,import:`Import`,export:`Export`,enable:`Enable`,disable:`Disable`,disabled:`Disabled`,delete:`Delete`,holdToDelete:`Hold to delete`,trendHalfHint:`Second half of the window vs the first half`,toastRefreshingAccount:`Refreshing account…`,toastAccountRefreshed:`Account refreshed`,toastRefreshingCredits:`Refreshing credits…`,toastCreditsRefreshed:`Credits refreshed`,toastCreditsPartiallyRefreshed:`{failed} of {total} accounts failed to refresh`,toastAccountAdded:`Account added`,toastAccountDeleted:`Account deleted`,toastClearingLogs:`Clearing request logs…`,toastLogsCleared:`Request logs cleared`,toastKeyDeleted:`API key deleted`,toastFailed:`Operation failed`,deleteAccountConfirm:`Delete account {name}? This removes its local runtime and stored credential.`,edit:`Edit`,enabled:`Enabled`,keysLead:`Client keys call /v1. Leave providers empty to allow every family. The console key stays on System.`,keysCreate:`Create key`,keysEmpty:`No client keys yet`,keysEmptyHint:`Create a named key for OpenAI-compatible clients. It cannot sign in to this console.`,keysCreateTitle:`Create API key`,keysCreateHint:`The secret is shown once. Store it in the client that will call /v1.`,keysEditTitle:`Edit API key`,keysEditHint:`Rename the key, change which providers it may route to, or cap how many chats it may run at once.`,keysName:`Name`,keysNamePh:`CI bot`,keysNameRequired:`Name is required.`,keysProviders:`Providers`,keysProvidersHint:`Restrict this key to specific provider regions. Leave all unchecked to allow every provider.`,keysAllProviders:`All providers`,keysAllRegions:`All regions`,keysProvidersNotLoaded:`Provider list is still loading. Saving is disabled so the key permissions stay unchanged.`,keysProvidersLoadFailed:`Failed to load provider list: {message}`,keysMaxInflight:`Max concurrency`,keysMaxInflightHint:`How many /v1 chats this key may run at once. 0 means no limit. Extra requests get HTTP 429.`,keysMaxInflightInvalid:`Concurrency must be an integer from 0 to 256.`,keysMaxInflightValue:`Up to {count} at once`,keysMaxInflightUnlimited:`No concurrency limit`,keysLastUsed:`Last used {time}`,keysNeverUsed:`Not used yet`,keysSecretTitle:`Store this secret now`,keysSecretHint:`This value is not stored in plaintext. It will not be shown again.`,keysSecretOnce:`Copy the key before closing this dialog.`,keysDeleteConfirm:`Delete API key {name}? Clients using it will fail immediately.`,consoleKeyTitle:`Console API key`,consoleKeyHint:`This is the administrator key used to sign in here.`,consoleKeyLead:`It can call every provider and manage accounts, keys, and updates. Client keys live on the API keys page.`,consoleKeyRotate:`Rotate key`,consoleKeyRotateHint:`Rotating signs you out of other sessions and restarts Qoder workers so they pick up the new secret.`,consoleKeyRotateNow:`Rotate now`,consoleKeySecretTitle:`New console key`,consoleKeySecretHint:`This browser session is already updated. Copy the key for any other clients that used the old console secret.`},zh:{brandSub:`登录态网关`,controlPlane:`控制平面`,workspace:`工作区`,develop:`开发`,system:`系统`,runtimeSnapshot:`运行时与调度器快照`,routesHint:`OpenAI / Anthropic 兼容端点`,clientConfig:`客户端配置`,clientConfigHint:`使用与控制台相同的密钥作为 Bearer Token`,providerPrefixHint:`用 qoder/、workbuddy/、trae/、devin/、command/、codex/、zhipu/、qwenwork/、kimi/、codearts/、kiro/ 或 meta/ 前缀指定供应商。客户端 API 密钥也可以限制可见和可调度的供应商。不带前缀时是否跨供应商,由系统设置里的模型池决定。`,authentication:`认证方式`,curlExample:`curl 示例`,quickTestHint:`通过所选账号发送一条真实请求`,response:`响应`,providerCatalog:`模型目录`,providerCatalogMeta:`已登录 / 实时`,accountPool:`账号池`,accountCreateHint:`先创建隔离运行时,再通过浏览器或 PAT 登录。`,credentialImportHint:`仅支持从本控制台导出、且 user blob 与 machine ID 匹配的凭证包。`,accountEmptyHint:`创建一个账号运行时后即可开始。`,oauthDeviceFlow:`OAuth 浏览器登录`,navOverview:`概览`,navAuth:`账号`,navProviders:`模型`,navAccess:`接入与调试`,navAccounts:`账号`,checkinDefaultsTitle:`自动签到`,checkinDefaultsHint:`按供应商设置默认时间。跟随默认的账号会立即采用新时间,账号自定义时间不受影响。`,checkinDisabledAccountsTitle:`停用账号也自动签到`,checkinDisabledAccountsHint:`开启后,停用聊天功能的账号仍可执行已开启的自动签到;停用账号仍不可手动签到。`,checkinDisabledAccountsStatus:`当前状态`,checkinDisabledAccountsAriaLabel:`允许停用账号自动签到`,checkinInherit:`跟随供应商默认`,checkinDefaultValue:`供应商默认:{time}`,checkinCustom:`账号自定义`,checkinScheduleHint:`按显示的时区执行,通常在设定时间后的约 90 秒内开始,多账号顺序处理可能延后;较早的失败会在约 21:00 重试一次,活动未开放则当天跳过。签到不影响聊天。`,checkinTimeInvalid:`请输入有效的签到时间(HH:mm)。`,checkinRecordSkipped:`活动未开放`,navUsage:`用量`,usageTitle:`用量`,usageLead:`按模型、账号与供应商查看请求、延迟、token 与积分。`,usageByModel:`模型`,usageByAccount:`账号`,usageByProvider:`供应商`,usageColRequests:`请求`,usageColSuccess:`成功率`,usageColTokens:`Tokens`,usageColCacheWrite:`缓存写入`,usageColCredits:`积分`,usageRowCount:`{count} 行`,usageEmpty:`该时间窗口内没有请求。`,usageStatsTab:`统计`,usageCostTab:`额度`,usageCostLead:`按模型汇总各供应商的订阅额度与 token 用量。`,usageWindow:`时间范围`,usageWindow24h:`24 小时`,usageWindow7d:`7 天`,usageWindowTotal:`全部留存`,usageCredits:`已用额度`,usageCreditsHint:`所有 provider 合计消耗的订阅额度`,usageEstCost:`折合费用`,usageTotalTokens:`Token 总量`,usageRequests:`请求数`,usageModelCount:`{count} 个模型`,usageCacheHitRate:`缓存命中`,usageTokenSplitNote:`命中 / 未命中 / 输出`,usageChartTitle:`用量趋势`,usageChartHint:`按模型堆叠。可在额度与 token 之间切换。`,usageChartEmpty:`该时间范围内暂无用量。`,usageBreakdownTitle:`按模型明细`,usageBreakdownHint:`每个模型的 token 与订阅额度。`,usageColInputHit:`输入·缓存命中`,usageColInputMiss:`输入·缓存未命中`,usageColOutput:`输出`,usageColCost:`折合费用`,usageUnpricedCost:`无官方价`,usageColSplit:`高峰 / 闲时`,usageTotals:`合计`,usageRetentionHint:`请求日志按计划清理,因此「全部留存」只覆盖仍在库内的部分。`,usageRenderNote:`可选的 DeepSeek 官方列表价人民币折算。订阅账号并不按此计费——仅供对比。`,usagePeakNote:`高峰按北京时间周一至周五 09:00-12:00、14:00-18:00 估算;闲时为高峰一半。未处理法定节假日及调休。`,usageUnpricedHint:`以下模型没有列表价行,只计入额度与 token:{models}`,usageNoteTitle:`计算说明`,usagePriceTitle:`DeepSeek 官方价格表`,usagePriceHit:`缓存命中`,usagePriceMiss:`缓存未命中`,usagePriceOutput:`输出`,usagePriceBandOff:`闲时`,usagePriceBandPeak:`高峰`,usageOffPeak:`闲时`,usagePeak:`高峰`,usageChartMetric:`图表指标`,usageEstimateTitle:`DeepSeek 官方列表价折算`,usageEstimateHint:`有官方价的模型可查看人民币对比;默认折叠。`,usageEstimateChartTitle:`列表价趋势`,usageEstimateChartEmpty:`该时间范围内暂无 DeepSeek 计价用量。`,chartMetricRequests:`请求`,chartMetricTokens:`Tokens`,chartMetricLatency:`p95 延迟`,chartInput:`输入`,chartOutput:`输出`,chartCacheRead:`缓存读取`,chartTotal:`合计`,navLogs:`日志`,navKeys:`API 密钥`,navSystem:`系统设置`,sidebarFoot:`CLI 登录态网关`,sidebarInFlight:`当前并发 {count}`,systemSettingsTitle:`系统设置`,systemSettingsLead:`管理跨 Provider 路由、各供应商签到默认时间、系统更新、SQLite 保护和控制台管理员密钥。`,crossProviderModelPoolTitle:`跨 Provider 模型池`,crossProviderModelPoolHint:`开启后,不带 Provider 前缀的模型 ID 可以在匹配的 Qoder、WorkBuddy 和 Trae 账号之间调度;关闭后 bare ID 会被拒绝,必须使用带 Provider 前缀的模型 ID。`,crossProviderModelPoolStatus:`当前状态`,crossProviderModelPoolAriaLabel:`开启跨 Provider 模型池`,workbuddyCheckinSettingsTitle:`WorkBuddy 签到`,workbuddyCheckinSettingsHint:`新建 WorkBuddy 账号时使用的默认首次签到时间。已有账号会保留各自的时间,直到你单独修改。`,workbuddyCheckinSettingsFieldHint:`使用服务器本地时间。新建 WorkBuddy 账号会继承这里的时间,账号编辑页仍可单独覆盖。`,routingStrategyTitle:`账号调度策略`,routingStrategyHint:`选择就绪账号如何分担流量。填满优先会持续使用最高优先级账号,直到它不可用。最早到期优先只在同一供应商内部按最近的积分包到期日排序;没有积分包到期信息的供应商保持原有轮询。`,routingStrategy:`策略`,routingRoundRobin:`轮询`,routingWeightedRoundRobin:`加权轮询`,routingFillFirst:`填满优先`,routingFEFO:`最早到期优先(FEFO)`,routingWeight:`调度权重`,sessionAffinityTTL:`会话 TTL`,sessionAffinityHits:`粘性命中`,sessionAffinityMisses:`粘性未命中`,sessionAffinityEscapes:`粘性逃逸`,lastSessionMiss:`最近未命中`,lastSessionEscape:`最近逃逸`,checkUpdates:`检查更新`,versionUpdate:`版本更新`,latestVersionHint:`先下载最新版本,准备好后再点立即更新。`,updateAvailable:`有可用更新`,settingsTabGeneral:`常规`,settingsTabRouting:`路由调度`,settingsTabSecurity:`安全与数据`,settingsTabUpdates:`版本更新`,sidebarNewVersion:`新版本 {version}`,sidebarReleaseNotes:`更新日志`,sidebarGoToUpdate:`历史版本与回滚`,upToDate:`已是最新版本`,currentVersion:`当前版本`,latestVersion:`最新版本`,skippedBetweenLabel:`中间经过的版本`,releaseNotes:`更新内容`,updateNoNotes:`这个版本还没有说明。`,versionHistory:`历史版本`,versionCurrentBadge:`当前`,versionLatestBadge:`最新`,restoreThisVersion:`恢复此版本`,restoreVersionTitle:`恢复到 {version}?`,restoreVersionHint:`服务会切回这个版本。只有重启时才会暂停新请求。`,updaterReady:`这台机器可以更新`,updaterUnavailable:`这台机器暂时不能更新`,updaterNeedsHost:`当前进程不能替换自己的容器`,updaterUnavailableHint:`这一页可以检查新版本,但还不能在这台机器上安装更新。`,updaterNeedInstall:`用 deploy/install-updater.sh 或 deploy/install-updater.ps1 安装宿主机更新器,让它能调用 Docker。`,updaterNeedCompose:`Linux 需要把更新器 socket 挂进容器。Docker Desktop 用本机回环地址,而不是 Unix socket。`,updaterNeedRelease:`当前运行的必须是已发布的 GitHub Release,不能是本地或开发镜像。`,updateNow:`下载更新`,applyUpdateNow:`立即更新`,cancelUpdate:`取消下载`,discardPreparedImage:`放弃这次更新`,updateReadyHint:`更新已经下载好。点立即更新才会重启;在此之前不会暂停新请求。`,updateReadyTargetHint:`可以切换到 {version}。只有重启时才会暂停新请求。`,updateNewerReleaseHint:`又有更新的版本({latest})。可以先立即更新,或放弃这次下载后重新开始。`,updateStagedUnavailableHint:`请先更新宿主机更新器,才能使用分阶段更新。`,updateLegacyOneShotHint:`这台机器会一次下载并完成更新。之后的版本可以先下载,再点立即更新。`,rollbackToVersion:`恢复旧版本`,rollbackToVersionHint:`可以恢复到当前版本之前最近的三个版本。`,updateReloadingIn:`{seconds}s 后刷新`,updateInProgress:`更新中…`,updatePreparingImage:`正在下载更新…`,updatePreparingImageHint:`正在后台下载更新。当前版本会继续运行,下载完成后点立即更新才会切换。下载卡住时可以取消。`,updateApplyingHint:`正在安装更新。完成后会自动刷新这个页面。`,updateInProgressHint:`系统正在更新,准备就绪后会自动刷新页面。`,updateUnavailableHint:`暂时无法更新,请稍后重试。`,updateFailedHint:`更新未完成,请重试。`,updateCheckFailedHint:`暂时无法检查更新,请稍后重试。`,updatePreparingHint:`正在准备更新:检查版本并保存备份。现有连接可能会被中断,客户端可自行重试。`,updateRunningHint:`正在更新。完成后会自动刷新这个页面。`,updateReloadingHint:`更新完成,正在刷新页面…`,updateElapsed:`已用时 {seconds}s`,sqliteProtection:`SQLite 保护`,sqliteProtectionHint:`数据会留在原处,并在更新前创建经过校验的备份。`,sqliteBackupBeforeUpdate:`更新前创建并校验备份`,sqliteKeepFive:`保留最近 5 份备份`,sqliteRollbackTogether:`失败时同时恢复数据库和上一版本`,updateStatus:`更新状态`,noUpdateJob:`暂无更新任务`,confirmUpdate:`立即更新`,confirmUpdateHint:`系统会短暂停止接收新请求并保存备份。现有连接可能会被中断,客户端可自行重试。`,updateState_idle:`空闲`,updateState_unavailable:`不可用`,updateState_queued:`等待开始`,updateState_preparing:`准备中`,updateState_preparing_image:`正在下载更新`,updateState_checking:`正在检查版本`,updateState_backing_up:`正在保存备份`,updateState_submitting:`正在开始更新`,updateState_running:`正在更新`,updateState_pulling:`正在下载更新`,updateState_host_binary:`正在下载更新程序`,updateState_image_ready:`下载完成`,updateState_ready_to_apply:`可以立即更新`,updateState_recreating:`正在重启`,updateState_health_checking:`正在确认启动`,updateState_rolling_back:`正在恢复上一版本`,updateState_succeeded:`更新完成`,updateState_rolled_back:`已恢复上一版本`,updateState_failed:`更新失败`,checking:`检查中`,refresh:`刷新`,apiKey:`API Key`,apiKeyPh:`API Key`,needApiKey:`先用控制台密码登录才能加载数据。`,loginTitle:`进入控制台`,loginLead:`这台机器上的 CLI2API 代理已经在运行。请输入客户端访问 /v1 时使用的 API Key。`,loginDesc:`和接口 Authorization: Bearer 是同一把钥匙。`,loginFormTitle:`继续`,loginPassword:`控制台密码`,loginPasswordPh:`API Key`,loginNeedKey:`密码是空的。`,loginBadKey:`这把钥匙对不上这台机器。`,loginSubmit:`进入`,loggingInConsole:`核对中…`,loginHint:`只解锁本机控制台。账号登录在进入后的「账号」页。`,showPassword:`显示密码`,hidePassword:`隐藏密码`,signOut:`退出`,checkingSession:`正在检查登录态…`,refreshing:`刷新中`,pages:{home:{title:`概览`,desc:`查看运行状态、请求量与可用端点。`},auth:{title:`授权`,desc:`浏览器 device-flow 登录、PAT 登录,以及会话 rewarm。`},providers:{title:`模型`,desc:`已登录账号可用的模型,以及每个模型的上下文和推理默认值。`},access:{title:`接入与调试`,desc:`主区多轮对话试玩;下方可展开原始 API 调试。`},accounts:{title:`账号`,desc:`一个账号一个登录态。先走浏览器登录;浏览器不方便再用 PAT。`},usage:{title:`用量`,desc:`按模型、账号与供应商统计用量。`},logs:{title:`日志`,desc:`查看近期代理请求和进程输出。`},keys:{title:`API 密钥`,desc:`创建客户端密钥,并限制可用的供应商和并发。`},system:{title:`系统设置`,desc:`管理跨 Provider 路由、系统更新、SQLite 保护和控制台管理员密钥。`},login:{title:`进入控制台`,desc:`和 /v1 使用同一把 API Key。`}},logsLead:`本机请求历史与运行时输出。`,logsRequests:`请求历史`,logsRuntime:`运行日志`,logsEmptyRequests:`还没有请求记录。`,logsEmptyRuntime:`还没有捕获到运行输出。`,logsSearchRuntime:`搜索运行输出…`,logsSearchRequestId:`搜索请求 ID`,logsSearchModel:`搜索模型`,logsSearchAccount:`搜索账号`,logsFilterIdAll:`全部请求 ID`,logsNoFilterOptions:`没有匹配项`,logsClear:`清空历史`,logsClearConfirm:`删除本机全部请求历史?`,logsColTime:`时间`,logsColAccount:`账号`,logsColApiKey:`密钥`,logsColProvider:`供应商`,logsColModel:`模型`,logsColReasoning:`推理`,logsColStatus:`状态`,logsColLatency:`延迟`,logsColTTFT:`首字`,logsLatencyTotal:`总耗时`,logsOutputTPS:`输出 TPS`,logsColTokens:`Tokens`,logsTokensIn:`输入`,logsTokensOut:`输出`,logsTokensPoints:`{value} 点`,logsColStream:`模式`,logsStreamYes:`流式`,logsStreamNo:`同步`,logsFilterAll:`全部`,logsFilterOk:`成功`,logsFilterIncomplete:`未完成`,logsFilterError:`失败`,logsFilterCanceled:`取消`,logsFilterAccountAll:`全部账号`,logsFilterApiKeyAll:`全部密钥`,logsSearchApiKey:`搜索密钥`,logsFilterProviderAll:`全部供应商`,logsFilterModelAll:`全部模型`,logsFilterKindAll:`全部错误`,logsFilterStreamAll:`全部模式`,logsTimeRange:`时间`,logsTimeAll:`全部时间`,logsTime1h:`1 小时`,logsTime24h:`24 小时`,logsTime7d:`7 天`,logsTimeCustom:`自定义`,logsTimeFrom:`开始`,logsTimeTo:`结束`,logsKindQuota:`额度`,logsKindRateLimit:`限流`,logsKindAuth:`鉴权`,logsKindNotReady:`未就绪`,logsKindUnavailable:`不可用`,logsKindInvalidRequest:`非法请求`,logsKindModelNotAvailable:`模型不可用`,logsPageSize:`每页`,logsPage:`第 {page} / {pages} 页`,logsPrevPage:`上一页`,logsNextPage:`下一页`,logsNoMatch:`没有符合当前筛选的请求。`,logsLevelAll:`全部`,logsLevelInfo:`信息`,logsLevelWarn:`警告`,logsLevelError:`错误`,logsAttempts:`尝试记录`,logsRouting:`路由方式`,logsRouting_pool:`常规池`,logsRouting_pin:`显式指定`,logsRouting_sticky:`会话粘性`,logsRouting_sticky_escape:`粘性逃逸`,logsNoAttempts:`没有尝试详情。`,logsStreamDiagnostics:`流诊断`,logsMessageShape:`消息结构`,logsMessageCount:`消息数`,logsEmptyMessageIndexes:`空内容下标`,logsMessageRoles:`角色顺序`,logsCancellationSource:`取消来源`,logsUpstreamStatus:`上游状态`,logsSSEEvents:`SSE 事件数`,logsBytesRead:`读取字节数`,logsLastEvent:`最后事件`,logsStreamComplete:`已收到 [DONE]`,logsUsageDetail:`本次消耗`,logsCreditConsumed:`消耗点数`,logsDetailTitle:`请求详情`,logsRuntimeDetailTitle:`运行日志详情`,logsRuntimeLevel:`级别`,logsRuntimeSource:`来源`,logsRuntimeMessage:`日志内容`,logsShownTotal:`{shown} / {total}`,logsAutoRefresh:`实时`,failedLogs:`加载日志失败:{msg}`,homeEyebrow:`运行时`,homeDisplay:`网关状态`,homeLead:`运行状态之外,还能看到本机请求量、延迟和 token。`,metricRequests:`请求`,metricSuccess:`成功率`,metricLatency:`p95`,metricTokens:`Tokens`,statsWindow1h:`1小时`,statsWindow24h:`24小时`,statsWindow7d:`7天`,statsWindow30d:`30天`,statsWindowCustom:`自定义`,statsWindowToday:`今天`,statsRefreshPause:`暂停自动刷新`,statsRefreshResume:`恢复自动刷新`,statsRefreshAuto:`每 30 秒刷新 · 点击暂停`,statsRefreshPaused:`自动刷新已暂停 · 点击恢复`,statsDragHint:`拖选时间段查看日志`,statsWindowHint:`{window}窗口`,statsTraffic:`流量`,statsTrafficHint:`所选时间窗口内的已完成聊天请求`,statsEmptyTraffic:`这个时间窗口还没有请求。`,statsLatencyP50:`p50`,statsLatencyP95:`p95`,statsLatencyAvg:`平均`,statsTTFB:`TTFB`,statsPool:`账号池`,statsPoolHint:`就绪 worker 与剩余额度`,statsCooling:`冷却中`,statsCoolingChip:`{count} 冷却`,statsPoolReadyEmpty:`暂无就绪 worker — 可展开上方冷却或前往账号页。`,statsTopModels:`热门模型`,statsTopAccounts:`热门账号`,statsTopProviders:`供应商`,statsTopProvidersHint:`按账号类型统计请求量`,statsNoProviders:`还没有供应商流量。`,statsErrorMix:`错误构成`,statsStatusMix:`结果与错误`,statsStatusMixHint:`请求状态、失败类型与热门账号`,statsCoolingDetails:`冷却中 · 原因 · 剩余 · 退避`,statsBackoffLevel:`重启退避等级`,statsAffinityHit:`会话亲和命中`,statsAffinityHint:`命中 {hits} · 未命中 {misses} · 绑定 {bindings}`,metricCacheHit:`缓存命中率`,metricCacheHitDetail:`缓存 {read} / 输入 {prompt}`,metricStreaming:`流式占比`,metricStreamingDetail:`{total} 次请求中 {count} 次`,metricCanceled:`已取消`,metricCanceledDetail:`占请求 {rate}`,statsErrorMixHint:`该窗口内已分类的失败`,statsNoModels:`还没有模型流量。`,statsNoAccounts:`还没有账号流量。`,statsNoErrors:`没有分类错误。`,statsUnknown:`未知`,statsUnassigned:`未分配`,resTitle:`资源占用`,resHint:`主机进程内存与 CPU`,resServer:`主进程`,resWorkers:`Worker`,resEmpty:`还没有 worker 进程。`,resGoroutines:`个协程`,resCpuLifetime:`生命周期均值`,failedStats:`加载统计失败:{msg}`,homeNote:`已登录本机控制台。账号登录在「账号」页。`,metricRuntime:`运行状态`,metricAccounts:`账号`,metricModels:`模型`,metricAuth:`登录态`,metricPort:`端口`,serviceDetail:`服务详情`,endpoints:`可用端点`,copyBaseUrl:`复制 Base URL`,copied:`已复制`,copy:`复制`,open:`打开`,waitingOverview:`等待概览数据…`,signIn:`登录`,connectQoder:`连接账号`,rewarm:`Rewarm`,rewarming:`Rewarm 中`,refreshAccount:`刷新`,refreshingAccount:`刷新中`,stepBrowserTitle:`浏览器 Device Flow`,stepBrowserDesc:`打开账号选择页。浏览器完成授权后,本页会轮询直到会话就绪。`,startBrowserLogin:`用浏览器登录`,starting:`启动中…`,quotaLoading:`额度获取中…`,quotaUnavailable:`额度不可用`,authUrl:`授权链接`,openAuthUrl:`打开链接`,stepPatTitle:`个人访问令牌`,stepPatDesc:`浏览器流程不方便时,可用 PAT 作为备选。`,pat:`PAT`,pasteToken:`粘贴 token`,loginWithPat:`使用 PAT 登录`,loggingIn:`登录中…`,localState:`本地状态`,raw:`原始数据`,noAuthSnapshot:`暂无授权快照。`,catalog:`目录`,availableModels:`可用模型`,modelsPulled:`来源`,filter:`筛选`,filterPh:`glm / qwen / deepseek`,providerFilterAll:`全部供应商`,accountStatusFilter:`账号状态`,connection:`连接信息`,apiPlayground:`接入与调试`,apiPlaygroundHint:`选择账号与模型。顶部切换「聊天 / 原始 API」;原始 API 含 JSON 与 curl。`,readyAccounts:`{ready} / {total} 个账号就绪`,baseUrl:`Base URL`,externalClients:`外部客户端`,protocol:`协议`,quickTest:`快速测试`,requestBuilder:`请求编排`,responseInspector:`响应检查`,responseInspectorHint:`本地代理返回的原始 JSON`,requestIdle:`等待请求`,requestComplete:`请求完成`,requestFailed:`请求失败`,responseReceived:`已收到响应`,responseEmptyTitle:`还没有响应`,responseEmptyHint:`选择路由、填写提示词并发送请求,原始响应会显示在这里。`,sendRequest:`发送请求`,promptPlaceholder:`输入要发送给模型的内容`,promptHelper:`测试请求使用非流式 Chat Completions。`,accessTabChat:`聊天`,accessTabApi:`原始 API`,accessTabsLabel:`接入方式`,chatTryEmptyTitle:`还没有回复`,chatTryEmptyHint:`在下方输入消息。账号与模型在输入框底栏。离开页面后会话清空。`,chatTryHelper:`Enter 发送 · Shift+Enter 换行`,chatTrySend:`发送`,chatTryStop:`停止`,chatTryStreaming:`生成中…`,chatTryUserLabel:`你`,chatTryAssistantLabel:`助手`,chatTryCreditsUsed:`消耗 {amount} credits`,chatTryUsageTokens:`{prompt} → {completion}`,chatTryUsageFoot:`{tokens} · {amount} credits`,chatHistoryTitle:`历史`,chatHistoryNew:`新对话`,chatHistoryEmpty:`还没有对话`,chatHistoryUntitled:`未命名`,chatHistoryExpand:`展开历史`,chatHistoryCollapse:`收起历史`,nativeApiHint:`非流式请求、原始 JSON 响应,以及对应的 curl 命令。`,rawFormatLabel:`API 格式`,rawFormatChat:`Chat`,rawFormatMessages:`Messages`,rawFormatResponses:`Responses`,rawFormatHint:`支持 Chat Completions、Anthropic Messages 与 OpenAI Responses 三种格式。`,rawApiShow:`展开原始 API`,rawApiHide:`收起原始 API`,chatAttach:`添加附件`,chatAttachRemove:`移除附件`,chatAttachUnsupported:`不支持的文件类型:{names}`,thinkingPhaseScan:`检索中`,thinkingPhasePlan:`规划中`,thinkingPhaseDraft:`起草中`,thinkingDone:`已思考`,thinkingElapsed:`{n}s`,toolCallGroup:`用了 {n} 个工具`,chatDemoLoad:`预览样例`,thinkingChars:`{count} 字`,thinkingWorking:`思考中`,toolCallRunning:`进行中`,toolCallSuccess:`完成`,toolCallError:`失败`,toolCallUntitled:`工具`,toolCallArgs:`参数`,toolCallArgsEmpty:`(空)`,autoAccountHint:`由调度器选择一个可用账号。`,fixedAccountHint:`本次请求固定发送到所选账号。`,modelRoutingHint:`使用当前代理暴露的公开模型 ID。`,accountModelHint:`只列出该账号当前能提供的模型。钉死账号后,目录里没有的 ID 会请求失败。`,noAccountModels:`这个账号目前没有可发送的模型。`,accountModels:`可用模型`,accountModelsTitle:`{name} 的模型`,accountModelsHint:`该账号的实时目录。钉到此账号的请求只会使用这些 ID。`,accountModelsEmpty:`这个账号还没有公布模型目录。`,accountModelsError:`无法加载模型:{msg}`,noAccountsForTest:`暂无可用账号运行时,请先添加账号并完成登录。`,curlGeneratedHint:`根据当前账号、模型和提示词实时生成`,prompt:`提示词`,model:`模型`,send:`发送`,waitingRequest:`等待请求…`,requesting:`请求中…`,endpointOpenAI:`OpenAI 兼容`,endpointChat:`Chat Completions`,endpointBaseHint:`在 OpenAI 兼容客户端中,将此地址作为 Base URL。`,endpointChatHint:`OpenAI 兼容对话。模型 ID 加前缀即可指定供应商,例如 qoder/glm-5.2。`,endpointMessages:`Anthropic Messages`,endpointMessagesHint:`无状态 Anthropic Messages。使用带供应商前缀的模型 ID 即可钉死一家。`,endpointResponses:`OpenAI Responses`,endpointResponsesHint:`无状态 OpenAI Responses。使用带供应商前缀的模型 ID 即可钉死一家。`,endpointModels:`模型列表`,endpointModelsHint:`公开模型 ID。客户端 API 密钥只会看到其允许供应商的模型。`,endpointHealth:`健康检查`,endpointHealthHint:`检查本地代理是否正在响应。`,endpointCount:`{count} 个 API 端点`,endpointReady:`当前可用`,endpointBaseLabel:`客户端 Base URL`,endpointAuthLabel:`Bearer API Key`,hasUserBlob:`已有 user blob`,userBlobBytes:`user blob 大小`,machineId:`Machine ID`,sessionHot:`会话热状态`,upstreamEndpoint:`上游端点`,rewarmCount:`Rewarm 次数`,proxy:`Proxy`,endpoint:`端点`,lastError:`最近错误`,running:`运行中`,down:`离线`,hot:`热就绪`,up:`在线`,ready:`就绪`,missing:`缺失`,degraded:`降级`,error:`错误`,yes:`是`,no:`否`,modelCol:`模型`,mappedKeyCol:`上游 Key`,requestIdCol:`请求 ID`,providerCol:`供应商`,qoderKeyCol:`上游 Key`,routedTo:`上游模型 {model}`,stateCol:`状态`,contextWindowCol:`上下文窗口`,modelDefaultsCol:`上下文与推理`,contextConfigHint:`这里改的是默认值。请求里如果指定了更大上下文或推理强度,仍以请求为准。`,qoderContextHint:`请求没写上下文长度时使用的默认窗口。`,contextInvalid:`上下文窗口必须是 1,024 到 4,000,000 之间的整数。`,contextSaved:`已保存 {model} 的上下文窗口。`,contextReset:`已恢复 {model} 的默认上下文窗口。`,contextMaxOn:`已开启 {model} 的更大上下文。`,contextMaxOff:`已关闭 {model} 的更大上下文。`,contextMaxUnavailable:`这个模型没有更大上下文开关。`,maxMode:`更大上下文`,maxModeHint:`Trae 的更大上下文窗口,常见是 200k 提到 1M,不是套餐也不是额度。只在请求没带 is_max_mode 时使用;请求里写了仍以请求为准。模型不支持时不会发送这个开关。`,qoderMaxModeHint:`Qoder 的更大上下文窗口,不是套餐也不是额度。开启时请求使用该模型的最大窗口;关闭时(或请求自带上下文窗口时)使用默认窗口。`,catalogWindow:`目录默认窗口`,catalogWindowHint:`这个 Trae 模型没有更大上下文开关,数字是目录里的默认窗口。`,workbuddyContextHint:`WorkBuddy 桌面端目录里的默认窗口和可选窗口,用于本地压缩预算,不是 Trae 的 is_max_mode。聊天请求不会发送窗口开关。`,reasoningLevels:`推理强度`,reasoningHint:`请求没指定推理强度时使用的默认档位。选了不会强制每次都走这一档,也不会限制客户端改用其他允许档位。不在列表里的值会回退到可用档位,而不是锁死。`,reasoningFixed:`固定思考:{type}`,noReasoningLevels:`这个模型没有可选的推理档位。`,reasoningSaved:`已保存 {model} 的默认推理强度:{level}。`,reasoningLevel_none:`关闭`,reasoningLevel_low:`低`,reasoningLevel_medium:`中`,reasoningLevel_high:`高`,reasoningLevel_xhigh:`极高`,reasoningLevel_max:`最强推理`,modelDetails:`详情`,promptMaxTokens:`输入上限`,maxOutputTokens:`输出上限`,actions:`操作`,save:`保存`,custom:`自定义`,defaultValue:`默认`,resetDefault:`恢复默认`,fallback:`回退`,modelFree:`免费`,shownTotal:`显示 {shown} / 共 {total}`,noModelsYet:`暂无模型`,noModelsMatch:`没有匹配的模型。`,noProviders:`尚未加载供应商。`,failedOverview:`概览加载失败:{msg}`,pastePatFirst:`请先粘贴 PAT`,patDone:`PAT 登录完成`,loginOpenMsg:`请在浏览器打开授权链接完成登录`,idle:`空闲`,menu:`菜单`,toggleSidebar:`收起侧栏`,accountsTitle:`账号`,accountsDesc:`一个账号一个登录态。Chat 会 round-robin,失败切下一个。`,noAccounts:`还没有账号,添加一个即可开始服务。`,accountCount:`账号`,signedIn:`已登录`,enabledAccounts:`已启用`,availableAccounts:`可用`,needsAttention:`需处理`,searchAccounts:`搜索名称、账号 ID、UID、提供方或认证类型`,filterAll:`全部`,shownAccounts:`{shown} / {total}`,noAccountsMatch:`没有符合当前条件的账号。`,clearFilters:`清除筛选`,more:`更多操作`,partialCooling:`部分模型冷却`,modelCooldowns:`模型冷却`,modelCooldownsTitle:`冷却中的模型`,modelCooldownsEmpty:`当前没有模型在冷却。`,runtimeState:`运行状态`,maxInflight:`最大并发`,priority:`优先级`,updatedAt:`更新于`,enabledState:`已启用`,cooling:`冷却中`,dead:`恢复中`,authFailed:`登录失败`,patFallback:`PAT 备选`,usePat:`用 PAT`,account:`账号`,autoAccount:`自动(轮询)`,cooldown:`冷却`,inFlight:`进行中`,liveConcurrency:`当前并发`,liveRpm:`近 60 秒`,liveRpmUnit:`次`,liveRpmHint:`最近一分钟发起`,liveTrace:`走势`,livePeak:`峰值 {n}`,liveSaturated:`已满载`,inflightTitle:`实时进行中`,inflightMockBadge:`示意`,inflightIdleBadge:`空闲`,inflightMockToggle:`示意`,inflightMockToggleAria:`无实时数据时显示示意动画`,inflightLiveBadge:`实时`,inflightHint:`槽位 · 进行中 · 冷却`,inflightCardAria:`打开实时详情`,inflightOpen:`查看全部`,inflightExpand:`展开`,inflightExpandFromConcurrency:`展开实时进行中详情`,inflightStickyBindings:`粘性 · {n}`,inflightWaiting:`等待`,inflightRunning:`进行中`,inflightThroughput:`吞吐`,inflightWaitP95:`P95`,inflightQueue:`等待`,inflightQueueEmpty:`暂无`,inflightSlots:`槽位`,inflightSticky:`粘性`,inflightDone:`完成`,inflightFailed:`失败`,inflightDepth:`深度`,inflightDepthHint:`{n}`,inflightRatePill:`限流 · {remain}`,inflightRateBand:`{label} · {remain}`,inflightSlotIdle:`空闲`,inflightSlotPaused:`冷却`,restarts:`重启次数`,dropSystemPrompt:`丢弃系统提示词`,dropSystemPromptHint:`发送前剥离调用方的系统提示词;仍会补一条空的 system,避免国际版要求第一条必须是系统提示词`,dropSystemPromptTraeHint:`默认保留调用方系统提示词。MiMo Code 等客户端会把 JSON 指令放在那里;仅在 Trae 因此拒请求时再打开。`,autoCheckin:`每日签到`,autoCheckinHint:`按账号配置的本地时间自动领取 WorkBuddy 积分;失败会在约 21:00 重试。默认关闭。`,autoCheckinCreateHint:`仅 WorkBuddy。开启后按该账号的签到时间自动领取积分;未改时间时使用系统默认。`,autoCheckinTime:`签到时间`,autoCheckinTimeHint:`使用服务器本地时间,并在所选时间后的约 14 分钟内执行;首次失败会在约 21:00 重试。新建账号默认继承系统设置。`,checkinNow:`立即签到`,checkinAll:`一键签到`,checkinAllEmpty:`没有已启用且支持签到的账号`,checkinAllDone:`{count} 个账号今天都已签到`,toastCheckingInAll:`正在签到 {done}/{total}…`,toastCheckedInAll:`已签到 {checked} 个,跳过 {skipped} 个`,toastCheckedInAllFailed:`已签到 {checked} 个,跳过 {skipped} 个,失败 {failed} 个`,lastCheckin:`最近签到`,lastCheckinNone:`还没有签到记录`,checkinStatus:`签到`,checkinToday:`今日已签到`,checkinPending:`今日未签到`,checkinFailed:`签到异常`,checkinRecords:`签到记录`,checkinRecordsTitle:`签到记录 · {name}`,checkinRecordsHint:`显示该账号最近 20 次签到结果。`,checkinRecordsEmpty:`还没有签到记录`,checkinRecordsCount:`{count} 条记录`,checkinRecordSuccess:`成功`,checkinRecordAlready:`已签到`,checkinRecordFailed:`失败`,checkinTruncated:`信息已截断 · 点复制查看完整错误`,checkinCopyError:`复制完整错误`,refreshCredits:`刷新积分`,expiryDistTitle:`积分到期分布`,expiryDistHint:`按自然日聚合 · 颜色区分账号 · FEFO:上游按失效时刻先后优先扣减`,expiryDistExpand:`展开全部 {n} 天`,expiryDistCollapse:`收起`,expiryDistDayTotal:`到期 {n} 积分`,expiryDistColAccount:`账号`,expiryDistColSoonest:`最近到期`,expiryDistColDaysLeft:`距到期`,expiryDistColBatch:`该日到期`,expiryDistColDaily:`日均需耗`,expiryDistDays:`{n} 天`,expiryDistFoot:`「日均需耗」= 最近到期那天的积分 ÷ 距该日天数,即到期前需要消耗的速度。`,expiryDistExpired:`已过期`,usageColModel:`模型`,quota:`额度`,quotaUsed:`已用`,quotaRemaining:`剩余`,quotaDaily:`日额度`,quotaWeekly:`周额度`,quotaMonthly:`月额度`,quotaFiveHour:`5 小时额度`,quotaWeeklyLimit:`周额度`,quotaPlan:`订阅`,quotaMonthlyLimit:`月额度`,quotaUsedPercent:`{n}%`,quotaResetsSoon:`即将重置`,quotaResetsInMinutes:`{n} 分钟后重置`,quotaResetsInHours:`{n} 小时后重置`,quotaExpiresOn:`{amount}{unit} 将于 {date} 到期`,quotaAddOn:`附加包`,quotaResourcePackage:`资源包`,quotaExceeded:`额度已用尽`,errorKind:`错误类型`,qoderLoginHint:`这里登录的是该账号的上游登录态,不会改控制台密码。`,needQoderLogin:`需要账号登录`,waitingQoderLogin:`等待账号登录完成…`,qoderLoginDone:`账号登录完成`,rewarmDone:`Rewarm 完成`,accountsSigned:`{n} / {total} 个账号就绪`,addAccount:`添加账号`,batchImport:`批量导入`,batchImportLoading:`正在导入 WorkBuddy 账号…`,batchImportUnrecognized:`无法识别此凭证文件格式。`,batchImportConfirmTitle:`确认批量导入`,batchImportConfirmHint:`已从 {file} 识别。请核对后再导入。`,batchImportConfirmHintNoFile:`请核对识别结果,确认后再导入。`,batchImportRegion:`WorkBuddy 区`,batchImportRegionPickHint:`未能明确识别区,请先选择国内版或国际版。`,batchImportRegionMixed:`此包同时含国内与国际域名。请拆分后导入,或强制选择一个区。`,batchImportRegionUnknown:`未从域名识别出区,请确认。`,batchImportUnknownFormat:`未知 format 字段,已按形状猜测。`,batchImportProviderUnsupported:`该供应商暂不支持批量导入。识别结果已保留,便于后续扩展。`,batchImportConfirmAction:`导入`,batchImportFormatUnknown:`未知格式`,batchImportProviderUnknown:`未知供应商`,accountName:`账号名称`,accountNameRequired:`请输入账号名称。`,accountCreated:`账号已创建,会话正在启动。`,importCredential:`导入原生凭证`,accountImported:`凭证已导入,运行时已启动。`,accountImportBatch:`已导入 {n} 个账号。`,accountImportPartial:`成功 {ok},失败 {fail}。`,credentialCopied:`凭证包已复制。`,addAccountTitle:`添加账号`,accountType:`账号类型`,loginMethod:`登录方式`,accountTypeHint:`选择这个隔离运行时使用的上游登录类型。`,accountTypeQoderGlobal:`Qoder 国际版`,accountTypeQoderGlobalHint:`Qoder 国际版:浏览器、PAT 或导入凭证`,accountTypeQoderCN:`Qoder 国内版`,accountTypeQoderCNHint:`Qoder 中国大陆版:浏览器、PAT 或导入凭证`,accountTypeWorkBuddyCN:`WorkBuddy 国内版`,accountTypeWorkBuddyCNHint:`CodeBuddy 国内版:浏览器登录或导入凭证`,accountTypeWorkBuddyGlobal:`WorkBuddy 国际版`,accountTypeWorkBuddyGlobalHint:`WorkBuddy 国际版:浏览器登录或导入凭证`,accountTypeTraeCN:`Trae 国内版(Solo)`,accountTypeTraeCNHint:`Trae 国内 Solo:浏览器登录或导入凭证`,accountTypeDevinGlobal:`Devin(实验性)`,accountTypeDevinGlobalHint:`实验性 Devin 国际版:浏览器 OAuth 或导入 session token`,accountTypeCommandGlobal:`Command Code`,accountTypeCommandGlobalHint:`粘贴 user_… 密钥接入。走 CLI 的 /alpha/generate 协议,所有档位均可用(含 $1 Go 套餐)。`,accountTypeCodexGlobal:`Codex`,accountTypeCodexGlobalHint:`OpenAI Codex:Codex CLI OAuth、Sign in with ChatGPT,或导入凭证`,accountTypeZhipuCN:`智谱 GLM`,accountTypeZhipuCNHint:`填写智谱 API Key。按量付费或 Coding Plan 与上游账号的计费方式一致。`,accountTypeQwenworkGlobal:`QwenWork 国际版`,accountTypeQwenworkGlobalHint:`QwenWork 国际版(qwenwork.ai),浏览器授权或导入凭证。授权链接只能使用一次:请在已登录目标账号的浏览器窗口里直接打开,不要经聊天工具发送。`,accountTypeQwenworkCN:`千问办公 国内版`,accountTypeQwenworkCNHint:`千问办公国内版(qwenwork.cn),浏览器授权或导入凭证。授权链接只能使用一次:请在已登录目标账号的浏览器窗口里直接打开,不要经聊天工具发送。国内版尚未经真实账号验收。`,accountTypeKimiCN:`Kimi Code 国内版`,accountTypeKimiCNHint:`Kimi Code 中国区订阅,走 auth.kimi.com 的设备码授权,与官方 CLI 使用同一个 OAuth 客户端。已在本机登录 Kimi Code 的,可直接粘贴它的凭证 JSON 导入。`,accountTypeCodeArtsCN:`CodeArts(码道)`,accountTypeCodeArtsCNHint:`华为云码道,走 codearts.huaweicloud.com 的 OAuth PKCE 授权。控制台打开授权页;浏览器回不到本机时,也可以粘贴 127.0.0.1 回调地址完成登录。`,accountTypeKiroUS:`Kiro(美东)`,accountTypeKiroUSHint:`个人 Kiro 登录。粘贴 Builder ID、Identity Center 或社交登录的凭证 JSON,也可以粘贴 ksk_ 密钥。聊天走 us-east-1 的 Kiro 运行时。实验性接入。`,accountTypeKiroEU:`Kiro(欧洲中部)`,accountTypeKiroEUHint:`个人 Kiro 登录,走 eu-central-1 运行时。凭证格式与美东相同。实验性接入。`,accountTypeMetaGlobal:`Muse (Meta)`,accountTypeMetaGlobalHint:`Meta Muse Code 订阅,走 auth.meta.com 的设备码授权;批准后控制台会在 api.meta.ai 兑换 LLM API Key。也可在 PAT 页粘贴 Meta Model API Key。`,providerGroupSubscriptions:`稳定订阅`,providerGroupSubscriptionsHint:`稳定的账号登录源`,providerGroupExperimental:`实验性`,providerGroupExperimentalHint:`早期适配器`,providerFindPlaceholder:`查找登录源...`,providerFindEmpty:`没有符合搜索的登录源。`,caiaiSoftLink:`不想自托管?用托管 Gateway → CaiAI`,addAccountDesc:`创建一个隔离会话并登录。每个账号使用独立的运行时目录。`,tabBrowser:`浏览器登录`,tabPat:`PAT`,tabImport:`导入凭证`,recommended:`推荐`,wizardSettings:`账号设置`,wizardAdvanced:`高级选项`,wizardContinue:`继续`,wizardBack:`返回`,wizardSettingsHint:`登录前先设好这些选项,之后仍可在账号卡片上点编辑修改。`,editAccount:`编辑`,editAccountTitle:`编辑 {name}`,editAccountHint:`修改显示名称、并发、调度优先级、代理出口和模型别名;支持签到的账号还可设置签到时间。`,accountModelAliases:`别名`,accountModelAliasesHint:`这个账号对外应答的名字。选中这个账号后,请求会换成它自己的真实模型。`,accountModelAliasTargetPlaceholder:`这个账号上的真实模型`,modelAliasName:`外号`,modelAliasTarget:`真实模型`,modelAliasAdd:`添加`,modelAliasRemove:`移除`,modelAliasPlaceholder:`kimi-k3`,enabledModels:`可用模型`,enabledModelsHint:`不限制时使用整个目录。限制后,这个账号只接选中的模型。`,restrictModels:`仅选中`,allModels:`全部模型`,modelPickerSearch:`搜索模型`,modelPickerCount:`已选 {selected} / 共 {total}`,modelPickerSelectAll:`全选`,modelPickerClear:`清空`,modelPickerOffline:`已下线`,modelPickerRemove:`移除 {model}`,modelPickerNoMatch:`没有匹配的模型。`,maxInflightInvalid:`并发必须是 1 到 32 之间的整数。`,priorityInvalid:`优先级必须是 1 到 100 之间的整数。`,wizardNamePh:`账号名称`,maxInflightHint:`这个账号同时能跑多少条对话。之后改并发会重启该账号的 worker。`,priorityHint:`数字越大,之后调度会越优先选这个账号。默认 50。`,creditFloor:`积分保底`,creditFloorHint:`开启后,采样到的积分余额降到该值时跳过计费模型,免费模型仍可用;只影响以积分为单位上报余额的账号。`,creditFloorCustom:`为该账号覆盖全局阈值`,creditFloorInheritHint:`继承 CLI2API_CREDIT_FLOOR;填 0 表示显式关闭该账号的保底。`,creditFloorInvalid:`积分保底必须是不小于 0 的数字。`,percentFloor:`百分比保底`,percentFloorHint:`对以剩余百分比上报余额的账号(Devin、Kimi、智谱):剩余百分比降到该值时跳过计费模型;与积分保底互不影响,免费模型仍可用。`,percentFloorCustom:`为该账号覆盖全局百分比阈值`,percentFloorInheritHint:`继承 CLI2API_PERCENT_FLOOR;填 0 表示显式关闭该账号的保底。`,percentFloorInvalid:`百分比保底必须是 0 到 100 之间的数字。`,proxyUrl:`代理地址`,proxyUrlPlaceholder:`http://127.0.0.1:7890、direct`,proxyUrlHint:`留空继承全局代理;填写 direct 或 none 可让此账号直连。Qoder 仅支持 HTTP(S),WorkBuddy/Trae 额外支持 SOCKS5。`,proxySettingsTitle:`统一代理出口`,proxySettingsHint:`设置所有上游请求的默认代理;全局代理支持 HTTP(S),SOCKS5 仅支持 WorkBuddy/Trae 的账号级代理;账号级代理优先于全局代理。`,dropSystemPromptCreateHint:`仅 WorkBuddy。剥离调用方系统提示词后仍补一条空的 system,避免国际版拒绝请求。`,wizardBrowserLead:`会展示授权地址。打开或复制后在浏览器完成授权,向导会自动继续。`,wizardCodexBrowserLead:`先选 Codex CLI 或 Sign in with ChatGPT,再打开授权地址。ChatGPT 网页登录必须走后者,CLI 流刷新不了那种 token。`,codexLoginMethod:`Codex 登录方式`,codexLoginCli:`Codex CLI`,codexLoginCliHint:`官方 Codex CLI OAuth,适合 CLI 签发的凭证。`,codexLoginChatGPT:`Sign in with ChatGPT`,codexLoginChatGPTHint:`ChatGPT 网页登录。凭证单独存储,刷新走另一套 token 端点。`,kiroLoginMethod:`Kiro 登录方式`,kiroLoginBuilder:`Builder ID`,kiroLoginBuilderHint:`设备码。打开链接并确认,这个页面会自己完成。`,kiroLoginIDC:`Identity Center`,kiroLoginIDCHint:`组织门户。先粘贴 start URL,再在浏览器里确认。`,kiroLoginSSO:`SSO 令牌`,kiroLoginSSOHint:`粘贴门户的 SSO bearer。只用来换凭证,不会保存。`,kiroLoginMicrosoft:`Microsoft`,kiroLoginMicrosoftHint:`企业 SSO。浏览器每次跳到 localhost 时,把回调地址粘过来。`,kiroIDCStartURL:`Identity Center start URL`,kiroIDCStartURLPh:`https://example.awsapps.com/start`,startCodexCliLogin:`开始 Codex CLI 登录`,startCodexChatGPTLogin:`Sign in with ChatGPT`,wizardStartBrowser:`开始浏览器登录`,wizardStartingSession:`正在启动账号会话…`,wizardWaitingBrowser:`正在等待浏览器完成授权…`,wizardCallbackLead:`如果浏览器停在 127.0.0.1,而控制台一直没有完成,把地址栏完整 URL 粘贴到这里。`,wizardCallbackPh:`粘贴完整的 http://127.0.0.1…/authorize?… 地址`,wizardSubmitCallback:`提交回调地址`,wizardStartingWorker:`已收到授权,正在启动账号会话…`,wizardAccountReady:`账号已就绪。`,wizardLoginTimeout:`等待浏览器登录超时,可在账号卡片重试。`,wizardPatLead:`浏览器流程不方便时,可用个人访问令牌登录。`,wizardPatLeadCN:`在 qoder.com.cn/account/integrations 创建 PAT,然后粘贴到这里。`,wizardPatLeadCommand:`粘贴你的 Command Code 密钥(形如 user_…,来自 commandcode.ai/settings)。`,zhipuApiKey:`API Key`,zhipuApiKeyPh:`粘贴 open.bigmodel.cn 的密钥`,zhipuAccountMode:`账号类型`,zhipuModePayg:`按量付费`,zhipuModePaygHint:`按 token 计费,走标准 GLM 端点。`,zhipuModeCoding:`Coding Plan`,zhipuModeCodingHint:`编程套餐。走 Coding Plan 端点,并显示套餐额度。`,zhipuOrganization:`组织 ID`,zhipuOrganizationPh:`可选,团队版 Coding Plan 才需要`,zhipuProject:`项目 ID`,zhipuProjectPh:`可选`,zhipuCreate:`添加智谱账号`,zhipuKeyRequired:`请先粘贴智谱 API Key。`,wizardPatPh:`粘贴个人访问令牌`,wizardCreateAndLogin:`创建并登录`,wizardImportLead:`粘贴凭证 JSON。WorkBuddy hub 导出包会一次性导入其中全部账号。`,wizardImportPh:`粘贴凭证 JSON`,wizardChooseFile:`选择文件`,wizardBadJson:`这看起来不是有效的凭证包。`,reLogin:`登录`,cancel:`取消`,close:`关闭`,create:`创建`,import:`导入`,export:`导出`,enable:`启用`,disable:`停用`,disabled:`已停用`,delete:`删除`,holdToDelete:`按住删除`,trendHalfHint:`所选时间窗口后半段对比前半段`,toastRefreshingAccount:`正在刷新账号…`,toastAccountRefreshed:`账号已刷新`,toastRefreshingCredits:`正在刷新积分…`,toastCreditsRefreshed:`积分已刷新`,toastCreditsPartiallyRefreshed:`{total} 个账号中有 {failed} 个刷新失败`,toastAccountAdded:`账号已添加`,toastAccountDeleted:`账号已删除`,toastClearingLogs:`正在清空请求日志…`,toastLogsCleared:`请求日志已清空`,toastKeyDeleted:`API Key 已删除`,toastFailed:`操作失败`,deleteAccountConfirm:`确定删除账号 {name} 吗?这会移除它的本地运行时和已保存凭据。`,edit:`编辑`,enabled:`已启用`,keysLead:`客户端密钥只用于 /v1。供应商留空表示全部可用。控制台管理员密钥在系统页。`,keysCreate:`创建密钥`,keysEmpty:`还没有客户端密钥`,keysEmptyHint:`为 OpenAI 兼容客户端创建命名密钥。它不能登录这个控制台。`,keysCreateTitle:`创建 API 密钥`,keysCreateHint:`明文密钥只显示一次,请保存在会调用 /v1 的客户端里。`,keysEditTitle:`编辑 API 密钥`,keysEditHint:`可以改名称、限制它能调度到哪些供应商,或限制它同时能跑多少条对话。`,keysName:`名称`,keysNamePh:`CI 机器人`,keysNameRequired:`请填写名称。`,keysProviders:`供应商`,keysProvidersHint:`可将 Key 限制到特定供应商区域(如国内版 / 国际版)。全部不勾选表示允许所有供应商。`,keysAllProviders:`全部供应商`,keysAllRegions:`全区域`,keysProvidersNotLoaded:`供应商列表仍在加载中。已禁用保存,以保证 Key 权限不会被意外更改。`,keysProvidersLoadFailed:`供应商列表加载失败:{message}`,keysMaxInflight:`最大并发`,keysMaxInflightHint:`这把密钥同时能跑多少条 /v1 对话。0 表示不限制。超出的请求返回 HTTP 429。`,keysMaxInflightInvalid:`并发必须是 0 到 256 之间的整数。`,keysMaxInflightValue:`同时最多 {count} 条`,keysMaxInflightUnlimited:`不限制并发`,keysLastUsed:`最近使用 {time}`,keysNeverUsed:`尚未使用`,keysSecretTitle:`请立刻保存这把密钥`,keysSecretHint:`服务端只存哈希,关闭后无法再查看明文。`,keysSecretOnce:`关闭弹窗前请先复制。`,keysDeleteConfirm:`确定删除 API 密钥 {name} 吗?正在使用它的客户端会立刻失败。`,consoleKeyTitle:`控制台 API 密钥`,consoleKeyHint:`这是登录本控制台的管理员密钥。`,consoleKeyLead:`它可以调用全部供应商,并管理账号、密钥和更新。客户端密钥在「API 密钥」页。`,consoleKeyRotate:`轮换密钥`,consoleKeyRotateHint:`轮换后其他会话会失效,并重启 Qoder worker 以使用新密钥。`,consoleKeyRotateNow:`立即轮换`,consoleKeySecretTitle:`新的控制台密钥`,consoleKeySecretHint:`当前浏览器会话已更新。如果还有客户端在用旧的控制台密钥,请把新值复制过去。`}};function Xoe(e,t,n={}){let r=UF[e]||UF.en,i=UF.en,a=r[t];return a??=i[t],typeof a==`string`?a.replace(/\{(\w+)\}/g,(e,t)=>n[t]==null?`{${t}}`:String(n[t])):t}function Zoe(e,t){return((UF[e]||UF.en).pages||UF.en.pages)[t]||{title:t,desc:``}}var WF=(0,v.createContext)(null);function Qoe({children:e}){let[t,n]=(0,v.useState)(()=>localStorage.getItem(`cli2api_lang`)===`en`?`en`:`zh`),r=(0,v.useMemo)(()=>({lang:t,setLang:e=>{let t=e===`en`?`en`:`zh`;localStorage.setItem(`cli2api_lang`,t),document.documentElement.lang=t===`zh`?`zh-CN`:`en`,n(t)},t:(e,n)=>Xoe(t,e,n),page:e=>Zoe(t,e)}),[t]);return(0,G.jsx)(WF.Provider,{value:r,children:e})}function GF(){let e=(0,v.useContext)(WF);if(!e)throw Error(`useI18n must be used within I18nProvider`);return e}var KF=`cli2api_key`,qF=(0,v.createContext)(null);function $oe({children:e}){let[t,n]=(0,v.useState)(()=>localStorage.getItem(KF)||``),r=(0,v.useMemo)(()=>({apiKey:t,setApiKey:e=>{let t=String(e||``).trim();t?localStorage.setItem(KF,t):localStorage.removeItem(KF),n(t)},signOut:()=>{localStorage.removeItem(KF),n(``)}}),[t]);return(0,G.jsx)(qF.Provider,{value:r,children:e})}function JF(){let e=(0,v.useContext)(qF);if(!e)throw Error(`useApiKey must be used within ApiKeyProvider`);return e}function YF(){return(localStorage.getItem(KF)||``).trim()}var XF=class extends Error{status;code;constructor(e,t,n){super(e),this.name=`ApiError`,this.status=t,this.code=n}};function ZF(e){if(e instanceof XF)return e.status===401||e.code===`invalid_api_key`;let t=e instanceof Error?e.message:String(e||``);return/invalid_api_key|unauthorized|Missing\/invalid API key/i.test(t)}async function QF(e,t={},n){let r=new Headers(t.headers||{});t.body&&!(t.body instanceof FormData)&&!r.has(`Content-Type`)&&r.set(`Content-Type`,`application/json`);let i=(n??YF()).trim();i&&!r.has(`Authorization`)&&r.set(`Authorization`,`Bearer ${i}`);let a=await fetch(e,{...t,headers:r}),o=await a.text(),s;try{s=o?JSON.parse(o):null}catch{s=o}if(!a.ok){let e=typeof s==`string`?s:o,t=/]/i.test(e);throw new XF(s?.error?.message||s?.message||(t?`${a.status} ${a.statusText}`:e||a.statusText),a.status,s?.error?.code)}return s}function ese(e){return QF(`/api/overview/summary`,{},e)}function $F(e=!1){return QF(`/api/accounts?refresh=${e?`1`:`0`}`)}function eI(e,t,n){if(!e)throw Error(`account id required`);let r={};return t&&(r.login_method=t),n&&(r.start_url=n),QF(`/api/accounts/${encodeURIComponent(e)}/login/device`,{method:`POST`,body:JSON.stringify(r)})}function tI(e){if(!e)throw Error(`account id required`);return QF(`/api/accounts/${encodeURIComponent(e)}/login/status`)}function nI(e,t){if(!e)throw Error(`account id required`);return QF(`/api/accounts/${encodeURIComponent(e)}/login/callback`,{method:`POST`,body:JSON.stringify({callback_url:t})})}function rI(e,t){if(!t)throw Error(`account id required`);return QF(`/api/accounts/${encodeURIComponent(t)}/login/pat`,{method:`POST`,body:JSON.stringify({pat:e})})}var tse=3e4,iI=new Map;function aI(e,t){return`${e||`*`}@${t||`merged`}`}function oI(e,t=!1,n,r){let i=new URLSearchParams;t&&i.set(`refresh`,`1`),e&&i.set(`account`,e),n&&i.set(`view`,n),r?.page!=null&&i.set(`page`,String(r.page)),r?.pageSize!=null&&i.set(`page_size`,String(r.pageSize));let a=i.toString();return QF(`/api/models${a?`?${a}`:``}`)}function nse(e,t){let n=aI(e,t),r=iI.get(n);if(r&&Date.now()-r.at(iI.set(n,{data:e,at:Date.now()}),e)).finally(()=>{let e=iI.get(n);e?.pending===i&&iI.set(n,{data:e.data,at:e.at})});return iI.set(n,{data:r?.data||{},at:r?.at||0,pending:i}),i}function sI(e,t,n){let r=aI(e,t);return iI.delete(r),oI(e,!0,t,n).then(e=>(!n?.page&&!n?.pageSize&&iI.set(r,{data:e,at:Date.now()}),e))}function rse(e,t,n,r){return QF(`/api/models/${encodeURIComponent(e)}/${encodeURIComponent(t)}`,{method:`PATCH`,body:JSON.stringify(e===`qoder`&&n&&r?{max_mode:n,context_length:r}:{max_mode:n})})}function ise(e,t,n){return QF(`/api/models/${e}/${encodeURIComponent(t)}`,{method:`PATCH`,body:JSON.stringify({reasoning_effort:n})})}function ase(e,t){if(!e)throw Error(`account id required`);let n=t?.quota?`?quota=1`:``;return QF(`/api/accounts/${encodeURIComponent(e)}/refresh${n}`,{method:`POST`,body:`{}`})}function ose(e,t,n){let r=n||`只回复OK`;return e===`responses`?{model:t,input:r,stream:!1}:e===`messages`?{model:t,max_tokens:1024,stream:!1,messages:[{role:`user`,content:r}]}:{model:t,stream:!1,messages:[{role:`user`,content:r}]}}function sse(e,t,n){let r={};return n&&(r[`X-Qoder-Account`]=n),QF(e,{method:`POST`,headers:r,body:JSON.stringify(t)})}function cse(e,t){if(!Array.isArray(t))return e;let n=e.map(e=>({...e,function:e.function?{...e.function}:void 0}));for(let e of t){if(!e||typeof e!=`object`)continue;let t=e,r=typeof t.index==`number`?t.index:n.length;for(;n.length<=r;)n.push({index:n.length,function:{name:``,arguments:``}});let i=n[r];i.index=r,typeof t.id==`string`&&t.id&&(i.id=t.id),typeof t.type==`string`&&t.type&&(i.type=t.type);let a=t.function;if(a&&typeof a==`object`){let e=a;i.function||={name:``,arguments:``},typeof e.name==`string`&&e.name&&(i.function.name=e.name),typeof e.arguments==`string`&&e.arguments&&(i.function.arguments=(i.function.arguments||``)+e.arguments)}}return n}function lse(e){return typeof e==`string`?[{role:`user`,content:e}]:e}async function use(e,t,n,r={}){let i={"Content-Type":`application/json`};n&&(i[`X-Qoder-Account`]=n);let a=YF().trim();a&&(i.Authorization=`Bearer ${a}`);let o=lse(t),s=await fetch(`/api/chat`,{method:`POST`,headers:i,body:JSON.stringify({model:e,stream:!0,messages:o}),signal:r.signal});if(!s.ok){let e=await s.text(),t;try{t=e?JSON.parse(e):null}catch{t=e}let n=typeof t==`string`?t:e,r=/]/i.test(n);throw new XF(t?.error?.message||t?.message||(r?`${s.status} ${s.statusText}`:n||s.statusText),s.status,t?.error?.code)}let c=s.body?.getReader();if(!c)throw Error(`No response body`);let l=new TextDecoder,u=``,d=``,f=``,p=[],m=e=>{for(let t of[`credits`,`credit`,`consumed_credits`,`ConsumedCredits`]){let n=e[t];if(typeof n==`number`&&Number.isFinite(n))return n}},h=e=>{let t=e.trim();if(!t.startsWith(`data:`))return!1;let n=t.slice(5).trim();if(!n)return!1;if(n===`[DONE]`)return!0;try{let e=JSON.parse(n),t=e?.usage;if(t&&typeof t==`object`){let e=t,n={prompt_tokens:typeof e.prompt_tokens==`number`?e.prompt_tokens:void 0,completion_tokens:typeof e.completion_tokens==`number`?e.completion_tokens:void 0,total_tokens:typeof e.total_tokens==`number`?e.total_tokens:void 0,credits:m(e),source:typeof e.source==`string`?e.source:void 0};r.onUsage?.(n)}let i=e?.choices?.[0]?.delta;if(!i||typeof i!=`object`)return!1;let a=i.content;typeof a==`string`&&a&&(d+=a,r.onContent?.(a,d));let o=i.reasoning_content;typeof o==`string`&&o&&(f+=o,r.onReasoning?.(o,f)),i.tool_calls&&(p=cse(p,i.tool_calls),r.onToolCalls?.(p))}catch{}return!1};for(;;){let{done:e,value:t}=await c.read();if(e)break;u+=l.decode(t,{stream:!0});let n=u.split(` `);u=n.pop()||``;for(let e of n)if(h(e))return d}return u.trim()&&h(u),d}function cI(){return QF(`/api/providers`)}function dse(e,t=`qoder`,n=`global`,r){return QF(`/api/accounts`,{method:`POST`,body:JSON.stringify({name:e,provider:t,region:n,enabled:!0,max_inflight:r?.max_inflight??4,priority:r?.priority??50,drop_system_prompt:r?.drop_system_prompt,workbuddy_auto_checkin:r?.workbuddy_auto_checkin,workbuddy_checkin_time:r?.workbuddy_checkin_time,auto_checkin:r?.auto_checkin,checkin_time:r?.checkin_time,proxy_url:r?.proxy_url})})}function lI(e){return QF(`/api/accounts/${encodeURIComponent(e)}/checkin`,{method:`POST`,body:`{}`})}function fse(e){return QF(`/api/accounts/${encodeURIComponent(e)}/checkins`)}function uI(e,t){return QF(`/api/accounts/${encodeURIComponent(e)}`,{method:`PATCH`,body:JSON.stringify(t)})}function pse(e){return QF(`/api/accounts/${encodeURIComponent(e)}`,{method:`DELETE`})}function dI(e){return QF(`/api/accounts/import`,{method:`POST`,body:JSON.stringify(e)})}function mse(e){return QF(`/api/accounts/${encodeURIComponent(e)}/export`)}var fI=(0,v.createContext)(null);function hse({children:e}){let{apiKey:t,signOut:n}=JF(),[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(!!t),[s,c]=(0,v.useState)(null),l=(0,v.useCallback)(async(e,r)=>{let a=e??t;if(!a)throw i(null),c(null),o(!1),Error(`missing_api_key`);let s=!!r?.silent;s||o(!0);try{let e=await ese(a);return i(e),c(null),e}catch(e){let t=e instanceof Error?e.message:String(e);throw s||i(null),c(t),ZF(e)&&n(),e}finally{s||o(!1)}},[t,n]);(0,v.useEffect)(()=>{if(!t){i(null),o(!1),c(null);return}l(void 0,{refreshQuota:!1}).catch(()=>void 0)},[t,l]);let u=(0,v.useMemo)(()=>({overview:r,loading:a,error:s,refresh:l,setOverview:i}),[r,a,s,l]);return(0,G.jsx)(fI.Provider,{value:u,children:e})}function pI(){let e=(0,v.useContext)(fI);if(!e)throw Error(`useOverview must be used within OverviewProvider`);return e}var mI=`cli2api_theme`,hI=(0,v.createContext)(null);function gse(){let e=localStorage.getItem(mI);return e===`light`||e===`dark`?e:window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}function _se({children:e}){let[t,n]=(0,v.useState)(gse);(0,v.useEffect)(()=>{let e=document.documentElement;e.dataset.theme=t,e.classList.toggle(`dark`,t===`dark`),e.classList.toggle(`light`,t===`light`),e.style.colorScheme=t;let n=vse()??(t===`dark`?`#0A0A0A`:`#FAFAFA`);document.querySelectorAll(`meta[name="theme-color"]`).forEach(e=>{e.setAttribute(`content`,n)})},[t]);let r=(0,v.useMemo)(()=>({theme:t,setTheme:e=>{localStorage.setItem(mI,e),n(e)},toggleTheme:()=>{n(e=>{let t=e===`dark`?`light`:`dark`;return localStorage.setItem(mI,t),t})}}),[t]);return(0,G.jsx)(hI.Provider,{value:r,children:e})}function gI(){let e=(0,v.useContext)(hI);if(!e)throw Error(`useTheme must be used within ThemeProvider`);return e}function vse(){let e=document.createElement(`div`);e.style.cssText=`position:absolute;visibility:hidden;background:var(--background)`,document.body.appendChild(e);let t=getComputedStyle(e).backgroundColor;return e.remove(),t&&t!==`rgba(0, 0, 0, 0)`?t:null}function yse({title:e,desc:t,onMenu:n}){let{lang:r,setLang:i,t:a}=GF(),{loading:o,refresh:s,overview:c}=pI(),{signOut:l}=JF(),{theme:u,toggleTheme:d}=gI(),f=at(),p=!!c?.worker?.ok;return(0,G.jsx)(`header`,{className:`relative z-20 shrink-0 border-b border-separator bg-background`,children:(0,G.jsxs)(`div`,{className:`mx-auto flex w-full max-w-[1480px] items-center gap-4 px-4 py-2 sm:px-6 lg:px-8`,children:[(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,className:`lg:hidden`,onPress:n,"aria-label":a(`menu`),children:(0,G.jsx)(ma,{size:17})}),(0,G.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,G.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-3`,children:[(0,G.jsx)(`span`,{className:`status-dot translate-y-[-1px]`,"data-state":p?`ok`:`danger`}),(0,G.jsx)(`h1`,{className:`truncate text-title font-semibold`,children:e}),(0,G.jsx)(`p`,{className:`hidden truncate text-body text-muted xl:block`,children:t})]})}),(0,G.jsxs)(_j,{isAttached:!0,children:[(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,isPending:o,onPress:()=>void s().catch(()=>void 0),"aria-label":a(`refresh`),children:(0,G.jsx)(Qr,{size:15})})}),(0,G.jsx)(Aj.Content,{children:a(`refresh`)})]}),(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,onPress:()=>i(r===`zh`?`en`:`zh`),"aria-label":r===`zh`?`English`:`中文`,children:(0,G.jsx)(ia,{size:15})})}),(0,G.jsx)(Aj.Content,{children:r===`zh`?`English`:`中文`})]}),(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,onPress:d,"aria-label":u===`dark`?`Light mode`:`Dark mode`,children:u===`dark`?(0,G.jsx)(Qa,{size:15}):(0,G.jsx)(ba,{size:15})})}),(0,G.jsx)(Aj.Content,{children:u===`dark`?`Light mode`:`Dark mode`})]}),(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,onPress:()=>{l(),f(`/login`,{replace:!0})},"aria-label":a(`signOut`),children:(0,G.jsx)(Ba,{size:15})})}),(0,G.jsx)(Aj.Content,{children:a(`signOut`)})]})]})]})})}function _I({update:e}){let{t}=GF(),{info:n,submitting:r,reloadIn:i,elapsed:a,readyToApply:o,busy:s,justUpdated:c,targetVersion:l,newerThanPrepared:u,updateStateText:d,canPrepare:f,canApply:p,canCancel:m,primaryLabel:h,statusHint:g,prepareUpdate:_,confirmUpdate:v,cancelPreparedUpdate:y}=e;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{className:`grid overflow-hidden rounded-lg bg-surface-secondary sm:grid-cols-[1fr_auto_1fr]`,children:[(0,G.jsxs)(`div`,{className:`p-4`,children:[(0,G.jsx)(`div`,{className:`text-caption font-medium text-muted`,children:t(`currentVersion`)}),(0,G.jsx)(`div`,{className:`mono mt-2 text-section font-semibold`,children:n?.current_version||`—`})]}),(0,G.jsx)(`div`,{className:`hidden items-center border-x border-separator px-4 text-muted sm:flex`,children:(0,G.jsx)(Xr,{size:18})}),(0,G.jsxs)(`div`,{className:`border-t border-separator p-4 sm:border-t-0`,children:[(0,G.jsx)(`div`,{className:`text-caption font-medium text-muted`,children:t(`latestVersion`)}),(0,G.jsx)(`div`,{className:`mono mt-2 text-section font-semibold`,children:n?.next_version||`—`})]})]}),(0,G.jsxs)(`div`,{className:`mt-5 flex flex-wrap items-center justify-end gap-3`,children:[m?(0,G.jsx)(J,{size:`sm`,variant:`ghost`,isDisabled:r,onPress:()=>void y(),children:t(o?`discardPreparedImage`:`cancelUpdate`)}):null,(0,G.jsxs)(J,{isDisabled:!f&&!p||i!=null,isPending:r||s||i!=null,onPress:()=>void(p?v():_()),children:[(0,G.jsx)(Xr,{size:16}),h]})]}),!n?.agent?.available&&!s?(0,G.jsx)(`p`,{className:`mt-3 text-right text-caption text-muted`,children:t(`updateUnavailableHint`)}):null,n?.agent?.available&&!n.agent.staged_update&&!s?(0,G.jsx)(`p`,{className:`mt-3 text-right text-caption text-muted`,children:t(`updateLegacyOneShotHint`)}):null,o||s||i!=null||c?(0,G.jsxs)(`div`,{className:`mt-4 rounded-lg border px-3 py-3 border-separator bg-surface-secondary`,role:`status`,"aria-live":`polite`,children:[d?(0,G.jsxs)(`p`,{className:`text-caption font-medium text-foreground`,children:[d,l?` · ${l}`:``,a?` · ${t(`updateElapsed`,{seconds:a})}`:``]}):null,(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:g}),u?(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-warning`,children:t(`updateNewerReleaseHint`,{latest:n?.next_version||``})}):null,n?.update?.error||n?.agent?.error?(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-danger`,children:n?.update?.error||n?.agent?.error}):null]}):null]})}function vI({status:e=`danger`,title:t,description:n}){return(0,G.jsxs)(mP,{status:e,children:[(0,G.jsx)(mP.Indicator,{}),(0,G.jsxs)(mP.Content,{children:[(0,G.jsx)(mP.Title,{children:t}),n?(0,G.jsx)(mP.Description,{children:n}):null]})]})}function bse(e=!1){return QF(`/api/system/update${e?`?force=1`:``}`)}function yI(){return QF(`/api/system/settings`)}function bI(e){return QF(`/api/system/settings`,{method:`PATCH`,body:JSON.stringify(e)})}function xse(){return QF(`/api/system/update/prepare`,{method:`POST`,body:`{}`})}function Sse(){return QF(`/api/system/update/apply`,{method:`POST`,body:`{}`})}function Cse(){return QF(`/api/system/update/cancel`,{method:`POST`,body:`{}`})}function wse(e){return QF(`/api/system/update/rollback`,{method:`POST`,body:JSON.stringify({version:e})})}function Tse(){return QF(`/api/system/resources`)}var xI=new Set([`preparing`,`preparing_image`,`checking`,`backing_up`,`submitting`,`running`,`queued`,`pulling`,`host_binary`,`image_ready`,`recreating`,`rolling_back`]),Ese=new Set([`backing_up`,`running`]),Dse=new Set([`recreating`,`rolling_back`]),Ose=new Set([`queued`,`pulling`,`host_binary`,`image_ready`,`preparing`,`recreating`,`checking`,`rolling_back`]);function SI(){let{t:e}=GF(),[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(!0),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)(``),[d,f]=(0,v.useState)(null),[p,m]=(0,v.useState)(null),[h,g]=(0,v.useState)(()=>Date.now()),[_,y]=(0,v.useState)(``),b=(0,v.useCallback)(async(t=!1,r=!1)=>{t&&!r&&o(!0);try{let i=await bse(t);n(i),y(e=>e||i.current_version||``),i.update?.state===`failed`||i.update?.state===`rolled_back`||i.agent?.state===`failed`||i.agent?.state===`rolled_back`?u(i.update?.error||i.agent?.error||e(`updateFailedHint`)):r||u(``)}catch(t){r||u(t instanceof Error?t.message:e(`updateCheckFailedHint`))}finally{i(!1),t&&!r&&o(!1)}},[e]);(0,v.useEffect)(()=>{let e=window.setTimeout(()=>void b(!1),0);return()=>window.clearTimeout(e)},[b]);let x=t?.agent?.state||`unavailable`,S=t?.update?.state||``,C=Ese.has(S)||Dse.has(x)||!!(t?.update?.backup_path&&xI.has(S)),w=!C&&(S===`ready_to_apply`||x===`ready_to_apply`),T=!!d?.job_id&&t?.update?.job_id!==d?.job_id&&!w&&!C,E=!C&&!w&&(xI.has(S)||xI.has(x)||T),D=E||C,O=!!((S===`succeeded`||x===`succeeded`)&&_&&t?.current_version&&t.current_version!==_);O&&p==null&&m(3);let k=t?.update?.target_version||t?.agent?.target_version||``,A=!!(w&&t?.next_version&&k&&t.next_version!==k),j=t?.update?.started_at||t?.agent?.started_at,M=j&&D?Math.max(0,Math.round((h-Date.parse(j))/1e3)):0,N=O?`succeeded`:w?`ready_to_apply`:D&&Ose.has(x)?x:S||x,P=N?e(`updateState_${N}`):``,F=P.startsWith(`updateState_`)?N:P;(0,v.useEffect)(()=>{if(p!=null||!D&&!O)return;let e=window.setInterval(()=>void b(!1,!0),2e3);return()=>window.clearInterval(e)},[D,O,b,p]),(0,v.useEffect)(()=>{if(!D)return;let e=window.setInterval(()=>g(Date.now()),1e3);return()=>window.clearInterval(e)},[D]),(0,v.useEffect)(()=>{if(p==null)return;if(p<=0){window.location.reload();return}let e=window.setTimeout(()=>m(e=>e==null?e:e-1),1e3);return()=>window.clearTimeout(e)},[p]);let I=!!(t?.managed&&t?.has_update&&t?.next_version&&t?.agent?.available&&!w&&!D&&!s&&p==null),L=!!(w&&t?.agent?.available&&!C&&!s&&p==null),R=!!(t?.agent?.available&&(E||w)&&!C&&!s&&p==null),z=!!(t?.managed&&t?.agent?.available&&(t.rollback_versions?.length??0)>0&&!w&&!D&&!s&&p==null),B=p==null?e(L?`applyUpdateNow`:C?`updateInProgress`:E||s?`updatePreparingImage`:`updateNow`):e(`updateReloadingIn`,{seconds:p}),V=p==null?w?e(`updateReadyTargetHint`,{version:k||t?.next_version||``}):e(C?`updateApplyingHint`:`updatePreparingImageHint`):e(`updateReloadingHint`);async function H(){c(!0),f(null),u(``);try{let e=await xse();f(e),await b(!1,!0)}catch(t){u(t instanceof Error?t.message:e(`updateFailedHint`)),await b(!1,!0)}finally{c(!1)}}async function ee(){c(!0),u(``);try{let e=await Sse();f(e),await b(!1,!0)}catch(t){u(t instanceof Error?t.message:e(`updateFailedHint`)),await b(!1,!0)}finally{c(!1)}}async function te(t){c(!0),f(null),u(``);try{let e=await wse(t);f(e),await b(!1,!0)}catch(t){u(t instanceof Error?t.message:e(`updateFailedHint`)),await b(!1,!0)}finally{c(!1)}}async function ne(){c(!0),u(``);try{await Cse(),f(null),await b(!0,!0)}catch(t){u(t instanceof Error?t.message:e(`updateFailedHint`)),await b(!1,!0)}finally{c(!1)}}return{info:t,loading:r,checking:a,submitting:s,error:l,setError:u,reloadIn:p,load:b,elapsed:M,readyToApply:w,busy:D,justUpdated:O,targetVersion:k,newerThanPrepared:A,updateStateText:F,canPrepare:I,canApply:L,canCancel:R,canRollback:z,primaryLabel:B,statusHint:V,prepareUpdate:H,confirmUpdate:ee,cancelPreparedUpdate:ne,rollbackTo:te}}var kse=/^(#{1,3})\s+(english|en|中文|chinese|zh|zh-cn|zh-hans)\s*$/i,Ase=/`([^`]+)`|\*\*([^*]+)\*\*|\[([^\]]+)\]\((https?:\/\/[^)\s]+)\)/g,jse=new Set([`中文`,`chinese`,`zh`,`zh-cn`,`zh-hans`]),Mse=new Set([`english`,`en`]);function Nse(e,t){let n=e.trim().toLowerCase();return t===`zh`?jse.has(n):Mse.has(n)}function Pse(e){let t=e.split(/\r?\n/),n=[];return t.forEach((e,t)=>{let r=kse.exec(e.trim());r&&n.push({index:t,title:r[2]})}),n.length?n.map((e,r)=>{let i=e.index+1,a=r+1Nse(e,t));return i?i[1].trim():r[0]?.[1]?.trim()||n}function Fse(e){let t=[],n=0;for(let r of e.matchAll(Ase)){let i=r.index??0;i>n&&t.push({type:`text`,value:e.slice(n,i)}),r[1]==null?r[2]==null?r[3]!=null&&r[4]!=null&&t.push({type:`link`,value:r[3],href:r[4]}):t.push({type:`strong`,value:r[2]}):t.push({type:`code`,value:r[1]}),n=i+r[0].length}return n to {let e=a.current,t=o.current;if(!e||!t)return;let n=n=>{let r=e.querySelector(`[data-selected="true"]`);if(!r){Z.set(t,{autoAlpha:0});return}let i=e.getBoundingClientRect(),a=r.getBoundingClientRect();Z.to(t,{x:a.left-i.left,y:a.top-i.top,width:a.width,height:a.height,autoAlpha:1,duration:n?WB(BB.base):0,ease:VB.out,overwrite:!0})};n(s.current),s.current=!0;let r=new ResizeObserver(()=>n(!1));return r.observe(e),()=>{r.disconnect(),Z.killTweensOf(t)}},[e,n]),(0,G.jsxs)(`div`,{ref:a,className:`filter-toggle relative inline-flex ${i??``}`,children:[(0,G.jsx)(`span`,{ref:o,"aria-hidden":!0,className:`filter-toggle__pill pointer-events-none absolute left-0 top-0 opacity-0`}),(0,G.jsx)(pj,{"aria-label":r,size:`sm`,selectionMode:`single`,disallowEmptySelection:!0,selectedKeys:new Set([e]),onSelectionChange:n=>{let r=[...n][0];typeof r==`string`&&r!==e&&t(r)},children:n.map(e=>(0,G.jsxs)(aA,{id:e.id,className:`relative z-[1]`,style:_le,children:[e.icon,e.label]},e.id))})]})}function TV(e,t=!1){if(!e)return;let n=e.toDate(kw());if(Number.isFinite(n.getTime()))return t&&n.setSeconds(59,999),n.toISOString()}function EV(e){if(!e)return null;let t=Date.parse(e);if(!Number.isFinite(t))return null;try{return Yw(kre(new Date(t).toISOString()))}catch{return null}}function DV({value:e,onChange:t,ariaLabel:n,fromLabel:r,toLabel:i,className:a}){return(0,G.jsx)(Pk,{className:a,granularity:`minute`,hourCycle:24,shouldForceLeadingZeros:!0,value:e,onChange:e=>t(e),"aria-label":n,children:({state:e})=>(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(vO.Group,{className:`w-full min-w-0`,variant:`secondary`,children:[(0,G.jsx)(vO.Input,{className:`min-w-0`,slot:`start`,"aria-label":r,children:e=>(0,G.jsx)(vO.Segment,{segment:e})}),(0,G.jsx)(Pk.RangeSeparator,{}),(0,G.jsx)(vO.Input,{className:`min-w-0`,slot:`end`,"aria-label":i,children:e=>(0,G.jsx)(vO.Segment,{segment:e})}),(0,G.jsx)(vO.Suffix,{children:(0,G.jsx)(Pk.Trigger,{children:(0,G.jsx)(Pk.TriggerIndicator,{})})})]}),(0,G.jsxs)(Pk.Popover,{className:`flex w-[20.5rem] max-w-[calc(100vw-2rem)] flex-col gap-3 p-3`,children:[(0,G.jsxs)(HF,{"aria-label":n,children:[(0,G.jsxs)(HF.Header,{children:[(0,G.jsxs)(HF.YearPickerTrigger,{children:[(0,G.jsx)(HF.YearPickerTriggerHeading,{}),(0,G.jsx)(HF.YearPickerTriggerIndicator,{})]}),(0,G.jsx)(HF.NavButton,{slot:`previous`}),(0,G.jsx)(HF.NavButton,{slot:`next`})]}),(0,G.jsxs)(HF.Grid,{children:[(0,G.jsx)(HF.GridHeader,{children:e=>(0,G.jsx)(HF.HeaderCell,{children:e})}),(0,G.jsx)(HF.GridBody,{children:e=>(0,G.jsx)(HF.Cell,{date:e})})]}),(0,G.jsx)(HF.YearPickerGrid,{children:(0,G.jsx)(HF.YearPickerGridBody,{children:({year:e})=>(0,G.jsx)(HF.YearPickerCell,{year:e})})})]}),(0,G.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,G.jsx)(kM,{className:`text-xs`,children:r}),(0,G.jsx)(Yk,{"aria-label":r,granularity:`minute`,hourCycle:24,value:e.timeRange?.start??null,onChange:t=>e.setTimeRange({start:t,end:e.timeRange?.end}),children:(0,G.jsx)(Yk.Group,{className:`w-[7.5rem]`,variant:`secondary`,children:(0,G.jsx)(Yk.Input,{children:e=>(0,G.jsx)(Yk.Segment,{segment:e})})})})]}),(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,G.jsx)(kM,{className:`text-xs`,children:i}),(0,G.jsx)(Yk,{"aria-label":i,granularity:`minute`,hourCycle:24,value:e.timeRange?.end??null,onChange:t=>e.setTimeRange({start:e.timeRange?.start,end:t}),children:(0,G.jsx)(Yk.Group,{className:`w-[7.5rem]`,variant:`secondary`,children:(0,G.jsx)(Yk.Input,{children:e=>(0,G.jsx)(Yk.Segment,{segment:e})})})})]})]})]})]})})}var OV={today:`statsWindowToday`,1:`statsWindow1h`,24:`statsWindow24h`,168:`statsWindow7d`,720:`statsWindow30d`,custom:`statsWindowCustom`};function kV(e,t){if(e===`today`){let e=new Date;return e.setHours(0,0,0,0),{from:e.toISOString()}}if(e===`custom`){let e=TV(t?.start),n=TV(t?.end,!0);return e&&n?{from:e,to:n}:null}if(e===`720`){let e=new Date;return{from:new Date(e.getTime()-2592e6).toISOString(),to:e.toISOString()}}return{hours:Number(e)}}function AV({value:e,onChange:t,custom:n,onCustomChange:r,onBusy:i,t:a}){return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(wV,{value:e,onChange:r=>{let a=r;e!==a&&((a!==`custom`||n)&&i?.(),t(a))},ariaLabel:a(`statsTraffic`),options:Object.keys(OV).map(e=>({id:e,label:a(OV[e])}))}),e===`custom`?(0,G.jsx)(DV,{className:`w-[min(100%,24rem)]`,value:n,onChange:e=>{e&&i?.(),r(e)},ariaLabel:a(`statsWindowCustom`),fromLabel:a(`logsTimeFrom`),toLabel:a(`logsTimeTo`)}):null]})}function jV(e,t,n){let r=new URLSearchParams;for(let[t,n]of Object.entries(e))n&&r.set(t,n);let i=Date.parse(t),a=Date.parse(n);return Number.isFinite(i)&&Number.isFinite(a)&&(r.set(`from`,new Date(Math.floor(i/6e4)*6e4).toISOString()),r.set(`to`,new Date(Math.ceil(a/6e4)*6e4-6e4).toISOString())),`/logs?${r}`}function MV(e){let t=String(e||``).toLowerCase();return!t||t===`qoder`||t===`qoder-global`||t===`qoder-cn`}function NV(e){return String(e||``).toLowerCase()===`workbuddy`}function PV(e){return String(e||``).toLowerCase()===`trae`}function FV(e){return String(e||``).toLowerCase()===`devin`}function IV(e){return String(e||``).toLowerCase()===`command`}function LV(e){return String(e||``).toLowerCase()===`zhipu`}function RV(e){return String(e||``).toLowerCase()===`qwenwork`}function zV(e){return String(e||``).toLowerCase()===`kimi`}function BV(e){return String(e||``).toLowerCase()===`codearts`}function VV(e){let t=String(e||``).toLowerCase();return t===`meta`||t===`muse`}function HV(e,t){let n=String(e||``).toLowerCase();return NV(n)?`WorkBuddy`:PV(n)?`Trae`:FV(n)?`Devin`:IV(n)?`Command Code`:LV(n)?`Zhipu GLM`:RV(n)?`QwenWork`:zV(n)?`Kimi Code`:BV(n)?`CodeArts`:VV(n)?`Muse (Meta)`:MV(n)?`Qoder`:e||t(`account`)}function UV(e,t,n){let r=String(e||``).toLowerCase(),i=String(t||``).toLowerCase();return NV(r)?n(i===`global`?`accountTypeWorkBuddyGlobal`:`accountTypeWorkBuddyCN`):PV(r)?n(`accountTypeTraeCN`):FV(r)?n(`accountTypeDevinGlobal`):IV(r)?n(`accountTypeCommandGlobal`):LV(r)?n(`accountTypeZhipuCN`):RV(r)?n(i===`cn`?`accountTypeQwenworkCN`:`accountTypeQwenworkGlobal`):zV(r)?n(`accountTypeKimiCN`):BV(r)?n(`accountTypeCodeArtsCN`):VV(r)?n(`accountTypeMetaGlobal`):MV(r)?n(i===`cn`?`accountTypeQoderCN`:`accountTypeQoderGlobal`):e||n(`account`)}function vle(e,t){let n=t??!!e.max_mode,r=e.catalog_context_length||e.default_context_length||e.context_length||0,i=e.catalog_context_length_max||0;return n&&i>0?{context_length:i,prompt_max_tokens:e.prompt_max_tokens_max||e.prompt_max_tokens,max_output_tokens:e.max_output_tokens_max||e.max_output_tokens}:{context_length:r,prompt_max_tokens:e.prompt_max_tokens,max_output_tokens:e.max_output_tokens}}function yle({size:e=16,className:t=``}){return(0,G.jsx)(`span`,{className:`inline-flex shrink-0 items-center justify-center rounded-[22%] bg-[#0a84ff] text-white ${t}`.trim(),style:{width:e,height:e,fontSize:Math.max(9,Math.round(e*.55)),fontWeight:650,lineHeight:1},"aria-hidden":`true`,children:`C`})}function ble({size:e=16,className:t=``}){return(0,G.jsx)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,className:`block shrink-0 text-foreground ${t}`.trim(),"aria-hidden":`true`,children:(0,G.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M8.086.457a6.1 6.1 0 0 1 3.046-.415q2 .23 3.564 1.7a.12.12 0 0 0 .107.029q2.112-.519 4.061.366l.063.03l.154.076q2.036 1.055 2.918 3.198a5.6 5.6 0 0 1 .421 2.126 5.7 5.7 0 0 1-.18 1.631.17.17 0 0 0 .04.155 6 6 0 0 1 1.578 2.891q.577 2.852-1.183 5.14l-.182.22a6.06 6.06 0 0 1-2.934 1.851.16.16 0 0 0-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451q-2.374-.012-4.21-1.736a.14.14 0 0 0-.14-.032 5.9 5.9 0 0 1-1.604-.185 5.9 5.9 0 0 1-2.595-.622 6.06 6.06 0 0 1-2.146-1.781c-.203-.269-.404-.522-.551-.821a8 8 0 0 1-.495-1.283 6.1 6.1 0 0 1-.017-3.064.2.2 0 0 0 .008-.074.1.1 0 0 0-.037-.064 6 6 0 0 1-1.38-2.202 5.2 5.2 0 0 1-.333-1.589 6.9 6.9 0 0 1 .188-2.132q.675-2.226 2.577-3.493.424-.282.802-.438.429-.179.861-.304a.13.13 0 0 0 .087-.087A6 6 0 0 1 5.635 2.31Q6.655 1.04 8.086.457m-.804 7.85a.848.848 0 0 0-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 0 0 1.46.864l1.94-3.272a.85.85 0 0 0 .007-.854zm5.446 6.24a.849.849 0 0 0 0 1.695h4.848a.849.849 0 0 0 0-1.696z`})})}function xle({size:e=16,className:t=``}){return(0,G.jsx)(`span`,{className:`inline-flex shrink-0 items-center justify-center rounded-[22%] bg-[#1a1a1a] text-white ${t}`.trim(),style:{width:e,height:e,fontSize:Math.max(9,Math.round(e*.55)),fontWeight:650,lineHeight:1},"aria-hidden":`true`,children:`D`})}var Sle=`/assets/kiro-mark-dark-DwOgnaUN.webp`,Cle=`/assets/kiro-mark-light-CV-MOfJu.webp`;function wle({size:e=16,className:t=``}){let n=`block shrink-0 ${t}`.trim();return(0,G.jsxs)(`span`,{className:`inline-flex shrink-0`,style:{width:e,height:e},"aria-hidden":`true`,children:[(0,G.jsx)(`img`,{src:Cle,alt:``,width:e,height:e,className:`${n} dark:hidden`,draggable:!1}),(0,G.jsx)(`img`,{src:Sle,alt:``,width:e,height:e,className:`${n} hidden dark:block`,draggable:!1})]})}function Tle({size:e=16,className:t=``}){return(0,G.jsx)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,className:`block shrink-0 text-foreground ${t}`.trim(),"aria-hidden":`true`,children:(0,G.jsx)(`path`,{fill:`currentColor`,d:`M21 12.79A9 9 0 1 1 11.21 3a7 7 0 0 0 9.79 9.79Z`})})}function Ele({size:e=16,className:t=``}){return(0,G.jsx)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,className:`block shrink-0 text-foreground ${t}`.trim(),"aria-hidden":`true`,children:(0,G.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,d:`M8 6a4 4 0 0 0 0 8c.9 0 1.7-.3 2.4-.8L14 16.8A4 4 0 1 0 16 8a3.9 3.9 0 0 0-2.4.8L10 5.2A4 4 0 0 0 8 6Zm0 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm8 4a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z`,clipRule:`evenodd`})})}var Dle=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAYAAAA9zQYyAAAJ5ElEQVR42u2dXUxUZxrH/wKDDDCM4CJBZJZNxMpGDMGYXsAWeikapF6Jqc02kUhWTWsTIQHjNk22yWCyN5INrk22rbsc71ZNpXfb0sJ+Gcxmma2mNpt1XMsaLd2ZoY7D5164btfiBx8zzDnv+f1uiWeG9/x8eN7neT9WFRaunROAIWQwBIDQAAgNgNAACA0IDYDQAAgNgNAACA0IDYDQAAgNgNAACA0IDYDQAAgNgNAACA0IDYDQAAgNgNAACA0IDYDQAAgNgNAA35LFEDyZ6uotKi8PqL6+ToFAuQoK/PL7/fL7CyRJ4fBNRaMRhcM3FQ6HFQqFNDoaUiQSYfDSxCqO031U4Lq6OjU1Nam6eov8fv+inxGJRDQ6GtLAwIAs6xxyI/TK0tTUpJ07d6iurk6BQCCpz45EIurrO62+vtOIjdCpIxAIqLPzWEokRmyEXjHq6+vU0dGh+vq6tHw+YiN00iJyb++ptImM2Aid1NSitbXVlt8vEomoq+u4LMvCRIR+Oq2trersPLYiOfJyCYfD6u4+rkuXBjASoZ0VlZ/G0NCwenp6NDQ0jJkI/aCOfPbs+46IyogtWt9Po739oAYHP3a8zNKDaszFixd08eIF20xkidArSGdnhzo7O4x9SZZlKRg8qXA4jLGmC/322z9Te/tBV7ysvr7TCgZ7KPWZKnRv7ynt29fqqhdGDdtQod0oM2IbKrSb0gzEXhyZXm/um06bAL7++muY/F9ycnJUX1+nPXteUiQSVSgUIkI75cvu29eq3t5TWKyndx0PHz7i2hq2Y4QOBAIaHPxoSYvu3YhbmzOOENrv92tw8CMjmiaILTqFnZ0dyKzldx2rq7cQoe3yQkB0HZ0uNKlG6ggGe4ws9dlaaOrNSyM2e0+3pu4oOntPX07dnffzzasDKvMUazY2ZVwN27ZCV1dv0eDgx9i5AK4lbuhy/Joux6/q1vRdXUvcWNC/K8sq1nbvZpXeX6N/9X+m3/zyrOPFtq3QLJ18egT+c/yqfjcx8j+Jk8GmyfWaOPOFRt4bRGgmgqnnfPRTnY99osvxayn9nJmxuKI/v6r7g7cRmuicXG5N3dEvxn+b1Ei8UCZHxvXvt/6qmbE4QhOdkyPy+dinaf0ec7Fpxd65rm+sf4jDGpdAR0eH3L4Ww7LO6Z2KQWVvK0p/xPNlqeBolTLyPYqduS46hVpc3dnNqYZlWWpublEw2GO775bftlFrTmwlQmuRG13dGpWDwZO2P3DGu6tMM2NxW0dqhE4zo6Mh7d//imNa0fltGyXJtlJn2Gky6LalocFgjxoaGh23riK/baMt8ntbC93U1OQqmbu6um2ZKy+UNSe2KsPnQWg98Sy6vXLLHsD9+19RX99pR/8emaVe5R/YiNB6wm4UN6QbkUhEzc27jTmUMa+1QpmlXoSen27scI3Mo6NmbWL1tVUitB6zss50TJRZelDKs1OUtoXQdXVmN1MOHz5ipMwPyWksQWj9X3fQ5B0pwWCP+vvNPqE/b28FQn87ISw39kX391uOLs1pERUPz6YChJak8vKAse3s7u7jcgvZtUUIbWqEflhrdtNZczkNJQj9MIc2MW82eRL4OEg5DBV6aGjY8V1ALXHddOZ6L0L7/QUyrUTnVrJKcxHatFTDzfeg2KHBgtBJPng8aS/GhivZENpl0TmZVY1VviwGFaGVtpqzGyeCRGiZe91a0l9MvoeBRej05M6WdS65L8XnIeVA6PRF52R3BO22aB6hSTdkQtcNoeW++0tSsV4ja5OPwUVopeGko3MyeV0EQrtsMjgwkJrNrp5KhEboFWZ4ODXpRva2IiocCJ2e/DkVrK5dy+Ai9MozMPBhSp5r1yO2EFpmt7pTsaouw+exzVYmhHYRoVDI+N3TCE3+LFP25SG061KOmynJnWmoILQxKYfdzohDaLmrqaIkL0ZiMojQxghNdDZI6Egk6riSXbKjs3dXGSaaI3TE1S9gzU+3YiFCm0H2tiJyZ9OETkUJzEkX74BhQkej7ozQvrZKtlqZKLTbDjWUHizgf3iBJRiYQ7tJ6gyfR/4T1Zhnch06FBp1zYDnt21ki5XpQg8N/d4Vg+3dVcaKOjcIPTw8LDfkzf6jP8Q4NwgdDodTtuFUNjnzrfBkLXsF3bSW49KlD42VeW3f85To3Ca0ZVnGHRaOzC5fbRcMnkRmMEdoU6I0MiO0MVEamRF6XpS2LGfejZ3XWqHiX9cjM0LPj9JOSz0K3qhSwdEqSnMIrcfWpZubWxyxVjqz1Kt1FxrpACL0QqTebWupfW2VWnehkRQDobXgpaXd3cdtJ3Xurg1ad6GRJaAIvXj6+y01N++2TU6dWeqV/0Q1URmhlxepm5tbUnYEFyB02nLqrq5u1+8UB4MOmunrO62amtqkX0UMCK10btsKBnvSInZBZh7WIHRqxW5oeHHFuou+jFysQejU59eHDh1RTU3tikwcN6/+PuYg9MpNHJubd6dU7LKs72EOQmtFT9hPpdjPrQ5gDkKbI/Z2bxXmIHT6xT506EhSOo5V5NAILZusta6pqV12c8aXkavt3s3Yg9AypjnT4nsBexBaxjRniNAI7QixF0qZp1gtvh9hEELbX+yFdh1/UvQSA4fQckTXsaGh8ZmlPqI0QjuGB2uwn13DJkojtExqzpR5ipEaoZ0t9nebM4eK9rC+Q9LMWByhnSh2TU3tvK7jr8q6XC+1HYTO9Hpz30RTLekCe8s6p0QioerqLSrOLdJ2b5U+nPijJuembP3d52LTWrU6I+nPjAT/prnJWYR2KolEQsPDw3r33feUSCT0Yk29NuSV6HL8qm2ljn9wS18f/4vuf3JbWaW5ylyfnN3r37z/dyX+cCftv9+qwsK1c6iZHPx+v9rbD6rx1R16baJXsdl7tkoHIm+NKjHylb57m63vQKWytxUt69l3Xx7WbGwKoU0V++U3XtVnLfd1LXEj7SJPnPlC9z745zPPG8ndtUF5eysWdT7fzFhcXx+7oqnPo7YYe4ROIYUb1ir/QKWmmwpX/LMnR8YVv3TrmSI/7h7FvL0VCxJ7Ziyur9r/ZIvJIEKvID94/jlFf7xmWX/WFxotJ0fGFTtzfdmSZfg88u4sU05DiTybCh6Re6n/WRDaMLK3FSmnoUS5Ozck7djdyZFx3R+8rckr4yn9s/9w8jjzZdzWY4zQSs/1yFmbfMppKFHOCyULrjTMxaY19XlUU9ejmhwZ1+SVcVtMxBAa5gmeWepVZqlXGT7PIz+bjU1pbmJa02P3bB8dERqA1jcAQgNCAyA0AEIDIDQAQgNCAyA0AEIDIDQAQgNCAyA0AEIDIDQAQgNCAyA0AEIDIDQgNABCAyA0AEIDIDQgNABCAyA0AEIDLIj/ABWOKFxbGBRBAAAAAElFTkSuQmCC`;function Ole({size:e=16,className:t=``}){return(0,G.jsx)(`img`,{src:Dle,alt:``,width:e,height:e,className:`block shrink-0 rounded-[22%] ${t}`.trim(),draggable:!1})}function kle({size:e=16,className:t=``}){let n=Math.max(2,Math.round(e*.14));return(0,G.jsxs)(`span`,{className:`inline-flex shrink-0 items-baseline justify-center rounded-[22%] bg-[#18181B] text-white ${t}`.trim(),style:{width:e,height:e,fontSize:Math.max(9,Math.round(e*.5)),fontWeight:650,lineHeight:1},"aria-hidden":`true`,children:[(0,G.jsx)(`span`,{style:{alignSelf:`center`},children:`Q`}),(0,G.jsx)(`span`,{style:{alignSelf:`center`,width:n,height:n,marginLeft:Math.max(0,Math.round(e*.03)),borderRadius:`50%`,background:`#22D3EE`}})]})}function Ale({size:e=16,className:t=``}){return(0,G.jsx)(`span`,{className:`inline-flex shrink-0 items-center justify-center rounded-[22%] bg-[#1a1a1a] text-white ${t}`.trim(),style:{width:e,height:e,fontSize:Math.max(9,Math.round(e*.55)),fontWeight:650,lineHeight:1},"aria-hidden":`true`,children:`T`})}var jle=`/assets/workbuddy-mark-D1Gu2IKl.svg`;function Mle({size:e=16,className:t=``}){return(0,G.jsx)(`img`,{src:jle,alt:``,width:e,height:e,className:`block shrink-0 ${t}`.trim(),draggable:!1})}function Nle({size:e=16,className:t=``}){return(0,G.jsx)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,className:`block shrink-0 text-foreground ${t}`.trim(),"aria-hidden":`true`,children:(0,G.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,d:`M11.991 23.503a.24.24 0 0 0-.244.248a.24.24 0 0 0 .244.249a.24.24 0 0 0 .245-.249a.24.24 0 0 0-.22-.247zM9.671 5.365a1.697 1.697 0 0 1 1.099 2.132l-.071.172l-.016.04l-.018.054c-.07.16-.104.32-.104.498c-.035.71.47 1.279 1.186 1.314h.366c1.309.053 2.338 1.173 2.286 2.523c-.052 1.332-1.152 2.38-2.478 2.327h-.174c-.715.018-1.274.64-1.239 1.368c0 .124.018.23.053.337c.209.373.54.658.96.8c.75.23 1.517-.125 1.9-.782l.018-.035c.402-.64 1.17-.96 1.92-.711c.854.284 1.378 1.226 1.099 2.167a1.66 1.66 0 0 1-2.077 1.102a1.7 1.7 0 0 1-.907-.711l-.017-.035c-.2-.323-.463-.58-.851-.711l-.056-.018a1.646 1.646 0 0 0-1.954.746a1.66 1.66 0 0 1-1.065.764a1.677 1.677 0 0 1-1.989-1.279c-.209-.906.332-1.83 1.257-2.043a1.5 1.5 0 0 1 .296-.035h.018c.68-.071 1.151-.622 1.116-1.333a1.3 1.3 0 0 0-.227-.693a2.5 2.5 0 0 1-.366-1.403a2.4 2.4 0 0 1 .366-1.208c.14-.195.21-.444.227-.693c.018-.71-.506-1.261-1.186-1.332l-.07-.018a1.4 1.4 0 0 1-.299-.07l-.05-.019a1.7 1.7 0 0 1-1.047-2.114a1.68 1.68 0 0 1 2.094-1.101m-5.575 10.11c.26-.264.639-.367.994-.27s.633.379.728.74c.095.362-.007.748-.267 1.013c-.402.41-1.053.41-1.455 0a1.06 1.06 0 0 1 0-1.482zm14.845-.294c.359-.09.738.024.992.297c.254.274.344.665.237 1.025s-.396.634-.756.718c-.551.128-1.1-.22-1.23-.781a1.05 1.05 0 0 1 .757-1.26zm-.064-4.39c.314.32.49.753.49 1.206s-.176.886-.49 1.206c-.315.32-.74.5-1.185.5c-.444 0-.87-.18-1.184-.5a1.727 1.727 0 0 1 0-2.412a1.654 1.654 0 0 1 2.369 0m-11.243.163c.364.484.447 1.128.218 1.691a1.665 1.665 0 0 1-2.188.923c-.855-.36-1.26-1.358-.907-2.228a1.68 1.68 0 0 1 1.33-1.038a1.66 1.66 0 0 1 1.547.652m11.545-4.221c.368 0 .708.2.892.524s.184.724 0 1.048a1.03 1.03 0 0 1-.892.524a1.04 1.04 0 0 1-1.03-1.048a1.04 1.04 0 0 1 1.03-1.048m-14.358 0c.368 0 .707.2.891.524s.184.724 0 1.048a1.03 1.03 0 0 1-.891.524a1.04 1.04 0 0 1-1.03-1.048c0-.579.461-1.048 1.03-1.048m10.031-1.475c.925 0 1.675.764 1.675 1.706s-.75 1.705-1.675 1.705s-1.674-.763-1.674-1.705s.75-1.706 1.674-1.706m-2.626-.684c.362-.082.653-.356.761-.718a1.06 1.06 0 0 0-.238-1.028a1.02 1.02 0 0 0-.996-.294c-.547.14-.881.7-.752 1.257c.13.558.675.907 1.225.783m0 16.876c.359-.087.644-.36.75-.72a1.06 1.06 0 0 0-.237-1.019a1.02 1.02 0 0 0-.985-.301a1.04 1.04 0 0 0-.762.717c-.108.361-.017.754.239 1.028c.245.263.606.377.953.305zM17.19 3.5a.63.63 0 0 0 .628-.64a.63.63 0 0 0-.628-.64a.63.63 0 0 0-.628.64c0 .355.28.64.628.64m-10.38 0a.63.63 0 0 0 .628-.64c0-.355-.28-.64-.628-.64a.63.63 0 0 0-.628.64c0 .355.279.64.628.64m-5.182 7.852a.63.63 0 0 0-.628.64c0 .354.28.639.628.639a.63.63 0 0 0 .627-.606l.001-.034a.62.62 0 0 0-.628-.64zm5.182 9.13a.63.63 0 0 0-.628.64c0 .355.279.64.628.64a.63.63 0 0 0 .628-.64c0-.355-.28-.64-.628-.64m10.38.018a.63.63 0 0 0-.628.64c0 .355.28.64.628.64a.63.63 0 0 0 .628-.64a.63.63 0 0 0-.628-.64m5.182-9.148a.63.63 0 0 0-.628.64c0 .354.279.639.628.639a.63.63 0 0 0 .628-.64c0-.355-.28-.64-.628-.64zm-.384-4.992a.24.24 0 0 0 .244-.249a.24.24 0 0 0-.244-.249a.24.24 0 0 0-.244.249c0 .142.122.249.244.249M11.991.497a.24.24 0 0 0 .245-.248A.24.24 0 0 0 11.99 0a.24.24 0 0 0-.244.249c0 .133.108.236.223.247zM2.011 6.36a.24.24 0 0 0 .245-.249a.24.24 0 0 0-.244-.249a.24.24 0 0 0-.244.249a.24.24 0 0 0 .244.249zm0 11.263a.24.24 0 0 0-.243.248a.24.24 0 0 0 .244.249a.24.24 0 0 0 .244-.249a.25.25 0 0 0-.244-.248zm19.995-.018a.24.24 0 0 0-.245.248a.24.24 0 0 0 .245.25a.24.24 0 0 0 .244-.25a.25.25 0 0 0-.244-.248z`})})}function WV({provider:e,size:t=16,className:n=``}){let r=String(e||``).toLowerCase();return r===`workbuddy`?(0,G.jsx)(Mle,{size:t,className:n}):r===`trae`?(0,G.jsx)(Ale,{size:t,className:n}):r===`devin`?(0,G.jsx)(xle,{size:t,className:n}):r===`command`?(0,G.jsx)(yle,{size:t,className:n}):r===`codex`?(0,G.jsx)(ble,{size:t,className:n}):r===`zhipu`?(0,G.jsx)(Nle,{size:t,className:n}):r===`qwenwork`?(0,G.jsx)(kle,{size:t,className:n}):r===`kimi`?(0,G.jsx)(Tle,{size:t,className:n}):r===`kiro`?(0,G.jsx)(wle,{size:t,className:n}):r===`meta`||r===`muse`?(0,G.jsx)(Ele,{size:t,className:n}):(0,G.jsx)(Ole,{size:t,className:n})}var Ple=(0,v.lazy)(()=>C(()=>import(`./LiveSparkline-13g_xCuL.js`).then(e=>({default:e.LiveSparkline})),[]));function Fle({live:e,samples:t,t:n,onConcurrencyClick:r}){let i=e?.in_flight??null,a=e?.capacity??0,o=i!=null&&a>0?i/a:0,s=a>0&&i!=null&&i>=a,c=(0,G.jsxs)(G.Fragment,{children:[n(`liveConcurrency`),(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,G.jsxs)(`span`,{className:`mono tabular text-body font-semibold ${s?`text-warning`:`text-foreground`}`,children:[i??`—`,(0,G.jsxs)(`span`,{className:`font-normal text-muted`,children:[`/`,e?a:`—`]})]}),(0,G.jsx)(`span`,{className:`inline-block h-[3px] w-12 overflow-hidden rounded-[2px] bg-separator`,children:(0,G.jsx)(`span`,{className:`block h-full ${s?`bg-warning`:`bg-foreground/60`}`,style:{width:`${Math.min(100,o*100)}%`}})})]})]});return(0,G.jsxs)(`div`,{"data-testid":`live-strip`,className:`flex min-h-11 flex-wrap items-center gap-x-5 gap-y-2 overflow-hidden rounded-lg bg-surface-secondary px-4 py-2.5 text-caption text-muted sm:h-11 sm:gap-x-6 sm:gap-y-1 sm:py-0`,children:[(0,G.jsx)(`span`,{className:`inline-flex items-center`,children:(0,G.jsx)(`span`,{className:`status-dot`,"data-state":i==null?``:s?`warn`:i>0?`ok`:``})}),r?(0,G.jsx)(`button`,{type:`button`,"data-testid":`live-strip-concurrency`,onClick:r,className:`inline-flex flex-col gap-1 rounded-md text-left outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-focus sm:flex-row sm:items-center sm:gap-2`,"aria-label":n(`inflightExpandFromConcurrency`),children:c}):(0,G.jsx)(`span`,{className:`inline-flex flex-col gap-1 sm:flex-row sm:items-center sm:gap-2`,children:c}),(0,G.jsxs)(`span`,{className:`inline-flex flex-col gap-1 sm:flex-row sm:items-center sm:gap-2`,children:[n(`liveRpm`),(0,G.jsx)(`span`,{className:`mono tabular text-body font-semibold text-foreground`,children:e?.rpm??`—`})]}),(0,G.jsxs)(`span`,{className:`inline-flex flex-col gap-1 sm:flex-row sm:items-center sm:gap-2`,children:[n(`liveTrace`),(0,G.jsx)(v.Suspense,{fallback:(0,G.jsx)(`span`,{className:`inline-block h-6 w-[120px]`}),children:(0,G.jsx)(Ple,{samples:t,capacity:a,label:n(`liveTrace`)})})]})]})}var Ile=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,Lle=/(?:(-)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,Rle=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/gi,zle=/(^[#\.][a-z]|[a-y][a-z])/i,Ble=Math.PI/180,Vle=180/Math.PI,GV=Math.sin,KV=Math.cos,qV=Math.abs,JV=Math.sqrt,Hle=Math.atan2,YV=1e8,XV=function(e){return typeof e==`string`},ZV=function(e){return typeof e==`number`},Ule=function(e){return e===void 0},Wle={},Gle={},QV=1e5,$V=function(e){return Math.round((e+YV)%1*QV)/QV||(e<0?0:1)},eH=function(e){return Math.round(e*QV)/QV||0},tH=function(e){return Math.round(e*1e10)/1e10||0},nH=function(e){return e.closed=Math.abs(e[0]-e[e.length-2])<.001&&Math.abs(e[1]-e[e.length-1])<.001},rH=function(e,t,n,r){var i=e[t],a=r===1?6:uH(i,n,r);if((a||!r)&&a+n+2t){for(;--i&&e[i]>t;);i<0&&(i=0)}else for(;e[++i] element or an SVG path data string`)}function Jle(e){for(var t=[],n=0;n-1;)a=r[i].nodeName.toLowerCase(),t.indexOf(`,`+a+`,`)<0&&n.setAttributeNS(null,a,r[i].nodeValue);return n},Zle={rect:`rx,ry,x,y,width,height`,circle:`r,cx,cy`,ellipse:`rx,ry,cx,cy`,line:`x1,x2,y1,y2`},Qle=function(e,t){for(var n=t?t.split(`,`):[],r={},i=n.length;--i>-1;)r[n[i]]=+e.getAttribute(n[i])||0;return r};function $le(e,t){var n=e.tagName.toLowerCase(),r=.552284749831,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T;return n===`path`||!e.getBBox?e:(l=Xle(e,`x,y,width,height,cx,cy,rx,ry,r,x1,x2,y1,y2,points`),T=Qle(e,Zle[n]),n===`rect`?(s=T.rx,c=T.ry||s,a=T.x,o=T.y,p=T.width-s*2,m=T.height-c*2,s||c?(h=a+s*(1-r),g=a+s,_=g+p,v=_+s*r,y=_+s,b=o+c*(1-r),x=o+c,S=x+m,C=S+c*r,w=S+c,i=`M`+y+`,`+x+` V`+S+` C`+[y,C,v,w,_,w,_-(_-g)/3,w,g+(_-g)/3,w,g,w,h,w,a,C,a,S,a,S-(S-x)/3,a,x+(S-x)/3,a,x,a,b,h,o,g,o,g+(_-g)/3,o,_-(_-g)/3,o,_,o,v,o,y,b,y,x].join(`,`)+`z`):i=`M`+(a+p)+`,`+o+` v`+m+` h`+-p+` v`+-m+` h`+p+`z`):n===`circle`||n===`ellipse`?(n===`circle`?(s=c=T.r,d=s*r):(s=T.rx,c=T.ry,d=c*r),a=T.cx,o=T.cy,u=s*r,i=`M`+(a+s)+`,`+o+` C`+[a+s,o+d,a+u,o+c,a,o+c,a-u,o+c,a-s,o+d,a-s,o,a-s,o-d,a-u,o-c,a,o-c,a+u,o-c,a+s,o-d,a+s,o].join(`,`)+`z`):n===`line`?i=`M`+T.x1+`,`+T.y1+` L`+T.x2+`,`+T.y2:(n===`polyline`||n===`polygon`)&&(f=(e.getAttribute(`points`)+``).match(Lle)||[],a=f.shift(),o=f.shift(),i=`M`+a+`,`+o+` L`+f.join(`,`),n===`polygon`&&(i+=`,`+a+`,`+o+`z`)),l.setAttribute(`d`,gH(l._gsRawPath=mH(i))),t&&e.parentNode&&(e.parentNode.insertBefore(l,e),e.parentNode.removeChild(e)),l)}function sH(e,t,n){var r=e[t],i=e[t+2],a=e[t+4],o;return r+=(i-r)*n,i+=(a-i)*n,r+=(i-r)*n,o=i+(a+(e[t+6]-a)*n-i)*n-r,r=e[t+1],i=e[t+3],a=e[t+5],r+=(i-r)*n,i+=(a-i)*n,r+=(i-r)*n,eH(Hle(i+(a+(e[t+7]-a)*n-i)*n-r,o)*Vle)}function cH(e,t,n){n=Ule(n)?1:tH(n)||0,t=tH(t)||0;var r=Math.max(0,~~(qV(n-t)-1e-8)),i=Jle(e);if(t>n&&(t=1-t,n=1-n,Kle(i),i.totalLength=0),t<0||n<0){var a=Math.abs(~~Math.min(t,n))+1;t+=a,n+=a}i.totalLength||lH(i);var o=n>1,s=dH(i,t,Wle,!0),c=dH(i,n,Gle),l=c.segment,u=s.segment,d=c.segIndex,f=s.segIndex,p=c.i,m=s.i,h=f===d,g=p===m&&h,_,v,y,b,x,S,C,w;if(o||r){for(_=dd)&&i.splice(b,1);else l.angle=sH(l,p+y,0),p+=y,s=l[p],c=l[p+1],l.length=l.totalLength=0,l.totalPoints=i.totalPoints=8,l.push(s,c,s,c,s,c,s,c);return i.totalLength=0,i}function eue(e,t,n){t||=0,e.samples||(e.samples=[],e.lookup=[]);var r=~~e.resolution||12,i=1/r,a=n?t+n*6+1:e.length,o=e[t],s=e[t+1],c=t?t/6*r:0,l=e.samples,u=e.lookup,d=(t?e.minLength:YV)||YV,f=l[c+n*r-1],p=t?l[c-1]:0,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A;for(l.length=u.length=0,h=t+2;h8&&(e.splice(h,6),h-=6,a-=6);else for(m=1;m<=r;m++)D=i*m,E=1-D,y=b-(b=(D*D*g+3*E*(D*_+E*v))*D),w=T-(T=(D*D*x+3*E*(D*S+E*C))*D),k=JV(w*w+y*y),k=1)return 0;var r=e[t],i=e[t+1],a=e[t+2],o=e[t+3],s=e[t+4],c=e[t+5],l=e[t+6],u=e[t+7],d=r+(a-r)*n,f=a+(s-a)*n,p=i+(o-i)*n,m=o+(c-o)*n,h=d+(f-d)*n,g=p+(m-p)*n,_=s+(l-s)*n,v=c+(u-c)*n;return f+=(_-f)*n,m+=(v-m)*n,e.splice(t+2,4,eH(d),eH(p),eH(h),eH(g),eH(h+(f-h)*n),eH(g+(m-g)*n),eH(f),eH(m),eH(_),eH(v)),e.samples&&e.samples.splice(t/6*e.resolution|0,0,0,0,0,0,0,0),6}function dH(e,t,n,r){n||={},e.totalLength||lH(e),(t<0||t>1)&&(t=$V(t));var i=0,a=e[0],o,s,c,l,u,d,f;if(!t)f=d=i=0,a=e[0];else if(t===1)f=1,i=e.length-1,a=e[i],d=a.length-8;else{if(e.length>1){for(c=e.totalLength*t,u=d=0;(u+=e[d++].totalLength)1)&&(t=$V(t)),i.lookup||lH(e),e.length>1){for(c=e.totalLength*t,u=d=0;(u+=e[d++].totalLength)=1?1-1e-9:f||1e-9):i.angle||0),a}function pH(e,t,n,r,i,a,o){for(var s=e.length,c,l,u,d,f;--s>-1;)for(c=e[s],l=c.length,u=0;u1&&(n=JV(b)*n,r=JV(b)*r);var x=n*n,S=r*r,C=(x*S-x*y-S*v)/(x*y+S*v);C<0&&(C=0);var w=(a===o?-1:1)*JV(C),T=w*(n*_/r),E=w*-(r*g/n),D=(e+s)/2,O=(t+c)/2,k=D+(u*T-d*E),A=O+(d*T+u*E),j=(g-T)/n,M=(_-E)/r,N=(-g-T)/n,P=(-_-E)/r,F=j*j+M*M,I=(M<0?-1:1)*Math.acos(j/JV(F)),L=(j*P-M*N<0?-1:1)*Math.acos((j*N+M*P)/JV(F*(N*N+P*P)));isNaN(L)&&(L=f),!o&&L>0?L-=p:o&&L<0&&(L+=p),I%=p,L%=p;var R=Math.ceil(qV(L)/(p/4)),z=[],B=L/R,V=4/3*GV(B/2)/(1+KV(B/2)),H=u*n,ee=d*n,te=d*-r,ne=u*r,re;for(re=0;re-1e-4?0:t}).match(Ile)||[],n=[],r=0,i=0,a=2/3,o=t.length,s=0,c=`ERROR: malformed path: `+e,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w=function(e,t,n,r){v=(n-e)/3,y=(r-t)/3,h.push(e+v,t+y,n-v,r-y,n,r)};if(!e||!isNaN(t[0])||isNaN(t[1]))return console.log(c),n;for(l=0;l.5||qV(i-f)>.5)&&(w(r,i,d,f),p===`L`&&(l+=2)),r=d,i=f;else if(p===`A`){if(S=t[l+4],C=t[l+5],v=t[l+6],y=t[l+7],u=7,S.length>1&&(S.length<3?(y=v,v=C,u--):(y=C,v=S.substr(2),u-=2),C=S.charAt(1),S=S.charAt(0)),b=tue(r,i,+t[l+1],+t[l+2],+t[l+3],+S,+C,(m?r:0)+v*1,(m?i:0)+y*1),l+=u,b)for(u=0;ul*(w*w+T*T)&&(O=u.length,e(t,n,f,p,v,y,S,C,l,u,d),e(S,C,b,x,g,_,s,c,l,u,d+1+(u.length-O))),u},SH=function(){function e(e,t,n){vH||bH(),this.id=e,iue&&this.setData(t,n)}var t=e.prototype;return t.setData=function(e,t){t||={},e||=`0,0,1,1`;var n=e.match(aue),r=1,i=[],a=[],o=t.precision||1,s=o<=1,c,l,u,d,f,p,m,h,g;if(this.data=e,(oue.test(e)||~e.indexOf(`M`)&&e.indexOf(`C`)<0)&&(n=mH(e)[0]),c=n.length,c===4)n.unshift(0,0),n.push(1,1),c=8;else if((c-2)%6)throw`Invalid CustomEase`;for((+n[0]!=0||+n[c-2]!=1)&&cue(n,t.height,t.originY),this.segment=n,d=2;dh.x||h.y!==m.y&&h.x===m.x||m===h)&&m.x<=1?(h.cx=m.x-h.x,h.cy=m.y-h.y,h.n=m,h.nx=m.x,s&&d>1&&Math.abs(h.cy/h.cx-i[d-2].cy/i[d-2].cx)>2&&(s=0),h.cxh||u===m-1)&&(c.push(g,_),l=(p-_)/(f-g)),g=f,_=p;c=`M`+c.join(`,`)}return s&&s.setAttribute(`d`,c),c},e}();SH.version=`3.15.0`,SH.headless=!0,yH()&&_H.registerPlugin(SH);var CH,wH,TH,EH,DH,OH,kH,AH,jH=`transform`,MH=jH+`Origin`,NH,PH=function(e){var t=e.ownerDocument||e;for(!(jH in e.style)&&(`msTransform`in e.style)&&(jH=`msTransform`,MH=jH+`Origin`);t.parentNode&&(t=t.parentNode););if(wH=window,kH=new BH,t){CH=t,TH=t.documentElement,EH=t.body,AH=CH.createElementNS(`http://www.w3.org/2000/svg`,`g`),AH.style.transform=`none`;var n=t.createElement(`div`),r=t.createElement(`div`),i=t&&(t.body||t.firstElementChild);i&&i.appendChild&&(i.appendChild(n),n.appendChild(r),n.style.position=`static`,n.style.transform=`translate3d(0,0,1px)`,NH=r.offsetParent!==n,i.removeChild(n))}return t},uue=function(e){for(var t,n;e&&e!==EH;)n=e._gsap,n&&n.uncache&&n.get(e,`x`),n&&!n.scaleX&&!n.scaleY&&n.renderTransform&&(n.scaleX=n.scaleY=1e-4,n.renderTransform(1,n),t?t.push(n):t=[n]),e=e.parentNode;return t},FH=[],IH=[],due=function(){return wH.pageYOffset||CH.scrollTop||TH.scrollTop||EH.scrollTop||0},fue=function(){return wH.pageXOffset||CH.scrollLeft||TH.scrollLeft||EH.scrollLeft||0},LH=function(e){return e.ownerSVGElement||((e.tagName+``).toLowerCase()===`svg`?e:null)},pue=function e(t){if(wH.getComputedStyle(t).position===`fixed`)return!0;if(t=t.parentNode,t&&t.nodeType===1)return e(t)},RH=function e(t,n){if(t.parentNode&&(CH||PH(t))){var r=LH(t),i=r?r.getAttribute(`xmlns`)||`http://www.w3.org/2000/svg`:`http://www.w3.org/1999/xhtml`,a=r?n?`rect`:`g`:`div`,o=n===2?100:0,s=n===3?100:0,c={position:`absolute`,display:`block`,pointerEvents:`none`,margin:`0`,padding:`0`},l=CH.createElementNS?CH.createElementNS(i.replace(/^https/,`http`),a):CH.createElement(a);return n&&(r?(OH||=e(t),l.setAttribute(`width`,.01),l.setAttribute(`height`,.01),l.setAttribute(`transform`,`translate(`+o+`,`+s+`)`),l.setAttribute(`fill`,`transparent`),OH.appendChild(l)):(DH||(DH=e(t),Object.assign(DH.style,c)),Object.assign(l.style,c,{width:`0.1px`,height:`0.1px`,top:s+`px`,left:o+`px`}),DH.appendChild(l))),l}throw`Need document and parent.`},mue=function(e){for(var t=new BH,n=0;n1?mue(c):c.getItem(0).matrix:kH,u=c.a*l.x+c.c*l.y,d=c.b*l.x+c.d*l.y):(c=new BH,u=d=0),t&&e.tagName.toLowerCase()===`g`&&(u=d=0),(r||!e.getBoundingClientRect().width?n:a).appendChild(s),s.setAttribute(`transform`,`matrix(`+c.a+`,`+c.b+`,`+c.c+`,`+c.d+`,`+(c.e+u)+`,`+(c.f+d)+`)`);else{if(u=d=0,NH)for(c=e.offsetParent,l=e;(l&&=l.parentNode)&&l!==c&&l.parentNode;)(wH.getComputedStyle(l)[jH]+``).length>4&&(u=l.offsetLeft,d=l.offsetTop,l=0);if(f=wH.getComputedStyle(e),f.position!==`absolute`&&f.position!==`fixed`)for(c=e.offsetParent;a&&a!==c;)u+=a.scrollLeft||0,d+=a.scrollTop||0,a=a.parentNode;l=s.style,l.top=e.offsetTop-d+`px`,l.left=e.offsetLeft-u+`px`,l[jH]=f[jH],l[MH]=f[MH],l.position=f.position===`fixed`?`fixed`:`absolute`,o.appendChild(s)}return s},zH=function(e,t,n,r,i,a,o){return e.a=t,e.b=n,e.c=r,e.d=i,e.e=a,e.f=o,e},BH=function(){function e(e,t,n,r,i,a){e===void 0&&(e=1),t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=1),i===void 0&&(i=0),a===void 0&&(a=0),zH(this,e,t,n,r,i,a)}var t=e.prototype;return t.inverse=function(){var e=this.a,t=this.b,n=this.c,r=this.d,i=this.e,a=this.f,o=e*r-t*n||1e-10;return zH(this,r/o,-t/o,-n/o,e/o,(n*a-r*i)/o,-(e*a-t*i)/o)},t.multiply=function(e){var t=this.a,n=this.b,r=this.c,i=this.d,a=this.e,o=this.f,s=e.a,c=e.c,l=e.b,u=e.d,d=e.e,f=e.f;return zH(this,s*t+l*r,s*n+l*i,c*t+u*r,c*n+u*i,a+d*t+f*r,o+d*n+f*i)},t.clone=function(){return new e(this.a,this.b,this.c,this.d,this.e,this.f)},t.equals=function(e){var t=this.a,n=this.b,r=this.c,i=this.d,a=this.e,o=this.f;return t===e.a&&n===e.b&&r===e.c&&i===e.d&&a===e.e&&o===e.f},t.apply=function(e,t){t===void 0&&(t={});var n=e.x,r=e.y,i=this.a,a=this.b,o=this.c,s=this.d,c=this.e,l=this.f;return t.x=n*i+r*o+c||0,t.y=n*a+r*s+l||0,t},e}();function VH(e,t,n,r){if(!e||!e.parentNode||(CH||PH(e)).documentElement===e)return new BH;var i=uue(e),a=LH(e)?FH:IH,o=gue(e,n),s=a[0].getBoundingClientRect(),c=a[1].getBoundingClientRect(),l=a[2].getBoundingClientRect(),u=o.parentNode,d=!r&&pue(e),f=new BH((c.left-s.left)/100,(c.top-s.top)/100,(l.left-s.left)/100,(l.top-s.top)/100,s.left+(d?0:fue()),s.top+(d?0:due()));if(u.removeChild(o),i)for(s=i.length;s--;)c=i[s],c.scaleX=c.scaleY=0,c.renderTransform(1,c);return t?f.inverse():f}var _ue=`x,translateX,left,marginLeft,xPercent`.split(`,`),vue=`y,translateY,top,marginTop,yPercent`.split(`,`),yue=Math.PI/180,HH,UH,WH,GH,KH,qH,bue=function(){return HH||typeof window<`u`&&(HH=window.gsap)&&HH.registerPlugin&&HH},JH=function(e,t,n,r){for(var i=t.length,a=r===2?0:r,o=0;o1?e=1:e<0&&(e=0);r--;)fH(n[r],e,!r&&t.rotate,n[r]);for(;i;)i.set(i.t,i.p,i.path[i.pp]+i.u,i.d,e),i=i._next;t.rotate&&t.rSet(t.target,t.rProp,n[0].angle*(t.radians?yue:1)+t.rOffset+t.ru,t,e)}else t.styles.revert()},getLength:function(e){return lH(oH(e)).totalLength},sliceRawPath:cH,getRawPath:oH,pointsToSegment:hH,stringToRawPath:mH,rawPathToString:gH,transformRawPath:pH,getGlobalMatrix:VH,getPositionOnPath:fH,cacheRawPathMeasurements:lH,convertToPath:function(e,t){return GH(e).map(function(e){return $le(e,t!==!1)})},convertCoordinates:function(e,t,n){var r=VH(t,!0,!0).multiply(VH(e));return n?r.apply(n):r},getAlignMatrix:$H,getRelativePosition:function(e,t,n,r){var i=$H(e,t,n,r);return{x:i.e,y:i.f}},arrayToRawPath:function(e,t){t||={};var n=JH(JH([],e,t.x||`x`,0),e,t.y||`y`,1);return t.relative&&XH(n),[t.type===`cubic`?n:hH(n,t.curviness)]}};bue()&&HH.registerPlugin(nU);var wue=`dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture`.split(`.`);function rU(e){return typeof e==`string`&&wue.includes(e)}var Tue=new Set(`aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle`.split(`.`));function iU(e){return typeof e==`string`&&Tue.has(e)}function aU(e){return typeof e==`string`&&e.startsWith(`data-`)}function oU(e){if(typeof e!=`object`||!e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(iU(n)||aU(n))&&(t[n]=e[n]);return t}function sU(e){if(e==null)return null;if((0,v.isValidElement)(e)&&typeof e.props==`object`&&e.props!==null){var t=e.props;return oU(t)}return typeof e==`object`&&!Array.isArray(e)?oU(e):null}function cU(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(iU(n)||aU(n)||rU(n))&&(t[n]=e[n]);return t}function Eue(e){return e==null?null:(0,v.isValidElement)(e)?cU(e.props):typeof e==`object`&&!Array.isArray(e)?cU(e):null}var Due=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function lU(){return lU=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var n=e.children,r=e.width,i=e.height,a=e.viewBox,o=e.className,s=e.style,c=e.title,l=e.desc,u=Oue(e,Due),d=a||{width:r,height:i,x:0,y:0},f=Is(`recharts-surface`,o);return v.createElement(`svg`,lU({},cU(u),{className:f,width:r,height:i,style:s,viewBox:`${d.x} ${d.y} ${d.width} ${d.height}`,ref:t}),v.createElement(`title`,null,c),v.createElement(`desc`,null,l),n)}),Aue=[`children`,`className`];function dU(){return dU=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var n=e.children,r=e.className,i=jue(e,Aue),a=Is(`recharts-layer`,r);return v.createElement(`g`,dU({className:a},cU(i),{ref:t}),n)});function pU(e){return e===`__proto__`}var Nue=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;function mU(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e===``||e.startsWith(`.`)||e.endsWith(`.`)?!1:Nue.test(e);default:return!1}}function hU(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function gU(e){return typeof e==`symbol`||e instanceof Symbol}function Pue(e){return e==null?``:_U(e)}function _U(e){if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(_U).join(`,`);if(gU(e))return e.toString();let t=e+``;return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function vU(e){if(Array.isArray(e))return e.map(hU);if(typeof e==`symbol`)return[e];e=Pue(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1,s=!1,c=/^-?\d+(?:\.\d+)?$/;for(e.charCodeAt(0)===46&&t.push(``);r1&&arguments[1]!==void 0?arguments[1]:Iue),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function xU(e){var t=[...arguments].slice(1);return e.reduce((e,n,r)=>{var i=t[r-1];return typeof i==`string`?e+i+n:i===void 0?e+n:e+bU(i)+n},``)}var SU=e=>e===0?0:e>0?1:-1,CU=e=>typeof e==`number`&&e!=+e,wU=e=>typeof e==`string`&&e.length>1&&e.indexOf(`%`)===e.length-1,TU=e=>(typeof e==`number`||e instanceof Number)&&!CU(e),EU=e=>TU(e)||typeof e==`string`,Lue=0,DU=e=>{var t=++Lue;return`${e||``}${t}`},OU=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(!TU(e)&&typeof e!=`string`)return n;var i;if(wU(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return CU(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},kU=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;re&&(typeof t==`function`?t(e):yU(e,t))===n)}var MU=e=>e==null,NU=e=>MU(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function PU(e){return e!=null}function FU(){}function IU(e){if(e)return{x:e.x,y:e.y,upperWidth:`upperWidth`in e?e.upperWidth:e.width,lowerWidth:`lowerWidth`in e?e.lowerWidth:e.width,width:e.width,height:e.height}}function LU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function RU(e){for(var t=1;t{var t=e.viewBox,n=e.position,r=e.offset,i=r===void 0?0:r,a=e.parentViewBox,o=e.clamp,s=IU(t),c=s.x,l=s.y,u=s.height,d=s.upperWidth,f=s.lowerWidth,p=c,m=c+(d-f)/2,h=(p+m)/2,g=(d+f)/2,_=p+d/2,v=u>=0?1:-1,y=v*i,b=v>0?`end`:`start`,x=v>0?`start`:`end`,S=d>=0?1:-1,C=S*i,w=S>0?`end`:`start`,T=S>0?`start`:`end`,E=a;if(n===`top`){var D={x:p+d/2,y:l-y,horizontalAnchor:`middle`,verticalAnchor:b};return o&&E&&(D.height=Math.max(l-E.y,0),D.width=d),D}if(n===`bottom`){var O={x:m+f/2,y:l+u+y,horizontalAnchor:`middle`,verticalAnchor:x};return o&&E&&(O.height=Math.max(E.y+E.height-(l+u),0),O.width=f),O}if(n===`left`){var k={x:h-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`};return o&&E&&(k.width=Math.max(k.x-E.x,0),k.height=u),k}if(n===`right`){var A={x:h+g+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`};return o&&E&&(A.width=Math.max(E.x+E.width-A.x,0),A.height=u),A}var j=o&&E?{width:g,height:u}:{};return n===`insideLeft`?RU({x:h+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`},j):n===`insideRight`?RU({x:h+g-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`},j):n===`insideTop`?RU({x:p+d/2,y:l+y,horizontalAnchor:`middle`,verticalAnchor:x},j):n===`insideBottom`?RU({x:m+f/2,y:l+u-y,horizontalAnchor:`middle`,verticalAnchor:b},j):n===`insideTopLeft`?RU({x:p+C,y:l+y,horizontalAnchor:T,verticalAnchor:x},j):n===`insideTopRight`?RU({x:p+d-C,y:l+y,horizontalAnchor:w,verticalAnchor:x},j):n===`insideBottomLeft`?RU({x:m+C,y:l+u-y,horizontalAnchor:T,verticalAnchor:b},j):n===`insideBottomRight`?RU({x:m+f-C,y:l+u-y,horizontalAnchor:w,verticalAnchor:b},j):n&&typeof n==`object`&&(TU(n.x)||wU(n.x))&&(TU(n.y)||wU(n.y))?RU({x:c+OU(n.x,g),y:l+OU(n.y,u),horizontalAnchor:`end`,verticalAnchor:`end`},j):RU({x:_,y:l+u/2,horizontalAnchor:`middle`,verticalAnchor:`middle`},j)},Hue=[`top`,`left`,`right`,`bottom`];function Uue(e){return e==null?!1:typeof e==`object`||Hue.includes(e)}var Wue=(0,v.createContext)(null);function zU(e){return function(){return e}}var BU=Math.PI,VU=2*BU,HU=1e-6,Gue=VU-HU;function UU(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw Error(`invalid digits: ${e}`);if(t>15)return UU;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;tHU){if(!(Math.abs(u*s-c*l)>HU)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((BU-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>HU&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>HU||Math.abs(this._y1-l)>HU)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%VU+VU),d>Gue?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>HU&&this._append`A${n},${n},0,${+(d>=BU)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};WU.prototype;function GU(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new WU(t)}Array.prototype.slice;function KU(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function qU(e){this._context=e}qU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};function JU(e){return new qU(e)}function YU(e){return e[0]}function XU(e){return e[1]}function ZU(e,t){var n=zU(!0),r=null,i=JU,a=null,o=GU(s);e=typeof e==`function`?e:e===void 0?YU:zU(e),t=typeof t==`function`?t:t===void 0?XU:zU(t);function s(s){var c,l=(s=KU(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return ZU().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:zU(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:zU(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:zU(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:zU(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:zU(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:zU(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:zU(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var $U=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}};function que(e){return new $U(e,!0)}function Jue(e){return new $U(e,!1)}function eW(){}function tW(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function nW(e){this._context=e}nW.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:tW(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:tW(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Yue(e){return new nW(e)}function rW(e){this._context=e}rW.prototype={areaStart:eW,areaEnd:eW,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:tW(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Xue(e){return new rW(e)}function iW(e){this._context=e}iW.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:tW(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Zue(e){return new iW(e)}function aW(e){this._context=e}aW.prototype={areaStart:eW,areaEnd:eW,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Que(e){return new aW(e)}function oW(e){return e<0?-1:1}function sW(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(oW(a)+oW(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function cW(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function lW(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function uW(e){this._context=e}uW.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:lW(this,this._t0,cW(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,lW(this,cW(this,n=sW(this,e,t)),n);break;default:lW(this,this._t0,n=sW(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function dW(e){this._context=new fW(e)}(dW.prototype=Object.create(uW.prototype)).point=function(e,t){uW.prototype.point.call(this,t,e)};function fW(e){this._context=e}fW.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function $ue(e){return new uW(e)}function ede(e){return new dW(e)}function pW(e){this._context=e}pW.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n){if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=mW(e),i=mW(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};function nde(e){return new hW(e,.5)}function rde(e){return new hW(e,0)}function ide(e){return new hW(e,1)}function gW(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n=0;)n[t]=t;return n}function ade(e,t){return e[t]}function ode(e){let t=[];return t.key=e,t}function sde(){var e=zU([]),t=_W,n=gW,r=ade;function i(i){var a=Array.from(e.apply(this,arguments),ode),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o0){for(var n,r,i=0,a=e[0].length,o;i0){for(var n=0,r=e[t[0]],i,a=r.length;n0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r`radius`in e&&`startAngle`in e&&`endAngle`in e,vW=(e,t)=>{if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if((0,v.isValidElement)(e)&&(n=e.props),typeof n!=`object`&&typeof n!=`function`)return null;var r={};return Object.keys(n).forEach(e=>{rU(e)&&typeof n[e]==`function`&&(r[e]=t||(t=>n[e](n,t)))}),r},fde=(e,t,n)=>r=>(e(t,n,r),null),pde=(e,t,n)=>{if(e===null||typeof e!=`object`&&typeof e!=`function`)return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];rU(i)&&typeof a==`function`&&(r||={},r[i]=fde(a,t,n))}),r};function yW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mde(e){for(var t=1;t(e[t]===void 0&&r[t]!==void 0&&(e[t]=r[t]),e),n)}function vde(e){return Number.isSafeInteger(e)&&e>=0}function xW(e){return e!=null&&typeof e!=`function`&&vde(e.length)}function SW(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function CW(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var wW=`[object RegExp]`,TW=`[object String]`,EW=`[object Number]`,DW=`[object Boolean]`,yde=`[object Arguments]`,OW=`[object Symbol]`,kW=`[object Date]`,AW=`[object Map]`,jW=`[object Set]`,MW=`[object Array]`,bde=`[object Function]`,NW=`[object ArrayBuffer]`,PW=`[object Object]`,xde=`[object Error]`,FW=`[object DataView]`,IW=`[object Uint8Array]`,LW=`[object Uint8ClampedArray]`,RW=`[object Uint16Array]`,zW=`[object Uint32Array]`,Sde=`[object BigUint64Array]`,BW=`[object Int8Array]`,VW=`[object Int16Array]`,HW=`[object Int32Array]`,Cde=`[object BigInt64Array]`,UW=`[object Float32Array]`,WW=`[object Float64Array]`,GW=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function KW(e){return GW.Buffer!==void 0&&GW.Buffer.isBuffer(e)}function qW(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function JW(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}var wde=/^(?:0|[1-9]\d*)$/;function YW(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e{var t=d(),n=P_();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Ede=o(((e,t)=>{t.exports=Tde()})),XW=(0,v.createContext)(null),Dde=Ede(),Ode=e=>e,ZW=()=>{var e=(0,v.useContext)(XW);return e?e.store.dispatch:Ode},QW=()=>{},kde=()=>QW,Ade=(e,t)=>e===t;function $W(e){var t=(0,v.useContext)(XW),n=(0,v.useMemo)(()=>t?t=>{if(t!=null)return e(t)}:QW,[t,e]);return(0,Dde.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:kde,t?t.store.getState:QW,t?t.store.getState:QW,n,Ade)}function jde(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function Mde(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var eG=e=>Array.isArray(e)?e:[e];function Nde(e){let t=Array.isArray(e[0])?e[0]:e;return Mde(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function Pde(e,t){let n=[],{length:r}=e;for(let i=0;i`u`?Fde:WeakRef,Ide=0,nG=1;function rG(){return{s:Ide,v:void 0,o:null,p:null}}function Lde(e){return e instanceof tG?e.deref():e}function iG(e,t={}){let n=rG(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e{n=rG(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function Rde(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),jde(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=iG,argsMemoizeOptions:u=[]}={...n,...a},d=eG(c),f=eG(u),p=Nde(e),m=s(function(){return t++,o.apply(null,arguments)},...d),h=l(function(){r++;let e=Pde(p,arguments);return i=m.apply(null,e),i},...f);return Object.assign(h,{resultFunc:o,memoizedResultFunc:m,dependencies:p,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var $=Rde(iG);function zde(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a{if(e!==t){let r=oG(e),i=oG(t);if(r===i&&r===0){if(et)return n===`desc`?-1:1}return n===`desc`?i-r:r-i}return 0},Vde=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Hde=/^\w*$/;function Ude(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||gU(e)?!0:typeof e==`string`&&(Hde.test(e)||!Vde.test(e))||t!=null&&Object.hasOwn(t,e)}function Wde(e,t,n,r){if(e==null)return[];n=r?void 0:n,Array.isArray(e)||(e=xW(e)?Array.from(e):Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(n)||(n=n==null?[]:[n]),n=n.map(e=>String(e));let i=(e,t)=>{let n=e,r=0;for(;r0&&r===t.length?n:void 0},a=(e,t)=>{if(e==null)return t;if(t!=null)return typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:i(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?i(t,e):t[e]},o=t.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||Ude(e)?e:{key:e,path:vU(e)}));return e.map(e=>({original:e,criteria:o.map(t=>a(t,e))})).slice().sort((e,t)=>{for(let r=0;re.original)}function sG(e,...t){let n=t.length;return n>1&&aG(e,t[0],t[1])?t=[]:n>2&&aG(t[0],t[1],t[2])&&(t=[t[0]]),Wde(e,zde(t),[`asc`])}var cG=e=>e.legend.settings,Gde=e=>e.legend.size;$([e=>e.legend.payload,cG],(e,t)=>{var n=t.itemSorter,r=e.flat(1);return n?sG(r,n):r});function lG(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var uG=typeof Symbol==`function`&&Symbol.observable||`@@observable`,dG=()=>Math.random().toString(36).substring(7).split(``).join(`.`),fG={INIT:`@@redux/INIT${dG()}`,REPLACE:`@@redux/REPLACE${dG()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${dG()}`};function pG(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function mG(e,t,n){if(typeof e!=`function`)throw Error(lG(2));if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(lG(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(lG(1));return n(mG)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,c=!1;function l(){o===a&&(o=new Map,a.forEach((e,t)=>{o.set(t,e)}))}function u(){if(c)throw Error(lG(3));return i}function d(e){if(typeof e!=`function`)throw Error(lG(4));if(c)throw Error(lG(5));let t=!0;l();let n=s++;return o.set(n,e),function(){if(t){if(c)throw Error(lG(6));t=!1,l(),o.delete(n),a=null}}}function f(e){if(!pG(e))throw Error(lG(7));if(e.type===void 0)throw Error(lG(8));if(typeof e.type!=`string`)throw Error(lG(17));if(c)throw Error(lG(9));try{c=!0,i=r(i,e)}finally{c=!1}return(a=o).forEach(e=>{e()}),e}function p(e){if(typeof e!=`function`)throw Error(lG(10));r=e,f({type:fG.REPLACE})}function m(){let e=d;return{subscribe(t){if(typeof t!=`object`||!t)throw Error(lG(11));function n(){let e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[uG](){return this}}}return f({type:fG.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[uG]:m}}function Kde(e){Object.keys(e).forEach(t=>{let n=e[t];if(n(void 0,{type:fG.INIT})===void 0)throw Error(lG(12));if(n(void 0,{type:fG.PROBE_UNKNOWN_ACTION()})===void 0)throw Error(lG(13))})}function hG(e){let t=Object.keys(e),n={};for(let r=0;re:e.length===1?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function qde(...e){return t=>(n,r)=>{let i=t(n,r),a=()=>{throw Error(lG(15))},o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)};return a=gG(...e.map(e=>e(o)))(i.dispatch),{...i,dispatch:a}}}function _G(e){return pG(e)&&`type`in e&&typeof e.type==`string`}var vG=Symbol.for(`immer-nothing`),yG=Symbol.for(`immer-draftable`),bG=Symbol.for(`immer-state`);function xG(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var SG=Object,CG=SG.getPrototypeOf,wG=`constructor`,TG=`prototype`,EG=`configurable`,DG=`enumerable`,OG=`writable`,kG=`value`,AG=e=>!!e&&!!e[bG];function jG(e){return e?NG(e)||zG(e)||!!e[yG]||!!e[wG]?.[yG]||BG(e)||VG(e):!1}var Jde=SG[TG][wG].toString(),MG=new WeakMap;function NG(e){if(!e||!HG(e))return!1;let t=CG(e);if(t===null||t===SG[TG])return!0;let n=SG.hasOwnProperty.call(t,wG)&&t[wG];if(n===Object)return!0;if(!UG(n))return!1;let r=MG.get(n);return r===void 0&&(r=Function.toString.call(n),MG.set(n,r)),r===Jde}function PG(e,t,n=!0){FG(e)===0?(n?Reflect.ownKeys(e):SG.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function FG(e){let t=e[bG];return t?t.type_:zG(e)?1:BG(e)?2:VG(e)?3:0}var IG=(e,t,n=FG(e))=>n===2?e.has(t):SG[TG].hasOwnProperty.call(e,t),LG=(e,t,n=FG(e))=>n===2?e.get(t):e[t],RG=(e,t,n,r=FG(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Yde(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var zG=Array.isArray,BG=e=>e instanceof Map,VG=e=>e instanceof Set,HG=e=>typeof e==`object`,UG=e=>typeof e==`function`,WG=e=>typeof e==`boolean`;function Xde(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var GG=e=>e.copy_||e.base_,KG=e=>e.modified_?e.copy_:e.base_;function qG(e,t){if(BG(e))return new Map(e);if(VG(e))return new Set(e);if(zG(e))return Array[TG].slice.call(e);let n=NG(e);if(t===!0||t===`class_only`&&!n){let t=SG.getOwnPropertyDescriptors(e);delete t[bG];let n=Reflect.ownKeys(t);for(let r=0;r1&&SG.defineProperties(e,{set:YG,add:YG,clear:YG,delete:YG}),SG.freeze(e),t&&PG(e,(e,t)=>{JG(t,!0)},!1),e)}function Zde(){xG(2)}var YG={[kG]:Zde};function XG(e){return e===null||!HG(e)||SG.isFrozen(e)}var ZG=`MapSet`,QG=`Patches`,$G=`ArrayMethods`,eK={};function tK(e){let t=eK[e];return t||xG(0,e),t}var nK=e=>!!eK[e],rK,iK=()=>rK,Qde=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:nK(ZG)?tK(ZG):void 0,arrayMethodsPlugin_:nK($G)?tK($G):void 0});function aK(e,t){t&&(e.patchPlugin_=tK(QG),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function oK(e){sK(e),e.drafts_.forEach($de),e.drafts_=null}function sK(e){e===rK&&(rK=e.parent_)}var cK=e=>rK=Qde(rK,e);function $de(e){let t=e[bG];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function lK(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[bG].modified_&&(oK(t),xG(4)),jG(e)&&(e=uK(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[bG].base_,e,t)}else e=uK(t,n);return efe(t,e,!0),oK(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===vG?void 0:e}function uK(e,t){if(XG(t))return t;let n=t[bG];if(!n)return hK(t,e.handledSet_,e);if(!fK(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);mK(n,e)}return n.copy_}function efe(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&JG(t,n)}function dK(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var fK=(e,t)=>e.scope_===t,tfe=[];function pK(e,t,n,r){let i=GG(e),a=e.type_;if(r!==void 0&&LG(i,r,a)===t){RG(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;PG(i,(e,n)=>{if(AG(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??tfe;for(let e of o)RG(i,e,n,a)}function nfe(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!fK(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=KG(i);pK(e,i.draft_??i,a,n),mK(i,r)})}function mK(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}dK(e)}}function rfe(e,t,n){let{scope_:r}=e;if(AG(n)){let i=n[bG];fK(i,r)&&i.callbacks_.push(function(){xK(e),pK(e,n,KG(i),t)})}else jG(n)&&e.callbacks_.push(function(){let i=GG(e);e.type_===3?i.has(n)&&hK(n,r.handledSet_,r):LG(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&hK(LG(e.copy_,t,e.type_),r.handledSet_,r)})}function hK(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||AG(e)||t.has(e)||!jG(e)||XG(e)?e:(t.add(e),PG(e,(r,i)=>{if(AG(i)){let t=i[bG];fK(t,n)&&(RG(e,r,KG(t),e.type_),dK(t))}else jG(i)&&hK(i,t,n)}),e)}function ife(e,t){let n=zG(e),r={type_:+!!n,scope_:t?t.scope_:iK(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=gK;n&&(i=[r],a=_K);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var gK={get(e,t){if(t===bG)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=GG(e);if(!IG(i,t,e.type_))return ofe(e,i,t);let a=i[t];if(e.finalized_||!jG(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Xde(t))return a;if(a===vK(e.base_,t)||afe(e,t,a)){xK(e);let n=e.type_===1?+t:t,r=SK(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in GG(e)},ownKeys(e){return Reflect.ownKeys(GG(e))},set(e,t,n){let r=yK(GG(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=vK(GG(e),t),i=r?.[bG];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(Yde(n,r)&&(n!==void 0||IG(e.base_,t,e.type_)))return!0;xK(e),bK(e)}return e.copy_[t]===n&&(n!==void 0||IG(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),rfe(e,t,n),!0)},deleteProperty(e,t){return xK(e),vK(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),bK(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=GG(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[OG]:!0,[EG]:e.type_!==1||t!==`length`,[DG]:r[DG],[kG]:n[t]}},defineProperty(){xG(11)},getPrototypeOf(e){return CG(e.base_)},setPrototypeOf(){xG(12)}},_K={};for(let e in gK){let t=gK[e];_K[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}_K.deleteProperty=function(e,t){return _K.set.call(this,e,t,void 0)},_K.set=function(e,t,n){return gK.set.call(this,e[0],t,n,e[0])};function vK(e,t){let n=e[bG];return(n?GG(n):e)[t]}function afe(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!jG(n)||n[bG]?!1:e.baseRefs_.has(n)}function ofe(e,t,n){let r=yK(t,n);return r?kG in r?r[kG]:r.get?.call(e.draft_):void 0}function yK(e,t){if(!(t in e))return;let n=CG(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=CG(n)}}function bK(e){e.modified_||(e.modified_=!0,e.parent_&&bK(e.parent_))}function xK(e){e.copy_||=(e.assigned_=new Map,qG(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var sfe=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(UG(e)&&!UG(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}UG(t)||xG(6),n!==void 0&&!UG(n)&&xG(7);let r;if(jG(e)){let i=cK(this),a=SK(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?oK(i):sK(i)}return aK(i,n),lK(r,i)}if(!e||!HG(e)){if(r=t(e),r===void 0&&(r=e),r===vG&&(r=void 0),this.autoFreeze_&&JG(r,!0),n){let t=[],i=[];tK(QG).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}xG(1,e)},this.produceWithPatches=(e,t)=>{if(UG(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},WG(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),WG(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),WG(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){jG(e)||xG(8),AG(e)&&(e=CK(e));let t=cK(this),n=SK(t,e,void 0);return n[bG].isManual_=!0,sK(t),n}finishDraft(e,t){let n=e&&e[bG];(!n||!n.isManual_)&&xG(9);let{scope_:r}=n;return aK(r,t),lK(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=tK(QG).applyPatches_;return AG(e)?r(e,t):this.produce(e,e=>r(e,t))}};function SK(e,t,n,r){let[i,a]=BG(t)?tK(ZG).proxyMap_(t,n):VG(t)?tK(ZG).proxySet_(t,n):ife(t,n);return(n?.scope_??iK()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?nfe(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function CK(e){return AG(e)||xG(10,e),wK(e)}function wK(e){if(!jG(e)||XG(e))return e;let t=e[bG],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=qG(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=qG(e,!0);return PG(n,(e,t)=>{RG(n,e,wK(t))},r),t&&(t.finalized_=!1),n}globalThis.Iterator?.from;var TK=new sfe().produce,EK=e=>e;function DK(e){return({dispatch:t,getState:n})=>r=>i=>typeof i==`function`?i(t,n,e):r(i)}var cfe=DK(),lfe=DK,ufe=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]==`object`?gG:gG.apply(null,arguments)};typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function OK(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw Error(lq(0));return{type:e,payload:r.payload,...`meta`in r&&{meta:r.meta},...`error`in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>_G(t)&&t.type===e,n}var kK=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function AK(e){return jG(e)?TK(e,()=>{}):e}function jK(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function dfe(e){return typeof e==`boolean`}var ffe=()=>function(e){let{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{},a=new kK;return t&&(dfe(t)?a.push(cfe):a.push(lfe(t.extraArgument))),a},MK=`RTK_autoBatch`,NK=()=>e=>({payload:e,meta:{[MK]:!0}}),PK=e=>t=>{setTimeout(t,e)},pfe=(e,t)=>n=>{let r=!1,i=()=>{r||(r=!0,cancelAnimationFrame(a),clearTimeout(o),n())},a=e(i),o=setTimeout(i,t)},FK=(e={type:`raf`})=>t=>(...n)=>{let r=t(...n),i=!0,a=!1,o=!1,s=new Set,c=e.type===`tick`?queueMicrotask:e.type===`raf`?typeof window<`u`&&window.requestAnimationFrame?pfe(window.requestAnimationFrame,100):PK(10):e.type===`callback`?e.queueNotification:PK(e.timeout),l=()=>{o=!1,a&&(a=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){let t=r.subscribe(()=>i&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return i=!e?.meta?.[MK],a=!i,a&&(o||(o=!0,c(l))),r.dispatch(e)}finally{i=!0}}})},mfe=e=>function(t){let{autoBatch:n=!0}=t??{},r=new kK(e);return n&&r.push(FK(typeof n==`object`?n:void 0)),r};function hfe(e){let t=ffe(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{},c;if(typeof n==`function`)c=n;else if(pG(n))c=hG(n);else throw Error(lq(1));let l;l=typeof r==`function`?r(t):t();let u=gG;i&&(u=ufe({trace:!1,...typeof i==`object`&&i}));let d=mfe(qde(...l)),f=typeof s==`function`?s(d):d(),p=u(...f);return mG(c,o,p)}function IK(e){let t={},n=[],r,i={addCase(e,n){let r=typeof e==`string`?e:e.type;if(!r)throw Error(lq(28));if(r in t)throw Error(lq(29));return t[r]=n,i},addAsyncThunk(e,r){return r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),i},addMatcher(e,t){return n.push({matcher:e,reducer:t}),i},addDefaultCase(e){return r=e,i}};return e(i),[t,n,r]}function gfe(e){return typeof e==`function`}function _fe(e,t){let[n,r,i]=IK(t),a;if(gfe(e))a=()=>AK(e());else{let t=AK(e);a=()=>t}function o(e=a(),t){let o=[n[t.type],...r.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return o.filter(e=>!!e).length===0&&(o=[i]),o.reduce((e,n)=>{if(n){if(AG(e)){let r=n(e,t);return r===void 0?e:r}if(jG(e))return TK(e,e=>n(e,t));{let r=n(e,t);if(r===void 0){if(e===null)return e;throw Error(`A case reducer on a non-draftable value must not return undefined`)}return r}}return e},e)}return o.getInitialState=a,o}var vfe=`ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW`,yfe=(e=21)=>{let t=``,n=e;for(;n--;)t+=vfe[Math.random()*64|0];return t},bfe=Symbol.for(`rtk-slice-createasyncthunk`);function xfe(e,t){return`${e}/${t}`}function Sfe({creators:e}={}){let t=e?.asyncThunk?.[bfe];return function(e){let{name:n,reducerPath:r=n}=e;if(!n)throw Error(lq(11));let i=(typeof e.reducers==`function`?e.reducers(wfe()):e.reducers)||{},a=Object.keys(i),o={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){let n=typeof e==`string`?e:e.type;if(!n)throw Error(lq(12));if(n in o.sliceCaseReducersByType)throw Error(lq(13));return o.sliceCaseReducersByType[n]=t,s},addMatcher(e,t){return o.sliceMatchers.push({matcher:e,reducer:t}),s},exposeAction(e,t){return o.actionCreators[e]=t,s},exposeCaseReducer(e,t){return o.sliceCaseReducersByName[e]=t,s}};a.forEach(r=>{let a=i[r],o={reducerName:r,type:xfe(n,r),createNotation:typeof e.reducers==`function`};Efe(a)?Ofe(o,a,s,t):Tfe(o,a,s)});function c(){let[t={},n=[],r=void 0]=typeof e.extraReducers==`function`?IK(e.extraReducers):[e.extraReducers],i={...t,...o.sliceCaseReducersByType};return _fe(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of o.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}let l=e=>e,u=new Map,d=new WeakMap,f;function p(e,t){return f||=c(),f(e,t)}function m(){return f||=c(),f.getInitialState()}function h(t,n=!1){function r(e){let i=e[t];return i===void 0&&n&&(i=jK(d,r,m)),i}function i(t=l){return jK(jK(u,n,()=>new WeakMap),t,()=>{let r={};for(let[i,a]of Object.entries(e.selectors??{}))r[i]=Cfe(a,t,()=>jK(d,t,m),n);return r})}return{reducerPath:t,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}let g={name:n,reducer:p,actions:o.actionCreators,caseReducers:o.sliceCaseReducersByName,getInitialState:m,...h(r),injectInto(e,{reducerPath:t,...n}={}){let i=t??r;return e.inject({reducerPath:i,reducer:p},n),{...g,...h(i,!0)}}};return g}}function Cfe(e,t,n,r){function i(i,...a){let o=t(i);return o===void 0&&r&&(o=n()),e(o,...a)}return i.unwrapped=e,i}var LK=Sfe();function wfe(){function e(e,t){return{_reducerDefinitionType:`asyncThunk`,payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer(e){return Object.assign({[e.name](...t){return e(...t)}}[e.name],{_reducerDefinitionType:`reducer`})},preparedReducer(e,t){return{_reducerDefinitionType:`reducerWithPrepare`,prepare:e,reducer:t}},asyncThunk:e}}function Tfe({type:e,reducerName:t,createNotation:n},r,i){let a,o;if(`reducer`in r){if(n&&!Dfe(r))throw Error(lq(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?OK(e,o):OK(e))}function Efe(e){return e._reducerDefinitionType===`asyncThunk`}function Dfe(e){return e._reducerDefinitionType===`reducerWithPrepare`}function Ofe({type:e,reducerName:t},n,r,i){if(!i)throw Error(lq(18));let{payloadCreator:a,fulfilled:o,pending:s,rejected:c,settled:l,options:u}=n,d=i(e,a,u);r.exposeAction(t,d),o&&r.addCase(d.fulfilled,o),s&&r.addCase(d.pending,s),c&&r.addCase(d.rejected,c),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:o||RK,pending:s||RK,rejected:c||RK,settled:l||RK})}function RK(){}var kfe=`task`,zK=`listener`,BK=`completed`,VK=`cancelled`,Afe=`task-${VK}`,jfe=`task-${BK}`,HK=`${zK}-${VK}`,Mfe=`${zK}-${BK}`,UK=class{constructor(e){this.code=e,this.message=`${kfe} ${VK} (reason: ${e})`}code;name=`TaskAbortError`;message},WK=(e,t)=>{if(typeof e!=`function`)throw TypeError(lq(32))},GK=()=>{},KK=(e,t=GK)=>(e.catch(t),e),qK=(e,t)=>(e.addEventListener(`abort`,t,{once:!0}),()=>e.removeEventListener(`abort`,t)),JK=e=>{if(e.aborted)throw new UK(e.reason)};function YK(e,t){let n=GK;return new Promise((r,i)=>{let a=()=>i(new UK(e.reason));if(e.aborted){a();return}n=qK(e,a),t.finally(()=>n()).then(r,i)}).finally(()=>{n=GK})}var Nfe=async(e,t)=>{try{return await Promise.resolve(),{status:`ok`,value:await e()}}catch(e){return{status:e instanceof UK?`cancelled`:`rejected`,error:e}}finally{t?.()}},XK=e=>t=>KK(YK(e,t).then(t=>(JK(e),t))),ZK=e=>{let t=XK(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:QK}=Object,$K={},eq=`listenerMiddleware`,Pfe=(e,t)=>{let n=t=>qK(e,()=>t.abort(e.reason));return(r,i)=>{WK(r,`taskExecutor`);let a=new AbortController;n(a);let o=Nfe(async()=>{JK(e),JK(a.signal);let t=await r({pause:XK(a.signal),delay:ZK(a.signal),signal:a.signal});return JK(a.signal),t},()=>a.abort(jfe));return i?.autoJoin&&t.push(o.catch(GK)),{result:XK(e)(o),cancel(){a.abort(Afe)}}}},Ffe=(e,t)=>{let n=async(n,r)=>{JK(t);let i=()=>{},a=[new Promise((t,r)=>{let a=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});i=()=>{a(),r()}})];r!=null&&a.push(new Promise(e=>setTimeout(e,r,null)));try{let e=await YK(t,Promise.race(a));return JK(t),e}finally{i()}};return((e,t)=>KK(n(e,t)))},tq=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:a}=e;if(t)i=OK(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw Error(lq(21));return WK(a,`options.listener`),{predicate:i,type:t,effect:a}},nq=QK(e=>{let{type:t,predicate:n,effect:r}=tq(e);return{id:yfe(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw Error(lq(22))}}},{withTypes:()=>nq}),rq=(e,t)=>{let{type:n,effect:r,predicate:i}=tq(t);return Array.from(e.values()).find(e=>(typeof n==`string`?e.type===n:e.predicate===i)&&e.effect===r)},iq=e=>{e.pending.forEach(e=>{e.abort(HK)})},Ife=(e,t)=>()=>{for(let e of t.keys())iq(e);e.clear()},aq=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout(()=>{throw e},0)}},oq=QK(OK(`${eq}/add`),{withTypes:()=>oq}),Lfe=OK(`${eq}/removeAll`),sq=QK(OK(`${eq}/remove`),{withTypes:()=>sq}),Rfe=(...e)=>{console.error(`${eq}/error`,...e)},cq=(e={})=>{let t=new Map,n=new Map,r=e=>{let t=n.get(e)??0;n.set(e,t+1)},i=e=>{let t=n.get(e)??1;t===1?n.delete(e):n.set(e,t-1)},{extra:a,onError:o=Rfe}=e;WK(o,`onError`);let s=e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&iq(e)}),c=(e=>{let n=rq(t,e)??nq(e);return s(n)});QK(c,{withTypes:()=>c});let l=e=>{let n=rq(t,e);return n&&(n.unsubscribe(),e.cancelActive&&iq(n)),!!n};QK(l,{withTypes:()=>l});let u=async(e,n,s,l)=>{let u=new AbortController,d=Ffe(c,u.signal),f=[];try{e.pending.add(u),r(e),await Promise.resolve(e.effect(n,QK({},s,{getOriginalState:l,condition:(e,t)=>d(e,t).then(Boolean),take:d,delay:ZK(u.signal),pause:XK(u.signal),extra:a,signal:u.signal,fork:Pfe(u.signal,f),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==u&&(e.abort(HK),n.delete(e))})},cancel:()=>{u.abort(HK),e.pending.delete(u)},throwIfCancelled:()=>{JK(u.signal)}})))}catch(e){e instanceof UK||aq(o,e,{raisedBy:`effect`})}finally{await Promise.all(f),u.abort(Mfe),i(e),e.pending.delete(u)}},d=Ife(t,n);return{middleware:e=>n=>r=>{if(!_G(r))return n(r);if(oq.match(r))return c(r.payload);if(Lfe.match(r)){d();return}if(sq.match(r))return l(r.payload);let i=e.getState(),a=()=>{if(i===$K)throw Error(lq(23));return i},s;try{if(s=n(r),t.size>0){let n=e.getState(),s=Array.from(t.values());for(let t of s){let s=!1;try{s=t.predicate(r,n,i)}catch(e){s=!1,aq(o,e,{raisedBy:`predicate`})}s&&u(t,r,e,a)}}}finally{i=$K}return s},startListening:c,stopListening:l,clearListeners:d}};function lq(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var uq=LK({name:`chartLayout`,initialState:{layoutType:`horizontal`,width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){e.margin.top=t.payload.top??0,e.margin.right=t.payload.right??0,e.margin.bottom=t.payload.bottom??0,e.margin.left=t.payload.left??0},setScale(e,t){e.scale=t.payload}}}),dq=uq.actions,fq=dq.setMargin,pq=dq.setLayout,mq=dq.setChartSize,hq=dq.setScale,gq=uq.reducer;function _q(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function vq(e){return Number.isFinite(e)}function yq(e){return typeof e==`number`&&e>0&&Number.isFinite(e)}function bq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xq(e){for(var t=1;t{if(t&&n){var r=n.width,i=n.height,a=t.align,o=t.verticalAlign,s=t.layout,c=t.position,l=t.offset,u=l===void 0?0:l;if(c!=null){if(Uue(c)){if(c===`top`&&TU(e.top))return xq(xq({},e),{},{top:e.top+(i||0)+u});if(c===`bottom`&&TU(e.bottom))return xq(xq({},e),{},{bottom:e.bottom+(i||0)+u});if(c===`left`&&TU(e.left))return xq(xq({},e),{},{left:e.left+(r||0)+u});if(c===`right`&&TU(e.right))return xq(xq({},e),{},{right:e.right+(r||0)+u})}return e}if((s===`vertical`||s===`horizontal`&&o===`middle`)&&a!==`center`&&TU(e[a]))return xq(xq({},e),{},{[a]:e[a]+(r||0)});if((s===`horizontal`||s===`vertical`&&a===`center`)&&o!==`middle`&&TU(e[o]))return xq(xq({},e),{},{[o]:e[o]+(i||0)})}return e},Dq=(e,t)=>e===`horizontal`&&t===`xAxis`||e===`vertical`&&t===`yAxis`||e===`centric`&&t===`angleAxis`||e===`radial`&&t===`radiusAxis`,Oq=(e,t,n,r)=>{if(r)return e.map(e=>e.coordinate);var i,a,o=e.map(e=>(e.coordinate===t&&(i=!0),e.coordinate===n&&(a=!0),e.coordinate));return i||o.push(t),a||o.push(n),o},kq=(e,t,n)=>{if(!e)return null;var r=e.duplicateDomain,i=e.type,a=e.range,o=e.scale,s=e.realScaleType,c=e.isCategorical,l=e.categoricalDomain,u=e.tickCount,d=e.ticks,f=e.niceTicks,p=e.axisType;if(!o)return null;var m=s===`scaleBand`&&o.bandwidth?o.bandwidth()/2:2,h=(t||n)&&i===`category`&&o.bandwidth?o.bandwidth()/m:0;return h=p===`angleAxis`&&a&&a.length>=2?SU(a[0]-a[1])*2*h:h,t&&(d||f)?(d||f||[]).map((e,t)=>{var n=r?r.indexOf(e):e,i=o.map(n);return vq(i)?{coordinate:i+h,value:e,offset:h,index:t}:null}).filter(PU):c&&l?l.map((e,t)=>{var n=o.map(e);return vq(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(PU):o.ticks&&!n&&u!=null?o.ticks(u).map((e,t)=>{var n=o.map(e);return vq(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(PU):o.domain().map((e,t)=>{var n=o.map(e);return vq(n)?{coordinate:n+h,value:r?r[e]:e,index:t,offset:h}:null}).filter(PU)},Aq={sign:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r=0?(s[0]=i,i+=u,s[1]=i):(s[0]=a,a+=u,s[1]=a)}}}},expand:cde,none:gW,silhouette:lde,wiggle:ude,positive:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r=0?(o[0]=i,i+=s,o[1]=i):(o[0]=0,o[1]=0)}}}}},jq=(e,t,n)=>{var r=Aq[n]??gW,i=sde().keys(t).value((e,t)=>Number(Tq(e,t,0))).order(_W).offset(r)(e);return i.forEach((n,r)=>{n.forEach((n,i)=>{var a=Tq(e[i],t[r],0);Array.isArray(a)&&a.length===2&&TU(a[0])&&TU(a[1])&&(n[0]=a[0],n[1]=a[1])})}),i};function Mq(e){return e==null?void 0:String(e)}function Nq(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type===`category`){if(!t.allowDuplicatedCategory&&t.dataKey&&!MU(i[t.dataKey])){var s=jU(n,`value`,i[t.dataKey]);if(s)return s.coordinate+r/2}return n!=null&&n[a]?n[a].coordinate+r/2:null}var c=Tq(i,MU(o)?t.dataKey:o),l=t.scale.map(c);return TU(l)?l:null}var Pq=e=>{var t=e.flat(2).filter(TU);return[Math.min(...t),Math.max(...t)]},Fq=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],Iq=(e,t,n)=>{if(e!=null&&Object.keys(e).length!==0)return Fq(Object.keys(e).reduce((r,i)=>{var a=e[i];if(!a)return r;var o=a.stackedData.reduce((e,r)=>{var i=Pq(_q(r,t,n));return!vq(i[0])||!vq(i[1])?e:[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(o[0],r[0]),Math.max(o[1],r[1])]},[1/0,-1/0]))},Lq=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Rq=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,zq=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=sG(t,e=>e.coordinate),a=[],o=0,s=1,c=i.length;su&&(d=Math.min(f,d));return d===1/0?0:d}return n?void 0:0};function Bq(e){var t=e.tooltipEntrySettings,n=e.dataKey,r=e.payload,i=e.value,a=e.name;return xq(xq({},t),{},{dataKey:n,payload:r,value:i,name:a})}function Vq(e,t){if(e!=null)return String(e);if(typeof t==`string`)return t}var Hq=(e,t)=>{if(t===`horizontal`)return e.relativeX;if(t===`vertical`)return e.relativeY},Uq=(e,t)=>t===`centric`?e.angle:e.radius,Wq=e=>e.layout.width,Gq=e=>e.layout.height,Kq=e=>e.layout.scale,qq=e=>e.layout.margin,Jq=$(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Yq=$(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),Xq=`data-recharts-item-index`;function Zq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qq(e){for(var t=1;te.brush.height;function rJ(e){return Yq(e).reduce((e,t)=>t.orientation===`left`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function iJ(e){return Yq(e).reduce((e,t)=>t.orientation===`right`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function aJ(e){return Jq(e).reduce((e,t)=>t.orientation===`top`&&!t.mirror&&!t.hide?e+(typeof t.height==`number`?t.height:30):e,0)}function oJ(e){return Jq(e).reduce((e,t)=>t.orientation===`bottom`&&!t.mirror&&!t.hide?e+(typeof t.height==`number`?t.height:30):e,0)}var sJ=$([Wq,Gq,qq,nJ,rJ,iJ,aJ,oJ,cG,Gde],(e,t,n,r,i,a,o,s,c,l)=>{var u={left:(n.left||0)+i,right:(n.right||0)+a},d=Qq(Qq({},{top:(n.top||0)+o,bottom:(n.bottom||0)+s}),u),f=d.bottom;d.bottom+=r,d=Eq(d,c,l);var p=e-d.left-d.right,m=t-d.top-d.bottom;return Qq(Qq({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(m,0)})}),cJ=$(sJ,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),lJ=$(Wq,Gq,(e,t)=>({x:0,y:0,width:e,height:t})),uJ=(0,v.createContext)(null),dJ=()=>(0,v.useContext)(uJ)!=null,fJ=e=>e.brush,pJ=$([fJ,sJ,qq],(e,t,n)=>({height:e.height,x:TU(e.x)?e.x:t.left,y:TU(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:TU(e.width)?e.width:t.width}));function mJ(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}function hJ(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=mJ(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?((r||i)&&(s=e.apply(this,t)),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function gJ(e,t=0,n={}){let{leading:r=!0,trailing:i=!0}=n;return hJ(e,t,{leading:r,maxWait:t,trailing:i})}var _J=function(e,t){var n=[...arguments].slice(2);if(typeof console<`u`&&console.warn&&(t===void 0&&console.warn(`LogUtils requires an error message argument`),!e)){if(t===void 0)console.warn(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var r=0;console.warn(t.replace(/%s/g,()=>n[r++]))}}},vJ={width:`100%`,height:`100%`,debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},yJ=(e,t,n)=>{var r=n.width,i=r===void 0?vJ.width:r,a=n.height,o=a===void 0?vJ.height:a,s=n.aspect,c=n.maxHeight,l=wU(i)?e:Number(i),u=wU(o)?t:Number(o);return s&&s>0&&(l?u=l/s:u&&(l=u*s),c&&u!=null&&u>c&&(u=c)),{calculatedWidth:l,calculatedHeight:u}},bJ={width:0,height:0,overflow:`visible`},xJ={width:0,overflowX:`visible`},SJ={height:0,overflowY:`visible`},CJ={},wJ=e=>{var t=e.width,n=e.height,r=wU(t),i=wU(n);return r&&i?bJ:r?xJ:i?SJ:CJ};function TJ(e){var t=e.width,n=e.height,r=e.aspect,i=t,a=n;return i===void 0&&a===void 0?(i=vJ.width,a=vJ.height):i===void 0?i=r&&r>0?void 0:vJ.width:a===void 0&&(a=r&&r>0?void 0:vJ.height),{width:i,height:a}}var EJ=[`aspect`,`initialDimension`,`width`,`height`,`minWidth`,`minHeight`,`maxHeight`,`children`,`debounce`,`id`,`className`,`onResize`,`style`];function DJ(){return DJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let e=a.current,t=o.current;if(!e||!t)return;let n=n=>{let r=e.querySelector(`[data-selected="true"]`);if(!r){Z.set(t,{autoAlpha:0});return}let i=e.getBoundingClientRect(),a=r.getBoundingClientRect();Z.to(t,{x:a.left-i.left,y:a.top-i.top,width:a.width,height:a.height,autoAlpha:1,duration:n?WB(BB.base):0,ease:VB.out,overwrite:!0})};n(s.current),s.current=!0;let r=new ResizeObserver(()=>n(!1));return r.observe(e),()=>{r.disconnect(),Z.killTweensOf(t)}},[e,n]),(0,G.jsxs)(`div`,{ref:a,className:`filter-toggle relative inline-flex ${i??``}`,children:[(0,G.jsx)(`span`,{ref:o,"aria-hidden":!0,className:`filter-toggle__pill pointer-events-none absolute left-0 top-0 opacity-0`}),(0,G.jsx)(pj,{"aria-label":r,size:`sm`,selectionMode:`single`,disallowEmptySelection:!0,selectedKeys:new Set([e]),onSelectionChange:n=>{let r=[...n][0];typeof r==`string`&&r!==e&&t(r)},children:n.map(e=>(0,G.jsxs)(aA,{id:e.id,className:`relative z-[1]`,style:_le,children:[e.icon,e.label]},e.id))})]})}function TV(e,t=!1){if(!e)return;let n=e.toDate(kw());if(Number.isFinite(n.getTime()))return t&&n.setSeconds(59,999),n.toISOString()}function EV(e){if(!e)return null;let t=Date.parse(e);if(!Number.isFinite(t))return null;try{return Yw(kre(new Date(t).toISOString()))}catch{return null}}function DV({value:e,onChange:t,ariaLabel:n,fromLabel:r,toLabel:i,className:a}){return(0,G.jsx)(Pk,{className:a,granularity:`minute`,hourCycle:24,shouldForceLeadingZeros:!0,value:e,onChange:e=>t(e),"aria-label":n,children:({state:e})=>(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(vO.Group,{className:`w-full min-w-0`,variant:`secondary`,children:[(0,G.jsx)(vO.Input,{className:`min-w-0`,slot:`start`,"aria-label":r,children:e=>(0,G.jsx)(vO.Segment,{segment:e})}),(0,G.jsx)(Pk.RangeSeparator,{}),(0,G.jsx)(vO.Input,{className:`min-w-0`,slot:`end`,"aria-label":i,children:e=>(0,G.jsx)(vO.Segment,{segment:e})}),(0,G.jsx)(vO.Suffix,{children:(0,G.jsx)(Pk.Trigger,{children:(0,G.jsx)(Pk.TriggerIndicator,{})})})]}),(0,G.jsxs)(Pk.Popover,{className:`flex w-[20.5rem] max-w-[calc(100vw-2rem)] flex-col gap-3 p-3`,children:[(0,G.jsxs)(HF,{"aria-label":n,children:[(0,G.jsxs)(HF.Header,{children:[(0,G.jsxs)(HF.YearPickerTrigger,{children:[(0,G.jsx)(HF.YearPickerTriggerHeading,{}),(0,G.jsx)(HF.YearPickerTriggerIndicator,{})]}),(0,G.jsx)(HF.NavButton,{slot:`previous`}),(0,G.jsx)(HF.NavButton,{slot:`next`})]}),(0,G.jsxs)(HF.Grid,{children:[(0,G.jsx)(HF.GridHeader,{children:e=>(0,G.jsx)(HF.HeaderCell,{children:e})}),(0,G.jsx)(HF.GridBody,{children:e=>(0,G.jsx)(HF.Cell,{date:e})})]}),(0,G.jsx)(HF.YearPickerGrid,{children:(0,G.jsx)(HF.YearPickerGridBody,{children:({year:e})=>(0,G.jsx)(HF.YearPickerCell,{year:e})})})]}),(0,G.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,G.jsx)(kM,{className:`text-xs`,children:r}),(0,G.jsx)(Yk,{"aria-label":r,granularity:`minute`,hourCycle:24,value:e.timeRange?.start??null,onChange:t=>e.setTimeRange({start:t,end:e.timeRange?.end}),children:(0,G.jsx)(Yk.Group,{className:`w-[7.5rem]`,variant:`secondary`,children:(0,G.jsx)(Yk.Input,{children:e=>(0,G.jsx)(Yk.Segment,{segment:e})})})})]}),(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,G.jsx)(kM,{className:`text-xs`,children:i}),(0,G.jsx)(Yk,{"aria-label":i,granularity:`minute`,hourCycle:24,value:e.timeRange?.end??null,onChange:t=>e.setTimeRange({start:e.timeRange?.start,end:t}),children:(0,G.jsx)(Yk.Group,{className:`w-[7.5rem]`,variant:`secondary`,children:(0,G.jsx)(Yk.Input,{children:e=>(0,G.jsx)(Yk.Segment,{segment:e})})})})]})]})]})]})})}var OV={today:`statsWindowToday`,1:`statsWindow1h`,24:`statsWindow24h`,168:`statsWindow7d`,720:`statsWindow30d`,custom:`statsWindowCustom`};function kV(e,t){if(e===`today`){let e=new Date;return e.setHours(0,0,0,0),{from:e.toISOString()}}if(e===`custom`){let e=TV(t?.start),n=TV(t?.end,!0);return e&&n?{from:e,to:n}:null}if(e===`720`){let e=new Date;return{from:new Date(e.getTime()-2592e6).toISOString(),to:e.toISOString()}}return{hours:Number(e)}}function AV({value:e,onChange:t,custom:n,onCustomChange:r,onBusy:i,t:a}){return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(wV,{value:e,onChange:r=>{let a=r;e!==a&&((a!==`custom`||n)&&i?.(),t(a))},ariaLabel:a(`statsTraffic`),options:Object.keys(OV).map(e=>({id:e,label:a(OV[e])}))}),e===`custom`?(0,G.jsx)(DV,{className:`w-[min(100%,24rem)]`,value:n,onChange:e=>{e&&i?.(),r(e)},ariaLabel:a(`statsWindowCustom`),fromLabel:a(`logsTimeFrom`),toLabel:a(`logsTimeTo`)}):null]})}function jV(e,t,n){let r=new URLSearchParams;for(let[t,n]of Object.entries(e))n&&r.set(t,n);let i=Date.parse(t),a=Date.parse(n);return Number.isFinite(i)&&Number.isFinite(a)&&(r.set(`from`,new Date(Math.floor(i/6e4)*6e4).toISOString()),r.set(`to`,new Date(Math.ceil(a/6e4)*6e4-6e4).toISOString())),`/logs?${r}`}function MV(e){let t=String(e||``).toLowerCase();return!t||t===`qoder`||t===`qoder-global`||t===`qoder-cn`}function NV(e){return String(e||``).toLowerCase()===`workbuddy`}function PV(e){return String(e||``).toLowerCase()===`trae`}function FV(e){return String(e||``).toLowerCase()===`devin`}function IV(e){return String(e||``).toLowerCase()===`command`}function LV(e){return String(e||``).toLowerCase()===`zhipu`}function RV(e){return String(e||``).toLowerCase()===`qwenwork`}function zV(e){return String(e||``).toLowerCase()===`kimi`}function BV(e){return String(e||``).toLowerCase()===`codearts`}function VV(e){let t=String(e||``).toLowerCase();return t===`meta`||t===`muse`}function HV(e,t){let n=String(e||``).toLowerCase();return NV(n)?`WorkBuddy`:PV(n)?`Trae`:FV(n)?`Devin`:IV(n)?`Command Code`:LV(n)?`Zhipu GLM`:RV(n)?`QwenWork`:zV(n)?`Kimi Code`:BV(n)?`CodeArts`:VV(n)?`Muse (Meta)`:MV(n)?`Qoder`:e||t(`account`)}function UV(e,t,n){let r=String(e||``).toLowerCase(),i=String(t||``).toLowerCase();return NV(r)?n(i===`global`?`accountTypeWorkBuddyGlobal`:`accountTypeWorkBuddyCN`):PV(r)?n(`accountTypeTraeCN`):FV(r)?n(`accountTypeDevinGlobal`):IV(r)?n(`accountTypeCommandGlobal`):LV(r)?n(`accountTypeZhipuCN`):RV(r)?n(i===`cn`?`accountTypeQwenworkCN`:`accountTypeQwenworkGlobal`):zV(r)?n(`accountTypeKimiCN`):BV(r)?n(`accountTypeCodeArtsCN`):VV(r)?n(`accountTypeMetaGlobal`):MV(r)?n(i===`cn`?`accountTypeQoderCN`:`accountTypeQoderGlobal`):e||n(`account`)}function vle(e,t){let n=t??!!e.max_mode,r=e.catalog_context_length||e.default_context_length||e.context_length||0,i=e.catalog_context_length_max||0;return n&&i>0?{context_length:i,prompt_max_tokens:e.prompt_max_tokens_max||e.prompt_max_tokens,max_output_tokens:e.max_output_tokens_max||e.max_output_tokens}:{context_length:r,prompt_max_tokens:e.prompt_max_tokens,max_output_tokens:e.max_output_tokens}}function yle({size:e=16,className:t=``}){return(0,G.jsx)(`span`,{className:`inline-flex shrink-0 items-center justify-center rounded-[22%] bg-[#0a84ff] text-white ${t}`.trim(),style:{width:e,height:e,fontSize:Math.max(9,Math.round(e*.55)),fontWeight:650,lineHeight:1},"aria-hidden":`true`,children:`C`})}function ble({size:e=16,className:t=``}){return(0,G.jsx)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,className:`block shrink-0 text-foreground ${t}`.trim(),"aria-hidden":`true`,children:(0,G.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M8.086.457a6.1 6.1 0 0 1 3.046-.415q2 .23 3.564 1.7a.12.12 0 0 0 .107.029q2.112-.519 4.061.366l.063.03l.154.076q2.036 1.055 2.918 3.198a5.6 5.6 0 0 1 .421 2.126 5.7 5.7 0 0 1-.18 1.631.17.17 0 0 0 .04.155 6 6 0 0 1 1.578 2.891q.577 2.852-1.183 5.14l-.182.22a6.06 6.06 0 0 1-2.934 1.851.16.16 0 0 0-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451q-2.374-.012-4.21-1.736a.14.14 0 0 0-.14-.032 5.9 5.9 0 0 1-1.604-.185 5.9 5.9 0 0 1-2.595-.622 6.06 6.06 0 0 1-2.146-1.781c-.203-.269-.404-.522-.551-.821a8 8 0 0 1-.495-1.283 6.1 6.1 0 0 1-.017-3.064.2.2 0 0 0 .008-.074.1.1 0 0 0-.037-.064 6 6 0 0 1-1.38-2.202 5.2 5.2 0 0 1-.333-1.589 6.9 6.9 0 0 1 .188-2.132q.675-2.226 2.577-3.493.424-.282.802-.438.429-.179.861-.304a.13.13 0 0 0 .087-.087A6 6 0 0 1 5.635 2.31Q6.655 1.04 8.086.457m-.804 7.85a.848.848 0 0 0-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 0 0 1.46.864l1.94-3.272a.85.85 0 0 0 .007-.854zm5.446 6.24a.849.849 0 0 0 0 1.695h4.848a.849.849 0 0 0 0-1.696z`})})}function xle({size:e=16,className:t=``}){return(0,G.jsx)(`span`,{className:`inline-flex shrink-0 items-center justify-center rounded-[22%] bg-[#1a1a1a] text-white ${t}`.trim(),style:{width:e,height:e,fontSize:Math.max(9,Math.round(e*.55)),fontWeight:650,lineHeight:1},"aria-hidden":`true`,children:`D`})}var Sle=`/assets/kiro-mark-dark-DwOgnaUN.webp`,Cle=`/assets/kiro-mark-light-CV-MOfJu.webp`;function wle({size:e=16,className:t=``}){let n=`block shrink-0 ${t}`.trim();return(0,G.jsxs)(`span`,{className:`inline-flex shrink-0`,style:{width:e,height:e},"aria-hidden":`true`,children:[(0,G.jsx)(`img`,{src:Cle,alt:``,width:e,height:e,className:`${n} dark:hidden`,draggable:!1}),(0,G.jsx)(`img`,{src:Sle,alt:``,width:e,height:e,className:`${n} hidden dark:block`,draggable:!1})]})}function Tle({size:e=16,className:t=``}){return(0,G.jsx)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,className:`block shrink-0 text-foreground ${t}`.trim(),"aria-hidden":`true`,children:(0,G.jsx)(`path`,{fill:`currentColor`,d:`M21 12.79A9 9 0 1 1 11.21 3a7 7 0 0 0 9.79 9.79Z`})})}function Ele({size:e=16,className:t=``}){return(0,G.jsx)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,className:`block shrink-0 text-foreground ${t}`.trim(),"aria-hidden":`true`,children:(0,G.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,d:`M8 6a4 4 0 0 0 0 8c.9 0 1.7-.3 2.4-.8L14 16.8A4 4 0 1 0 16 8a3.9 3.9 0 0 0-2.4.8L10 5.2A4 4 0 0 0 8 6Zm0 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm8 4a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z`,clipRule:`evenodd`})})}var Dle=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAYAAAA9zQYyAAAJ5ElEQVR42u2dXUxUZxrH/wKDDDCM4CJBZJZNxMpGDMGYXsAWeikapF6Jqc02kUhWTWsTIQHjNk22yWCyN5INrk22rbsc71ZNpXfb0sJ+Gcxmma2mNpt1XMsaLd2ZoY7D5164btfiBx8zzDnv+f1uiWeG9/x8eN7neT9WFRaunROAIWQwBIDQAAgNgNAACA0IDYDQAAgNgNAACA0IDYDQAAgNgNAACA0IDYDQAAgNgNAACA0IDYDQAAgNgNAACA0IDYDQAAgNgNAA35LFEDyZ6uotKi8PqL6+ToFAuQoK/PL7/fL7CyRJ4fBNRaMRhcM3FQ6HFQqFNDoaUiQSYfDSxCqO031U4Lq6OjU1Nam6eov8fv+inxGJRDQ6GtLAwIAs6xxyI/TK0tTUpJ07d6iurk6BQCCpz45EIurrO62+vtOIjdCpIxAIqLPzWEokRmyEXjHq6+vU0dGh+vq6tHw+YiN00iJyb++ptImM2Aid1NSitbXVlt8vEomoq+u4LMvCRIR+Oq2trersPLYiOfJyCYfD6u4+rkuXBjASoZ0VlZ/G0NCwenp6NDQ0jJkI/aCOfPbs+46IyogtWt9Po739oAYHP3a8zNKDaszFixd08eIF20xkidArSGdnhzo7O4x9SZZlKRg8qXA4jLGmC/322z9Te/tBV7ysvr7TCgZ7KPWZKnRv7ynt29fqqhdGDdtQod0oM2IbKrSb0gzEXhyZXm/um06bAL7++muY/F9ycnJUX1+nPXteUiQSVSgUIkI75cvu29eq3t5TWKyndx0PHz7i2hq2Y4QOBAIaHPxoSYvu3YhbmzOOENrv92tw8CMjmiaILTqFnZ0dyKzldx2rq7cQoe3yQkB0HZ0uNKlG6ggGe4ws9dlaaOrNSyM2e0+3pu4oOntPX07dnffzzasDKvMUazY2ZVwN27ZCV1dv0eDgx9i5AK4lbuhy/Joux6/q1vRdXUvcWNC/K8sq1nbvZpXeX6N/9X+m3/zyrOPFtq3QLJ18egT+c/yqfjcx8j+Jk8GmyfWaOPOFRt4bRGgmgqnnfPRTnY99osvxayn9nJmxuKI/v6r7g7cRmuicXG5N3dEvxn+b1Ei8UCZHxvXvt/6qmbE4QhOdkyPy+dinaf0ec7Fpxd65rm+sf4jDGpdAR0eH3L4Ww7LO6Z2KQWVvK0p/xPNlqeBolTLyPYqduS46hVpc3dnNqYZlWWpublEw2GO775bftlFrTmwlQmuRG13dGpWDwZO2P3DGu6tMM2NxW0dqhE4zo6Mh7d//imNa0fltGyXJtlJn2Gky6LalocFgjxoaGh23riK/baMt8ntbC93U1OQqmbu6um2ZKy+UNSe2KsPnQWg98Sy6vXLLHsD9+19RX99pR/8emaVe5R/YiNB6wm4UN6QbkUhEzc27jTmUMa+1QpmlXoSen27scI3Mo6NmbWL1tVUitB6zss50TJRZelDKs1OUtoXQdXVmN1MOHz5ipMwPyWksQWj9X3fQ5B0pwWCP+vvNPqE/b28FQn87ISw39kX391uOLs1pERUPz6YChJak8vKAse3s7u7jcgvZtUUIbWqEflhrdtNZczkNJQj9MIc2MW82eRL4OEg5DBV6aGjY8V1ALXHddOZ6L0L7/QUyrUTnVrJKcxHatFTDzfeg2KHBgtBJPng8aS/GhivZENpl0TmZVY1VviwGFaGVtpqzGyeCRGiZe91a0l9MvoeBRej05M6WdS65L8XnIeVA6PRF52R3BO22aB6hSTdkQtcNoeW++0tSsV4ja5OPwUVopeGko3MyeV0EQrtsMjgwkJrNrp5KhEboFWZ4ODXpRva2IiocCJ2e/DkVrK5dy+Ai9MozMPBhSp5r1yO2EFpmt7pTsaouw+exzVYmhHYRoVDI+N3TCE3+LFP25SG061KOmynJnWmoILQxKYfdzohDaLmrqaIkL0ZiMojQxghNdDZI6Egk6riSXbKjs3dXGSaaI3TE1S9gzU+3YiFCm0H2tiJyZ9OETkUJzEkX74BhQkej7ozQvrZKtlqZKLTbDjWUHizgf3iBJRiYQ7tJ6gyfR/4T1Zhnch06FBp1zYDnt21ki5XpQg8N/d4Vg+3dVcaKOjcIPTw8LDfkzf6jP8Q4NwgdDodTtuFUNjnzrfBkLXsF3bSW49KlD42VeW3f85To3Ca0ZVnGHRaOzC5fbRcMnkRmMEdoU6I0MiO0MVEamRF6XpS2LGfejZ3XWqHiX9cjM0LPj9JOSz0K3qhSwdEqSnMIrcfWpZubWxyxVjqz1Kt1FxrpACL0QqTebWupfW2VWnehkRQDobXgpaXd3cdtJ3Xurg1ad6GRJaAIvXj6+y01N++2TU6dWeqV/0Q1URmhlxepm5tbUnYEFyB02nLqrq5u1+8UB4MOmunrO62amtqkX0UMCK10btsKBnvSInZBZh7WIHRqxW5oeHHFuou+jFysQejU59eHDh1RTU3tikwcN6/+PuYg9MpNHJubd6dU7LKs72EOQmtFT9hPpdjPrQ5gDkKbI/Z2bxXmIHT6xT506EhSOo5V5NAILZusta6pqV12c8aXkavt3s3Yg9AypjnT4nsBexBaxjRniNAI7QixF0qZp1gtvh9hEELbX+yFdh1/UvQSA4fQckTXsaGh8ZmlPqI0QjuGB2uwn13DJkojtExqzpR5ipEaoZ0t9nebM4eK9rC+Q9LMWByhnSh2TU3tvK7jr8q6XC+1HYTO9Hpz30RTLekCe8s6p0QioerqLSrOLdJ2b5U+nPijJuembP3d52LTWrU6I+nPjAT/prnJWYR2KolEQsPDw3r33feUSCT0Yk29NuSV6HL8qm2ljn9wS18f/4vuf3JbWaW5ylyfnN3r37z/dyX+cCftv9+qwsK1c6iZHPx+v9rbD6rx1R16baJXsdl7tkoHIm+NKjHylb57m63vQKWytxUt69l3Xx7WbGwKoU0V++U3XtVnLfd1LXEj7SJPnPlC9z745zPPG8ndtUF5eysWdT7fzFhcXx+7oqnPo7YYe4ROIYUb1ir/QKWmmwpX/LMnR8YVv3TrmSI/7h7FvL0VCxJ7Ziyur9r/ZIvJIEKvID94/jlFf7xmWX/WFxotJ0fGFTtzfdmSZfg88u4sU05DiTybCh6Re6n/WRDaMLK3FSmnoUS5Ozck7djdyZFx3R+8rckr4yn9s/9w8jjzZdzWY4zQSs/1yFmbfMppKFHOCyULrjTMxaY19XlUU9ejmhwZ1+SVcVtMxBAa5gmeWepVZqlXGT7PIz+bjU1pbmJa02P3bB8dERqA1jcAQgNCAyA0AEIDIDQAQgNCAyA0AEIDIDQAQgNCAyA0AEIDIDQAQgNCAyA0AEIDIDQgNABCAyA0AEIDIDQgNABCAyA0AEIDLIj/ABWOKFxbGBRBAAAAAElFTkSuQmCC`;function Ole({size:e=16,className:t=``}){return(0,G.jsx)(`img`,{src:Dle,alt:``,width:e,height:e,className:`block shrink-0 rounded-[22%] ${t}`.trim(),draggable:!1})}function kle({size:e=16,className:t=``}){let n=Math.max(2,Math.round(e*.14));return(0,G.jsxs)(`span`,{className:`inline-flex shrink-0 items-baseline justify-center rounded-[22%] bg-[#18181B] text-white ${t}`.trim(),style:{width:e,height:e,fontSize:Math.max(9,Math.round(e*.5)),fontWeight:650,lineHeight:1},"aria-hidden":`true`,children:[(0,G.jsx)(`span`,{style:{alignSelf:`center`},children:`Q`}),(0,G.jsx)(`span`,{style:{alignSelf:`center`,width:n,height:n,marginLeft:Math.max(0,Math.round(e*.03)),borderRadius:`50%`,background:`#22D3EE`}})]})}function Ale({size:e=16,className:t=``}){return(0,G.jsx)(`span`,{className:`inline-flex shrink-0 items-center justify-center rounded-[22%] bg-[#1a1a1a] text-white ${t}`.trim(),style:{width:e,height:e,fontSize:Math.max(9,Math.round(e*.55)),fontWeight:650,lineHeight:1},"aria-hidden":`true`,children:`T`})}var jle=`/assets/workbuddy-mark-D1Gu2IKl.svg`;function Mle({size:e=16,className:t=``}){return(0,G.jsx)(`img`,{src:jle,alt:``,width:e,height:e,className:`block shrink-0 ${t}`.trim(),draggable:!1})}function Nle({size:e=16,className:t=``}){return(0,G.jsx)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,className:`block shrink-0 text-foreground ${t}`.trim(),"aria-hidden":`true`,children:(0,G.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,d:`M11.991 23.503a.24.24 0 0 0-.244.248a.24.24 0 0 0 .244.249a.24.24 0 0 0 .245-.249a.24.24 0 0 0-.22-.247zM9.671 5.365a1.697 1.697 0 0 1 1.099 2.132l-.071.172l-.016.04l-.018.054c-.07.16-.104.32-.104.498c-.035.71.47 1.279 1.186 1.314h.366c1.309.053 2.338 1.173 2.286 2.523c-.052 1.332-1.152 2.38-2.478 2.327h-.174c-.715.018-1.274.64-1.239 1.368c0 .124.018.23.053.337c.209.373.54.658.96.8c.75.23 1.517-.125 1.9-.782l.018-.035c.402-.64 1.17-.96 1.92-.711c.854.284 1.378 1.226 1.099 2.167a1.66 1.66 0 0 1-2.077 1.102a1.7 1.7 0 0 1-.907-.711l-.017-.035c-.2-.323-.463-.58-.851-.711l-.056-.018a1.646 1.646 0 0 0-1.954.746a1.66 1.66 0 0 1-1.065.764a1.677 1.677 0 0 1-1.989-1.279c-.209-.906.332-1.83 1.257-2.043a1.5 1.5 0 0 1 .296-.035h.018c.68-.071 1.151-.622 1.116-1.333a1.3 1.3 0 0 0-.227-.693a2.5 2.5 0 0 1-.366-1.403a2.4 2.4 0 0 1 .366-1.208c.14-.195.21-.444.227-.693c.018-.71-.506-1.261-1.186-1.332l-.07-.018a1.4 1.4 0 0 1-.299-.07l-.05-.019a1.7 1.7 0 0 1-1.047-2.114a1.68 1.68 0 0 1 2.094-1.101m-5.575 10.11c.26-.264.639-.367.994-.27s.633.379.728.74c.095.362-.007.748-.267 1.013c-.402.41-1.053.41-1.455 0a1.06 1.06 0 0 1 0-1.482zm14.845-.294c.359-.09.738.024.992.297c.254.274.344.665.237 1.025s-.396.634-.756.718c-.551.128-1.1-.22-1.23-.781a1.05 1.05 0 0 1 .757-1.26zm-.064-4.39c.314.32.49.753.49 1.206s-.176.886-.49 1.206c-.315.32-.74.5-1.185.5c-.444 0-.87-.18-1.184-.5a1.727 1.727 0 0 1 0-2.412a1.654 1.654 0 0 1 2.369 0m-11.243.163c.364.484.447 1.128.218 1.691a1.665 1.665 0 0 1-2.188.923c-.855-.36-1.26-1.358-.907-2.228a1.68 1.68 0 0 1 1.33-1.038a1.66 1.66 0 0 1 1.547.652m11.545-4.221c.368 0 .708.2.892.524s.184.724 0 1.048a1.03 1.03 0 0 1-.892.524a1.04 1.04 0 0 1-1.03-1.048a1.04 1.04 0 0 1 1.03-1.048m-14.358 0c.368 0 .707.2.891.524s.184.724 0 1.048a1.03 1.03 0 0 1-.891.524a1.04 1.04 0 0 1-1.03-1.048c0-.579.461-1.048 1.03-1.048m10.031-1.475c.925 0 1.675.764 1.675 1.706s-.75 1.705-1.675 1.705s-1.674-.763-1.674-1.705s.75-1.706 1.674-1.706m-2.626-.684c.362-.082.653-.356.761-.718a1.06 1.06 0 0 0-.238-1.028a1.02 1.02 0 0 0-.996-.294c-.547.14-.881.7-.752 1.257c.13.558.675.907 1.225.783m0 16.876c.359-.087.644-.36.75-.72a1.06 1.06 0 0 0-.237-1.019a1.02 1.02 0 0 0-.985-.301a1.04 1.04 0 0 0-.762.717c-.108.361-.017.754.239 1.028c.245.263.606.377.953.305zM17.19 3.5a.63.63 0 0 0 .628-.64a.63.63 0 0 0-.628-.64a.63.63 0 0 0-.628.64c0 .355.28.64.628.64m-10.38 0a.63.63 0 0 0 .628-.64c0-.355-.28-.64-.628-.64a.63.63 0 0 0-.628.64c0 .355.279.64.628.64m-5.182 7.852a.63.63 0 0 0-.628.64c0 .354.28.639.628.639a.63.63 0 0 0 .627-.606l.001-.034a.62.62 0 0 0-.628-.64zm5.182 9.13a.63.63 0 0 0-.628.64c0 .355.279.64.628.64a.63.63 0 0 0 .628-.64c0-.355-.28-.64-.628-.64m10.38.018a.63.63 0 0 0-.628.64c0 .355.28.64.628.64a.63.63 0 0 0 .628-.64a.63.63 0 0 0-.628-.64m5.182-9.148a.63.63 0 0 0-.628.64c0 .354.279.639.628.639a.63.63 0 0 0 .628-.64c0-.355-.28-.64-.628-.64zm-.384-4.992a.24.24 0 0 0 .244-.249a.24.24 0 0 0-.244-.249a.24.24 0 0 0-.244.249c0 .142.122.249.244.249M11.991.497a.24.24 0 0 0 .245-.248A.24.24 0 0 0 11.99 0a.24.24 0 0 0-.244.249c0 .133.108.236.223.247zM2.011 6.36a.24.24 0 0 0 .245-.249a.24.24 0 0 0-.244-.249a.24.24 0 0 0-.244.249a.24.24 0 0 0 .244.249zm0 11.263a.24.24 0 0 0-.243.248a.24.24 0 0 0 .244.249a.24.24 0 0 0 .244-.249a.25.25 0 0 0-.244-.248zm19.995-.018a.24.24 0 0 0-.245.248a.24.24 0 0 0 .245.25a.24.24 0 0 0 .244-.25a.25.25 0 0 0-.244-.248z`})})}function WV({provider:e,size:t=16,className:n=``}){let r=String(e||``).toLowerCase();return r===`workbuddy`?(0,G.jsx)(Mle,{size:t,className:n}):r===`trae`?(0,G.jsx)(Ale,{size:t,className:n}):r===`devin`?(0,G.jsx)(xle,{size:t,className:n}):r===`command`?(0,G.jsx)(yle,{size:t,className:n}):r===`codex`?(0,G.jsx)(ble,{size:t,className:n}):r===`zhipu`?(0,G.jsx)(Nle,{size:t,className:n}):r===`qwenwork`?(0,G.jsx)(kle,{size:t,className:n}):r===`kimi`?(0,G.jsx)(Tle,{size:t,className:n}):r===`kiro`?(0,G.jsx)(wle,{size:t,className:n}):r===`meta`||r===`muse`?(0,G.jsx)(Ele,{size:t,className:n}):(0,G.jsx)(Ole,{size:t,className:n})}var Ple=(0,v.lazy)(()=>C(()=>import(`./LiveSparkline-CpXF5h0H.js`).then(e=>({default:e.LiveSparkline})),[]));function Fle({live:e,samples:t,t:n,onConcurrencyClick:r}){let i=e?.in_flight??null,a=e?.capacity??0,o=i!=null&&a>0?i/a:0,s=a>0&&i!=null&&i>=a,c=(0,G.jsxs)(G.Fragment,{children:[n(`liveConcurrency`),(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,G.jsxs)(`span`,{className:`mono tabular text-body font-semibold ${s?`text-warning`:`text-foreground`}`,children:[i??`—`,(0,G.jsxs)(`span`,{className:`font-normal text-muted`,children:[`/`,e?a:`—`]})]}),(0,G.jsx)(`span`,{className:`inline-block h-[3px] w-12 overflow-hidden rounded-[2px] bg-separator`,children:(0,G.jsx)(`span`,{className:`block h-full ${s?`bg-warning`:`bg-foreground/60`}`,style:{width:`${Math.min(100,o*100)}%`}})})]})]});return(0,G.jsxs)(`div`,{"data-testid":`live-strip`,className:`flex min-h-11 flex-wrap items-center gap-x-5 gap-y-2 overflow-hidden rounded-lg bg-surface-secondary px-4 py-2.5 text-caption text-muted sm:h-11 sm:gap-x-6 sm:gap-y-1 sm:py-0`,children:[(0,G.jsx)(`span`,{className:`inline-flex items-center`,children:(0,G.jsx)(`span`,{className:`status-dot`,"data-state":i==null?``:s?`warn`:i>0?`ok`:``})}),r?(0,G.jsx)(`button`,{type:`button`,"data-testid":`live-strip-concurrency`,onClick:r,className:`inline-flex flex-col gap-1 rounded-md text-left outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-focus sm:flex-row sm:items-center sm:gap-2`,"aria-label":n(`inflightExpandFromConcurrency`),children:c}):(0,G.jsx)(`span`,{className:`inline-flex flex-col gap-1 sm:flex-row sm:items-center sm:gap-2`,children:c}),(0,G.jsxs)(`span`,{className:`inline-flex flex-col gap-1 sm:flex-row sm:items-center sm:gap-2`,children:[n(`liveRpm`),(0,G.jsx)(`span`,{className:`mono tabular text-body font-semibold text-foreground`,children:e?.rpm??`—`})]}),(0,G.jsxs)(`span`,{className:`inline-flex flex-col gap-1 sm:flex-row sm:items-center sm:gap-2`,children:[n(`liveTrace`),(0,G.jsx)(v.Suspense,{fallback:(0,G.jsx)(`span`,{className:`inline-block h-6 w-[120px]`}),children:(0,G.jsx)(Ple,{samples:t,capacity:a,label:n(`liveTrace`)})})]})]})}var Ile=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,Lle=/(?:(-)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,Rle=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/gi,zle=/(^[#\.][a-z]|[a-y][a-z])/i,Ble=Math.PI/180,Vle=180/Math.PI,GV=Math.sin,KV=Math.cos,qV=Math.abs,JV=Math.sqrt,Hle=Math.atan2,YV=1e8,XV=function(e){return typeof e==`string`},ZV=function(e){return typeof e==`number`},Ule=function(e){return e===void 0},Wle={},Gle={},QV=1e5,$V=function(e){return Math.round((e+YV)%1*QV)/QV||(e<0?0:1)},eH=function(e){return Math.round(e*QV)/QV||0},tH=function(e){return Math.round(e*1e10)/1e10||0},nH=function(e){return e.closed=Math.abs(e[0]-e[e.length-2])<.001&&Math.abs(e[1]-e[e.length-1])<.001},rH=function(e,t,n,r){var i=e[t],a=r===1?6:uH(i,n,r);if((a||!r)&&a+n+2t){for(;--i&&e[i]>t;);i<0&&(i=0)}else for(;e[++i] element or an SVG path data string`)}function Jle(e){for(var t=[],n=0;n-1;)a=r[i].nodeName.toLowerCase(),t.indexOf(`,`+a+`,`)<0&&n.setAttributeNS(null,a,r[i].nodeValue);return n},Zle={rect:`rx,ry,x,y,width,height`,circle:`r,cx,cy`,ellipse:`rx,ry,cx,cy`,line:`x1,x2,y1,y2`},Qle=function(e,t){for(var n=t?t.split(`,`):[],r={},i=n.length;--i>-1;)r[n[i]]=+e.getAttribute(n[i])||0;return r};function $le(e,t){var n=e.tagName.toLowerCase(),r=.552284749831,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T;return n===`path`||!e.getBBox?e:(l=Xle(e,`x,y,width,height,cx,cy,rx,ry,r,x1,x2,y1,y2,points`),T=Qle(e,Zle[n]),n===`rect`?(s=T.rx,c=T.ry||s,a=T.x,o=T.y,p=T.width-s*2,m=T.height-c*2,s||c?(h=a+s*(1-r),g=a+s,_=g+p,v=_+s*r,y=_+s,b=o+c*(1-r),x=o+c,S=x+m,C=S+c*r,w=S+c,i=`M`+y+`,`+x+` V`+S+` C`+[y,C,v,w,_,w,_-(_-g)/3,w,g+(_-g)/3,w,g,w,h,w,a,C,a,S,a,S-(S-x)/3,a,x+(S-x)/3,a,x,a,b,h,o,g,o,g+(_-g)/3,o,_-(_-g)/3,o,_,o,v,o,y,b,y,x].join(`,`)+`z`):i=`M`+(a+p)+`,`+o+` v`+m+` h`+-p+` v`+-m+` h`+p+`z`):n===`circle`||n===`ellipse`?(n===`circle`?(s=c=T.r,d=s*r):(s=T.rx,c=T.ry,d=c*r),a=T.cx,o=T.cy,u=s*r,i=`M`+(a+s)+`,`+o+` C`+[a+s,o+d,a+u,o+c,a,o+c,a-u,o+c,a-s,o+d,a-s,o,a-s,o-d,a-u,o-c,a,o-c,a+u,o-c,a+s,o-d,a+s,o].join(`,`)+`z`):n===`line`?i=`M`+T.x1+`,`+T.y1+` L`+T.x2+`,`+T.y2:(n===`polyline`||n===`polygon`)&&(f=(e.getAttribute(`points`)+``).match(Lle)||[],a=f.shift(),o=f.shift(),i=`M`+a+`,`+o+` L`+f.join(`,`),n===`polygon`&&(i+=`,`+a+`,`+o+`z`)),l.setAttribute(`d`,gH(l._gsRawPath=mH(i))),t&&e.parentNode&&(e.parentNode.insertBefore(l,e),e.parentNode.removeChild(e)),l)}function sH(e,t,n){var r=e[t],i=e[t+2],a=e[t+4],o;return r+=(i-r)*n,i+=(a-i)*n,r+=(i-r)*n,o=i+(a+(e[t+6]-a)*n-i)*n-r,r=e[t+1],i=e[t+3],a=e[t+5],r+=(i-r)*n,i+=(a-i)*n,r+=(i-r)*n,eH(Hle(i+(a+(e[t+7]-a)*n-i)*n-r,o)*Vle)}function cH(e,t,n){n=Ule(n)?1:tH(n)||0,t=tH(t)||0;var r=Math.max(0,~~(qV(n-t)-1e-8)),i=Jle(e);if(t>n&&(t=1-t,n=1-n,Kle(i),i.totalLength=0),t<0||n<0){var a=Math.abs(~~Math.min(t,n))+1;t+=a,n+=a}i.totalLength||lH(i);var o=n>1,s=dH(i,t,Wle,!0),c=dH(i,n,Gle),l=c.segment,u=s.segment,d=c.segIndex,f=s.segIndex,p=c.i,m=s.i,h=f===d,g=p===m&&h,_,v,y,b,x,S,C,w;if(o||r){for(_=dd)&&i.splice(b,1);else l.angle=sH(l,p+y,0),p+=y,s=l[p],c=l[p+1],l.length=l.totalLength=0,l.totalPoints=i.totalPoints=8,l.push(s,c,s,c,s,c,s,c);return i.totalLength=0,i}function eue(e,t,n){t||=0,e.samples||(e.samples=[],e.lookup=[]);var r=~~e.resolution||12,i=1/r,a=n?t+n*6+1:e.length,o=e[t],s=e[t+1],c=t?t/6*r:0,l=e.samples,u=e.lookup,d=(t?e.minLength:YV)||YV,f=l[c+n*r-1],p=t?l[c-1]:0,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A;for(l.length=u.length=0,h=t+2;h8&&(e.splice(h,6),h-=6,a-=6);else for(m=1;m<=r;m++)D=i*m,E=1-D,y=b-(b=(D*D*g+3*E*(D*_+E*v))*D),w=T-(T=(D*D*x+3*E*(D*S+E*C))*D),k=JV(w*w+y*y),k=1)return 0;var r=e[t],i=e[t+1],a=e[t+2],o=e[t+3],s=e[t+4],c=e[t+5],l=e[t+6],u=e[t+7],d=r+(a-r)*n,f=a+(s-a)*n,p=i+(o-i)*n,m=o+(c-o)*n,h=d+(f-d)*n,g=p+(m-p)*n,_=s+(l-s)*n,v=c+(u-c)*n;return f+=(_-f)*n,m+=(v-m)*n,e.splice(t+2,4,eH(d),eH(p),eH(h),eH(g),eH(h+(f-h)*n),eH(g+(m-g)*n),eH(f),eH(m),eH(_),eH(v)),e.samples&&e.samples.splice(t/6*e.resolution|0,0,0,0,0,0,0,0),6}function dH(e,t,n,r){n||={},e.totalLength||lH(e),(t<0||t>1)&&(t=$V(t));var i=0,a=e[0],o,s,c,l,u,d,f;if(!t)f=d=i=0,a=e[0];else if(t===1)f=1,i=e.length-1,a=e[i],d=a.length-8;else{if(e.length>1){for(c=e.totalLength*t,u=d=0;(u+=e[d++].totalLength)1)&&(t=$V(t)),i.lookup||lH(e),e.length>1){for(c=e.totalLength*t,u=d=0;(u+=e[d++].totalLength)=1?1-1e-9:f||1e-9):i.angle||0),a}function pH(e,t,n,r,i,a,o){for(var s=e.length,c,l,u,d,f;--s>-1;)for(c=e[s],l=c.length,u=0;u1&&(n=JV(b)*n,r=JV(b)*r);var x=n*n,S=r*r,C=(x*S-x*y-S*v)/(x*y+S*v);C<0&&(C=0);var w=(a===o?-1:1)*JV(C),T=w*(n*_/r),E=w*-(r*g/n),D=(e+s)/2,O=(t+c)/2,k=D+(u*T-d*E),A=O+(d*T+u*E),j=(g-T)/n,M=(_-E)/r,N=(-g-T)/n,P=(-_-E)/r,F=j*j+M*M,I=(M<0?-1:1)*Math.acos(j/JV(F)),L=(j*P-M*N<0?-1:1)*Math.acos((j*N+M*P)/JV(F*(N*N+P*P)));isNaN(L)&&(L=f),!o&&L>0?L-=p:o&&L<0&&(L+=p),I%=p,L%=p;var R=Math.ceil(qV(L)/(p/4)),z=[],B=L/R,V=4/3*GV(B/2)/(1+KV(B/2)),H=u*n,ee=d*n,te=d*-r,ne=u*r,re;for(re=0;re-1e-4?0:t}).match(Ile)||[],n=[],r=0,i=0,a=2/3,o=t.length,s=0,c=`ERROR: malformed path: `+e,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w=function(e,t,n,r){v=(n-e)/3,y=(r-t)/3,h.push(e+v,t+y,n-v,r-y,n,r)};if(!e||!isNaN(t[0])||isNaN(t[1]))return console.log(c),n;for(l=0;l.5||qV(i-f)>.5)&&(w(r,i,d,f),p===`L`&&(l+=2)),r=d,i=f;else if(p===`A`){if(S=t[l+4],C=t[l+5],v=t[l+6],y=t[l+7],u=7,S.length>1&&(S.length<3?(y=v,v=C,u--):(y=C,v=S.substr(2),u-=2),C=S.charAt(1),S=S.charAt(0)),b=tue(r,i,+t[l+1],+t[l+2],+t[l+3],+S,+C,(m?r:0)+v*1,(m?i:0)+y*1),l+=u,b)for(u=0;ul*(w*w+T*T)&&(O=u.length,e(t,n,f,p,v,y,S,C,l,u,d),e(S,C,b,x,g,_,s,c,l,u,d+1+(u.length-O))),u},SH=function(){function e(e,t,n){vH||bH(),this.id=e,iue&&this.setData(t,n)}var t=e.prototype;return t.setData=function(e,t){t||={},e||=`0,0,1,1`;var n=e.match(aue),r=1,i=[],a=[],o=t.precision||1,s=o<=1,c,l,u,d,f,p,m,h,g;if(this.data=e,(oue.test(e)||~e.indexOf(`M`)&&e.indexOf(`C`)<0)&&(n=mH(e)[0]),c=n.length,c===4)n.unshift(0,0),n.push(1,1),c=8;else if((c-2)%6)throw`Invalid CustomEase`;for((+n[0]!=0||+n[c-2]!=1)&&cue(n,t.height,t.originY),this.segment=n,d=2;dh.x||h.y!==m.y&&h.x===m.x||m===h)&&m.x<=1?(h.cx=m.x-h.x,h.cy=m.y-h.y,h.n=m,h.nx=m.x,s&&d>1&&Math.abs(h.cy/h.cx-i[d-2].cy/i[d-2].cx)>2&&(s=0),h.cxh||u===m-1)&&(c.push(g,_),l=(p-_)/(f-g)),g=f,_=p;c=`M`+c.join(`,`)}return s&&s.setAttribute(`d`,c),c},e}();SH.version=`3.15.0`,SH.headless=!0,yH()&&_H.registerPlugin(SH);var CH,wH,TH,EH,DH,OH,kH,AH,jH=`transform`,MH=jH+`Origin`,NH,PH=function(e){var t=e.ownerDocument||e;for(!(jH in e.style)&&(`msTransform`in e.style)&&(jH=`msTransform`,MH=jH+`Origin`);t.parentNode&&(t=t.parentNode););if(wH=window,kH=new BH,t){CH=t,TH=t.documentElement,EH=t.body,AH=CH.createElementNS(`http://www.w3.org/2000/svg`,`g`),AH.style.transform=`none`;var n=t.createElement(`div`),r=t.createElement(`div`),i=t&&(t.body||t.firstElementChild);i&&i.appendChild&&(i.appendChild(n),n.appendChild(r),n.style.position=`static`,n.style.transform=`translate3d(0,0,1px)`,NH=r.offsetParent!==n,i.removeChild(n))}return t},uue=function(e){for(var t,n;e&&e!==EH;)n=e._gsap,n&&n.uncache&&n.get(e,`x`),n&&!n.scaleX&&!n.scaleY&&n.renderTransform&&(n.scaleX=n.scaleY=1e-4,n.renderTransform(1,n),t?t.push(n):t=[n]),e=e.parentNode;return t},FH=[],IH=[],due=function(){return wH.pageYOffset||CH.scrollTop||TH.scrollTop||EH.scrollTop||0},fue=function(){return wH.pageXOffset||CH.scrollLeft||TH.scrollLeft||EH.scrollLeft||0},LH=function(e){return e.ownerSVGElement||((e.tagName+``).toLowerCase()===`svg`?e:null)},pue=function e(t){if(wH.getComputedStyle(t).position===`fixed`)return!0;if(t=t.parentNode,t&&t.nodeType===1)return e(t)},RH=function e(t,n){if(t.parentNode&&(CH||PH(t))){var r=LH(t),i=r?r.getAttribute(`xmlns`)||`http://www.w3.org/2000/svg`:`http://www.w3.org/1999/xhtml`,a=r?n?`rect`:`g`:`div`,o=n===2?100:0,s=n===3?100:0,c={position:`absolute`,display:`block`,pointerEvents:`none`,margin:`0`,padding:`0`},l=CH.createElementNS?CH.createElementNS(i.replace(/^https/,`http`),a):CH.createElement(a);return n&&(r?(OH||=e(t),l.setAttribute(`width`,.01),l.setAttribute(`height`,.01),l.setAttribute(`transform`,`translate(`+o+`,`+s+`)`),l.setAttribute(`fill`,`transparent`),OH.appendChild(l)):(DH||(DH=e(t),Object.assign(DH.style,c)),Object.assign(l.style,c,{width:`0.1px`,height:`0.1px`,top:s+`px`,left:o+`px`}),DH.appendChild(l))),l}throw`Need document and parent.`},mue=function(e){for(var t=new BH,n=0;n1?mue(c):c.getItem(0).matrix:kH,u=c.a*l.x+c.c*l.y,d=c.b*l.x+c.d*l.y):(c=new BH,u=d=0),t&&e.tagName.toLowerCase()===`g`&&(u=d=0),(r||!e.getBoundingClientRect().width?n:a).appendChild(s),s.setAttribute(`transform`,`matrix(`+c.a+`,`+c.b+`,`+c.c+`,`+c.d+`,`+(c.e+u)+`,`+(c.f+d)+`)`);else{if(u=d=0,NH)for(c=e.offsetParent,l=e;(l&&=l.parentNode)&&l!==c&&l.parentNode;)(wH.getComputedStyle(l)[jH]+``).length>4&&(u=l.offsetLeft,d=l.offsetTop,l=0);if(f=wH.getComputedStyle(e),f.position!==`absolute`&&f.position!==`fixed`)for(c=e.offsetParent;a&&a!==c;)u+=a.scrollLeft||0,d+=a.scrollTop||0,a=a.parentNode;l=s.style,l.top=e.offsetTop-d+`px`,l.left=e.offsetLeft-u+`px`,l[jH]=f[jH],l[MH]=f[MH],l.position=f.position===`fixed`?`fixed`:`absolute`,o.appendChild(s)}return s},zH=function(e,t,n,r,i,a,o){return e.a=t,e.b=n,e.c=r,e.d=i,e.e=a,e.f=o,e},BH=function(){function e(e,t,n,r,i,a){e===void 0&&(e=1),t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=1),i===void 0&&(i=0),a===void 0&&(a=0),zH(this,e,t,n,r,i,a)}var t=e.prototype;return t.inverse=function(){var e=this.a,t=this.b,n=this.c,r=this.d,i=this.e,a=this.f,o=e*r-t*n||1e-10;return zH(this,r/o,-t/o,-n/o,e/o,(n*a-r*i)/o,-(e*a-t*i)/o)},t.multiply=function(e){var t=this.a,n=this.b,r=this.c,i=this.d,a=this.e,o=this.f,s=e.a,c=e.c,l=e.b,u=e.d,d=e.e,f=e.f;return zH(this,s*t+l*r,s*n+l*i,c*t+u*r,c*n+u*i,a+d*t+f*r,o+d*n+f*i)},t.clone=function(){return new e(this.a,this.b,this.c,this.d,this.e,this.f)},t.equals=function(e){var t=this.a,n=this.b,r=this.c,i=this.d,a=this.e,o=this.f;return t===e.a&&n===e.b&&r===e.c&&i===e.d&&a===e.e&&o===e.f},t.apply=function(e,t){t===void 0&&(t={});var n=e.x,r=e.y,i=this.a,a=this.b,o=this.c,s=this.d,c=this.e,l=this.f;return t.x=n*i+r*o+c||0,t.y=n*a+r*s+l||0,t},e}();function VH(e,t,n,r){if(!e||!e.parentNode||(CH||PH(e)).documentElement===e)return new BH;var i=uue(e),a=LH(e)?FH:IH,o=gue(e,n),s=a[0].getBoundingClientRect(),c=a[1].getBoundingClientRect(),l=a[2].getBoundingClientRect(),u=o.parentNode,d=!r&&pue(e),f=new BH((c.left-s.left)/100,(c.top-s.top)/100,(l.left-s.left)/100,(l.top-s.top)/100,s.left+(d?0:fue()),s.top+(d?0:due()));if(u.removeChild(o),i)for(s=i.length;s--;)c=i[s],c.scaleX=c.scaleY=0,c.renderTransform(1,c);return t?f.inverse():f}var _ue=`x,translateX,left,marginLeft,xPercent`.split(`,`),vue=`y,translateY,top,marginTop,yPercent`.split(`,`),yue=Math.PI/180,HH,UH,WH,GH,KH,qH,bue=function(){return HH||typeof window<`u`&&(HH=window.gsap)&&HH.registerPlugin&&HH},JH=function(e,t,n,r){for(var i=t.length,a=r===2?0:r,o=0;o1?e=1:e<0&&(e=0);r--;)fH(n[r],e,!r&&t.rotate,n[r]);for(;i;)i.set(i.t,i.p,i.path[i.pp]+i.u,i.d,e),i=i._next;t.rotate&&t.rSet(t.target,t.rProp,n[0].angle*(t.radians?yue:1)+t.rOffset+t.ru,t,e)}else t.styles.revert()},getLength:function(e){return lH(oH(e)).totalLength},sliceRawPath:cH,getRawPath:oH,pointsToSegment:hH,stringToRawPath:mH,rawPathToString:gH,transformRawPath:pH,getGlobalMatrix:VH,getPositionOnPath:fH,cacheRawPathMeasurements:lH,convertToPath:function(e,t){return GH(e).map(function(e){return $le(e,t!==!1)})},convertCoordinates:function(e,t,n){var r=VH(t,!0,!0).multiply(VH(e));return n?r.apply(n):r},getAlignMatrix:$H,getRelativePosition:function(e,t,n,r){var i=$H(e,t,n,r);return{x:i.e,y:i.f}},arrayToRawPath:function(e,t){t||={};var n=JH(JH([],e,t.x||`x`,0),e,t.y||`y`,1);return t.relative&&XH(n),[t.type===`cubic`?n:hH(n,t.curviness)]}};bue()&&HH.registerPlugin(nU);var wue=`dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture`.split(`.`);function rU(e){return typeof e==`string`&&wue.includes(e)}var Tue=new Set(`aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle`.split(`.`));function iU(e){return typeof e==`string`&&Tue.has(e)}function aU(e){return typeof e==`string`&&e.startsWith(`data-`)}function oU(e){if(typeof e!=`object`||!e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(iU(n)||aU(n))&&(t[n]=e[n]);return t}function sU(e){if(e==null)return null;if((0,v.isValidElement)(e)&&typeof e.props==`object`&&e.props!==null){var t=e.props;return oU(t)}return typeof e==`object`&&!Array.isArray(e)?oU(e):null}function cU(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(iU(n)||aU(n)||rU(n))&&(t[n]=e[n]);return t}function Eue(e){return e==null?null:(0,v.isValidElement)(e)?cU(e.props):typeof e==`object`&&!Array.isArray(e)?cU(e):null}var Due=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function lU(){return lU=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var n=e.children,r=e.width,i=e.height,a=e.viewBox,o=e.className,s=e.style,c=e.title,l=e.desc,u=Oue(e,Due),d=a||{width:r,height:i,x:0,y:0},f=Is(`recharts-surface`,o);return v.createElement(`svg`,lU({},cU(u),{className:f,width:r,height:i,style:s,viewBox:`${d.x} ${d.y} ${d.width} ${d.height}`,ref:t}),v.createElement(`title`,null,c),v.createElement(`desc`,null,l),n)}),Aue=[`children`,`className`];function dU(){return dU=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var n=e.children,r=e.className,i=jue(e,Aue),a=Is(`recharts-layer`,r);return v.createElement(`g`,dU({className:a},cU(i),{ref:t}),n)});function pU(e){return e===`__proto__`}var Nue=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;function mU(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e===``||e.startsWith(`.`)||e.endsWith(`.`)?!1:Nue.test(e);default:return!1}}function hU(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function gU(e){return typeof e==`symbol`||e instanceof Symbol}function Pue(e){return e==null?``:_U(e)}function _U(e){if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(_U).join(`,`);if(gU(e))return e.toString();let t=e+``;return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function vU(e){if(Array.isArray(e))return e.map(hU);if(typeof e==`symbol`)return[e];e=Pue(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1,s=!1,c=/^-?\d+(?:\.\d+)?$/;for(e.charCodeAt(0)===46&&t.push(``);r1&&arguments[1]!==void 0?arguments[1]:Iue),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function xU(e){var t=[...arguments].slice(1);return e.reduce((e,n,r)=>{var i=t[r-1];return typeof i==`string`?e+i+n:i===void 0?e+n:e+bU(i)+n},``)}var SU=e=>e===0?0:e>0?1:-1,CU=e=>typeof e==`number`&&e!=+e,wU=e=>typeof e==`string`&&e.length>1&&e.indexOf(`%`)===e.length-1,TU=e=>(typeof e==`number`||e instanceof Number)&&!CU(e),EU=e=>TU(e)||typeof e==`string`,Lue=0,DU=e=>{var t=++Lue;return`${e||``}${t}`},OU=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(!TU(e)&&typeof e!=`string`)return n;var i;if(wU(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return CU(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},kU=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;re&&(typeof t==`function`?t(e):yU(e,t))===n)}var MU=e=>e==null,NU=e=>MU(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function PU(e){return e!=null}function FU(){}function IU(e){if(e)return{x:e.x,y:e.y,upperWidth:`upperWidth`in e?e.upperWidth:e.width,lowerWidth:`lowerWidth`in e?e.lowerWidth:e.width,width:e.width,height:e.height}}function LU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function RU(e){for(var t=1;t{var t=e.viewBox,n=e.position,r=e.offset,i=r===void 0?0:r,a=e.parentViewBox,o=e.clamp,s=IU(t),c=s.x,l=s.y,u=s.height,d=s.upperWidth,f=s.lowerWidth,p=c,m=c+(d-f)/2,h=(p+m)/2,g=(d+f)/2,_=p+d/2,v=u>=0?1:-1,y=v*i,b=v>0?`end`:`start`,x=v>0?`start`:`end`,S=d>=0?1:-1,C=S*i,w=S>0?`end`:`start`,T=S>0?`start`:`end`,E=a;if(n===`top`){var D={x:p+d/2,y:l-y,horizontalAnchor:`middle`,verticalAnchor:b};return o&&E&&(D.height=Math.max(l-E.y,0),D.width=d),D}if(n===`bottom`){var O={x:m+f/2,y:l+u+y,horizontalAnchor:`middle`,verticalAnchor:x};return o&&E&&(O.height=Math.max(E.y+E.height-(l+u),0),O.width=f),O}if(n===`left`){var k={x:h-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`};return o&&E&&(k.width=Math.max(k.x-E.x,0),k.height=u),k}if(n===`right`){var A={x:h+g+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`};return o&&E&&(A.width=Math.max(E.x+E.width-A.x,0),A.height=u),A}var j=o&&E?{width:g,height:u}:{};return n===`insideLeft`?RU({x:h+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`},j):n===`insideRight`?RU({x:h+g-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`},j):n===`insideTop`?RU({x:p+d/2,y:l+y,horizontalAnchor:`middle`,verticalAnchor:x},j):n===`insideBottom`?RU({x:m+f/2,y:l+u-y,horizontalAnchor:`middle`,verticalAnchor:b},j):n===`insideTopLeft`?RU({x:p+C,y:l+y,horizontalAnchor:T,verticalAnchor:x},j):n===`insideTopRight`?RU({x:p+d-C,y:l+y,horizontalAnchor:w,verticalAnchor:x},j):n===`insideBottomLeft`?RU({x:m+C,y:l+u-y,horizontalAnchor:T,verticalAnchor:b},j):n===`insideBottomRight`?RU({x:m+f-C,y:l+u-y,horizontalAnchor:w,verticalAnchor:b},j):n&&typeof n==`object`&&(TU(n.x)||wU(n.x))&&(TU(n.y)||wU(n.y))?RU({x:c+OU(n.x,g),y:l+OU(n.y,u),horizontalAnchor:`end`,verticalAnchor:`end`},j):RU({x:_,y:l+u/2,horizontalAnchor:`middle`,verticalAnchor:`middle`},j)},Hue=[`top`,`left`,`right`,`bottom`];function Uue(e){return e==null?!1:typeof e==`object`||Hue.includes(e)}var Wue=(0,v.createContext)(null);function zU(e){return function(){return e}}var BU=Math.PI,VU=2*BU,HU=1e-6,Gue=VU-HU;function UU(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw Error(`invalid digits: ${e}`);if(t>15)return UU;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;tHU){if(!(Math.abs(u*s-c*l)>HU)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((BU-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>HU&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>HU||Math.abs(this._y1-l)>HU)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%VU+VU),d>Gue?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>HU&&this._append`A${n},${n},0,${+(d>=BU)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};WU.prototype;function GU(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new WU(t)}Array.prototype.slice;function KU(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function qU(e){this._context=e}qU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};function JU(e){return new qU(e)}function YU(e){return e[0]}function XU(e){return e[1]}function ZU(e,t){var n=zU(!0),r=null,i=JU,a=null,o=GU(s);e=typeof e==`function`?e:e===void 0?YU:zU(e),t=typeof t==`function`?t:t===void 0?XU:zU(t);function s(s){var c,l=(s=KU(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return ZU().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:zU(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:zU(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:zU(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:zU(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:zU(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:zU(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:zU(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var $U=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}};function que(e){return new $U(e,!0)}function Jue(e){return new $U(e,!1)}function eW(){}function tW(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function nW(e){this._context=e}nW.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:tW(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:tW(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Yue(e){return new nW(e)}function rW(e){this._context=e}rW.prototype={areaStart:eW,areaEnd:eW,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:tW(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Xue(e){return new rW(e)}function iW(e){this._context=e}iW.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:tW(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Zue(e){return new iW(e)}function aW(e){this._context=e}aW.prototype={areaStart:eW,areaEnd:eW,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Que(e){return new aW(e)}function oW(e){return e<0?-1:1}function sW(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(oW(a)+oW(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function cW(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function lW(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function uW(e){this._context=e}uW.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:lW(this,this._t0,cW(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,lW(this,cW(this,n=sW(this,e,t)),n);break;default:lW(this,this._t0,n=sW(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function dW(e){this._context=new fW(e)}(dW.prototype=Object.create(uW.prototype)).point=function(e,t){uW.prototype.point.call(this,t,e)};function fW(e){this._context=e}fW.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function $ue(e){return new uW(e)}function ede(e){return new dW(e)}function pW(e){this._context=e}pW.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n){if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=mW(e),i=mW(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};function nde(e){return new hW(e,.5)}function rde(e){return new hW(e,0)}function ide(e){return new hW(e,1)}function gW(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n=0;)n[t]=t;return n}function ade(e,t){return e[t]}function ode(e){let t=[];return t.key=e,t}function sde(){var e=zU([]),t=_W,n=gW,r=ade;function i(i){var a=Array.from(e.apply(this,arguments),ode),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o0){for(var n,r,i=0,a=e[0].length,o;i0){for(var n=0,r=e[t[0]],i,a=r.length;n0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r`radius`in e&&`startAngle`in e&&`endAngle`in e,vW=(e,t)=>{if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if((0,v.isValidElement)(e)&&(n=e.props),typeof n!=`object`&&typeof n!=`function`)return null;var r={};return Object.keys(n).forEach(e=>{rU(e)&&typeof n[e]==`function`&&(r[e]=t||(t=>n[e](n,t)))}),r},fde=(e,t,n)=>r=>(e(t,n,r),null),pde=(e,t,n)=>{if(e===null||typeof e!=`object`&&typeof e!=`function`)return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];rU(i)&&typeof a==`function`&&(r||={},r[i]=fde(a,t,n))}),r};function yW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mde(e){for(var t=1;t(e[t]===void 0&&r[t]!==void 0&&(e[t]=r[t]),e),n)}function vde(e){return Number.isSafeInteger(e)&&e>=0}function xW(e){return e!=null&&typeof e!=`function`&&vde(e.length)}function SW(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function CW(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var wW=`[object RegExp]`,TW=`[object String]`,EW=`[object Number]`,DW=`[object Boolean]`,yde=`[object Arguments]`,OW=`[object Symbol]`,kW=`[object Date]`,AW=`[object Map]`,jW=`[object Set]`,MW=`[object Array]`,bde=`[object Function]`,NW=`[object ArrayBuffer]`,PW=`[object Object]`,xde=`[object Error]`,FW=`[object DataView]`,IW=`[object Uint8Array]`,LW=`[object Uint8ClampedArray]`,RW=`[object Uint16Array]`,zW=`[object Uint32Array]`,Sde=`[object BigUint64Array]`,BW=`[object Int8Array]`,VW=`[object Int16Array]`,HW=`[object Int32Array]`,Cde=`[object BigInt64Array]`,UW=`[object Float32Array]`,WW=`[object Float64Array]`,GW=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function KW(e){return GW.Buffer!==void 0&&GW.Buffer.isBuffer(e)}function qW(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function JW(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}var wde=/^(?:0|[1-9]\d*)$/;function YW(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e{var t=d(),n=P_();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Ede=o(((e,t)=>{t.exports=Tde()})),XW=(0,v.createContext)(null),Dde=Ede(),Ode=e=>e,ZW=()=>{var e=(0,v.useContext)(XW);return e?e.store.dispatch:Ode},QW=()=>{},kde=()=>QW,Ade=(e,t)=>e===t;function $W(e){var t=(0,v.useContext)(XW),n=(0,v.useMemo)(()=>t?t=>{if(t!=null)return e(t)}:QW,[t,e]);return(0,Dde.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:kde,t?t.store.getState:QW,t?t.store.getState:QW,n,Ade)}function jde(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function Mde(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var eG=e=>Array.isArray(e)?e:[e];function Nde(e){let t=Array.isArray(e[0])?e[0]:e;return Mde(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function Pde(e,t){let n=[],{length:r}=e;for(let i=0;i`u`?Fde:WeakRef,Ide=0,nG=1;function rG(){return{s:Ide,v:void 0,o:null,p:null}}function Lde(e){return e instanceof tG?e.deref():e}function iG(e,t={}){let n=rG(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e{n=rG(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function Rde(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),jde(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=iG,argsMemoizeOptions:u=[]}={...n,...a},d=eG(c),f=eG(u),p=Nde(e),m=s(function(){return t++,o.apply(null,arguments)},...d),h=l(function(){r++;let e=Pde(p,arguments);return i=m.apply(null,e),i},...f);return Object.assign(h,{resultFunc:o,memoizedResultFunc:m,dependencies:p,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var $=Rde(iG);function zde(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a{if(e!==t){let r=oG(e),i=oG(t);if(r===i&&r===0){if(et)return n===`desc`?-1:1}return n===`desc`?i-r:r-i}return 0},Vde=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Hde=/^\w*$/;function Ude(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||gU(e)?!0:typeof e==`string`&&(Hde.test(e)||!Vde.test(e))||t!=null&&Object.hasOwn(t,e)}function Wde(e,t,n,r){if(e==null)return[];n=r?void 0:n,Array.isArray(e)||(e=xW(e)?Array.from(e):Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(n)||(n=n==null?[]:[n]),n=n.map(e=>String(e));let i=(e,t)=>{let n=e,r=0;for(;r0&&r===t.length?n:void 0},a=(e,t)=>{if(e==null)return t;if(t!=null)return typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:i(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?i(t,e):t[e]},o=t.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||Ude(e)?e:{key:e,path:vU(e)}));return e.map(e=>({original:e,criteria:o.map(t=>a(t,e))})).slice().sort((e,t)=>{for(let r=0;re.original)}function sG(e,...t){let n=t.length;return n>1&&aG(e,t[0],t[1])?t=[]:n>2&&aG(t[0],t[1],t[2])&&(t=[t[0]]),Wde(e,zde(t),[`asc`])}var cG=e=>e.legend.settings,Gde=e=>e.legend.size;$([e=>e.legend.payload,cG],(e,t)=>{var n=t.itemSorter,r=e.flat(1);return n?sG(r,n):r});function lG(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var uG=typeof Symbol==`function`&&Symbol.observable||`@@observable`,dG=()=>Math.random().toString(36).substring(7).split(``).join(`.`),fG={INIT:`@@redux/INIT${dG()}`,REPLACE:`@@redux/REPLACE${dG()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${dG()}`};function pG(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function mG(e,t,n){if(typeof e!=`function`)throw Error(lG(2));if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(lG(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(lG(1));return n(mG)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,c=!1;function l(){o===a&&(o=new Map,a.forEach((e,t)=>{o.set(t,e)}))}function u(){if(c)throw Error(lG(3));return i}function d(e){if(typeof e!=`function`)throw Error(lG(4));if(c)throw Error(lG(5));let t=!0;l();let n=s++;return o.set(n,e),function(){if(t){if(c)throw Error(lG(6));t=!1,l(),o.delete(n),a=null}}}function f(e){if(!pG(e))throw Error(lG(7));if(e.type===void 0)throw Error(lG(8));if(typeof e.type!=`string`)throw Error(lG(17));if(c)throw Error(lG(9));try{c=!0,i=r(i,e)}finally{c=!1}return(a=o).forEach(e=>{e()}),e}function p(e){if(typeof e!=`function`)throw Error(lG(10));r=e,f({type:fG.REPLACE})}function m(){let e=d;return{subscribe(t){if(typeof t!=`object`||!t)throw Error(lG(11));function n(){let e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[uG](){return this}}}return f({type:fG.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[uG]:m}}function Kde(e){Object.keys(e).forEach(t=>{let n=e[t];if(n(void 0,{type:fG.INIT})===void 0)throw Error(lG(12));if(n(void 0,{type:fG.PROBE_UNKNOWN_ACTION()})===void 0)throw Error(lG(13))})}function hG(e){let t=Object.keys(e),n={};for(let r=0;re:e.length===1?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function qde(...e){return t=>(n,r)=>{let i=t(n,r),a=()=>{throw Error(lG(15))},o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)};return a=gG(...e.map(e=>e(o)))(i.dispatch),{...i,dispatch:a}}}function _G(e){return pG(e)&&`type`in e&&typeof e.type==`string`}var vG=Symbol.for(`immer-nothing`),yG=Symbol.for(`immer-draftable`),bG=Symbol.for(`immer-state`);function xG(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var SG=Object,CG=SG.getPrototypeOf,wG=`constructor`,TG=`prototype`,EG=`configurable`,DG=`enumerable`,OG=`writable`,kG=`value`,AG=e=>!!e&&!!e[bG];function jG(e){return e?NG(e)||zG(e)||!!e[yG]||!!e[wG]?.[yG]||BG(e)||VG(e):!1}var Jde=SG[TG][wG].toString(),MG=new WeakMap;function NG(e){if(!e||!HG(e))return!1;let t=CG(e);if(t===null||t===SG[TG])return!0;let n=SG.hasOwnProperty.call(t,wG)&&t[wG];if(n===Object)return!0;if(!UG(n))return!1;let r=MG.get(n);return r===void 0&&(r=Function.toString.call(n),MG.set(n,r)),r===Jde}function PG(e,t,n=!0){FG(e)===0?(n?Reflect.ownKeys(e):SG.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function FG(e){let t=e[bG];return t?t.type_:zG(e)?1:BG(e)?2:VG(e)?3:0}var IG=(e,t,n=FG(e))=>n===2?e.has(t):SG[TG].hasOwnProperty.call(e,t),LG=(e,t,n=FG(e))=>n===2?e.get(t):e[t],RG=(e,t,n,r=FG(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Yde(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var zG=Array.isArray,BG=e=>e instanceof Map,VG=e=>e instanceof Set,HG=e=>typeof e==`object`,UG=e=>typeof e==`function`,WG=e=>typeof e==`boolean`;function Xde(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var GG=e=>e.copy_||e.base_,KG=e=>e.modified_?e.copy_:e.base_;function qG(e,t){if(BG(e))return new Map(e);if(VG(e))return new Set(e);if(zG(e))return Array[TG].slice.call(e);let n=NG(e);if(t===!0||t===`class_only`&&!n){let t=SG.getOwnPropertyDescriptors(e);delete t[bG];let n=Reflect.ownKeys(t);for(let r=0;r1&&SG.defineProperties(e,{set:YG,add:YG,clear:YG,delete:YG}),SG.freeze(e),t&&PG(e,(e,t)=>{JG(t,!0)},!1),e)}function Zde(){xG(2)}var YG={[kG]:Zde};function XG(e){return e===null||!HG(e)||SG.isFrozen(e)}var ZG=`MapSet`,QG=`Patches`,$G=`ArrayMethods`,eK={};function tK(e){let t=eK[e];return t||xG(0,e),t}var nK=e=>!!eK[e],rK,iK=()=>rK,Qde=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:nK(ZG)?tK(ZG):void 0,arrayMethodsPlugin_:nK($G)?tK($G):void 0});function aK(e,t){t&&(e.patchPlugin_=tK(QG),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function oK(e){sK(e),e.drafts_.forEach($de),e.drafts_=null}function sK(e){e===rK&&(rK=e.parent_)}var cK=e=>rK=Qde(rK,e);function $de(e){let t=e[bG];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function lK(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[bG].modified_&&(oK(t),xG(4)),jG(e)&&(e=uK(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[bG].base_,e,t)}else e=uK(t,n);return efe(t,e,!0),oK(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===vG?void 0:e}function uK(e,t){if(XG(t))return t;let n=t[bG];if(!n)return hK(t,e.handledSet_,e);if(!fK(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);mK(n,e)}return n.copy_}function efe(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&JG(t,n)}function dK(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var fK=(e,t)=>e.scope_===t,tfe=[];function pK(e,t,n,r){let i=GG(e),a=e.type_;if(r!==void 0&&LG(i,r,a)===t){RG(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;PG(i,(e,n)=>{if(AG(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??tfe;for(let e of o)RG(i,e,n,a)}function nfe(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!fK(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=KG(i);pK(e,i.draft_??i,a,n),mK(i,r)})}function mK(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}dK(e)}}function rfe(e,t,n){let{scope_:r}=e;if(AG(n)){let i=n[bG];fK(i,r)&&i.callbacks_.push(function(){xK(e),pK(e,n,KG(i),t)})}else jG(n)&&e.callbacks_.push(function(){let i=GG(e);e.type_===3?i.has(n)&&hK(n,r.handledSet_,r):LG(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&hK(LG(e.copy_,t,e.type_),r.handledSet_,r)})}function hK(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||AG(e)||t.has(e)||!jG(e)||XG(e)?e:(t.add(e),PG(e,(r,i)=>{if(AG(i)){let t=i[bG];fK(t,n)&&(RG(e,r,KG(t),e.type_),dK(t))}else jG(i)&&hK(i,t,n)}),e)}function ife(e,t){let n=zG(e),r={type_:+!!n,scope_:t?t.scope_:iK(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=gK;n&&(i=[r],a=_K);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var gK={get(e,t){if(t===bG)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=GG(e);if(!IG(i,t,e.type_))return ofe(e,i,t);let a=i[t];if(e.finalized_||!jG(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Xde(t))return a;if(a===vK(e.base_,t)||afe(e,t,a)){xK(e);let n=e.type_===1?+t:t,r=SK(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in GG(e)},ownKeys(e){return Reflect.ownKeys(GG(e))},set(e,t,n){let r=yK(GG(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=vK(GG(e),t),i=r?.[bG];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(Yde(n,r)&&(n!==void 0||IG(e.base_,t,e.type_)))return!0;xK(e),bK(e)}return e.copy_[t]===n&&(n!==void 0||IG(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),rfe(e,t,n),!0)},deleteProperty(e,t){return xK(e),vK(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),bK(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=GG(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[OG]:!0,[EG]:e.type_!==1||t!==`length`,[DG]:r[DG],[kG]:n[t]}},defineProperty(){xG(11)},getPrototypeOf(e){return CG(e.base_)},setPrototypeOf(){xG(12)}},_K={};for(let e in gK){let t=gK[e];_K[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}_K.deleteProperty=function(e,t){return _K.set.call(this,e,t,void 0)},_K.set=function(e,t,n){return gK.set.call(this,e[0],t,n,e[0])};function vK(e,t){let n=e[bG];return(n?GG(n):e)[t]}function afe(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!jG(n)||n[bG]?!1:e.baseRefs_.has(n)}function ofe(e,t,n){let r=yK(t,n);return r?kG in r?r[kG]:r.get?.call(e.draft_):void 0}function yK(e,t){if(!(t in e))return;let n=CG(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=CG(n)}}function bK(e){e.modified_||(e.modified_=!0,e.parent_&&bK(e.parent_))}function xK(e){e.copy_||=(e.assigned_=new Map,qG(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var sfe=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(UG(e)&&!UG(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}UG(t)||xG(6),n!==void 0&&!UG(n)&&xG(7);let r;if(jG(e)){let i=cK(this),a=SK(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?oK(i):sK(i)}return aK(i,n),lK(r,i)}if(!e||!HG(e)){if(r=t(e),r===void 0&&(r=e),r===vG&&(r=void 0),this.autoFreeze_&&JG(r,!0),n){let t=[],i=[];tK(QG).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}xG(1,e)},this.produceWithPatches=(e,t)=>{if(UG(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},WG(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),WG(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),WG(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){jG(e)||xG(8),AG(e)&&(e=CK(e));let t=cK(this),n=SK(t,e,void 0);return n[bG].isManual_=!0,sK(t),n}finishDraft(e,t){let n=e&&e[bG];(!n||!n.isManual_)&&xG(9);let{scope_:r}=n;return aK(r,t),lK(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=tK(QG).applyPatches_;return AG(e)?r(e,t):this.produce(e,e=>r(e,t))}};function SK(e,t,n,r){let[i,a]=BG(t)?tK(ZG).proxyMap_(t,n):VG(t)?tK(ZG).proxySet_(t,n):ife(t,n);return(n?.scope_??iK()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?nfe(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function CK(e){return AG(e)||xG(10,e),wK(e)}function wK(e){if(!jG(e)||XG(e))return e;let t=e[bG],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=qG(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=qG(e,!0);return PG(n,(e,t)=>{RG(n,e,wK(t))},r),t&&(t.finalized_=!1),n}globalThis.Iterator?.from;var TK=new sfe().produce,EK=e=>e;function DK(e){return({dispatch:t,getState:n})=>r=>i=>typeof i==`function`?i(t,n,e):r(i)}var cfe=DK(),lfe=DK,ufe=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]==`object`?gG:gG.apply(null,arguments)};typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function OK(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw Error(lq(0));return{type:e,payload:r.payload,...`meta`in r&&{meta:r.meta},...`error`in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>_G(t)&&t.type===e,n}var kK=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function AK(e){return jG(e)?TK(e,()=>{}):e}function jK(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function dfe(e){return typeof e==`boolean`}var ffe=()=>function(e){let{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{},a=new kK;return t&&(dfe(t)?a.push(cfe):a.push(lfe(t.extraArgument))),a},MK=`RTK_autoBatch`,NK=()=>e=>({payload:e,meta:{[MK]:!0}}),PK=e=>t=>{setTimeout(t,e)},pfe=(e,t)=>n=>{let r=!1,i=()=>{r||(r=!0,cancelAnimationFrame(a),clearTimeout(o),n())},a=e(i),o=setTimeout(i,t)},FK=(e={type:`raf`})=>t=>(...n)=>{let r=t(...n),i=!0,a=!1,o=!1,s=new Set,c=e.type===`tick`?queueMicrotask:e.type===`raf`?typeof window<`u`&&window.requestAnimationFrame?pfe(window.requestAnimationFrame,100):PK(10):e.type===`callback`?e.queueNotification:PK(e.timeout),l=()=>{o=!1,a&&(a=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){let t=r.subscribe(()=>i&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return i=!e?.meta?.[MK],a=!i,a&&(o||(o=!0,c(l))),r.dispatch(e)}finally{i=!0}}})},mfe=e=>function(t){let{autoBatch:n=!0}=t??{},r=new kK(e);return n&&r.push(FK(typeof n==`object`?n:void 0)),r};function hfe(e){let t=ffe(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{},c;if(typeof n==`function`)c=n;else if(pG(n))c=hG(n);else throw Error(lq(1));let l;l=typeof r==`function`?r(t):t();let u=gG;i&&(u=ufe({trace:!1,...typeof i==`object`&&i}));let d=mfe(qde(...l)),f=typeof s==`function`?s(d):d(),p=u(...f);return mG(c,o,p)}function IK(e){let t={},n=[],r,i={addCase(e,n){let r=typeof e==`string`?e:e.type;if(!r)throw Error(lq(28));if(r in t)throw Error(lq(29));return t[r]=n,i},addAsyncThunk(e,r){return r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),i},addMatcher(e,t){return n.push({matcher:e,reducer:t}),i},addDefaultCase(e){return r=e,i}};return e(i),[t,n,r]}function gfe(e){return typeof e==`function`}function _fe(e,t){let[n,r,i]=IK(t),a;if(gfe(e))a=()=>AK(e());else{let t=AK(e);a=()=>t}function o(e=a(),t){let o=[n[t.type],...r.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return o.filter(e=>!!e).length===0&&(o=[i]),o.reduce((e,n)=>{if(n){if(AG(e)){let r=n(e,t);return r===void 0?e:r}if(jG(e))return TK(e,e=>n(e,t));{let r=n(e,t);if(r===void 0){if(e===null)return e;throw Error(`A case reducer on a non-draftable value must not return undefined`)}return r}}return e},e)}return o.getInitialState=a,o}var vfe=`ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW`,yfe=(e=21)=>{let t=``,n=e;for(;n--;)t+=vfe[Math.random()*64|0];return t},bfe=Symbol.for(`rtk-slice-createasyncthunk`);function xfe(e,t){return`${e}/${t}`}function Sfe({creators:e}={}){let t=e?.asyncThunk?.[bfe];return function(e){let{name:n,reducerPath:r=n}=e;if(!n)throw Error(lq(11));let i=(typeof e.reducers==`function`?e.reducers(wfe()):e.reducers)||{},a=Object.keys(i),o={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){let n=typeof e==`string`?e:e.type;if(!n)throw Error(lq(12));if(n in o.sliceCaseReducersByType)throw Error(lq(13));return o.sliceCaseReducersByType[n]=t,s},addMatcher(e,t){return o.sliceMatchers.push({matcher:e,reducer:t}),s},exposeAction(e,t){return o.actionCreators[e]=t,s},exposeCaseReducer(e,t){return o.sliceCaseReducersByName[e]=t,s}};a.forEach(r=>{let a=i[r],o={reducerName:r,type:xfe(n,r),createNotation:typeof e.reducers==`function`};Efe(a)?Ofe(o,a,s,t):Tfe(o,a,s)});function c(){let[t={},n=[],r=void 0]=typeof e.extraReducers==`function`?IK(e.extraReducers):[e.extraReducers],i={...t,...o.sliceCaseReducersByType};return _fe(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of o.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}let l=e=>e,u=new Map,d=new WeakMap,f;function p(e,t){return f||=c(),f(e,t)}function m(){return f||=c(),f.getInitialState()}function h(t,n=!1){function r(e){let i=e[t];return i===void 0&&n&&(i=jK(d,r,m)),i}function i(t=l){return jK(jK(u,n,()=>new WeakMap),t,()=>{let r={};for(let[i,a]of Object.entries(e.selectors??{}))r[i]=Cfe(a,t,()=>jK(d,t,m),n);return r})}return{reducerPath:t,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}let g={name:n,reducer:p,actions:o.actionCreators,caseReducers:o.sliceCaseReducersByName,getInitialState:m,...h(r),injectInto(e,{reducerPath:t,...n}={}){let i=t??r;return e.inject({reducerPath:i,reducer:p},n),{...g,...h(i,!0)}}};return g}}function Cfe(e,t,n,r){function i(i,...a){let o=t(i);return o===void 0&&r&&(o=n()),e(o,...a)}return i.unwrapped=e,i}var LK=Sfe();function wfe(){function e(e,t){return{_reducerDefinitionType:`asyncThunk`,payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer(e){return Object.assign({[e.name](...t){return e(...t)}}[e.name],{_reducerDefinitionType:`reducer`})},preparedReducer(e,t){return{_reducerDefinitionType:`reducerWithPrepare`,prepare:e,reducer:t}},asyncThunk:e}}function Tfe({type:e,reducerName:t,createNotation:n},r,i){let a,o;if(`reducer`in r){if(n&&!Dfe(r))throw Error(lq(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?OK(e,o):OK(e))}function Efe(e){return e._reducerDefinitionType===`asyncThunk`}function Dfe(e){return e._reducerDefinitionType===`reducerWithPrepare`}function Ofe({type:e,reducerName:t},n,r,i){if(!i)throw Error(lq(18));let{payloadCreator:a,fulfilled:o,pending:s,rejected:c,settled:l,options:u}=n,d=i(e,a,u);r.exposeAction(t,d),o&&r.addCase(d.fulfilled,o),s&&r.addCase(d.pending,s),c&&r.addCase(d.rejected,c),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:o||RK,pending:s||RK,rejected:c||RK,settled:l||RK})}function RK(){}var kfe=`task`,zK=`listener`,BK=`completed`,VK=`cancelled`,Afe=`task-${VK}`,jfe=`task-${BK}`,HK=`${zK}-${VK}`,Mfe=`${zK}-${BK}`,UK=class{constructor(e){this.code=e,this.message=`${kfe} ${VK} (reason: ${e})`}code;name=`TaskAbortError`;message},WK=(e,t)=>{if(typeof e!=`function`)throw TypeError(lq(32))},GK=()=>{},KK=(e,t=GK)=>(e.catch(t),e),qK=(e,t)=>(e.addEventListener(`abort`,t,{once:!0}),()=>e.removeEventListener(`abort`,t)),JK=e=>{if(e.aborted)throw new UK(e.reason)};function YK(e,t){let n=GK;return new Promise((r,i)=>{let a=()=>i(new UK(e.reason));if(e.aborted){a();return}n=qK(e,a),t.finally(()=>n()).then(r,i)}).finally(()=>{n=GK})}var Nfe=async(e,t)=>{try{return await Promise.resolve(),{status:`ok`,value:await e()}}catch(e){return{status:e instanceof UK?`cancelled`:`rejected`,error:e}}finally{t?.()}},XK=e=>t=>KK(YK(e,t).then(t=>(JK(e),t))),ZK=e=>{let t=XK(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:QK}=Object,$K={},eq=`listenerMiddleware`,Pfe=(e,t)=>{let n=t=>qK(e,()=>t.abort(e.reason));return(r,i)=>{WK(r,`taskExecutor`);let a=new AbortController;n(a);let o=Nfe(async()=>{JK(e),JK(a.signal);let t=await r({pause:XK(a.signal),delay:ZK(a.signal),signal:a.signal});return JK(a.signal),t},()=>a.abort(jfe));return i?.autoJoin&&t.push(o.catch(GK)),{result:XK(e)(o),cancel(){a.abort(Afe)}}}},Ffe=(e,t)=>{let n=async(n,r)=>{JK(t);let i=()=>{},a=[new Promise((t,r)=>{let a=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});i=()=>{a(),r()}})];r!=null&&a.push(new Promise(e=>setTimeout(e,r,null)));try{let e=await YK(t,Promise.race(a));return JK(t),e}finally{i()}};return((e,t)=>KK(n(e,t)))},tq=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:a}=e;if(t)i=OK(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw Error(lq(21));return WK(a,`options.listener`),{predicate:i,type:t,effect:a}},nq=QK(e=>{let{type:t,predicate:n,effect:r}=tq(e);return{id:yfe(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw Error(lq(22))}}},{withTypes:()=>nq}),rq=(e,t)=>{let{type:n,effect:r,predicate:i}=tq(t);return Array.from(e.values()).find(e=>(typeof n==`string`?e.type===n:e.predicate===i)&&e.effect===r)},iq=e=>{e.pending.forEach(e=>{e.abort(HK)})},Ife=(e,t)=>()=>{for(let e of t.keys())iq(e);e.clear()},aq=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout(()=>{throw e},0)}},oq=QK(OK(`${eq}/add`),{withTypes:()=>oq}),Lfe=OK(`${eq}/removeAll`),sq=QK(OK(`${eq}/remove`),{withTypes:()=>sq}),Rfe=(...e)=>{console.error(`${eq}/error`,...e)},cq=(e={})=>{let t=new Map,n=new Map,r=e=>{let t=n.get(e)??0;n.set(e,t+1)},i=e=>{let t=n.get(e)??1;t===1?n.delete(e):n.set(e,t-1)},{extra:a,onError:o=Rfe}=e;WK(o,`onError`);let s=e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&iq(e)}),c=(e=>{let n=rq(t,e)??nq(e);return s(n)});QK(c,{withTypes:()=>c});let l=e=>{let n=rq(t,e);return n&&(n.unsubscribe(),e.cancelActive&&iq(n)),!!n};QK(l,{withTypes:()=>l});let u=async(e,n,s,l)=>{let u=new AbortController,d=Ffe(c,u.signal),f=[];try{e.pending.add(u),r(e),await Promise.resolve(e.effect(n,QK({},s,{getOriginalState:l,condition:(e,t)=>d(e,t).then(Boolean),take:d,delay:ZK(u.signal),pause:XK(u.signal),extra:a,signal:u.signal,fork:Pfe(u.signal,f),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==u&&(e.abort(HK),n.delete(e))})},cancel:()=>{u.abort(HK),e.pending.delete(u)},throwIfCancelled:()=>{JK(u.signal)}})))}catch(e){e instanceof UK||aq(o,e,{raisedBy:`effect`})}finally{await Promise.all(f),u.abort(Mfe),i(e),e.pending.delete(u)}},d=Ife(t,n);return{middleware:e=>n=>r=>{if(!_G(r))return n(r);if(oq.match(r))return c(r.payload);if(Lfe.match(r)){d();return}if(sq.match(r))return l(r.payload);let i=e.getState(),a=()=>{if(i===$K)throw Error(lq(23));return i},s;try{if(s=n(r),t.size>0){let n=e.getState(),s=Array.from(t.values());for(let t of s){let s=!1;try{s=t.predicate(r,n,i)}catch(e){s=!1,aq(o,e,{raisedBy:`predicate`})}s&&u(t,r,e,a)}}}finally{i=$K}return s},startListening:c,stopListening:l,clearListeners:d}};function lq(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var uq=LK({name:`chartLayout`,initialState:{layoutType:`horizontal`,width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){e.margin.top=t.payload.top??0,e.margin.right=t.payload.right??0,e.margin.bottom=t.payload.bottom??0,e.margin.left=t.payload.left??0},setScale(e,t){e.scale=t.payload}}}),dq=uq.actions,fq=dq.setMargin,pq=dq.setLayout,mq=dq.setChartSize,hq=dq.setScale,gq=uq.reducer;function _q(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function vq(e){return Number.isFinite(e)}function yq(e){return typeof e==`number`&&e>0&&Number.isFinite(e)}function bq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xq(e){for(var t=1;t{if(t&&n){var r=n.width,i=n.height,a=t.align,o=t.verticalAlign,s=t.layout,c=t.position,l=t.offset,u=l===void 0?0:l;if(c!=null){if(Uue(c)){if(c===`top`&&TU(e.top))return xq(xq({},e),{},{top:e.top+(i||0)+u});if(c===`bottom`&&TU(e.bottom))return xq(xq({},e),{},{bottom:e.bottom+(i||0)+u});if(c===`left`&&TU(e.left))return xq(xq({},e),{},{left:e.left+(r||0)+u});if(c===`right`&&TU(e.right))return xq(xq({},e),{},{right:e.right+(r||0)+u})}return e}if((s===`vertical`||s===`horizontal`&&o===`middle`)&&a!==`center`&&TU(e[a]))return xq(xq({},e),{},{[a]:e[a]+(r||0)});if((s===`horizontal`||s===`vertical`&&a===`center`)&&o!==`middle`&&TU(e[o]))return xq(xq({},e),{},{[o]:e[o]+(i||0)})}return e},Dq=(e,t)=>e===`horizontal`&&t===`xAxis`||e===`vertical`&&t===`yAxis`||e===`centric`&&t===`angleAxis`||e===`radial`&&t===`radiusAxis`,Oq=(e,t,n,r)=>{if(r)return e.map(e=>e.coordinate);var i,a,o=e.map(e=>(e.coordinate===t&&(i=!0),e.coordinate===n&&(a=!0),e.coordinate));return i||o.push(t),a||o.push(n),o},kq=(e,t,n)=>{if(!e)return null;var r=e.duplicateDomain,i=e.type,a=e.range,o=e.scale,s=e.realScaleType,c=e.isCategorical,l=e.categoricalDomain,u=e.tickCount,d=e.ticks,f=e.niceTicks,p=e.axisType;if(!o)return null;var m=s===`scaleBand`&&o.bandwidth?o.bandwidth()/2:2,h=(t||n)&&i===`category`&&o.bandwidth?o.bandwidth()/m:0;return h=p===`angleAxis`&&a&&a.length>=2?SU(a[0]-a[1])*2*h:h,t&&(d||f)?(d||f||[]).map((e,t)=>{var n=r?r.indexOf(e):e,i=o.map(n);return vq(i)?{coordinate:i+h,value:e,offset:h,index:t}:null}).filter(PU):c&&l?l.map((e,t)=>{var n=o.map(e);return vq(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(PU):o.ticks&&!n&&u!=null?o.ticks(u).map((e,t)=>{var n=o.map(e);return vq(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(PU):o.domain().map((e,t)=>{var n=o.map(e);return vq(n)?{coordinate:n+h,value:r?r[e]:e,index:t,offset:h}:null}).filter(PU)},Aq={sign:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r=0?(s[0]=i,i+=u,s[1]=i):(s[0]=a,a+=u,s[1]=a)}}}},expand:cde,none:gW,silhouette:lde,wiggle:ude,positive:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r=0?(o[0]=i,i+=s,o[1]=i):(o[0]=0,o[1]=0)}}}}},jq=(e,t,n)=>{var r=Aq[n]??gW,i=sde().keys(t).value((e,t)=>Number(Tq(e,t,0))).order(_W).offset(r)(e);return i.forEach((n,r)=>{n.forEach((n,i)=>{var a=Tq(e[i],t[r],0);Array.isArray(a)&&a.length===2&&TU(a[0])&&TU(a[1])&&(n[0]=a[0],n[1]=a[1])})}),i};function Mq(e){return e==null?void 0:String(e)}function Nq(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type===`category`){if(!t.allowDuplicatedCategory&&t.dataKey&&!MU(i[t.dataKey])){var s=jU(n,`value`,i[t.dataKey]);if(s)return s.coordinate+r/2}return n!=null&&n[a]?n[a].coordinate+r/2:null}var c=Tq(i,MU(o)?t.dataKey:o),l=t.scale.map(c);return TU(l)?l:null}var Pq=e=>{var t=e.flat(2).filter(TU);return[Math.min(...t),Math.max(...t)]},Fq=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],Iq=(e,t,n)=>{if(e!=null&&Object.keys(e).length!==0)return Fq(Object.keys(e).reduce((r,i)=>{var a=e[i];if(!a)return r;var o=a.stackedData.reduce((e,r)=>{var i=Pq(_q(r,t,n));return!vq(i[0])||!vq(i[1])?e:[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(o[0],r[0]),Math.max(o[1],r[1])]},[1/0,-1/0]))},Lq=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Rq=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,zq=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=sG(t,e=>e.coordinate),a=[],o=0,s=1,c=i.length;su&&(d=Math.min(f,d));return d===1/0?0:d}return n?void 0:0};function Bq(e){var t=e.tooltipEntrySettings,n=e.dataKey,r=e.payload,i=e.value,a=e.name;return xq(xq({},t),{},{dataKey:n,payload:r,value:i,name:a})}function Vq(e,t){if(e!=null)return String(e);if(typeof t==`string`)return t}var Hq=(e,t)=>{if(t===`horizontal`)return e.relativeX;if(t===`vertical`)return e.relativeY},Uq=(e,t)=>t===`centric`?e.angle:e.radius,Wq=e=>e.layout.width,Gq=e=>e.layout.height,Kq=e=>e.layout.scale,qq=e=>e.layout.margin,Jq=$(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Yq=$(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),Xq=`data-recharts-item-index`;function Zq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qq(e){for(var t=1;te.brush.height;function rJ(e){return Yq(e).reduce((e,t)=>t.orientation===`left`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function iJ(e){return Yq(e).reduce((e,t)=>t.orientation===`right`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function aJ(e){return Jq(e).reduce((e,t)=>t.orientation===`top`&&!t.mirror&&!t.hide?e+(typeof t.height==`number`?t.height:30):e,0)}function oJ(e){return Jq(e).reduce((e,t)=>t.orientation===`bottom`&&!t.mirror&&!t.hide?e+(typeof t.height==`number`?t.height:30):e,0)}var sJ=$([Wq,Gq,qq,nJ,rJ,iJ,aJ,oJ,cG,Gde],(e,t,n,r,i,a,o,s,c,l)=>{var u={left:(n.left||0)+i,right:(n.right||0)+a},d=Qq(Qq({},{top:(n.top||0)+o,bottom:(n.bottom||0)+s}),u),f=d.bottom;d.bottom+=r,d=Eq(d,c,l);var p=e-d.left-d.right,m=t-d.top-d.bottom;return Qq(Qq({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(m,0)})}),cJ=$(sJ,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),lJ=$(Wq,Gq,(e,t)=>({x:0,y:0,width:e,height:t})),uJ=(0,v.createContext)(null),dJ=()=>(0,v.useContext)(uJ)!=null,fJ=e=>e.brush,pJ=$([fJ,sJ,qq],(e,t,n)=>({height:e.height,x:TU(e.x)?e.x:t.left,y:TU(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:TU(e.width)?e.width:t.width}));function mJ(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}function hJ(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=mJ(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?((r||i)&&(s=e.apply(this,t)),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function gJ(e,t=0,n={}){let{leading:r=!0,trailing:i=!0}=n;return hJ(e,t,{leading:r,maxWait:t,trailing:i})}var _J=function(e,t){var n=[...arguments].slice(2);if(typeof console<`u`&&console.warn&&(t===void 0&&console.warn(`LogUtils requires an error message argument`),!e)){if(t===void 0)console.warn(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var r=0;console.warn(t.replace(/%s/g,()=>n[r++]))}}},vJ={width:`100%`,height:`100%`,debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},yJ=(e,t,n)=>{var r=n.width,i=r===void 0?vJ.width:r,a=n.height,o=a===void 0?vJ.height:a,s=n.aspect,c=n.maxHeight,l=wU(i)?e:Number(i),u=wU(o)?t:Number(o);return s&&s>0&&(l?u=l/s:u&&(l=u*s),c&&u!=null&&u>c&&(u=c)),{calculatedWidth:l,calculatedHeight:u}},bJ={width:0,height:0,overflow:`visible`},xJ={width:0,overflowX:`visible`},SJ={height:0,overflowY:`visible`},CJ={},wJ=e=>{var t=e.width,n=e.height,r=wU(t),i=wU(n);return r&&i?bJ:r?xJ:i?SJ:CJ};function TJ(e){var t=e.width,n=e.height,r=e.aspect,i=t,a=n;return i===void 0&&a===void 0?(i=vJ.width,a=vJ.height):i===void 0?i=r&&r>0?void 0:vJ.width:a===void 0&&(a=r&&r>0?void 0:vJ.height),{width:i,height:a}}var EJ=[`aspect`,`initialDimension`,`width`,`height`,`minWidth`,`minHeight`,`maxHeight`,`children`,`debounce`,`id`,`className`,`onResize`,`style`];function DJ(){return DJ=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n({width:n,height:r}),[n,r]);return HJ(i)?v.createElement(VJ.Provider,{value:i},t):null}var WJ=()=>(0,v.useContext)(VJ),GJ=(0,v.forwardRef)((e,t)=>{var n=e.aspect,r=e.initialDimension,i=r===void 0?vJ.initialDimension:r,a=e.width,o=e.height,s=e.minWidth,c=s===void 0?vJ.minWidth:s,l=e.minHeight,u=e.maxHeight,d=e.children,f=e.debounce,p=f===void 0?vJ.debounce:f,m=e.id,h=e.className,g=e.onResize,_=e.style,y=_===void 0?{}:_,b=zJ(e,EJ),x=(0,v.useRef)(null),S=(0,v.useRef)();S.current=g,(0,v.useImperativeHandle)(t,()=>x.current);var C=NJ((0,v.useState)({containerWidth:i.width,containerHeight:i.height}),2),w=C[0],T=C[1],E=(0,v.useCallback)((e,t)=>{T(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);(0,v.useEffect)(()=>{if(x.current==null||typeof ResizeObserver>`u`)return FU;var e=e=>{var t,n=e[0];if(n!=null){var r=n.contentRect,i=r.width,a=r.height;E(i,a),(t=S.current)==null||t.call(S,i,a)}};p>0&&(e=gJ(e,p,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=x.current.getBoundingClientRect(),r=n.width,i=n.height;return E(r,i),t.observe(x.current),()=>{t.disconnect()}},[E,p]);var D=w.containerWidth,O=w.containerHeight;_J(!n||n>0,`The aspect(%s) must be greater than zero.`,n);var k=yJ(D,O,{width:a,height:o,aspect:n,maxHeight:u}),A=k.calculatedWidth,j=k.calculatedHeight;return _J(D<0||O<0||A!=null&&A>0||j!=null&&j>0,`The width(%s) and height(%s) of chart should be greater than 0, please check the style of container, or the props width(%s) and height(%s), or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the @@ -156,7 +156,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho [class*="animate-[inflight-queue-shimmer_"], [class*="animate-[inflight-glow_"]{animation:none!important} } - `}),c?null:(0,G.jsxs)(`div`,{className:`flex items-start justify-between gap-3 px-4 py-3`,children:[(0,G.jsxs)(`button`,{type:`button`,"data-testid":`inflight-live-toggle`,"aria-expanded":f,"aria-controls":`inflight-live-body`,onClick:()=>p(!f),className:`flex min-w-0 flex-1 items-start gap-2 text-left outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 focus-visible:ring-offset-background`,children:[(0,G.jsx)(gi,{size:14,"aria-hidden":!0,className:`mt-1 shrink-0 text-muted transition-transform duration-200 ${f?`rotate-90`:``}`}),(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:e(`inflightTitle`)}),(0,G.jsxs)(`span`,{className:`mono inline-flex items-center gap-1 rounded-[3px] px-1.5 py-0.5 text-caption text-muted`,children:[(0,G.jsx)(`span`,{className:`status-dot`,"data-state":ne?`ok`:``}),e(ne?`inflightLiveBadge`:re?`inflightMockBadge`:`inflightIdleBadge`)]}),f&&ie>0?(0,G.jsx)(`span`,{className:`mono text-caption text-muted`,children:e(`inflightStickyBindings`,{n:ie})}):null]}),(0,G.jsx)(`p`,{className:`mt-0.5 text-caption text-muted`,children:e(`inflightHint`)})]})]}),(0,G.jsxs)(`div`,{className:`flex shrink-0 flex-col items-end gap-2`,children:[f?(0,G.jsxs)(Sn,{to:`/live`,className:`inline-flex shrink-0 items-center gap-1 text-caption text-muted transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus`,"aria-label":e(`inflightCardAria`),onClick:e=>e.stopPropagation(),children:[e(`inflightOpen`),(0,G.jsx)(ii,{size:14,"aria-hidden":!0})]}):(0,G.jsxs)(`button`,{type:`button`,className:`inline-flex shrink-0 items-center gap-1 text-caption text-muted transition-colors hover:text-foreground`,onClick:()=>p(!0),children:[e(`inflightExpand`),(0,G.jsx)(gi,{size:14,"aria-hidden":!0})]}),f&&!l?(0,G.jsx)(`div`,{className:`flex items-center gap-1.5`,onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:(0,G.jsx)(s7,{size:`sm`,isSelected:m,ariaLabel:e(`inflightMockToggleAria`),label:e(`inflightMockToggle`),onChange:g})}):null]})]}),f?(0,G.jsxs)(`div`,{id:`inflight-live-body`,ref:N,children:[(0,G.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 px-4 pb-1 pt-0 sm:grid-cols-4`,children:[(0,G.jsx)(_7,{label:e(`inflightWaiting`),value:M.waiting,warn:H}),(0,G.jsx)(_7,{label:e(`inflightRunning`),value:M.occupiedSlots,suffix:`/${M.workerSlots}`}),(0,G.jsx)(_7,{label:e(`inflightThroughput`),value:j.throughputPerMin,suffix:`/min`}),(0,G.jsx)(_7,{label:e(`inflightWaitP95`),value:j.waitP95Ms,kind:`ms`})]}),(0,G.jsxs)(`div`,{className:`grid gap-3 px-4 py-3 lg:grid-cols-[minmax(11rem,0.7fr)_minmax(0,2.1fr)_auto]`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,"data-queue-col":!0,children:[(0,G.jsxs)(`div`,{className:`mb-1.5 flex items-baseline justify-between gap-2`,children:[(0,G.jsx)(`span`,{className:`text-caption uppercase tracking-wide text-muted`,children:e(`inflightQueue`)}),(0,G.jsx)(`span`,{className:`mono text-[10px] tabular ${H?`text-[var(--il-warn-fg)]`:`text-muted`}`,children:M.waiting})]}),(0,G.jsxs)(`div`,{className:`space-y-1.5`,children:[z.map(t=>(0,G.jsxs)(`div`,{"data-wait-pill":!0,"data-wait-id":t.id,"data-priority":t.priority??`normal`,className:`relative flex items-center justify-between gap-2 overflow-hidden rounded-xl px-2.5 py-2 ${XCe(t.kind)}`,children:[(0,G.jsx)(`span`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-y-0 w-2/5 bg-gradient-to-r from-transparent via-[color-mix(in_oklab,var(--foreground)_8%,transparent)] to-transparent motion-safe:animate-[inflight-queue-shimmer_2.8s_linear_infinite]`}),(0,G.jsxs)(`span`,{className:`relative z-[1] flex min-w-0 items-center gap-2.5 truncate text-caption font-medium text-foreground/78`,children:[YCe(t.kind),(0,G.jsxs)(`span`,{className:`truncate`,children:[t.name,t.priority===`high`?(0,G.jsx)(`span`,{className:`mono ml-1 text-[10px] text-muted`,children:`↑`}):null,t.sticky?(0,G.jsx)(`span`,{className:`mono ml-1 text-[10px] text-muted`,children:e(`inflightSticky`)}):null]})]}),(0,G.jsx)(`span`,{className:`relative z-[1] mono shrink-0 text-caption text-muted`,children:m7(JCe(t,w))})]},t.id)),B.length?(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1 pt-1`,"data-queue-overflow":!0,children:[B.map(e=>(0,G.jsx)(`span`,{"data-wait-token":!0,"data-wait-id":e.id,"data-priority":e.priority??`normal`,className:`size-2 rounded-[2px] ${h7(e.kind)} ${e.priority===`high`?`ring-1 ring-foreground/20`:``}`,title:e.name},e.id)),(0,G.jsxs)(`span`,{className:`mono text-[10px] text-muted`,children:[`+`,B.length]})]}):z.length===0?(0,G.jsx)(`div`,{className:`text-caption text-muted`,children:e(`inflightQueueEmpty`)}):null]})]}),(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsxs)(`div`,{className:`mb-1.5 flex items-baseline justify-between gap-2`,children:[(0,G.jsx)(`span`,{className:`text-caption uppercase tracking-wide text-muted`,children:e(`inflightSlots`)}),(0,G.jsxs)(`span`,{className:`mono text-[10px] tabular text-muted`,children:[M.occupiedSlots,`/`,M.workerSlots]})]}),(0,G.jsx)(`div`,{className:`flex flex-col gap-2`,"data-worker-rail":!0,children:V.map(t=>(0,G.jsx)(QCe,{slot:t,jobById:L,clockMs:w,idleLabel:e(`inflightSlotIdle`),landedCellIds:E},t.id))})]}),(0,G.jsxs)(`div`,{className:`flex gap-2 sm:gap-2.5 lg:w-[6.75rem] lg:flex-col lg:gap-2.5`,children:[(0,G.jsx)(v7,{label:e(`inflightDone`),value:j.totals.done,tone:`ok`,icon:(0,G.jsx)(Ei,{size:22,"aria-hidden":!0})}),(0,G.jsx)(v7,{label:e(`inflightFailed`),value:j.totals.failed,tone:`danger`,icon:(0,G.jsx)(yo,{size:22,"aria-hidden":!0})})]})]}),(0,G.jsxs)(`div`,{"data-depth":!0,className:`px-4 py-3`,children:[(0,G.jsxs)(`div`,{className:`mb-1 flex items-baseline justify-between gap-2`,children:[(0,G.jsx)(`span`,{className:`text-caption uppercase tracking-wide text-muted`,children:e(`inflightDepth`)}),(0,G.jsx)(`span`,{className:`mono text-caption tabular text-muted`,children:te})]}),(0,G.jsx)(`div`,{className:`rounded-lg bg-[var(--il-item-bg)] px-1.5 pt-1.5 pb-1`,children:(0,G.jsx)(ZCe,{series:j.depthSeries,bands:[],backpressure:j.backpressure,label:te})})]})]}):null]})}function _7({label:e,value:t,suffix:n,kind:r=`int`,warn:i}){return(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(`div`,{className:`text-caption uppercase tracking-wide text-muted`,children:e}),(0,G.jsxs)(`div`,{className:`mono mt-1 flex items-baseline gap-0.5 text-section font-semibold tabular ${i?`text-[var(--il-warn-fg)]`:`text-foreground`}`,children:[(0,G.jsx)(SV,{value:t,kind:r,duration:560}),n?(0,G.jsx)(`span`,{className:`text-[0.92em] opacity-80`,children:n}):null]})]})}function v7({label:e,value:t,tone:n,icon:r}){let i=n===`ok`;return(0,G.jsxs)(`div`,{"data-outcome":n,role:`group`,"aria-label":`${e}: ${t}`,title:`${e}: ${t}`,className:`flex min-h-28 min-w-[3.6rem] flex-1 flex-col items-center justify-center gap-2 rounded-2xl border px-3 py-4 ${i?`border-[color-mix(in_oklab,var(--success)_14%,transparent)] bg-[var(--il-ok-bg)]`:`border-[color-mix(in_oklab,var(--danger)_12%,transparent)] bg-[var(--il-err-bg)]`}`,children:[(0,G.jsx)(`span`,{className:`inline-flex size-12 items-center justify-center rounded-2xl ${i?`bg-[color-mix(in_oklab,var(--success)_14%,var(--surface))] text-[var(--il-ok-fg)]`:`bg-[color-mix(in_oklab,var(--danger)_12%,var(--surface))] text-[var(--il-err-fg)]`}`,"aria-hidden":!0,children:r}),(0,G.jsx)(`div`,{className:`mono text-[1.7rem] font-semibold tabular leading-none tracking-tight ${i?`text-[var(--il-ok-fg)]`:`text-[var(--il-err-fg)]`}`,children:(0,G.jsx)(SV,{value:t,kind:`int`,duration:560})}),(0,G.jsx)(`span`,{className:`text-caption font-medium ${i?`text-[color-mix(in_oklab,var(--success)_55%,var(--muted))]`:`text-[color-mix(in_oklab,var(--danger)_55%,var(--muted))]`}`,children:e})]})}function $Ce(){return QF(`/api/live`)}var y7=2500,ewe=Math.round(6e4/y7);function twe(e){let t=e?.intervalMs??2500,[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)([]);return(0,v.useEffect)(()=>{let e=!1,n=null,i=()=>{document.hidden||$Ce().then(n=>{if(e)return;r(n);let i=Math.max(ewe,Math.round(6e4/t));a(e=>[...e,{at:Date.now(),value:n.in_flight}].slice(-i))}).catch(()=>{})},o=()=>{n||document.hidden||(i(),n=setInterval(i,t))},s=()=>{n&&clearInterval(n),n=null},c=()=>document.hidden?s():o();return o(),document.addEventListener(`visibilitychange`,c),()=>{e=!0,s(),document.removeEventListener(`visibilitychange`,c)}},[t]),{live:n,samples:i}}var nwe=(0,v.lazy)(()=>C(()=>import(`./TrafficChart-BhmoeXrG.js`).then(e=>({default:e.TrafficChart})),__vite__mapDeps([0,1]))),b7=3e4,rwe={window:{from:``,to:``,hours:24},totals:{requests:0,ok:0,incomplete:0,error:0,canceled:0,streaming:0,success_rate:0},latency:{},tokens:{prompt:0,completion:0,cache_read:0,total:0},status:[],errors:[],models:[],accounts:[],providers:[],series:[]};function iwe(e,t){return!e||e===`(unknown)`?t(`statsUnknown`):HV(e,t)}function awe(e,t,n){return!t||t===`(unassigned)`?n:e.find(e=>e.id===t)?.name||t}var owe=new Set([`quota`,`rate_limit`,`auth`,`not_ready`,`unavailable`,`invalid_request`,`model_not_available`]);function x7(e,t){let n={quota:`logsKindQuota`,rate_limit:`logsKindRateLimit`,auth:`logsKindAuth`,not_ready:`logsKindNotReady`,unavailable:`logsKindUnavailable`,invalid_request:`logsKindInvalidRequest`,model_not_available:`logsKindModelNotAvailable`};return n[e]?t(n[e]):e}var swe=[`ok`,`incomplete`,`error`,`canceled`],S7={ok:`bg-success`,incomplete:`bg-warning`,error:`bg-danger`,canceled:`bg-muted`},C7={ok:`logsFilterOk`,incomplete:`logsFilterIncomplete`,error:`logsFilterError`,canceled:`logsFilterCanceled`};function w7(e,t){return t>0?e/t:null}function cwe(e,t){if(!e)return null;let n=Date.parse(e);if(!Number.isFinite(n))return null;let r=Math.max(0,Math.round((n-t)/1e3));if(r<=0)return null;let i=Math.floor(r/3600),a=Math.floor(r%3600/60),o=r%60;return i?`${i}h ${a}m`:a?`${a}m ${String(o).padStart(2,`0`)}s`:`${o}s`}function lwe(e,t){let n=[e.down_until,e.cooldown_until].filter(e=>!!e).filter(e=>Date.parse(e)>t);return n.length?n.reduce((e,t)=>Date.parse(e)>=Date.parse(t)?e:t):null}function uwe(e,t){return t?`danger`:(e??0)>=80?`warning`:`ok`}function dwe(){let{lang:e,t}=GF(),{overview:n,loading:r,error:i}=pI(),[a,o]=(0,v.useState)(`today`),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(!1),d=at(),[f,p]=(0,v.useState)(null),[m,h]=(0,v.useState)(``),[g,_]=(0,v.useState)(!0),[y,b]=(0,v.useState)([]),[x,S]=(0,v.useState)(!0),[C,w]=(0,v.useState)(0),[T,E]=(0,v.useState)(null),[D,O]=(0,v.useState)(()=>Date.now()),[k,A]=(0,v.useState)(!1),[j,M]=(0,v.useState)(!1),{live:N,samples:P}=twe({intervalMs:k?400:y7}),F=new Map((N?.accounts??[]).map(e=>[e.id,e])),I=!!n?.proxy?.ok,L=!!n?.worker?.ok,R=n?.worker?.ready_count??0,z=n?.worker?.hot_count??0,B=N?.in_flight??n?.worker?.in_flight??0,V=f??rwe,H=n?.routing?.session_affinity,ee=(H?.hits??0)+(H?.misses??0),te=w7(H?.hits??0,ee),ne=y.map(e=>({account:e,until:lwe(e,D)})).filter(e=>e.until!=null),re=ne.length>0,ie=new Set(ne.map(e=>e.account.id)),ae=[...y.filter(e=>e.ready&&!ie.has(e.id)),...y.filter(e=>!e.ready&&!ie.has(e.id))].slice(0,6);(0,v.useEffect)(()=>{if(!re)return;let e=setInterval(()=>O(Date.now()),1e3);return()=>clearInterval(e)},[re]),(0,v.useEffect)(()=>{let e=!1;return Promise.allSettled([$F(!1),oI()]).then(([t,n])=>{e||(t.status===`fulfilled`&&b(t.value.data||[]),n.status===`fulfilled`&&w((n.value.data||[]).length))}).finally(()=>{e||S(!1)}),()=>{e=!0}},[]);let oe=s?.start?.toString()??``,se=s?.end?.toString()??``,ce=(0,v.useRef)(0),le=(0,v.useCallback)(e=>{let t=kV(a,s);if(!t){_(!1);return}let n=++ce.current;cV(t).then(e=>{n===ce.current&&(p(e),h(``))}).catch(t=>{n!==ce.current||e||(p(null),h(t instanceof Error?t.message:String(t)))}).finally(()=>{n===ce.current&&_(!1)})},[a,oe,se]);(0,v.useEffect)(()=>(le(!1),()=>{ce.current++}),[le]),(0,v.useEffect)(()=>{if(l)return;let e=Date.now(),t=()=>{document.hidden||(e=Date.now(),le(!0))},n=setInterval(t,b7),r=()=>{!document.hidden&&Date.now()-e>=b7&&t()};return document.addEventListener(`visibilitychange`,r),()=>{clearInterval(n),document.removeEventListener(`visibilitychange`,r)}},[l,le]),(0,v.useEffect)(()=>{let e=!1,t=()=>{Tse().then(t=>{e||E(t)}).catch(()=>{})};t();let n=setInterval(t,5e3);return()=>{e=!0,clearInterval(n)}},[]);let ue=Math.floor(V.series.length/2),de=(e,t)=>e.reduce((e,n)=>e+n[t],0),fe=V.series.slice(0,ue),pe=V.series.slice(ue),me=((e,t)=>e>0?(t-e)/e:null)(de(fe,`requests`),de(pe,`requests`)),he=de(fe,`requests`)?de(fe,`ok`)/de(fe,`requests`):null,ge=de(pe,`requests`)?de(pe,`ok`)/de(pe,`requests`):null,_e=he!=null&&ge!=null?ge-he:null,ve=[{label:t(`metricRequests`),value:V.totals.requests,kind:`compact`,detail:t(`statsWindowHint`,{window:t(OV[a])}),ok:V.totals.requests>0,trend:me},{label:t(`metricSuccess`),value:V.totals.success_rate,kind:`percent`,detail:`${V.totals.ok} ${t(`logsFilterOk`)} · ${V.totals.incomplete} ${t(`logsFilterIncomplete`)} · ${V.totals.error} ${t(`logsFilterError`)}`,ok:V.totals.requests===0||V.totals.success_rate>=.9,trend:_e},{label:t(`metricLatency`),value:V.latency.p95_ms??V.latency.avg_ms,kind:`ms`,detail:`p50 ${dV(V.latency.p50_ms)} · avg ${dV(V.latency.avg_ms)}`,ok:V.latency.p95_ms==null||V.latency.p95_ms<8e3,trend:null},{label:t(`metricTokens`),value:V.tokens.total,kind:`compact`,detail:`${uV(V.tokens.prompt)} / ${uV(V.tokens.completion)}`,ok:!0,trend:null}],ye=w7(V.tokens.cache_read,V.tokens.prompt),be=w7(V.totals.streaming,V.totals.requests),xe=[{label:t(`metricCacheHit`),value:ye,kind:`percent`,detail:t(`metricCacheHitDetail`,{read:uV(V.tokens.cache_read),prompt:uV(V.tokens.prompt)})},{label:t(`metricStreaming`),value:be,kind:`percent`,detail:t(`metricStreamingDetail`,{count:V.totals.streaming,total:V.totals.requests})},{label:t(`metricCanceled`),value:V.totals.canceled,kind:`int`,detail:t(`metricCanceledDetail`,{rate:pV(w7(V.totals.canceled,V.totals.requests)??0)})}],Se=swe.map(e=>({key:e,count:V.status.find(t=>t.key===e)?.count??V.totals[e]??0})),Ce=e=>jV(e,V.window.from,V.window.to);return r&&!n?(0,G.jsx)(Fce,{}):(0,G.jsxs)(`div`,{className:`space-y-5 sm:space-y-4`,children:[(0,G.jsxs)(`section`,{className:`grid gap-3 pb-1 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-end`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h2`,{"data-gsap-reveal":!0,className:`text-title font-semibold`,children:t(`homeDisplay`)}),(0,G.jsx)(`p`,{className:`mt-1 max-w-2xl text-body leading-6 text-muted`,children:t(`homeLead`)})]}),(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,G.jsx)(AV,{value:a,onChange:o,custom:s,onCustomChange:c,onBusy:()=>_(!0),t}),(0,G.jsxs)(Aj,{delay:300,children:[(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,"aria-label":t(l?`statsRefreshResume`:`statsRefreshPause`),"aria-pressed":l,onPress:()=>u(e=>!e),children:l?(0,G.jsx)(Aa,{size:14}):(0,G.jsx)(Ea,{size:14})}),(0,G.jsx)(Aj.Content,{children:t(l?`statsRefreshPaused`:`statsRefreshAuto`)})]}),(0,G.jsxs)(`div`,{className:`text-left sm:text-right`,children:[(0,G.jsx)(`div`,{className:`mono text-caption text-muted`,children:n?.time||`—`}),(0,G.jsxs)(`div`,{className:`mt-1 inline-flex items-center gap-2 text-body font-medium`,children:[(0,G.jsx)(`span`,{className:`status-dot`,"data-state":I&&L?`ok`:`danger`}),t(I&&L?`running`:`degraded`)]})]})]})]}),i?(0,G.jsx)(vI,{title:t(`failedOverview`,{msg:i})}):null,(0,G.jsx)(Fle,{live:N,samples:P,t,onConcurrencyClick:()=>A(!0)}),(0,G.jsx)(g7,{t,expanded:k,onExpandedChange:A,live:k?N:null}),(0,G.jsx)(`section`,{"data-gsap-reveal":!0,className:`grid gap-3 sm:grid-cols-2 xl:grid-cols-4`,children:ve.map(e=>(0,G.jsxs)(xS,{className:`gap-0 p-3.5`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,G.jsx)(`div`,{className:`text-body text-muted`,children:e.label}),(0,G.jsx)(`span`,{className:`status-dot`,"data-state":e.ok?`ok`:`danger`})]}),(0,G.jsxs)(`div`,{className:`mt-1.5 flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(`div`,{className:`tabular text-metric font-medium leading-none`,children:g?(0,G.jsx)(Q,{className:`h-7 w-24`}):e.value==null?`—`:(0,G.jsx)(SV,{value:e.value,kind:e.kind})}),!g&&e.trend!=null?(0,G.jsx)(pwe,{value:e.trend,hint:t(`trendHalfHint`)}):null]}),(0,G.jsx)(`div`,{className:`mono mt-2 truncate text-caption text-muted`,children:g?(0,G.jsx)(Q,{className:`h-3 w-28`}):e.detail})]},e.label))}),(0,G.jsx)(`section`,{className:`grid gap-3 sm:grid-cols-3`,children:xe.map(e=>(0,G.jsx)(xS,{className:`gap-0 p-3.5`,children:(0,G.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-3`,children:[(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsx)(`div`,{className:`text-body text-muted`,children:e.label}),(0,G.jsx)(`div`,{className:`mono mt-0.5 truncate text-caption text-muted`,children:g?(0,G.jsx)(Q,{className:`h-3 w-28`}):e.detail})]}),(0,G.jsx)(`div`,{className:`tabular text-section font-semibold sm:shrink-0`,children:g?(0,G.jsx)(Q,{className:`h-5 w-12`}):e.value==null?`—`:(0,G.jsx)(SV,{value:e.value,kind:e.kind})})]})},e.label))}),(0,G.jsx)(`section`,{className:`grid gap-3`,children:(0,G.jsxs)(xS,{"data-gsap-reveal":!0,className:`overflow-hidden p-0`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-separator px-4 py-3`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:t(`statsTraffic`)}),(0,G.jsx)(`p`,{className:`mt-0.5 text-caption text-muted`,children:t(`statsTrafficHint`)})]}),(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:V.totals.error?`warning`:`success`,children:pV(V.totals.success_rate)})]}),(0,G.jsxs)(`div`,{className:`space-y-4 p-4`,children:[m?(0,G.jsx)(`div`,{className:`text-body text-danger`,children:t(`failedStats`,{msg:m})}):g?(0,G.jsx)(JB,{}):V.series.some(e=>e.requests>0)?(0,G.jsx)(v.Suspense,{fallback:(0,G.jsx)(JB,{}),children:(0,G.jsx)(nwe,{series:V.series,lang:e,emptyLabel:t(`statsEmptyTraffic`),okLabel:t(`logsFilterOk`),errorLabel:t(`logsFilterError`),selectHint:t(`statsDragHint`),labels:{requests:t(`chartMetricRequests`),tokens:t(`chartMetricTokens`),latency:t(`chartMetricLatency`),input:t(`chartInput`),output:t(`chartOutput`),cacheRead:t(`chartCacheRead`),p50:t(`statsLatencyP50`),p95:t(`statsLatencyP95`),total:t(`chartTotal`)},onSelectRange:(e,t)=>d(jV({},e,t))})}):(0,G.jsx)(CV,{emptyLabel:t(`statsEmptyTraffic`)}),(0,G.jsx)(`div`,{className:`grid grid-cols-2 gap-x-4 gap-y-4 pt-3 sm:grid-cols-4 sm:gap-3`,children:[[t(`statsLatencyP50`),dV(V.latency.p50_ms)],[t(`statsLatencyP95`),dV(V.latency.p95_ms)],[t(`statsLatencyAvg`),dV(V.latency.avg_ms)],[t(`statsTTFB`),dV(V.latency.ttfb_avg_ms)]].map(([e,t])=>(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`div`,{className:`text-caption text-muted`,children:e}),(0,G.jsx)(`div`,{className:`mono mt-1 text-body font-medium`,children:g?(0,G.jsx)(Q,{className:`h-4 w-16`}):t})]},String(e)))})]})]})}),(0,G.jsxs)(`section`,{className:`grid gap-3 xl:grid-cols-[minmax(0,1.15fr)_minmax(0,.85fr)]`,children:[(0,G.jsxs)(xS,{"data-gsap-reveal":!0,className:`overflow-hidden p-0`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-separator px-4 py-3`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:t(`statsPool`)}),(0,G.jsx)(`p`,{className:`mt-0.5 text-caption text-muted`,children:t(`statsPoolHint`)})]}),(0,G.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[!x&&ne.length?(0,G.jsxs)(`button`,{type:`button`,className:`inline-flex items-center gap-1 rounded-2xl bg-surface-secondary px-2 py-0.5 text-caption text-muted transition-colors hover:text-foreground`,"aria-expanded":j,"aria-label":t(`statsCoolingChip`,{count:ne.length}),onClick:()=>M(e=>!e),children:[(0,G.jsx)(`span`,{className:`status-dot shrink-0`,"data-state":`warn`}),(0,G.jsx)(`span`,{className:`mono tabular`,children:t(`statsCoolingChip`,{count:ne.length})}),(0,G.jsx)(gi,{size:10,className:`transition-transform duration-200 ${j?`rotate-90`:``}`,"aria-hidden":!0})]}):null,(0,G.jsxs)(Sn,{to:`/accounts`,className:`inline-flex items-center gap-1 text-caption font-medium text-muted hover:text-foreground`,children:[t(`navAccounts`),(0,G.jsx)(ii,{size:12})]})]})]}),(0,G.jsx)(`div`,{className:`grid grid-cols-2 gap-y-1 border-b border-separator sm:grid-cols-4 sm:gap-y-0`,children:[[t(`ready`),R,`ok`],[t(`hot`),z,z?`ok`:``],[t(`inFlight`),B,B?`ok`:``],[t(`statsAffinityHit`),te==null?`—`:pV(te),``,H?t(`statsAffinityHint`,{hits:H.hits??0,misses:H.misses??0,bindings:H.bindings??0}):``]].map(([e,t,n,r])=>(0,G.jsxs)(`div`,{className:`px-4 py-3 sm:py-2.5`,title:r?String(r):void 0,children:[(0,G.jsx)(`div`,{className:`text-caption text-muted`,children:e}),(0,G.jsxs)(`div`,{className:`mt-1.5 flex items-center gap-2 sm:mt-1`,children:[(0,G.jsx)(`span`,{className:`mono text-section font-semibold`,children:t}),n?(0,G.jsx)(`span`,{className:`status-dot`,"data-state":n}):null]})]},String(e)))}),j&&ne.length?(0,G.jsxs)(`div`,{className:`border-b border-separator bg-surface-secondary/50 px-4 py-2`,children:[(0,G.jsx)(`div`,{className:`text-caption text-muted`,children:t(`statsCoolingDetails`)}),(0,G.jsx)(`div`,{className:`mt-1.5 space-y-1`,children:ne.map(({account:e,until:n})=>(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 text-caption`,children:[(0,G.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-foreground/80`,children:e.name||e.id}),(0,G.jsx)(`span`,{className:`mono shrink-0 text-muted`,children:e.last_error_kind?x7(e.last_error_kind,t):t(`statsUnknown`)}),(0,G.jsx)(`span`,{className:`mono shrink-0 tabular text-muted sm:w-16 sm:text-right`,children:cwe(n,D)??`—`}),(0,G.jsx)(`span`,{className:`mono hidden shrink-0 text-muted sm:inline sm:w-10 sm:text-right`,title:t(`statsBackoffLevel`),children:e.restart_backoff_level?`L${e.restart_backoff_level}`:`—`})]},e.id))})]}):null,(0,G.jsx)(`div`,{className:`divide-y divide-separator`,children:x?(0,G.jsx)(qB,{}):y.length===0?(0,G.jsx)(`div`,{className:`px-4 py-6 text-body text-muted`,children:t(`noAccounts`)}):ae.length===0?(0,G.jsx)(`div`,{className:`px-4 py-6 text-body text-muted`,children:t(`statsPoolReadyEmpty`)}):ae.map(e=>{let n=e.quota,r=uwe(n?.percentage,n?.exceeded),i=F.get(e.id),a=i?.in_flight??e.in_flight??e.inFlight??0,o=i?.max_inflight||e.max_inflight||4,s=a>=o;return(0,G.jsxs)(`div`,{className:`flex flex-col gap-2.5 px-4 py-3 sm:flex-row sm:items-center sm:gap-3 sm:py-2.5`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-start gap-3 sm:items-center`,children:[(0,G.jsx)(`span`,{className:`status-dot mt-1.5 shrink-0 sm:mt-0`,"data-state":e.ready?`ok`:`danger`}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,G.jsx)(WV,{provider:e.provider,size:14}),(0,G.jsx)(`div`,{className:`truncate text-body font-medium`,children:e.name||e.id})]}),(0,G.jsxs)(`div`,{className:`mono mt-0.5 text-caption text-muted`,children:[UV(e.provider,e.region,t),` · `,e.hot?t(`hot`):e.ready?t(`ready`):t(`degraded`)]})]})]}),(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-4 gap-y-2 pl-6 sm:shrink-0 sm:pl-0`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-1.5`,title:t(s?`liveSaturated`:`inFlight`),"data-testid":`account-inflight`,children:[(0,G.jsx)(`span`,{className:`text-caption text-muted sm:hidden`,children:t(`inFlight`)}),(0,G.jsxs)(`span`,{className:`mono text-caption tabular ${s?`text-warning`:`text-muted`}`,children:[a,`/`,o]}),(0,G.jsx)(`span`,{className:`inline-block h-[2px] w-10 overflow-hidden rounded-[1px] bg-separator`,children:(0,G.jsx)(`span`,{className:`block h-full ${s?`bg-warning`:`bg-foreground/50`}`,style:{width:`${Math.min(100,a/o*100)}%`}})})]}),n?(0,G.jsxs)(`div`,{className:`flex items-center gap-1.5`,title:t(`quota`),children:[(0,G.jsx)(`span`,{className:`text-caption text-muted sm:hidden`,children:t(`quota`)}),(0,G.jsxs)(`span`,{className:`mono text-caption tabular text-muted`,children:[Math.round(n.percentage??0),`%`]}),(0,G.jsx)(`span`,{className:`inline-block h-[2px] w-10 overflow-hidden rounded-[1px] bg-separator`,children:(0,G.jsx)(`span`,{className:`block h-full ${r===`danger`?`bg-danger`:r===`warning`?`bg-warning`:`bg-success`}`,style:{width:`${Math.min(100,Math.max(0,n.percentage??0))}%`}})})]}):null]})]},e.id)})}),(0,G.jsxs)(`div`,{className:`flex items-center justify-between border-t border-separator px-4 py-2.5 text-caption text-muted`,children:[(0,G.jsxs)(`span`,{children:[t(`metricModels`),` `,C]}),(0,G.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center justify-end gap-x-2 gap-y-1`,children:[[`qoder`,`workbuddy`,`trae`].map(e=>{let t=y.filter(t=>String(t.provider||`qoder`).toLowerCase()===e).length;return t?(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,G.jsx)(WV,{provider:e,size:11}),t]},e):null}),(0,G.jsxs)(`span`,{children:[y.length,` `,t(`accountCount`)]})]})]})]}),(0,G.jsx)(fwe,{resources:T,t})]}),(0,G.jsxs)(`section`,{className:`grid gap-3 xl:grid-cols-2 2xl:grid-cols-3`,children:[(0,G.jsxs)(xS,{"data-gsap-reveal":!0,className:`overflow-hidden p-0`,children:[(0,G.jsx)(`div`,{className:`flex items-center justify-between gap-3 border-b border-separator px-4 py-3`,children:(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:t(`statsTopProviders`)}),(0,G.jsx)(`p`,{className:`mt-0.5 text-caption text-muted`,children:t(`statsTopProvidersHint`)})]})}),g?(0,G.jsx)(qB,{}):(0,G.jsx)(E7,{empty:t(`statsNoProviders`),items:(V.providers||[]).map(e=>({key:e.key,label:iwe(e.key,t),count:e.count,meta:`${e.ok}/${e.count}`,mark:e.key===`(unknown)`?void 0:e.key,href:e.key===`(unknown)`?void 0:Ce({provider:e.key})}))})]}),(0,G.jsxs)(xS,{"data-gsap-reveal":!0,className:`overflow-hidden p-0`,children:[(0,G.jsx)(`div`,{className:`flex items-center justify-between gap-3 border-b border-separator px-4 py-3`,children:(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:t(`statsTopModels`)}),(0,G.jsx)(`p`,{className:`mt-0.5 text-caption text-muted`,children:t(`providerCatalog`)})]})}),g?(0,G.jsx)(qB,{rows:4}):(0,G.jsx)(E7,{empty:t(`statsNoModels`),items:V.models.map(e=>({key:e.key,label:e.key===`(unknown)`?t(`statsUnknown`):e.key,count:e.count,href:e.key===`(unknown)`?void 0:Ce({model:e.key}),meta:e.latency_avg_ms==null?`${e.ok}/${e.count}`:dV(e.latency_avg_ms)}))})]}),(0,G.jsxs)(xS,{"data-gsap-reveal":!0,className:`overflow-hidden p-0`,children:[(0,G.jsx)(`div`,{className:`flex items-center justify-between gap-3 border-b border-separator px-4 py-3`,children:(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:t(`statsStatusMix`)}),(0,G.jsx)(`p`,{className:`mt-0.5 text-caption text-muted`,children:t(`statsStatusMixHint`)})]})}),g?(0,G.jsx)(qB,{rows:4}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(mwe,{items:Se,t}),(0,G.jsx)(`div`,{className:`border-t border-separator px-4 pt-2.5 text-caption font-medium text-muted`,children:t(`statsErrorMix`)}),(0,G.jsx)(E7,{empty:t(`statsNoErrors`),danger:!0,items:V.errors.map(e=>({key:e.key,label:x7(e.key,t),count:e.count,href:owe.has(e.key)?Ce({error_kind:e.key}):void 0}))}),(0,G.jsx)(`div`,{className:`border-t border-separator px-4 pt-2.5 text-caption font-medium text-muted`,children:t(`statsTopAccounts`)}),(0,G.jsx)(E7,{empty:t(`statsNoAccounts`),items:V.accounts.slice(0,5).map(e=>({key:e.key,label:awe(y,e.key,t(`statsUnassigned`)),count:e.count,href:!e.key||e.key===`(unassigned)`?void 0:Ce({account:e.key}),meta:`${e.ok}/${e.count}`}))})]})]})]})]})}function T7(e,t){return e>=2147483648||t>=200?`danger`:e>=1073741824||t>=100?`warning`:`ok`}function fwe({resources:e,t}){let n=[...e?.workers??[]].sort((e,t)=>t.rss_bytes-e.rss_bytes),r=e?.server;return(0,G.jsxs)(xS,{"data-gsap-reveal":!0,className:`overflow-hidden p-0`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-separator px-4 py-3`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:t(`resTitle`)}),(0,G.jsx)(`p`,{className:`mt-0.5 text-caption text-muted`,children:t(`resHint`)})]}),(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:e?`success`:`default`,children:e?fV(e.total_rss_bytes):`—`})]}),(0,G.jsx)(`div`,{className:`divide-y divide-separator`,children:e?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`px-4 py-2.5`,children:(0,G.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`status-dot shrink-0`,"data-state":T7(r?.rss_bytes??0,r?.cpu_percent??0)}),(0,G.jsx)(`div`,{className:`truncate text-body font-medium`,children:t(`resServer`)}),(0,G.jsxs)(`span`,{className:`mono text-caption text-muted`,children:[`pid `,r?.pid]})]}),(0,G.jsxs)(`div`,{className:`mono shrink-0 text-caption text-muted`,children:[fV(r?.rss_bytes),` · `,(r?.cpu_percent??0).toFixed(1),`%`]})]})}),n.length===0?(0,G.jsx)(`div`,{className:`px-4 py-3 text-body text-muted`,children:t(`resEmpty`)}):n.map(e=>(0,G.jsx)(`div`,{className:`px-4 py-2.5`,children:(0,G.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`status-dot shrink-0`,"data-state":T7(e.rss_bytes,e.cpu_percent)}),(0,G.jsx)(`div`,{className:`truncate text-body font-medium`,children:e.label||e.account_id}),(0,G.jsxs)(`span`,{className:`mono text-caption text-muted`,children:[`pid `,e.pid]})]}),(0,G.jsxs)(`div`,{className:`mono shrink-0 text-caption text-muted`,children:[fV(e.rss_bytes),` · `,e.cpu_percent.toFixed(1),`%`]})]})},e.pid))]}):(0,G.jsx)(qB,{rows:3})}),(0,G.jsxs)(`div`,{className:`flex items-center justify-between border-t border-separator px-4 py-2.5 text-caption text-muted`,children:[(0,G.jsxs)(`span`,{className:`mono`,children:[r?.goroutines??0,` `,t(`resGoroutines`)]}),(0,G.jsx)(`span`,{className:`mono`,children:e?.sampled_at?new Date(e.sampled_at).toLocaleTimeString():`—`})]})]})}function E7({items:e,empty:t,danger:n}){let r=(0,v.useRef)(null),i=Math.max(1,...e.map(e=>e.count)),a=e.map(e=>`${e.key}:${e.count}`).join(`|`);return(0,v.useLayoutEffect)(()=>{let e=r.current;if(!e)return;let t=Z.context(()=>{let e=Z.matchMedia();e.add(`(prefers-reduced-motion: reduce)`,()=>{Z.set(`[data-rank-fill]`,{clearProps:`transform`})}),e.add(`(prefers-reduced-motion: no-preference)`,()=>{let e=Z.utils.toArray(`[data-rank-fill]`);e.length&&Z.fromTo(e,{scaleX:0},{scaleX:1,duration:.38,ease:`power2.out`,stagger:.05,transformOrigin:`0% 50%`})})},e);return()=>t.revert()},[a]),e.length?(0,G.jsx)(`div`,{ref:r,className:`divide-y divide-separator`,children:e.map(e=>{let t=(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[e.mark?(0,G.jsx)(WV,{provider:e.mark,size:14}):null,(0,G.jsx)(`div`,{className:`truncate text-body font-medium`,children:e.label})]}),(0,G.jsx)(`div`,{className:`mono shrink-0 text-caption text-muted`,children:e.meta?`${e.count} · ${e.meta}`:e.count})]}),(0,G.jsx)(`div`,{className:`mt-2 h-1 overflow-hidden rounded-[2px] bg-separator`,children:(0,G.jsx)(`div`,{"data-rank-fill":!0,className:`h-full origin-left rounded-[2px] ${n?`bg-danger`:`bg-success`}`,style:{width:`${Math.max(6,e.count/i*100)}%`}})})]});return e.href?(0,G.jsx)(Sn,{to:e.href,className:`rank-row block px-4 py-2.5`,title:e.label,children:t},e.key):(0,G.jsx)(`div`,{className:`px-4 py-2.5`,children:t},e.key)})}):(0,G.jsx)(`div`,{className:`px-4 py-6 text-body text-muted`,children:t})}function pwe({value:e,hint:t}){let n=Math.abs(e)<.005?`flat`:e>0?`up`:`down`;return(0,G.jsxs)(`span`,{className:`trend-chip`,"data-tone":n,title:t,children:[(0,G.jsx)(n===`down`?oo:n===`up`?co:bi,{size:12,weight:`bold`}),e>0?`+`:``,(e*100).toFixed(1),`%`]})}function mwe({items:e,t}){let n=e.reduce((e,t)=>e+t.count,0);return n?(0,G.jsxs)(`div`,{className:`px-4 py-3`,children:[(0,G.jsx)(`div`,{className:`flex h-2 gap-px overflow-hidden rounded-[3px] bg-separator`,role:`img`,"aria-label":e.map(e=>`${t(C7[e.key])} ${e.count}`).join(`, `),children:e.filter(e=>e.count>0).map(e=>(0,G.jsx)(`div`,{className:S7[e.key],style:{width:`${e.count/n*100}%`,minWidth:2}},e.key))}),(0,G.jsx)(`div`,{className:`mt-3 grid grid-cols-2 gap-x-4 gap-y-1.5`,children:e.map(e=>(0,G.jsxs)(`div`,{className:`flex items-center gap-2 text-caption`,children:[(0,G.jsx)(`span`,{className:`inline-block size-2 shrink-0 rounded-[2px] ${S7[e.key]}`}),(0,G.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-muted`,children:t(C7[e.key])}),(0,G.jsx)(`span`,{className:`mono tabular`,children:e.count}),(0,G.jsx)(`span`,{className:`mono w-10 text-right tabular text-muted`,children:pV(e.count/n)})]},e.key))})]}):(0,G.jsx)(`div`,{className:`px-4 py-3 text-body text-muted`,children:t(`statsEmptyTraffic`)})}function D7(e){return e?e>=1e6?`${(e/1e6).toString().replace(/\.0$/,``)}M`:e>=1e3?`${Math.round(e/1e3)}k`:String(e):`—`}function hwe({model:e,t,onClose:n}){if(!e)return null;let r=e.reasoning_options||[],i=e.catalog_context_length||e.default_context_length||e.context_length,a=e.catalog_context_length_max,o=mV(e),s=hV(e),c=String(e.provider||e.owned_by||`qoder`).trim().toLowerCase(),l=UV(c,String(e.region||e.regions?.[0]||``).trim().toLowerCase()||void 0,t),u=c===`trae`?vle(e):void 0;return(0,G.jsx)(Y.Root,{isOpen:!0,onOpenChange:e=>{e||n()},children:(0,G.jsx)(Y.Backdrop,{variant:`blur`,children:(0,G.jsx)(Y.Container,{size:`md`,scroll:`inside`,children:(0,G.jsxs)(Y.Dialog,{children:[(0,G.jsxs)(Y.Header,{className:`items-start justify-between gap-4 px-5 pt-5`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(`div`,{className:`text-section`,children:e.display_name||e.id}),s?(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:`success`,children:t(`modelFree`)}):null]}),(0,G.jsx)(`div`,{className:`mono mt-1 text-caption text-muted`,children:e.id}),(0,G.jsxs)(`div`,{className:`mt-1 text-caption text-muted`,children:[l,o?` · ${o}`:``]})]}),(0,G.jsx)(Y.CloseTrigger,{"aria-label":t(`close`),className:`grid size-8 place-items-center rounded-lg text-muted hover:bg-surface-secondary`,children:(0,G.jsx)(yo,{size:16})})]}),(0,G.jsxs)(Y.Body,{className:`space-y-4 px-5 pb-5`,children:[(0,G.jsxs)(`section`,{children:[(0,G.jsx)(`div`,{className:`text-caption font-medium text-muted`,children:t(`contextWindowCol`)}),(0,G.jsxs)(`div`,{className:`mt-1 text-body`,children:[D7(i),a&&a!==i?` → ${D7(a)}`:``]}),e.supports_max_mode?(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:t(c===`qoder`?`qoderMaxModeHint`:`maxModeHint`)}):null,!e.supports_max_mode&&a&&a!==i?(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:t(`workbuddyContextHint`)}):null,u?u.prompt_max_tokens?(0,G.jsxs)(`div`,{className:`mt-1 text-caption text-muted`,children:[t(`promptMaxTokens`),`: `,D7(u.prompt_max_tokens)]}):null:e.prompt_max_tokens?(0,G.jsxs)(`div`,{className:`mt-1 text-caption text-muted`,children:[t(`promptMaxTokens`),`: `,D7(e.prompt_max_tokens)]}):null,u?u.max_output_tokens?(0,G.jsxs)(`div`,{className:`text-caption text-muted`,children:[t(`maxOutputTokens`),`: `,D7(u.max_output_tokens)]}):null:e.max_output_tokens?(0,G.jsxs)(`div`,{className:`text-caption text-muted`,children:[t(`maxOutputTokens`),`: `,D7(e.max_output_tokens)]}):null]}),(0,G.jsxs)(`section`,{children:[(0,G.jsx)(`div`,{className:`text-caption font-medium text-muted`,children:t(`reasoningLevels`)}),r.length?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:t(`reasoningHint`)}),(0,G.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:r.map(n=>{let r=`reasoningLevel_${n}`,i=t(r);return(0,G.jsxs)(RS,{size:`sm`,variant:`soft`,color:n===(e.reasoning_effort||e.reasoning_default)?`success`:`default`,children:[i===r?n:i,n===e.reasoning_default?` · ${t(`defaultValue`)}`:``,n===e.reasoning_effort&&n!==e.reasoning_default?` · ${t(`custom`)}`:``]},n)})})]}):(0,G.jsx)(`div`,{className:`mt-1 text-body text-muted`,children:e.reasoning_type?t(`reasoningFixed`,{type:e.reasoning_type}):t(`noReasoningLevels`)})]})]})]})})})})}function O7({title:e,hint:t,action:n,icon:r,className:i}){return(0,G.jsx)(`div`,{className:`grid min-h-56 place-items-center px-6 py-12 text-center ${i||``}`,children:(0,G.jsxs)(`div`,{className:`max-w-sm`,children:[r?(0,G.jsx)(`div`,{className:`mb-3 flex justify-center text-muted`,children:r}):null,(0,G.jsx)(NM,{className:`p-0 text-body font-medium text-foreground`,children:e}),t?(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:t}):null,n?(0,G.jsx)(`div`,{className:`mt-5 flex justify-center`,children:n}):null]})})}var k7=`__all__`;function A7({value:e,onChange:t,ariaLabel:n,options:r,className:i}){let a=r.map(e=>({id:e.id||k7,label:e.label})),o=e||k7,s=a.find(e=>e.id===o);return(0,G.jsxs)(UP,{className:i??`w-fit min-w-36`,"aria-label":n,value:o,onChange:e=>{typeof e==`string`&&t(e===k7?``:e)},children:[(0,G.jsxs)(UP.Trigger,{className:`min-w-0 w-full items-center`,children:[(0,G.jsx)(UP.Value,{className:`min-w-0 truncate`,children:({defaultChildren:e,isPlaceholder:t})=>t||!s?e:(0,G.jsx)(`span`,{className:`truncate`,children:s.label})}),(0,G.jsx)(UP.Indicator,{})]}),(0,G.jsx)(UP.Popover,{className:`max-h-72 min-w-36`,children:(0,G.jsx)(yP,{children:a.map(e=>(0,G.jsxs)(yP.Item,{id:e.id,textValue:e.label,children:[(0,G.jsx)(kM,{className:`block truncate`,children:e.label}),(0,G.jsx)(yP.ItemIndicator,{})]},e.id))})})]})}var gwe=[20,50,100],_we=[20,50,100];function vwe(e,t){if(t<=7)return Array.from({length:t},(e,t)=>t+1);let n=[1];e>3&&n.push(`gap`);let r=Math.max(2,e-1),i=Math.min(t-1,e+1);for(let e=r;e<=i;e++)n.push(e);return e{let t=Number([...e][0]);d.includes(t)&&u(t)},"aria-label":a,children:d.map(e=>(0,G.jsx)(aA,{id:String(e),children:e},e))})]}),(0,G.jsxs)(BP,{size:`sm`,className:`w-fit`,children:[(0,G.jsx)(BP.Summary,{className:`mono text-caption`,children:o}),(0,G.jsxs)(BP.Content,{children:[(0,G.jsx)(BP.Item,{children:(0,G.jsx)(BP.Previous,{isDisabled:i||t<=1,onPress:()=>l(Math.max(1,t-1)),"aria-label":s,children:(0,G.jsx)(BP.PreviousIcon,{})})}),f.map((e,n)=>e===`gap`?(0,G.jsx)(BP.Item,{children:(0,G.jsx)(BP.Ellipsis,{})},`gap-${n}`):(0,G.jsx)(BP.Item,{children:(0,G.jsx)(BP.Link,{isActive:e===t,isDisabled:i,onPress:()=>l(e),children:e})},e)),(0,G.jsx)(BP.Item,{children:(0,G.jsx)(BP.Next,{isDisabled:i||t>=n,onPress:()=>l(Math.min(n,t+1)),"aria-label":c,children:(0,G.jsx)(BP.NextIcon,{})})})]})]})]})}function M7({value:e,onChange:t,placeholder:n,ariaLabel:r,className:i}){return(0,G.jsx)(DM,{"aria-label":r,value:e,onChange:t,className:i,children:(0,G.jsxs)(DM.Group,{children:[(0,G.jsx)(DM.SearchIcon,{}),(0,G.jsx)(DM.Input,{placeholder:n}),(0,G.jsx)(DM.ClearButton,{})]})})}function ywe(e){let t=[];for(let n of e)for(let e of n.regions||[])e?.id&&t.push({value:`${n.id}:${e.id}`,provider:n.id,region:e.id});return t}function N7(e){return e.settings_key||e.id}function P7(e){return String(e.provider||e.owned_by||`qoder`).trim().toLowerCase()}function F7(e){let t=String(e.region||``).trim().toLowerCase();if(t)return t;let n=e.regions||[];return String(n[0]||``).trim().toLowerCase()}function I7(e){return`${P7(e)}:${F7(e)||`any`}:${e.settings_key||e.id}:${e.native_model||e.mapped_key||``}`}function L7(e){let t=e.route_display_name||``;return t&&t!==(e.display_name||e.id)?t:``}function R7(e,t){let n=`reasoningLevel_${t}`,r=e(n);return r===n?t:r}function z7({label:e,hint:t}){return(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(`span`,{className:`cursor-help text-caption text-muted`,children:e})}),(0,G.jsx)(Aj.Content,{children:(0,G.jsx)(`p`,{className:`max-w-xs text-caption leading-5`,children:t})})]})}function B7({model:e,saving:t,t:n,variant:r=`table`,onToggleTraeMax:i,onReasoningChange:a}){let o=P7(e),s=r===`card`,c=s?`w-full min-w-0`:`w-full max-w-[7.5rem] min-w-0`;return(0,G.jsxs)(`div`,{className:s?`flex min-w-0 flex-col gap-3`:`flex min-w-0 flex-col gap-1.5`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,G.jsxs)(`span`,{className:`mono text-caption text-muted`,children:[D7(e.catalog_context_length||e.context_length),e.catalog_context_length_max&&e.catalog_context_length_max!==(e.catalog_context_length||e.context_length)?` → ${D7(e.catalog_context_length_max)}`:``]}),o===`workbuddy`&&e.catalog_context_length_max&&e.catalog_context_length_max!==(e.catalog_context_length||e.context_length)?(0,G.jsx)(z7,{label:n(`catalogWindow`),hint:n(`workbuddyContextHint`)}):null]}),(o===`trae`||o===`qoder`)&&e.supports_max_mode?(0,G.jsxs)(`div`,{className:s?`flex flex-col gap-1.5`:`flex items-center gap-2`,children:[s?(0,G.jsx)(z7,{label:`${n(`maxMode`)}${e.catalog_context_length_max?` ${D7(e.catalog_context_length_max)}`:``}`,hint:n(o===`qoder`?`qoderMaxModeHint`:`maxModeHint`)}):null,(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(s7,{isSelected:!!e.max_mode,isDisabled:t,ariaLabel:`${e.id} ${n(`maxMode`)}`,onChange:t=>i(e,t)}),s?null:(0,G.jsx)(z7,{label:`${n(`maxMode`)}${e.catalog_context_length_max?` ${D7(e.catalog_context_length_max)}`:``}`,hint:n(o===`qoder`?`qoderMaxModeHint`:`maxModeHint`)})]})]}):null,(e.reasoning_options||[]).length>1?(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,G.jsx)(z7,{label:n(`reasoningLevels`),hint:n(`reasoningHint`)}),(0,G.jsx)(A7,{className:c,ariaLabel:`${e.id} ${n(`reasoningLevels`)}`,value:e.reasoning_effort||e.reasoning_default||e.reasoning_options?.[0]||``,onChange:t=>{t&&a(e,t)},options:(e.reasoning_options||[]).map(e=>({id:e,label:R7(n,e)}))})]}):(e.reasoning_options||[]).length===1?(0,G.jsx)(z7,{label:`${n(`reasoningLevels`)} ${R7(n,e.reasoning_options[0])}`,hint:n(`reasoningHint`)}):e.reasoning_type?(0,G.jsx)(`span`,{className:`text-caption text-muted`,children:n(`reasoningFixed`,{type:e.reasoning_type})}):o===`trae`&&!e.supports_max_mode?(0,G.jsx)(z7,{label:n(`catalogWindow`),hint:n(`catalogWindowHint`)}):null]})}function V7({model:e,t,onDetails:n}){return(0,G.jsxs)(J,{size:`sm`,variant:`ghost`,onPress:()=>n(e),children:[(0,G.jsx)(ca,{size:14}),t(`modelDetails`)]})}function bwe(){let{t:e}=GF(),{overview:t,loading:n}=pI(),[r,i]=(0,v.useState)(``),[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)([]),[l,u]=(0,v.useState)(1),[d,f]=(0,v.useState)(50),[p,m]=(0,v.useState)(!1),[h,g]=(0,v.useState)(``),[_,y]=(0,v.useState)(``),[b,x]=(0,v.useState)(!1),[S,C]=(0,v.useState)(null),[w,T]=(0,v.useState)([]),[E,D]=(0,v.useState)(!0);(0,v.useEffect)(()=>{let e=!1;return nse(void 0,`regional`).then(t=>{e||T(t.data||[])}).catch(()=>void 0).finally(()=>{e||D(!1)}),cI().then(t=>{e||c(ywe(t.data||[]))}).catch(()=>void 0),()=>{e=!0}},[]);let O=(0,v.useMemo)(()=>{let t=r.trim().toLowerCase(),[n,i]=a.includes(`:`)?a.split(`:`,2):[a,``];return w.filter(r=>{let a=P7(r),o=F7(r);if(n&&a!==n||i&&o!==i)return!1;if(!t)return!0;let s=UV(a,o||void 0,e);return`${r.display_name||``} ${r.id} ${r.mapped_key||``} ${a} ${s} ${r.owned_by||``} ${o} ${r.credits||``} ${r.free?`free`:``}`.toLowerCase().includes(t)})},[r,w,a,e]),k=[r,a,d].join(`\0`),[A,j]=(0,v.useState)(k);A!==k&&(j(k),u(1));let M=Math.max(1,Math.ceil(O.length/d)),N=Math.min(A===k?Math.max(1,l):1,M);l!==N&&u(N);let P=(0,v.useMemo)(()=>{let e=(N-1)*d;return O.slice(e,e+d)},[N,O,d]),F=O.length===0?0:(N-1)*d+1,I=Math.min(O.length,N*d),L=O.length?e(`logsShownTotal`,{shown:`${F}–${I}`,total:O.length}):e(`shownTotal`,{shown:0,total:w.length});if(n&&!t||E)return(0,G.jsx)(zce,{});function R(e,t){let n=N7(e),r=P7(e),i=w.map(e=>{if(N7(e)!==n||P7(e)!==r)return e;let i=e.reasoning_effort||e.reasoning_default||``,a=e.catalog_context_length||e.default_context_length||e.context_length||0,o=e.catalog_context_length_max||0;return{...e,max_mode:t,context_length:t&&o?o:a,default_context_length:a,context_custom:r===`qoder`?t:t||!!(i&&i!==e.reasoning_default)}});T(i)}function z(e,t){let n=N7(e),r=P7(e),i=w.map(e=>N7(e)!==n||P7(e)!==r?e:{...e,reasoning_effort:t,context_custom:!!e.max_mode||!!(t&&t!==e.reasoning_default)});T(i)}async function B(){m(!0),y(``),x(!1);try{let e=await sI(void 0,`regional`);T(e.data||[])}catch(e){x(!0),y(e instanceof Error?e.message:String(e))}finally{m(!1)}}async function V(t,n){let r=P7(t);if(r!==`trae`&&r!==`workbuddy`&&r!==`kimi`&&r!==`codearts`)return;let i=N7(t);g(i),y(``),x(!1);try{await ise(r,i,n),z(t,n),y(e(`reasoningSaved`,{model:t.id,level:R7(e,n)}))}catch(e){x(!0),y(e instanceof Error?e.message:String(e))}finally{g(``)}}async function H(t,n){if(!t.supports_max_mode){x(!0),y(e(`contextMaxUnavailable`));return}let r=N7(t),i=P7(t);g(r),y(``),x(!1);try{await rse(i,r,n,t.catalog_context_length_max),R(t,n),y(e(n?`contextMaxOn`:`contextMaxOff`,{model:t.id}))}catch(e){x(!0),y(e instanceof Error?e.message:String(e))}finally{g(``)}}return(0,G.jsxs)(`div`,{className:`space-y-6`,children:[(0,G.jsxs)(`section`,{className:`grid gap-5 pb-6 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-end`,children:[(0,G.jsxs)(`div`,{"data-gsap-reveal":!0,children:[(0,G.jsx)(`h2`,{className:`text-title font-semibold`,children:e(`availableModels`)}),(0,G.jsx)(`p`,{className:`mt-1 text-body text-muted`,children:w.length?L:e(`noModelsYet`)})]}),(0,G.jsxs)(`div`,{"data-gsap-reveal":!0,className:`flex min-w-0 flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center`,children:[(0,G.jsx)(M7,{className:`w-full min-w-0 sm:w-72`,value:r,onChange:i,placeholder:e(`filterPh`),ariaLabel:e(`filter`)}),(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,G.jsx)(A7,{ariaLabel:e(`providerCol`),value:a,onChange:o,options:[{id:``,label:e(`providerFilterAll`)},...s.map(t=>({id:t.value,label:UV(t.provider,t.region,e)}))]}),(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,isPending:p,onPress:()=>void B(),children:[(0,G.jsx)(Qr,{size:14}),e(p?`refreshing`:`refresh`)]})]})]})]}),_?(0,G.jsx)(vI,{status:b?`danger`:`success`,title:_}):null,(0,G.jsxs)(xS,{"data-gsap-reveal":!0,className:`overflow-hidden p-0`,children:[(0,G.jsxs)(`div`,{className:`flex items-start justify-between gap-4 border-b border-separator px-4 py-4 sm:items-center sm:px-5`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,G.jsx)(`div`,{className:`grid size-9 shrink-0 place-items-center rounded-lg bg-surface-secondary text-muted`,children:(0,G.jsx)(Bi,{size:16})}),(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(`div`,{className:`text-body font-semibold`,children:e(`providerCatalog`)}),(0,G.jsx)(`div`,{className:`mt-0.5 text-caption leading-5 text-muted`,children:e(`contextConfigHint`)})]})]}),(0,G.jsx)(RS,{size:`sm`,variant:`soft`,className:`shrink-0`,children:O.length})]}),p||n?(0,G.jsx)(YB,{}):O.length===0?(0,G.jsx)(O7,{icon:(0,G.jsx)(va,{size:22}),title:w.length?e(`noModelsMatch`):e(`noProviders`),hint:w.length?r||a||e(`noModelsMatch`):e(`noModelsYet`)}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`divide-y divide-separator lg:hidden`,children:P.map(t=>{let n=N7(t),r=h===n,i=P7(t),a=UV(i,F7(t)||void 0,e),o=mV(t),s=hV(t);return(0,G.jsxs)(`article`,{className:`space-y-3 px-4 py-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[(0,G.jsx)(`span`,{className:`status-dot mt-1.5`,"data-state":t.stale?void 0:`ok`}),(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(`div`,{className:`truncate font-medium`,children:t.display_name||t.id}),s?(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:`success`,children:e(`modelFree`)}):null,o?(0,G.jsx)(`span`,{className:`mono text-caption text-muted`,children:o}):null]}),(0,G.jsx)(`div`,{className:`mono mt-0.5 truncate text-caption text-muted`,children:t.id}),L7(t)?(0,G.jsx)(`div`,{className:`mt-0.5 text-caption text-muted`,children:e(`routedTo`,{model:L7(t)})}):null]})]}),(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:t.context_custom||t.stale?`warning`:`success`,children:t.context_custom?e(`custom`):e(`defaultValue`)})]}),(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1 text-caption`,children:[(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,G.jsx)(WV,{provider:i,size:14}),(0,G.jsx)(`span`,{className:`font-medium`,children:a})]}),(0,G.jsx)(`span`,{className:`mono break-all text-muted`,children:t.mapped_key||t.native_model||t.id})]}),(0,G.jsx)(B7,{model:t,saving:r,t:e,variant:`card`,onToggleTraeMax:(e,t)=>void H(e,t),onReasoningChange:(e,t)=>void V(e,t)}),(0,G.jsx)(V7,{model:t,t:e,onDetails:C})]},I7(t))})}),(0,G.jsx)(X,{className:`hidden min-w-0 lg:block`,children:(0,G.jsx)(X.ScrollContainer,{className:`min-w-0 overflow-x-auto`,children:(0,G.jsxs)(X.Content,{"aria-label":e(`availableModels`),className:`min-w-[68rem]`,children:[(0,G.jsxs)(X.Header,{children:[(0,G.jsx)(X.Column,{isRowHeader:!0,children:e(`modelCol`)}),(0,G.jsx)(X.Column,{children:e(`requestIdCol`)}),(0,G.jsx)(X.Column,{children:e(`providerCol`)}),(0,G.jsx)(X.Column,{children:e(`qoderKeyCol`)}),(0,G.jsx)(X.Column,{children:e(`modelDefaultsCol`)}),(0,G.jsx)(X.Column,{children:e(`stateCol`)}),(0,G.jsx)(X.Column,{children:e(`actions`)})]}),(0,G.jsx)(X.Body,{children:P.map(t=>{let n=N7(t),r=h===n,i=P7(t),a=UV(i,F7(t)||void 0,e),o=mV(t),s=hV(t);return(0,G.jsxs)(X.Row,{children:[(0,G.jsx)(X.Cell,{children:(0,G.jsxs)(`div`,{className:`flex items-center gap-3 py-1`,children:[(0,G.jsx)(`span`,{className:`status-dot`,"data-state":t.stale?void 0:`ok`}),(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(`div`,{className:`font-medium`,children:t.display_name||t.id}),s?(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:`success`,children:e(`modelFree`)}):null,o?(0,G.jsx)(`span`,{className:`mono text-caption text-muted`,children:o}):null]}),L7(t)?(0,G.jsx)(`div`,{className:`mt-0.5 text-caption text-muted`,children:e(`routedTo`,{model:L7(t)})}):null]})]})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-caption font-medium`,children:t.id})}),(0,G.jsx)(X.Cell,{children:(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(WV,{provider:i,size:14}),(0,G.jsx)(`span`,{className:`text-caption font-medium`,children:a})]})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-caption text-muted`,children:t.mapped_key||t.native_model||t.id})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(B7,{model:t,saving:r,t:e,variant:`table`,onToggleTraeMax:(e,t)=>void H(e,t),onReasoningChange:(e,t)=>void V(e,t)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:t.context_custom||t.stale?`warning`:`success`,children:t.context_custom?e(`custom`):e(`defaultValue`)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(V7,{model:t,t:e,onDetails:C})})]},I7(t))})})]})})})]})]}),(0,G.jsx)(hwe,{model:S?w.find(e=>N7(e)===N7(S))||S:null,t:e,onClose:()=>C(null)}),(0,G.jsx)(j7,{total:O.length,page:N,pageCount:M,pageSize:d,loading:p,pageSizeLabel:e(`logsPageSize`),pageLabel:e(`logsPage`,{page:N,pages:M}),prevLabel:e(`logsPrevPage`),nextLabel:e(`logsNextPage`),onPage:u,onPageSize:f})]})}function H7({copied:e,size:t=14,className:n}){let r=(0,v.useRef)(null),i=(0,v.useRef)(null),a=(0,v.useRef)(!0);return(0,v.useLayoutEffect)(()=>{let t=e?i.current:r.current,n=e?r.current:i.current;if(!t||!n)return;let o={autoAlpha:1,scale:1,filter:`blur(0px)`},s={autoAlpha:0,scale:.5,filter:`blur(4px)`};if(a.current||UB()){a.current=!1,Z.set(t,o),Z.set(n,s);return}Z.to(n,{...s,duration:BB.fast,ease:VB.out,overwrite:!0}),Z.fromTo(t,s,{...o,duration:BB.base,ease:VB.soft,delay:BB.instant/2,overwrite:!0})},[e]),(0,G.jsxs)(`span`,{className:`relative inline-grid place-items-center ${n??``}`,style:{width:t,height:t},children:[(0,G.jsx)(`span`,{ref:r,className:`col-start-1 row-start-1 inline-flex`,children:(0,G.jsx)(Ii,{size:t})}),(0,G.jsx)(`span`,{ref:i,className:`col-start-1 row-start-1 inline-flex text-success`,children:(0,G.jsx)(Ei,{size:t})})]})}async function U7(e){if(!e)return!1;try{if(typeof navigator<`u`&&navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(e),!0}catch{}try{let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.style.position=`fixed`,t.style.top=`-1000px`,t.style.opacity=`0`,document.body.appendChild(t),t.focus(),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),n}catch{return!1}}function W7(){return`${location.protocol}//${location.host}`}function G7(e){return e?/^https?:\/\//i.test(e)?e:e.startsWith(`/`)?`${W7()}${e}`:`${W7()}/${e}`:W7()}function xwe({access:e}){let{t}=GF(),[n,r]=(0,v.useState)(``),i=G7(e?.openai_base_url||`/v1`),a=(0,v.useMemo)(()=>[{name:t(`endpointOpenAI`),url:i,method:`BASE`,hint:t(`endpointBaseHint`),icon:(0,G.jsx)(ui,{size:15})},{name:t(`endpointChat`),url:G7(e?.chat_completions||`${i}/chat/completions`),method:`POST`,hint:t(`endpointChatHint`),icon:(0,G.jsx)(wa,{size:15})},{name:t(`endpointMessages`),url:G7(e?.messages||`${i}/messages`),method:`POST`,hint:t(`endpointMessagesHint`),icon:(0,G.jsx)(wa,{size:15})},{name:t(`endpointResponses`),url:G7(e?.responses||`${i}/responses`),method:`POST`,hint:t(`endpointResponsesHint`),icon:(0,G.jsx)(wa,{size:15})},{name:t(`endpointModels`),url:G7(e?.models||`${i}/models`),method:`GET`,hint:t(`endpointModelsHint`),icon:(0,G.jsx)(ga,{size:15})},{name:t(`endpointHealth`),url:G7(e?.health||`/health`),method:`GET`,hint:t(`endpointHealthHint`),icon:(0,G.jsx)(oa,{size:15})}],[e,i,t]);return(0,G.jsxs)(`section`,{className:`overflow-hidden rounded-3xl bg-surface shadow-surface`,children:[(0,G.jsx)(`div`,{className:`flex items-start justify-between gap-4 px-5 py-4 sm:px-6`,children:(0,G.jsxs)(`div`,{children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:t(`endpoints`)}),(0,G.jsx)(RS,{size:`sm`,variant:`soft`,children:t(`endpointCount`,{count:a.length-1})})]}),(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:t(`routesHint`)})]})}),(0,G.jsx)(`div`,{className:`grid gap-2 px-3 pb-3 sm:grid-cols-2 sm:px-4 sm:pb-4 lg:grid-cols-3`,children:a.map(e=>(0,G.jsxs)(`div`,{className:`group min-w-0 rounded-xl bg-surface-secondary/40 p-3 transition-colors hover:bg-surface-secondary/70`,children:[(0,G.jsxs)(`div`,{className:`flex items-start justify-between gap-2.5`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,G.jsx)(`span`,{className:`grid size-7 shrink-0 place-items-center rounded-lg bg-surface text-muted`,children:e.icon}),(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(`div`,{className:`truncate text-body font-semibold`,children:e.name}),(0,G.jsx)(`code`,{className:`mono mt-0.5 block truncate text-caption text-muted`,children:e.url})]})]}),(0,G.jsx)(RS,{size:`sm`,variant:`soft`,children:e.method})]}),(0,G.jsx)(`p`,{className:`mt-2 text-caption leading-5 text-muted`,children:e.hint}),(0,G.jsxs)(`div`,{className:`mt-2 flex items-center justify-between gap-2`,children:[(0,G.jsx)(`span`,{className:`text-caption font-medium text-muted`,children:e.method===`BASE`?t(`endpointBaseLabel`):t(`endpointAuthLabel`)}),(0,G.jsxs)(`div`,{className:`flex gap-1`,children:[(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,"aria-label":t(`copy`),onPress:()=>{U7(e.url),r(e.name),window.setTimeout(()=>r(``),1100)},children:(0,G.jsx)(H7,{copied:n===e.name})}),(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,"aria-label":t(`open`),onPress:()=>window.open(e.url,`_blank`,`noopener,noreferrer`),children:(0,G.jsx)(ni,{size:14})})]})]})]},e.name))})]})}var Swe=`https://caiaiu.com`;function K7({className:e=``}){let{t}=GF();return(0,G.jsx)(`p`,{className:`text-caption leading-5 text-muted ${e}`.trim(),children:(0,G.jsx)(`a`,{href:Swe,target:`_blank`,rel:`noopener noreferrer`,className:`underline-offset-2 transition-colors hover:text-foreground hover:underline`,children:t(`caiaiSoftLink`)})})}var Cwe=new Set(`txt.md.markdown.json.csv.tsv.yml.yaml.toml.xml.html.htm.css.scss.js.jsx.ts.tsx.mjs.cjs.py.go.rs.java.kt.swift.c.h.cpp.hpp.sh.bash.zsh.sql.graphql.env.ini.conf.log.rst.tex`.split(`.`)),wwe=new Set([`image/png`,`image/jpeg`,`image/jpg`,`image/gif`,`image/webp`]);function Twe(e){let t=e.lastIndexOf(`.`);return t>=0?e.slice(t+1).toLowerCase():``}function Ewe(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}async function Dwe(e){let t=Twe(e.name),n=e.type||`application/octet-stream`,r=`${e.name}-${e.size}-${e.lastModified}-${Math.random().toString(36).slice(2,8)}`;if(wwe.has(n)||[`png`,`jpg`,`jpeg`,`gif`,`webp`].includes(t)){let t=await new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result||``)),r.onerror=()=>n(r.error||Error(`read failed`)),r.readAsDataURL(e)});return{id:r,name:e.name,mime:n,kind:`image`,dataUrl:t,size:e.size}}if(Cwe.has(t)||n.startsWith(`text/`)||n===`application/json`){let t=await e.text();return{id:r,name:e.name,mime:n,kind:`text`,text:t,size:e.size}}return null}function q7({ariaLabel:e,value:t,onChange:n,placeholder:r,isDisabled:i,options:a,className:o,tone:s=`default`}){let c=a.find(e=>e.id===t),l=s===`muted`?`text-muted hover:text-foreground`:`text-foreground`;return(0,G.jsxs)(UP,{className:o??`w-auto max-w-[11rem] min-w-0`,"aria-label":e,value:t||null,placeholder:r,isDisabled:i,onChange:e=>{typeof e==`string`&&e&&n(e)},children:[(0,G.jsxs)(UP.Trigger,{className:`h-8 min-h-8 gap-1 rounded-[10px] border-0 bg-transparent px-2.5 shadow-none items-center hover:bg-surface-secondary/80 data-[focus-visible=true]:bg-surface-secondary/80 ${l}`,children:[(0,G.jsx)(UP.Value,{className:`min-w-0 truncate text-caption font-medium`,children:({defaultChildren:e,isPlaceholder:t})=>t||!c?e:(0,G.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1`,children:[c.icon?(0,G.jsx)(`span`,{className:`grid size-3.5 shrink-0 place-items-center opacity-80`,children:c.icon}):null,(0,G.jsx)(`span`,{className:`truncate`,children:c.label})]})}),(0,G.jsx)(UP.Indicator,{className:`size-2.5 opacity-50`})]}),(0,G.jsx)(UP.Popover,{placement:`top end`,className:`max-h-72 min-w-48`,children:(0,G.jsx)(yP,{children:a.map(e=>(0,G.jsxs)(yP.Item,{id:e.id,textValue:e.textValue,className:`gap-2`,children:[e.icon?(0,G.jsx)(`span`,{className:`grid size-5 shrink-0 place-items-center`,children:e.icon}):null,(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsx)(kM,{className:`block truncate text-caption`,children:e.label}),e.hint?(0,G.jsx)(`span`,{className:`block truncate text-caption text-muted`,children:e.hint}):null]}),(0,G.jsx)(yP.ItemIndicator,{})]},e.id))})})]})}function Owe({value:e,onChange:t,attachments:n,onAttachmentsChange:r,disabled:i,streaming:a,canSend:o,onSend:s,onStop:c,accountValue:l,onAccountChange:u,accountOptions:d,modelValue:f,onModelChange:p,modelOptions:m,modelsLoading:h}){let{t:g}=GF(),_=(0,v.useRef)(null);async function y(e){if(!e?.length)return;let t=[],i=[];for(let n of Array.from(e))try{let e=await Dwe(n);e?t.push(e):i.push(n.name)}catch{i.push(n.name)}t.length&&r([...n,...t]),i.length&&window.alert(g(`chatAttachUnsupported`,{names:i.join(`, `)})),_.current&&(_.current.value=``)}function b(e){e.key!==`Enter`||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),!a&&o&&s())}return(0,G.jsxs)(`div`,{className:`access-composer px-3 pb-3 pt-2.5 sm:px-4 sm:pb-3.5 sm:pt-3`,children:[(0,G.jsxs)(`div`,{className:`access-composer-well overflow-hidden rounded-2xl`,children:[n.length?(0,G.jsx)(`div`,{className:`flex flex-wrap gap-2 px-3 pt-3`,children:n.map(e=>(0,G.jsxs)(`span`,{className:`inline-flex max-w-[14rem] items-center gap-2 rounded-xl bg-surface/80 px-1.5 py-1.5 text-caption text-foreground`,children:[e.kind===`image`&&e.dataUrl?(0,G.jsx)(`img`,{src:e.dataUrl,alt:``,className:`size-8 shrink-0 rounded-lg object-cover`}):(0,G.jsx)(`span`,{className:`grid size-8 shrink-0 place-items-center rounded-lg bg-surface-secondary text-muted`,children:(0,G.jsx)(Qi,{size:14})}),(0,G.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,G.jsx)(`span`,{className:`block truncate font-medium`,children:e.name}),(0,G.jsx)(`span`,{className:`mono text-muted`,children:Ewe(e.size)})]}),(0,G.jsx)(`button`,{type:`button`,className:`grid size-6 shrink-0 place-items-center rounded-md text-muted hover:bg-surface-secondary hover:text-foreground`,"aria-label":g(`chatAttachRemove`),onClick:()=>r(n.filter(t=>t.id!==e.id)),children:(0,G.jsx)(yo,{size:12})})]},e.id))}):null,(0,G.jsx)(Vj,{fullWidth:!0,rows:3,className:`min-h-20 resize-none border-0 bg-transparent px-3.5 py-3 text-body leading-[1.65] shadow-none focus-visible:ring-0`,value:e,onChange:e=>t(e.target.value),onKeyDown:b,placeholder:g(`promptPlaceholder`),"aria-label":g(`prompt`),disabled:i||a}),(0,G.jsxs)(`div`,{className:`flex items-center gap-0.5 px-2 pb-2 pt-0.5`,children:[(0,G.jsx)(`input`,{ref:_,type:`file`,className:`hidden`,multiple:!0,accept:`.txt,.md,.json,.csv,.yml,.yaml,.toml,.xml,.html,.css,.js,.jsx,.ts,.tsx,.py,.go,.rs,.sh,.sql,.png,.jpg,.jpeg,.gif,.webp,text/*,image/png,image/jpeg,image/gif,image/webp,application/json`,onChange:e=>void y(e.target.files)}),(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,className:`size-8 min-w-8 shrink-0 rounded-[10px]`,"aria-label":g(`chatAttach`),isDisabled:i||a,onPress:()=>_.current?.click(),children:(0,G.jsx)(Ma,{size:15})}),(0,G.jsx)(`div`,{className:`min-w-0 flex-1`}),(0,G.jsx)(q7,{ariaLabel:g(`account`),value:l,onChange:u,options:d,isDisabled:i||a,tone:`muted`,className:`w-auto max-w-[8.5rem] min-w-0`}),(0,G.jsx)(q7,{ariaLabel:g(`model`),value:f,onChange:p,placeholder:g(h?`requesting`:`model`),options:m,isDisabled:i||a||h||!m.length,className:`w-auto max-w-[10.5rem] min-w-0`}),(0,G.jsxs)(`div`,{className:`relative size-8 shrink-0`,children:[(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`secondary`,className:`absolute inset-0 size-8 rounded-[10px] transition-opacity duration-200 ease-[cubic-bezier(0.2,0.7,0.2,1)] ${a?`opacity-100`:`pointer-events-none opacity-0`}`,"aria-label":g(`chatTryStop`),onPress:c,children:(0,G.jsx)(Xa,{size:14,weight:`fill`})}),(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,className:`absolute inset-0 size-8 rounded-[10px] transition-opacity duration-200 ease-[cubic-bezier(0.2,0.7,0.2,1)] ${a?`pointer-events-none opacity-0`:`opacity-100`}`,"aria-label":g(`chatTrySend`),isDisabled:!o||i||a,onPress:s,children:(0,G.jsx)(wa,{size:14,weight:`fill`})})]})]})]}),(0,G.jsx)(`p`,{className:`mt-1 px-1 text-caption leading-4 text-muted/65`,children:g(`chatTryHelper`)})]})}function kwe({collapsed:e,onCollapsedChange:t,items:n,activeId:r,onSelect:i,onNew:a}){let{t:o}=GF(),s=(0,v.useRef)(null);return(0,v.useEffect)(()=>{let t=s.current;!t||UB()||e||Z.fromTo(t,{autoAlpha:0},{autoAlpha:1,duration:BB.fast,ease:`power2.out`})},[e]),e?(0,G.jsxs)(`div`,{className:`access-hist-rail flex w-9 shrink-0 flex-col items-center gap-1 border-r py-2`,children:[(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,className:`size-8 min-w-8 rounded-[10px] text-muted`,"aria-label":o(`chatHistoryExpand`),onPress:()=>t(!1),children:(0,G.jsx)(Ra,{size:15})}),(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,className:`size-8 min-w-8 rounded-[10px] text-muted`,"aria-label":o(`chatHistoryNew`),onPress:a,children:(0,G.jsx)(Ma,{size:14})})]}):(0,G.jsxs)(`aside`,{ref:s,className:`access-hist-rail flex w-[13rem] shrink-0 flex-col border-r`,"aria-label":o(`chatHistoryTitle`),children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-1 px-2 py-2`,children:[(0,G.jsx)(`div`,{className:`min-w-0 flex-1 truncate px-1.5 text-caption font-medium text-muted`,children:o(`chatHistoryTitle`)}),(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,className:`size-8 min-w-8 rounded-[10px] text-muted`,"aria-label":o(`chatHistoryCollapse`),onPress:()=>t(!0),children:(0,G.jsx)(mi,{size:14})})]}),(0,G.jsx)(`div`,{className:`px-2 pb-1.5`,children:(0,G.jsxs)(J,{size:`sm`,variant:`ghost`,className:`h-8 w-full justify-start gap-1.5 rounded-[10px] px-2.5 text-caption font-medium text-muted hover:bg-[var(--sidebar-hover)] hover:text-foreground`,onPress:a,children:[(0,G.jsx)(Ma,{size:13}),o(`chatHistoryNew`)]})}),(0,G.jsx)(`div`,{className:`min-h-0 flex-1 space-y-0.5 overflow-y-auto px-1.5 pb-2.5`,children:n.length?n.map(e=>{let t=e.id===r;return(0,G.jsx)(`button`,{type:`button`,"data-active":t?`true`:void 0,className:`access-hist-item flex h-8 w-full items-center rounded-[10px] px-2.5 text-left text-caption leading-5 ${t?`font-medium text-foreground`:`font-normal text-muted`}`,onClick:()=>i(e.id),children:(0,G.jsx)(`span`,{className:`line-clamp-1 tracking-tight`,children:e.title||o(`chatHistoryUntitled`)})},e.id)}):(0,G.jsx)(`p`,{className:`px-2.5 py-6 text-center text-caption leading-5 text-muted/70`,children:o(`chatHistoryEmpty`)})})]})}function J7({latencyMs:e,ttfbMs:t,completionTokens:n,stream:r,labels:i,className:a=``,variant:o=`block`}){let s=ple(fle({completionTokens:n,latencyMs:e,ttfbMs:t,stream:r})),c=dV(t),l=dV(e);if(o===`inline`)return(0,G.jsxs)(`div`,{className:`mono text-caption leading-4 text-muted ${a}`.trim(),children:[(0,G.jsxs)(`span`,{children:[i.ttft,` `,c]}),(0,G.jsx)(`span`,{className:`mx-1.5 text-separator`,children:`·`}),(0,G.jsxs)(`span`,{children:[i.total,` `,l]}),(0,G.jsx)(`span`,{className:`mx-1.5 text-separator`,children:`·`}),(0,G.jsx)(`span`,{children:s})]});let u=[[i.ttft,c],[i.total,l],[i.tps,s]];return(0,G.jsxs)(`div`,{className:a,children:[i.heading?(0,G.jsx)(`div`,{className:`mb-1 text-caption font-medium text-muted`,children:i.heading}):null,(0,G.jsx)(`div`,{className:`border-l border-separator pl-2 leading-4`,children:u.map(([e,t])=>(0,G.jsxs)(`div`,{className:`flex items-baseline gap-2 py-px`,children:[(0,G.jsx)(`span`,{className:`shrink-0 text-caption text-muted`,children:e}),(0,G.jsx)(`span`,{className:`mono text-xs text-foreground`,children:t})]},e))})]})}function Awe({text:e,streaming:t,defaultOpen:n}){let{t:r}=GF(),[i,a]=(0,v.useState)(!!n),[o,s]=(0,v.useState)(0),c=(0,v.useRef)(0),l=(0,v.useRef)(null),u=(0,v.useRef)(null);if((0,v.useEffect)(()=>{t?a(!1):n!=null&&a(!!n)},[t,n]),(0,v.useEffect)(()=>{if(!t)return;let e=Date.now();s(0);let n=window.setInterval(()=>{let t=Math.floor((Date.now()-e)/1e3);s(t),c.current=t},250);return()=>window.clearInterval(n)},[t]),(0,v.useEffect)(()=>{!t&&o===0&&c.current>0&&s(c.current)},[t,o]),(0,v.useEffect)(()=>{let t=l.current,n=u.current;if(!t)return;let r=UB();if(!i||!e){if(r){t.style.height=`0px`,t.style.opacity=`0`;return}Z.to(t,{height:0,opacity:0,duration:BB.fast,ease:VB.inOut,overwrite:!0});return}let a=n?.scrollHeight??0;if(r){t.style.height=`auto`,t.style.opacity=`1`;return}Z.fromTo(t,{height:0,opacity:0},{height:a,opacity:1,duration:BB.base,ease:VB.out,overwrite:!0,onComplete:()=>{t.style.height=`auto`}})},[i,e]),!e&&!t)return null;let d=UB(),f=t?o:o||c.current;return(0,G.jsxs)(`div`,{className:`overflow-hidden rounded-xl`,children:[(0,G.jsx)(`button`,{type:`button`,className:`inline-flex max-w-full items-center gap-1.5 rounded-full bg-surface-secondary px-2.5 py-1 text-left text-caption text-muted`,"aria-expanded":i,onClick:()=>a(e=>!e),children:t?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Mi,{size:12,className:`shrink-0 text-muted ${d?``:`animate-spin`}`}),(0,G.jsx)(`span`,{className:d?``:`access-thinking-shimmer`,children:r(`thinkingWorking`)}),(0,G.jsxs)(`span`,{className:`mono text-muted/80`,children:[o,`s`]})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(gi,{size:11,className:`shrink-0 transition-transform duration-200 ease-out ${i?`rotate-90`:``}`}),(0,G.jsx)(`span`,{children:r(`thinkingDone`)}),f>0?(0,G.jsx)(`span`,{className:`mono text-muted/80`,children:r(`thinkingElapsed`,{n:f})}):null,!f&&e?(0,G.jsx)(`span`,{className:`mono text-muted/80`,children:r(`thinkingChars`,{count:e.length})}):null]})}),(0,G.jsx)(`div`,{ref:l,className:`overflow-hidden`,style:{height:0,opacity:0},children:e?(0,G.jsx)(`pre`,{ref:u,className:`mt-1.5 max-h-52 overflow-auto whitespace-pre-wrap break-words rounded-xl bg-surface-secondary/80 px-3 py-2 text-caption leading-5 text-muted`,children:e}):null})]})}function jwe(e,t){return t(e===`running`?`toolCallRunning`:e===`error`?`toolCallError`:`toolCallSuccess`)}function Mwe({status:e}){return e===`running`?(0,G.jsx)(Wa,{size:12,className:`animate-spin text-muted`}):e===`error`?(0,G.jsx)(ho,{size:12,weight:`fill`,className:`text-danger`}):(0,G.jsx)(Oi,{size:12,weight:`fill`,className:`text-success`})}function Nwe(e){if(!e.trim())return``;try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function Y7({call:e,forceOpen:t}){let{t:n}=GF(),[r,i]=(0,v.useState)(e.status===`error`||!!t),[a,o]=(0,v.useState)(!1),s=(0,v.useMemo)(()=>Nwe(e.arguments||``),[e.arguments]);(0,v.useEffect)(()=>{e.status===`error`&&i(!0)},[e.status]),(0,v.useEffect)(()=>{t&&i(!0)},[t]);async function c(){s&&(await U7(s),o(!0),window.setTimeout(()=>o(!1),1200))}return(0,G.jsxs)(`div`,{className:`overflow-hidden rounded-lg`,children:[(0,G.jsxs)(`button`,{type:`button`,className:`flex w-full items-center gap-2 px-2 py-1.5 text-left`,"aria-expanded":r,onClick:()=>i(e=>!e),children:[(0,G.jsx)(gi,{size:11,className:`shrink-0 text-muted transition-transform ${r?`rotate-90`:``}`}),(0,G.jsx)(`span`,{className:`mono min-w-0 flex-1 truncate text-caption font-medium text-foreground`,children:e.name||n(`toolCallUntitled`)}),(0,G.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1 text-caption text-muted`,children:[(0,G.jsx)(Mwe,{status:e.status}),jwe(e.status,n)]})]}),r?(0,G.jsxs)(`div`,{className:`space-y-1.5 px-2 pb-2`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,G.jsx)(`div`,{className:`text-caption font-medium text-muted`,children:n(`toolCallArgs`)}),(0,G.jsxs)(`button`,{type:`button`,className:`inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-caption text-muted hover:bg-surface-secondary hover:text-foreground`,onClick:e=>{e.stopPropagation(),c()},children:[(0,G.jsx)(Ri,{size:12}),n(a?`copied`:`copy`)]})]}),(0,G.jsx)(`pre`,{className:`mono max-h-40 overflow-auto whitespace-pre-wrap break-words rounded-lg bg-surface-secondary/80 px-2.5 py-2 text-caption leading-5 text-muted`,children:s||n(`toolCallArgsEmpty`)})]}):null]})}function Pwe({calls:e}){let{t}=GF(),n=e.some(e=>e.status===`error`),r=e.some(e=>e.status===`running`),[i,a]=(0,v.useState)(n||r||e.length===1);return(0,v.useEffect)(()=>{(n||r)&&a(!0)},[n,r]),e.length?e.length===1?(0,G.jsx)(`div`,{className:`rounded-xl bg-surface-secondary/70`,children:(0,G.jsx)(Y7,{call:e[0],forceOpen:e[0].status===`error`})}):(0,G.jsxs)(`div`,{className:`overflow-hidden rounded-xl bg-surface-secondary/70`,children:[(0,G.jsxs)(`button`,{type:`button`,className:`flex w-full items-center gap-2 px-2.5 py-1.5 text-left text-caption text-muted`,"aria-expanded":i,onClick:()=>a(e=>!e),children:[(0,G.jsx)(gi,{size:11,className:`shrink-0 transition-transform ${i?`rotate-90`:``}`}),(0,G.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-medium text-foreground`,children:t(`toolCallGroup`,{n:e.length})}),r?(0,G.jsx)(Wa,{size:12,className:`animate-spin`}):null]}),i?(0,G.jsx)(`div`,{className:`space-y-0.5 border-t border-separator/40 px-0.5 py-1`,children:e.map(e=>(0,G.jsx)(Y7,{call:e},`${e.index}-${e.id||e.name}`))}):null]}):null}function Fwe({message:e}){return e.attachments?.length?(0,G.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:e.attachments.map(e=>(0,G.jsxs)(`span`,{className:`inline-flex max-w-[12rem] items-center gap-1.5 rounded-xl bg-surface/70 px-1.5 py-1 text-caption text-muted`,children:[e.kind===`image`&&e.dataUrl?(0,G.jsx)(`img`,{src:e.dataUrl,alt:``,className:`size-7 shrink-0 rounded-lg object-cover`}):(0,G.jsx)(`span`,{className:`grid size-7 shrink-0 place-items-center rounded-lg bg-surface`,children:(0,G.jsx)(Qi,{size:12})}),(0,G.jsx)(`span`,{className:`truncate`,children:e.name})]},e.id))}):null}function Iwe({message:e}){let{t}=GF(),n=e.usage;if(!n||n.credits==null)return null;let r=n.prompt_tokens,i=n.completion_tokens,a=typeof r==`number`||typeof i==`number`?t(`chatTryUsageTokens`,{prompt:uV(r??0),completion:uV(i??0)}):``;return(0,G.jsx)(`span`,{className:`mono text-caption text-muted`,children:a?t(`chatTryUsageFoot`,{tokens:a,amount:yV(n.credits)}):t(`chatTryCreditsUsed`,{amount:yV(n.credits)})})}function Lwe({text:e,streaming:t}){let n=e.split(/(\n{2,})/),r=-1;for(let e=n.length-1;e>=0;--e)if(n[e]&&!/^\n{2,}$/.test(n[e])){r=e;break}return(0,G.jsx)(`div`,{className:`whitespace-pre-wrap break-words text-body leading-[1.65] text-foreground ${t?`access-streaming`:``}`,children:n.map((e,n)=>e?/^\n{2,}$/.test(e)?(0,G.jsx)(`span`,{children:e},`s-${n}`):(0,G.jsx)(`span`,{className:t&&n===r?`access-stream-seg`:void 0,children:e},`p-${n}`):null)})}function Rwe(){let e=(0,v.useRef)(null);return(0,v.useEffect)(()=>{let t=e.current;!t||UB()||Z.from(t,{autoAlpha:0,duration:BB.fast,ease:`power2.out`})},[]),e}function zwe({message:e}){let{t}=GF(),[n,r]=(0,v.useState)(!1),i=e.role===`user`,a=Rwe();if(i)return(0,G.jsx)(`div`,{ref:a,className:`ml-auto max-w-[92%] sm:max-w-[78%]`,children:(0,G.jsxs)(`div`,{className:`access-bubble access-bubble--user rounded-2xl rounded-br-md px-3.5 py-2.5`,children:[e.content?(0,G.jsx)(`div`,{className:`whitespace-pre-wrap break-words text-body leading-[1.65] text-foreground`,children:e.content}):null,(0,G.jsx)(Fwe,{message:e})]})});let o=e.status===`streaming`&&!e.content&&!e.reasoning&&!e.toolCalls?.length,s=!!e.content&&e.status===`done`,c=e.status===`streaming`,l=!!(e.usage&&e.usage.credits!=null),u=e.status===`done`&&(e.latency_ms!=null||e.ttfb_ms!=null||typeof e.usage?.completion_tokens==`number`);async function d(){e.content&&(await U7(e.content),r(!0),window.setTimeout(()=>r(!1),1200))}return(0,G.jsxs)(`div`,{className:`group/access-msg max-w-[96%] space-y-1.5 sm:max-w-[88%]`,children:[(0,G.jsx)(`div`,{className:`flex items-center gap-1.5 px-0.5`,children:(0,G.jsx)(`span`,{className:`grid size-5 shrink-0 place-items-center rounded-lg border border-border bg-surface-secondary`,children:(0,G.jsx)(WV,{provider:e.provider,size:13})})}),e.reasoning||c?(0,G.jsx)(Awe,{text:e.reasoning||``,streaming:c&&(!e.content||!!e.reasoning),defaultOpen:e.reasoningOpen}):null,e.toolCalls?.length?(0,G.jsx)(Pwe,{calls:e.toolCalls}):null,e.status===`error`?(0,G.jsx)(vI,{status:`danger`,title:t(`requestFailed`),description:e.error||``}):o?(0,G.jsxs)(`div`,{className:`space-y-2 pt-0.5`,children:[(0,G.jsx)(tA,{className:`h-3 w-28 rounded-md`}),(0,G.jsx)(tA,{className:`h-3 w-full rounded-md`}),(0,G.jsx)(tA,{className:`h-3 w-[86%] rounded-md`}),(0,G.jsx)(tA,{className:`h-3 w-[68%] rounded-md`})]}):e.content?(0,G.jsx)(`div`,{className:`access-bubble access-bubble--assistant px-0.5 py-0`,children:(0,G.jsx)(Lwe,{text:e.content,streaming:c})}):null,s||l||u?(0,G.jsxs)(`div`,{className:`access-msg-foot space-y-1 px-0.5 pt-0.5`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1`,children:[s?(0,G.jsxs)(J,{size:`sm`,variant:`ghost`,className:`h-5 min-h-5 gap-1 px-1.5 text-caption text-muted/80`,onPress:()=>void d(),children:[(0,G.jsx)(H7,{copied:n,size:12}),t(n?`copied`:`copy`)]}):null,(0,G.jsx)(Iwe,{message:e})]}),u?(0,G.jsx)(J7,{variant:`inline`,latencyMs:e.latency_ms,ttfbMs:e.ttfb_ms,completionTokens:e.usage?.completion_tokens,stream:!0,className:`access-latency-inline max-h-0 overflow-hidden opacity-0 transition-[opacity,max-height] duration-200 ease-[cubic-bezier(0.2,0.7,0.2,1)] group-hover/access-msg:max-h-5 group-hover/access-msg:opacity-100 focus-within:max-h-5 focus-within:opacity-100`,labels:{ttft:t(`logsColTTFT`),total:t(`logsLatencyTotal`),tps:t(`logsOutputTPS`)}}):null]}):null]})}function Bwe({messages:e,busy:t,onLoadDemo:n}){let{t:r}=GF(),i=(0,v.useRef)(null);(0,v.useEffect)(()=>{i.current?.scrollIntoView({block:`end`})},[e,t]);let a=!e.length;return(0,G.jsxs)(`div`,{className:`access-thread min-h-0 flex-1 overflow-y-auto px-4 sm:px-6 ${a?`py-5 sm:py-6`:`pb-2 pt-4 sm:pb-2.5 sm:pt-5`}`,"aria-live":`polite`,"aria-busy":t,children:[a?(0,G.jsx)(O7,{className:`min-h-56`,icon:(0,G.jsx)(wi,{size:22}),title:r(`chatTryEmptyTitle`),hint:r(`chatTryEmptyHint`),action:n?(0,G.jsx)(`button`,{type:`button`,className:`inline-flex h-8 items-center rounded-[10px] px-2.5 text-caption font-medium text-muted transition-colors hover:bg-[var(--sidebar-hover)] hover:text-foreground`,onClick:n,children:r(`chatDemoLoad`)}):void 0}):(0,G.jsx)(`div`,{className:`space-y-4`,children:e.map(e=>(0,G.jsx)(zwe,{message:e},e.id))}),(0,G.jsx)(`div`,{ref:i})]})}function Vwe({format:e,onFormatChange:t,requestPath:n,prompt:r,onPromptChange:i,onTest:a,requestState:o,elapsedMs:s,output:c,responseStatus:l,curl:u,copiedCurl:d,onCopyCurl:f,canSend:p,accountValue:m,onAccountChange:h,accountOptions:g,modelValue:_,onModelChange:v,modelOptions:y,modelsLoading:b,disabled:x}){let{t:S}=GF();return(0,G.jsxs)(`div`,{className:`space-y-4`,children:[(0,G.jsx)(`p`,{className:`px-1 text-caption leading-5 text-muted`,children:S(`rawFormatHint`)}),(0,G.jsx)(`div`,{className:`access-raw-panel overflow-hidden rounded-2xl`,children:(0,G.jsxs)(`div`,{className:`grid xl:grid-cols-[minmax(420px,.92fr)_minmax(0,1.08fr)]`,children:[(0,G.jsxs)(`div`,{className:`xl:border-r xl:border-[color-mix(in_oklab,var(--foreground)_6%,transparent)]`,children:[(0,G.jsxs)(`div`,{className:`px-4 py-3.5 sm:px-5`,children:[(0,G.jsx)(`h3`,{className:`text-body font-semibold`,children:S(`requestBuilder`)}),(0,G.jsxs)(`p`,{className:`mt-0.5 text-caption text-muted`,children:[`POST `,n]})]}),(0,G.jsxs)(`div`,{className:`space-y-4 px-4 pb-4 sm:px-5 sm:pb-5`,children:[(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsx)(`div`,{className:`text-caption font-medium text-muted`,children:S(`rawFormatLabel`)}),(0,G.jsx)(wV,{className:`access-format-chips`,ariaLabel:S(`rawFormatLabel`),value:e,onChange:e=>t(e),options:[{id:`chat`,label:S(`rawFormatChat`)},{id:`messages`,label:S(`rawFormatMessages`)},{id:`responses`,label:S(`rawFormatResponses`)}]})]}),(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1`,children:[(0,G.jsx)(q7,{ariaLabel:S(`account`),value:m,onChange:h,options:g,isDisabled:x||o===`loading`,tone:`muted`,className:`w-auto max-w-[8.5rem] min-w-0`}),(0,G.jsx)(q7,{ariaLabel:S(`model`),value:_,onChange:v,placeholder:S(b?`requesting`:`model`),options:y,isDisabled:x||o===`loading`||b||!y.length,className:`w-auto max-w-[10.5rem] min-w-0`})]}),(0,G.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,G.jsx)(`div`,{className:`text-caption font-medium text-muted`,children:S(`prompt`)}),(0,G.jsx)(`span`,{className:`mono text-caption text-muted`,children:r.length})]}),(0,G.jsx)(Vj,{fullWidth:!0,rows:9,className:`min-h-52 resize-y rounded-xl border-0 bg-[var(--field-background)] px-3.5 py-3 text-body leading-[1.65] shadow-[inset_0_0_0_1px_color-mix(in_oklab,var(--field-border)_78%,var(--foreground))] focus-visible:ring-0`,value:r,onChange:e=>i(e.target.value),placeholder:S(`promptPlaceholder`),"aria-label":S(`prompt`),disabled:x||o===`loading`}),(0,G.jsx)(`p`,{className:`text-caption leading-5 text-muted/70`,children:S(`promptHelper`)})]}),(0,G.jsxs)(J,{fullWidth:!0,isPending:o===`loading`,isDisabled:!p||x,onPress:a,children:[(0,G.jsx)(wa,{size:15}),S(o===`loading`?`requesting`:`sendRequest`)]})]})]}),(0,G.jsxs)(`div`,{className:`access-raw-panel__inspector flex min-h-[440px] min-w-0 flex-col`,"aria-live":`polite`,"aria-busy":o===`loading`,children:[(0,G.jsxs)(`div`,{className:`flex min-h-12 items-center justify-between gap-4 px-4 py-3 sm:px-5`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`text-body font-semibold`,children:S(`responseInspector`)}),(0,G.jsx)(`p`,{className:`mt-0.5 text-caption text-muted`,children:S(`responseInspectorHint`)})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s===null?null:(0,G.jsxs)(`span`,{className:`mono flex items-center gap-1.5 text-caption text-muted`,children:[(0,G.jsx)(Pi,{size:12}),s,` ms`]}),(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:o===`success`?`success`:o===`error`?`danger`:void 0,children:l})]})]}),(0,G.jsx)(`div`,{className:`min-h-0 flex-1 px-4 pb-4 sm:px-5 sm:pb-5`,children:o===`idle`?(0,G.jsx)(O7,{className:`min-h-64`,title:S(`responseEmptyTitle`),hint:S(`responseEmptyHint`)}):o===`loading`?(0,G.jsxs)(`div`,{className:`space-y-3 pt-1`,children:[(0,G.jsx)(tA,{className:`h-3 w-32 rounded-lg`}),(0,G.jsx)(tA,{className:`h-3 w-full rounded-lg`}),(0,G.jsx)(tA,{className:`h-3 w-[88%] rounded-lg`}),(0,G.jsx)(tA,{className:`h-3 w-[72%] rounded-lg`}),(0,G.jsx)(tA,{className:`mt-7 h-3 w-[92%] rounded-lg`}),(0,G.jsx)(tA,{className:`h-3 w-[64%] rounded-lg`})]}):o===`error`?(0,G.jsx)(`div`,{className:`space-y-3`,children:(0,G.jsx)(vI,{status:`danger`,title:S(`requestFailed`),description:c})}):(0,G.jsxs)(`div`,{children:[(0,G.jsxs)(`div`,{className:`mb-3 flex items-center gap-2 text-caption font-medium text-success`,children:[(0,G.jsx)(Oi,{size:14,weight:`fill`}),S(`responseReceived`)]}),(0,G.jsx)(`pre`,{className:`mono overflow-x-auto whitespace-pre-wrap break-words text-caption leading-6 text-muted`,children:c})]})})]})]})}),(0,G.jsxs)(`section`,{className:`access-raw-panel overflow-hidden rounded-2xl`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-4 px-4 py-3 sm:px-5`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(`div`,{className:`text-body font-semibold`,children:S(`curlExample`)}),(0,G.jsx)(`div`,{className:`mt-0.5 truncate text-caption text-muted`,children:S(`curlGeneratedHint`)})]}),(0,G.jsxs)(J,{size:`sm`,variant:`ghost`,onPress:f,children:[(0,G.jsx)(H7,{copied:d}),S(d?`copied`:`copy`)]})]}),(0,G.jsx)(`pre`,{className:`mono max-h-72 overflow-auto whitespace-pre-wrap px-4 pb-4 text-caption leading-6 text-muted sm:px-5 sm:pb-5`,children:u})]})]})}function X7(e,t){let n=t.filter(e=>e.kind===`text`),r=t.filter(e=>e.kind===`image`&&e.dataUrl),i=e.trim();for(let e of n){let t=e.text??``;i=`${i}${i?` + `}),c?null:(0,G.jsxs)(`div`,{className:`flex items-start justify-between gap-3 px-4 py-3`,children:[(0,G.jsxs)(`button`,{type:`button`,"data-testid":`inflight-live-toggle`,"aria-expanded":f,"aria-controls":`inflight-live-body`,onClick:()=>p(!f),className:`flex min-w-0 flex-1 items-start gap-2 text-left outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 focus-visible:ring-offset-background`,children:[(0,G.jsx)(gi,{size:14,"aria-hidden":!0,className:`mt-1 shrink-0 text-muted transition-transform duration-200 ${f?`rotate-90`:``}`}),(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:e(`inflightTitle`)}),(0,G.jsxs)(`span`,{className:`mono inline-flex items-center gap-1 rounded-[3px] px-1.5 py-0.5 text-caption text-muted`,children:[(0,G.jsx)(`span`,{className:`status-dot`,"data-state":ne?`ok`:``}),e(ne?`inflightLiveBadge`:re?`inflightMockBadge`:`inflightIdleBadge`)]}),f&&ie>0?(0,G.jsx)(`span`,{className:`mono text-caption text-muted`,children:e(`inflightStickyBindings`,{n:ie})}):null]}),(0,G.jsx)(`p`,{className:`mt-0.5 text-caption text-muted`,children:e(`inflightHint`)})]})]}),(0,G.jsxs)(`div`,{className:`flex shrink-0 flex-col items-end gap-2`,children:[f?(0,G.jsxs)(Sn,{to:`/live`,className:`inline-flex shrink-0 items-center gap-1 text-caption text-muted transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus`,"aria-label":e(`inflightCardAria`),onClick:e=>e.stopPropagation(),children:[e(`inflightOpen`),(0,G.jsx)(ii,{size:14,"aria-hidden":!0})]}):(0,G.jsxs)(`button`,{type:`button`,className:`inline-flex shrink-0 items-center gap-1 text-caption text-muted transition-colors hover:text-foreground`,onClick:()=>p(!0),children:[e(`inflightExpand`),(0,G.jsx)(gi,{size:14,"aria-hidden":!0})]}),f&&!l?(0,G.jsx)(`div`,{className:`flex items-center gap-1.5`,onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:(0,G.jsx)(s7,{size:`sm`,isSelected:m,ariaLabel:e(`inflightMockToggleAria`),label:e(`inflightMockToggle`),onChange:g})}):null]})]}),f?(0,G.jsxs)(`div`,{id:`inflight-live-body`,ref:N,children:[(0,G.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 px-4 pb-1 pt-0 sm:grid-cols-4`,children:[(0,G.jsx)(_7,{label:e(`inflightWaiting`),value:M.waiting,warn:H}),(0,G.jsx)(_7,{label:e(`inflightRunning`),value:M.occupiedSlots,suffix:`/${M.workerSlots}`}),(0,G.jsx)(_7,{label:e(`inflightThroughput`),value:j.throughputPerMin,suffix:`/min`}),(0,G.jsx)(_7,{label:e(`inflightWaitP95`),value:j.waitP95Ms,kind:`ms`})]}),(0,G.jsxs)(`div`,{className:`grid gap-3 px-4 py-3 lg:grid-cols-[minmax(11rem,0.7fr)_minmax(0,2.1fr)_auto]`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,"data-queue-col":!0,children:[(0,G.jsxs)(`div`,{className:`mb-1.5 flex items-baseline justify-between gap-2`,children:[(0,G.jsx)(`span`,{className:`text-caption uppercase tracking-wide text-muted`,children:e(`inflightQueue`)}),(0,G.jsx)(`span`,{className:`mono text-[10px] tabular ${H?`text-[var(--il-warn-fg)]`:`text-muted`}`,children:M.waiting})]}),(0,G.jsxs)(`div`,{className:`space-y-1.5`,children:[z.map(t=>(0,G.jsxs)(`div`,{"data-wait-pill":!0,"data-wait-id":t.id,"data-priority":t.priority??`normal`,className:`relative flex items-center justify-between gap-2 overflow-hidden rounded-xl px-2.5 py-2 ${XCe(t.kind)}`,children:[(0,G.jsx)(`span`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-y-0 w-2/5 bg-gradient-to-r from-transparent via-[color-mix(in_oklab,var(--foreground)_8%,transparent)] to-transparent motion-safe:animate-[inflight-queue-shimmer_2.8s_linear_infinite]`}),(0,G.jsxs)(`span`,{className:`relative z-[1] flex min-w-0 items-center gap-2.5 truncate text-caption font-medium text-foreground/78`,children:[YCe(t.kind),(0,G.jsxs)(`span`,{className:`truncate`,children:[t.name,t.priority===`high`?(0,G.jsx)(`span`,{className:`mono ml-1 text-[10px] text-muted`,children:`↑`}):null,t.sticky?(0,G.jsx)(`span`,{className:`mono ml-1 text-[10px] text-muted`,children:e(`inflightSticky`)}):null]})]}),(0,G.jsx)(`span`,{className:`relative z-[1] mono shrink-0 text-caption text-muted`,children:m7(JCe(t,w))})]},t.id)),B.length?(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1 pt-1`,"data-queue-overflow":!0,children:[B.map(e=>(0,G.jsx)(`span`,{"data-wait-token":!0,"data-wait-id":e.id,"data-priority":e.priority??`normal`,className:`size-2 rounded-[2px] ${h7(e.kind)} ${e.priority===`high`?`ring-1 ring-foreground/20`:``}`,title:e.name},e.id)),(0,G.jsxs)(`span`,{className:`mono text-[10px] text-muted`,children:[`+`,B.length]})]}):z.length===0?(0,G.jsx)(`div`,{className:`text-caption text-muted`,children:e(`inflightQueueEmpty`)}):null]})]}),(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsxs)(`div`,{className:`mb-1.5 flex items-baseline justify-between gap-2`,children:[(0,G.jsx)(`span`,{className:`text-caption uppercase tracking-wide text-muted`,children:e(`inflightSlots`)}),(0,G.jsxs)(`span`,{className:`mono text-[10px] tabular text-muted`,children:[M.occupiedSlots,`/`,M.workerSlots]})]}),(0,G.jsx)(`div`,{className:`flex flex-col gap-2`,"data-worker-rail":!0,children:V.map(t=>(0,G.jsx)(QCe,{slot:t,jobById:L,clockMs:w,idleLabel:e(`inflightSlotIdle`),landedCellIds:E},t.id))})]}),(0,G.jsxs)(`div`,{className:`flex gap-2 sm:gap-2.5 lg:w-[6.75rem] lg:flex-col lg:gap-2.5`,children:[(0,G.jsx)(v7,{label:e(`inflightDone`),value:j.totals.done,tone:`ok`,icon:(0,G.jsx)(Ei,{size:22,"aria-hidden":!0})}),(0,G.jsx)(v7,{label:e(`inflightFailed`),value:j.totals.failed,tone:`danger`,icon:(0,G.jsx)(yo,{size:22,"aria-hidden":!0})})]})]}),(0,G.jsxs)(`div`,{"data-depth":!0,className:`px-4 py-3`,children:[(0,G.jsxs)(`div`,{className:`mb-1 flex items-baseline justify-between gap-2`,children:[(0,G.jsx)(`span`,{className:`text-caption uppercase tracking-wide text-muted`,children:e(`inflightDepth`)}),(0,G.jsx)(`span`,{className:`mono text-caption tabular text-muted`,children:te})]}),(0,G.jsx)(`div`,{className:`rounded-lg bg-[var(--il-item-bg)] px-1.5 pt-1.5 pb-1`,children:(0,G.jsx)(ZCe,{series:j.depthSeries,bands:[],backpressure:j.backpressure,label:te})})]})]}):null]})}function _7({label:e,value:t,suffix:n,kind:r=`int`,warn:i}){return(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(`div`,{className:`text-caption uppercase tracking-wide text-muted`,children:e}),(0,G.jsxs)(`div`,{className:`mono mt-1 flex items-baseline gap-0.5 text-section font-semibold tabular ${i?`text-[var(--il-warn-fg)]`:`text-foreground`}`,children:[(0,G.jsx)(SV,{value:t,kind:r,duration:560}),n?(0,G.jsx)(`span`,{className:`text-[0.92em] opacity-80`,children:n}):null]})]})}function v7({label:e,value:t,tone:n,icon:r}){let i=n===`ok`;return(0,G.jsxs)(`div`,{"data-outcome":n,role:`group`,"aria-label":`${e}: ${t}`,title:`${e}: ${t}`,className:`flex min-h-28 min-w-[3.6rem] flex-1 flex-col items-center justify-center gap-2 rounded-2xl border px-3 py-4 ${i?`border-[color-mix(in_oklab,var(--success)_14%,transparent)] bg-[var(--il-ok-bg)]`:`border-[color-mix(in_oklab,var(--danger)_12%,transparent)] bg-[var(--il-err-bg)]`}`,children:[(0,G.jsx)(`span`,{className:`inline-flex size-12 items-center justify-center rounded-2xl ${i?`bg-[color-mix(in_oklab,var(--success)_14%,var(--surface))] text-[var(--il-ok-fg)]`:`bg-[color-mix(in_oklab,var(--danger)_12%,var(--surface))] text-[var(--il-err-fg)]`}`,"aria-hidden":!0,children:r}),(0,G.jsx)(`div`,{className:`mono text-[1.7rem] font-semibold tabular leading-none tracking-tight ${i?`text-[var(--il-ok-fg)]`:`text-[var(--il-err-fg)]`}`,children:(0,G.jsx)(SV,{value:t,kind:`int`,duration:560})}),(0,G.jsx)(`span`,{className:`text-caption font-medium ${i?`text-[color-mix(in_oklab,var(--success)_55%,var(--muted))]`:`text-[color-mix(in_oklab,var(--danger)_55%,var(--muted))]`}`,children:e})]})}function $Ce(){return QF(`/api/live`)}var y7=2500,ewe=Math.round(6e4/y7);function twe(e){let t=e?.intervalMs??2500,[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)([]);return(0,v.useEffect)(()=>{let e=!1,n=null,i=()=>{document.hidden||$Ce().then(n=>{if(e)return;r(n);let i=Math.max(ewe,Math.round(6e4/t));a(e=>[...e,{at:Date.now(),value:n.in_flight}].slice(-i))}).catch(()=>{})},o=()=>{n||document.hidden||(i(),n=setInterval(i,t))},s=()=>{n&&clearInterval(n),n=null},c=()=>document.hidden?s():o();return o(),document.addEventListener(`visibilitychange`,c),()=>{e=!0,s(),document.removeEventListener(`visibilitychange`,c)}},[t]),{live:n,samples:i}}var nwe=(0,v.lazy)(()=>C(()=>import(`./TrafficChart-Cbl19Xw8.js`).then(e=>({default:e.TrafficChart})),__vite__mapDeps([0,1]))),b7=3e4,rwe={window:{from:``,to:``,hours:24},totals:{requests:0,ok:0,incomplete:0,error:0,canceled:0,streaming:0,success_rate:0},latency:{},tokens:{prompt:0,completion:0,cache_read:0,total:0},status:[],errors:[],models:[],accounts:[],providers:[],series:[]};function iwe(e,t){return!e||e===`(unknown)`?t(`statsUnknown`):HV(e,t)}function awe(e,t,n){return!t||t===`(unassigned)`?n:e.find(e=>e.id===t)?.name||t}var owe=new Set([`quota`,`rate_limit`,`auth`,`not_ready`,`unavailable`,`invalid_request`,`model_not_available`]);function x7(e,t){let n={quota:`logsKindQuota`,rate_limit:`logsKindRateLimit`,auth:`logsKindAuth`,not_ready:`logsKindNotReady`,unavailable:`logsKindUnavailable`,invalid_request:`logsKindInvalidRequest`,model_not_available:`logsKindModelNotAvailable`};return n[e]?t(n[e]):e}var swe=[`ok`,`incomplete`,`error`,`canceled`],S7={ok:`bg-success`,incomplete:`bg-warning`,error:`bg-danger`,canceled:`bg-muted`},C7={ok:`logsFilterOk`,incomplete:`logsFilterIncomplete`,error:`logsFilterError`,canceled:`logsFilterCanceled`};function w7(e,t){return t>0?e/t:null}function cwe(e,t){if(!e)return null;let n=Date.parse(e);if(!Number.isFinite(n))return null;let r=Math.max(0,Math.round((n-t)/1e3));if(r<=0)return null;let i=Math.floor(r/3600),a=Math.floor(r%3600/60),o=r%60;return i?`${i}h ${a}m`:a?`${a}m ${String(o).padStart(2,`0`)}s`:`${o}s`}function lwe(e,t){let n=[e.down_until,e.cooldown_until].filter(e=>!!e).filter(e=>Date.parse(e)>t);return n.length?n.reduce((e,t)=>Date.parse(e)>=Date.parse(t)?e:t):null}function uwe(e,t){return t?`danger`:(e??0)>=80?`warning`:`ok`}function dwe(){let{lang:e,t}=GF(),{overview:n,loading:r,error:i}=pI(),[a,o]=(0,v.useState)(`today`),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(!1),d=at(),[f,p]=(0,v.useState)(null),[m,h]=(0,v.useState)(``),[g,_]=(0,v.useState)(!0),[y,b]=(0,v.useState)([]),[x,S]=(0,v.useState)(!0),[C,w]=(0,v.useState)(0),[T,E]=(0,v.useState)(null),[D,O]=(0,v.useState)(()=>Date.now()),[k,A]=(0,v.useState)(!1),[j,M]=(0,v.useState)(!1),{live:N,samples:P}=twe({intervalMs:k?400:y7}),F=new Map((N?.accounts??[]).map(e=>[e.id,e])),I=!!n?.proxy?.ok,L=!!n?.worker?.ok,R=n?.worker?.ready_count??0,z=n?.worker?.hot_count??0,B=N?.in_flight??n?.worker?.in_flight??0,V=f??rwe,H=n?.routing?.session_affinity,ee=(H?.hits??0)+(H?.misses??0),te=w7(H?.hits??0,ee),ne=y.map(e=>({account:e,until:lwe(e,D)})).filter(e=>e.until!=null),re=ne.length>0,ie=new Set(ne.map(e=>e.account.id)),ae=[...y.filter(e=>e.ready&&!ie.has(e.id)),...y.filter(e=>!e.ready&&!ie.has(e.id))].slice(0,6);(0,v.useEffect)(()=>{if(!re)return;let e=setInterval(()=>O(Date.now()),1e3);return()=>clearInterval(e)},[re]),(0,v.useEffect)(()=>{let e=!1;return Promise.allSettled([$F(!1),oI()]).then(([t,n])=>{e||(t.status===`fulfilled`&&b(t.value.data||[]),n.status===`fulfilled`&&w((n.value.data||[]).length))}).finally(()=>{e||S(!1)}),()=>{e=!0}},[]);let oe=s?.start?.toString()??``,se=s?.end?.toString()??``,ce=(0,v.useRef)(0),le=(0,v.useCallback)(e=>{let t=kV(a,s);if(!t){_(!1);return}let n=++ce.current;cV(t).then(e=>{n===ce.current&&(p(e),h(``))}).catch(t=>{n!==ce.current||e||(p(null),h(t instanceof Error?t.message:String(t)))}).finally(()=>{n===ce.current&&_(!1)})},[a,oe,se]);(0,v.useEffect)(()=>(le(!1),()=>{ce.current++}),[le]),(0,v.useEffect)(()=>{if(l)return;let e=Date.now(),t=()=>{document.hidden||(e=Date.now(),le(!0))},n=setInterval(t,b7),r=()=>{!document.hidden&&Date.now()-e>=b7&&t()};return document.addEventListener(`visibilitychange`,r),()=>{clearInterval(n),document.removeEventListener(`visibilitychange`,r)}},[l,le]),(0,v.useEffect)(()=>{let e=!1,t=()=>{Tse().then(t=>{e||E(t)}).catch(()=>{})};t();let n=setInterval(t,5e3);return()=>{e=!0,clearInterval(n)}},[]);let ue=Math.floor(V.series.length/2),de=(e,t)=>e.reduce((e,n)=>e+n[t],0),fe=V.series.slice(0,ue),pe=V.series.slice(ue),me=((e,t)=>e>0?(t-e)/e:null)(de(fe,`requests`),de(pe,`requests`)),he=de(fe,`requests`)?de(fe,`ok`)/de(fe,`requests`):null,ge=de(pe,`requests`)?de(pe,`ok`)/de(pe,`requests`):null,_e=he!=null&&ge!=null?ge-he:null,ve=[{label:t(`metricRequests`),value:V.totals.requests,kind:`compact`,detail:t(`statsWindowHint`,{window:t(OV[a])}),ok:V.totals.requests>0,trend:me},{label:t(`metricSuccess`),value:V.totals.success_rate,kind:`percent`,detail:`${V.totals.ok} ${t(`logsFilterOk`)} · ${V.totals.incomplete} ${t(`logsFilterIncomplete`)} · ${V.totals.error} ${t(`logsFilterError`)}`,ok:V.totals.requests===0||V.totals.success_rate>=.9,trend:_e},{label:t(`metricLatency`),value:V.latency.p95_ms??V.latency.avg_ms,kind:`ms`,detail:`p50 ${dV(V.latency.p50_ms)} · avg ${dV(V.latency.avg_ms)}`,ok:V.latency.p95_ms==null||V.latency.p95_ms<8e3,trend:null},{label:t(`metricTokens`),value:V.tokens.total,kind:`compact`,detail:`${uV(V.tokens.prompt)} / ${uV(V.tokens.completion)}`,ok:!0,trend:null}],ye=w7(V.tokens.cache_read,V.tokens.prompt),be=w7(V.totals.streaming,V.totals.requests),xe=[{label:t(`metricCacheHit`),value:ye,kind:`percent`,detail:t(`metricCacheHitDetail`,{read:uV(V.tokens.cache_read),prompt:uV(V.tokens.prompt)})},{label:t(`metricStreaming`),value:be,kind:`percent`,detail:t(`metricStreamingDetail`,{count:V.totals.streaming,total:V.totals.requests})},{label:t(`metricCanceled`),value:V.totals.canceled,kind:`int`,detail:t(`metricCanceledDetail`,{rate:pV(w7(V.totals.canceled,V.totals.requests)??0)})}],Se=swe.map(e=>({key:e,count:V.status.find(t=>t.key===e)?.count??V.totals[e]??0})),Ce=e=>jV(e,V.window.from,V.window.to);return r&&!n?(0,G.jsx)(Fce,{}):(0,G.jsxs)(`div`,{className:`space-y-5 sm:space-y-4`,children:[(0,G.jsxs)(`section`,{className:`grid gap-3 pb-1 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-end`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h2`,{"data-gsap-reveal":!0,className:`text-title font-semibold`,children:t(`homeDisplay`)}),(0,G.jsx)(`p`,{className:`mt-1 max-w-2xl text-body leading-6 text-muted`,children:t(`homeLead`)})]}),(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,G.jsx)(AV,{value:a,onChange:o,custom:s,onCustomChange:c,onBusy:()=>_(!0),t}),(0,G.jsxs)(Aj,{delay:300,children:[(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,"aria-label":t(l?`statsRefreshResume`:`statsRefreshPause`),"aria-pressed":l,onPress:()=>u(e=>!e),children:l?(0,G.jsx)(Aa,{size:14}):(0,G.jsx)(Ea,{size:14})}),(0,G.jsx)(Aj.Content,{children:t(l?`statsRefreshPaused`:`statsRefreshAuto`)})]}),(0,G.jsxs)(`div`,{className:`text-left sm:text-right`,children:[(0,G.jsx)(`div`,{className:`mono text-caption text-muted`,children:n?.time||`—`}),(0,G.jsxs)(`div`,{className:`mt-1 inline-flex items-center gap-2 text-body font-medium`,children:[(0,G.jsx)(`span`,{className:`status-dot`,"data-state":I&&L?`ok`:`danger`}),t(I&&L?`running`:`degraded`)]})]})]})]}),i?(0,G.jsx)(vI,{title:t(`failedOverview`,{msg:i})}):null,(0,G.jsx)(Fle,{live:N,samples:P,t,onConcurrencyClick:()=>A(!0)}),(0,G.jsx)(g7,{t,expanded:k,onExpandedChange:A,live:k?N:null}),(0,G.jsx)(`section`,{"data-gsap-reveal":!0,className:`grid gap-3 sm:grid-cols-2 xl:grid-cols-4`,children:ve.map(e=>(0,G.jsxs)(xS,{className:`gap-0 p-3.5`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,G.jsx)(`div`,{className:`text-body text-muted`,children:e.label}),(0,G.jsx)(`span`,{className:`status-dot`,"data-state":e.ok?`ok`:`danger`})]}),(0,G.jsxs)(`div`,{className:`mt-1.5 flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(`div`,{className:`tabular text-metric font-medium leading-none`,children:g?(0,G.jsx)(Q,{className:`h-7 w-24`}):e.value==null?`—`:(0,G.jsx)(SV,{value:e.value,kind:e.kind})}),!g&&e.trend!=null?(0,G.jsx)(pwe,{value:e.trend,hint:t(`trendHalfHint`)}):null]}),(0,G.jsx)(`div`,{className:`mono mt-2 truncate text-caption text-muted`,children:g?(0,G.jsx)(Q,{className:`h-3 w-28`}):e.detail})]},e.label))}),(0,G.jsx)(`section`,{className:`grid gap-3 sm:grid-cols-3`,children:xe.map(e=>(0,G.jsx)(xS,{className:`gap-0 p-3.5`,children:(0,G.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-3`,children:[(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsx)(`div`,{className:`text-body text-muted`,children:e.label}),(0,G.jsx)(`div`,{className:`mono mt-0.5 truncate text-caption text-muted`,children:g?(0,G.jsx)(Q,{className:`h-3 w-28`}):e.detail})]}),(0,G.jsx)(`div`,{className:`tabular text-section font-semibold sm:shrink-0`,children:g?(0,G.jsx)(Q,{className:`h-5 w-12`}):e.value==null?`—`:(0,G.jsx)(SV,{value:e.value,kind:e.kind})})]})},e.label))}),(0,G.jsx)(`section`,{className:`grid gap-3`,children:(0,G.jsxs)(xS,{"data-gsap-reveal":!0,className:`overflow-hidden p-0`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-separator px-4 py-3`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:t(`statsTraffic`)}),(0,G.jsx)(`p`,{className:`mt-0.5 text-caption text-muted`,children:t(`statsTrafficHint`)})]}),(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:V.totals.error?`warning`:`success`,children:pV(V.totals.success_rate)})]}),(0,G.jsxs)(`div`,{className:`space-y-4 p-4`,children:[m?(0,G.jsx)(`div`,{className:`text-body text-danger`,children:t(`failedStats`,{msg:m})}):g?(0,G.jsx)(JB,{}):V.series.some(e=>e.requests>0)?(0,G.jsx)(v.Suspense,{fallback:(0,G.jsx)(JB,{}),children:(0,G.jsx)(nwe,{series:V.series,lang:e,emptyLabel:t(`statsEmptyTraffic`),okLabel:t(`logsFilterOk`),errorLabel:t(`logsFilterError`),selectHint:t(`statsDragHint`),labels:{requests:t(`chartMetricRequests`),tokens:t(`chartMetricTokens`),latency:t(`chartMetricLatency`),input:t(`chartInput`),output:t(`chartOutput`),cacheRead:t(`chartCacheRead`),p50:t(`statsLatencyP50`),p95:t(`statsLatencyP95`),total:t(`chartTotal`)},onSelectRange:(e,t)=>d(jV({},e,t))})}):(0,G.jsx)(CV,{emptyLabel:t(`statsEmptyTraffic`)}),(0,G.jsx)(`div`,{className:`grid grid-cols-2 gap-x-4 gap-y-4 pt-3 sm:grid-cols-4 sm:gap-3`,children:[[t(`statsLatencyP50`),dV(V.latency.p50_ms)],[t(`statsLatencyP95`),dV(V.latency.p95_ms)],[t(`statsLatencyAvg`),dV(V.latency.avg_ms)],[t(`statsTTFB`),dV(V.latency.ttfb_avg_ms)]].map(([e,t])=>(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`div`,{className:`text-caption text-muted`,children:e}),(0,G.jsx)(`div`,{className:`mono mt-1 text-body font-medium`,children:g?(0,G.jsx)(Q,{className:`h-4 w-16`}):t})]},String(e)))})]})]})}),(0,G.jsxs)(`section`,{className:`grid gap-3 xl:grid-cols-[minmax(0,1.15fr)_minmax(0,.85fr)]`,children:[(0,G.jsxs)(xS,{"data-gsap-reveal":!0,className:`overflow-hidden p-0`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-separator px-4 py-3`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:t(`statsPool`)}),(0,G.jsx)(`p`,{className:`mt-0.5 text-caption text-muted`,children:t(`statsPoolHint`)})]}),(0,G.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[!x&&ne.length?(0,G.jsxs)(`button`,{type:`button`,className:`inline-flex items-center gap-1 rounded-2xl bg-surface-secondary px-2 py-0.5 text-caption text-muted transition-colors hover:text-foreground`,"aria-expanded":j,"aria-label":t(`statsCoolingChip`,{count:ne.length}),onClick:()=>M(e=>!e),children:[(0,G.jsx)(`span`,{className:`status-dot shrink-0`,"data-state":`warn`}),(0,G.jsx)(`span`,{className:`mono tabular`,children:t(`statsCoolingChip`,{count:ne.length})}),(0,G.jsx)(gi,{size:10,className:`transition-transform duration-200 ${j?`rotate-90`:``}`,"aria-hidden":!0})]}):null,(0,G.jsxs)(Sn,{to:`/accounts`,className:`inline-flex items-center gap-1 text-caption font-medium text-muted hover:text-foreground`,children:[t(`navAccounts`),(0,G.jsx)(ii,{size:12})]})]})]}),(0,G.jsx)(`div`,{className:`grid grid-cols-2 gap-y-1 border-b border-separator sm:grid-cols-4 sm:gap-y-0`,children:[[t(`ready`),R,`ok`],[t(`hot`),z,z?`ok`:``],[t(`inFlight`),B,B?`ok`:``],[t(`statsAffinityHit`),te==null?`—`:pV(te),``,H?t(`statsAffinityHint`,{hits:H.hits??0,misses:H.misses??0,bindings:H.bindings??0}):``]].map(([e,t,n,r])=>(0,G.jsxs)(`div`,{className:`px-4 py-3 sm:py-2.5`,title:r?String(r):void 0,children:[(0,G.jsx)(`div`,{className:`text-caption text-muted`,children:e}),(0,G.jsxs)(`div`,{className:`mt-1.5 flex items-center gap-2 sm:mt-1`,children:[(0,G.jsx)(`span`,{className:`mono text-section font-semibold`,children:t}),n?(0,G.jsx)(`span`,{className:`status-dot`,"data-state":n}):null]})]},String(e)))}),j&&ne.length?(0,G.jsxs)(`div`,{className:`border-b border-separator bg-surface-secondary/50 px-4 py-2`,children:[(0,G.jsx)(`div`,{className:`text-caption text-muted`,children:t(`statsCoolingDetails`)}),(0,G.jsx)(`div`,{className:`mt-1.5 space-y-1`,children:ne.map(({account:e,until:n})=>(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 text-caption`,children:[(0,G.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-foreground/80`,children:e.name||e.id}),(0,G.jsx)(`span`,{className:`mono shrink-0 text-muted`,children:e.last_error_kind?x7(e.last_error_kind,t):t(`statsUnknown`)}),(0,G.jsx)(`span`,{className:`mono shrink-0 tabular text-muted sm:w-16 sm:text-right`,children:cwe(n,D)??`—`}),(0,G.jsx)(`span`,{className:`mono hidden shrink-0 text-muted sm:inline sm:w-10 sm:text-right`,title:t(`statsBackoffLevel`),children:e.restart_backoff_level?`L${e.restart_backoff_level}`:`—`})]},e.id))})]}):null,(0,G.jsx)(`div`,{className:`divide-y divide-separator`,children:x?(0,G.jsx)(qB,{}):y.length===0?(0,G.jsx)(`div`,{className:`px-4 py-6 text-body text-muted`,children:t(`noAccounts`)}):ae.length===0?(0,G.jsx)(`div`,{className:`px-4 py-6 text-body text-muted`,children:t(`statsPoolReadyEmpty`)}):ae.map(e=>{let n=e.quota,r=uwe(n?.percentage,n?.exceeded),i=F.get(e.id),a=i?.in_flight??e.in_flight??e.inFlight??0,o=i?.max_inflight||e.max_inflight||4,s=a>=o;return(0,G.jsxs)(`div`,{className:`flex flex-col gap-2.5 px-4 py-3 sm:flex-row sm:items-center sm:gap-3 sm:py-2.5`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-start gap-3 sm:items-center`,children:[(0,G.jsx)(`span`,{className:`status-dot mt-1.5 shrink-0 sm:mt-0`,"data-state":e.ready?`ok`:`danger`}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,G.jsx)(WV,{provider:e.provider,size:14}),(0,G.jsx)(`div`,{className:`truncate text-body font-medium`,children:e.name||e.id})]}),(0,G.jsxs)(`div`,{className:`mono mt-0.5 text-caption text-muted`,children:[UV(e.provider,e.region,t),` · `,e.hot?t(`hot`):e.ready?t(`ready`):t(`degraded`)]})]})]}),(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-4 gap-y-2 pl-6 sm:shrink-0 sm:pl-0`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-1.5`,title:t(s?`liveSaturated`:`inFlight`),"data-testid":`account-inflight`,children:[(0,G.jsx)(`span`,{className:`text-caption text-muted sm:hidden`,children:t(`inFlight`)}),(0,G.jsxs)(`span`,{className:`mono text-caption tabular ${s?`text-warning`:`text-muted`}`,children:[a,`/`,o]}),(0,G.jsx)(`span`,{className:`inline-block h-[2px] w-10 overflow-hidden rounded-[1px] bg-separator`,children:(0,G.jsx)(`span`,{className:`block h-full ${s?`bg-warning`:`bg-foreground/50`}`,style:{width:`${Math.min(100,a/o*100)}%`}})})]}),n?(0,G.jsxs)(`div`,{className:`flex items-center gap-1.5`,title:t(`quota`),children:[(0,G.jsx)(`span`,{className:`text-caption text-muted sm:hidden`,children:t(`quota`)}),(0,G.jsxs)(`span`,{className:`mono text-caption tabular text-muted`,children:[Math.round(n.percentage??0),`%`]}),(0,G.jsx)(`span`,{className:`inline-block h-[2px] w-10 overflow-hidden rounded-[1px] bg-separator`,children:(0,G.jsx)(`span`,{className:`block h-full ${r===`danger`?`bg-danger`:r===`warning`?`bg-warning`:`bg-success`}`,style:{width:`${Math.min(100,Math.max(0,n.percentage??0))}%`}})})]}):null]})]},e.id)})}),(0,G.jsxs)(`div`,{className:`flex items-center justify-between border-t border-separator px-4 py-2.5 text-caption text-muted`,children:[(0,G.jsxs)(`span`,{children:[t(`metricModels`),` `,C]}),(0,G.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center justify-end gap-x-2 gap-y-1`,children:[[`qoder`,`workbuddy`,`trae`].map(e=>{let t=y.filter(t=>String(t.provider||`qoder`).toLowerCase()===e).length;return t?(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,G.jsx)(WV,{provider:e,size:11}),t]},e):null}),(0,G.jsxs)(`span`,{children:[y.length,` `,t(`accountCount`)]})]})]})]}),(0,G.jsx)(fwe,{resources:T,t})]}),(0,G.jsxs)(`section`,{className:`grid gap-3 xl:grid-cols-2 2xl:grid-cols-3`,children:[(0,G.jsxs)(xS,{"data-gsap-reveal":!0,className:`overflow-hidden p-0`,children:[(0,G.jsx)(`div`,{className:`flex items-center justify-between gap-3 border-b border-separator px-4 py-3`,children:(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:t(`statsTopProviders`)}),(0,G.jsx)(`p`,{className:`mt-0.5 text-caption text-muted`,children:t(`statsTopProvidersHint`)})]})}),g?(0,G.jsx)(qB,{}):(0,G.jsx)(E7,{empty:t(`statsNoProviders`),items:(V.providers||[]).map(e=>({key:e.key,label:iwe(e.key,t),count:e.count,meta:`${e.ok}/${e.count}`,mark:e.key===`(unknown)`?void 0:e.key,href:e.key===`(unknown)`?void 0:Ce({provider:e.key})}))})]}),(0,G.jsxs)(xS,{"data-gsap-reveal":!0,className:`overflow-hidden p-0`,children:[(0,G.jsx)(`div`,{className:`flex items-center justify-between gap-3 border-b border-separator px-4 py-3`,children:(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:t(`statsTopModels`)}),(0,G.jsx)(`p`,{className:`mt-0.5 text-caption text-muted`,children:t(`providerCatalog`)})]})}),g?(0,G.jsx)(qB,{rows:4}):(0,G.jsx)(E7,{empty:t(`statsNoModels`),items:V.models.map(e=>({key:e.key,label:e.key===`(unknown)`?t(`statsUnknown`):e.key,count:e.count,href:e.key===`(unknown)`?void 0:Ce({model:e.key}),meta:e.latency_avg_ms==null?`${e.ok}/${e.count}`:dV(e.latency_avg_ms)}))})]}),(0,G.jsxs)(xS,{"data-gsap-reveal":!0,className:`overflow-hidden p-0`,children:[(0,G.jsx)(`div`,{className:`flex items-center justify-between gap-3 border-b border-separator px-4 py-3`,children:(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:t(`statsStatusMix`)}),(0,G.jsx)(`p`,{className:`mt-0.5 text-caption text-muted`,children:t(`statsStatusMixHint`)})]})}),g?(0,G.jsx)(qB,{rows:4}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(mwe,{items:Se,t}),(0,G.jsx)(`div`,{className:`border-t border-separator px-4 pt-2.5 text-caption font-medium text-muted`,children:t(`statsErrorMix`)}),(0,G.jsx)(E7,{empty:t(`statsNoErrors`),danger:!0,items:V.errors.map(e=>({key:e.key,label:x7(e.key,t),count:e.count,href:owe.has(e.key)?Ce({error_kind:e.key}):void 0}))}),(0,G.jsx)(`div`,{className:`border-t border-separator px-4 pt-2.5 text-caption font-medium text-muted`,children:t(`statsTopAccounts`)}),(0,G.jsx)(E7,{empty:t(`statsNoAccounts`),items:V.accounts.slice(0,5).map(e=>({key:e.key,label:awe(y,e.key,t(`statsUnassigned`)),count:e.count,href:!e.key||e.key===`(unassigned)`?void 0:Ce({account:e.key}),meta:`${e.ok}/${e.count}`}))})]})]})]})]})}function T7(e,t){return e>=2147483648||t>=200?`danger`:e>=1073741824||t>=100?`warning`:`ok`}function fwe({resources:e,t}){let n=[...e?.workers??[]].sort((e,t)=>t.rss_bytes-e.rss_bytes),r=e?.server;return(0,G.jsxs)(xS,{"data-gsap-reveal":!0,className:`overflow-hidden p-0`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-separator px-4 py-3`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:t(`resTitle`)}),(0,G.jsx)(`p`,{className:`mt-0.5 text-caption text-muted`,children:t(`resHint`)})]}),(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:e?`success`:`default`,children:e?fV(e.total_rss_bytes):`—`})]}),(0,G.jsx)(`div`,{className:`divide-y divide-separator`,children:e?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`px-4 py-2.5`,children:(0,G.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`status-dot shrink-0`,"data-state":T7(r?.rss_bytes??0,r?.cpu_percent??0)}),(0,G.jsx)(`div`,{className:`truncate text-body font-medium`,children:t(`resServer`)}),(0,G.jsxs)(`span`,{className:`mono text-caption text-muted`,children:[`pid `,r?.pid]})]}),(0,G.jsxs)(`div`,{className:`mono shrink-0 text-caption text-muted`,children:[fV(r?.rss_bytes),` · `,(r?.cpu_percent??0).toFixed(1),`%`]})]})}),n.length===0?(0,G.jsx)(`div`,{className:`px-4 py-3 text-body text-muted`,children:t(`resEmpty`)}):n.map(e=>(0,G.jsx)(`div`,{className:`px-4 py-2.5`,children:(0,G.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`status-dot shrink-0`,"data-state":T7(e.rss_bytes,e.cpu_percent)}),(0,G.jsx)(`div`,{className:`truncate text-body font-medium`,children:e.label||e.account_id}),(0,G.jsxs)(`span`,{className:`mono text-caption text-muted`,children:[`pid `,e.pid]})]}),(0,G.jsxs)(`div`,{className:`mono shrink-0 text-caption text-muted`,children:[fV(e.rss_bytes),` · `,e.cpu_percent.toFixed(1),`%`]})]})},e.pid))]}):(0,G.jsx)(qB,{rows:3})}),(0,G.jsxs)(`div`,{className:`flex items-center justify-between border-t border-separator px-4 py-2.5 text-caption text-muted`,children:[(0,G.jsxs)(`span`,{className:`mono`,children:[r?.goroutines??0,` `,t(`resGoroutines`)]}),(0,G.jsx)(`span`,{className:`mono`,children:e?.sampled_at?new Date(e.sampled_at).toLocaleTimeString():`—`})]})]})}function E7({items:e,empty:t,danger:n}){let r=(0,v.useRef)(null),i=Math.max(1,...e.map(e=>e.count)),a=e.map(e=>`${e.key}:${e.count}`).join(`|`);return(0,v.useLayoutEffect)(()=>{let e=r.current;if(!e)return;let t=Z.context(()=>{let e=Z.matchMedia();e.add(`(prefers-reduced-motion: reduce)`,()=>{Z.set(`[data-rank-fill]`,{clearProps:`transform`})}),e.add(`(prefers-reduced-motion: no-preference)`,()=>{let e=Z.utils.toArray(`[data-rank-fill]`);e.length&&Z.fromTo(e,{scaleX:0},{scaleX:1,duration:.38,ease:`power2.out`,stagger:.05,transformOrigin:`0% 50%`})})},e);return()=>t.revert()},[a]),e.length?(0,G.jsx)(`div`,{ref:r,className:`divide-y divide-separator`,children:e.map(e=>{let t=(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[e.mark?(0,G.jsx)(WV,{provider:e.mark,size:14}):null,(0,G.jsx)(`div`,{className:`truncate text-body font-medium`,children:e.label})]}),(0,G.jsx)(`div`,{className:`mono shrink-0 text-caption text-muted`,children:e.meta?`${e.count} · ${e.meta}`:e.count})]}),(0,G.jsx)(`div`,{className:`mt-2 h-1 overflow-hidden rounded-[2px] bg-separator`,children:(0,G.jsx)(`div`,{"data-rank-fill":!0,className:`h-full origin-left rounded-[2px] ${n?`bg-danger`:`bg-success`}`,style:{width:`${Math.max(6,e.count/i*100)}%`}})})]});return e.href?(0,G.jsx)(Sn,{to:e.href,className:`rank-row block px-4 py-2.5`,title:e.label,children:t},e.key):(0,G.jsx)(`div`,{className:`px-4 py-2.5`,children:t},e.key)})}):(0,G.jsx)(`div`,{className:`px-4 py-6 text-body text-muted`,children:t})}function pwe({value:e,hint:t}){let n=Math.abs(e)<.005?`flat`:e>0?`up`:`down`;return(0,G.jsxs)(`span`,{className:`trend-chip`,"data-tone":n,title:t,children:[(0,G.jsx)(n===`down`?oo:n===`up`?co:bi,{size:12,weight:`bold`}),e>0?`+`:``,(e*100).toFixed(1),`%`]})}function mwe({items:e,t}){let n=e.reduce((e,t)=>e+t.count,0);return n?(0,G.jsxs)(`div`,{className:`px-4 py-3`,children:[(0,G.jsx)(`div`,{className:`flex h-2 gap-px overflow-hidden rounded-[3px] bg-separator`,role:`img`,"aria-label":e.map(e=>`${t(C7[e.key])} ${e.count}`).join(`, `),children:e.filter(e=>e.count>0).map(e=>(0,G.jsx)(`div`,{className:S7[e.key],style:{width:`${e.count/n*100}%`,minWidth:2}},e.key))}),(0,G.jsx)(`div`,{className:`mt-3 grid grid-cols-2 gap-x-4 gap-y-1.5`,children:e.map(e=>(0,G.jsxs)(`div`,{className:`flex items-center gap-2 text-caption`,children:[(0,G.jsx)(`span`,{className:`inline-block size-2 shrink-0 rounded-[2px] ${S7[e.key]}`}),(0,G.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-muted`,children:t(C7[e.key])}),(0,G.jsx)(`span`,{className:`mono tabular`,children:e.count}),(0,G.jsx)(`span`,{className:`mono w-10 text-right tabular text-muted`,children:pV(e.count/n)})]},e.key))})]}):(0,G.jsx)(`div`,{className:`px-4 py-3 text-body text-muted`,children:t(`statsEmptyTraffic`)})}function D7(e){return e?e>=1e6?`${(e/1e6).toString().replace(/\.0$/,``)}M`:e>=1e3?`${Math.round(e/1e3)}k`:String(e):`—`}function hwe({model:e,t,onClose:n}){if(!e)return null;let r=e.reasoning_options||[],i=e.catalog_context_length||e.default_context_length||e.context_length,a=e.catalog_context_length_max,o=mV(e),s=hV(e),c=String(e.provider||e.owned_by||`qoder`).trim().toLowerCase(),l=UV(c,String(e.region||e.regions?.[0]||``).trim().toLowerCase()||void 0,t),u=c===`trae`?vle(e):void 0;return(0,G.jsx)(Y.Root,{isOpen:!0,onOpenChange:e=>{e||n()},children:(0,G.jsx)(Y.Backdrop,{variant:`blur`,children:(0,G.jsx)(Y.Container,{size:`md`,scroll:`inside`,children:(0,G.jsxs)(Y.Dialog,{children:[(0,G.jsxs)(Y.Header,{className:`items-start justify-between gap-4 px-5 pt-5`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(`div`,{className:`text-section`,children:e.display_name||e.id}),s?(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:`success`,children:t(`modelFree`)}):null]}),(0,G.jsx)(`div`,{className:`mono mt-1 text-caption text-muted`,children:e.id}),(0,G.jsxs)(`div`,{className:`mt-1 text-caption text-muted`,children:[l,o?` · ${o}`:``]})]}),(0,G.jsx)(Y.CloseTrigger,{"aria-label":t(`close`),className:`grid size-8 place-items-center rounded-lg text-muted hover:bg-surface-secondary`,children:(0,G.jsx)(yo,{size:16})})]}),(0,G.jsxs)(Y.Body,{className:`space-y-4 px-5 pb-5`,children:[(0,G.jsxs)(`section`,{children:[(0,G.jsx)(`div`,{className:`text-caption font-medium text-muted`,children:t(`contextWindowCol`)}),(0,G.jsxs)(`div`,{className:`mt-1 text-body`,children:[D7(i),a&&a!==i?` → ${D7(a)}`:``]}),e.supports_max_mode?(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:t(c===`qoder`?`qoderMaxModeHint`:`maxModeHint`)}):null,!e.supports_max_mode&&a&&a!==i?(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:t(`workbuddyContextHint`)}):null,u?u.prompt_max_tokens?(0,G.jsxs)(`div`,{className:`mt-1 text-caption text-muted`,children:[t(`promptMaxTokens`),`: `,D7(u.prompt_max_tokens)]}):null:e.prompt_max_tokens?(0,G.jsxs)(`div`,{className:`mt-1 text-caption text-muted`,children:[t(`promptMaxTokens`),`: `,D7(e.prompt_max_tokens)]}):null,u?u.max_output_tokens?(0,G.jsxs)(`div`,{className:`text-caption text-muted`,children:[t(`maxOutputTokens`),`: `,D7(u.max_output_tokens)]}):null:e.max_output_tokens?(0,G.jsxs)(`div`,{className:`text-caption text-muted`,children:[t(`maxOutputTokens`),`: `,D7(e.max_output_tokens)]}):null]}),(0,G.jsxs)(`section`,{children:[(0,G.jsx)(`div`,{className:`text-caption font-medium text-muted`,children:t(`reasoningLevels`)}),r.length?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:t(`reasoningHint`)}),(0,G.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:r.map(n=>{let r=`reasoningLevel_${n}`,i=t(r);return(0,G.jsxs)(RS,{size:`sm`,variant:`soft`,color:n===(e.reasoning_effort||e.reasoning_default)?`success`:`default`,children:[i===r?n:i,n===e.reasoning_default?` · ${t(`defaultValue`)}`:``,n===e.reasoning_effort&&n!==e.reasoning_default?` · ${t(`custom`)}`:``]},n)})})]}):(0,G.jsx)(`div`,{className:`mt-1 text-body text-muted`,children:e.reasoning_type?t(`reasoningFixed`,{type:e.reasoning_type}):t(`noReasoningLevels`)})]})]})]})})})})}function O7({title:e,hint:t,action:n,icon:r,className:i}){return(0,G.jsx)(`div`,{className:`grid min-h-56 place-items-center px-6 py-12 text-center ${i||``}`,children:(0,G.jsxs)(`div`,{className:`max-w-sm`,children:[r?(0,G.jsx)(`div`,{className:`mb-3 flex justify-center text-muted`,children:r}):null,(0,G.jsx)(NM,{className:`p-0 text-body font-medium text-foreground`,children:e}),t?(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:t}):null,n?(0,G.jsx)(`div`,{className:`mt-5 flex justify-center`,children:n}):null]})})}var k7=`__all__`;function A7({value:e,onChange:t,ariaLabel:n,options:r,className:i}){let a=r.map(e=>({id:e.id||k7,label:e.label})),o=e||k7,s=a.find(e=>e.id===o);return(0,G.jsxs)(UP,{className:i??`w-fit min-w-36`,"aria-label":n,value:o,onChange:e=>{typeof e==`string`&&t(e===k7?``:e)},children:[(0,G.jsxs)(UP.Trigger,{className:`min-w-0 w-full items-center`,children:[(0,G.jsx)(UP.Value,{className:`min-w-0 truncate`,children:({defaultChildren:e,isPlaceholder:t})=>t||!s?e:(0,G.jsx)(`span`,{className:`truncate`,children:s.label})}),(0,G.jsx)(UP.Indicator,{})]}),(0,G.jsx)(UP.Popover,{className:`max-h-72 min-w-36`,children:(0,G.jsx)(yP,{children:a.map(e=>(0,G.jsxs)(yP.Item,{id:e.id,textValue:e.label,children:[(0,G.jsx)(kM,{className:`block truncate`,children:e.label}),(0,G.jsx)(yP.ItemIndicator,{})]},e.id))})})]})}var gwe=[20,50,100],_we=[20,50,100];function vwe(e,t){if(t<=7)return Array.from({length:t},(e,t)=>t+1);let n=[1];e>3&&n.push(`gap`);let r=Math.max(2,e-1),i=Math.min(t-1,e+1);for(let e=r;e<=i;e++)n.push(e);return e{let t=Number([...e][0]);d.includes(t)&&u(t)},"aria-label":a,children:d.map(e=>(0,G.jsx)(aA,{id:String(e),children:e},e))})]}),(0,G.jsxs)(BP,{size:`sm`,className:`w-fit`,children:[(0,G.jsx)(BP.Summary,{className:`mono text-caption`,children:o}),(0,G.jsxs)(BP.Content,{children:[(0,G.jsx)(BP.Item,{children:(0,G.jsx)(BP.Previous,{isDisabled:i||t<=1,onPress:()=>l(Math.max(1,t-1)),"aria-label":s,children:(0,G.jsx)(BP.PreviousIcon,{})})}),f.map((e,n)=>e===`gap`?(0,G.jsx)(BP.Item,{children:(0,G.jsx)(BP.Ellipsis,{})},`gap-${n}`):(0,G.jsx)(BP.Item,{children:(0,G.jsx)(BP.Link,{isActive:e===t,isDisabled:i,onPress:()=>l(e),children:e})},e)),(0,G.jsx)(BP.Item,{children:(0,G.jsx)(BP.Next,{isDisabled:i||t>=n,onPress:()=>l(Math.min(n,t+1)),"aria-label":c,children:(0,G.jsx)(BP.NextIcon,{})})})]})]})]})}function M7({value:e,onChange:t,placeholder:n,ariaLabel:r,className:i}){return(0,G.jsx)(DM,{"aria-label":r,value:e,onChange:t,className:i,children:(0,G.jsxs)(DM.Group,{children:[(0,G.jsx)(DM.SearchIcon,{}),(0,G.jsx)(DM.Input,{placeholder:n}),(0,G.jsx)(DM.ClearButton,{})]})})}function ywe(e){let t=[];for(let n of e)for(let e of n.regions||[])e?.id&&t.push({value:`${n.id}:${e.id}`,provider:n.id,region:e.id});return t}function N7(e){return e.settings_key||e.id}function P7(e){return String(e.provider||e.owned_by||`qoder`).trim().toLowerCase()}function F7(e){let t=String(e.region||``).trim().toLowerCase();if(t)return t;let n=e.regions||[];return String(n[0]||``).trim().toLowerCase()}function I7(e){return`${P7(e)}:${F7(e)||`any`}:${e.settings_key||e.id}:${e.native_model||e.mapped_key||``}`}function L7(e){let t=e.route_display_name||``;return t&&t!==(e.display_name||e.id)?t:``}function R7(e,t){let n=`reasoningLevel_${t}`,r=e(n);return r===n?t:r}function z7({label:e,hint:t}){return(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(`span`,{className:`cursor-help text-caption text-muted`,children:e})}),(0,G.jsx)(Aj.Content,{children:(0,G.jsx)(`p`,{className:`max-w-xs text-caption leading-5`,children:t})})]})}function B7({model:e,saving:t,t:n,variant:r=`table`,onToggleTraeMax:i,onReasoningChange:a}){let o=P7(e),s=r===`card`,c=s?`w-full min-w-0`:`w-full max-w-[7.5rem] min-w-0`;return(0,G.jsxs)(`div`,{className:s?`flex min-w-0 flex-col gap-3`:`flex min-w-0 flex-col gap-1.5`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,G.jsxs)(`span`,{className:`mono text-caption text-muted`,children:[D7(e.catalog_context_length||e.context_length),e.catalog_context_length_max&&e.catalog_context_length_max!==(e.catalog_context_length||e.context_length)?` → ${D7(e.catalog_context_length_max)}`:``]}),o===`workbuddy`&&e.catalog_context_length_max&&e.catalog_context_length_max!==(e.catalog_context_length||e.context_length)?(0,G.jsx)(z7,{label:n(`catalogWindow`),hint:n(`workbuddyContextHint`)}):null]}),(o===`trae`||o===`qoder`)&&e.supports_max_mode?(0,G.jsxs)(`div`,{className:s?`flex flex-col gap-1.5`:`flex items-center gap-2`,children:[s?(0,G.jsx)(z7,{label:`${n(`maxMode`)}${e.catalog_context_length_max?` ${D7(e.catalog_context_length_max)}`:``}`,hint:n(o===`qoder`?`qoderMaxModeHint`:`maxModeHint`)}):null,(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(s7,{isSelected:!!e.max_mode,isDisabled:t,ariaLabel:`${e.id} ${n(`maxMode`)}`,onChange:t=>i(e,t)}),s?null:(0,G.jsx)(z7,{label:`${n(`maxMode`)}${e.catalog_context_length_max?` ${D7(e.catalog_context_length_max)}`:``}`,hint:n(o===`qoder`?`qoderMaxModeHint`:`maxModeHint`)})]})]}):null,(e.reasoning_options||[]).length>1?(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,G.jsx)(z7,{label:n(`reasoningLevels`),hint:n(`reasoningHint`)}),(0,G.jsx)(A7,{className:c,ariaLabel:`${e.id} ${n(`reasoningLevels`)}`,value:e.reasoning_effort||e.reasoning_default||e.reasoning_options?.[0]||``,onChange:t=>{t&&a(e,t)},options:(e.reasoning_options||[]).map(e=>({id:e,label:R7(n,e)}))})]}):(e.reasoning_options||[]).length===1?(0,G.jsx)(z7,{label:`${n(`reasoningLevels`)} ${R7(n,e.reasoning_options[0])}`,hint:n(`reasoningHint`)}):e.reasoning_type?(0,G.jsx)(`span`,{className:`text-caption text-muted`,children:n(`reasoningFixed`,{type:e.reasoning_type})}):o===`trae`&&!e.supports_max_mode?(0,G.jsx)(z7,{label:n(`catalogWindow`),hint:n(`catalogWindowHint`)}):null]})}function V7({model:e,t,onDetails:n}){return(0,G.jsxs)(J,{size:`sm`,variant:`ghost`,onPress:()=>n(e),children:[(0,G.jsx)(ca,{size:14}),t(`modelDetails`)]})}function bwe(){let{t:e}=GF(),{overview:t,loading:n}=pI(),[r,i]=(0,v.useState)(``),[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)([]),[l,u]=(0,v.useState)(1),[d,f]=(0,v.useState)(50),[p,m]=(0,v.useState)(!1),[h,g]=(0,v.useState)(``),[_,y]=(0,v.useState)(``),[b,x]=(0,v.useState)(!1),[S,C]=(0,v.useState)(null),[w,T]=(0,v.useState)([]),[E,D]=(0,v.useState)(!0);(0,v.useEffect)(()=>{let e=!1;return nse(void 0,`regional`).then(t=>{e||T(t.data||[])}).catch(()=>void 0).finally(()=>{e||D(!1)}),cI().then(t=>{e||c(ywe(t.data||[]))}).catch(()=>void 0),()=>{e=!0}},[]);let O=(0,v.useMemo)(()=>{let t=r.trim().toLowerCase(),[n,i]=a.includes(`:`)?a.split(`:`,2):[a,``];return w.filter(r=>{let a=P7(r),o=F7(r);if(n&&a!==n||i&&o!==i)return!1;if(!t)return!0;let s=UV(a,o||void 0,e);return`${r.display_name||``} ${r.id} ${r.mapped_key||``} ${a} ${s} ${r.owned_by||``} ${o} ${r.credits||``} ${r.free?`free`:``}`.toLowerCase().includes(t)})},[r,w,a,e]),k=[r,a,d].join(`\0`),[A,j]=(0,v.useState)(k);A!==k&&(j(k),u(1));let M=Math.max(1,Math.ceil(O.length/d)),N=Math.min(A===k?Math.max(1,l):1,M);l!==N&&u(N);let P=(0,v.useMemo)(()=>{let e=(N-1)*d;return O.slice(e,e+d)},[N,O,d]),F=O.length===0?0:(N-1)*d+1,I=Math.min(O.length,N*d),L=O.length?e(`logsShownTotal`,{shown:`${F}–${I}`,total:O.length}):e(`shownTotal`,{shown:0,total:w.length});if(n&&!t||E)return(0,G.jsx)(zce,{});function R(e,t){let n=N7(e),r=P7(e),i=w.map(e=>{if(N7(e)!==n||P7(e)!==r)return e;let i=e.reasoning_effort||e.reasoning_default||``,a=e.catalog_context_length||e.default_context_length||e.context_length||0,o=e.catalog_context_length_max||0;return{...e,max_mode:t,context_length:t&&o?o:a,default_context_length:a,context_custom:r===`qoder`?t:t||!!(i&&i!==e.reasoning_default)}});T(i)}function z(e,t){let n=N7(e),r=P7(e),i=w.map(e=>N7(e)!==n||P7(e)!==r?e:{...e,reasoning_effort:t,context_custom:!!e.max_mode||!!(t&&t!==e.reasoning_default)});T(i)}async function B(){m(!0),y(``),x(!1);try{let e=await sI(void 0,`regional`);T(e.data||[])}catch(e){x(!0),y(e instanceof Error?e.message:String(e))}finally{m(!1)}}async function V(t,n){let r=P7(t);if(r!==`trae`&&r!==`workbuddy`&&r!==`kimi`&&r!==`codearts`)return;let i=N7(t);g(i),y(``),x(!1);try{await ise(r,i,n),z(t,n),y(e(`reasoningSaved`,{model:t.id,level:R7(e,n)}))}catch(e){x(!0),y(e instanceof Error?e.message:String(e))}finally{g(``)}}async function H(t,n){if(!t.supports_max_mode){x(!0),y(e(`contextMaxUnavailable`));return}let r=N7(t),i=P7(t);g(r),y(``),x(!1);try{await rse(i,r,n,t.catalog_context_length_max),R(t,n),y(e(n?`contextMaxOn`:`contextMaxOff`,{model:t.id}))}catch(e){x(!0),y(e instanceof Error?e.message:String(e))}finally{g(``)}}return(0,G.jsxs)(`div`,{className:`space-y-6`,children:[(0,G.jsxs)(`section`,{className:`grid gap-5 pb-6 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-end`,children:[(0,G.jsxs)(`div`,{"data-gsap-reveal":!0,children:[(0,G.jsx)(`h2`,{className:`text-title font-semibold`,children:e(`availableModels`)}),(0,G.jsx)(`p`,{className:`mt-1 text-body text-muted`,children:w.length?L:e(`noModelsYet`)})]}),(0,G.jsxs)(`div`,{"data-gsap-reveal":!0,className:`flex min-w-0 flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center`,children:[(0,G.jsx)(M7,{className:`w-full min-w-0 sm:w-72`,value:r,onChange:i,placeholder:e(`filterPh`),ariaLabel:e(`filter`)}),(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,G.jsx)(A7,{ariaLabel:e(`providerCol`),value:a,onChange:o,options:[{id:``,label:e(`providerFilterAll`)},...s.map(t=>({id:t.value,label:UV(t.provider,t.region,e)}))]}),(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,isPending:p,onPress:()=>void B(),children:[(0,G.jsx)(Qr,{size:14}),e(p?`refreshing`:`refresh`)]})]})]})]}),_?(0,G.jsx)(vI,{status:b?`danger`:`success`,title:_}):null,(0,G.jsxs)(xS,{"data-gsap-reveal":!0,className:`overflow-hidden p-0`,children:[(0,G.jsxs)(`div`,{className:`flex items-start justify-between gap-4 border-b border-separator px-4 py-4 sm:items-center sm:px-5`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,G.jsx)(`div`,{className:`grid size-9 shrink-0 place-items-center rounded-lg bg-surface-secondary text-muted`,children:(0,G.jsx)(Bi,{size:16})}),(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(`div`,{className:`text-body font-semibold`,children:e(`providerCatalog`)}),(0,G.jsx)(`div`,{className:`mt-0.5 text-caption leading-5 text-muted`,children:e(`contextConfigHint`)})]})]}),(0,G.jsx)(RS,{size:`sm`,variant:`soft`,className:`shrink-0`,children:O.length})]}),p||n?(0,G.jsx)(YB,{}):O.length===0?(0,G.jsx)(O7,{icon:(0,G.jsx)(va,{size:22}),title:w.length?e(`noModelsMatch`):e(`noProviders`),hint:w.length?r||a||e(`noModelsMatch`):e(`noModelsYet`)}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`divide-y divide-separator lg:hidden`,children:P.map(t=>{let n=N7(t),r=h===n,i=P7(t),a=UV(i,F7(t)||void 0,e),o=mV(t),s=hV(t);return(0,G.jsxs)(`article`,{className:`space-y-3 px-4 py-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[(0,G.jsx)(`span`,{className:`status-dot mt-1.5`,"data-state":t.stale?void 0:`ok`}),(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(`div`,{className:`truncate font-medium`,children:t.display_name||t.id}),s?(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:`success`,children:e(`modelFree`)}):null,o?(0,G.jsx)(`span`,{className:`mono text-caption text-muted`,children:o}):null]}),(0,G.jsx)(`div`,{className:`mono mt-0.5 truncate text-caption text-muted`,children:t.id}),L7(t)?(0,G.jsx)(`div`,{className:`mt-0.5 text-caption text-muted`,children:e(`routedTo`,{model:L7(t)})}):null]})]}),(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:t.context_custom||t.stale?`warning`:`success`,children:t.context_custom?e(`custom`):e(`defaultValue`)})]}),(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1 text-caption`,children:[(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,G.jsx)(WV,{provider:i,size:14}),(0,G.jsx)(`span`,{className:`font-medium`,children:a})]}),(0,G.jsx)(`span`,{className:`mono break-all text-muted`,children:t.mapped_key||t.native_model||t.id})]}),(0,G.jsx)(B7,{model:t,saving:r,t:e,variant:`card`,onToggleTraeMax:(e,t)=>void H(e,t),onReasoningChange:(e,t)=>void V(e,t)}),(0,G.jsx)(V7,{model:t,t:e,onDetails:C})]},I7(t))})}),(0,G.jsx)(X,{className:`hidden min-w-0 lg:block`,children:(0,G.jsx)(X.ScrollContainer,{className:`min-w-0 overflow-x-auto`,children:(0,G.jsxs)(X.Content,{"aria-label":e(`availableModels`),className:`min-w-[68rem]`,children:[(0,G.jsxs)(X.Header,{children:[(0,G.jsx)(X.Column,{isRowHeader:!0,children:e(`modelCol`)}),(0,G.jsx)(X.Column,{children:e(`requestIdCol`)}),(0,G.jsx)(X.Column,{children:e(`providerCol`)}),(0,G.jsx)(X.Column,{children:e(`qoderKeyCol`)}),(0,G.jsx)(X.Column,{children:e(`modelDefaultsCol`)}),(0,G.jsx)(X.Column,{children:e(`stateCol`)}),(0,G.jsx)(X.Column,{children:e(`actions`)})]}),(0,G.jsx)(X.Body,{children:P.map(t=>{let n=N7(t),r=h===n,i=P7(t),a=UV(i,F7(t)||void 0,e),o=mV(t),s=hV(t);return(0,G.jsxs)(X.Row,{children:[(0,G.jsx)(X.Cell,{children:(0,G.jsxs)(`div`,{className:`flex items-center gap-3 py-1`,children:[(0,G.jsx)(`span`,{className:`status-dot`,"data-state":t.stale?void 0:`ok`}),(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(`div`,{className:`font-medium`,children:t.display_name||t.id}),s?(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:`success`,children:e(`modelFree`)}):null,o?(0,G.jsx)(`span`,{className:`mono text-caption text-muted`,children:o}):null]}),L7(t)?(0,G.jsx)(`div`,{className:`mt-0.5 text-caption text-muted`,children:e(`routedTo`,{model:L7(t)})}):null]})]})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-caption font-medium`,children:t.id})}),(0,G.jsx)(X.Cell,{children:(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(WV,{provider:i,size:14}),(0,G.jsx)(`span`,{className:`text-caption font-medium`,children:a})]})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-caption text-muted`,children:t.mapped_key||t.native_model||t.id})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(B7,{model:t,saving:r,t:e,variant:`table`,onToggleTraeMax:(e,t)=>void H(e,t),onReasoningChange:(e,t)=>void V(e,t)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:t.context_custom||t.stale?`warning`:`success`,children:t.context_custom?e(`custom`):e(`defaultValue`)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(V7,{model:t,t:e,onDetails:C})})]},I7(t))})})]})})})]})]}),(0,G.jsx)(hwe,{model:S?w.find(e=>N7(e)===N7(S))||S:null,t:e,onClose:()=>C(null)}),(0,G.jsx)(j7,{total:O.length,page:N,pageCount:M,pageSize:d,loading:p,pageSizeLabel:e(`logsPageSize`),pageLabel:e(`logsPage`,{page:N,pages:M}),prevLabel:e(`logsPrevPage`),nextLabel:e(`logsNextPage`),onPage:u,onPageSize:f})]})}function H7({copied:e,size:t=14,className:n}){let r=(0,v.useRef)(null),i=(0,v.useRef)(null),a=(0,v.useRef)(!0);return(0,v.useLayoutEffect)(()=>{let t=e?i.current:r.current,n=e?r.current:i.current;if(!t||!n)return;let o={autoAlpha:1,scale:1,filter:`blur(0px)`},s={autoAlpha:0,scale:.5,filter:`blur(4px)`};if(a.current||UB()){a.current=!1,Z.set(t,o),Z.set(n,s);return}Z.to(n,{...s,duration:BB.fast,ease:VB.out,overwrite:!0}),Z.fromTo(t,s,{...o,duration:BB.base,ease:VB.soft,delay:BB.instant/2,overwrite:!0})},[e]),(0,G.jsxs)(`span`,{className:`relative inline-grid place-items-center ${n??``}`,style:{width:t,height:t},children:[(0,G.jsx)(`span`,{ref:r,className:`col-start-1 row-start-1 inline-flex`,children:(0,G.jsx)(Ii,{size:t})}),(0,G.jsx)(`span`,{ref:i,className:`col-start-1 row-start-1 inline-flex text-success`,children:(0,G.jsx)(Ei,{size:t})})]})}async function U7(e){if(!e)return!1;try{if(typeof navigator<`u`&&navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(e),!0}catch{}try{let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.style.position=`fixed`,t.style.top=`-1000px`,t.style.opacity=`0`,document.body.appendChild(t),t.focus(),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),n}catch{return!1}}function W7(){return`${location.protocol}//${location.host}`}function G7(e){return e?/^https?:\/\//i.test(e)?e:e.startsWith(`/`)?`${W7()}${e}`:`${W7()}/${e}`:W7()}function xwe({access:e}){let{t}=GF(),[n,r]=(0,v.useState)(``),i=G7(e?.openai_base_url||`/v1`),a=(0,v.useMemo)(()=>[{name:t(`endpointOpenAI`),url:i,method:`BASE`,hint:t(`endpointBaseHint`),icon:(0,G.jsx)(ui,{size:15})},{name:t(`endpointChat`),url:G7(e?.chat_completions||`${i}/chat/completions`),method:`POST`,hint:t(`endpointChatHint`),icon:(0,G.jsx)(wa,{size:15})},{name:t(`endpointMessages`),url:G7(e?.messages||`${i}/messages`),method:`POST`,hint:t(`endpointMessagesHint`),icon:(0,G.jsx)(wa,{size:15})},{name:t(`endpointResponses`),url:G7(e?.responses||`${i}/responses`),method:`POST`,hint:t(`endpointResponsesHint`),icon:(0,G.jsx)(wa,{size:15})},{name:t(`endpointModels`),url:G7(e?.models||`${i}/models`),method:`GET`,hint:t(`endpointModelsHint`),icon:(0,G.jsx)(ga,{size:15})},{name:t(`endpointHealth`),url:G7(e?.health||`/health`),method:`GET`,hint:t(`endpointHealthHint`),icon:(0,G.jsx)(oa,{size:15})}],[e,i,t]);return(0,G.jsxs)(`section`,{className:`overflow-hidden rounded-3xl bg-surface shadow-surface`,children:[(0,G.jsx)(`div`,{className:`flex items-start justify-between gap-4 px-5 py-4 sm:px-6`,children:(0,G.jsxs)(`div`,{children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:t(`endpoints`)}),(0,G.jsx)(RS,{size:`sm`,variant:`soft`,children:t(`endpointCount`,{count:a.length-1})})]}),(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:t(`routesHint`)})]})}),(0,G.jsx)(`div`,{className:`grid gap-2 px-3 pb-3 sm:grid-cols-2 sm:px-4 sm:pb-4 lg:grid-cols-3`,children:a.map(e=>(0,G.jsxs)(`div`,{className:`group min-w-0 rounded-xl bg-surface-secondary/40 p-3 transition-colors hover:bg-surface-secondary/70`,children:[(0,G.jsxs)(`div`,{className:`flex items-start justify-between gap-2.5`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,G.jsx)(`span`,{className:`grid size-7 shrink-0 place-items-center rounded-lg bg-surface text-muted`,children:e.icon}),(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(`div`,{className:`truncate text-body font-semibold`,children:e.name}),(0,G.jsx)(`code`,{className:`mono mt-0.5 block truncate text-caption text-muted`,children:e.url})]})]}),(0,G.jsx)(RS,{size:`sm`,variant:`soft`,children:e.method})]}),(0,G.jsx)(`p`,{className:`mt-2 text-caption leading-5 text-muted`,children:e.hint}),(0,G.jsxs)(`div`,{className:`mt-2 flex items-center justify-between gap-2`,children:[(0,G.jsx)(`span`,{className:`text-caption font-medium text-muted`,children:e.method===`BASE`?t(`endpointBaseLabel`):t(`endpointAuthLabel`)}),(0,G.jsxs)(`div`,{className:`flex gap-1`,children:[(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,"aria-label":t(`copy`),onPress:()=>{U7(e.url),r(e.name),window.setTimeout(()=>r(``),1100)},children:(0,G.jsx)(H7,{copied:n===e.name})}),(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,"aria-label":t(`open`),onPress:()=>window.open(e.url,`_blank`,`noopener,noreferrer`),children:(0,G.jsx)(ni,{size:14})})]})]})]},e.name))})]})}var Swe=`https://caiaiu.com`;function K7({className:e=``}){let{t}=GF();return(0,G.jsx)(`p`,{className:`text-caption leading-5 text-muted ${e}`.trim(),children:(0,G.jsx)(`a`,{href:Swe,target:`_blank`,rel:`noopener noreferrer`,className:`underline-offset-2 transition-colors hover:text-foreground hover:underline`,children:t(`caiaiSoftLink`)})})}var Cwe=new Set(`txt.md.markdown.json.csv.tsv.yml.yaml.toml.xml.html.htm.css.scss.js.jsx.ts.tsx.mjs.cjs.py.go.rs.java.kt.swift.c.h.cpp.hpp.sh.bash.zsh.sql.graphql.env.ini.conf.log.rst.tex`.split(`.`)),wwe=new Set([`image/png`,`image/jpeg`,`image/jpg`,`image/gif`,`image/webp`]);function Twe(e){let t=e.lastIndexOf(`.`);return t>=0?e.slice(t+1).toLowerCase():``}function Ewe(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}async function Dwe(e){let t=Twe(e.name),n=e.type||`application/octet-stream`,r=`${e.name}-${e.size}-${e.lastModified}-${Math.random().toString(36).slice(2,8)}`;if(wwe.has(n)||[`png`,`jpg`,`jpeg`,`gif`,`webp`].includes(t)){let t=await new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result||``)),r.onerror=()=>n(r.error||Error(`read failed`)),r.readAsDataURL(e)});return{id:r,name:e.name,mime:n,kind:`image`,dataUrl:t,size:e.size}}if(Cwe.has(t)||n.startsWith(`text/`)||n===`application/json`){let t=await e.text();return{id:r,name:e.name,mime:n,kind:`text`,text:t,size:e.size}}return null}function q7({ariaLabel:e,value:t,onChange:n,placeholder:r,isDisabled:i,options:a,className:o,tone:s=`default`}){let c=a.find(e=>e.id===t),l=s===`muted`?`text-muted hover:text-foreground`:`text-foreground`;return(0,G.jsxs)(UP,{className:o??`w-auto max-w-[11rem] min-w-0`,"aria-label":e,value:t||null,placeholder:r,isDisabled:i,onChange:e=>{typeof e==`string`&&e&&n(e)},children:[(0,G.jsxs)(UP.Trigger,{className:`h-8 min-h-8 gap-1 rounded-[10px] border-0 bg-transparent px-2.5 shadow-none items-center hover:bg-surface-secondary/80 data-[focus-visible=true]:bg-surface-secondary/80 ${l}`,children:[(0,G.jsx)(UP.Value,{className:`min-w-0 truncate text-caption font-medium`,children:({defaultChildren:e,isPlaceholder:t})=>t||!c?e:(0,G.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1`,children:[c.icon?(0,G.jsx)(`span`,{className:`grid size-3.5 shrink-0 place-items-center opacity-80`,children:c.icon}):null,(0,G.jsx)(`span`,{className:`truncate`,children:c.label})]})}),(0,G.jsx)(UP.Indicator,{className:`size-2.5 opacity-50`})]}),(0,G.jsx)(UP.Popover,{placement:`top end`,className:`max-h-72 min-w-48`,children:(0,G.jsx)(yP,{children:a.map(e=>(0,G.jsxs)(yP.Item,{id:e.id,textValue:e.textValue,className:`gap-2`,children:[e.icon?(0,G.jsx)(`span`,{className:`grid size-5 shrink-0 place-items-center`,children:e.icon}):null,(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsx)(kM,{className:`block truncate text-caption`,children:e.label}),e.hint?(0,G.jsx)(`span`,{className:`block truncate text-caption text-muted`,children:e.hint}):null]}),(0,G.jsx)(yP.ItemIndicator,{})]},e.id))})})]})}function Owe({value:e,onChange:t,attachments:n,onAttachmentsChange:r,disabled:i,streaming:a,canSend:o,onSend:s,onStop:c,accountValue:l,onAccountChange:u,accountOptions:d,modelValue:f,onModelChange:p,modelOptions:m,modelsLoading:h}){let{t:g}=GF(),_=(0,v.useRef)(null);async function y(e){if(!e?.length)return;let t=[],i=[];for(let n of Array.from(e))try{let e=await Dwe(n);e?t.push(e):i.push(n.name)}catch{i.push(n.name)}t.length&&r([...n,...t]),i.length&&window.alert(g(`chatAttachUnsupported`,{names:i.join(`, `)})),_.current&&(_.current.value=``)}function b(e){e.key!==`Enter`||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),!a&&o&&s())}return(0,G.jsxs)(`div`,{className:`access-composer px-3 pb-3 pt-2.5 sm:px-4 sm:pb-3.5 sm:pt-3`,children:[(0,G.jsxs)(`div`,{className:`access-composer-well overflow-hidden rounded-2xl`,children:[n.length?(0,G.jsx)(`div`,{className:`flex flex-wrap gap-2 px-3 pt-3`,children:n.map(e=>(0,G.jsxs)(`span`,{className:`inline-flex max-w-[14rem] items-center gap-2 rounded-xl bg-surface/80 px-1.5 py-1.5 text-caption text-foreground`,children:[e.kind===`image`&&e.dataUrl?(0,G.jsx)(`img`,{src:e.dataUrl,alt:``,className:`size-8 shrink-0 rounded-lg object-cover`}):(0,G.jsx)(`span`,{className:`grid size-8 shrink-0 place-items-center rounded-lg bg-surface-secondary text-muted`,children:(0,G.jsx)(Qi,{size:14})}),(0,G.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,G.jsx)(`span`,{className:`block truncate font-medium`,children:e.name}),(0,G.jsx)(`span`,{className:`mono text-muted`,children:Ewe(e.size)})]}),(0,G.jsx)(`button`,{type:`button`,className:`grid size-6 shrink-0 place-items-center rounded-md text-muted hover:bg-surface-secondary hover:text-foreground`,"aria-label":g(`chatAttachRemove`),onClick:()=>r(n.filter(t=>t.id!==e.id)),children:(0,G.jsx)(yo,{size:12})})]},e.id))}):null,(0,G.jsx)(Vj,{fullWidth:!0,rows:3,className:`min-h-20 resize-none border-0 bg-transparent px-3.5 py-3 text-body leading-[1.65] shadow-none focus-visible:ring-0`,value:e,onChange:e=>t(e.target.value),onKeyDown:b,placeholder:g(`promptPlaceholder`),"aria-label":g(`prompt`),disabled:i||a}),(0,G.jsxs)(`div`,{className:`flex items-center gap-0.5 px-2 pb-2 pt-0.5`,children:[(0,G.jsx)(`input`,{ref:_,type:`file`,className:`hidden`,multiple:!0,accept:`.txt,.md,.json,.csv,.yml,.yaml,.toml,.xml,.html,.css,.js,.jsx,.ts,.tsx,.py,.go,.rs,.sh,.sql,.png,.jpg,.jpeg,.gif,.webp,text/*,image/png,image/jpeg,image/gif,image/webp,application/json`,onChange:e=>void y(e.target.files)}),(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,className:`size-8 min-w-8 shrink-0 rounded-[10px]`,"aria-label":g(`chatAttach`),isDisabled:i||a,onPress:()=>_.current?.click(),children:(0,G.jsx)(Ma,{size:15})}),(0,G.jsx)(`div`,{className:`min-w-0 flex-1`}),(0,G.jsx)(q7,{ariaLabel:g(`account`),value:l,onChange:u,options:d,isDisabled:i||a,tone:`muted`,className:`w-auto max-w-[8.5rem] min-w-0`}),(0,G.jsx)(q7,{ariaLabel:g(`model`),value:f,onChange:p,placeholder:g(h?`requesting`:`model`),options:m,isDisabled:i||a||h||!m.length,className:`w-auto max-w-[10.5rem] min-w-0`}),(0,G.jsxs)(`div`,{className:`relative size-8 shrink-0`,children:[(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`secondary`,className:`absolute inset-0 size-8 rounded-[10px] transition-opacity duration-200 ease-[cubic-bezier(0.2,0.7,0.2,1)] ${a?`opacity-100`:`pointer-events-none opacity-0`}`,"aria-label":g(`chatTryStop`),onPress:c,children:(0,G.jsx)(Xa,{size:14,weight:`fill`})}),(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,className:`absolute inset-0 size-8 rounded-[10px] transition-opacity duration-200 ease-[cubic-bezier(0.2,0.7,0.2,1)] ${a?`pointer-events-none opacity-0`:`opacity-100`}`,"aria-label":g(`chatTrySend`),isDisabled:!o||i||a,onPress:s,children:(0,G.jsx)(wa,{size:14,weight:`fill`})})]})]})]}),(0,G.jsx)(`p`,{className:`mt-1 px-1 text-caption leading-4 text-muted/65`,children:g(`chatTryHelper`)})]})}function kwe({collapsed:e,onCollapsedChange:t,items:n,activeId:r,onSelect:i,onNew:a}){let{t:o}=GF(),s=(0,v.useRef)(null);return(0,v.useEffect)(()=>{let t=s.current;!t||UB()||e||Z.fromTo(t,{autoAlpha:0},{autoAlpha:1,duration:BB.fast,ease:`power2.out`})},[e]),e?(0,G.jsxs)(`div`,{className:`access-hist-rail flex w-9 shrink-0 flex-col items-center gap-1 border-r py-2`,children:[(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,className:`size-8 min-w-8 rounded-[10px] text-muted`,"aria-label":o(`chatHistoryExpand`),onPress:()=>t(!1),children:(0,G.jsx)(Ra,{size:15})}),(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,className:`size-8 min-w-8 rounded-[10px] text-muted`,"aria-label":o(`chatHistoryNew`),onPress:a,children:(0,G.jsx)(Ma,{size:14})})]}):(0,G.jsxs)(`aside`,{ref:s,className:`access-hist-rail flex w-[13rem] shrink-0 flex-col border-r`,"aria-label":o(`chatHistoryTitle`),children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-1 px-2 py-2`,children:[(0,G.jsx)(`div`,{className:`min-w-0 flex-1 truncate px-1.5 text-caption font-medium text-muted`,children:o(`chatHistoryTitle`)}),(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,className:`size-8 min-w-8 rounded-[10px] text-muted`,"aria-label":o(`chatHistoryCollapse`),onPress:()=>t(!0),children:(0,G.jsx)(mi,{size:14})})]}),(0,G.jsx)(`div`,{className:`px-2 pb-1.5`,children:(0,G.jsxs)(J,{size:`sm`,variant:`ghost`,className:`h-8 w-full justify-start gap-1.5 rounded-[10px] px-2.5 text-caption font-medium text-muted hover:bg-[var(--sidebar-hover)] hover:text-foreground`,onPress:a,children:[(0,G.jsx)(Ma,{size:13}),o(`chatHistoryNew`)]})}),(0,G.jsx)(`div`,{className:`min-h-0 flex-1 space-y-0.5 overflow-y-auto px-1.5 pb-2.5`,children:n.length?n.map(e=>{let t=e.id===r;return(0,G.jsx)(`button`,{type:`button`,"data-active":t?`true`:void 0,className:`access-hist-item flex h-8 w-full items-center rounded-[10px] px-2.5 text-left text-caption leading-5 ${t?`font-medium text-foreground`:`font-normal text-muted`}`,onClick:()=>i(e.id),children:(0,G.jsx)(`span`,{className:`line-clamp-1 tracking-tight`,children:e.title||o(`chatHistoryUntitled`)})},e.id)}):(0,G.jsx)(`p`,{className:`px-2.5 py-6 text-center text-caption leading-5 text-muted/70`,children:o(`chatHistoryEmpty`)})})]})}function J7({latencyMs:e,ttfbMs:t,completionTokens:n,stream:r,labels:i,className:a=``,variant:o=`block`}){let s=ple(fle({completionTokens:n,latencyMs:e,ttfbMs:t,stream:r})),c=dV(t),l=dV(e);if(o===`inline`)return(0,G.jsxs)(`div`,{className:`mono text-caption leading-4 text-muted ${a}`.trim(),children:[(0,G.jsxs)(`span`,{children:[i.ttft,` `,c]}),(0,G.jsx)(`span`,{className:`mx-1.5 text-separator`,children:`·`}),(0,G.jsxs)(`span`,{children:[i.total,` `,l]}),(0,G.jsx)(`span`,{className:`mx-1.5 text-separator`,children:`·`}),(0,G.jsx)(`span`,{children:s})]});let u=[[i.ttft,c],[i.total,l],[i.tps,s]];return(0,G.jsxs)(`div`,{className:a,children:[i.heading?(0,G.jsx)(`div`,{className:`mb-1 text-caption font-medium text-muted`,children:i.heading}):null,(0,G.jsx)(`div`,{className:`border-l border-separator pl-2 leading-4`,children:u.map(([e,t])=>(0,G.jsxs)(`div`,{className:`flex items-baseline gap-2 py-px`,children:[(0,G.jsx)(`span`,{className:`shrink-0 text-caption text-muted`,children:e}),(0,G.jsx)(`span`,{className:`mono text-xs text-foreground`,children:t})]},e))})]})}function Awe({text:e,streaming:t,defaultOpen:n}){let{t:r}=GF(),[i,a]=(0,v.useState)(!!n),[o,s]=(0,v.useState)(0),c=(0,v.useRef)(0),l=(0,v.useRef)(null),u=(0,v.useRef)(null);if((0,v.useEffect)(()=>{t?a(!1):n!=null&&a(!!n)},[t,n]),(0,v.useEffect)(()=>{if(!t)return;let e=Date.now();s(0);let n=window.setInterval(()=>{let t=Math.floor((Date.now()-e)/1e3);s(t),c.current=t},250);return()=>window.clearInterval(n)},[t]),(0,v.useEffect)(()=>{!t&&o===0&&c.current>0&&s(c.current)},[t,o]),(0,v.useEffect)(()=>{let t=l.current,n=u.current;if(!t)return;let r=UB();if(!i||!e){if(r){t.style.height=`0px`,t.style.opacity=`0`;return}Z.to(t,{height:0,opacity:0,duration:BB.fast,ease:VB.inOut,overwrite:!0});return}let a=n?.scrollHeight??0;if(r){t.style.height=`auto`,t.style.opacity=`1`;return}Z.fromTo(t,{height:0,opacity:0},{height:a,opacity:1,duration:BB.base,ease:VB.out,overwrite:!0,onComplete:()=>{t.style.height=`auto`}})},[i,e]),!e&&!t)return null;let d=UB(),f=t?o:o||c.current;return(0,G.jsxs)(`div`,{className:`overflow-hidden rounded-xl`,children:[(0,G.jsx)(`button`,{type:`button`,className:`inline-flex max-w-full items-center gap-1.5 rounded-full bg-surface-secondary px-2.5 py-1 text-left text-caption text-muted`,"aria-expanded":i,onClick:()=>a(e=>!e),children:t?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Mi,{size:12,className:`shrink-0 text-muted ${d?``:`animate-spin`}`}),(0,G.jsx)(`span`,{className:d?``:`access-thinking-shimmer`,children:r(`thinkingWorking`)}),(0,G.jsxs)(`span`,{className:`mono text-muted/80`,children:[o,`s`]})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(gi,{size:11,className:`shrink-0 transition-transform duration-200 ease-out ${i?`rotate-90`:``}`}),(0,G.jsx)(`span`,{children:r(`thinkingDone`)}),f>0?(0,G.jsx)(`span`,{className:`mono text-muted/80`,children:r(`thinkingElapsed`,{n:f})}):null,!f&&e?(0,G.jsx)(`span`,{className:`mono text-muted/80`,children:r(`thinkingChars`,{count:e.length})}):null]})}),(0,G.jsx)(`div`,{ref:l,className:`overflow-hidden`,style:{height:0,opacity:0},children:e?(0,G.jsx)(`pre`,{ref:u,className:`mt-1.5 max-h-52 overflow-auto whitespace-pre-wrap break-words rounded-xl bg-surface-secondary/80 px-3 py-2 text-caption leading-5 text-muted`,children:e}):null})]})}function jwe(e,t){return t(e===`running`?`toolCallRunning`:e===`error`?`toolCallError`:`toolCallSuccess`)}function Mwe({status:e}){return e===`running`?(0,G.jsx)(Wa,{size:12,className:`animate-spin text-muted`}):e===`error`?(0,G.jsx)(ho,{size:12,weight:`fill`,className:`text-danger`}):(0,G.jsx)(Oi,{size:12,weight:`fill`,className:`text-success`})}function Nwe(e){if(!e.trim())return``;try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function Y7({call:e,forceOpen:t}){let{t:n}=GF(),[r,i]=(0,v.useState)(e.status===`error`||!!t),[a,o]=(0,v.useState)(!1),s=(0,v.useMemo)(()=>Nwe(e.arguments||``),[e.arguments]);(0,v.useEffect)(()=>{e.status===`error`&&i(!0)},[e.status]),(0,v.useEffect)(()=>{t&&i(!0)},[t]);async function c(){s&&(await U7(s),o(!0),window.setTimeout(()=>o(!1),1200))}return(0,G.jsxs)(`div`,{className:`overflow-hidden rounded-lg`,children:[(0,G.jsxs)(`button`,{type:`button`,className:`flex w-full items-center gap-2 px-2 py-1.5 text-left`,"aria-expanded":r,onClick:()=>i(e=>!e),children:[(0,G.jsx)(gi,{size:11,className:`shrink-0 text-muted transition-transform ${r?`rotate-90`:``}`}),(0,G.jsx)(`span`,{className:`mono min-w-0 flex-1 truncate text-caption font-medium text-foreground`,children:e.name||n(`toolCallUntitled`)}),(0,G.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1 text-caption text-muted`,children:[(0,G.jsx)(Mwe,{status:e.status}),jwe(e.status,n)]})]}),r?(0,G.jsxs)(`div`,{className:`space-y-1.5 px-2 pb-2`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,G.jsx)(`div`,{className:`text-caption font-medium text-muted`,children:n(`toolCallArgs`)}),(0,G.jsxs)(`button`,{type:`button`,className:`inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-caption text-muted hover:bg-surface-secondary hover:text-foreground`,onClick:e=>{e.stopPropagation(),c()},children:[(0,G.jsx)(Ri,{size:12}),n(a?`copied`:`copy`)]})]}),(0,G.jsx)(`pre`,{className:`mono max-h-40 overflow-auto whitespace-pre-wrap break-words rounded-lg bg-surface-secondary/80 px-2.5 py-2 text-caption leading-5 text-muted`,children:s||n(`toolCallArgsEmpty`)})]}):null]})}function Pwe({calls:e}){let{t}=GF(),n=e.some(e=>e.status===`error`),r=e.some(e=>e.status===`running`),[i,a]=(0,v.useState)(n||r||e.length===1);return(0,v.useEffect)(()=>{(n||r)&&a(!0)},[n,r]),e.length?e.length===1?(0,G.jsx)(`div`,{className:`rounded-xl bg-surface-secondary/70`,children:(0,G.jsx)(Y7,{call:e[0],forceOpen:e[0].status===`error`})}):(0,G.jsxs)(`div`,{className:`overflow-hidden rounded-xl bg-surface-secondary/70`,children:[(0,G.jsxs)(`button`,{type:`button`,className:`flex w-full items-center gap-2 px-2.5 py-1.5 text-left text-caption text-muted`,"aria-expanded":i,onClick:()=>a(e=>!e),children:[(0,G.jsx)(gi,{size:11,className:`shrink-0 transition-transform ${i?`rotate-90`:``}`}),(0,G.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-medium text-foreground`,children:t(`toolCallGroup`,{n:e.length})}),r?(0,G.jsx)(Wa,{size:12,className:`animate-spin`}):null]}),i?(0,G.jsx)(`div`,{className:`space-y-0.5 border-t border-separator/40 px-0.5 py-1`,children:e.map(e=>(0,G.jsx)(Y7,{call:e},`${e.index}-${e.id||e.name}`))}):null]}):null}function Fwe({message:e}){return e.attachments?.length?(0,G.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:e.attachments.map(e=>(0,G.jsxs)(`span`,{className:`inline-flex max-w-[12rem] items-center gap-1.5 rounded-xl bg-surface/70 px-1.5 py-1 text-caption text-muted`,children:[e.kind===`image`&&e.dataUrl?(0,G.jsx)(`img`,{src:e.dataUrl,alt:``,className:`size-7 shrink-0 rounded-lg object-cover`}):(0,G.jsx)(`span`,{className:`grid size-7 shrink-0 place-items-center rounded-lg bg-surface`,children:(0,G.jsx)(Qi,{size:12})}),(0,G.jsx)(`span`,{className:`truncate`,children:e.name})]},e.id))}):null}function Iwe({message:e}){let{t}=GF(),n=e.usage;if(!n||n.credits==null)return null;let r=n.prompt_tokens,i=n.completion_tokens,a=typeof r==`number`||typeof i==`number`?t(`chatTryUsageTokens`,{prompt:uV(r??0),completion:uV(i??0)}):``;return(0,G.jsx)(`span`,{className:`mono text-caption text-muted`,children:a?t(`chatTryUsageFoot`,{tokens:a,amount:yV(n.credits)}):t(`chatTryCreditsUsed`,{amount:yV(n.credits)})})}function Lwe({text:e,streaming:t}){let n=e.split(/(\n{2,})/),r=-1;for(let e=n.length-1;e>=0;--e)if(n[e]&&!/^\n{2,}$/.test(n[e])){r=e;break}return(0,G.jsx)(`div`,{className:`whitespace-pre-wrap break-words text-body leading-[1.65] text-foreground ${t?`access-streaming`:``}`,children:n.map((e,n)=>e?/^\n{2,}$/.test(e)?(0,G.jsx)(`span`,{children:e},`s-${n}`):(0,G.jsx)(`span`,{className:t&&n===r?`access-stream-seg`:void 0,children:e},`p-${n}`):null)})}function Rwe(){let e=(0,v.useRef)(null);return(0,v.useEffect)(()=>{let t=e.current;!t||UB()||Z.from(t,{autoAlpha:0,duration:BB.fast,ease:`power2.out`})},[]),e}function zwe({message:e}){let{t}=GF(),[n,r]=(0,v.useState)(!1),i=e.role===`user`,a=Rwe();if(i)return(0,G.jsx)(`div`,{ref:a,className:`ml-auto max-w-[92%] sm:max-w-[78%]`,children:(0,G.jsxs)(`div`,{className:`access-bubble access-bubble--user rounded-2xl rounded-br-md px-3.5 py-2.5`,children:[e.content?(0,G.jsx)(`div`,{className:`whitespace-pre-wrap break-words text-body leading-[1.65] text-foreground`,children:e.content}):null,(0,G.jsx)(Fwe,{message:e})]})});let o=e.status===`streaming`&&!e.content&&!e.reasoning&&!e.toolCalls?.length,s=!!e.content&&e.status===`done`,c=e.status===`streaming`,l=!!(e.usage&&e.usage.credits!=null),u=e.status===`done`&&(e.latency_ms!=null||e.ttfb_ms!=null||typeof e.usage?.completion_tokens==`number`);async function d(){e.content&&(await U7(e.content),r(!0),window.setTimeout(()=>r(!1),1200))}return(0,G.jsxs)(`div`,{className:`group/access-msg max-w-[96%] space-y-1.5 sm:max-w-[88%]`,children:[(0,G.jsx)(`div`,{className:`flex items-center gap-1.5 px-0.5`,children:(0,G.jsx)(`span`,{className:`grid size-5 shrink-0 place-items-center rounded-lg border border-border bg-surface-secondary`,children:(0,G.jsx)(WV,{provider:e.provider,size:13})})}),e.reasoning||c?(0,G.jsx)(Awe,{text:e.reasoning||``,streaming:c&&(!e.content||!!e.reasoning),defaultOpen:e.reasoningOpen}):null,e.toolCalls?.length?(0,G.jsx)(Pwe,{calls:e.toolCalls}):null,e.status===`error`?(0,G.jsx)(vI,{status:`danger`,title:t(`requestFailed`),description:e.error||``}):o?(0,G.jsxs)(`div`,{className:`space-y-2 pt-0.5`,children:[(0,G.jsx)(tA,{className:`h-3 w-28 rounded-md`}),(0,G.jsx)(tA,{className:`h-3 w-full rounded-md`}),(0,G.jsx)(tA,{className:`h-3 w-[86%] rounded-md`}),(0,G.jsx)(tA,{className:`h-3 w-[68%] rounded-md`})]}):e.content?(0,G.jsx)(`div`,{className:`access-bubble access-bubble--assistant px-0.5 py-0`,children:(0,G.jsx)(Lwe,{text:e.content,streaming:c})}):null,s||l||u?(0,G.jsxs)(`div`,{className:`access-msg-foot space-y-1 px-0.5 pt-0.5`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1`,children:[s?(0,G.jsxs)(J,{size:`sm`,variant:`ghost`,className:`h-5 min-h-5 gap-1 px-1.5 text-caption text-muted/80`,onPress:()=>void d(),children:[(0,G.jsx)(H7,{copied:n,size:12}),t(n?`copied`:`copy`)]}):null,(0,G.jsx)(Iwe,{message:e})]}),u?(0,G.jsx)(J7,{variant:`inline`,latencyMs:e.latency_ms,ttfbMs:e.ttfb_ms,completionTokens:e.usage?.completion_tokens,stream:!0,className:`access-latency-inline max-h-0 overflow-hidden opacity-0 transition-[opacity,max-height] duration-200 ease-[cubic-bezier(0.2,0.7,0.2,1)] group-hover/access-msg:max-h-5 group-hover/access-msg:opacity-100 focus-within:max-h-5 focus-within:opacity-100`,labels:{ttft:t(`logsColTTFT`),total:t(`logsLatencyTotal`),tps:t(`logsOutputTPS`)}}):null]}):null]})}function Bwe({messages:e,busy:t,onLoadDemo:n}){let{t:r}=GF(),i=(0,v.useRef)(null);(0,v.useEffect)(()=>{i.current?.scrollIntoView({block:`end`})},[e,t]);let a=!e.length;return(0,G.jsxs)(`div`,{className:`access-thread min-h-0 flex-1 overflow-y-auto px-4 sm:px-6 ${a?`py-5 sm:py-6`:`pb-2 pt-4 sm:pb-2.5 sm:pt-5`}`,"aria-live":`polite`,"aria-busy":t,children:[a?(0,G.jsx)(O7,{className:`min-h-56`,icon:(0,G.jsx)(wi,{size:22}),title:r(`chatTryEmptyTitle`),hint:r(`chatTryEmptyHint`),action:n?(0,G.jsx)(`button`,{type:`button`,className:`inline-flex h-8 items-center rounded-[10px] px-2.5 text-caption font-medium text-muted transition-colors hover:bg-[var(--sidebar-hover)] hover:text-foreground`,onClick:n,children:r(`chatDemoLoad`)}):void 0}):(0,G.jsx)(`div`,{className:`space-y-4`,children:e.map(e=>(0,G.jsx)(zwe,{message:e},e.id))}),(0,G.jsx)(`div`,{ref:i})]})}function Vwe({format:e,onFormatChange:t,requestPath:n,prompt:r,onPromptChange:i,onTest:a,requestState:o,elapsedMs:s,output:c,responseStatus:l,curl:u,copiedCurl:d,onCopyCurl:f,canSend:p,accountValue:m,onAccountChange:h,accountOptions:g,modelValue:_,onModelChange:v,modelOptions:y,modelsLoading:b,disabled:x}){let{t:S}=GF();return(0,G.jsxs)(`div`,{className:`space-y-4`,children:[(0,G.jsx)(`p`,{className:`px-1 text-caption leading-5 text-muted`,children:S(`rawFormatHint`)}),(0,G.jsx)(`div`,{className:`access-raw-panel overflow-hidden rounded-2xl`,children:(0,G.jsxs)(`div`,{className:`grid xl:grid-cols-[minmax(420px,.92fr)_minmax(0,1.08fr)]`,children:[(0,G.jsxs)(`div`,{className:`xl:border-r xl:border-[color-mix(in_oklab,var(--foreground)_6%,transparent)]`,children:[(0,G.jsxs)(`div`,{className:`px-4 py-3.5 sm:px-5`,children:[(0,G.jsx)(`h3`,{className:`text-body font-semibold`,children:S(`requestBuilder`)}),(0,G.jsxs)(`p`,{className:`mt-0.5 text-caption text-muted`,children:[`POST `,n]})]}),(0,G.jsxs)(`div`,{className:`space-y-4 px-4 pb-4 sm:px-5 sm:pb-5`,children:[(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsx)(`div`,{className:`text-caption font-medium text-muted`,children:S(`rawFormatLabel`)}),(0,G.jsx)(wV,{className:`access-format-chips`,ariaLabel:S(`rawFormatLabel`),value:e,onChange:e=>t(e),options:[{id:`chat`,label:S(`rawFormatChat`)},{id:`messages`,label:S(`rawFormatMessages`)},{id:`responses`,label:S(`rawFormatResponses`)}]})]}),(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1`,children:[(0,G.jsx)(q7,{ariaLabel:S(`account`),value:m,onChange:h,options:g,isDisabled:x||o===`loading`,tone:`muted`,className:`w-auto max-w-[8.5rem] min-w-0`}),(0,G.jsx)(q7,{ariaLabel:S(`model`),value:_,onChange:v,placeholder:S(b?`requesting`:`model`),options:y,isDisabled:x||o===`loading`||b||!y.length,className:`w-auto max-w-[10.5rem] min-w-0`})]}),(0,G.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,G.jsx)(`div`,{className:`text-caption font-medium text-muted`,children:S(`prompt`)}),(0,G.jsx)(`span`,{className:`mono text-caption text-muted`,children:r.length})]}),(0,G.jsx)(Vj,{fullWidth:!0,rows:9,className:`min-h-52 resize-y rounded-xl border-0 bg-[var(--field-background)] px-3.5 py-3 text-body leading-[1.65] shadow-[inset_0_0_0_1px_color-mix(in_oklab,var(--field-border)_78%,var(--foreground))] focus-visible:ring-0`,value:r,onChange:e=>i(e.target.value),placeholder:S(`promptPlaceholder`),"aria-label":S(`prompt`),disabled:x||o===`loading`}),(0,G.jsx)(`p`,{className:`text-caption leading-5 text-muted/70`,children:S(`promptHelper`)})]}),(0,G.jsxs)(J,{fullWidth:!0,isPending:o===`loading`,isDisabled:!p||x,onPress:a,children:[(0,G.jsx)(wa,{size:15}),S(o===`loading`?`requesting`:`sendRequest`)]})]})]}),(0,G.jsxs)(`div`,{className:`access-raw-panel__inspector flex min-h-[440px] min-w-0 flex-col`,"aria-live":`polite`,"aria-busy":o===`loading`,children:[(0,G.jsxs)(`div`,{className:`flex min-h-12 items-center justify-between gap-4 px-4 py-3 sm:px-5`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`text-body font-semibold`,children:S(`responseInspector`)}),(0,G.jsx)(`p`,{className:`mt-0.5 text-caption text-muted`,children:S(`responseInspectorHint`)})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s===null?null:(0,G.jsxs)(`span`,{className:`mono flex items-center gap-1.5 text-caption text-muted`,children:[(0,G.jsx)(Pi,{size:12}),s,` ms`]}),(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:o===`success`?`success`:o===`error`?`danger`:void 0,children:l})]})]}),(0,G.jsx)(`div`,{className:`min-h-0 flex-1 px-4 pb-4 sm:px-5 sm:pb-5`,children:o===`idle`?(0,G.jsx)(O7,{className:`min-h-64`,title:S(`responseEmptyTitle`),hint:S(`responseEmptyHint`)}):o===`loading`?(0,G.jsxs)(`div`,{className:`space-y-3 pt-1`,children:[(0,G.jsx)(tA,{className:`h-3 w-32 rounded-lg`}),(0,G.jsx)(tA,{className:`h-3 w-full rounded-lg`}),(0,G.jsx)(tA,{className:`h-3 w-[88%] rounded-lg`}),(0,G.jsx)(tA,{className:`h-3 w-[72%] rounded-lg`}),(0,G.jsx)(tA,{className:`mt-7 h-3 w-[92%] rounded-lg`}),(0,G.jsx)(tA,{className:`h-3 w-[64%] rounded-lg`})]}):o===`error`?(0,G.jsx)(`div`,{className:`space-y-3`,children:(0,G.jsx)(vI,{status:`danger`,title:S(`requestFailed`),description:c})}):(0,G.jsxs)(`div`,{children:[(0,G.jsxs)(`div`,{className:`mb-3 flex items-center gap-2 text-caption font-medium text-success`,children:[(0,G.jsx)(Oi,{size:14,weight:`fill`}),S(`responseReceived`)]}),(0,G.jsx)(`pre`,{className:`mono overflow-x-auto whitespace-pre-wrap break-words text-caption leading-6 text-muted`,children:c})]})})]})]})}),(0,G.jsxs)(`section`,{className:`access-raw-panel overflow-hidden rounded-2xl`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-4 px-4 py-3 sm:px-5`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(`div`,{className:`text-body font-semibold`,children:S(`curlExample`)}),(0,G.jsx)(`div`,{className:`mt-0.5 truncate text-caption text-muted`,children:S(`curlGeneratedHint`)})]}),(0,G.jsxs)(J,{size:`sm`,variant:`ghost`,onPress:f,children:[(0,G.jsx)(H7,{copied:d}),S(d?`copied`:`copy`)]})]}),(0,G.jsx)(`pre`,{className:`mono max-h-72 overflow-auto whitespace-pre-wrap px-4 pb-4 text-caption leading-6 text-muted sm:px-5 sm:pb-5`,children:u})]})]})}function X7(e,t){let n=t.filter(e=>e.kind===`text`),r=t.filter(e=>e.kind===`image`&&e.dataUrl),i=e.trim();for(let e of n){let t=e.text??``;i=`${i}${i?` `:``}--- file: ${e.name} ---\n${t}`}if(!r.length)return i;let a=[];i&&a.push({type:`text`,text:i});for(let e of r)a.push({type:`image_url`,image_url:{url:e.dataUrl}});return a}function Hwe(e,t){let n=[];for(let t of e)if(!(t.status===`error`&&t.role===`assistant`&&!t.content)){if(t.role===`user`){n.push({role:`user`,content:X7(t.content,t.attachments||[])});continue}t.content&&n.push({role:`assistant`,content:t.content})}return[...n,t]}var Uwe=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFUlEQVR42mNkYPhfz0AEYBxVSF+FABJADveWkH6aAAAAAElFTkSuQmCC`;function Z7(){return[{id:`demo-user-1`,role:`user`,content:`Summarize the attached screenshot and look up the endpoint.`,attachments:[{id:`demo-img-1`,name:`screenshot.png`,mime:`image/png`,kind:`image`,dataUrl:Uwe,size:2048},{id:`demo-txt-1`,name:`notes.md`,mime:`text/markdown`,kind:`text`,text:`# notes placeholder`,size:128}],status:`done`},{id:`demo-assistant-1`,role:`assistant`,provider:`workbuddy`,content:`The screenshot shows the Access playground. I looked up the chat completions route and drafted a short summary below.`,reasoning:`User attached a UI screenshot and a notes file. @@ -165,4 +165,4 @@ Keep the reply short and ops-console toned.`,toolCalls:[{index:0,id:`call_demo_l -H "Authorization: Bearer $CLI2API_API_KEY" \\ -H ${Q7(`Content-Type: application/json`)}${oe?` \\ -H ${Q7(`X-Qoder-Account: ${oe}`)}`:``} \\ - -d ${Q7(JSON.stringify(me))}`,[me,T,oe]);if(n&&!t)return(0,G.jsx)(Vce,{});async function ge(e,t){await U7(e),ae(t),window.setTimeout(()=>ae(``),1100)}async function _e(){let e=performance.now();te(`loading`),re(null),H(``);try{let e=await sse(w,me,oe||void 0);H(JSON.stringify(e,null,2)),te(`success`)}catch(e){H(e instanceof Error?e.message:String(e)),te(`error`)}finally{re(Math.round(performance.now()-e))}}function ve(){B.current?.abort(),B.current=null}function ye(e){let t=p;u(n=>n.map(n=>{if(n.id!==t)return n;let r=typeof e==`function`?e(n.messages):e;return{...n,messages:r,title:t9(r)||n.title,updatedAt:Date.now()}}))}function be(e,t){ye(n=>n.map(n=>{if(n.id!==e)return n;let r=typeof t==`function`?t(n):t;return{...n,...r}}))}async function xe(){let e=P.trim();if(!e&&!I.length||!fe||le||R===`loading`)return;ve();let t=new AbortController;B.current=t;let n=I,r={id:$7(`user`),role:`user`,content:e,attachments:n,status:`done`},i=$7(`assistant`),a={id:i,role:`assistant`,provider:_.find(e=>e.id===oe)?.provider||ce.find(e=>e.id===fe)?.provider||``,content:``,status:`streaming`},o=m;ye([...o,r,a]),F(``),L([]),z(`loading`);let s=Hwe(o,{role:`user`,content:X7(e,n)}),c=performance.now(),l=null,u=()=>{l??=performance.now()},d=()=>{let e=performance.now();return{latency_ms:Math.max(0,Math.round(e-c)),ttfb_ms:l==null?void 0:Math.max(0,Math.round(l-c))}};try{await use(fe,s,oe||void 0,{signal:t.signal,onContent:(e,t)=>{e&&u(),be(i,{content:t})},onReasoning:(e,t)=>{e&&u(),be(i,{reasoning:t})},onToolCalls:e=>{u(),be(i,{toolCalls:Gwe(e,!0)})},onUsage:e=>be(i,{usage:e})}),be(i,e=>({status:`done`,...d(),toolCalls:e.toolCalls?.map(e=>({...e,status:`success`}))})),z(`success`)}catch(e){if(t.signal.aborted){be(i,e=>({status:`done`,...d(),toolCalls:e.toolCalls?.map(e=>({...e,status:`success`}))})),z(`success`);return}be(i,{status:`error`,error:e instanceof Error?e.message:String(e),...d()}),z(`error`)}finally{B.current===t&&(B.current=null)}}let Se=e(ee===`success`?`requestComplete`:ee===`error`?`requestFailed`:ee===`loading`?`requesting`:`requestIdle`),Ce=e9()!=null,we=[{id:`auto`,textValue:e(`autoAccount`),label:e(`autoAccount`),icon:(0,G.jsx)(oi,{size:14,className:`text-muted`})},..._.map(t=>({id:t.id,textValue:`${t.name||t.id} ${UV(t.provider,t.region,e)}`,label:t.name||t.id,hint:UV(t.provider,t.region,e),icon:(0,G.jsx)(WV,{provider:t.provider,size:14})}))],Te=_.length||!Ce?we:[{id:`auto`,textValue:e(`autoAccount`),label:e(`autoAccount`),icon:(0,G.jsx)(oi,{size:14,className:`text-muted`})},{id:`demo-wb`,textValue:`wb-demo WorkBuddy`,label:`wb-demo`,hint:`WorkBuddy`}],Ee=ce.map(t=>{let n=mV(t),r=hV(t),i=t.display_name||t.id,a=r?e(`modelFree`):n,o=t.provider||t.owned_by||``;return{id:t.id,textValue:`${i} ${t.id} ${o} ${n} ${r?`free`:``}`,label:a?`${i} ${a}`:i,hint:[t.id,o,a].filter(Boolean).join(` · `)}}),De=Ee.length||!Ce?Ee:r9.map(t=>{let n=mV(t),r=hV(t),i=t.display_name||t.id,a=r?e(`modelFree`):n;return{id:t.id,textValue:`${i} ${t.id} ${t.provider} ${n} ${r?`free`:``}`,label:a?`${i} ${a}`:i,hint:[t.id,t.provider,a].filter(Boolean).join(` · `)}}),Oe=!!((P.trim()||I.length)&&fe&&!le&&(_.length||Ce));function ke(){ye(Z7()),z(`idle`)}function Ae(){ve(),z(`idle`),F(``),L([]);let e=n9([]);u(t=>[e,...t]),f(e.id)}function je(e){e!==p&&(ve(),z(`idle`),F(``),L([]),f(e))}let Me=l.slice().sort((e,t)=>t.updatedAt-e.updatedAt).map(t=>({id:t.id,title:t.title||e(`chatHistoryUntitled`),updatedAt:t.updatedAt}));return(0,G.jsxs)(`div`,{className:`access-page space-y-4`,children:[(0,G.jsxs)(`section`,{className:`access-info-row flex flex-wrap items-center gap-x-3 gap-y-2 px-0.5 py-0.5`,title:e(`apiPlaygroundHint`),children:[(0,G.jsx)(`h2`,{className:`shrink-0 text-body font-semibold text-foreground`,children:e(`apiPlayground`)}),(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1.5 text-caption text-muted`,children:[(0,G.jsx)(`span`,{className:`shrink-0`,children:e(`baseUrl`)}),(0,G.jsx)(`code`,{className:`mono min-w-0 truncate font-medium text-foreground`,children:b}),(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,className:`size-6 min-w-6 shrink-0`,"aria-label":e(`copyBaseUrl`),onPress:()=>void ge(b,`base`),children:(0,G.jsx)(H7,{copied:ie===`base`,size:13})})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2 text-caption text-muted`,children:[(0,G.jsx)(`span`,{className:`status-dot`,"data-state":pe.length?`ok`:void 0}),(0,G.jsx)(`span`,{children:e(`readyAccounts`,{ready:pe.length,total:_.length})}),(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:pe.length?`success`:`warning`,children:pe.length?e(`endpointReady`):e(`degraded`)})]})]}),_.length?null:(0,G.jsxs)(`div`,{className:`space-y-1 px-1`,children:[(0,G.jsx)(`p`,{className:`text-caption text-muted`,children:e(`noAccountsForTest`)}),(0,G.jsx)(K7,{})]}),ue?(0,G.jsx)(`p`,{className:`px-1 text-caption text-danger`,children:ue}):null,(0,G.jsxs)(EA,{selectedKey:r,onSelectionChange:e=>i(String(e)),children:[(0,G.jsx)(EA.ListContainer,{className:`w-fit`,children:(0,G.jsxs)(EA.List,{"aria-label":e(`accessTabsLabel`),children:[(0,G.jsxs)(TA,{id:`chat`,className:`gap-1.5 whitespace-nowrap`,children:[(0,G.jsx)(EA.Indicator,{className:`transition-none`}),e(`accessTabChat`)]}),(0,G.jsxs)(TA,{id:`raw`,className:`gap-1.5 whitespace-nowrap`,children:[(0,G.jsx)(EA.Indicator,{className:`transition-none`}),e(`accessTabApi`)]})]})}),(0,G.jsx)(EA.Panel,{id:`chat`,className:`pt-4`,children:(0,G.jsxs)(`div`,{className:`flex min-h-[640px] md:min-h-[72vh]`,children:[(0,G.jsx)(kwe,{collapsed:s,onCollapsedChange:c,items:Me,activeId:p,onSelect:je,onNew:Ae}),(0,G.jsxs)(`div`,{className:`access-chat-stage flex min-w-0 flex-1 flex-col`,children:[(0,G.jsx)(Bwe,{messages:m,busy:R===`loading`,onLoadDemo:ke}),(0,G.jsx)(Owe,{value:P,onChange:F,attachments:I,onAttachmentsChange:L,disabled:!_.length&&e9()==null,streaming:R===`loading`,canSend:Oe,onSend:()=>void xe(),onStop:ve,accountValue:oe||`auto`,onAccountChange:e=>k(e===`auto`?``:e),accountOptions:Te,modelValue:fe,onModelChange:D,modelOptions:De,modelsLoading:le})]})]})}),(0,G.jsxs)(EA.Panel,{id:`raw`,className:`space-y-4 pt-4`,children:[(0,G.jsx)(Vwe,{format:a,onFormatChange:o,requestPath:w,prompt:M,onPromptChange:N,onTest:()=>void _e(),requestState:ee,elapsedMs:ne,output:V,responseStatus:Se,curl:he,copiedCurl:ie===`curl`,onCopyCurl:()=>void ge(he,`curl`),canSend:!!(M.trim()&&fe&&!le),accountValue:oe||`auto`,onAccountChange:e=>k(e===`auto`?``:e),accountOptions:Te,modelValue:fe,onModelChange:D,modelOptions:De,modelsLoading:le,disabled:!_.length&&e9()==null}),(0,G.jsx)(xwe,{access:t?.access})]})]})]})}function Jwe(e){(0,v.useLayoutEffect)(()=>{let t=e.current;if(!t)return;let n=Z.context(()=>{Z.matchMedia().add(`(prefers-reduced-motion: no-preference)`,()=>{let e=Z.utils.toArray(`.meter__fill`);e.length&&Z.from(e,{scaleX:0,transformOrigin:`left center`,duration:BB.calm,ease:VB.emphasized,stagger:HB.base,clearProps:`transform,transformOrigin`})})},t);return()=>n.revert()},[e])}function i9(e){if(!e)return``;let t=Date.parse(e)-Date.now();if(!Number.isFinite(t)||t<=0)return``;let n=Math.ceil(t/1e3);return n<60?`${n}s`:`${Math.ceil(n/60)}m`}function Ywe(e){return Object.entries(e.model_cooldowns??{}).filter(([,e])=>!!i9(e)).sort(([e],[t])=>e.localeCompare(t))}function a9(e){return e.enabled?e.status===`quota_exhausted`||e.quota?.exceeded?`quota_exhausted`:e.status===`cooling`||i9(e.down_until||e.cooldown_until)?`cooling`:e.status===`dead`||e.runtime_state===`dead`?`dead`:e.status===`auth_failed`||e.runtime_state===`auth_failed`?`auth_failed`:e.status===`login_required`?`login`:(e.status===`starting`||e.runtime_state===`starting`)&&!e.hot&&!e.ready?e.quota?`starting`:`loading`:e.status===`ready`?e.hot?`hot`:`ready`:e.hot?`hot`:e.ready?`ready`:(e.status===`error`||e.status,`unavailable`):`disabled`}function o9(e,t){let n=e.last_checkin_status;if(n!==`success`&&n!==`already`||!e.last_checkin_at)return!1;let r=new Date(e.last_checkin_at);if(Number.isNaN(r.getTime()))return!1;let i=e=>new Intl.DateTimeFormat(`en-CA`,{timeZone:t||void 0,year:`numeric`,month:`2-digit`,day:`2-digit`}).format(e);return i(r)===i(new Date)}function Xwe(e){return e===`hot`?12:e===`ready`?9:e===`cooling`?5:e===`login`?3:e===`loading`||e===`starting`?6:e===`unavailable`?2:e===`auth_failed`?3:e===`dead`?2:1}function Zwe(e){return e===`hot`||e===`ready`?`ok`:e===`cooling`||e===`quota_exhausted`||e===`loading`||e===`starting`?`warn`:e===`auth_failed`||e===`unavailable`||e===`dead`||e===`login`?`danger`:`muted`}function s9(e){return e==null||!Number.isFinite(e)?`—`:Math.abs(e)>=1e3?`${(e/1e3).toFixed(e%1e3==0?0:1)}k`:String(Math.round(e*100)/100)}function c9(e){let t=e.percentage??0;return Number.isFinite(t)?Math.min(1,Math.max(0,t/100)):0}function l9(e){let t=e.percentage??0;return e.exceeded?`danger`:t>=80?`warn`:`ok`}function Qwe(e){return(e.windows??[]).filter(e=>!!e.id)}var $we={free:`Free`,go:`Go`,plus:`Plus`,pro:`Pro`,pro_plus:`Pro+`,proplus:`Pro+`,prolite:`Pro Lite`,promax:`Pro Max`,team:`Team`,business:`Business`,enterprise:`Enterprise`,power:`Power`,edu:`Edu`,edu_plus:`Edu Plus`,edu_pro:`Edu Pro`,education:`Education`};function eTe(e){let t=e?.trim().toLowerCase()??``;return!t||t===`unknown`||t===`guest`?``:$we[t]??t.replace(/[_-]+/g,` `).replace(/\bplus\b/gi,`+`).replace(/\s+\+/g,`+`).replace(/\b\w/g,e=>e.toUpperCase())}function tTe(e,t){return e.id===`daily`?t(`quotaDaily`):e.id===`weekly`?t(`quotaWeekly`):e.id===`monthly`?t(`quotaMonthly`):e.id===`fiveHour`?t(`quotaFiveHour`):e.id===`weeklyLimit`?t(`quotaWeeklyLimit`):e.id===`monthlyLimit`?t(`quotaMonthlyLimit`):e.label||t(`quota`)}function nTe(e,t){if(!e)return``;let n=Date.parse(e)-Date.now();if(!Number.isFinite(n)||n<=0)return t(`quotaResetsSoon`);let r=Math.max(1,Math.ceil(n/6e4));return r<60?t(`quotaResetsInMinutes`,{n:r}):t(`quotaResetsInHours`,{n:Math.round(r/60)})}function rTe(e,t){if(!e.expires_at||e.expires_at<=0||!Number.isFinite(e.expires_at))return``;let n=new Date(e.expires_at*1e3);if(Number.isNaN(n.getTime()))return``;let r=`${n.getFullYear()}/${n.getMonth()+1}/${n.getDate()}`;return t(`quotaExpiresOn`,{amount:e.expiring_remain&&e.expiring_remain>0?`${s9(e.expiring_remain)} `:``,unit:e.unit||`credits`,date:r})}function iTe(e,t,n,r,i,a){return[e.has_add_on&&e.add_on_available!==!1?`${n} ${s9(e.add_on_used)} / ${s9(e.add_on_total)} ${e.add_on_unit||`credits`}`:``,e.has_resource_package&&e.resource_package_available!==!1?`${r} ${t} ${s9(e.resource_package_remaining)} ${e.resource_package_unit||`credits`}`:``,a===`workbuddy`?rTe(e,i):``].filter(Boolean)}function aTe({window:e,t,extra:n}){let r=Math.round(e.percentage??0),i=tTe(e,t),a=t(`quotaUsedPercent`,{n:r}),o=nTe(e.reset_at,t),s=`${i} · ${a}${o?` · ${o}`:``}`,c=c9(e),l=l9(e),u=l===`danger`?`danger`:l===`warn`?`warning`:`success`;return(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{className:`block w-full min-w-0`,children:(0,G.jsxs)(`div`,{className:`w-full min-w-0 cursor-help`,children:[(0,G.jsxs)(YP,{className:`account-meter account-meter--window w-full`,color:u,size:`md`,minValue:0,maxValue:100,value:Math.round(c*100),"aria-label":i,valueLabel:s,children:[(0,G.jsxs)(YP.Output,{className:`flex w-full items-baseline justify-between gap-3 text-caption`,children:[(0,G.jsx)(`span`,{className:`min-w-0 truncate font-medium text-foreground`,children:i}),(0,G.jsx)(`span`,{className:`mono shrink-0 text-foreground/70`,children:a})]}),(0,G.jsx)(YP.Track,{children:(0,G.jsx)(YP.Fill,{})})]}),o?(0,G.jsx)(`div`,{className:`mt-1 text-caption leading-4 text-muted`,children:o}):null]})}),(0,G.jsx)(Aj.Content,{children:(0,G.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,G.jsx)(`div`,{children:s}),n?.map(e=>(0,G.jsx)(`div`,{children:e},e))]})})]})}function oTe({quota:e,t,label:n,usedLabel:r,remainingLabel:i,addOnLabel:a,resourcePackageLabel:o,exceededLabel:s,provider:c}){let l=e.unit||`credits`,u=`${s9(e.used)} / ${s9(e.total)}`,d=`${s9(e.remaining)}`,f=iTe(e,i,a,o,t,c),p=Qwe(e),m=c===`codex`||c===`kiro`?eTe(e.plan):``,h=c9(e),g=l9(e),_=g===`danger`?`danger`:g===`warn`?`warning`:`success`,y=(0,v.useRef)(null);Jwe(y);let b=`${r} ${u} ${l} · ${i} ${d} ${l}${f.length?` · ${f.join(` · `)}`:``}`;return p.length>0?(0,G.jsxs)(`div`,{ref:y,className:`account-quota-windows flex w-full min-w-0 flex-col gap-3`,children:[m?(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3 text-caption`,children:[(0,G.jsx)(`span`,{className:`text-muted`,children:t(`quotaPlan`)}),(0,G.jsx)(`span`,{className:`font-medium text-foreground`,children:m})]}):null,p.map((e,n)=>(0,G.jsx)(`div`,{className:`w-full min-w-0`,children:(0,G.jsx)(aTe,{window:e,t,extra:n===0?f:void 0})},e.id||String(n)))]}):(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(`div`,{ref:y,className:`w-full cursor-help`,children:(0,G.jsxs)(YP,{className:`account-meter w-full`,color:_,size:`md`,minValue:0,maxValue:100,value:Math.round(h*100),"aria-label":n,valueLabel:b,children:[(0,G.jsxs)(YP.Output,{className:`flex w-full items-baseline justify-between text-caption`,children:[(0,G.jsxs)(`span`,{className:`text-body font-semibold leading-5 text-foreground tabular-nums`,children:[e.exceeded?(0,G.jsx)(`span`,{className:`mr-1.5 text-danger`,children:s}):null,d,(0,G.jsx)(`span`,{className:`ml-1 text-caption font-normal text-foreground/60`,children:l})]}),(0,G.jsxs)(`span`,{className:`mono text-foreground/55`,children:[r,` `,u]})]}),(0,G.jsx)(YP.Track,{children:(0,G.jsx)(YP.Fill,{})})]})})}),(0,G.jsx)(Aj.Content,{children:(0,G.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,G.jsxs)(`div`,{children:[r,` `,u,` `,l]}),(0,G.jsxs)(`div`,{children:[i,` `,d,` `,l]}),f.map(e=>(0,G.jsx)(`div`,{children:e},e))]})})]})}function sTe({state:e,stateCopy:t,t:n}){let r=(0,v.useRef)(null),i=Xwe(e),a=Zwe(e);return(0,v.useLayoutEffect)(()=>{let e=r.current;if(!e)return;let t=Z.context(()=>{let e=Z.utils.toArray(`[data-runtime-seg]`),t=e.filter((e,t)=>tt>=i),r=Z.matchMedia();r.add(`(prefers-reduced-motion: reduce)`,()=>{Z.set(t,{scaleY:1,autoAlpha:1}),Z.set(n,{scaleY:.32,autoAlpha:.45})}),r.add(`(prefers-reduced-motion: no-preference)`,()=>{Z.set(e,{transformOrigin:`center bottom`}),Z.to(n,{scaleY:.32,autoAlpha:.45,duration:BB.fast,ease:VB.out,overwrite:!0}),Z.to(t,{scaleY:1,autoAlpha:1,duration:BB.base,ease:VB.out,stagger:{amount:.08,from:`start`},overwrite:!0})})},e);return()=>t.revert()},[i,e]),(0,G.jsxs)(`div`,{ref:r,className:`flex items-center gap-2`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-1.5 text-caption font-medium text-foreground/75`,children:[(0,G.jsx)(`span`,{className:`status-dot`,"data-state":a===`muted`?void 0:a===`warn`?`warn`:a}),(0,G.jsx)(`span`,{children:n(`runtimeState`)})]}),(0,G.jsx)(`div`,{className:`runtime-meter min-w-[80px] flex-1`,role:`meter`,"aria-label":n(`runtimeState`),"aria-valuemin":0,"aria-valuemax":12,"aria-valuenow":i,"aria-valuetext":t,children:Array.from({length:12},(e,t)=>(0,G.jsx)(`span`,{"data-runtime-seg":!0,"data-on":t{if(!I&&!L&&R.length===0)return;let e=window.setInterval(()=>P(e=>e+1),1e3);return()=>window.clearInterval(e)},[I,L,R.length]);let[z,B]=(0,v.useState)(null),[V,H]=(0,v.useState)(null),ee=(0,v.useRef)(null),te=C&&C!==z?C:null,ne=!!te&&V===te;(0,v.useEffect)(()=>{if(C)return ee.current&&window.clearTimeout(ee.current),ee.current=window.setTimeout(()=>B(C),3e3),()=>{ee.current&&window.clearTimeout(ee.current)}},[C]);let re=cTe(F,F===`dead`?L:I,o),ie=F===`hot`||F===`ready`?`success`:F===`cooling`?`warning`:F===`quota_exhausted`||F===`login`||F===`unavailable`||F===`dead`||F===`auth_failed`?`danger`:void 0,ae=e.last_error||e.lastError,oe=e.last_error_kind||e.kind,se=UV(e.provider,e.region,o),ce=e.last_checkin_status,le=ce===`success`?`checkinRecordSuccess`:ce===`already`?`checkinRecordAlready`:ce===`skipped`?`checkinRecordSkipped`:ce===`error`?`checkinRecordFailed`:`lastCheckinNone`,ue=o9(e,y);return(0,v.useLayoutEffect)(()=>{let e=D.current;if(!e)return;let t=N.current;if(N.current=F,!t||t===F)return;let n=Z.context(()=>{let t=Z.matchMedia();t.add(`(prefers-reduced-motion: reduce)`,()=>{Z.set(e,{scale:1,autoAlpha:1})}),t.add(`(prefers-reduced-motion: no-preference)`,()=>{Z.fromTo(e,{scale:.94,autoAlpha:.65},{scale:1,autoAlpha:1,duration:.2,ease:`power2.out`,overwrite:!0})})},e);return()=>n.revert()},[F]),(0,v.useLayoutEffect)(()=>{let e=O.current;if(!e||!n)return;let t=Z.context(()=>{let t=Z.matchMedia();t.add(`(prefers-reduced-motion: reduce)`,()=>{Z.set(e,{autoAlpha:1,y:0})}),t.add(`(prefers-reduced-motion: no-preference)`,()=>{Z.fromTo(e,{autoAlpha:0,y:-6},{autoAlpha:1,y:0,duration:.2,ease:`power3.out`,overwrite:!0})})},e);return()=>t.revert()},[n]),(0,G.jsxs)(xS,{"data-gsap-reveal":!0,"data-state":F,className:`account-card overflow-hidden p-0`,children:[(0,G.jsxs)(xS.Header,{className:`flex-row items-start justify-between gap-2.5 px-4 pt-3.5 pb-2`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,G.jsx)(`div`,{className:`flex size-8 shrink-0 items-center justify-center rounded-lg bg-surface-tertiary`,children:(0,G.jsx)(WV,{provider:e.provider,size:20})}),(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,G.jsx)(xS.Title,{className:`truncate text-body leading-5`,children:e.name||e.id}),(0,G.jsx)(`span`,{className:`shrink-0 rounded-full bg-surface-secondary px-1.5 py-px text-caption text-muted`,children:se})]}),(0,G.jsx)(xS.Description,{className:`mono truncate text-caption leading-4 text-foreground/60`,title:`${e.id}${e.remote_uid?` · UID ${e.remote_uid}`:``}`,children:e.remote_uid?`UID ${e.remote_uid}`:e.id})]})]}),(0,G.jsxs)(`div`,{className:`flex max-w-[48%] shrink-0 flex-wrap justify-end gap-1.5`,children:[(0,G.jsx)(`span`,{ref:D,children:R.length&&F===`cooling`?(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(`span`,{className:`inline-flex cursor-help`,children:(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:ie,children:re})})}),(0,G.jsx)(Aj.Content,{children:(0,G.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,G.jsx)(`div`,{className:`font-medium`,children:o(`partialCooling`)}),R.map(([e,t])=>(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-4 text-caption`,children:[(0,G.jsx)(`span`,{children:e}),(0,G.jsx)(`span`,{className:`mono text-foreground/65`,children:i9(t)})]},e))]})})]}):(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:ie,children:re})}),R.length&&F!==`cooling`?(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(`span`,{className:`inline-flex cursor-help`,children:(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:`warning`,children:o(`partialCooling`)})})}),(0,G.jsx)(Aj.Content,{children:(0,G.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,G.jsx)(`div`,{className:`font-medium`,children:o(`partialCooling`)}),R.map(([e,t])=>(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-4 text-caption`,children:[(0,G.jsx)(`span`,{children:e}),(0,G.jsx)(`span`,{className:`mono text-foreground/65`,children:i9(t)})]},e))]})})]}):null]})]}),(0,G.jsxs)(xS.Content,{className:`gap-1.5 px-4 pb-3`,children:[(0,G.jsx)(sTe,{state:F,stateCopy:re,t:o}),e.quota?(0,G.jsx)(oTe,{quota:e.quota,t:o,label:o(`quota`),usedLabel:o(`quotaUsed`),remainingLabel:o(`quotaRemaining`),addOnLabel:o(`quotaAddOn`),resourcePackageLabel:o(`quotaResourcePackage`),exceededLabel:o(`quotaExceeded`),provider:e.provider}):(0,G.jsx)(`span`,{className:`text-caption text-foreground/65`,children:o(F===`hot`||F===`ready`||F===`loading`||F===`starting`?`quotaLoading`:`quotaUnavailable`)}),ae?(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsxs)(`div`,{className:`flex w-full cursor-help gap-2 rounded-lg bg-surface-secondary p-2 text-left text-caption leading-5 text-foreground`,children:[(0,G.jsx)(ho,{size:14,className:`mt-0.5 shrink-0 text-danger`}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[oe?(0,G.jsx)(`div`,{className:`mono mb-0.5 truncate text-caption opacity-75`,children:oe}):null,(0,G.jsx)(`p`,{className:`break-words line-clamp-3`,children:ae})]})]})}),(0,G.jsx)(Aj.Content,{children:(0,G.jsxs)(`div`,{className:`max-w-md whitespace-pre-wrap break-words`,children:[oe?(0,G.jsx)(`div`,{className:`mono mb-1 text-caption opacity-75`,children:oe}):null,ae]})})]}):null,te?(0,G.jsxs)(`div`,{className:`flex w-full items-start gap-2 rounded-lg bg-surface-secondary p-2 text-caption leading-5`,children:[te.kind===`success`?(0,G.jsx)(Oi,{size:14,weight:`fill`,className:`mt-0.5 shrink-0 text-success`}):te.kind===`error`?(0,G.jsx)(xo,{size:14,weight:`fill`,className:`mt-0.5 shrink-0 text-danger`}):(0,G.jsx)(ho,{size:14,weight:`fill`,className:`mt-0.5 shrink-0 text-warning`}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[te.kind===`success`?(0,G.jsx)(`span`,{className:`font-medium text-success`,children:o(`checkinRecordSuccess`)}):te.kind===`already`?(0,G.jsx)(`span`,{className:`font-medium text-warning`,children:o(`checkinRecordAlready`)}):te.kind===`skipped`?(0,G.jsx)(`span`,{className:`font-medium text-warning`,children:o(`checkinRecordSkipped`)}):(0,G.jsx)(`span`,{className:`font-medium text-danger`,children:o(`checkinRecordFailed`)}),te.message?(0,G.jsxs)(`div`,{className:`mt-0.5`,children:[(0,G.jsx)(`p`,{className:`break-words line-clamp-2 text-foreground/80`,children:te.message}),(0,G.jsxs)(`div`,{className:`mt-1 flex items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`text-caption text-muted`,children:o(`checkinTruncated`)}),(0,G.jsxs)(J,{size:`sm`,variant:`ghost`,className:`h-6 min-w-0 gap-1 px-1.5 text-caption`,onPress:()=>{U7(te.message||``).then(e=>{!e||!te||(H(te),window.setTimeout(()=>H(null),1100))})},children:[(0,G.jsx)(H7,{copied:ne,size:13}),o(ne?`copied`:`checkinCopyError`)]})]})]}):null]})]}):null]}),n&&e.enabled?(0,G.jsxs)(`section`,{ref:O,className:`grid gap-3 bg-surface-secondary/55 px-3 py-3`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`div`,{className:`text-caption font-medium text-muted`,children:o(`oauthDeviceFlow`)}),(0,G.jsx)(`p`,{className:`mt-1.5 text-caption leading-5 text-muted`,children:e.provider===`codex`?o(`wizardCodexBrowserLead`):o(`qoderLoginHint`)}),(0,G.jsx)(`div`,{className:`mt-2.5 flex flex-wrap gap-2`,children:e.provider===`codex`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(J,{size:`sm`,isPending:t===`device`,onPress:()=>c(`cli`),children:[(0,G.jsx)(Ia,{size:14}),o(`startCodexCliLogin`)]}),(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,isPending:t===`device`,onPress:()=>c(`chatgpt`),children:[(0,G.jsx)(Ia,{size:14}),o(`startCodexChatGPTLogin`)]})]}):e.provider===`kiro`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(J,{size:`sm`,isPending:t===`device`,onPress:()=>c(`builder_id`),children:[(0,G.jsx)(Ia,{size:14}),o(`kiroLoginBuilder`)]}),(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,isPending:t===`device`,onPress:()=>c(`idc`),children:[(0,G.jsx)(Ia,{size:14}),o(`kiroLoginIDC`)]}),(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,isPending:t===`device`,onPress:()=>c(`microsoft`),children:[(0,G.jsx)(Ia,{size:14}),o(`kiroLoginMicrosoft`)]}),(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,isPending:t===`device`,onPress:()=>c(`sso`),children:[(0,G.jsx)(Ia,{size:14}),o(`kiroLoginSSO`)]})]}):(0,G.jsxs)(J,{size:`sm`,isPending:t===`device`,onPress:()=>c(),children:[(0,G.jsx)(Ia,{size:14}),o(`startBrowserLogin`)]})}),(e.provider===`trae`||e.provider===`codex`||e.provider===`devin`||e.provider===`kiro`)&&f&&d?(0,G.jsxs)(`div`,{className:`mt-3 space-y-2`,children:[(0,G.jsx)(`p`,{className:`text-caption leading-4 text-muted`,children:o(`wizardCallbackLead`)}),(0,G.jsx)(Vj,{className:`h-24 w-full resize-none font-mono text-caption leading-5`,value:u||``,onChange:e=>d(e.target.value),placeholder:o(`wizardCallbackPh`),"aria-label":o(`wizardCallbackPh`)}),(0,G.jsx)(J,{size:`sm`,variant:`secondary`,isPending:t===`callback`,onPress:f,children:o(`wizardSubmitCallback`)})]}):null]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`div`,{className:`text-caption font-medium text-muted`,children:o(`patFallback`)}),(0,G.jsxs)(`div`,{className:`mt-2.5 flex flex-col gap-2 sm:flex-row`,children:[(0,G.jsxs)(Hj,{className:`flex-1`,type:`password`,value:a,onChange:s,children:[(0,G.jsx)(kM,{className:`sr-only`,children:o(`pat`)}),(0,G.jsx)(Ij,{placeholder:o(`pasteToken`),"aria-label":o(`pat`)})]}),(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,isPending:t===`pat`,onPress:l,children:[(0,G.jsx)(ua,{size:14}),o(`usePat`)]})]})]}),r||i?(0,G.jsxs)(`div`,{className:`text-caption`,children:[r?(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`div`,{className:`mb-1 text-caption font-medium text-muted`,children:o(`authUrl`)}),(0,G.jsx)(`code`,{className:`mono block break-all text-foreground`,children:r}),(0,G.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:[(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,onPress:()=>window.open(r,`_blank`,`noopener,noreferrer`),children:[(0,G.jsx)(ni,{size:14}),o(`openAuthUrl`)]}),(0,G.jsxs)(J,{size:`sm`,variant:`ghost`,onPress:()=>{U7(r).then(e=>{e&&(A(!0),window.setTimeout(()=>A(!1),1100))})},children:[(0,G.jsx)(H7,{copied:k}),o(k?`copied`:`copy`)]})]})]}):null,i?(0,G.jsx)(`p`,{className:`mt-1 text-muted`,children:i}):null]}):null]}):null,x?(0,G.jsxs)(`div`,{className:`flex items-start justify-between gap-3 border-t border-separator px-4 py-2 text-caption text-muted`,children:[(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsxs)(`span`,{className:`flex cursor-help flex-wrap items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`font-medium`,children:o(`lastCheckin`)}),(0,G.jsx)(`span`,{className:ce===`error`?`text-danger`:``,children:o(le)}),ue?null:(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-1 whitespace-nowrap rounded-full bg-warning/15 px-1.5 py-px text-caption font-medium text-warning`,children:[(0,G.jsx)(`span`,{className:`size-1.5 rounded-full bg-warning`,"aria-hidden":!0}),o(`checkinPending`)]})]})}),(0,G.jsxs)(Aj.Content,{children:[e.last_checkin_at?new Date(e.last_checkin_at).toLocaleString():o(`lastCheckinNone`),e.last_checkin_msg?` · ${e.last_checkin_msg}`:``]})]}),(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsxs)(`span`,{className:`flex cursor-help items-center gap-1.5`,children:[(0,G.jsx)(`span`,{className:`font-medium`,children:o(`autoCheckin`)}),(0,G.jsx)(`span`,{className:`mono text-caption text-foreground/55`,children:e.checkin_time||_}),(0,G.jsx)(s7,{isSelected:!!e.auto_checkin,isDisabled:!!t,ariaLabel:o(`autoCheckin`),onChange:e=>b?.(e)})]})}),(0,G.jsx)(Aj.Content,{children:e.checkin_time?o(`checkinCustom`):o(`checkinInherit`)})]})]}):null,(0,G.jsxs)(xS.Footer,{className:`flex flex-wrap items-center gap-1.5 bg-surface-secondary px-4 py-2`,children:[m?(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`secondary`,isPending:t===`refresh`,onPress:m,"aria-label":o(`refreshAccount`),children:(0,G.jsx)(Qr,{size:15})})}),(0,G.jsx)(Aj.Content,{children:o(`refreshAccount`)})]}):null,(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:n?`secondary`:`ghost`,isDisabled:!e.enabled,onPress:T,"aria-label":o(`authentication`),children:(0,G.jsx)(ua,{size:15})})}),(0,G.jsx)(Aj.Content,{children:o(`authentication`)})]}),(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,onPress:E,"aria-label":o(`accountModels`),children:(0,G.jsx)(Bi,{size:15})})}),(0,G.jsx)(Aj.Content,{children:o(`accountModels`)})]}),(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,onPress:w,"aria-label":o(`editAccount`),children:(0,G.jsx)(Oa,{size:15})})}),(0,G.jsx)(Aj.Content,{children:o(`editAccount`)})]}),x?(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,isDisabled:!e.enabled||!!t,isPending:t===`checkin`,onPress:x,"aria-label":o(`checkinNow`),children:(0,G.jsx)(fi,{size:15})})}),(0,G.jsx)(Aj.Content,{children:o(`checkinNow`)})]}):null,(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:j?`secondary`:`ghost`,onPress:()=>M(e=>!e),"aria-label":o(`modelCooldowns`),children:(0,G.jsx)(no,{size:15,className:R.length?`text-warning`:void 0})})}),(0,G.jsxs)(Aj.Content,{children:[o(`modelCooldowns`),R.length?` · ${R.length}`:``]})]}),(0,G.jsxs)(CP,{children:[(0,G.jsx)(CP.Trigger,{children:(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`secondary`,"aria-label":o(`more`),children:(0,G.jsx)(Wi,{size:16})})}),(0,G.jsx)(CP.Popover,{placement:`bottom end`,children:(0,G.jsxs)(CP.Menu,{"aria-label":o(`more`),onAction:e=>{e===`export`&&p(),e===`checkin-records`&&S?.(),e===`delete`&&h()},children:[e.auth_type===`none`?null:(0,G.jsxs)(CP.Item,{id:`export`,textValue:o(`export`),children:[(0,G.jsx)(Ii,{size:15}),o(`export`)]}),S?(0,G.jsxs)(CP.Item,{id:`checkin-records`,textValue:o(`checkinRecords`),children:[(0,G.jsx)(ga,{size:15}),o(`checkinRecords`)]}):null,(0,G.jsxs)(CP.Item,{id:`delete`,textValue:o(`delete`),className:`text-danger`,children:[(0,G.jsx)(io,{size:15}),o(`delete`)]})]})})]}),(0,G.jsx)(`div`,{className:`ml-auto flex shrink-0 flex-nowrap items-center gap-3 whitespace-nowrap`,children:(0,G.jsx)(s7,{isSelected:!!e.enabled,isDisabled:t===`toggle`,ariaLabel:e.enabled?o(`disable`):o(`enable`),label:e.enabled?o(`enabledState`):o(`disabled`),onChange:g})})]}),j?(0,G.jsxs)(`section`,{className:`border-t border-separator bg-surface-secondary/55 px-4 py-2.5`,children:[(0,G.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-2`,children:[(0,G.jsx)(`span`,{className:`text-caption font-medium text-muted`,children:o(`modelCooldownsTitle`)}),(0,G.jsx)(`span`,{className:`mono text-caption text-muted`,children:R.length})]}),R.length?(0,G.jsx)(`div`,{className:`space-y-1`,children:R.map(([e,t])=>(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-lg bg-surface px-2 py-1.5 text-caption`,children:[(0,G.jsx)(`span`,{className:`mono min-w-0 truncate`,title:e,children:e}),(0,G.jsx)(`span`,{className:`mono shrink-0 text-warning`,children:i9(t)})]},e))}):(0,G.jsx)(`p`,{className:`text-caption text-muted`,children:o(`modelCooldownsEmpty`)})]}):null]})}function uTe(e,t){return e.status===`success`?{label:t(`checkinRecordSuccess`),color:`success`}:e.status===`already`?{label:t(`checkinRecordAlready`),color:`warning`}:e.status===`skipped`?{label:t(`checkinRecordSkipped`),color:`default`}:{label:t(`checkinRecordFailed`),color:`danger`}}function dTe(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function fTe({account:e,t,onClose:n}){let[r,i]=(0,v.useState)([]),[a,o]=(0,v.useState)(!!e?.id),[s,c]=(0,v.useState)(``),l=e?.id||``,u=t(`checkinRecordsTitle`,{name:e?.name||e?.id||``});async function d(){if(l){o(!0),c(``);try{let e=await fse(l);i(e.data||[])}catch(e){i([]),c(e instanceof Error?e.message:String(e))}finally{o(!1)}}}return(0,v.useEffect)(()=>{l&&d()},[l]),(0,G.jsx)(Y.Root,{isOpen:!!e,onOpenChange:e=>{e||n()},children:(0,G.jsx)(Y.Backdrop,{variant:`blur`,children:(0,G.jsx)(Y.Container,{size:`lg`,scroll:`inside`,children:(0,G.jsxs)(Y.Dialog,{children:[(0,G.jsxs)(Y.Header,{className:`items-start justify-between gap-4 px-5 pt-5`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(Y.Heading,{className:`text-section font-semibold`,children:u}),(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:t(`checkinRecordsHint`)})]}),(0,G.jsx)(Y.CloseTrigger,{"aria-label":t(`close`),className:`grid size-8 shrink-0 place-items-center rounded-lg text-muted transition-colors hover:bg-surface-secondary hover:text-foreground`,children:(0,G.jsx)(yo,{size:16})})]}),(0,G.jsxs)(Y.Body,{className:`px-5 pb-2`,children:[s?(0,G.jsx)(`div`,{className:`mb-3`,children:(0,G.jsx)(vI,{title:s})}):null,a?(0,G.jsxs)(`div`,{className:`space-y-2 py-1`,children:[(0,G.jsx)(Q,{className:`h-16 w-full`}),(0,G.jsx)(Q,{className:`h-16 w-full`}),(0,G.jsx)(Q,{className:`h-16 w-full`})]}):r.length?(0,G.jsx)(`div`,{className:`divide-y divide-separator overflow-hidden rounded-lg bg-surface-secondary`,children:r.map(e=>{let n=uTe(e,t);return(0,G.jsxs)(`div`,{className:`flex items-start gap-3 px-3 py-3`,children:[(0,G.jsx)(`span`,{className:`status-dot mt-1.5 shrink-0`,"data-state":e.status===`error`?`warn`:`ok`}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:n.color,children:n.label}),(0,G.jsx)(`span`,{className:`mono text-caption text-muted`,children:dTe(e.created_at)})]}),(0,G.jsx)(`p`,{className:`mt-1 break-words text-caption leading-5 text-foreground/75`,children:e.message||`—`})]})]},e.id)})}):(0,G.jsx)(O7,{className:`min-h-44 rounded-3xl bg-surface-secondary`,title:t(`checkinRecordsEmpty`),hint:t(`checkinRecordsHint`)})]}),(0,G.jsxs)(Y.Footer,{className:`justify-between px-5 pb-5`,children:[(0,G.jsx)(`span`,{className:`mono text-caption text-muted`,children:t(`checkinRecordsCount`,{count:r.length})}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(J,{size:`sm`,variant:`ghost`,onPress:n,children:t(`close`)}),(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,isPending:a,onPress:()=>void d(),children:[(0,G.jsx)(Qr,{size:14}),t(`refresh`)]})]})]})]})})})})}function pTe(e){let t=e.route_display_name||``;return t&&t!==(e.display_name||e.id)?t:``}function mTe({account:e,t,onClose:n}){let[r,i]=(0,v.useState)([]),[a,o]=(0,v.useState)(!!e?.id),[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)(``),[d,f]=(0,v.useState)(1),[p,m]=(0,v.useState)(20),[h,g]=(0,v.useState)(0),[_,y]=(0,v.useState)(1),b=(0,v.useRef)(0),x=e?.id||``,S=t(`accountModelsTitle`,{name:e?.name||e?.id||``}),C=e?UV(e.provider,e.region,t):``;async function w(e=1,t=p,n=!1){if(!x)return;let r=++b.current;n?c(!0):o(!0),u(``);try{let a=await(n?sI(x,void 0,{page:e,pageSize:t}):oI(x,!1,void 0,{page:e,pageSize:t})),o=a.data||[],s=a.pagination,c=s?.total??o.length,l=s?.total_pages??Math.max(1,Math.ceil(c/t)),u=Math.min(Math.max(1,s?.page??e),l);if(r!==b.current)return;i(s?o:o.slice((u-1)*t,u*t)),g(c),y(l),f(u)}catch(e){if(r!==b.current)return;i([]),g(0),y(1),u(e instanceof Error?e.message:String(e))}finally{r===b.current&&(o(!1),c(!1))}}(0,v.useEffect)(()=>{x&&(f(1),w(1,p))},[x]);let T=h===0?0:(d-1)*p+1,E=h===0?0:Math.min(h,T+r.length-1);return(0,G.jsx)(Y.Root,{isOpen:!!e,onOpenChange:e=>{e||n()},children:(0,G.jsx)(Y.Backdrop,{variant:`blur`,children:(0,G.jsx)(Y.Container,{size:`lg`,scroll:`inside`,children:(0,G.jsxs)(Y.Dialog,{children:[(0,G.jsxs)(Y.Header,{className:`items-start justify-between gap-4 px-5 pt-5`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(Y.Heading,{className:`text-section font-semibold`,children:S}),(0,G.jsx)(`p`,{className:`mt-1 text-caption font-normal leading-5 text-muted`,children:t(`accountModelsHint`)}),e?(0,G.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-2 text-caption text-muted`,children:[(0,G.jsx)(WV,{provider:e.provider,size:14}),(0,G.jsx)(`span`,{children:C}),(0,G.jsx)(`span`,{className:`text-border`,children:`·`}),(0,G.jsx)(`span`,{className:`mono`,children:e.id})]}):null]}),(0,G.jsx)(Y.CloseTrigger,{"aria-label":t(`close`),className:`grid size-8 shrink-0 place-items-center rounded-lg text-muted transition-colors hover:bg-surface-secondary hover:text-foreground`,children:(0,G.jsx)(yo,{size:16})})]}),(0,G.jsxs)(Y.Body,{className:`px-5 pb-2`,children:[l?(0,G.jsx)(`div`,{className:`mb-3`,children:(0,G.jsx)(vI,{title:t(`accountModelsError`,{msg:l})})}):null,a||s?(0,G.jsxs)(`div`,{className:`space-y-2 py-1`,children:[(0,G.jsx)(Q,{className:`h-14 w-full`}),(0,G.jsx)(Q,{className:`h-14 w-full`}),(0,G.jsx)(Q,{className:`h-14 w-full`})]}):r.length?(0,G.jsx)(`ul`,{className:`divide-y divide-separator overflow-hidden rounded-lg bg-surface-secondary`,children:r.map(n=>{let r=n.provider||n.owned_by||e?.provider||`qoder`,i=pTe(n),a=mV(n),o=hV(n);return(0,G.jsxs)(`li`,{className:`flex items-start gap-3 px-3 py-2.5`,children:[(0,G.jsx)(`span`,{className:`status-dot mt-1.5`,"data-state":n.stale?void 0:`ok`}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`truncate text-body font-medium`,children:n.display_name||n.id}),o?(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:`success`,children:t(`modelFree`)}):null,a?(0,G.jsx)(`span`,{className:`mono text-caption text-muted`,children:a}):null,n.stale?(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:`warning`,children:t(`fallback`)}):null]}),(0,G.jsx)(`div`,{className:`mono mt-0.5 truncate text-caption text-muted`,children:n.id}),i?(0,G.jsx)(`div`,{className:`mt-0.5 text-caption text-muted`,children:t(`routedTo`,{model:i})}):null]}),(0,G.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1.5 pt-0.5 text-caption text-muted`,children:[(0,G.jsx)(WV,{provider:r,size:12}),(0,G.jsx)(`span`,{children:r})]})]},n.id)})}):(0,G.jsx)(O7,{className:`min-h-48 rounded-3xl bg-surface-secondary`,icon:(0,G.jsx)(Bi,{size:22}),title:t(`accountModelsEmpty`),hint:t(`noModelsYet`)})]}),(0,G.jsxs)(Y.Footer,{className:`flex-col items-stretch gap-3 px-5 pb-5`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,G.jsx)(`span`,{className:`mono text-caption text-muted`,children:a?t(`refreshing`):t(`shownTotal`,{shown:h?`${T}–${E}`:0,total:h})}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(J,{size:`sm`,variant:`ghost`,onPress:n,children:t(`close`)}),(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,isPending:s,onPress:()=>void w(1,p,!0),children:[(0,G.jsx)(Qr,{size:14}),t(s?`refreshing`:`refresh`)]})]})]}),h>0?(0,G.jsx)(j7,{total:h,page:d,pageCount:_,pageSize:p,loading:a||s,pageSizeLabel:t(`logsPageSize`),pageLabel:t(`logsPage`,{page:d,pages:_}),prevLabel:t(`logsPrevPage`),nextLabel:t(`logsNextPage`),onPage:e=>void w(e,p),onPageSize:e=>{m(e),w(1,e)}}):null]})]})})})})}var hTe=`w-28`;function u9({label:e,hint:t,labelWidthClass:n=hTe,htmlFor:r,align:i=`center`,children:a}){return(0,G.jsxs)(`div`,{children:[(0,G.jsxs)(`div`,{className:`flex gap-3 ${i===`start`?`items-start`:`items-center`}`,children:[(0,G.jsx)(kM,{htmlFor:r,className:`${n} shrink-0 ${i===`start`?`pt-2`:``} text-body font-medium text-foreground`,children:e}),(0,G.jsx)(`div`,{className:`min-w-0 flex-1 [&_[data-slot=input]]:w-full [&_[data-slot=textarea]]:w-full`,children:a})]}),t?(0,G.jsx)(`p`,{className:`mt-1.5 pl-[7.75rem] text-caption leading-5 text-muted`,children:t}):null]})}function gTe({catalog:e,selected:t,onChange:n,isDisabled:r,t:i}){let[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(t),l=(0,v.useMemo)(()=>new Set(t),[t]),u=(0,v.useMemo)(()=>{let t=new Set(s),n=a.trim().toLowerCase(),r=(e||[]).filter(e=>!n||e.toLowerCase().includes(n));return[...r.filter(e=>t.has(e)),...r.filter(e=>!t.has(e))]},[e,a,s]),d=(0,v.useMemo)(()=>{if(!e)return[];let n=new Set(e);return t.filter(e=>!n.has(e))},[e,t]),f=e?.length??0,p=t.filter(e=>!d.includes(e)).length;function m(e){o(e),c(t)}function h(e,r){n(r?[...t,e]:t.filter(t=>t!==e))}function g(){let e=new Set(t);u.forEach(t=>e.add(t)),n([...e])}function _(){let e=new Set(u);n(t.filter(t=>!e.has(t)))}return(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(DM,{"aria-label":i(`modelPickerSearch`),value:a,onChange:m,isDisabled:r,className:`min-w-0 flex-1 basis-48`,children:(0,G.jsxs)(DM.Group,{children:[(0,G.jsx)(DM.SearchIcon,{}),(0,G.jsx)(DM.Input,{placeholder:i(`modelPickerSearch`)}),(0,G.jsx)(DM.ClearButton,{})]})}),(0,G.jsx)(`span`,{className:`mono shrink-0 text-caption text-muted`,children:i(`modelPickerCount`,{selected:p,total:f})}),(0,G.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,G.jsxs)(J,{size:`sm`,variant:`ghost`,isDisabled:r||u.length===0,onPress:g,children:[(0,G.jsx)(Ai,{size:14}),i(`modelPickerSelectAll`)]}),(0,G.jsxs)(J,{size:`sm`,variant:`ghost`,isDisabled:r||t.length===0,onPress:_,children:[(0,G.jsx)(Ka,{size:14}),i(`modelPickerClear`)]})]})]}),(0,G.jsxs)(`div`,{className:`max-h-[300px] overflow-y-auto overscroll-contain rounded-lg bg-surface-secondary p-1`,children:[e===null?(0,G.jsx)(`p`,{className:`px-2.5 py-2 text-caption text-muted`,children:i(`refreshing`)}):null,d.map(e=>(0,G.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md px-2.5 py-1.5`,children:[(0,G.jsx)(`span`,{className:`mono min-w-0 flex-1 truncate text-body text-muted line-through`,children:e}),(0,G.jsx)(`span`,{className:`shrink-0 text-caption text-warning`,children:i(`modelPickerOffline`)}),(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,isDisabled:r,"aria-label":i(`modelPickerRemove`,{model:e}),onPress:()=>h(e,!1),children:(0,G.jsx)(yo,{size:14})})]},`offline-${e}`)),u.map(e=>(0,G.jsx)(PS,{isSelected:l.has(e),isDisabled:r,onChange:t=>h(e,t),className:`flex w-full cursor-pointer rounded-md px-2.5 py-1.5 transition-colors hover:bg-default`,children:(0,G.jsxs)(PS.Content,{className:`flex min-w-0 flex-1 items-center gap-2.5`,children:[(0,G.jsx)(PS.Control,{children:(0,G.jsx)(PS.Indicator,{})}),(0,G.jsx)(`span`,{className:`mono min-w-0 truncate text-body text-foreground`,children:e})]})},e)),e!==null&&u.length===0?(0,G.jsx)(`p`,{className:`px-2.5 py-2 text-caption text-muted`,children:i(f===0?`noAccountModels`:`modelPickerNoMatch`)}):null]})]})}function _Te(e){let[t,n]=(0,v.useState)(e);e&&!t&&n(!0);let r=(0,v.useRef)(null),i=(0,v.useRef)(null),a=(0,v.useRef)(e);return(0,v.useLayoutEffect)(()=>{let t=r.current,o=i.current;if(!t||!o)return;if(a.current){a.current=!1;return}Z.killTweensOf([t,o]);let s=t.getBoundingClientRect().height;if(e){Z.set(t,{overflow:`hidden`});let e=t.scrollHeight;Z.fromTo(t,{height:s===e?0:s},{height:e,duration:WB(BB.base),ease:VB.out,onComplete:()=>Z.set(t,{clearProps:`height,overflow`})}),Z.fromTo(o,{autoAlpha:0,y:-6},{autoAlpha:1,y:0,duration:WB(BB.base),ease:VB.out})}else Z.set(t,{overflow:`hidden`,height:s}),Z.to(o,{autoAlpha:0,y:-4,duration:WB(BB.fast),ease:VB.inOut}),Z.to(t,{height:0,duration:WB(BB.fast+.04),ease:VB.inOut,onComplete:()=>n(!1)});return()=>{Z.killTweensOf([t,o])}},[e,t]),{mounted:t,outerRef:r,innerRef:i}}function vTe({account:e,checkinDefaultTime:t,checkinTimezone:n,busy:r,t:i,onClose:a,onSave:o}){let[s,c]=(0,v.useState)(e?.name||``),[l,u]=(0,v.useState)(e?.max_inflight??4),[d,f]=(0,v.useState)(e?.priority??50),[p,m]=(0,v.useState)(e?.proxy_url||``),[h,g]=(0,v.useState)(!!e?.drop_system_prompt),[_,y]=(0,v.useState)(Object.entries(e?.model_aliases||{}).map(([e,t])=>({alias:e,model:t}))),[b,x]=(0,v.useState)({alias:``,model:``}),[S,C]=(0,v.useState)(!!e?.models_restricted),[w,T]=(0,v.useState)(e?.enabled_models||[]),{mounted:E,outerRef:D,innerRef:O}=_Te(S),[k,A]=(0,v.useState)(null),[j,M]=(0,v.useState)(!e?.checkin_time),[N,P]=(0,v.useState)(e?.checkin_time||null),[F,I]=(0,v.useState)(``);(0,v.useEffect)(()=>{if(!e?.id)return;let t=!1;return oI(e.id).then(e=>{t||A(e.data||[])}).catch(()=>{t||A([])}),()=>{t=!0}},[e?.id]);let L=i(`editAccountTitle`,{name:e?.name||e?.id||``}),R=e?UV(e.provider,e.region,i):``;async function z(n){n?.preventDefault();let r=s.trim();if(!r){I(i(`accountNameRequired`));return}if(!Number.isInteger(l)||l<1||l>32){I(i(`maxInflightInvalid`));return}if(!Number.isInteger(d)||d<1||d>100){I(i(`priorityInvalid`));return}if(t!==void 0&&!j&&!/^([01]\d|2[0-3]):[0-5]\d$/.test(N??t)){I(i(`checkinTimeInvalid`));return}I(``);try{await o({name:r,max_inflight:l,priority:d,proxy_url:p.trim(),checkin_time:t===void 0?void 0:j?``:N??t,drop_system_prompt:e?.provider===`workbuddy`||e?.provider===`trae`?h:void 0,model_aliases:Object.fromEntries(_.filter(e=>e.alias.trim()&&e.model.trim()).map(e=>[e.alias.trim(),e.model.trim()])),enabled_models:S?w:[],set_model_routing:!0}),a()}catch(e){I(e instanceof Error?e.message:String(e))}}return(0,G.jsx)(Y.Root,{isOpen:!!e,onOpenChange:e=>{!e&&!r&&a()},children:(0,G.jsx)(Y.Backdrop,{variant:`blur`,children:(0,G.jsx)(Y.Container,{placement:`center`,size:`lg`,scroll:`inside`,children:(0,G.jsxs)(Y.Dialog,{className:`w-full sm:w-[42rem] sm:max-w-[calc(100vw-2rem)]`,children:[(0,G.jsxs)(Y.Header,{className:`items-start justify-between gap-4 px-6 pt-6`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(Y.Heading,{className:`text-section font-semibold`,children:L}),(0,G.jsx)(`p`,{className:`mt-1.5 text-body font-normal leading-6 text-muted`,children:i(`editAccountHint`)}),e?(0,G.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(RS,{size:`sm`,variant:`soft`,children:(0,G.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,G.jsx)(WV,{provider:e.provider,size:14}),(0,G.jsx)(`span`,{children:R})]})}),(0,G.jsx)(`span`,{className:`mono text-caption text-muted`,children:e.id})]}):null]}),(0,G.jsx)(Y.CloseTrigger,{isDisabled:r,"aria-label":i(`close`),className:`grid size-9 shrink-0 place-items-center rounded-lg text-muted hover:bg-surface-secondary`,children:(0,G.jsx)(yo,{size:18})})]}),(0,G.jsxs)(Y.Body,{className:`px-6 pb-2 pt-1`,children:[F?(0,G.jsxs)(mP,{status:`danger`,className:`mb-4`,children:[(0,G.jsx)(mP.Indicator,{}),(0,G.jsx)(mP.Content,{children:(0,G.jsx)(mP.Title,{children:F})})]}):null,(0,G.jsxs)(dP,{className:`space-y-4`,onSubmit:e=>void z(e),children:[(0,G.jsx)(u9,{label:i(`accountName`),children:(0,G.jsx)(Ij,{value:s,onChange:e=>c(e.target.value),placeholder:i(`wizardNamePh`),"aria-label":i(`accountName`),disabled:r,autoFocus:!0})}),(0,G.jsx)(u9,{label:i(`maxInflight`),hint:i(`maxInflightHint`),children:(0,G.jsx)(OP,{value:l,onChange:e=>u(e??4),minValue:1,maxValue:32,isDisabled:r,isRequired:!0,children:(0,G.jsxs)(OP.Group,{children:[(0,G.jsx)(OP.DecrementButton,{}),(0,G.jsx)(OP.Input,{"aria-label":i(`maxInflight`)}),(0,G.jsx)(OP.IncrementButton,{})]})})}),(0,G.jsx)(u9,{label:i(`priority`),hint:i(`priorityHint`),children:(0,G.jsx)(OP,{value:d,onChange:e=>f(e??50),minValue:1,maxValue:100,isDisabled:r,isRequired:!0,children:(0,G.jsxs)(OP.Group,{children:[(0,G.jsx)(OP.DecrementButton,{}),(0,G.jsx)(OP.Input,{"aria-label":i(`priority`)}),(0,G.jsx)(OP.IncrementButton,{})]})})}),(0,G.jsx)(u9,{label:i(`proxyUrl`),hint:i(`proxyUrlHint`),children:(0,G.jsx)(Ij,{value:p,onChange:e=>m(e.target.value),placeholder:i(`proxyUrlPlaceholder`),"aria-label":i(`proxyUrl`),disabled:r})}),e?.provider===`workbuddy`||e?.provider===`trae`?(0,G.jsx)(u9,{label:i(`dropSystemPrompt`),hint:i(e?.provider===`trae`?`dropSystemPromptTraeHint`:`dropSystemPromptHint`),children:(0,G.jsx)(s7,{isSelected:h,isDisabled:r,ariaLabel:i(`dropSystemPrompt`),onChange:g})}):null,(0,G.jsx)(u9,{align:`start`,label:i(`accountModelAliases`),hint:i(`accountModelAliasesHint`),children:(0,G.jsxs)(`div`,{className:`space-y-2`,children:[_.map(e=>(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,G.jsxs)(`span`,{className:`mono min-w-0 truncate text-body`,children:[e.alias,` → `,e.model]}),(0,G.jsx)(J,{size:`sm`,variant:`ghost`,isDisabled:r,onPress:()=>y(t=>t.filter(t=>t.alias!==e.alias)),children:i(`modelAliasRemove`)})]},e.alias)),(0,G.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-[1fr_1fr_auto]`,children:[(0,G.jsx)(Ij,{"aria-label":i(`modelAliasName`),value:b.alias,onChange:e=>x(t=>({...t,alias:e.target.value})),placeholder:i(`modelAliasPlaceholder`),disabled:r}),(0,G.jsx)(Ij,{"aria-label":i(`modelAliasTarget`),value:b.model,onChange:e=>x(t=>({...t,model:e.target.value})),placeholder:i(`accountModelAliasTargetPlaceholder`),disabled:r}),(0,G.jsx)(J,{size:`sm`,variant:`secondary`,isDisabled:r||!b.alias.trim()||!b.model.trim(),onPress:()=>{y(e=>[...e.filter(e=>e.alias!==b.alias.trim()),{alias:b.alias.trim(),model:b.model.trim()}]),x({alias:``,model:``})},children:i(`modelAliasAdd`)})]})]})}),(0,G.jsxs)(`section`,{className:`space-y-3 pt-1`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(`div`,{className:`text-body font-medium text-foreground`,children:i(`enabledModels`)}),(0,G.jsx)(`p`,{className:`mt-0.5 text-caption leading-5 text-muted`,children:i(`enabledModelsHint`)})]}),(0,G.jsx)(s7,{isSelected:S,isDisabled:r,ariaLabel:i(`restrictModels`),label:i(S?`restrictModels`:`allModels`),onChange:C})]}),E?(0,G.jsx)(`div`,{ref:D,children:(0,G.jsx)(`div`,{ref:O,children:(0,G.jsx)(gTe,{catalog:k?k.map(e=>e.id):null,selected:w,onChange:T,isDisabled:r,t:i})})}):null]}),t===void 0?null:(0,G.jsx)(u9,{label:i(`autoCheckinTime`),hint:i(`checkinScheduleHint`),children:(0,G.jsxs)(`div`,{className:`space-y-3`,children:[(0,G.jsx)(s7,{isSelected:j,isDisabled:r,onChange:M,ariaLabel:i(`checkinInherit`),label:i(`checkinInherit`)}),(0,G.jsxs)(`p`,{className:`text-caption text-muted`,children:[i(`checkinDefaultValue`,{time:t}),` · `,(0,G.jsx)(`span`,{className:`mono`,children:n})]}),j?null:(0,G.jsx)(Ij,{type:`time`,value:N??t,onChange:e=>P(e.target.value),"aria-label":i(`autoCheckinTime`),disabled:r,required:!0})]})})]})]}),(0,G.jsxs)(Y.Footer,{className:`justify-end gap-2 px-6 pb-6`,children:[(0,G.jsx)(J,{variant:`ghost`,isDisabled:r,onPress:a,children:i(`cancel`)}),(0,G.jsx)(J,{isPending:r,onPress:()=>void z(),children:i(`save`)})]})]})})})})}var yTe={1:`grid-cols-1`,2:`grid-cols-1 sm:grid-cols-2`,3:`grid-cols-1 sm:grid-cols-3`};function d9({options:e,value:t,onChange:n,ariaLabel:r,columns:i=2,className:a=``}){let o=(0,v.useRef)(null);return(0,v.useLayoutEffect)(()=>{let e=o.current;if(!e)return;let t=Z.context(()=>{let e=Z.matchMedia();e.add(`(prefers-reduced-motion: reduce)`,()=>{Z.set(`[data-option-tile]`,{autoAlpha:1,y:0})}),e.add(`(prefers-reduced-motion: no-preference)`,()=>{Z.fromTo(`[data-option-tile]`,{autoAlpha:0,y:8},{autoAlpha:1,y:0,duration:.32,stagger:.035,ease:`power3.out`,overwrite:!0})})},e);return()=>t.revert()},[e.length]),(0,G.jsx)(`div`,{ref:o,role:`radiogroup`,"aria-label":r,className:`grid gap-3 ${yTe[i]} ${a}`.trim(),children:e.map(e=>{let r=e.value===t;return(0,G.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":r,"data-option-tile":``,"data-selected":r||void 0,disabled:e.disabled,title:e.hint,onClick:()=>n(e.value),className:`flex h-16 min-w-0 items-center gap-3 rounded-xl bg-surface shadow-surface px-4 text-left transition-colors hover:bg-surface-secondary disabled:cursor-not-allowed disabled:opacity-50 data-selected:border-accent data-selected:bg-accent-soft`,children:[e.icon?(0,G.jsx)(`span`,{className:`grid size-8 shrink-0 place-items-center rounded-lg bg-surface-secondary text-foreground [&_svg]:size-[18px]`,children:e.icon}):null,(0,G.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-body font-medium leading-5 text-foreground`,children:e.label})]},e.value)})})}var f9=new Set([`qoder-global`,`qoder-cn`,`workbuddy-global`,`workbuddy-cn`,`trae-cn`]),bTe=[`qoder-global`,`qoder-cn`,`workbuddy-global`,`workbuddy-cn`,`trae-cn`];function xTe(e,t){let n=new Map(t.map((e,t)=>[e,t]));return[...e].sort((e,t)=>{let r=n.get(e.id)??2**53-1,i=n.get(t.id)??2**53-1;return r===i?e.label.localeCompare(t.label):r-i})}function p9(e,t){return!t||`${e.label} ${e.subtitle||``} ${e.hint||``} ${e.provider} ${e.id}`.toLowerCase().includes(t)}function STe({ariaLabel:e}){return(0,G.jsx)(`div`,{className:`space-y-8`,"aria-busy":`true`,"aria-label":e,children:Array.from({length:2},(e,t)=>(0,G.jsxs)(`div`,{className:`space-y-3`,children:[(0,G.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,G.jsx)(tA,{className:`h-3 w-24 rounded-lg`}),(0,G.jsx)(tA,{className:`h-3 w-40 rounded-lg`})]}),(0,G.jsx)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,children:Array.from({length:t===0?5:6},(e,t)=>(0,G.jsxs)(`div`,{className:`card flex flex-row items-center gap-3.5 rounded-xl bg-surface px-4 py-3.5`,children:[(0,G.jsx)(tA,{className:`size-10 shrink-0 rounded-lg`}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1.5`,children:[(0,G.jsx)(tA,{className:`h-3.5 w-28 rounded-lg`}),(0,G.jsx)(tA,{className:`h-3 w-36 rounded-lg`})]})]},t))})]},t))})}function CTe({tile:e,disabled:t,onSelect:n}){return(0,G.jsxs)(`button`,{type:`button`,disabled:t,title:e.hint||e.subtitle||e.label,onClick:()=>n(e.id),className:`card flex min-w-0 flex-row items-center gap-3 rounded-xl bg-surface px-3.5 py-3 text-left transition-[transform,opacity,background-color] duration-200 ease-out hover:bg-surface-secondary active:translate-y-px active:scale-[0.98] motion-reduce:transition-none motion-reduce:active:translate-y-0 motion-reduce:active:scale-100 disabled:cursor-not-allowed disabled:opacity-50 disabled:active:translate-y-0 disabled:active:scale-100`,children:[(0,G.jsx)(`span`,{className:`grid size-9 shrink-0 place-items-center rounded-lg text-foreground [&_svg]:size-[18px]`,children:(0,G.jsx)(WV,{provider:e.provider,size:18})}),(0,G.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,G.jsx)(`span`,{className:`block truncate text-body font-medium leading-5 text-foreground`,children:e.label}),e.subtitle?(0,G.jsx)(`span`,{className:`mt-0.5 block truncate text-caption leading-4 text-muted`,children:e.subtitle}):null]})]})}function wTe({title:e,subtitle:t,tiles:n,disabled:r,onSelect:i}){return n.length?(0,G.jsxs)(`section`,{className:`space-y-3.5`,children:[(0,G.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,G.jsx)(`h3`,{className:`text-[10px] font-semibold tracking-[0.12em] uppercase text-muted`,children:e}),t?(0,G.jsx)(`p`,{className:`text-caption leading-5 text-muted`,children:t}):null]}),(0,G.jsx)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,children:n.map(e=>(0,G.jsx)(CTe,{tile:e,disabled:r,onSelect:i},e.id))})]}):null}function TTe({options:e,onSelect:t,disabled:n,empty:r,ariaLabel:i}){let{t:a}=GF(),[o,s]=(0,v.useState)(``),c=o.trim().toLowerCase(),l=(0,v.useMemo)(()=>{let t=xTe(e.filter(e=>f9.has(e.id)),bTe),n=e.filter(e=>!f9.has(e.id)).sort((e,t)=>e.label.localeCompare(t.label));return[{id:`subscriptions`,titleKey:`providerGroupSubscriptions`,subtitleKey:`providerGroupSubscriptionsHint`,tiles:t.filter(e=>p9(e,c))},{id:`experimental`,titleKey:`providerGroupExperimental`,subtitleKey:`providerGroupExperimentalHint`,tiles:n.filter(e=>p9(e,c))}]},[c,e]),u=l.reduce((e,t)=>e+t.tiles.length,0);return(0,G.jsxs)(`div`,{className:`space-y-8`,role:`listbox`,"aria-label":i,children:[(0,G.jsx)(M7,{value:o,onChange:s,placeholder:a(`providerFindPlaceholder`),ariaLabel:a(`providerFindPlaceholder`),className:`max-w-sm`}),u===0?r||(0,G.jsx)(`p`,{className:`rounded-lg bg-surface-secondary/45 px-3.5 py-3 text-caption leading-5 text-muted`,children:a(`providerFindEmpty`)}):l.map(e=>(0,G.jsx)(wTe,{title:a(e.titleKey),subtitle:a(e.subtitleKey),tiles:e.tiles,disabled:n,onSelect:t},e.id))]})}var m9={"workbuddy-accounts":`workbuddy`,"workbuddy-oauth-v1":`workbuddy`,"qoder-native-v1":`qoder`,"trae-oauth-v1":`trae`,"devin-session-v1":`devin`,"command-key-v1":`command`,"codex-oauth-v1":`codex`,"zhipu-key-v1":`zhipu`,"qwenwork-oauth-v1":`qwenwork`,"meta-oauth-v1":`meta`,"meta-key-v1":`meta`,"kiro-oauth-v1":`kiro`},ETe=[`codebuddy.cn`,`workbuddy.cn`],DTe=[`workbuddy.ai`,`workbuddy.com`],h9=new Set([`us-east-1`,`eu-central-1`]),OTe=/arn:aws:codewhisperer:([a-z0-9-]+):/;function g9(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function _9(e){return typeof e==`string`?e.trim():``}function v9(e){let t=e.trim();if(!t)return``;let n=t.toLowerCase();return n===`workbuddy-accounts`?`workbuddy-accounts`:n}function y9(e){return typeof e.format==`string`&&e.format.trim()?v9(e.format):typeof e.exportType==`string`&&e.exportType.trim()?v9(e.exportType):``}function kTe(e){let t=[],n=e=>{typeof e==`string`&&e.trim()&&t.push(e.trim().toLowerCase())};if(n(e.domain),g9(e.account)&&n(e.account.domain),g9(e.auth)&&n(e.auth.domain),Array.isArray(e.accounts))for(let t of e.accounts)g9(t)&&(n(t.domain),g9(t.account)&&n(t.account.domain),g9(t.auth)&&n(t.auth.domain));return t}function ATe(e){return ETe.some(t=>e.includes(t))}function jTe(e){return DTe.some(t=>e.includes(t))}function b9(e){return typeof e.accessToken==`string`||typeof e.access_token==`string`||typeof e.refreshToken==`string`||typeof e.refresh_token==`string`}function MTe(e){if(!g9(e))return!1;if(b9(e)||typeof e.domain==`string`||typeof e.uid==`string`)return!0;if(g9(e.account)||g9(e.auth)){let t=g9(e.account)?e.account:null,n=g9(e.auth)?e.auth:null;if(n&&(b9(n)||typeof n.domain==`string`)||t&&(typeof t.uid==`string`||typeof t.domain==`string`))return!0}return!1}function NTe(e){let t=kTe(e);if(t.length===0)return{region:`cn`,ambiguous:!0,warning:`region_unknown`};let n=t.some(ATe),r=t.some(jTe);return n&&r?{region:null,ambiguous:!0,warning:`region_mixed`}:n?{region:`cn`,ambiguous:!1}:r?{region:`global`,ambiguous:!1}:{region:`cn`,ambiguous:!0,warning:`region_unknown`}}function x9(e){let t=_9(e.region).toLowerCase();if(h9.has(t))return t;if(t===`eu`||t===`europe`)return`eu-central-1`;let n=_9(e.profileArn)||_9(e.profile_arn),r=OTe.exec(n);if(r&&h9.has(r[1]))return r[1];for(let t of[`kiroApiKey`,`apiKey`,`api_key`,`accessToken`,`access_token`]){let n=_9(e[t]),r=n.split(`|`);if(n.startsWith(`ksk_`)&&r.length===2&&h9.has(r[1].trim().toLowerCase()))return r[1].trim().toLowerCase()}return null}function S9(e){if(y9(e)===`kiro-oauth-v1`||x9(e))return!0;let t=(_9(e.authMethod)||_9(e.auth_method)).toLowerCase();if([`builder_id`,`builderid`,`external_idp`,`idc`,`social`].includes(t))return!0;let n=_9(e.provider).toLowerCase();if([`builderid`,`kiro`,`apikey`,`github`,`google`,`social`].includes(n))return!0;for(let t of[`kiroApiKey`,`apiKey`,`api_key`,`accessToken`,`access_token`])if(_9(e[t]).startsWith(`ksk_`))return!0;let r=_9(e.clientId)||_9(e.client_id),i=_9(e.clientSecret)||_9(e.client_secret),a=_9(e.refreshToken)||_9(e.refresh_token),o=_9(e.startUrl)||_9(e.start_url);if(r&&i&&a||o.includes(`awsapps.com`)&&a||(_9(e.profileArn)||_9(e.profile_arn)).includes(`codewhisperer`)&&(a||_9(e.accessToken)||_9(e.access_token)))return!0;let s=_9(e.tokenEndpoint)||_9(e.token_endpoint),c=_9(e.issuerUrl)||_9(e.issuer_url);return!!((s.includes(`microsoftonline`)||c.includes(`microsoftonline`))&&a)}function C9(e){return Array.isArray(e.accounts)?e.accounts.filter(e=>g9(e)&&S9(e)):[]}function PTe(e){return S9(e)||C9(e).length>0?{format:`kiro-oauth-v1`,provider:`kiro`,confidence:`medium`}:Array.isArray(e.accounts)&&e.accounts.some(MTe)?{format:`workbuddy-accounts`,provider:`workbuddy`,confidence:`medium`}:(typeof e.user_blob==`string`||typeof e.userBlob==`string`)&&(typeof e.machine_id==`string`||typeof e.machineId==`string`)?{format:`qoder-native-v1`,provider:`qoder`,confidence:`medium`}:typeof e.session_token==`string`||typeof e.sessionToken==`string`?{format:`devin-session-v1`,provider:`devin`,confidence:`low`}:b9(e)||g9(e.account)&&b9(e.account)||g9(e.auth)?{format:`workbuddy-oauth-v1`,provider:`workbuddy`,confidence:`low`}:typeof e.dca_token==`string`||typeof e.dcaToken==`string`||typeof e.access_token==`string`&&String(e.access_token).startsWith(`dca:`)||typeof e.accessToken==`string`&&String(e.accessToken).startsWith(`dca:`)?{format:`meta-oauth-v1`,provider:`meta`,confidence:`medium`}:typeof e.api_key==`string`||typeof e.apiKey==`string`?typeof e.organization==`string`||typeof e.project==`string`?{format:`zhipu-key-v1`,provider:`zhipu`,confidence:`low`}:typeof e.base_url==`string`&&String(e.base_url).includes(`meta.ai`)||typeof e.baseUrl==`string`&&String(e.baseUrl).includes(`meta.ai`)||typeof e.email==`string`?{format:`meta-key-v1`,provider:`meta`,confidence:`low`}:{format:`command-key-v1`,provider:`command`,confidence:`low`}:{format:null,provider:null,confidence:`low`}}function FTe(e){let t=C9(e),n=t.length>0?t:[e],r=new Set(n.map(x9).filter(e=>e!=null));return r.size===1?{region:[...r][0],ambiguous:!1}:(r.size,{region:null,ambiguous:!0})}function w9(e){if(!g9(e))return{format:null,provider:null,region:null,regionAmbiguous:!0,confidence:`low`,warnings:[`not_object`],batchImportSupported:!1};let t=[],n=y9(e),r=typeof e.format==`string`?e.format.trim():``,i=typeof e.exportType==`string`?e.exportType.trim():``,a=r||i,o=n||null,s=o?m9[o]??null:null,c=o&&s?`high`:`low`;if(!s){let r=PTe(e);o||=r.format,s=r.provider,c=n&&!m9[n]?`low`:r.confidence,a&&!m9[n]&&t.push(`unknown_format`)}s!==`kiro`&&(S9(e)||C9(e).length>0)&&(s=`kiro`,o=`kiro-oauth-v1`,c=n===`kiro-oauth-v1`?`high`:`medium`),s===`workbuddy`&&Array.isArray(e.accounts)&&(o=`workbuddy-accounts`);let l=null,u=!1;if(s===`workbuddy`){let n=NTe(e);l=n.region,u=n.ambiguous,n.warning&&t.push(n.warning)}if(s===`kiro`){let n=FTe(e);l=n.region,u=n.ambiguous,u&&t.push(C9(e).length>1?`region_mixed`:`region_unknown`)}return{format:o,provider:s,region:l,regionAmbiguous:u,confidence:c,warnings:t,batchImportSupported:s===`workbuddy`||s===`kiro`}}function ITe(e){let t;try{t=JSON.parse(e)}catch{throw Error(`bad_json`)}if(Array.isArray(t)){if(t.length===0||!t.every(g9))throw Error(`bad_json`);return{accounts:t}}if(!g9(t))throw Error(`bad_json`);return t}function T9(e,t){let n={...e},r=n.format===`workbuddy-accounts`||Array.isArray(n.accounts);return n.format?r&&(n.format=`workbuddy-accounts`):n.format=r?`workbuddy-accounts`:`workbuddy-oauth-v1`,{...n,name:t.name?.trim()||n.name,enabled:t.enabled??!0,provider:`workbuddy`,region:t.region,max_inflight:t.max_inflight??4,priority:t.priority??50,drop_system_prompt:t.drop_system_prompt??!0,...t.proxy_url!=null&&t.proxy_url!==``?{proxy_url:t.proxy_url}:{}}}function E9(e,t){let n=typeof e?.succeeded==`number`?e.succeeded:e?.id||e?1:0,r=typeof e?.failed==`number`?e.failed:0,i=(e?.errors||[]).slice(0,3).map(e=>e.message||`index ${e.index}`).filter(Boolean).join(`; `),a;return a=r>0?t(`accountImportPartial`).replace(`{ok}`,String(n)).replace(`{fail}`,String(r))+(i?` — ${i}`:``):n>1?t(`accountImportBatch`).replace(`{n}`,String(n)):t(`accountImported`),{succeeded:n,failed:r,message:a}}async function LTe(e,t){return dI(T9(e,t))}var D9={global:`Global`,cn:`CN`},RTe={"qoder-global":`accountTypeQoderGlobal`,"qoder-cn":`accountTypeQoderCN`,"workbuddy-cn":`accountTypeWorkBuddyCN`,"workbuddy-global":`accountTypeWorkBuddyGlobal`,"trae-cn":`accountTypeTraeCN`,"devin-global":`accountTypeDevinGlobal`,"command-global":`accountTypeCommandGlobal`,"codex-global":`accountTypeCodexGlobal`,"zhipu-cn":`accountTypeZhipuCN`,"qwenwork-global":`accountTypeQwenworkGlobal`,"qwenwork-cn":`accountTypeQwenworkCN`,"kimi-cn":`accountTypeKimiCN`,"codearts-cn-north-4":`accountTypeCodeArtsCN`,"kiro-us-east-1":`accountTypeKiroUS`,"kiro-eu-central-1":`accountTypeKiroEU`,"meta-global":`accountTypeMetaGlobal`},zTe={"qoder-global":`accountTypeQoderGlobalHint`,"qoder-cn":`accountTypeQoderCNHint`,"workbuddy-cn":`accountTypeWorkBuddyCNHint`,"workbuddy-global":`accountTypeWorkBuddyGlobalHint`,"trae-cn":`accountTypeTraeCNHint`,"devin-global":`accountTypeDevinGlobalHint`,"command-global":`accountTypeCommandGlobalHint`,"codex-global":`accountTypeCodexGlobalHint`,"zhipu-cn":`accountTypeZhipuCNHint`,"qwenwork-global":`accountTypeQwenworkGlobalHint`,"qwenwork-cn":`accountTypeQwenworkCNHint`,"kimi-cn":`accountTypeKimiCNHint`,"codearts-cn-north-4":`accountTypeCodeArtsCNHint`,"kiro-us-east-1":`accountTypeKiroUSHint`,"kiro-eu-central-1":`accountTypeKiroEUHint`,"meta-global":`accountTypeMetaGlobalHint`};async function BTe(){let e=(await cI().catch(()=>null))?.data||[],t=[];for(let n of e)for(let e of n.regions)t.push({id:`${n.id}-${e.id}`,provider:n.id,region:e.id,descriptor:n});return t}function O9(e,t){let n=RTe[e.id];if(n){let e=t(n);if(e!==n)return e}let r=e.descriptor.regions.find(t=>t.id===e.region)?.label||D9[e.region]||``,i=e.descriptor.regions.length>1&&r?` ${r}`:``;return`${e.descriptor.label}${i}`.trim()}function k9(e,t){if(!e)return``;let n=zTe[e.id];if(!n)return``;let r=t(n);return r===n?``:r}function VTe({phase:e,busy:t,tab:n,forTab:r}){return e===`done`?(0,G.jsx)(Oi,{size:16,className:`text-success`}):t&&n===r?(0,G.jsx)(KB,{size:16,loading:!0}):null}var HTe=90,UTe=2e3;function WTe({isOpen:e,onClose:t,onAdded:n}){let{t:r}=GF(),[i,a]=(0,v.useState)(`method`),[o,s]=(0,v.useState)(`browser`),[c,l]=(0,v.useState)(``),[u,d]=(0,v.useState)([]),[f,p]=(0,v.useState)(!1),[m,h]=(0,v.useState)(!1),[g,_]=(0,v.useState)(``),[y,b]=(0,v.useState)(4),[x,S]=(0,v.useState)(50),[C,w]=(0,v.useState)(!0),[T,E]=(0,v.useState)(``),[D,O]=(0,v.useState)(``),[k,A]=(0,v.useState)(``),[j,M]=(0,v.useState)(`payg`),[N,P]=(0,v.useState)(``),[F,I]=(0,v.useState)(``),[L,R]=(0,v.useState)(``),[z,B]=(0,v.useState)(`idle`),[V,H]=(0,v.useState)(``),[ee,te]=(0,v.useState)(``),[ne,re]=(0,v.useState)(!1),[ie,ae]=(0,v.useState)(``),[oe,se]=(0,v.useState)(`cli`),[ce,le]=(0,v.useState)(`builder_id`),[ue,de]=(0,v.useState)(``),fe=(0,v.useRef)(null),pe=(0,v.useRef)(null),me=(0,v.useRef)(null),he=(0,v.useRef)(``),ge=(0,v.useRef)(null),_e=(0,v.useRef)(null);function ve(){ge.current!==null&&(window.clearTimeout(ge.current),ge.current=null)}(0,v.useEffect)(()=>()=>ve(),[]),(0,v.useEffect)(()=>{if(!e)return;let t=!1;return p(!0),d([]),l(``),BTe().then(e=>{t||(d(e),l(``),s(`browser`))}).finally(()=>{t||p(!1)}),()=>{t=!0}},[e]);let ye=u.find(e=>e.id===c),be=!f&&u.length>0,xe=ye?.descriptor.capabilities?.pat_login!==!1,Se=ye?.descriptor.capabilities?.import_export!==!1,Ce=ye?.descriptor.capabilities?.browser_login!==!1,we=ye?.provider===`workbuddy`||ye?.provider===`trae`,Te=ye?.provider===`trae`||ye?.provider===`devin`||ye?.provider===`codex`||ye?.provider===`codearts`,Ee=z===`busy`||z===`polling`,De=!!he.current||Ee,Oe=z===`done`,ke=k9(ye,r);(0,v.useEffect)(()=>{o===`pat`&&!xe&&s(`browser`),o===`import`&&!Se&&s(`browser`)},[Se,xe,o]),(0,v.useEffect)(()=>{Ce||(xe?s(`pat`):Se&&s(`import`))},[Ce,Se,xe]);function Ae(){return!Number.isInteger(y)||y<1||y>32?4:y}function je(){return!Number.isInteger(x)||x<1||x>100?50:x}function Me(){return{max_inflight:Ae(),priority:je(),drop_system_prompt:we?C:ye?.provider!==`kimi`&&ye?.provider!==`codearts`,proxy_url:T.trim()}}function Ne(){ve(),a(`method`),s(`browser`),l(``),d([]),p(!1),_(``),b(4),S(50),w(!0),E(``),O(``),A(``),M(`payg`),P(``),I(``),R(``),h(!1),B(`idle`),H(``),te(``),re(!1),ae(``),se(`cli`),he.current=``}function Pe(){Ee||(Ne(),t())}function Fe(){Ne(),t()}(0,v.useLayoutEffect)(()=>{let t=fe.current;if(e||(me.current=null),!t||!e)return;let n=Z.context(()=>{let e=Z.matchMedia();e.add(`(prefers-reduced-motion: reduce)`,()=>{Z.set(t,{autoAlpha:1,x:0,y:0})}),e.add(`(prefers-reduced-motion: no-preference)`,()=>{let e=me.current,n=e&&e!==i?i===`login`?1:-1:0;Z.fromTo(t,{autoAlpha:0,x:20*n,y:n?0:12},{autoAlpha:1,x:0,y:0,duration:BB.slow,ease:VB.out,overwrite:!0}),n&&pe.current&&Z.fromTo(pe.current,{autoAlpha:0,y:6},{autoAlpha:1,y:0,duration:BB.base,ease:VB.out,overwrite:!0})})},t);return me.current=i,()=>n.revert()},[e,i]);function Ie(e){if(Ee||!be)return;let t=u.find(t=>t.id===e);l(e),s(t?.provider===`zhipu`?`pat`:`browser`),w(t?.provider!==`trae`&&t?.provider!==`kimi`&&t?.provider!==`codearts`),H(``),a(`login`)}async function Le(){if(he.current)return he.current;if(!ye)throw Error(r(`accountTypeHint`));let e=Me(),t=await dse(g.trim()||r(`account`),ye.provider,ye.region,e),n=t?.id||t?.data?.id;if(!n)throw Error(`create account returned no id`);return he.current=n,n}async function Re(){H(``),te(``);try{B(`busy`);let e=await Le();H(r(`wizardStartingSession`)),B(`polling`);let t=await eI(e,ye?.provider===`codex`?oe:ye?.provider===`kiro`?ce:void 0,ce===`idc`?ue.trim():void 0);t.authUrl&&te(t.authUrl),H(r(`wizardWaitingBrowser`));for(let t=0;t{ge.current=window.setTimeout(e,UTe)});let n=(await tI(e)).login||{};if(n.message&&H(n.message),n.status===`ok`)break;if(n.status===`error`)throw Error(n.message||`login failed`);if(t===89)throw Error(r(`wizardLoginTimeout`))}B(`done`),H(r(`wizardAccountReady`)),n(),window.setTimeout(Fe,900)}catch(e){B(`idle`),H(e instanceof Error?e.message:String(e))}}async function ze(){let e=ie.trim();if(!e){H(r(`wizardCallbackPh`));return}try{B(`busy`);let t=await Le();ve(),await nI(t,e),B(`done`),H(r(`wizardAccountReady`)),n(),window.setTimeout(Fe,900)}catch(e){B(`polling`),H(e instanceof Error?e.message:String(e))}}async function Be(){let e=N.trim();if(!e){H(r(`zhipuKeyRequired`));return}if(!ye){H(r(`accountTypeHint`));return}H(``);try{B(`busy`);let t=Me();await dI({format:`zhipu-key-v1`,api_key:e,mode:j,organization:j===`coding`?F.trim():``,project:j===`coding`?L.trim():``,name:g.trim()||r(`accountTypeZhipuCN`),enabled:!0,provider:ye.provider,region:ye.region,max_inflight:t.max_inflight,priority:t.priority,drop_system_prompt:t.drop_system_prompt,proxy_url:t.proxy_url}),B(`done`),H(r(`wizardAccountReady`)),n(),window.setTimeout(Fe,700)}catch(e){B(`idle`),H(e instanceof Error?e.message:String(e))}}async function Ve(){let e=D.trim();if(!e){H(r(`pastePatFirst`));return}H(``);try{B(`busy`);let t=await Le();H(r(`wizardStartingSession`)),await rI(e,t),B(`done`),H(r(`patDone`)),n(),window.setTimeout(Fe,700)}catch(e){B(`idle`),H(e instanceof Error?e.message:String(e))}}async function He(){H(``);let e;try{e=JSON.parse(k)}catch{H(r(`wizardBadJson`));return}if(Array.isArray(e)){if(!e.every(e=>e&&typeof e==`object`&&!Array.isArray(e))){H(r(`wizardBadJson`));return}e={accounts:e}}if(!e||typeof e!=`object`){H(r(`wizardBadJson`));return}if(!ye){H(r(`accountTypeHint`));return}let t=w9(e),i=t.provider||ye.provider;if(i===`qoder`&&(typeof e.user_blob!=`string`||typeof e.machine_id!=`string`)){H(r(`wizardBadJson`));return}let a=Me(),o;if(i===`kiro`){let t=typeof e.email==`string`?e.email.trim():``,n=typeof e.nickname==`string`?e.nickname.trim():``,r=x9(e),{provider:i,accounts:s,...c}=e,l=Array.isArray(s)?s:[{...c,...i?{provider:i}:{}}];o={format:`kiro-oauth-v1`,provider:`kiro`,region:r||(ye.provider===`kiro`?ye.region:`us-east-1`),name:g.trim()||n||t||void 0,enabled:!0,accounts:l,max_inflight:a.max_inflight,priority:a.priority,drop_system_prompt:a.drop_system_prompt,proxy_url:a.proxy_url}}else if(i===`workbuddy`)o=T9(e,{region:ye.region===`global`?`global`:`cn`,name:g.trim()||void 0,enabled:!0,max_inflight:a.max_inflight,priority:a.priority,drop_system_prompt:a.drop_system_prompt,proxy_url:a.proxy_url});else{if(!e.format){let t=i;t===`trae`?e.format=`trae-oauth-v1`:t===`devin`?e.format=`devin-session-v1`:t===`command`?e.format=`command-key-v1`:t===`qwenwork`?e.format=`qwenwork-oauth-v1`:t===`kimi`?e.format=`kimi-oauth-v1`:t===`codearts`?e.format=`codearts-oauth-v1`:t===`codex`?e.format=`codex-oauth-v1`:t===`meta`?e.format=`meta-oauth-v1`:e.format=`qoder-native-v1`}o={...e,name:g.trim()||e.name,enabled:!0,provider:i,region:t.region||ye.region,max_inflight:a.max_inflight,priority:a.priority,drop_system_prompt:a.drop_system_prompt}}try{B(`busy`);let{failed:e,message:t}=E9(await dI(o),r);B(`done`),H(t),n(),window.setTimeout(Fe,e>0?1600:700)}catch(e){B(`idle`),H(e instanceof Error?e.message:String(e))}}function Ue(){_e.current?.click()}function We(e){let t=e.target.files?.[0];if(!t)return;let n=new FileReader;n.onload=()=>A(String(n.result||``)),n.readAsText(t),e.target.value=``}let Ge=e=>Ee&&o===e,Ke=ye?.provider===`zhipu`,qe=[ye?.descriptor.capabilities?.browser_login===!1?null:{value:`browser`,label:r(`tabBrowser`)},xe?{value:`pat`,label:r(`tabPat`)}:null,Se?{value:`import`,label:r(`tabImport`)}:null].filter(Boolean),Je=r(o===`browser`?ye?.provider===`codex`?`wizardCodexBrowserLead`:`wizardBrowserLead`:o===`pat`?ye?.provider===`command`?`wizardPatLeadCommand`:ye?.region===`cn`&&ye?.provider===`qoder`?`wizardPatLeadCN`:`wizardPatLead`:`wizardImportLead`);return(0,G.jsx)(Y.Root,{isOpen:e,onOpenChange:e=>{e||Pe()},children:(0,G.jsx)(Y.Backdrop,{variant:`blur`,isDismissable:!Ee,children:(0,G.jsx)(Y.Container,{size:`lg`,scroll:`inside`,children:(0,G.jsxs)(Y.Dialog,{className:`w-full sm:w-[36rem] sm:max-w-[calc(100vw-2rem)] sm:min-h-[36rem]`,children:[(0,G.jsxs)(Y.Header,{className:`relative items-center justify-center px-12 pt-5 text-center`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(Y.Heading,{className:`text-section font-semibold`,children:r(`addAccountTitle`)}),(0,G.jsx)(`p`,{ref:pe,className:`mt-1 text-caption font-normal leading-5 text-muted`,children:i===`method`?r(`addAccountDesc`):ke||r(`addAccountDesc`)})]}),(0,G.jsx)(Y.CloseTrigger,{"aria-label":r(`close`),className:`absolute right-4 top-4 grid size-8 shrink-0 place-items-center rounded-lg text-muted transition-colors hover:bg-surface-secondary hover:text-foreground`,children:(0,G.jsx)(yo,{size:16})})]}),(0,G.jsx)(Y.Body,{className:i===`method`?`px-8 pb-5 sm:px-10`:`px-6 pb-2`,children:(0,G.jsx)(`div`,{ref:fe,children:i===`method`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`section`,{className:`space-y-2.5`,children:f?(0,G.jsx)(STe,{ariaLabel:r(`accountType`)}):be?(0,G.jsx)(TTe,{ariaLabel:r(`accountType`),options:u.map(e=>{let t=e.descriptor.regions.find(t=>t.id===e.region)?.label||D9[e.region]||``;return{id:e.id,provider:e.provider,label:O9(e,r),subtitle:t,hint:k9(e,r)}}),onSelect:Ie,disabled:De}):(0,G.jsx)(`p`,{className:`rounded-lg bg-surface-secondary/45 px-3.5 py-3 text-caption leading-5 text-muted`,children:r(`accountTypeHint`)})}),(0,G.jsx)(`div`,{className:`mt-4 text-center`,children:(0,G.jsx)(K7,{className:`text-xs`})})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{className:`card flex flex-row items-center gap-3 rounded-xl bg-surface px-3 py-2.5`,children:[(0,G.jsx)(`span`,{className:`shrink-0`,children:(0,G.jsx)(WV,{provider:ye?.provider,size:18})}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsx)(`div`,{className:`truncate text-body font-medium text-foreground`,children:ye?O9(ye,r):r(`accountType`)}),(0,G.jsx)(`div`,{className:`truncate text-caption text-muted`,children:ke})]}),(0,G.jsxs)(J,{size:`sm`,variant:`ghost`,onPress:()=>a(`method`),isDisabled:Ee||!!he.current,children:[(0,G.jsx)(mi,{size:12}),r(`wizardBack`)]})]}),(0,G.jsxs)(`div`,{className:`mt-4 space-y-3`,children:[(0,G.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,G.jsx)(kM,{className:`text-body font-medium text-muted`,children:r(`accountName`)}),(0,G.jsx)(Ij,{fullWidth:!0,value:g,onChange:e=>_(e.target.value),"aria-label":r(`accountName`),disabled:De,autoFocus:!0})]}),(0,G.jsxs)(`button`,{type:`button`,onClick:()=>h(e=>!e),"aria-expanded":m,className:`inline-flex items-center gap-1 text-caption font-medium text-muted transition-colors hover:text-foreground`,children:[(0,G.jsx)(gi,{size:12,className:`transition-transform duration-200 ${m?`rotate-90`:``}`}),r(`wizardAdvanced`)]}),m?(0,G.jsxs)(`div`,{className:`card gap-3 rounded-xl bg-surface px-3.5 py-3.5`,children:[(0,G.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,children:[(0,G.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,G.jsx)(kM,{className:`text-body font-medium text-muted`,children:r(`maxInflight`)}),(0,G.jsx)(OP,{value:y,onChange:e=>b(e??4),minValue:1,maxValue:32,isDisabled:De,isRequired:!0,children:(0,G.jsxs)(OP.Group,{className:`w-full`,children:[(0,G.jsx)(OP.DecrementButton,{}),(0,G.jsx)(OP.Input,{"aria-label":r(`maxInflight`)}),(0,G.jsx)(OP.IncrementButton,{})]})}),(0,G.jsx)(jM,{className:`text-caption leading-5 text-muted`,children:r(`maxInflightHint`)})]}),(0,G.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,G.jsx)(kM,{className:`text-body font-medium text-muted`,children:r(`priority`)}),(0,G.jsx)(OP,{value:x,onChange:e=>S(e??50),minValue:1,maxValue:100,isDisabled:De,isRequired:!0,children:(0,G.jsxs)(OP.Group,{className:`w-full`,children:[(0,G.jsx)(OP.DecrementButton,{}),(0,G.jsx)(OP.Input,{"aria-label":r(`priority`)}),(0,G.jsx)(OP.IncrementButton,{})]})}),(0,G.jsx)(jM,{className:`text-caption leading-5 text-muted`,children:r(`priorityHint`)})]})]}),(0,G.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,G.jsx)(kM,{className:`text-body font-medium text-muted`,children:r(`proxyUrl`)}),(0,G.jsx)(Ij,{fullWidth:!0,value:T,onChange:e=>E(e.target.value),placeholder:r(`proxyUrlPlaceholder`),"aria-label":r(`proxyUrl`),disabled:De}),(0,G.jsx)(jM,{className:`text-caption leading-5 text-muted`,children:r(`proxyUrlHint`)})]}),we?(0,G.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,G.jsx)(kM,{className:`text-body font-medium text-muted`,children:r(`dropSystemPrompt`)}),(0,G.jsx)(jM,{className:`text-caption leading-5 text-muted`,children:r(ye?.provider===`trae`?`dropSystemPromptTraeHint`:`dropSystemPromptCreateHint`)}),(0,G.jsx)(s7,{isSelected:C,isDisabled:De,ariaLabel:r(`dropSystemPrompt`),onChange:w})]}):null]}):null]}),Ke?(0,G.jsxs)(`div`,{className:`mt-4 flex flex-col gap-4`,children:[(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsx)(`span`,{className:`text-body font-medium text-muted`,children:r(`zhipuAccountMode`)}),(0,G.jsx)(d9,{ariaLabel:r(`zhipuAccountMode`),columns:2,value:j,onChange:e=>{Ee||M(e)},options:[{value:`payg`,label:r(`zhipuModePayg`),hint:r(`zhipuModePaygHint`),disabled:Ee},{value:`coding`,label:r(`zhipuModeCoding`),hint:r(`zhipuModeCodingHint`),disabled:Ee}]})]}),(0,G.jsx)(u9,{label:r(`zhipuApiKey`),children:(0,G.jsx)(Ij,{type:`password`,value:N,onChange:e=>P(e.target.value),placeholder:r(`zhipuApiKeyPh`),"aria-label":r(`zhipuApiKey`),disabled:Ee})}),j===`coding`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(u9,{label:r(`zhipuOrganization`),children:(0,G.jsx)(Ij,{value:F,onChange:e=>I(e.target.value),placeholder:r(`zhipuOrganizationPh`),"aria-label":r(`zhipuOrganization`),disabled:Ee})}),(0,G.jsx)(u9,{label:r(`zhipuProject`),children:(0,G.jsx)(Ij,{value:L,onChange:e=>R(e.target.value),placeholder:r(`zhipuProjectPh`),"aria-label":r(`zhipuProject`),disabled:Ee})})]}):null,V?(0,G.jsxs)(`p`,{className:`flex items-center gap-2 rounded-lg bg-surface-secondary px-3 py-2 text-caption`,children:[Oe?(0,G.jsx)(Oi,{size:14,className:`shrink-0 text-success`}):null,(0,G.jsx)(`span`,{className:Oe?`font-medium text-foreground`:`text-muted`,children:V})]}):null]}):null,Ke?null:(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(wV,{className:`mt-3`,value:o,onChange:e=>{!Ee&&e!==o&&(s(e),H(``),te(``),re(!1))},ariaLabel:r(`authentication`),options:qe.map(e=>({id:e.value,label:e.label}))}),(0,G.jsx)(`p`,{className:`mt-2 min-h-5 text-caption leading-5 text-muted`,children:Je}),(0,G.jsx)(`div`,{className:`mt-3 flex flex-col gap-4`,children:o===`browser`?(0,G.jsxs)(G.Fragment,{children:[ye?.provider===`codex`?(0,G.jsx)(d9,{ariaLabel:r(`codexLoginMethod`),columns:2,value:oe,onChange:e=>{Ee||se(e)},options:[{value:`cli`,label:r(`codexLoginCli`),hint:r(`codexLoginCliHint`),disabled:Ee||!!he.current},{value:`chatgpt`,label:r(`codexLoginChatGPT`),hint:r(`codexLoginChatGPTHint`),disabled:Ee||!!he.current}]}):null,ye?.provider===`kiro`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(d9,{ariaLabel:r(`kiroLoginMethod`),columns:2,value:ce,onChange:e=>{Ee||le(e)},options:[{value:`builder_id`,label:r(`kiroLoginBuilder`),hint:r(`kiroLoginBuilderHint`),disabled:Ee||!!he.current},{value:`idc`,label:r(`kiroLoginIDC`),hint:r(`kiroLoginIDCHint`),disabled:Ee||!!he.current},{value:`sso`,label:r(`kiroLoginSSO`),hint:r(`kiroLoginSSOHint`),disabled:Ee||!!he.current},{value:`microsoft`,label:r(`kiroLoginMicrosoft`),hint:r(`kiroLoginMicrosoftHint`),disabled:Ee||!!he.current}]}),ce===`idc`?(0,G.jsx)(u9,{label:r(`kiroIDCStartURL`),children:(0,G.jsx)(Ij,{value:ue,onChange:e=>de(e.target.value),placeholder:r(`kiroIDCStartURLPh`),"aria-label":r(`kiroIDCStartURL`),disabled:Ee})}):null]}):null,ee?(0,G.jsxs)(`div`,{className:`card rounded-xl bg-surface px-3 py-2.5`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2 text-caption`,children:[(0,G.jsx)(VTe,{phase:z,busy:Ee,tab:o,forTab:`browser`}),(0,G.jsx)(`span`,{className:`text-muted`,children:V||r(`loginOpenMsg`)})]}),(0,G.jsx)(`code`,{className:`mono mt-2 block break-all text-caption leading-5 text-foreground`,children:ee}),(0,G.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:[(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,onPress:()=>window.open(ee,`_blank`,`noopener,noreferrer`),children:[(0,G.jsx)(ni,{size:14}),r(`openAuthUrl`)]}),(0,G.jsxs)(J,{size:`sm`,variant:`ghost`,onPress:()=>{U7(ee).then(e=>{e&&(re(!0),window.setTimeout(()=>re(!1),1100))})},children:[(0,G.jsx)(H7,{copied:ne}),r(ne?`copied`:`copy`)]})]})]}):null,V&&!ee?(0,G.jsxs)(`p`,{className:`flex items-center gap-2 rounded-lg bg-surface-secondary px-3 py-2 text-caption`,children:[Oe?(0,G.jsx)(Oi,{size:14,className:`shrink-0 text-success`}):null,(0,G.jsx)(`span`,{className:Oe?`font-medium text-foreground`:`text-muted`,children:V})]}):null,Te?(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsx)(`p`,{className:`text-caption leading-4 text-muted`,children:r(`wizardCallbackLead`)}),(0,G.jsx)(Vj,{className:`h-28 w-full resize-none font-mono text-caption leading-5`,value:ie,onChange:e=>ae(e.target.value),placeholder:r(`wizardCallbackPh`),"aria-label":r(`wizardCallbackPh`),disabled:Oe}),(0,G.jsx)(J,{size:`sm`,variant:`secondary`,isPending:z===`busy`&&!!ie.trim(),onPress:()=>void ze(),isDisabled:Oe,children:r(`wizardSubmitCallback`)})]}):null]}):o===`pat`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(u9,{label:r(`tabPat`),children:(0,G.jsx)(Ij,{type:`password`,value:D,onChange:e=>O(e.target.value),placeholder:r(`wizardPatPh`),"aria-label":r(`wizardPatPh`),disabled:Ee})}),V?(0,G.jsxs)(`p`,{className:`flex items-center gap-2 rounded-lg bg-surface-secondary px-3 py-2 text-caption`,children:[Oe?(0,G.jsx)(Oi,{size:14,className:`shrink-0 text-success`}):null,(0,G.jsx)(`span`,{className:Oe?`font-medium text-foreground`:`text-muted`,children:V})]}):null]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,G.jsx)(`span`,{className:`text-caption font-medium text-muted`,children:`JSON`}),(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,onPress:Ue,isDisabled:Ee,children:[(0,G.jsx)(Xi,{size:13}),r(`wizardChooseFile`)]}),(0,G.jsx)(`input`,{ref:_e,type:`file`,accept:`application/json,.json`,className:`hidden`,onChange:We})]}),(0,G.jsx)(Vj,{className:`min-h-32 font-mono text-caption`,value:k,onChange:e=>A(e.target.value),placeholder:r(`wizardImportPh`),"aria-label":r(`tabImport`),disabled:Ee}),V?(0,G.jsxs)(`p`,{className:`flex items-center gap-2 rounded-lg bg-surface-secondary px-3 py-2 text-caption`,children:[Oe?(0,G.jsx)(Oi,{size:14,className:`shrink-0 text-success`}):null,(0,G.jsx)(`span`,{className:Oe?`font-medium text-foreground`:`text-muted`,children:V})]}):null]})})]})]})})}),(0,G.jsxs)(Y.Footer,{className:`justify-end gap-2 px-5 pb-5`,children:[(0,G.jsx)(J,{variant:`ghost`,onPress:Pe,isDisabled:Ee,children:r(`cancel`)}),i===`login`&&Ke?(0,G.jsx)(J,{isPending:z===`busy`,onPress:()=>void Be(),isDisabled:Oe,children:Oe?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Oi,{size:15}),r(`wizardAccountReady`)]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(ua,{size:15}),r(`zhipuCreate`)]})}):null,i===`login`&&!Ke&&o===`browser`?(0,G.jsx)(J,{isPending:Ge(`browser`),onPress:()=>void Re(),isDisabled:Oe,children:Oe?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Oi,{size:15}),r(`wizardAccountReady`)]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Ia,{size:15}),r(`wizardStartBrowser`)]})}):null,i===`login`&&!Ke&&o===`pat`?(0,G.jsx)(J,{isPending:Ge(`pat`),onPress:()=>void Ve(),isDisabled:Oe,children:Oe?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Oi,{size:15}),r(`patDone`)]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(ua,{size:15}),r(`wizardCreateAndLogin`)]})}):null,i===`login`&&!Ke&&o===`import`?(0,G.jsx)(J,{isPending:Ge(`import`),onPress:()=>void He(),isDisabled:Oe,children:Oe?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Oi,{size:15}),r(`accountImported`)]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Xi,{size:15}),r(`importCredential`)]})}):null]})]})})})})}function A9({isOpen:e,title:t,description:n,confirmLabel:r,cancelLabel:i,closeLabel:a,isPending:o,status:s=`danger`,confirmVariant:c=`danger`,onClose:l,onConfirm:u}){return(0,G.jsx)(Gb.Root,{isOpen:e,onOpenChange:e=>{!e&&!o&&l()},children:(0,G.jsx)(Gb.Backdrop,{variant:`blur`,isDismissable:!o,children:(0,G.jsx)(Gb.Container,{placement:`center`,size:`sm`,children:(0,G.jsxs)(Gb.Dialog,{children:[(0,G.jsxs)(Gb.Header,{className:`items-start justify-between gap-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,G.jsx)(Gb.Icon,{status:s}),(0,G.jsx)(`div`,{children:(0,G.jsx)(Gb.Heading,{children:t})})]}),(0,G.jsx)(Gb.CloseTrigger,{isDisabled:o,"aria-label":a})]}),(0,G.jsx)(Gb.Body,{children:(0,G.jsx)(`p`,{className:`text-body leading-6 text-muted`,children:n})}),(0,G.jsxs)(Gb.Footer,{children:[(0,G.jsx)(J,{size:`sm`,variant:`ghost`,isDisabled:o,onPress:l,children:i}),(0,G.jsx)(J,{size:`sm`,variant:c,isPending:o,onPress:u,children:r})]})]})})})})}function GTe(e,t){return e===`region_mixed`?t(`batchImportRegionMixed`):e===`region_unknown`?t(`batchImportRegionUnknown`):e===`unknown_format`?t(`batchImportUnknownFormat`):``}function KTe({isOpen:e,detection:t,fileName:n,isPending:r,t:i,onClose:a,onConfirm:o}){let s=t?.provider===`kiro`?[`us-east-1`,`eu-central-1`]:[`cn`,`global`],[c,l]=(0,v.useState)(t?.region&&s.includes(t.region)?t.region:s[0]);(0,v.useEffect)(()=>{if(!t)return;let e=t.provider===`kiro`?[`us-east-1`,`eu-central-1`]:[`cn`,`global`];t.region&&e.includes(t.region)?l(t.region):l(e[0])},[t]);let u=!!t?.batchImportSupported,d=t?.provider,f=t?.format||i(`batchImportFormatUnknown`),p=d?HV(d,i):i(`batchImportProviderUnknown`),m=(t?.warnings||[]).map(e=>GTe(e,i)).filter(Boolean);return(0,G.jsx)(Y.Root,{isOpen:e,onOpenChange:e=>{!e&&!r&&a()},children:(0,G.jsx)(Y.Backdrop,{variant:`blur`,isDismissable:!r,children:(0,G.jsx)(Y.Container,{placement:`center`,size:`md`,scroll:`inside`,className:`mx-3 w-full max-w-[min(100%,32rem)] sm:mx-0`,children:(0,G.jsxs)(Y.Dialog,{children:[(0,G.jsxs)(Y.Header,{className:`items-start justify-between gap-4 px-6 pt-6`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(Y.Heading,{className:`text-section font-semibold`,children:i(`batchImportConfirmTitle`)}),(0,G.jsx)(`p`,{className:`mt-1 break-all text-caption leading-5 text-muted`,children:n?i(`batchImportConfirmHint`,{file:n}):i(`batchImportConfirmHintNoFile`)})]}),(0,G.jsx)(Y.CloseTrigger,{isDisabled:r,"aria-label":i(`close`),className:`grid size-8 shrink-0 place-items-center rounded-lg text-muted transition-colors hover:bg-surface-secondary hover:text-foreground`,children:(0,G.jsx)(yo,{size:16})})]}),(0,G.jsxs)(Y.Body,{className:`space-y-4 px-6 pb-2`,children:[(0,G.jsx)(`div`,{className:`rounded-xl bg-surface-secondary px-3.5 py-3`,children:(0,G.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[d?(0,G.jsx)(WV,{provider:d,size:18}):null,(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(`div`,{className:`text-body font-medium text-foreground`,children:p}),(0,G.jsx)(`div`,{className:`mono mt-0.5 truncate text-caption text-muted`,children:f})]})]})}),u?(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsx)(`div`,{className:`text-body font-medium text-muted`,children:i(d===`kiro`?`batchImportKiroRegion`:`batchImportRegion`)}),(0,G.jsx)(wV,{value:c,onChange:e=>{s.includes(e)&&l(e)},ariaLabel:i(d===`kiro`?`batchImportKiroRegion`:`batchImportRegion`),options:d===`kiro`?[{id:`us-east-1`,label:i(`accountTypeKiroUS`)},{id:`eu-central-1`,label:i(`accountTypeKiroEU`)}]:[{id:`cn`,label:i(`accountTypeWorkBuddyCN`)},{id:`global`,label:i(`accountTypeWorkBuddyGlobal`)}]}),t?.regionAmbiguous?(0,G.jsx)(`p`,{className:`text-caption leading-5 text-muted`,children:i(d===`kiro`?`batchImportKiroRegionPickHint`:`batchImportRegionPickHint`)}):null]}):(0,G.jsx)(`p`,{className:`text-body leading-6 text-muted`,children:i(`batchImportProviderUnsupported`)}),m.length?(0,G.jsx)(`ul`,{className:`space-y-1 text-caption leading-5 text-muted`,children:m.map(e=>(0,G.jsx)(`li`,{children:e},e))}):null]}),(0,G.jsxs)(Y.Footer,{className:`flex-col-reverse gap-2 px-6 pb-6 sm:flex-row sm:justify-end`,children:[(0,G.jsx)(J,{size:`sm`,variant:`ghost`,className:`w-full sm:w-auto`,isDisabled:r,onPress:a,children:i(u?`cancel`:`close`)}),u?(0,G.jsx)(J,{size:`sm`,className:`w-full sm:w-auto`,isPending:r,onPress:()=>o(c),children:i(`batchImportConfirmAction`)}):null]})]})})})})}function qTe(e){if(!Array.isArray(e.accounts))return[e];let t=e.accounts.filter(e=>!!e&&typeof e==`object`&&!Array.isArray(e)&&S9(e));return t.length>0?t:[e]}function JTe(e,t){let n=qTe(e),r=n.find(e=>typeof e.nickname==`string`||typeof e.email==`string`),i=typeof r?.nickname==`string`?r.nickname.trim():``,a=typeof r?.email==`string`?r.email.trim():``;return{format:`kiro-oauth-v1`,provider:`kiro`,region:x9(n[0]||e)||t,enabled:!0,name:n.length===1&&(i||a)||void 0,accounts:n.map(e=>({...e,region:x9(e)||t}))}}var j9=`__all__`,YTe=[],M9=2;function XTe(){let{t:e}=GF(),[t,n]=(0,v.useState)([]),[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)([]),[l,u]=(0,v.useState)(!0),d=s,f=d.length>0,[p,m]=(0,v.useState)(!1),[h,g]=(0,v.useState)(!1),[_,y]=(0,v.useState)(!1),[b,x]=(0,v.useState)(null),[S,C]=(0,v.useState)(null),[w,T]=(0,v.useState)(``),[E,D]=(0,v.useState)(null),[O,k]=(0,v.useState)({}),[A,j]=(0,v.useState)({}),[M,N]=(0,v.useState)({}),[P,F]=(0,v.useState)({}),[I,L]=(0,v.useState)({}),[R,z]=(0,v.useState)(null),[B,V]=(0,v.useState)(null),[H,ee]=(0,v.useState)(null),[te,ne]=(0,v.useState)(null),[re,ie]=(0,v.useState)(null),[ae,oe]=(0,v.useState)(``),[se,ce]=(0,v.useState)(`all`),[le,ue]=(0,v.useState)(``),[de,fe]=(0,v.useState)(1),[pe,me]=(0,v.useState)(20),[he,ge]=(0,v.useState)({}),[_e,ve]=(0,v.useState)({}),[ye,be]=(0,v.useState)({}),[xe,Se]=(0,v.useState)({}),[Ce,we]=(0,v.useState)(!1),[Te,Ee]=(0,v.useState)(!1),De=(0,v.useCallback)(async(e=!1)=>{try{let t=(await $F(e)).data||YTe;return c(t),t}finally{u(!1)}},[]),Oe=(0,v.useCallback)(async(e,t=!0)=>{let n=[...new Set(e)];if(!n.length)return{total:0,failed:0,errors:[]};let r=n.length,i=new Map;for(let e=0;e{try{let n=await ase(e,{quota:t});c(t=>t.map(t=>t.id===e?n:t))}catch(t){let n=t instanceof Error?t.message:String(t);i.set(e,n),N(t=>({...t,[e]:n}))}}))}return{total:r,failed:i.size,errors:[...i.values()]}},[]);(0,v.useEffect)(()=>{De(!1).catch(()=>void 0)},[De]),(0,v.useEffect)(()=>{let e=!0;return Promise.all([cI(),yI()]).then(([t,r])=>{e&&(n(t.data||[]),i(r))}).catch(t=>{e&&o(t instanceof Error?t.message:String(t))}),()=>{e=!1}},[]),(0,v.useEffect)(()=>{let e=!0;return De(!1).then(t=>{if(e)return Oe((t||[]).map(e=>e.id))}).catch(()=>void 0),()=>{e=!1}},[De,Oe]);function ke(e){return t.find(t=>t.id===e.provider)?.regions.find(t=>t.id===e.region)?.checkin}function Ae(e){let t=ke(e)?.timezone,n=t===`Local`?r?.timezone:t;if(!(!n||n===`Local`))try{return Intl.DateTimeFormat(`en-CA`,{timeZone:n}),n}catch{return}}let je=(0,v.useMemo)(()=>d.map(e=>{let t=he[e.id],n=_e[e.id],r=ye[e.id],i=xe[e.id],a=e;return t!==void 0&&(a={...a,enabled:t}),n!==void 0&&(a={...a,name:n}),r!==void 0&&(a={...a,max_inflight:r}),i!==void 0&&(a={...a,priority:i}),a}),[he,ye,_e,xe,d]),Me=(0,v.useMemo)(()=>{let e={all:je.length,available:0,attention:0,disabled:0};for(let t of je){let n=a9(t);n===`hot`||n===`ready`?e.available+=1:n===`disabled`&&(e.disabled+=1),t.enabled&&n!==`hot`&&n!==`ready`&&(e.attention+=1)}return e},[je]),Ne=(0,v.useMemo)(()=>{let e=new Map;for(let t of je){let n=String(t.provider||`qoder`).toLowerCase();e.set(n,(e.get(n)||0)+1)}return[...e.entries()].sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0]))},[je]),Pe=je.find(e=>e.id===R),Fe=je.find(e=>e.id===B)||null,Ie=je.find(e=>e.id===H)||null,Le=je.find(e=>e.id===te)||null,Re=(0,v.useMemo)(()=>{let e=ae.trim().toLowerCase();return je.filter(t=>{let n=a9(t);return!(se===`all`||se===`available`&&(n===`hot`||n===`ready`)||se===`attention`&&t.enabled&&n!==`hot`&&n!==`ready`||se===`disabled`&&n===`disabled`)||le&&String(t.provider||`qoder`).toLowerCase()!==le?!1:!e||[t.name,t.id,t.remote_uid,t.provider,t.auth_type].some(t=>String(t||``).toLowerCase().includes(e))})},[je,se,le,ae]),ze=[ae,se,le,pe].join(`\0`),[Be,Ve]=(0,v.useState)(ze);Be!==ze&&(Ve(ze),fe(1));let He=Math.max(1,Math.ceil(Re.length/pe)),Ue=Math.min(Be===ze?Math.max(1,de):1,He);de!==Ue&&fe(Ue);let We=(0,v.useMemo)(()=>{let e=(Ue-1)*pe;return Re.slice(e,e+pe)},[Ue,Re,pe]);if(l&&!f)return(0,G.jsx)(Rce,{});async function Ge(e,t,n){D({id:e,kind:t}),N(t=>({...t,[e]:``}));try{return await n(),!0}catch(t){return N(n=>({...n,[e]:t instanceof Error?t.message:String(t)})),!1}finally{D(null)}}async function Ke(t,n){ie(t),await Ge(t,`device`,async()=>{N(n=>({...n,[t]:e(`wizardStartingSession`)}));let r=await eI(t,n);r.authUrl&&L(e=>({...e,[t]:r.authUrl||``}));for(let n=0;n<60;n++){await new Promise(e=>window.setTimeout(e,2e3));let n=(await tI(t)).login||{};if(N(r=>({...r,[t]:n.message||e(`waitingQoderLogin`)})),n.status===`ok`||n.status===`error`)break}await De(!1),await Oe([t])})}async function qe(t){let n=(A[t]||``).trim();if(!n){N(n=>({...n,[t]:e(`wizardCallbackPh`)}));return}await Ge(t,`callback`,async()=>{N(n=>({...n,[t]:e(`wizardStartingSession`)})),await nI(t,n),j(e=>({...e,[t]:``})),await De(!1),await Oe([t])})&&(ie(e=>e===t?null:e),N(e=>({...e,[t]:``})))}async function Je(t){let n=(O[t]||``).trim();if(!n){N(n=>({...n,[t]:e(`pastePatFirst`)}));return}await Ge(t,`pat`,async()=>{N(n=>({...n,[t]:e(`wizardStartingSession`)})),await rI(n,t),k(e=>({...e,[t]:``})),await De(!1),await Oe([t])})}async function Ye(t){await Ge(t,`export`,async()=>{let n=await mse(t);await U7(JSON.stringify(n,null,2)),N(n=>({...n,[t]:e(`credentialCopied`)}))})}async function Xe(e,t){ge(n=>({...n,[e]:t})),await Ge(e,`toggle`,async()=>{await uI(e,{enabled:t}),await De(!1)}),ge(t=>{let n={...t};return delete n[e],n})}async function Ze(t){sV({id:`refresh-${t}`,type:`loading`,title:e(`toastRefreshingAccount`)}),D({id:t,kind:`refresh`}),N(e=>{let n={...e};return delete n[t],n});try{let n=await Oe([t]);if(n.failed>0){sV({id:`refresh-${t}`,type:`error`,title:e(`toastFailed`),description:n.errors[0]||e(`toastFailed`)});return}sV({id:`refresh-${t}`,type:`success`,title:e(`toastAccountRefreshed`)})}finally{D(null)}}async function Qe(){we(!0),sV({id:`refresh-credits`,type:`loading`,title:e(`toastRefreshingCredits`)});try{let t=await Oe(s.map(e=>e.id));if(t.failed>0){let n=t.failed0&&r===0?`error`:i>0?`info`:`success`,title:a}),y(!1),x(null),C(null),T(``),r>0&&await De(!1)}catch(t){sV({id:n,type:`error`,title:e(`toastFailed`),description:t instanceof Error?t.message:String(t)})}finally{g(!1)}}async function nt(e,t){await Ge(e,`toggle`,async()=>{await uI(e,{auto_checkin:t}),await De(!1)})}function rt(e){return o9(e,Ae(e))}async function it(){let t,n;try{t=je.filter(e=>e.enabled&&ke(e)),n=t.filter(e=>!rt(e))}catch(t){sV({id:`checkin-all`,type:`error`,title:e(`toastFailed`),description:t instanceof Error?t.message:String(t)});return}if(t.length===0){sV({id:`checkin-all`,type:`info`,title:e(`checkinAllEmpty`)});return}if(n.length===0){sV({id:`checkin-all`,type:`success`,title:e(`checkinAllDone`,{count:t.length})});return}sV({id:`checkin-all`,type:`loading`,title:e(`toastCheckingInAll`,{done:0,total:n.length})}),Ee(!0);let r={checked:0,skipped:t.length-n.length,failed:0};try{for(let t=0;t0&&await new Promise(e=>setTimeout(e,4e3));try{let i=await lI(n[t].id),a=i?.last_checkin_status,o=i?.last_checkin_msg,s=a===`already`?`already`:a===`skipped`?`skipped`:a===`error`?`error`:`success`;s===`error`||s===`skipped`?r.failed+=1:r.checked+=1,F(r=>({...r,[n[t].id]:{kind:s,message:s===`error`?o||e(`checkinRecordFailed`):o}}))}catch(e){r.failed+=1,F(r=>({...r,[n[t].id]:{kind:`error`,message:e instanceof Error?e.message:String(e)}}))}tvoid 0)}}async function at(t){await Ge(t,`checkin`,async()=>{let n;try{n=await lI(t)}catch(e){F(n=>({...n,[t]:{kind:`error`,message:e instanceof Error?e.message:String(e)}})),await De(!1).catch(()=>void 0),await Oe([t]).catch(()=>void 0);return}let r=n?.last_checkin_status,i=n?.last_checkin_msg,a=r===`already`?`already`:r===`skipped`?`skipped`:r===`error`?`error`:`success`;F(n=>({...n,[t]:{kind:a,message:a===`error`?i||e(`checkinRecordFailed`):i}})),await De(!1).catch(()=>void 0),await Oe([t]).catch(()=>void 0)})}async function ot(t,n){if(!t)throw Error(e(`accountNameRequired`));ve(e=>({...e,[t]:n.name})),be(e=>({...e,[t]:n.max_inflight})),Se(e=>({...e,[t]:n.priority})),D({id:t,kind:`settings`});try{await uI(t,n),await De(!1)}catch(e){throw e instanceof Error?e:Error(String(e))}finally{D(null),ve(e=>{let n={...e};return delete n[t],n}),be(e=>{let n={...e};return delete n[t],n}),Se(e=>{let n={...e};return delete n[t],n})}}return(0,G.jsxs)(`div`,{className:`space-y-4`,children:[a?(0,G.jsx)(vI,{title:a}):null,(0,G.jsxs)(`section`,{"data-gsap-reveal":!0,className:`flex flex-wrap items-center gap-2`,children:[d.length?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(wV,{value:se,onChange:e=>ce(e),ariaLabel:e(`accountStatusFilter`),options:[{id:`all`,label:(0,G.jsxs)(G.Fragment,{children:[e(`filterAll`),(0,G.jsx)(`span`,{className:`mono text-muted`,children:Me.all})]})},{id:`available`,label:(0,G.jsxs)(G.Fragment,{children:[e(`availableAccounts`),(0,G.jsx)(`span`,{className:`mono text-muted`,children:Me.available})]})},{id:`attention`,label:(0,G.jsxs)(G.Fragment,{children:[e(`needsAttention`),(0,G.jsx)(`span`,{className:`mono ${Me.attention?`text-danger`:`text-muted`}`,children:Me.attention})]})},{id:`disabled`,label:(0,G.jsxs)(G.Fragment,{children:[e(`disabled`),(0,G.jsx)(`span`,{className:`mono text-muted`,children:Me.disabled})]})}]}),(0,G.jsxs)(UP,{className:`w-48`,"aria-label":e(`providerFilterAll`),value:le||j9,onChange:e=>{typeof e==`string`&&ue(e===j9?``:e)},children:[(0,G.jsxs)(UP.Trigger,{className:`items-center`,children:[(0,G.jsx)(UP.Value,{className:`min-w-0 truncate`}),(0,G.jsx)(UP.Indicator,{})]}),(0,G.jsx)(UP.Popover,{children:(0,G.jsxs)(yP,{children:[(0,G.jsxs)(yP.Item,{id:j9,textValue:e(`providerFilterAll`),children:[(0,G.jsxs)(kM,{className:`flex items-center gap-2`,children:[e(`providerFilterAll`),(0,G.jsx)(`span`,{className:`mono text-muted`,children:d.length})]}),(0,G.jsx)(yP.ItemIndicator,{})]}),Ne.map(([t,n])=>(0,G.jsxs)(yP.Item,{id:t,textValue:HV(t,e),children:[(0,G.jsxs)(kM,{className:`flex items-center gap-2`,children:[(0,G.jsx)(WV,{provider:t,size:13}),HV(t,e),(0,G.jsx)(`span`,{className:`mono text-muted`,children:n})]}),(0,G.jsx)(yP.ItemIndicator,{})]},t))]})})]}),(0,G.jsx)(M7,{className:`w-full sm:w-60`,value:ae,onChange:oe,placeholder:e(`searchAccounts`),ariaLabel:e(`searchAccounts`)})]}):null,(0,G.jsxs)(`div`,{className:`flex w-full flex-wrap items-center justify-end gap-2 sm:ml-auto sm:w-auto`,children:[(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,isPending:Te,isDisabled:Ce,onPress:()=>void it(),children:[(0,G.jsx)(fi,{size:14}),e(`checkinAll`)]}),(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,isPending:Ce,isDisabled:Te,onPress:()=>void Qe(),children:[(0,G.jsx)(oi,{size:14}),e(`refreshCredits`)]}),(0,G.jsxs)(`label`,{htmlFor:`accounts-batch-import-file`,className:`button button--sm button--secondary inline-flex items-center gap-1.5 ${h||_?`pointer-events-none opacity-60`:`cursor-pointer`}`,children:[h?(0,G.jsx)(KB,{size:14,loading:!0}):(0,G.jsx)(uo,{size:14}),e(`batchImport`)]}),(0,G.jsx)(`input`,{id:`accounts-batch-import-file`,type:`file`,accept:`.json,application/json,text/json`,disabled:h||_,className:`sr-only`,onChange:e=>void et(e)}),(0,G.jsxs)(J,{size:`sm`,onPress:()=>m(!0),children:[(0,G.jsx)(Ma,{size:14}),e(`addAccount`)]})]})]}),(0,G.jsx)(WTe,{isOpen:p,onClose:()=>m(!1),onAdded:()=>{sV({type:`success`,title:e(`toastAccountAdded`)}),De(!1)}}),(0,G.jsx)(KTe,{isOpen:_,detection:b,fileName:w,isPending:h,t:e,onClose:$e,onConfirm:e=>{tt(e)}}),(0,G.jsx)(mTe,{account:Fe,t:e,onClose:()=>V(null)},B??`closed`),(0,G.jsx)(fTe,{account:Ie,t:e,onClose:()=>ee(null)},H??`closed`),(0,G.jsx)(vTe,{account:Le,checkinDefaultTime:Le&&ke(Le)?r?.checkin_times[Le.provider||``]:void 0,checkinTimezone:Le?Ae(Le):void 0,busy:!!(E&&E.id===te&&E.kind===`settings`),t:e,onClose:()=>ne(null),onSave:e=>ot(te||``,e)},te??`closed`),(0,G.jsx)(A9,{isOpen:!!Pe,title:e(`delete`),description:e(`deleteAccountConfirm`,{name:Pe?.name||Pe?.id||``}),confirmLabel:e(`delete`),cancelLabel:e(`cancel`),closeLabel:e(`close`),isPending:E?.id===R&&E.kind===`delete`,onClose:()=>z(null),onConfirm:()=>{if(!Pe)return;let t=Pe.id;z(null),Ge(t,`delete`,async()=>{await pse(t),await De(!1)}).then(t=>{t&&sV({type:`success`,title:e(`toastAccountDeleted`)})})}}),f?null:(0,G.jsxs)(`div`,{className:`space-y-3`,children:[(0,G.jsx)(O7,{className:`rounded-3xl bg-surface-secondary`,icon:(0,G.jsx)(KB,{size:28}),title:e(`noAccounts`),hint:e(`accountEmptyHint`),action:(0,G.jsxs)(J,{size:`sm`,onPress:()=>m(!0),children:[(0,G.jsx)(Ma,{size:14}),e(`addAccount`)]})}),(0,G.jsx)(`div`,{className:`text-center`,children:(0,G.jsx)(K7,{})})]}),f&&!Re.length?(0,G.jsx)(O7,{className:`rounded-3xl bg-surface-secondary`,icon:(0,G.jsx)(va,{size:22}),title:e(`noAccountsMatch`),action:(0,G.jsx)(J,{size:`sm`,variant:`ghost`,onPress:()=>{oe(``),ce(`all`),ue(``)},children:e(`clearFilters`)})}):null,(0,G.jsx)(`section`,{className:`grid auto-rows-[minmax(280px,auto)] gap-2.5 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4`,children:We.map(t=>(0,G.jsx)(lTe,{account:t,busyKind:E?.id===t.id?E.kind:``,authPanelOpen:re===t.id,authUrl:I[t.id],note:M[t.id],pat:O[t.id]||``,t:e,onPatChange:e=>k(n=>({...n,[t.id]:e})),callbackUrl:A[t.id]||``,onCallbackChange:e=>j(n=>({...n,[t.id]:e})),onSubmitCallback:()=>void qe(t.id),onDeviceLogin:e=>void Ke(t.id,e),onPatLogin:()=>void Je(t.id),onExport:()=>void Ye(t.id),onRefresh:()=>void Ze(t.id),onDelete:()=>z(t.id),onToggle:e=>void Xe(t.id,e),checkinDefaultTime:r?.checkin_times[t.provider||``],checkinTimezone:Ae(t),onToggleAutoCheckin:ke(t)?e=>void nt(t.id,e):void 0,onCheckin:ke(t)?()=>void at(t.id):void 0,checkinFeedback:P[t.id]??null,onViewCheckins:ke(t)?()=>ee(t.id):void 0,onEdit:()=>ne(t.id),onToggleAuthPanel:()=>ie(e=>e===t.id?null:t.id),onViewModels:()=>V(t.id)},t.id))}),Re.length?(0,G.jsx)(j7,{total:Re.length,page:Ue,pageCount:He,pageSize:pe,pageSizes:_we,loading:!1,pageSizeLabel:e(`logsPageSize`),pageLabel:e(`logsPage`,{page:Ue,pages:He}),prevLabel:e(`logsPrevPage`),nextLabel:e(`logsNextPage`),onPage:fe,onPageSize:me}):null]})}function ZTe(){let{t:e,lang:t,setLang:n}=GF(),{setApiKey:r}=JF(),{overview:i,refresh:a}=pI(),{theme:o,toggleTheme:s}=gI(),[c,l]=(0,v.useState)(``),[u,d]=(0,v.useState)(!1),[f,p]=(0,v.useState)(!1),[m,h]=(0,v.useState)(``),g=at(),_=nt().state?.from||`/`,y=(0,v.useRef)(null);if(Kce(y,`login`),i)return(0,G.jsx)(At,{to:_===`/login`?`/`:_,replace:!0});async function b(t){t.preventDefault();let n=c.trim();if(!n){h(e(`loginNeedKey`));return}p(!0),h(``);try{r(n),await a(n),g(_===`/login`?`/`:_,{replace:!0})}catch(t){h(ZF(t)?e(`loginBadKey`):t instanceof Error?t.message:String(t))}finally{p(!1)}}return(0,G.jsxs)(`div`,{className:`relative min-h-dvh overflow-hidden bg-background text-foreground`,children:[(0,G.jsx)(`div`,{className:`absolute inset-x-0 top-0 h-px bg-border`}),(0,G.jsxs)(`main`,{ref:y,className:`relative z-10 mx-auto grid min-h-dvh w-full max-w-[1480px] lg:grid-cols-[minmax(0,1fr)_minmax(380px,30rem)]`,children:[(0,G.jsxs)(`section`,{className:`flex min-h-[52vh] flex-col px-5 py-6 sm:px-8 sm:py-8 lg:min-h-dvh lg:px-8 lg:py-10 xl:px-10`,children:[(0,G.jsxs)(`header`,{className:`flex items-center justify-between gap-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,G.jsx)(KB,{size:36}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`div`,{className:`font-semibold`,children:`CLI2API`}),(0,G.jsx)(`div`,{className:`text-caption text-muted`,children:e(`controlPlane`)})]})]}),(0,G.jsxs)(_j,{isAttached:!0,children:[(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,onPress:()=>n(t===`zh`?`en`:`zh`),"aria-label":t===`zh`?`English`:`中文`,children:(0,G.jsx)(ia,{size:15})})}),(0,G.jsx)(Aj.Content,{children:t===`zh`?`English`:`中文`})]}),(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,onPress:s,"aria-label":o===`dark`?`Light mode`:`Dark mode`,children:o===`dark`?(0,G.jsx)(Qa,{size:15}):(0,G.jsx)(ba,{size:15})})}),(0,G.jsx)(Aj.Content,{children:o===`dark`?`Light mode`:`Dark mode`})]})]})]}),(0,G.jsx)(`div`,{className:`my-auto w-full py-8 lg:py-10`,children:(0,G.jsx)(g7,{t:e,defaultExpanded:!0,forceMockDemo:!0,bare:!0,live:null,mockPace:.45})}),(0,G.jsxs)(`footer`,{className:`hidden items-center justify-between text-caption text-muted lg:flex`,children:[(0,G.jsx)(`span`,{children:e(`loginHint`)}),(0,G.jsx)(`span`,{children:e(`routesHint`)})]})]}),(0,G.jsx)(`section`,{className:`flex items-center px-5 py-10 sm:px-8 lg:px-8 xl:px-10`,children:(0,G.jsx)(xS,{"data-gsap-reveal":!0,variant:`transparent`,className:`w-full bg-transparent p-0 shadow-none`,children:(0,G.jsxs)(`form`,{onSubmit:e=>void b(e),children:[(0,G.jsx)(xS.Header,{className:`px-2 py-6 sm:px-4`,children:(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,G.jsx)(KB,{size:28,loading:f}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(xS.Title,{className:`text-title`,children:e(`loginFormTitle`)}),(0,G.jsx)(xS.Description,{className:`mt-1`,children:e(`loginDesc`)})]})]})}),(0,G.jsxs)(xS.Content,{className:`space-y-5 px-6 py-7 sm:px-8 sm:py-8`,children:[(0,G.jsxs)(Hj,{name:`console-password`,className:`w-full`,isInvalid:!!m,children:[(0,G.jsx)(kM,{children:e(`loginPassword`)}),(0,G.jsxs)(zj,{children:[(0,G.jsx)(zj.Input,{id:`console-password`,type:u?`text`:`password`,value:c,onChange:e=>l(e.target.value),placeholder:e(`loginPasswordPh`),autoComplete:`current-password`,autoFocus:!0,"aria-label":e(`loginPassword`),spellCheck:!1}),(0,G.jsx)(zj.Suffix,{children:(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,type:`button`,"aria-label":e(u?`hidePassword`:`showPassword`),onPress:()=>d(e=>!e),children:u?(0,G.jsx)(Ji,{size:16}):(0,G.jsx)(Ki,{size:16})})})]})]}),m?(0,G.jsx)(vI,{title:m}):(0,G.jsx)(`p`,{className:`text-caption text-muted`,children:e(`loginHint`)}),(0,G.jsxs)(J,{type:`submit`,fullWidth:!0,size:`lg`,isPending:f,children:[e(f?`loggingInConsole`:`loginSubmit`),f?null:(0,G.jsx)(ei,{size:17})]})]})]})})})]})]})}function N9(){return QF(`/api/keys`)}function QTe(e){return QF(`/api/keys`,{method:`POST`,body:JSON.stringify(e)})}function P9(e,t){return QF(`/api/keys/${encodeURIComponent(e)}`,{method:`PATCH`,body:JSON.stringify(t)})}function $Te(e){return QF(`/api/keys/${encodeURIComponent(e)}`,{method:`DELETE`})}function eEe(){return QF(`/api/system/console-key`)}function tEe(){return QF(`/api/system/console-key`,{method:`POST`,body:JSON.stringify({rotate:!0})})}function nEe({settings:e,onSaved:t}){let{t:n}=GF(),r=at(),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)({}),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(``);(0,v.useEffect)(()=>{let e=!0;return cI().then(t=>{e&&a((t.data||[]).filter(e=>e.regions.some(e=>e.checkin)))}).catch(t=>{e&&d(String(t))}),()=>{e=!1}},[]);async function f(n,r){if(!(!e||r===e.checkin_times[n])){l(!0),d(``);try{t(await bI({checkin_times:{[n]:r}}))}catch(e){d(e instanceof Error?e.message:String(e))}finally{s(e=>{let t={...e};return delete t[n],t}),l(!1)}}}return(0,G.jsxs)(xS,{"data-gsap-reveal":!0,children:[(0,G.jsxs)(xS.Header,{children:[(0,G.jsx)(xS.Title,{children:n(`checkinDefaultsTitle`)}),(0,G.jsx)(xS.Description,{children:n(`checkinDefaultsHint`)})]}),(0,G.jsxs)(xS.Content,{className:`space-y-4`,children:[u?(0,G.jsx)(vI,{title:u}):null,!e||!i?(0,G.jsx)(Q,{className:`h-24 w-full`}):i.map(t=>(0,G.jsx)(u9,{label:t.label,hint:t.regions.filter(e=>e.checkin).map(t=>`${t.label} · ${t.checkin?.timezone===`Local`?e.timezone:t.checkin?.timezone}`).join(` / `),children:(0,G.jsx)(Ij,{type:`time`,value:o[t.id]??e.checkin_times[t.id]??``,disabled:c,"aria-label":`${t.label} ${n(`autoCheckinTime`)}`,onChange:e=>s(n=>({...n,[t.id]:e.target.value})),onBlur:e=>void f(t.id,e.target.value)})},t.id))]}),(0,G.jsx)(xS.Footer,{children:(0,G.jsx)(J,{variant:`secondary`,onPress:()=>r(`/accounts`),children:n(`navAccounts`)})})]})}function rEe(e,t){if(!e)return``;let n=new Date(e);return Number.isNaN(n.getTime())?``:n.toLocaleDateString(t===`zh`?`zh-CN`:`en-US`,{year:`numeric`,month:`short`,day:`numeric`})}function iEe({releases:e,currentVersion:t,nextVersion:n,rollbackTags:r,canRollback:i,submitting:a,onRestore:o}){let{t:s,lang:c}=GF();if(!e.length)return null;let l=n&&n!==t?n:t,u=e.some(e=>e.tag_name===l)?l:e[0]?.tag_name,d=new Set(r);return(0,G.jsxs)(`div`,{className:`mt-5`,children:[(0,G.jsx)(`div`,{className:`mb-2`,children:(0,G.jsx)(`p`,{className:`text-caption font-medium text-foreground`,children:s(`versionHistory`)})}),(0,G.jsx)(yh,{className:`rounded-lg bg-surface-secondary`,hideSeparator:!0,defaultExpandedKeys:u?[u]:[],children:e.map(e=>{let r=e.tag_name,l=r===t,u=!!(n&&r===n&&n!==t),f=i&&d.has(r)&&!l,p=rEe(e.published_at,c);return(0,G.jsxs)(yh.Item,{id:r,children:[(0,G.jsx)(yh.Heading,{children:(0,G.jsxs)(yh.Trigger,{className:`items-center gap-3 px-3 py-2.5 text-left`,children:[(0,G.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`mono text-body font-semibold`,children:r}),l?(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:`success`,children:s(`versionCurrentBadge`)}):null,u?(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:`warning`,children:s(`versionLatestBadge`)}):null,p?(0,G.jsx)(`span`,{className:`truncate text-caption text-muted`,children:p}):null]}),(0,G.jsx)(yh.Indicator,{})]})}),(0,G.jsx)(yh.Panel,{children:(0,G.jsxs)(yh.Body,{className:`px-3 pb-3`,children:[(0,G.jsx)(`div`,{className:`release-notes-box release-notes-box--compact`,children:(0,G.jsx)(TI,{markdown:CI(e.body,c),emptyLabel:s(`updateNoNotes`)})}),f?(0,G.jsx)(`div`,{className:`mt-3 flex justify-end`,children:(0,G.jsx)(J,{size:`sm`,variant:`ghost`,isDisabled:a,onPress:()=>o(r),children:s(`restoreThisVersion`)})}):null]})})]},r)})})]})}function F9(e){let t=new Set,n=[];for(let r of e){let e=r.tag_name?.trim();!e||t.has(e)||(t.add(e),n.push({...r,tag_name:e}))}return n}function aEe(e,t,n,r,i){return r?.length?F9(r):F9([...n?[n]:t?[{tag_name:t}]:[],...e?[{tag_name:e}]:[],...i||[]])}var oEe=[`general`,`routing`,`security`,`updates`];function sEe(){let{t:e}=GF(),[t,n]=On(),r=t.get(`tab`),i=r&&oEe.includes(r)?r:`general`,a=e=>n(e===`general`?{}:{tab:e},{replace:!0}),{setApiKey:o}=JF(),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(``),[p,m]=(0,v.useState)(!1),[h,g]=(0,v.useState)(!1),[_,y]=(0,v.useState)(!1),[b,x]=(0,v.useState)(``),[S,C]=(0,v.useState)(!1),[w,T]=(0,v.useState)(``),E=SI(),{info:D,loading:O,checking:k,submitting:A,error:j,setError:M,load:N,canRollback:P,rollbackTo:F}=E,I=(0,v.useMemo)(()=>aEe(D?.current_version||``,D?.next_version,D?.release,D?.recent_releases,D?.rollback_versions),[D?.current_version,D?.next_version,D?.release,D?.recent_releases,D?.rollback_versions]),L=(0,v.useMemo)(()=>(D?.rollback_versions||[]).map(e=>e.tag_name),[D?.rollback_versions]);(0,v.useEffect)(()=>{let e=window.setTimeout(()=>{eEe().then(c).catch(()=>void 0),yI().then(e=>{u(e),f(e.proxy_url||``)}).catch(e=>M(e instanceof Error?e.message:String(e)))},0);return()=>window.clearTimeout(e)},[M]);async function R(e){let t=l?.cross_provider_model_pool??!0;u(t=>t&&{...t,cross_provider_model_pool:e}),m(!0),M(``);try{u(await bI({cross_provider_model_pool:e}))}catch(e){u(e=>e&&{...e,cross_provider_model_pool:t}),M(e instanceof Error?e.message:String(e))}finally{m(!1)}}async function z(e){let t=l?.checkin_disabled_accounts??!1;u(t=>t&&{...t,checkin_disabled_accounts:e}),m(!0),M(``);try{u(await bI({checkin_disabled_accounts:e}))}catch(e){u(e=>e&&{...e,checkin_disabled_accounts:t}),M(e instanceof Error?e.message:String(e))}finally{m(!1)}}async function B(e){let t=l?.proxy_url||``;if(e===t){f(t);return}let n=d;f(e),u(t=>t&&{...t,proxy_url:e}),m(!0),M(``);try{let t=await bI({proxy_url:e});u(t),f(t.proxy_url||``)}catch(e){f(n),u(e=>e&&{...e,proxy_url:t}),M(e instanceof Error?e.message:String(e))}finally{m(!1)}}async function V(e){let t=l?.routing_strategy||`round-robin`;u(t=>t&&{...t,routing_strategy:e}),m(!0),M(``);try{u(await bI({routing_strategy:e}))}catch(e){u(e=>e&&{...e,routing_strategy:t}),M(e instanceof Error?e.message:String(e))}finally{m(!1)}}return O&&!D?(0,G.jsx)(Gce,{}):(0,G.jsxs)(`div`,{className:`space-y-6`,children:[(0,G.jsxs)(`section`,{className:`flex flex-wrap items-end justify-between gap-4 pb-4`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h2`,{"data-gsap-reveal":!0,className:`text-title font-semibold`,children:e(`systemSettingsTitle`)}),(0,G.jsx)(`p`,{className:`mt-1 max-w-2xl text-body leading-6 text-muted`,children:e(`systemSettingsLead`)})]}),(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,isPending:k,onPress:()=>void N(!0),children:[(0,G.jsx)(Qr,{size:15}),e(`checkUpdates`)]})]}),j?(0,G.jsx)(vI,{title:j}):null,(0,G.jsxs)(EA,{selectedKey:i,onSelectionChange:e=>a(String(e)),children:[(0,G.jsx)(EA.ListContainer,{className:`w-fit max-w-full overflow-x-auto`,children:(0,G.jsxs)(EA.List,{"aria-label":e(`systemSettingsTitle`),children:[(0,G.jsxs)(TA,{id:`general`,className:`gap-1.5 whitespace-nowrap`,children:[(0,G.jsx)(EA.Indicator,{}),(0,G.jsx)(na,{size:13}),e(`settingsTabGeneral`)]}),(0,G.jsxs)(TA,{id:`routing`,className:`gap-1.5 whitespace-nowrap`,children:[(0,G.jsx)(EA.Indicator,{}),(0,G.jsx)(ci,{size:13}),e(`settingsTabRouting`)]}),(0,G.jsxs)(TA,{id:`security`,className:`gap-1.5 whitespace-nowrap`,children:[(0,G.jsx)(EA.Indicator,{}),(0,G.jsx)(Ia,{size:13}),e(`settingsTabSecurity`)]}),(0,G.jsxs)(TA,{id:`updates`,className:`gap-1.5 whitespace-nowrap`,children:[(0,G.jsx)(EA.Indicator,{}),(0,G.jsx)(Xr,{size:13}),e(`settingsTabUpdates`)]})]})}),(0,G.jsx)(EA.Panel,{id:`general`,className:`pt-5`,children:(0,G.jsxs)(`div`,{className:`grid gap-5 xl:grid-cols-2 items-start`,children:[(0,G.jsxs)(xS,{"data-gsap-reveal":!0,children:[(0,G.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,G.jsx)(`div`,{className:`grid size-8 shrink-0 place-items-center rounded-lg bg-surface-secondary text-foreground`,children:(0,G.jsx)(Ha,{size:15})}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:e(`proxySettingsTitle`)}),(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:e(`proxySettingsHint`)})]})]}),(0,G.jsxs)(`div`,{className:`mt-4 space-y-1.5`,children:[(0,G.jsx)(kM,{className:`text-body font-medium text-muted`,children:e(`proxyUrl`)}),(0,G.jsx)(Ij,{value:d,onChange:e=>f(e.target.value),onBlur:e=>void B(e.target.value.trim()),placeholder:e(`proxyUrlPlaceholder`),disabled:p||!l}),(0,G.jsx)(jM,{className:`text-caption leading-5 text-muted`,children:e(`proxyUrlHint`)})]})]}),(0,G.jsxs)(xS,{"data-gsap-reveal":!0,children:[(0,G.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,G.jsx)(`div`,{className:`grid size-8 shrink-0 place-items-center rounded-lg bg-surface-secondary text-foreground`,children:(0,G.jsx)(Oi,{size:15})}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:e(`checkinDisabledAccountsTitle`)}),(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:e(`checkinDisabledAccountsHint`)})]})]}),(0,G.jsx)(s7,{isSelected:l?.checkin_disabled_accounts??!1,isDisabled:p||!l,ariaLabel:e(`checkinDisabledAccountsAriaLabel`),onChange:e=>void z(e)})]}),(0,G.jsxs)(`div`,{className:`mt-4 flex items-center justify-between pt-3 text-caption text-muted`,children:[(0,G.jsx)(`span`,{children:e(`checkinDisabledAccountsStatus`)}),(0,G.jsx)(`span`,{className:`font-medium text-foreground`,children:l?.checkin_disabled_accounts?e(`enabled`):e(`disabled`)})]})]}),(0,G.jsx)(nEe,{settings:l,onSaved:u})]})}),(0,G.jsx)(EA.Panel,{id:`routing`,className:`pt-5`,children:(0,G.jsxs)(`div`,{className:`grid gap-5 xl:grid-cols-2 items-start`,children:[(0,G.jsxs)(xS,{"data-gsap-reveal":!0,children:[(0,G.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,G.jsx)(`div`,{className:`grid size-8 shrink-0 place-items-center rounded-lg bg-surface-secondary text-foreground`,children:(0,G.jsx)(Ha,{size:15})}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:e(`routingStrategyTitle`)}),(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:e(`routingStrategyHint`)})]})]}),(0,G.jsx)(`div`,{className:`mt-4 pt-4`,children:(0,G.jsx)(u9,{label:e(`routingStrategy`),children:(0,G.jsxs)(UP,{fullWidth:!0,"aria-label":e(`routingStrategy`),value:l?.routing_strategy||`round-robin`,isDisabled:p||!l,onChange:e=>{typeof e==`string`&&e&&V(e)},children:[(0,G.jsxs)(UP.Trigger,{className:`items-center`,children:[(0,G.jsx)(UP.Value,{className:`min-w-0 truncate`}),(0,G.jsx)(UP.Indicator,{})]}),(0,G.jsx)(UP.Popover,{children:(0,G.jsxs)(yP,{children:[(0,G.jsxs)(yP.Item,{id:`round-robin`,textValue:`round-robin`,children:[(0,G.jsx)(kM,{children:e(`routingRoundRobin`)}),(0,G.jsx)(yP.ItemIndicator,{})]}),(0,G.jsxs)(yP.Item,{id:`weighted-round-robin`,textValue:`weighted-round-robin`,children:[(0,G.jsx)(kM,{children:e(`routingWeightedRoundRobin`)}),(0,G.jsx)(yP.ItemIndicator,{})]}),(0,G.jsxs)(yP.Item,{id:`fill-first`,textValue:`fill-first`,children:[(0,G.jsx)(kM,{children:e(`routingFillFirst`)}),(0,G.jsx)(yP.ItemIndicator,{})]}),(0,G.jsxs)(yP.Item,{id:`fefo`,textValue:`fefo`,children:[(0,G.jsx)(kM,{children:e(`routingFEFO`)}),(0,G.jsx)(yP.ItemIndicator,{})]})]})})]})})}),(0,G.jsxs)(`div`,{className:`mt-4 grid grid-cols-2 gap-2 pt-3 text-caption text-muted sm:grid-cols-4`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`mono block text-body font-medium text-foreground`,children:l?.session_affinity?.ttl_seconds?`${Math.round(l.session_affinity.ttl_seconds/60)}m`:`—`}),e(`sessionAffinityTTL`)]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`mono block text-body font-medium text-foreground`,children:l?.session_affinity?.hits??0}),e(`sessionAffinityHits`)]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`mono block text-body font-medium text-foreground`,children:l?.session_affinity?.misses??0}),e(`sessionAffinityMisses`)]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`mono block text-body font-medium text-foreground`,children:l?.session_affinity?.escapes??0}),e(`sessionAffinityEscapes`)]})]}),l?.session_affinity?.last_escape_reason?(0,G.jsxs)(jM,{className:`mt-3 text-caption`,children:[e(`lastSessionEscape`),`: `,l.session_affinity.last_escape_reason]}):null,l?.session_affinity?.last_miss_reason?(0,G.jsxs)(jM,{className:`mt-1 text-caption`,children:[e(`lastSessionMiss`),`: `,l.session_affinity.last_miss_reason]}):null]}),(0,G.jsxs)(xS,{"data-gsap-reveal":!0,children:[(0,G.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,G.jsx)(`div`,{className:`grid size-8 shrink-0 place-items-center rounded-lg bg-surface-secondary text-foreground`,children:(0,G.jsx)(Ha,{size:15})}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:e(`crossProviderModelPoolTitle`)}),(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:e(`crossProviderModelPoolHint`)})]})]}),(0,G.jsx)(s7,{isSelected:l?.cross_provider_model_pool??!0,isDisabled:p||!l,ariaLabel:e(`crossProviderModelPoolAriaLabel`),onChange:e=>void R(e)})]}),(0,G.jsxs)(`div`,{className:`mt-4 flex items-center justify-between pt-3 text-caption text-muted`,children:[(0,G.jsx)(`span`,{children:e(`crossProviderModelPoolStatus`)}),(0,G.jsx)(`span`,{className:`font-medium text-foreground`,children:l?.cross_provider_model_pool?e(`enabled`):e(`disabled`)})]})]})]})}),(0,G.jsx)(EA.Panel,{id:`security`,className:`pt-5`,children:(0,G.jsxs)(`div`,{className:`grid gap-5 xl:grid-cols-2 items-start`,children:[(0,G.jsxs)(xS,{"data-gsap-reveal":!0,children:[(0,G.jsx)(`div`,{className:`flex items-start justify-between gap-4`,children:(0,G.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,G.jsx)(`div`,{className:`grid size-8 shrink-0 place-items-center rounded-lg bg-surface-secondary text-foreground`,children:(0,G.jsx)(ua,{size:15})}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:e(`consoleKeyTitle`)}),(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:e(`consoleKeyHint`)})]})]})}),(0,G.jsx)(`code`,{className:`mono mt-4 block rounded-lg bg-surface-secondary px-3 py-2 text-caption text-muted`,children:s?.prefix||`—`}),(0,G.jsx)(`p`,{className:`mt-3 text-caption leading-5 text-muted`,children:e(`consoleKeyLead`)}),(0,G.jsx)(`div`,{className:`mt-4 flex justify-end`,children:(0,G.jsx)(J,{size:`sm`,variant:`ghost`,isPending:h,onPress:()=>y(!0),children:e(`consoleKeyRotate`)})})]}),(0,G.jsxs)(xS,{"data-gsap-reveal":!0,children:[(0,G.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,G.jsx)(`div`,{className:`grid size-8 shrink-0 place-items-center rounded-lg bg-surface-secondary text-foreground`,children:(0,G.jsx)(Hi,{size:15})}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:e(`sqliteProtection`)}),(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:e(`sqliteProtectionHint`)})]})]}),(0,G.jsx)(Ia,{size:18,className:`text-success`})]}),(0,G.jsx)(`div`,{className:`mono mt-4 rounded-lg bg-surface-secondary px-3 py-2 text-caption text-muted`,children:`/data`}),(0,G.jsxs)(`div`,{className:`mt-3 grid gap-2 text-caption text-muted`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(Oi,{size:14,className:`text-muted`}),e(`sqliteBackupBeforeUpdate`)]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(Oi,{size:14,className:`text-muted`}),e(`sqliteKeepFive`)]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(Oi,{size:14,className:`text-muted`}),e(`sqliteRollbackTogether`)]})]})]})]})}),(0,G.jsx)(EA.Panel,{id:`updates`,className:`pt-5`,children:(0,G.jsx)(`div`,{className:`grid gap-5`,children:(0,G.jsxs)(xS,{"data-gsap-reveal":!0,className:`overflow-hidden p-0`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-separator px-5 py-4`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:e(`versionUpdate`)}),(0,G.jsx)(`p`,{className:`mt-0.5 text-caption text-muted`,children:e(`latestVersionHint`)})]}),(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:D?.has_update?`warning`:`success`,children:D?.has_update?e(`updateAvailable`):e(`upToDate`)})]}),(0,G.jsxs)(`div`,{className:`px-5 py-5`,children:[(0,G.jsx)(_I,{update:E}),(0,G.jsx)(iEe,{releases:I,currentVersion:D?.current_version||``,nextVersion:D?.next_version,rollbackTags:L,canRollback:P,submitting:A,onRestore:T})]})]})})})]}),(0,G.jsx)(A9,{isOpen:!!w,title:e(`restoreVersionTitle`,{version:w}),description:e(`restoreVersionHint`),confirmLabel:e(`restoreThisVersion`),cancelLabel:e(`cancel`),closeLabel:e(`close`),isPending:A,status:`warning`,confirmVariant:`primary`,onClose:()=>{A||T(``)},onConfirm:()=>{let e=w;T(``),F(e)}}),(0,G.jsx)(Y.Root,{isOpen:_,onOpenChange:e=>{!e&&!h&&y(!1)},children:(0,G.jsx)(Y.Backdrop,{variant:`blur`,isDismissable:!h,children:(0,G.jsx)(Y.Container,{placement:`center`,size:`sm`,children:(0,G.jsxs)(Y.Dialog,{children:[(0,G.jsxs)(Y.Header,{className:`items-start justify-between gap-4`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(Y.Heading,{className:`text-section font-semibold`,children:e(`consoleKeyRotate`)}),(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:e(`consoleKeyRotateHint`)})]}),(0,G.jsx)(Y.CloseTrigger,{isDisabled:h,"aria-label":e(`close`),className:`grid size-8 place-items-center rounded-lg text-muted hover:bg-surface-secondary`,children:(0,G.jsx)(yo,{size:16})})]}),(0,G.jsxs)(Y.Footer,{className:`justify-end`,children:[(0,G.jsx)(J,{variant:`ghost`,isDisabled:h,onPress:()=>y(!1),children:e(`cancel`)}),(0,G.jsx)(J,{variant:`danger`,isPending:h,onPress:()=>{g(!0),tEe().then(e=>{c(e),x(e.secret||``),e.secret&&o(e.secret),y(!1)}).catch(e=>{M(e instanceof Error?e.message:String(e))}).finally(()=>g(!1))},children:e(`consoleKeyRotateNow`)})]})]})})})}),(0,G.jsx)(Y.Root,{isOpen:!!b,onOpenChange:e=>{e||x(``)},children:(0,G.jsx)(Y.Backdrop,{variant:`blur`,children:(0,G.jsx)(Y.Container,{placement:`center`,size:`lg`,children:(0,G.jsxs)(Y.Dialog,{children:[(0,G.jsxs)(Y.Header,{className:`items-start justify-between gap-4 px-6 pt-6`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(Y.Heading,{className:`text-section font-semibold`,children:e(`consoleKeySecretTitle`)}),(0,G.jsx)(`p`,{className:`mt-1.5 text-body leading-6 text-muted`,children:e(`consoleKeySecretHint`)})]}),(0,G.jsx)(Y.CloseTrigger,{"aria-label":e(`close`),className:`grid size-9 place-items-center rounded-lg text-muted hover:bg-surface-secondary`,children:(0,G.jsx)(yo,{size:18})})]}),(0,G.jsx)(Y.Body,{className:`px-6 pb-2`,children:(0,G.jsx)(`code`,{className:`mono block break-all rounded-lg bg-surface-secondary px-3 py-3 text-body`,children:b})}),(0,G.jsxs)(Y.Footer,{className:`justify-end`,children:[(0,G.jsx)(J,{variant:`ghost`,onPress:()=>x(``),children:e(`close`)}),(0,G.jsxs)(J,{onPress:()=>{U7(b),C(!0),window.setTimeout(()=>C(!1),1200)},children:[(0,G.jsx)(Ii,{size:14}),e(S?`copied`:`copy`)]})]})]})})})})]})}var I9=`__all__`;function cEe(e,t){let n=t.trim().toLowerCase();return!n||e.label.toLowerCase().includes(n)||e.id.toLowerCase().includes(n)}function L9({value:e,onChange:t,ariaLabel:n,options:r,allLabel:i,searchPlaceholder:a,emptyLabel:o,loadOptions:s,className:c}){let[l,u]=(0,v.useState)(``),[d,f]=(0,v.useState)([]),[p,m]=(0,v.useState)(!1);(0,v.useEffect)(()=>{if(!s)return;let e=!1,t=window.setTimeout(()=>{m(!0),s(l.trim()).then(t=>{e||f(t)}).catch(()=>{e||f([])}).finally(()=>{e||m(!1)})},l.trim()?280:0);return()=>{e=!0,window.clearTimeout(t)}},[s,l]);let h=e||I9,g=(0,v.useMemo)(()=>{let t=s?d:r.filter(e=>cEe(e,l)),n=new Map;l.trim()||n.set(I9,{id:I9,label:i});for(let e of t)!e.id||e.id===I9||n.set(e.id,e);if(e){let t=r.find(t=>t.id===e)||d.find(t=>t.id===e)||{id:e,label:e};n.set(e,t)}return[...n.values()]},[i,s,r,l,d,e]),_=g.find(e=>e.id===h)||(e?{id:e,label:e}:{id:I9,label:i});return(0,G.jsxs)(fS,{className:[`w-fit`,c].filter(Boolean).join(` `),"aria-label":n,value:h,onChange:e=>{typeof e==`string`&&(t(e===I9?``:e),u(``))},onClear:()=>{t(``),u(``)},children:[(0,G.jsxs)(fS.Trigger,{className:`min-w-44 items-center`,children:[(0,G.jsx)(fS.Value,{className:`min-w-0 truncate`,children:({defaultChildren:e,isPlaceholder:t})=>t?e:(0,G.jsx)(`span`,{className:`truncate`,children:_.label})}),e?(0,G.jsx)(fS.ClearButton,{}):null,(0,G.jsx)(fS.Indicator,{})]}),(0,G.jsx)(fS.Popover,{className:`min-w-56`,children:(0,G.jsxs)(fS.Filter,{inputValue:l,onInputChange:u,filter:()=>!0,children:[(0,G.jsx)(DM,{"aria-label":a,className:`px-2 pt-2`,autoFocus:!0,children:(0,G.jsxs)(DM.Group,{children:[(0,G.jsx)(DM.SearchIcon,{}),(0,G.jsx)(DM.Input,{placeholder:a}),(0,G.jsx)(DM.ClearButton,{})]})}),(0,G.jsx)(yP,{children:g.length===0?(0,G.jsx)(yP.Item,{id:`__empty__`,textValue:o,isDisabled:!0,children:(0,G.jsx)(kM,{className:`block truncate text-muted`,children:p?a:o})}):g.map(e=>(0,G.jsxs)(yP.Item,{id:e.id,textValue:e.label,children:[(0,G.jsx)(kM,{className:`block truncate`,children:e.label}),e.id!==I9&&e.id!==e.label?(0,G.jsx)(`span`,{className:`mono mt-0.5 block truncate text-caption text-muted`,children:e.id}):null,(0,G.jsx)(yP.ItemIndicator,{})]},e.id))})]})})]})}function R9(){let[e,t]=(0,v.useState)([]);return(0,v.useEffect)(()=>{let e=!1;return N9().then(n=>{e||t(n.data||[])}).catch(()=>{}),()=>{e=!0}},[]),{keys:e,nameById:(0,v.useMemo)(()=>{let t=new Map;for(let n of e)t.set(n.id,n.name||n.id);return t},[e]),options:(0,v.useMemo)(()=>e.map(e=>({id:e.id,label:e.name||e.id})),[e])}}function z9(e){return e===`ok`?`success`:e===`streaming`||e===`started`||e===`incomplete`?`warning`:e===`error`||e===`canceled`?`danger`:`default`}function lEe(e){if(e===`error`)return`danger`;if(e!==`warn`)return`ok`}function uEe(e){return e===`error`?`danger`:e===`warn`?`warning`:e===`info`?`success`:`default`}function B9(e,t=`zh`){if(!e)return`—`;let n=new Date(e);return Number.isFinite(n.getTime())?new Intl.DateTimeFormat(t===`zh`?`zh-CN`:`en-US`,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1}).format(n):e}function V9(e){let t=e.requested_reasoning?.trim()||``,n=e.resolved_reasoning?.trim()||``;return!t&&!n?``:t&&n&&t!==n?`${t} → ${n}`:n||t}function H9({log:e,inLabel:t,outLabel:n,pointsLabel:r}){let i=e.prompt_tokens,a=e.completion_tokens,o=e.credits??e.usage_detail?.credit,s=o!=null&&Number.isFinite(o)?U9(o):null;return i==null&&a==null&&s==null?(0,G.jsx)(`span`,{className:`mono text-xs text-muted`,children:`—`}):(0,G.jsxs)(`div`,{className:`leading-4`,children:[i!=null||a!=null?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{className:`mono text-xs`,children:[i??0,` / `,a??0]}),(0,G.jsxs)(`div`,{className:`mt-0.5 text-caption text-muted`,children:[t,` / `,n]})]}):null,s==null?null:(0,G.jsx)(`div`,{className:`mono text-caption text-success ${i!=null||a!=null?`mt-0.5`:``}`,children:r?r(s):s})]})}function dEe(){return(0,G.jsxs)(`div`,{className:`space-y-5`,"aria-busy":`true`,"aria-live":`polite`,children:[(0,G.jsx)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:Array.from({length:8},(e,t)=>(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsx)(Q,{className:`h-3 w-20`}),(0,G.jsx)(Q,{className:`h-5 w-36 max-w-full`})]},t))}),(0,G.jsxs)(`div`,{className:`space-y-3 rounded-lg bg-surface-secondary px-3 py-3`,children:[(0,G.jsx)(Q,{className:`h-3 w-24`}),(0,G.jsx)(Q,{className:`h-4 w-full`}),(0,G.jsx)(Q,{className:`h-4 w-4/5`})]}),(0,G.jsxs)(`div`,{className:`space-y-3`,children:[(0,G.jsx)(Q,{className:`h-3 w-20`}),(0,G.jsx)(Q,{className:`h-16 w-full`})]})]})}function U9(e){return e==null||!Number.isFinite(e)?`—`:String(Math.round(e*1e4)/1e4)}var fEe=[`all`,`ok`,`incomplete`,`error`,`canceled`],pEe=[`all`,`quota`,`rate_limit`,`auth`,`not_ready`,`unavailable`,`invalid_request`,`model_not_available`],mEe=[`all`,`1h`,`24h`,`7d`,`custom`];function W9(e){let t=(e,t,n)=>t.includes(e??``)?e:n,n=EV(e.get(`from`)),r=EV(e.get(`to`)),i=n&&r?{start:n,end:r}:null,a=e.get(`stream`);return{requestFilter:t(e.get(`status`),fEe,`all`),requestId:e.get(`id`)??``,accountFilter:e.get(`account`)??``,apiKeyFilter:e.get(`api_key`)??``,modelFilter:e.get(`model`)??``,providerFilter:e.get(`provider`)??``,streamFilter:a===`stream`||a===`true`?`stream`:a===`sync`||a===`false`?`sync`:`all`,errorKind:t(e.get(`error_kind`),pEe,`all`),timeRange:i?`custom`:t(e.get(`range`),mEe,`1h`),customRange:i}}function hEe(e){let t=new URLSearchParams;e.requestFilter!==`all`&&t.set(`status`,e.requestFilter),e.requestId&&t.set(`id`,e.requestId),e.accountFilter&&t.set(`account`,e.accountFilter),e.apiKeyFilter&&t.set(`api_key`,e.apiKeyFilter),e.modelFilter&&t.set(`model`,e.modelFilter),e.providerFilter&&t.set(`provider`,e.providerFilter),e.streamFilter!==`all`&&t.set(`stream`,e.streamFilter),e.errorKind!==`all`&&t.set(`error_kind`,e.errorKind);let n=e.timeRange===`custom`?TV(e.customRange?.start):void 0,r=e.timeRange===`custom`?TV(e.customRange?.end,!0):void 0;return n&&r?(t.set(`from`,n),t.set(`to`,r)):e.timeRange!==`1h`&&t.set(`range`,e.timeRange),t.toString()}function gEe(e){if(e===`all`||e===`custom`)return{from:void 0,to:void 0};let t=new Date,n=new Date(t);return e===`1h`&&n.setHours(n.getHours()-1),e===`24h`&&n.setHours(n.getHours()-24),e===`7d`&&n.setDate(n.getDate()-7),{from:n.toISOString(),to:t.toISOString()}}function _Ee(){let{t:e,lang:t}=GF(),[n,r]=On(),[i]=(0,v.useState)(()=>W9(new URLSearchParams(window.location.search))),[a,o]=(0,v.useState)([]),[s,c]=(0,v.useState)([]),[l,u]=(0,v.useState)(`requests`),[d,f]=(0,v.useState)(!0),[p,m]=(0,v.useState)(!1),[h,g]=(0,v.useState)(``),[_,y]=(0,v.useState)(i.requestFilter),[b,x]=(0,v.useState)(`all`),[S,C]=(0,v.useState)(i.requestId),[w,T]=(0,v.useState)(``),[E,D]=(0,v.useState)(i.accountFilter),[O,k]=(0,v.useState)(i.apiKeyFilter),[A,j]=(0,v.useState)(``),[M,N]=(0,v.useState)(i.modelFilter),[P,F]=(0,v.useState)(i.providerFilter),[I,L]=(0,v.useState)(i.streamFilter),[R,z]=(0,v.useState)(i.errorKind),[B,V]=(0,v.useState)(i.timeRange),[H,ee]=(0,v.useState)(i.customRange),[te,ne]=(0,v.useState)(1),[re,ie]=(0,v.useState)(50),[ae,oe]=(0,v.useState)(1),[se,ce]=(0,v.useState)(50),[le,ue]=(0,v.useState)([]),[de,fe]=(0,v.useState)(0),[pe,me]=(0,v.useState)([]),[he,ge]=(0,v.useState)(0),[_e,ve]=(0,v.useState)(null),[ye,be]=(0,v.useState)(!1),[xe,Se]=(0,v.useState)(null),[Ce,we]=(0,v.useState)(!1),[Te,Ee]=(0,v.useState)(!1),[De,Oe]=(0,v.useState)(``),ke=(0,v.useRef)(0),[Ae,je]=(0,v.useState)(!1),[Me,Ne]=(0,v.useState)(!1),Pe=n.toString(),Fe=hEe({requestFilter:_,requestId:S,accountFilter:E,apiKeyFilter:O,modelFilter:M,providerFilter:P,streamFilter:I,errorKind:R,timeRange:B,customRange:H}),Ie=(0,v.useRef)(Pe);(0,v.useEffect)(()=>{if(Pe===Ie.current)return;Ie.current=Pe;let e=W9(new URLSearchParams(Pe));y(e.requestFilter),C(e.requestId),D(e.accountFilter),k(e.apiKeyFilter),N(e.modelFilter),F(e.providerFilter),L(e.streamFilter),z(e.errorKind),V(e.timeRange),ee(e.customRange)},[Pe]),(0,v.useEffect)(()=>{Fe!==Ie.current&&(Ie.current=Fe,r(Fe,{replace:!0}))},[Fe,r]),(0,v.useEffect)(()=>{let e=!1;return Promise.allSettled([$F(!1),oI()]).then(([t,n])=>{e||(t.status===`fulfilled`&&o(t.value.data||[]),n.status===`fulfilled`&&c(n.value.data||[]))}),()=>{e=!0}},[]);let Le=(0,v.useMemo)(()=>{let e=new Map;for(let t of a||[])e.set(t.id,t.name||t.id);return e},[a]),Re=(0,v.useMemo)(()=>{let e=new Map;for(let t of a||[])e.set(t.id,{provider:t.provider,region:t.region});return e},[a]);function ze(t){let n=t.account_id?Re.get(t.account_id):void 0,r=t.provider||n?.provider;return r?UV(r,n?.region,e):`—`}function Be(t){switch(t){case`pin`:return e(`logsRouting_pin`);case`sticky`:return e(`logsRouting_sticky`);case`sticky_escape`:return e(`logsRouting_sticky_escape`);default:return e(`logsRouting_pool`)}}let Ve=(0,v.useMemo)(()=>(a||[]).map(e=>({id:e.id,label:e.name||e.id})),[a]),{nameById:He,options:Ue}=R9();function We(e){let t=e.api_key_id?.trim();return t?He.get(t)||t:`—`}let Ge=(0,v.useMemo)(()=>{let t=new Set;for(let e of a||[])e.provider&&t.add(e.provider);return P&&t.add(P),[{id:``,label:e(`logsFilterProviderAll`)},...[...t].sort().map(t=>({id:t,label:HV(t,e)}))]},[a,P,e]),Ke=(0,v.useMemo)(()=>{let e=new Map;for(let t of s||[])e.has(t.id)||e.set(t.id,{id:t.id,label:t.display_name||t.id});return[...e.values()]},[s]),qe=(0,v.useCallback)(async e=>((await lV({q:e||void 0,limit:20,offset:0})).items||[]).map(e=>({id:e.id,label:e.id})),[]),Je=!!(S||_!==`all`||E||O||M||P||I!==`all`||R!==`all`||B!==`1h`),Ye=[_,S,E,O,M,P,I,R,B,H?.start?.toString()??``,H?.end?.toString()??``,re].join(`\0`),Xe=[b,w,A,se].join(`\0`),[Ze,Qe]=(0,v.useState)(Ye),[$e,et]=(0,v.useState)(Xe);Ze!==Ye&&(Qe(Ye),ne(1)),$e!==Xe&&(et(Xe),oe(1));let tt=Math.max(1,Math.ceil(de/re)),nt=Math.min(Ze===Ye?Math.max(1,te):1,tt);te!==nt&&ne(nt);let rt=Math.max(1,Math.ceil(he/se)),it=Math.min($e===Xe?Math.max(1,ae):1,rt);ae!==it&&oe(it);let at=(0,v.useCallback)(async(e=!1)=>{e||f(!0);try{let e=S?{from:void 0,to:void 0}:B===`custom`?{from:TV(H?.start),to:TV(H?.end,!0)}:gEe(B),t=await lV({status:_===`all`?void 0:_,id:S||void 0,account:E||void 0,api_key:O||void 0,model:M||void 0,provider:P||void 0,stream:I===`all`?void 0:I===`stream`,error_kind:R===`all`?void 0:R,from:e.from,to:e.to,limit:re,offset:(nt-1)*re});ue(t.items||[]),fe(t.total||0),g(``)}catch(t){e||g(t instanceof Error?t.message:String(t))}finally{e||(f(!1),m(!0))}},[_,S,E,O,M,P,I,R,B,H,nt,re]),ot=(0,v.useCallback)(async(e=!1)=>{e||f(!0);try{let e=await ule({level:b===`all`?void 0:b,q:w.trim()||void 0,account:A||void 0,limit:se,offset:(it-1)*se});me(e.items||[]),ge(e.total??0),g(``)}catch(t){e||g(t instanceof Error?t.message:String(t))}finally{e||(f(!1),m(!0))}},[b,w,A,it,se]),st=(0,v.useCallback)(async(e=!1)=>{l===`requests`?await at(e):await ot(e)},[l,at,ot]);(0,v.useEffect)(()=>{f(!0);let e=l===`runtime`&&w.trim()?280:0,t=window.setTimeout(()=>void st(!1),e);return()=>window.clearTimeout(t)},[st,l,w]),(0,v.useEffect)(()=>{if(l!==`runtime`||it!==1)return;let e=window.setInterval(()=>void ot(!0),3e3);return()=>window.clearInterval(e)},[l,it,ot]);let ct=de===0?0:(nt-1)*re+1,lt=Math.min(de,nt*re),ut=he===0?0:(it-1)*se+1,dt=Math.min(he,it*se),ft=(0,v.useMemo)(()=>l===`requests`?e(`logsShownTotal`,{shown:le.length?`${ct}–${lt}`:0,total:de}):e(`logsShownTotal`,{shown:pe.length?`${ut}–${dt}`:0,total:he}),[l,le.length,pe.length,ct,lt,de,ut,dt,he,e]);function pt(){C(``),y(`all`),D(``),k(``),N(``),F(``),L(`all`),z(`all`),V(`1h`),ee(null),ne(1)}async function mt(e){let t=++ke.current;Se(e),Oe(``),Ee(!0),we(!0);try{let n=await cle(e.id);if(ke.current!==t)return;Se(n)}catch(e){if(ke.current!==t)return;Oe(e instanceof Error?e.message:String(e))}finally{ke.current===t&&Ee(!1)}}function ht(e){ve(e),be(!0)}async function gt(){Ne(!0),sV({id:`logs-clear`,type:`loading`,title:e(`toastClearingLogs`)});try{await lle(),je(!1),await at(!1),sV({id:`logs-clear`,type:`success`,title:e(`toastLogsCleared`)})}catch(t){g(t instanceof Error?t.message:String(t)),sV({id:`logs-clear`,type:`error`,title:e(`toastFailed`),description:t instanceof Error?t.message:String(t)})}finally{Ne(!1)}}let _t=d&&(l===`requests`?le.length===0:pe.length===0);return d&&!p?(0,G.jsx)(Uce,{}):(0,G.jsxs)(`div`,{className:`space-y-6`,children:[(0,G.jsxs)(`section`,{className:`flex flex-wrap items-end justify-between gap-4 pb-4`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h2`,{className:`text-title font-semibold`,children:e(`navLogs`)}),(0,G.jsx)(`p`,{className:`mt-1 max-w-2xl text-body leading-6 text-muted`,children:e(`logsLead`)})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[l===`requests`?(0,G.jsxs)(J,{size:`sm`,variant:`ghost`,onPress:()=>je(!0),isDisabled:Me||de===0,children:[(0,G.jsx)(io,{size:14}),e(`logsClear`)]}):null,(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,isPending:d,onPress:()=>void st(!1),children:[(0,G.jsx)(Qr,{size:15}),e(`refresh`)]})]})]}),h?(0,G.jsx)(vI,{title:e(`failedLogs`,{msg:h})}):null,(0,G.jsxs)(EA,{selectedKey:l,onSelectionChange:e=>u(String(e)),children:[(0,G.jsx)(EA.ListContainer,{className:`w-fit`,children:(0,G.jsxs)(EA.List,{children:[(0,G.jsxs)(TA,{id:`requests`,className:`gap-1.5`,children:[(0,G.jsx)(EA.Indicator,{className:`transition-none`}),(0,G.jsx)(Pa,{size:13}),e(`logsRequests`)]}),(0,G.jsxs)(TA,{id:`runtime`,className:`gap-1.5`,children:[(0,G.jsx)(EA.Indicator,{className:`transition-none`}),(0,G.jsx)(eo,{size:13}),e(`logsRuntime`)]})]})}),(0,G.jsxs)(EA.Panel,{id:`requests`,"data-tab-panel":`requests`,className:`space-y-4 pt-5`,children:[(0,G.jsxs)(`div`,{className:`data-toolbar flex flex-col gap-2`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,G.jsx)(wV,{value:_,onChange:e=>y(e),ariaLabel:e(`logsFilterAll`),options:[{id:`all`,label:e(`logsFilterAll`)},{id:`ok`,label:e(`logsFilterOk`)},{id:`incomplete`,label:e(`logsFilterIncomplete`)},{id:`error`,label:e(`logsFilterError`)},{id:`canceled`,label:e(`logsFilterCanceled`)}]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[Je?(0,G.jsx)(J,{size:`sm`,variant:`ghost`,onPress:pt,children:e(`clearFilters`)}):null,(0,G.jsx)(`div`,{className:`mono text-caption text-muted`,children:ft})]})]}),(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(L9,{ariaLabel:e(`logsColAccount`),value:E,onChange:D,options:Ve,allLabel:e(`logsFilterAccountAll`),searchPlaceholder:e(`logsSearchAccount`),emptyLabel:e(`logsNoFilterOptions`)}),(0,G.jsx)(L9,{ariaLabel:e(`logsColApiKey`),value:O,onChange:k,options:Ue,allLabel:e(`logsFilterApiKeyAll`),searchPlaceholder:e(`logsSearchApiKey`),emptyLabel:e(`logsNoFilterOptions`)}),(0,G.jsx)(L9,{ariaLabel:e(`logsColModel`),value:M,onChange:N,options:Ke,allLabel:e(`logsFilterModelAll`),searchPlaceholder:e(`logsSearchModel`),emptyLabel:e(`logsNoFilterOptions`)}),(0,G.jsx)(A7,{ariaLabel:e(`logsColProvider`),value:P,onChange:F,options:Ge}),(0,G.jsx)(L9,{ariaLabel:e(`logsSearchRequestId`),value:S,onChange:C,options:S?[{id:S,label:S}]:[],allLabel:e(`logsFilterIdAll`),searchPlaceholder:e(`logsSearchRequestId`),emptyLabel:e(`logsNoFilterOptions`),loadOptions:qe,className:`min-w-56`}),(0,G.jsx)(wV,{value:I,onChange:e=>L(e),ariaLabel:e(`logsFilterStreamAll`),options:[{id:`all`,label:e(`logsFilterStreamAll`)},{id:`stream`,label:e(`logsStreamYes`)},{id:`sync`,label:e(`logsStreamNo`)}]}),(0,G.jsx)(A7,{ariaLabel:e(`errorKind`),value:R===`all`?``:R,onChange:e=>z(e||`all`),options:[{id:``,label:e(`logsFilterKindAll`)},{id:`quota`,label:e(`logsKindQuota`)},{id:`rate_limit`,label:e(`logsKindRateLimit`)},{id:`auth`,label:e(`logsKindAuth`)},{id:`not_ready`,label:e(`logsKindNotReady`)},{id:`unavailable`,label:e(`logsKindUnavailable`)},{id:`invalid_request`,label:e(`logsKindInvalidRequest`)},{id:`model_not_available`,label:e(`logsKindModelNotAvailable`)}]})]}),(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:e(`logsTimeRange`)}),(0,G.jsx)(wV,{value:B,onChange:e=>V(e),ariaLabel:e(`logsTimeRange`),options:[{id:`all`,label:e(`logsTimeAll`)},{id:`1h`,label:e(`logsTime1h`)},{id:`24h`,label:e(`logsTime24h`)},{id:`7d`,label:e(`logsTime7d`)},{id:`custom`,label:e(`logsTimeCustom`)}]}),B===`custom`?(0,G.jsx)(DV,{className:`w-[min(100%,42rem)]`,value:H,onChange:ee,ariaLabel:e(`logsTimeRange`),fromLabel:e(`logsTimeFrom`),toLabel:e(`logsTimeTo`)}):null]})]}),(0,G.jsx)(xS,{className:`overflow-hidden p-0`,"aria-busy":d,children:_t?(0,G.jsx)(XB,{}):le.length===0?(0,G.jsx)(O7,{icon:(0,G.jsx)(va,{size:22}),title:e(Je?`logsNoMatch`:`logsEmptyRequests`),action:Je?(0,G.jsx)(J,{size:`sm`,variant:`ghost`,onPress:pt,children:e(`clearFilters`)}):null}):(0,G.jsx)(X,{children:(0,G.jsx)(X.ScrollContainer,{children:(0,G.jsxs)(X.Content,{"aria-label":e(`logsRequests`),children:[(0,G.jsxs)(X.Header,{children:[(0,G.jsx)(X.Column,{isRowHeader:!0,children:e(`logsColTime`)}),(0,G.jsx)(X.Column,{children:e(`logsColModel`)}),(0,G.jsx)(X.Column,{children:e(`logsColReasoning`)}),(0,G.jsx)(X.Column,{children:e(`logsColProvider`)}),(0,G.jsx)(X.Column,{children:e(`logsColAccount`)}),(0,G.jsx)(X.Column,{children:e(`logsColApiKey`)}),(0,G.jsx)(X.Column,{children:e(`logsColStatus`)}),(0,G.jsx)(X.Column,{children:e(`logsColStream`)}),(0,G.jsx)(X.Column,{children:e(`logsColLatency`)}),(0,G.jsx)(X.Column,{children:e(`logsColTokens`)})]}),(0,G.jsx)(X.Body,{children:le.map(n=>(0,G.jsxs)(X.Row,{className:`cursor-pointer`,onAction:()=>void mt(n),children:[(0,G.jsx)(X.Cell,{children:(0,G.jsxs)(`div`,{className:`py-1`,children:[(0,G.jsx)(`div`,{className:`mono text-xs`,children:B9(n.created_at,t)}),(0,G.jsx)(`div`,{className:`mono mt-0.5 text-caption text-muted`,children:n.id})]})}),(0,G.jsxs)(X.Cell,{children:[(0,G.jsx)(`div`,{className:`text-body font-medium`,children:n.requested_model||`—`}),n.mapped_model&&n.mapped_model!==n.requested_model?(0,G.jsx)(`div`,{className:`mono mt-0.5 text-caption text-muted`,children:n.mapped_model}):null]}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-xs`,children:V9(n)||`—`})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`text-xs`,children:ze(n)})}),(0,G.jsxs)(X.Cell,{children:[(0,G.jsx)(`span`,{className:`text-xs`,children:n.account_id?Le.get(n.account_id)||n.account_id:`—`}),n.account_id&&Le.get(n.account_id)&&Le.get(n.account_id)!==n.account_id?(0,G.jsx)(`div`,{className:`mono mt-0.5 text-caption text-muted`,children:n.account_id}):null]}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`text-xs`,children:We(n)})}),(0,G.jsxs)(X.Cell,{children:[(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:z9(n.status),children:n.status}),n.error_kind?(0,G.jsx)(`div`,{className:`mono mt-1 text-caption text-muted`,children:n.error_kind}):null]}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`text-xs text-muted`,children:n.stream?e(`logsStreamYes`):e(`logsStreamNo`)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(J7,{latencyMs:n.latency_ms,ttfbMs:n.ttfb_ms,completionTokens:n.completion_tokens,stream:n.stream,labels:{ttft:e(`logsColTTFT`),total:e(`logsLatencyTotal`),tps:e(`logsOutputTPS`)}})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(H9,{log:n,inLabel:e(`logsTokensIn`),outLabel:e(`logsTokensOut`),pointsLabel:t=>e(`logsTokensPoints`,{value:t})})})]},n.id))})]})})})}),(0,G.jsx)(j7,{total:de,page:nt,pageCount:tt,pageSize:re,loading:d,pageSizeLabel:e(`logsPageSize`),pageLabel:e(`logsPage`,{page:nt,pages:tt}),prevLabel:e(`logsPrevPage`),nextLabel:e(`logsNextPage`),onPage:ne,onPageSize:ie})]}),(0,G.jsxs)(EA.Panel,{id:`runtime`,"data-tab-panel":`runtime`,className:`space-y-4 pt-5`,children:[(0,G.jsxs)(`div`,{className:`data-toolbar flex flex-wrap items-center justify-between gap-2`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(M7,{className:`sm:w-72`,value:w,onChange:T,placeholder:e(`logsSearchRuntime`),ariaLabel:e(`logsSearchRuntime`)}),(0,G.jsx)(L9,{ariaLabel:e(`logsColAccount`),value:A,onChange:j,options:Ve,allLabel:e(`logsFilterAccountAll`),searchPlaceholder:e(`logsSearchAccount`),emptyLabel:e(`logsNoFilterOptions`)}),(0,G.jsx)(wV,{value:b,onChange:e=>x(e),ariaLabel:e(`logsLevelAll`),options:[{id:`all`,label:e(`logsLevelAll`)},{id:`info`,label:e(`logsLevelInfo`)},{id:`warn`,label:e(`logsLevelWarn`)},{id:`error`,label:e(`logsLevelError`)}]})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted`,children:[it===1?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{className:`status-dot`,"data-state":`ok`}),e(`logsAutoRefresh`)]}):null,(0,G.jsx)(`span`,{className:`mono`,children:ft})]})]}),(0,G.jsx)(xS,{className:`overflow-hidden p-0`,"aria-busy":d,children:_t?(0,G.jsx)(Hce,{}):pe.length===0?(0,G.jsx)(O7,{icon:(0,G.jsx)(eo,{size:22}),title:e(`logsEmptyRuntime`)}):(0,G.jsx)(`div`,{className:`divide-y divide-separator`,children:pe.map(e=>(0,G.jsxs)(`div`,{className:`grid cursor-pointer gap-2 px-5 py-3 transition-colors hover:bg-surface-secondary/55 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent sm:grid-cols-[150px_72px_minmax(0,1fr)] sm:items-start`,role:`button`,tabIndex:0,onClick:()=>ht(e),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),ht(e))},children:[(0,G.jsx)(`div`,{className:`mono text-caption text-muted`,children:B9(e.time,t)}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2 text-xs`,children:[(0,G.jsx)(`span`,{className:`status-dot`,"data-state":lEe(e.level)}),(0,G.jsx)(`span`,{className:`font-medium text-muted`,children:e.level})]}),(0,G.jsxs)(`div`,{className:`min-w-0`,children:[e.account_id?(0,G.jsx)(`div`,{className:`mono mb-1 text-caption text-muted`,children:e.account_id}):null,(0,G.jsx)(`div`,{className:`mono break-all text-xs leading-5 text-foreground`,children:e.message})]})]},e.id))})}),(0,G.jsx)(j7,{total:he,page:it,pageCount:rt,pageSize:se,loading:d,pageSizeLabel:e(`logsPageSize`),pageLabel:e(`logsPage`,{page:it,pages:rt}),prevLabel:e(`logsPrevPage`),nextLabel:e(`logsNextPage`),onPage:oe,onPageSize:ce})]})]}),(0,G.jsx)(Y.Root,{isOpen:ye,onOpenChange:e=>{be(e),e||ve(null)},children:(0,G.jsx)(Y.Backdrop,{variant:`blur`,children:(0,G.jsx)(Y.Container,{size:`lg`,scroll:`inside`,children:(0,G.jsxs)(Y.Dialog,{className:`w-full max-w-4xl`,children:[(0,G.jsxs)(Y.Header,{className:`items-start justify-between gap-4 px-5 pt-5`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(Y.Heading,{className:`text-section font-semibold`,children:e(`logsRuntimeDetailTitle`)}),(0,G.jsx)(`p`,{className:`mono mt-1 text-caption text-muted`,children:_e?`#${_e.id}`:`—`})]}),(0,G.jsx)(Y.CloseTrigger,{"aria-label":e(`close`),className:`grid size-8 shrink-0 place-items-center rounded-lg text-muted transition-colors hover:bg-surface-secondary hover:text-foreground`,children:(0,G.jsx)(yo,{size:16})})]}),(0,G.jsxs)(Y.Body,{className:`space-y-5 px-5 pb-5`,children:[(0,G.jsx)(`dl`,{className:`grid gap-3 sm:grid-cols-2`,children:[[e(`logsColTime`),_e?B9(_e.time,t):`—`],[e(`logsRuntimeLevel`),_e?.level||`—`],[e(`logsRuntimeSource`),_e?.source||`—`],[e(`logsColAccount`),_e?.account_id||`—`]].map(([t,n])=>(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`dt`,{className:`text-caption text-muted`,children:t}),(0,G.jsx)(`dd`,{className:`mt-1 break-all text-body font-medium`,children:t===e(`logsRuntimeLevel`)&&_e?(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:uEe(_e.level),children:_e.level}):n})]},String(t)))}),(0,G.jsxs)(`section`,{className:`space-y-2`,children:[(0,G.jsx)(`div`,{className:`text-xs font-medium text-muted`,children:e(`logsRuntimeMessage`)}),(0,G.jsx)(`pre`,{className:`mono max-h-[min(38rem,60vh)] overflow-auto whitespace-pre-wrap break-words rounded-lg bg-surface-secondary px-4 py-3 text-xs leading-6 text-foreground`,children:_e?.message||`—`})]})]})]})})})}),(0,G.jsx)(Y.Root,{isOpen:Ce,onOpenChange:e=>{we(e),e||(ke.current+=1,Ee(!1),Oe(``),Se(null))},children:(0,G.jsx)(Y.Backdrop,{variant:`blur`,children:(0,G.jsx)(Y.Container,{size:`lg`,scroll:`inside`,children:(0,G.jsxs)(Y.Dialog,{className:`w-full max-w-4xl`,children:[(0,G.jsxs)(Y.Header,{className:`items-start justify-between gap-4 px-5 pt-5`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(Y.Heading,{className:`text-section font-semibold`,children:e(`logsDetailTitle`)}),(0,G.jsx)(`p`,{className:`mono mt-1 text-caption text-muted`,children:xe?.id})]}),(0,G.jsx)(Y.CloseTrigger,{"aria-label":e(`close`),className:`grid size-8 shrink-0 place-items-center rounded-lg text-muted transition-colors hover:bg-surface-secondary hover:text-foreground`,children:(0,G.jsx)(yo,{size:16})})]}),(0,G.jsx)(Y.Body,{className:`space-y-4 px-5 pb-5`,children:Te?(0,G.jsx)(dEe,{}):De?(0,G.jsx)(vI,{title:e(`requestFailed`),description:De}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`dl`,{className:`grid gap-3 sm:grid-cols-2`,children:[[[e(`logsColStatus`),xe?.status||`—`],[e(`logsColModel`),xe?.requested_model||`—`],[e(`logsColReasoning`),xe&&V9(xe)||`—`],[e(`logsColProvider`),xe?ze(xe):`—`],[e(`logsColAccount`),xe?.account_id?Le.get(xe.account_id)||xe.account_id:`—`],[e(`logsColApiKey`),xe?We(xe):`—`],[e(`logsColStream`),xe?.stream?e(`logsStreamYes`):e(`logsStreamNo`)],[e(`logsRouting`),xe?Be(xe.routing):`—`]].map(([e,t])=>(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`dt`,{className:`text-caption text-muted`,children:e}),(0,G.jsx)(`dd`,{className:`mt-1 break-all text-body font-medium`,children:t})]},String(e))),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`dt`,{className:`text-caption text-muted`,children:e(`logsColTokens`)}),(0,G.jsx)(`dd`,{className:`mt-1`,children:xe?(0,G.jsx)(H9,{log:xe,inLabel:e(`logsTokensIn`),outLabel:e(`logsTokensOut`),pointsLabel:t=>e(`logsTokensPoints`,{value:t})}):`—`})]}),(0,G.jsx)(`div`,{className:`sm:col-span-2`,children:(0,G.jsx)(J7,{latencyMs:xe?.latency_ms,ttfbMs:xe?.ttfb_ms,completionTokens:xe?.completion_tokens,stream:xe?.stream,labels:{heading:e(`logsColLatency`),ttft:e(`logsColTTFT`),total:e(`logsLatencyTotal`),tps:e(`logsOutputTPS`)}})})]}),xe&&xe.message_count?(0,G.jsxs)(`div`,{className:`rounded-lg bg-surface-secondary px-3 py-3 text-xs`,children:[(0,G.jsx)(`div`,{className:`font-medium text-muted`,children:e(`logsMessageShape`)}),(0,G.jsxs)(`dl`,{className:`mt-2 grid gap-2 sm:grid-cols-2`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`dt`,{className:`text-caption text-muted`,children:e(`logsMessageCount`)}),(0,G.jsx)(`dd`,{className:`mono mt-0.5`,children:xe.message_count})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`dt`,{className:`text-caption text-muted`,children:e(`logsEmptyMessageIndexes`)}),(0,G.jsx)(`dd`,{className:`mono mt-0.5 break-all`,children:xe.empty_message_indexes?.length?xe.empty_message_indexes.join(`, `):`—`})]}),(0,G.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,G.jsx)(`dt`,{className:`text-caption text-muted`,children:e(`logsMessageRoles`)}),(0,G.jsx)(`dd`,{className:`mono mt-0.5 break-all`,children:xe.message_roles?.join(` → `)||`—`})]})]})]}):null,xe?.error_message?(0,G.jsxs)(`div`,{className:`rounded-lg bg-surface-secondary px-3 py-2 text-xs leading-5 text-muted`,children:[xe.error_kind?(0,G.jsx)(`span`,{className:`mono mr-2 text-muted`,children:xe.error_kind}):null,xe.error_message]}):null,xe?.stream_diagnostic?(0,G.jsxs)(`div`,{className:`rounded-lg bg-surface-secondary px-3 py-3 text-xs`,children:[(0,G.jsx)(`div`,{className:`font-medium text-muted`,children:e(`logsStreamDiagnostics`)}),(0,G.jsx)(`dl`,{className:`mt-2 grid gap-2 sm:grid-cols-2`,children:[[e(`logsCancellationSource`),xe.stream_diagnostic.cancellation_source||`—`],[e(`logsUpstreamStatus`),xe.stream_diagnostic.upstream_status??`—`],[e(`logsSSEEvents`),xe.stream_diagnostic.sse_event_count],[e(`logsBytesRead`),xe.stream_diagnostic.bytes_read],[e(`logsLastEvent`),xe.stream_diagnostic.last_event||`—`],[e(`logsStreamComplete`),xe.stream_diagnostic.saw_done?`yes`:`no`]].map(([e,t])=>(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`dt`,{className:`text-caption text-muted`,children:e}),(0,G.jsx)(`dd`,{className:`mono mt-0.5 break-all`,children:t})]},String(e)))}),xe.stream_diagnostic.context_err||xe.stream_diagnostic.relay_error?(0,G.jsxs)(`div`,{className:`mt-2 space-y-1 break-all text-muted`,children:[xe.stream_diagnostic.context_err?(0,G.jsxs)(`div`,{children:[`context: `,xe.stream_diagnostic.context_err]}):null,xe.stream_diagnostic.relay_error?(0,G.jsxs)(`div`,{children:[`relay: `,xe.stream_diagnostic.relay_error]}):null]}):null]}):null,xe?.usage_detail?(0,G.jsxs)(`div`,{className:`rounded-lg bg-surface-secondary px-3 py-3 text-xs`,children:[(0,G.jsx)(`div`,{className:`font-medium text-muted`,children:e(`logsUsageDetail`)}),(0,G.jsx)(`dl`,{className:`mt-2 grid gap-2 sm:grid-cols-2`,children:[[e(`logsCreditConsumed`),`${U9(xe.usage_detail.credit)} ${xe.usage_detail.unit||`credits`}`],[e(`logsColProvider`),xe.usage_detail.provider||`—`]].map(([e,t])=>(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`dt`,{className:`text-caption text-muted`,children:e}),(0,G.jsx)(`dd`,{className:`mono mt-0.5 break-all`,children:t})]},String(e)))})]}):null,(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`div`,{className:`text-xs font-medium text-muted`,children:e(`logsAttempts`)}),xe?.attempts?.length?(0,G.jsx)(`div`,{className:`mt-2 divide-y divide-separator overflow-hidden rounded-lg bg-surface-secondary`,children:xe.attempts.map(e=>(0,G.jsxs)(`div`,{className:`grid gap-1 px-3 py-2.5 text-xs sm:grid-cols-[48px_minmax(0,1fr)_auto]`,children:[(0,G.jsxs)(`div`,{className:`mono text-muted`,children:[`#`,e.attempt_index]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`div`,{className:`font-medium`,children:e.account_id||`—`}),(0,G.jsx)(`div`,{className:`mt-0.5 text-muted`,children:e.error_message||e.status})]}),(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:z9(e.status===`failover`?`canceled`:e.status),children:e.status})]},e.id))}):(0,G.jsx)(`p`,{className:`mt-2 text-xs text-muted`,children:e(`logsNoAttempts`)})]})]})})]})})})}),(0,G.jsx)(A9,{isOpen:Ae,title:e(`logsClear`),description:e(`logsClearConfirm`),confirmLabel:e(`logsClear`),cancelLabel:e(`close`),closeLabel:e(`close`),isPending:Me,onClose:()=>je(!1),onConfirm:()=>void gt()})]})}var G9=864e5,vEe=8;function K9(e){return`var(--chart-${e%vEe+1})`}function q9(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()}function J9(e){return e<10?`0${e}`:String(e)}function Y9(e){let t=new Date(e);return`${t.getFullYear()}-${J9(t.getMonth()+1)}-${J9(t.getDate())}`}function yEe({accounts:e,t}){let[n,r]=(0,v.useState)(!1),{buckets:i,rows:a,todayStart:o,maxTotal:s}=(0,v.useMemo)(()=>{let t=q9(new Date),n=new Map;e.forEach((e,t)=>n.set(e.id,K9(t)));let r=new Map,i=[];for(let a of e){let e=a.quota?.packages??[],o=n.get(a.id)||K9(0),s=a.name||a.id,c=e.filter(e=>(e.remain??0)>0&&(e.ends_at??0)>0),l=0,u=0,d=0,f=0;for(let e of c){let n=e.ends_at*1e3,i=e.remain??0;d+=i;let c=q9(new Date(n)),u=c{let e=new Date(c);return{day:p,label:`${e.getMonth()+1}/${e.getDate()}`,ts:c,segments:[],total:0}})(),r.set(p,m));let h=m.segments.find(e=>e.id===a.id);h?h.remain+=i:m.segments.push({id:a.id,name:s,color:o,remain:i}),m.total+=i}if(l){let e=Y9(q9(new Date(l)));for(let t of c)Y9(q9(new Date(t.ends_at*1e3)))===e&&(u+=t.remain??0)}let p=l?Math.max(0,Math.round((q9(new Date(l))-t)/G9)):-1;i.push({id:a.id,name:s,color:o,remain:d,expiredRemain:f,soonest:l?Math.floor(l/1e3):0,soonestRemain:u,daysLeft:p,dailyBurn:l?u/Math.max(p,1):0,packs:c.length})}i.sort((e,t)=>e.soonest&&t.soonest?e.soonest-t.soonest:e.soonest?-1:t.soonest?1:t.remain-e.remain);let a=[...r.values()].sort((e,t)=>e.ts-t.ts);return{buckets:a,rows:i,todayStart:t,maxTotal:a.reduce((e,t)=>Math.max(e,t.total),0)}},[e]);if(!a.some(e=>e.packs>0))return null;let c=n?i:i.slice(0,8);return(0,G.jsxs)(xS,{className:`overflow-hidden p-0`,"data-gsap-reveal":!0,children:[(0,G.jsxs)(`div`,{className:`flex flex-col gap-3 border-b border-separator px-4 py-4 sm:flex-row sm:flex-wrap sm:items-center sm:justify-between sm:px-5`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:t(`expiryDistTitle`)}),(0,G.jsx)(`p`,{className:`mt-0.5 text-xs text-muted`,children:t(`expiryDistHint`)})]}),i.length>8?(0,G.jsx)(J,{size:`sm`,variant:`ghost`,onPress:()=>r(e=>!e),children:n?t(`expiryDistCollapse`):t(`expiryDistExpand`,{n:i.length})}):null]}),(0,G.jsxs)(`div`,{className:`space-y-4 p-4 sm:space-y-3 sm:p-5`,children:[(0,G.jsx)(`div`,{className:`space-y-2.5 sm:space-y-1.5`,children:c.map(e=>{let n=e.ts===o,r=s>0?e.total/s*100:0;return(0,G.jsxs)(`div`,{className:`flex flex-col gap-1.5 sm:grid sm:grid-cols-[52px_minmax(0,1fr)_auto] sm:items-center sm:gap-2`,children:[(0,G.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3 sm:contents`,children:[(0,G.jsx)(`span`,{className:`mono text-caption ${e.day===`__expired__`?`font-semibold text-danger`:n?`font-semibold text-foreground`:`text-muted`}`,children:e.day===`__expired__`?t(`expiryDistExpired`):e.label}),(0,G.jsx)(`span`,{className:`mono text-caption text-foreground sm:hidden`,children:s9(e.total)})]}),(0,G.jsx)(`div`,{className:`h-2.5 w-full rounded-full bg-surface-tertiary`,role:`img`,"aria-label":`${e.day} ${t(`expiryDistDayTotal`,{n:s9(e.total)})}`,title:e.day,children:(0,G.jsx)(`div`,{className:`flex h-full items-stretch overflow-hidden rounded-full`,style:{width:`${r}%`},children:e.segments.map(t=>(0,G.jsx)(`span`,{style:{width:`${t.remain/e.total*100}%`,backgroundColor:t.color},title:`${t.name} · ${s9(t.remain)}`},t.id))})}),(0,G.jsx)(`span`,{className:`mono hidden text-caption text-foreground sm:inline`,children:s9(e.total)})]},e.day)})}),(0,G.jsx)(`div`,{className:`flex flex-wrap gap-x-3 gap-y-1.5 pt-1`,children:a.filter(e=>e.remain>0).map(e=>(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-caption text-muted`,children:[(0,G.jsx)(`i`,{className:`size-2 rounded-[3px]`,style:{backgroundColor:e.color}}),(0,G.jsx)(`span`,{className:`max-w-[120px] truncate`,children:e.name})]},e.id))}),(0,G.jsx)(`div`,{className:`divide-y divide-separator md:hidden`,children:a.filter(e=>e.packs>0).map(e=>{let n=e.daysLeft>=0&&e.daysLeft<=2,r=e.daysLeft>=0&&e.daysLeft<=7,i=e.soonest?new Date(e.soonest*1e3):null,a=e.expiredRemain>0&&e.daysLeft<0||n?`font-semibold text-danger`:r?`text-warning`:`text-muted`,o=e.daysLeft>=0?t(`expiryDistDays`,{n:e.daysLeft}):e.expiredRemain>0?t(`expiryDistExpired`):`—`;return(0,G.jsxs)(`article`,{className:`space-y-3 py-3.5`,children:[(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,G.jsx)(`i`,{className:`size-2 shrink-0 rounded-[3px]`,style:{backgroundColor:e.color}}),(0,G.jsx)(`span`,{className:`truncate text-body font-medium text-foreground`,children:e.name})]}),(0,G.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-4 gap-y-3`,children:[(0,G.jsxs)(`div`,{className:`space-y-1`,children:[(0,G.jsx)(`div`,{className:`text-caption text-muted`,children:t(`expiryDistColSoonest`)}),(0,G.jsx)(`div`,{className:`mono text-body text-muted`,children:i?`${i.getMonth()+1}/${i.getDate()}`:`—`})]}),(0,G.jsxs)(`div`,{className:`space-y-1`,children:[(0,G.jsx)(`div`,{className:`text-caption text-muted`,children:t(`expiryDistColDaysLeft`)}),(0,G.jsx)(`div`,{className:`mono text-body ${a}`,children:o})]}),(0,G.jsxs)(`div`,{className:`space-y-1`,children:[(0,G.jsx)(`div`,{className:`text-caption text-muted`,children:t(`expiryDistColBatch`)}),(0,G.jsx)(`div`,{className:`mono text-body text-foreground`,children:s9(e.soonestRemain)})]}),(0,G.jsxs)(`div`,{className:`space-y-1`,children:[(0,G.jsx)(`div`,{className:`text-caption text-muted`,children:t(`expiryDistColDaily`)}),(0,G.jsx)(`div`,{className:`mono text-body text-foreground`,children:e.soonest?s9(e.dailyBurn):`—`})]})]})]},e.id)})}),(0,G.jsx)(X,{"aria-label":t(`expiryDistTitle`),className:`hidden md:block`,children:(0,G.jsx)(X.ScrollContainer,{className:`min-w-0 overflow-x-auto`,children:(0,G.jsxs)(X.Content,{className:`min-w-[32rem]`,children:[(0,G.jsxs)(X.Header,{children:[(0,G.jsx)(X.Column,{isRowHeader:!0,children:t(`expiryDistColAccount`)}),(0,G.jsx)(X.Column,{children:(0,G.jsx)(`div`,{className:`text-center`,children:t(`expiryDistColSoonest`)})}),(0,G.jsx)(X.Column,{children:(0,G.jsx)(`div`,{className:`text-center`,children:t(`expiryDistColDaysLeft`)})}),(0,G.jsx)(X.Column,{children:(0,G.jsx)(`div`,{className:`text-center`,children:t(`expiryDistColBatch`)})}),(0,G.jsx)(X.Column,{children:(0,G.jsx)(`div`,{className:`text-center`,children:t(`expiryDistColDaily`)})})]}),(0,G.jsx)(X.Body,{children:a.filter(e=>e.packs>0).map(e=>{let n=e.daysLeft>=0&&e.daysLeft<=2,r=e.daysLeft>=0&&e.daysLeft<=7,i=e.soonest?new Date(e.soonest*1e3):null;return(0,G.jsxs)(X.Row,{children:[(0,G.jsx)(X.Cell,{children:(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,G.jsx)(`i`,{className:`size-2 shrink-0 rounded-[3px]`,style:{backgroundColor:e.color}}),(0,G.jsx)(`span`,{className:`max-w-[150px] truncate text-foreground`,children:e.name})]})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`div`,{className:`mono text-center text-muted`,children:i?`${i.getMonth()+1}/${i.getDate()}`:`—`})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`div`,{className:`mono text-center ${e.expiredRemain>0&&e.daysLeft<0||n?`font-semibold text-danger`:r?`text-warning`:`text-muted`}`,children:e.daysLeft>=0?t(`expiryDistDays`,{n:e.daysLeft}):e.expiredRemain>0?t(`expiryDistExpired`):`—`})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`div`,{className:`mono text-center text-foreground`,children:s9(e.soonestRemain)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`div`,{className:`mono text-center text-foreground`,children:e.soonest?s9(e.dailyBurn):`—`})})]},e.id)})})]})})}),(0,G.jsx)(`p`,{className:`text-caption text-muted`,children:t(`expiryDistFoot`)})]})]})}function bEe(){return QF(`/api/usage/pricing`)}function xEe(e={}){let t=new URLSearchParams;return e.from&&t.set(`from`,e.from),e.to&&t.set(`to`,e.to),e.api_key&&t.set(`api_key`,e.api_key),QF(`/api/usage/cost${t.toString()?`?${t}`:``}`)}var X9=(0,v.lazy)(()=>C(()=>import(`./CostChart-_UJ6Pb7Z.js`).then(e=>({default:e.CostChart})),__vite__mapDeps([2,1])));function SEe(){let e=new Date;return e.setHours(0,0,0,0),e.toISOString()}var CEe={window:{from:``,to:``,hours:24},currency:`CNY`,models:[],totals:{id:`total`,label:``,vendor:``,currency:`CNY`,requests:0,cache_hit:0,cache_miss:0,output:0,total_tokens:0,cost:0,cost_off_peak:0,cost_peak:0,peak_requests:0,credits:0,priced:!1},series:[]};function wEe(e,t){if(!t)return`0%`;let n=e/t*100;return`${n>=10?n.toFixed(0):n.toFixed(1)}%`}function TEe({apiKeyFilter:e=``}){let{t,lang:n}=GF(),[r,i]=(0,v.useState)(`today`),[a,o]=(0,v.useState)(`credits`),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(!0),[p,m]=(0,v.useState)(``);(0,v.useEffect)(()=>{let e=!1;return bEe().then(t=>{e||u(t)}).catch(()=>{}),()=>{e=!0}},[]);let h=(0,v.useCallback)(async()=>{f(!0);try{let t=await xEe({...r===`all`?{}:r===`today`?{from:SEe()}:{from:new Date(Date.now()-Number(r)*3600*1e3).toISOString(),to:new Date().toISOString()},api_key:e||void 0});c(t),m(``)}catch(e){c(null),m(e instanceof Error?e.message:String(e))}finally{f(!1)}},[r,e]);(0,v.useEffect)(()=>{h()},[h]);let g=s??CEe,_=g.totals,y=_.requests>0&&g.models.length>0,b=g.models.filter(e=>e.priced),x=_.cost>0,S=[{label:t(`usageCredits`),value:yV(_.credits),detail:t(`usageCreditsHint`)},{label:t(`usageTotalTokens`),value:uV(_.total_tokens),detail:`${uV(_.cache_hit)} / ${uV(_.cache_miss)} / ${uV(_.output)} ${t(`usageTokenSplitNote`)}`},{label:t(`usageRequests`),value:String(_.requests),detail:t(`usageModelCount`,{count:g.models.length})},{label:t(`usageCacheHitRate`),value:wEe(_.cache_hit,_.cache_hit+_.cache_miss),detail:uV(_.cache_hit)}],C=a===`credits`?yV(_.credits):a===`tokens`?uV(_.total_tokens):_V(_.cost);return(0,G.jsxs)(`div`,{className:`space-y-6`,children:[(0,G.jsxs)(`section`,{className:`flex flex-wrap items-center justify-end gap-3 pb-2`,children:[(0,G.jsx)(wV,{value:r,onChange:e=>i(e),ariaLabel:t(`usageWindow`),options:[{id:`today`,label:t(`statsWindowToday`)},{id:`24`,label:t(`usageWindow24h`)},{id:`168`,label:t(`usageWindow7d`)},{id:`all`,label:t(`usageWindowTotal`)}]}),(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,onPress:()=>void h(),isDisabled:d,children:[(0,G.jsx)(Qr,{size:14}),t(`refresh`)]})]}),p?(0,G.jsx)(vI,{title:t(`failedStats`,{msg:p})}):null,(0,G.jsx)(`section`,{className:`grid gap-3 sm:grid-cols-2 sm:gap-4 xl:grid-cols-4`,children:S.map(e=>(0,G.jsxs)(xS,{className:`gap-0 p-4`,children:[(0,G.jsx)(`div`,{className:`text-body text-muted`,children:e.label}),(0,G.jsx)(`div`,{className:`tabular mt-1.5 text-section font-semibold`,children:d?(0,G.jsx)(Q,{className:`h-5 w-16`}):e.value}),(0,G.jsx)(`div`,{className:`mono mt-1 truncate text-caption text-muted`,children:d?(0,G.jsx)(Q,{className:`h-3 w-24`}):e.detail||`\xA0`})]},e.label))}),(0,G.jsxs)(xS,{className:`overflow-hidden p-0`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-b border-separator px-5 py-4`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold tracking-[-0.015em]`,children:t(`usageChartTitle`)}),(0,G.jsx)(`p`,{className:`mt-0.5 text-xs text-muted`,children:t(`usageChartHint`)})]}),(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,G.jsx)(wV,{value:a,onChange:e=>o(e),ariaLabel:t(`usageChartMetric`),options:[{id:`credits`,label:t(`usageColCredits`)},{id:`tokens`,label:t(`usageColTokens`)}]}),(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:`default`,children:C})]})]}),(0,G.jsx)(`div`,{className:`p-5`,children:d?(0,G.jsx)(`div`,{className:`grid h-72 place-items-center`,children:(0,G.jsx)(Q,{className:`h-56 w-full`})}):y?(0,G.jsx)(v.Suspense,{fallback:(0,G.jsx)(`div`,{className:`grid h-72 place-items-center`,children:(0,G.jsx)(Q,{className:`h-56 w-full`})}),children:(0,G.jsx)(X9,{series:g.series,models:g.models,lang:n,emptyLabel:t(`usageChartEmpty`),totalLabel:t(`usageTotals`),metric:a})}):(0,G.jsx)(O7,{title:t(`usageEmpty`),hint:t(`usageRetentionHint`)})})]}),(0,G.jsxs)(xS,{className:`overflow-hidden p-0`,children:[(0,G.jsx)(`div`,{className:`flex items-center justify-between gap-3 border-b border-separator px-5 py-4`,children:(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold tracking-[-0.015em]`,children:t(`usageBreakdownTitle`)}),(0,G.jsx)(`p`,{className:`mt-0.5 text-xs text-muted`,children:t(`usageBreakdownHint`)})]})}),d?(0,G.jsx)(`div`,{className:`space-y-3 p-5`,children:[0,1,2].map(e=>(0,G.jsx)(Q,{className:`h-9 w-full`},e))}):y?(0,G.jsx)(X,{children:(0,G.jsx)(X.ScrollContainer,{children:(0,G.jsxs)(X.Content,{"aria-label":t(`usageBreakdownTitle`),children:[(0,G.jsxs)(X.Header,{children:[(0,G.jsx)(X.Column,{isRowHeader:!0,children:t(`usageColModel`)}),(0,G.jsx)(X.Column,{children:t(`usageColRequests`)}),(0,G.jsx)(X.Column,{children:t(`usageColInputHit`)}),(0,G.jsx)(X.Column,{children:t(`usageColInputMiss`)}),(0,G.jsx)(X.Column,{children:t(`usageColOutput`)}),(0,G.jsx)(X.Column,{children:t(`usageColTokens`)}),(0,G.jsx)(X.Column,{children:t(`usageColCredits`)})]}),(0,G.jsxs)(X.Body,{children:[g.models.map(e=>(0,G.jsxs)(X.Row,{children:[(0,G.jsxs)(X.Cell,{children:[(0,G.jsx)(`div`,{className:`text-sm font-medium`,children:e.label}),(0,G.jsx)(`div`,{className:`mono mt-0.5 text-[10px] text-muted`,children:e.id})]}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-xs`,children:e.requests})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-xs`,children:uV(e.cache_hit)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-xs`,children:uV(e.cache_miss)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-xs`,children:uV(e.output)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-xs`,children:uV(e.total_tokens)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-xs font-semibold`,children:yV(e.credits)})})]},e.id)),(0,G.jsxs)(X.Row,{children:[(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`text-sm font-semibold`,children:t(`usageTotals`)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-xs font-semibold`,children:_.requests})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-xs font-semibold`,children:uV(_.cache_hit)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-xs font-semibold`,children:uV(_.cache_miss)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-xs font-semibold`,children:uV(_.output)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-xs font-semibold`,children:uV(_.total_tokens)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-xs font-semibold`,children:yV(_.credits)})})]})]})]})})}):(0,G.jsx)(O7,{title:t(`usageEmpty`),hint:t(`usageRetentionHint`)})]}),(0,G.jsx)(yh,{className:`rounded-xl bg-surface-secondary`,hideSeparator:!0,defaultExpandedKeys:[],children:(0,G.jsxs)(yh.Item,{id:`deepseek-estimate`,children:[(0,G.jsx)(yh.Heading,{children:(0,G.jsxs)(yh.Trigger,{className:`items-center gap-3 px-5 py-4 text-left`,children:[(0,G.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,G.jsx)(`span`,{className:`block font-semibold tracking-[-0.015em]`,children:t(`usageEstimateTitle`)}),(0,G.jsx)(`span`,{className:`mt-0.5 block text-xs text-muted`,children:t(`usageEstimateHint`)})]}),x?(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:`default`,children:_V(_.cost)}):null,(0,G.jsx)(yh.Indicator,{})]})}),(0,G.jsx)(yh.Panel,{children:(0,G.jsxs)(yh.Body,{className:`space-y-5 px-5 pb-5`,children:[(0,G.jsx)(`p`,{className:`text-xs leading-6 text-muted`,children:t(`usageRenderNote`)}),x?(0,G.jsxs)(`div`,{children:[(0,G.jsxs)(`div`,{className:`mb-3 flex items-center justify-between gap-3`,children:[(0,G.jsx)(`h4`,{className:`text-sm font-medium`,children:t(`usageEstimateChartTitle`)}),(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:`default`,children:_V(_.cost)})]}),(0,G.jsx)(v.Suspense,{fallback:(0,G.jsx)(Q,{className:`h-56 w-full`}),children:(0,G.jsx)(X9,{series:g.series,models:b.length?b:g.models,lang:n,emptyLabel:t(`usageEstimateChartEmpty`),totalLabel:t(`usageTotals`),metric:`cost`})})]}):null,b.length?(0,G.jsx)(X,{children:(0,G.jsx)(X.ScrollContainer,{children:(0,G.jsxs)(X.Content,{"aria-label":t(`usageEstimateTitle`),children:[(0,G.jsxs)(X.Header,{children:[(0,G.jsx)(X.Column,{isRowHeader:!0,children:t(`usageColModel`)}),(0,G.jsx)(X.Column,{children:t(`usageColSplit`)}),(0,G.jsx)(X.Column,{children:t(`usageColCost`)})]}),(0,G.jsxs)(X.Body,{children:[b.map(e=>(0,G.jsxs)(X.Row,{children:[(0,G.jsxs)(X.Cell,{children:[(0,G.jsx)(`div`,{className:`text-sm font-medium`,children:e.label}),(0,G.jsx)(`div`,{className:`mono mt-0.5 text-[10px] text-muted`,children:e.id})]}),(0,G.jsx)(X.Cell,{children:(0,G.jsxs)(`span`,{className:`mono text-xs text-muted`,children:[_V(e.cost_peak),` / `,_V(e.cost_off_peak)]})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-sm font-semibold`,children:_V(e.cost)})})]},e.id)),(0,G.jsxs)(X.Row,{children:[(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`text-sm font-semibold`,children:t(`usageTotals`)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsxs)(`span`,{className:`mono text-xs text-muted`,children:[_V(_.cost_peak),` / `,_V(_.cost_off_peak)]})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-sm font-semibold`,children:_V(_.cost)})})]})]})]})})}):(0,G.jsx)(`p`,{className:`text-xs text-muted`,children:t(`usageEstimateChartEmpty`)}),(0,G.jsxs)(`div`,{className:`grid gap-5 xl:grid-cols-[minmax(0,1fr)_minmax(0,1fr)]`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h4`,{className:`mb-2 text-sm font-medium`,children:t(`usagePriceTitle`)}),(0,G.jsx)(`p`,{className:`mb-3 text-xs text-muted`,children:t(`usagePeakNote`)}),(0,G.jsxs)(`div`,{className:`divide-y divide-separator rounded-lg bg-background`,children:[(l?.models??[]).map(e=>(0,G.jsxs)(`div`,{className:`px-4 py-3`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,G.jsx)(`div`,{className:`text-sm font-medium`,children:e.label}),(0,G.jsx)(`span`,{className:`mono text-[10px] text-muted`,children:e.currency})]}),(0,G.jsx)(`div`,{className:`mono mt-1 text-[10px] text-muted`,children:e.id}),(0,G.jsxs)(`div`,{className:`mt-2 grid grid-cols-2 gap-2 text-[11px]`,children:[(0,G.jsxs)(`div`,{className:`rounded-lg bg-surface-secondary px-2.5 py-2`,children:[(0,G.jsx)(`div`,{className:`text-[10px] text-muted`,children:t(`usagePriceBandOff`)}),(0,G.jsxs)(`div`,{className:`mono mt-0.5`,children:[vV(e.off_peak.cache_hit),` · `,vV(e.off_peak.cache_miss),` · `,vV(e.off_peak.output)]}),(0,G.jsxs)(`div`,{className:`mt-1 text-[9px] text-muted`,children:[t(`usagePriceHit`),` · `,t(`usagePriceMiss`),` · `,t(`usagePriceOutput`)]})]}),(0,G.jsxs)(`div`,{className:`rounded-lg bg-surface-secondary px-2.5 py-2`,children:[(0,G.jsx)(`div`,{className:`text-[10px] text-muted`,children:t(`usagePriceBandPeak`)}),(0,G.jsxs)(`div`,{className:`mono mt-0.5`,children:[vV(e.peak.cache_hit),` · `,vV(e.peak.cache_miss),` · `,vV(e.peak.output)]}),(0,G.jsxs)(`div`,{className:`mt-1 text-[9px] text-muted`,children:[t(`usagePriceHit`),` · `,t(`usagePriceMiss`),` · `,t(`usagePriceOutput`)]})]})]})]},e.id)),l?.models?.length?null:(0,G.jsx)(`div`,{className:`px-4 py-6 text-sm text-muted`,children:t(`usageEmpty`)})]})]}),(0,G.jsxs)(`div`,{className:`space-y-3 text-xs leading-6 text-muted`,children:[(0,G.jsx)(`h4`,{className:`text-sm font-medium text-foreground`,children:t(`usageNoteTitle`)}),(0,G.jsx)(`p`,{children:t(`usageRetentionHint`)}),(0,G.jsx)(`p`,{children:t(`usagePeakNote`)}),g.unpriced?.length?(0,G.jsx)(`p`,{children:t(`usageUnpricedHint`,{models:g.unpriced.join(`, `)})}):null,l?.note?(0,G.jsx)(`p`,{className:`mono text-[10px]`,children:l.note}):null]})]})]})})]})})]})}var EEe=500,DEe={model:`model`,account:`account`,provider:`provider`};function OEe(e,t,n){let r=e.prompt_tokens??0,i=e.completion_tokens??0,a=e.key===`(unknown)`||e.key===`(unassigned)`||!e.key;return{key:e.key,label:n,count:e.count,success:e.count?e.ok/e.count:0,p95:e.latency_p95_ms??null,tokens:r+i,prompt:r,completion:i,credits:e.credits??0,cache_write:e.cache_write_tokens??0,cache_read:e.cache_read_tokens??0,filter:a?void 0:{[DEe[t]]:e.key}}}function kEe(e,t,n){let r=n===`ascending`?1:-1;return[...e].sort((e,n)=>{if(t===`label`)return r*e.label.localeCompare(n.label);let i=e[t],a=n[t];return i==null&&a==null?0:i==null?1:a==null?-1:r*(i-a)||e.label.localeCompare(n.label)})}function Z9(e){return e?e>=1e3?uV(e):String(Math.round(e*100)/100):`0`}function AEe(){let{t:e}=GF(),t=at(),[n,r]=On(),[i,a]=(0,v.useState)(`stats`),[o,s]=(0,v.useState)(`model`),[c,l]=(0,v.useState)(`today`),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(null),[m,h]=(0,v.useState)(!0),[g,_]=(0,v.useState)(``),[y,b]=(0,v.useState)([]),[x,S]=(0,v.useState)(`count`),[C,w]=(0,v.useState)(`descending`),[T,E]=(0,v.useState)(()=>new URLSearchParams(window.location.search).get(`api_key`)??``),{options:D}=R9(),O=(0,v.useRef)(0),k=n.toString(),A=(0,v.useRef)(k);(0,v.useEffect)(()=>{k!==A.current&&(A.current=k,E(new URLSearchParams(k).get(`api_key`)??``))},[k]);let j=T?`api_key=${encodeURIComponent(T)}`:``;(0,v.useEffect)(()=>{j!==A.current&&(A.current=j,r(j,{replace:!0}))},[j,r]),(0,v.useEffect)(()=>{let e=!1;return $F(!1).then(t=>{e||b(t.data||[])}).catch(()=>{}),()=>{e=!0}},[]);let M=u?.start?.toString()??``,N=u?.end?.toString()??``;(0,v.useEffect)(()=>{let e=kV(c,u);if(!e){h(!1);return}let t=++O.current;cV({...e,dim:[o],limit:EEe,api_key:T||void 0}).then(e=>{t===O.current&&(p(e),_(``))}).catch(e=>{t===O.current&&(p(null),_(e instanceof Error?e.message:String(e)))}).finally(()=>{t===O.current&&h(!1)})},[o,c,M,N,T]);let P=(0,v.useMemo)(()=>{let t=new Map(y.map(e=>[e.id,e.name||e.id]));return kEe(((o===`model`?f?.models:o===`account`?f?.accounts:f?.providers)??[]).map(n=>{let r=n.key===`(unknown)`?e(`statsUnknown`):n.key===`(unassigned)`?e(`statsUnassigned`):o===`account`?t.get(n.key)||n.key:o===`provider`?HV(n.key,e):n.key;return OEe(n,o,r)}),x,C)},[f,o,y,x,C,e]),F=f?.totals,I=f?.tokens;function L(e){if(!f||!e.filter)return;let n={...e.filter,api_key:T||void 0};t(jV(n,f.window.from,f.window.to))}let R=[{id:`label`,label:e(o===`model`?`logsColModel`:o===`account`?`logsColAccount`:`logsColProvider`)},{id:`count`,label:e(`usageColRequests`),numeric:!0},{id:`success`,label:e(`usageColSuccess`),numeric:!0},{id:`p95`,label:e(`statsLatencyP95`),numeric:!0},{id:`tokens`,label:e(`usageColTokens`),numeric:!0},{id:`cache_write`,label:e(`usageColCacheWrite`),numeric:!0},{id:`credits`,label:e(`usageColCredits`),numeric:!0}],z=(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`section`,{className:`flex flex-wrap items-center justify-end gap-3 pb-1`,children:(0,G.jsx)(AV,{value:c,onChange:l,custom:u,onCustomChange:d,onBusy:()=>h(!0),t:e})}),g?(0,G.jsx)(vI,{title:e(`failedStats`,{msg:g})}):null,(0,G.jsx)(`section`,{className:`grid gap-3 sm:grid-cols-2 sm:gap-4 xl:grid-cols-5`,children:[[e(`usageColRequests`),F?uV(F.requests):`—`,e(`statsWindowHint`,{window:e(OV[c])})],[e(`usageColSuccess`),F?pV(F.success_rate):`—`,F?`${F.ok} / ${F.requests}`:``],[e(`usageColTokens`),I?uV(I.total):`—`,I?`${uV(I.prompt)} / ${uV(I.completion)}`:``],[e(`usageColCacheWrite`),I?uV(I.cache_write??0):`—`,I?`${e(`chartCacheRead`)} ${uV(I.cache_read)}`:``],[e(`usageColCredits`),F?Z9(F.credits??0):`—`,``]].map(([e,t,n])=>(0,G.jsxs)(xS,{className:`gap-0 p-4`,children:[(0,G.jsx)(`div`,{className:`text-body text-muted`,children:e}),(0,G.jsx)(`div`,{className:`tabular mt-1.5 text-section font-semibold`,children:m?(0,G.jsx)(Q,{className:`h-5 w-16`}):t}),(0,G.jsx)(`div`,{className:`mono mt-1 truncate text-caption text-muted`,children:m?(0,G.jsx)(Q,{className:`h-3 w-24`}):n||`\xA0`})]},e))}),(0,G.jsxs)(xS,{className:`overflow-hidden p-0`,children:[(0,G.jsxs)(`div`,{className:`flex flex-col gap-3 border-b border-separator px-5 py-3 sm:flex-row sm:flex-wrap sm:items-center sm:justify-between`,children:[(0,G.jsx)(EA,{selectedKey:o,onSelectionChange:e=>{h(!0),s(String(e))},children:(0,G.jsx)(EA.ListContainer,{className:`w-fit`,children:(0,G.jsxs)(EA.List,{"aria-label":e(`usageTitle`),children:[(0,G.jsxs)(TA,{id:`model`,className:`gap-1.5 whitespace-nowrap`,children:[(0,G.jsx)(EA.Indicator,{className:`transition-none`}),(0,G.jsx)(Bi,{size:14}),e(`usageByModel`)]}),(0,G.jsxs)(TA,{id:`account`,className:`gap-1.5 whitespace-nowrap`,children:[(0,G.jsx)(EA.Indicator,{className:`transition-none`}),(0,G.jsx)(po,{size:14}),e(`usageByAccount`)]}),(0,G.jsxs)(TA,{id:`provider`,className:`gap-1.5 whitespace-nowrap`,children:[(0,G.jsx)(EA.Indicator,{className:`transition-none`}),(0,G.jsx)(Ja,{size:14}),e(`usageByProvider`)]})]})})}),(0,G.jsx)(`span`,{className:`mono text-caption text-muted`,children:m?``:e(`usageRowCount`,{count:P.length})})]}),m?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`divide-y divide-separator md:hidden`,"aria-busy":`true`,children:Array.from({length:4},(e,t)=>(0,G.jsxs)(`div`,{className:`space-y-3 px-5 py-4`,children:[(0,G.jsx)(Q,{className:`h-4 w-40`}),(0,G.jsx)(`div`,{className:`grid grid-cols-2 gap-x-4 gap-y-3`,children:Array.from({length:4},(e,t)=>(0,G.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,G.jsx)(Q,{className:`h-3 w-12`}),(0,G.jsx)(Q,{className:`h-4 w-16`})]},t))})]},t))}),(0,G.jsx)(`div`,{className:`hidden divide-y divide-separator md:block`,"aria-busy":`true`,children:Array.from({length:6},(e,t)=>(0,G.jsxs)(`div`,{className:`flex items-center gap-6 px-5 py-3.5`,children:[(0,G.jsx)(Q,{className:`h-4 w-40`}),(0,G.jsx)(`div`,{className:`flex-1`}),Array.from({length:6},(e,t)=>(0,G.jsx)(Q,{className:`h-4 w-14`},t))]},t))})]}):P.length===0?(0,G.jsxs)(`div`,{className:`flex items-center gap-2 px-5 py-10 text-body text-muted`,children:[(0,G.jsx)(vi,{size:16}),e(`usageEmpty`)]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`divide-y divide-separator md:hidden`,children:P.map(t=>{let n=!!(t.filter&&f),r=[{label:e(`usageColRequests`),value:String(t.count)},{label:e(`usageColSuccess`),value:pV(t.success),tone:t.success<.9?`text-warning`:void 0},{label:e(`statsLatencyP95`),value:dV(t.p95)},{label:e(`usageColTokens`),value:uV(t.tokens),sub:`${uV(t.prompt)} / ${uV(t.completion)}`},{label:e(`usageColCacheWrite`),value:uV(t.cache_write)},{label:e(`usageColCredits`),value:Z9(t.credits)}];return(0,G.jsxs)(`article`,{className:`space-y-3 px-5 py-4 ${n?`cursor-pointer`:``}`,onClick:n?()=>L(t):void 0,onKeyDown:n?e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),L(t))}:void 0,role:n?`button`:void 0,tabIndex:n?0:void 0,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[o===`provider`&&t.filter?(0,G.jsx)(WV,{provider:t.key,size:14}):null,(0,G.jsx)(`span`,{className:`truncate text-body font-medium`,children:t.label})]}),o===`account`&&t.label!==t.key?(0,G.jsx)(`div`,{className:`mono truncate text-caption text-muted`,children:t.key}):null,(0,G.jsx)(`div`,{className:`grid grid-cols-2 gap-x-4 gap-y-3`,children:r.map(e=>(0,G.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,G.jsx)(`div`,{className:`text-caption text-muted`,children:e.label}),(0,G.jsx)(`div`,{className:`mono text-body ${e.tone??`text-foreground`}`,children:e.value}),`sub`in e&&e.sub?(0,G.jsx)(`div`,{className:`mono text-caption text-muted`,children:e.sub}):null]},e.label))})]},t.key)})}),(0,G.jsx)(X,{className:`usage-table hidden md:block`,children:(0,G.jsx)(X.ScrollContainer,{className:`min-w-0 overflow-x-auto`,children:(0,G.jsxs)(X.Content,{"aria-label":e(`usageTitle`),className:`min-w-[48rem]`,sortDescriptor:{column:x,direction:C},onSortChange:e=>{S(String(e.column)),w(e.direction)},children:[(0,G.jsx)(X.Header,{children:R.map(e=>(0,G.jsx)(X.Column,{id:e.id,allowsSorting:!0,isRowHeader:e.id===`label`,className:e.numeric?`text-right`:void 0,children:({sortDirection:t})=>(0,G.jsx)(X.SortableColumnHeader,{sortDirection:t,className:e.numeric?`justify-end`:void 0,children:e.label})},e.id))}),(0,G.jsx)(X.Body,{children:P.map(e=>(0,G.jsxs)(X.Row,{id:e.key,className:e.filter&&f?`cursor-pointer`:void 0,onAction:e.filter&&f?()=>L(e):void 0,children:[(0,G.jsx)(X.Cell,{children:(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[o===`provider`&&e.filter?(0,G.jsx)(WV,{provider:e.key,size:14}):null,(0,G.jsx)(`span`,{className:`truncate text-body font-medium`,children:e.label}),o===`account`&&e.label!==e.key?(0,G.jsx)(`span`,{className:`mono truncate text-caption text-muted`,children:e.key}):null]})}),(0,G.jsx)(X.Cell,{className:`mono text-right text-body`,children:e.count}),(0,G.jsx)(X.Cell,{className:`mono text-right text-body`,children:(0,G.jsx)(`span`,{className:e.success<.9?`text-warning`:void 0,children:pV(e.success)})}),(0,G.jsx)(X.Cell,{className:`mono text-right text-body`,children:dV(e.p95)}),(0,G.jsxs)(X.Cell,{className:`text-right`,children:[(0,G.jsx)(`div`,{className:`mono text-body`,children:uV(e.tokens)}),(0,G.jsxs)(`div`,{className:`mono text-caption text-muted`,children:[uV(e.prompt),` / `,uV(e.completion)]})]}),(0,G.jsx)(X.Cell,{className:`mono text-right text-body`,children:uV(e.cache_write)}),(0,G.jsx)(X.Cell,{className:`mono text-right text-body`,children:Z9(e.credits)})]},e.key))})]})})})]})]}),(0,G.jsx)(yEe,{accounts:y,t:e})]});return(0,G.jsxs)(`div`,{className:`space-y-6 sm:space-y-6`,children:[(0,G.jsxs)(`section`,{className:`flex flex-wrap items-end justify-between gap-3 pb-1`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h2`,{className:`text-title font-semibold`,children:e(`usageTitle`)}),(0,G.jsx)(`p`,{className:`mt-1 max-w-2xl text-body leading-6 text-muted`,children:e(i===`cost`?`usageCostLead`:`usageLead`)})]}),(0,G.jsx)(L9,{ariaLabel:e(`logsColApiKey`),value:T,onChange:e=>{h(!0),E(e)},options:D,allLabel:e(`logsFilterApiKeyAll`),searchPlaceholder:e(`logsSearchApiKey`),emptyLabel:e(`logsNoFilterOptions`)})]}),(0,G.jsxs)(EA,{selectedKey:i,onSelectionChange:e=>a(String(e)),children:[(0,G.jsx)(EA.ListContainer,{className:`w-fit`,children:(0,G.jsxs)(EA.List,{"aria-label":e(`usageTitle`),children:[(0,G.jsxs)(TA,{id:`stats`,className:`gap-1.5 whitespace-nowrap`,children:[(0,G.jsx)(EA.Indicator,{className:`transition-none`}),e(`usageStatsTab`)]}),(0,G.jsxs)(TA,{id:`cost`,className:`gap-1.5 whitespace-nowrap`,children:[(0,G.jsx)(EA.Indicator,{className:`transition-none`}),e(`usageCostTab`)]})]})}),(0,G.jsx)(EA.Panel,{id:`stats`,className:`space-y-6 pt-5`,children:z}),(0,G.jsx)(EA.Panel,{id:`cost`,className:`pt-5`,children:(0,G.jsx)(TEe,{apiKeyFilter:T})})]})]})}var jEe=1.1;function MEe({label:e,onConfirm:t,isPending:n,children:r}){let i=(0,v.useRef)(null),a=(0,v.useRef)(null);return(0,v.useEffect)(()=>()=>{a.current?.kill()},[]),(0,G.jsxs)(Aj,{delay:300,children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsxs)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,"aria-label":e,isPending:n,className:`relative overflow-hidden`,onPressStart:()=>{let e=i.current;!e||n||(a.current?.kill(),a.current=Z.to(e,{scaleX:1,duration:jEe*(1-Number(Z.getProperty(e,`scaleX`))),ease:VB.linear,onComplete:()=>{a.current=null,Z.to(e,{scaleX:0,duration:UB()?0:BB.base,ease:VB.out,delay:BB.fast}),t()}}))},onPressEnd:()=>{let e=i.current;!e||!a.current||(a.current.kill(),a.current=null,Z.to(e,{scaleX:0,duration:UB()?0:BB.base,ease:VB.soft}))},children:[(0,G.jsx)(`span`,{ref:i,"aria-hidden":!0,className:`pointer-events-none absolute inset-0 origin-left scale-x-0 bg-danger/20`}),(0,G.jsx)(`span`,{className:`relative inline-flex`,children:r})]})}),(0,G.jsx)(Aj.Content,{children:e})]})}function NEe(e){let t=[];for(let n of e)for(let e of n.regions||[])e?.id&&t.push({value:`${n.id}:${e.id}`,provider:n.id,region:e.id});return t}function Q9(e,t){let n=e.indexOf(`:`),r=n===-1?e:e.slice(0,n),i=n===-1?``:e.slice(n+1);return i?UV(r,i,t):HV(r,t)}function PEe(e){let t=e.indexOf(`:`);return t===-1?e:e.slice(0,t)}function FEe(e,t){let n=[],r=new Set(e.filter(e=>!e.includes(`:`)).map(e=>e.toLowerCase()));for(let t of e)t.includes(`:`)&&n.push(t);for(let e of t)r.has(e.provider)&&!n.includes(e.value)&&n.push(e.value);return n}function IEe(e,t){return e.length?e.map(e=>Q9(e,t)).join(` · `):t(`keysAllProviders`)}function LEe(e){if(!e)return``;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function REe(){let{t:e}=GF(),[t,n]=(0,v.useState)([]),[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)([]),[l,u]=(0,v.useState)(!0),[d,f]=(0,v.useState)(``),[p,m]=(0,v.useState)(``),[h,g]=(0,v.useState)(!1),[_,y]=(0,v.useState)(null),[b,x]=(0,v.useState)(null),[S,C]=(0,v.useState)(!1);(0,v.useEffect)(()=>{cI().then(e=>{let t=NEe(e.data||[]);n(t),i(t.length>0),o(``)}).catch(e=>{o(e instanceof Error?e.message:String(e))})},[]);async function w(){u(!0);try{let e=await N9();c(e.data||[]),m(``)}catch(e){m(e instanceof Error?e.message:String(e))}finally{u(!1)}}(0,v.useEffect)(()=>{let e=window.setTimeout(()=>void w(),0);return()=>window.clearTimeout(e)},[]);async function T(e){await U7(e),C(!0),window.setTimeout(()=>C(!1),1200)}async function E(e,t){f(e.id),c(n=>n.map(n=>n.id===e.id?{...n,enabled:t}:n));try{let n=await P9(e.id,{enabled:t});c(t=>t.map(t=>t.id===e.id?{...t,...n,secret:void 0}:t))}catch(e){m(e instanceof Error?e.message:String(e)),await w()}finally{f(``)}}async function D(t){f(t.id);try{await $Te(t.id),c(e=>e.filter(e=>e.id!==t.id)),sV({type:`success`,title:e(`toastKeyDeleted`)})}catch(e){m(e instanceof Error?e.message:String(e))}finally{f(``)}}return l&&!s.length?(0,G.jsx)(Bce,{}):(0,G.jsxs)(`div`,{className:`space-y-6`,children:[(0,G.jsxs)(`section`,{className:`flex flex-wrap items-end justify-between gap-4 pb-4`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h2`,{"data-gsap-reveal":!0,className:`text-title font-semibold`,children:e(`navKeys`)}),(0,G.jsx)(`p`,{className:`mt-1 max-w-2xl text-body leading-6 text-muted`,children:e(`keysLead`)})]}),(0,G.jsxs)(J,{size:`sm`,isDisabled:!r,onPress:()=>g(!0),children:[(0,G.jsx)(Ma,{size:14}),e(`keysCreate`)]})]}),p?(0,G.jsx)(vI,{title:p}):null,a?(0,G.jsx)(vI,{title:e(`keysProvidersLoadFailed`,{message:a})}):null,l?(0,G.jsx)(`section`,{className:`grid gap-2.5 lg:grid-cols-2 xl:grid-cols-3`,"aria-busy":!0,children:Array.from({length:Math.max(3,s.length)},(e,t)=>(0,G.jsxs)(`div`,{className:`overflow-hidden rounded-3xl bg-surface shadow-surface p-3`,children:[(0,G.jsx)(Q,{className:`h-4 w-28`}),(0,G.jsx)(Q,{className:`mt-2 h-3 w-40`}),(0,G.jsx)(Q,{className:`mt-4 h-6 w-24`}),(0,G.jsx)(Q,{className:`mt-6 h-8 w-full`})]},t))}):s.length?(0,G.jsx)(`section`,{className:`grid gap-2.5 lg:grid-cols-2 xl:grid-cols-3`,children:s.map(t=>(0,G.jsxs)(xS,{className:`overflow-hidden p-0`,children:[(0,G.jsxs)(xS.Header,{className:`flex-row items-start justify-between gap-3 px-3 pt-3 pb-2.5`,children:[(0,G.jsx)(`div`,{className:`min-w-0`,children:(0,G.jsx)(xS.Title,{className:`truncate text-body`,children:t.name})}),(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:t.enabled?`success`:`default`,children:t.enabled?e(`enabled`):e(`disabled`)})]}),(0,G.jsxs)(xS.Content,{className:`space-y-2.5 px-3 pb-2.5`,children:[(0,G.jsx)(`div`,{className:`mono w-full rounded-lg bg-surface-secondary px-3 py-2 text-body text-foreground`,title:t.prefix,children:t.prefix}),(0,G.jsx)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:(t.providers.length?t.providers:[`all`]).map(t=>(0,G.jsx)(RS,{size:`sm`,variant:`soft`,children:(0,G.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[t===`all`?(0,G.jsx)(ua,{size:12}):(0,G.jsx)(WV,{provider:PEe(t),size:12}),(0,G.jsx)(`span`,{children:t===`all`?e(`keysAllProviders`):Q9(t,e)})]})},t))}),(0,G.jsxs)(`p`,{className:`text-caption leading-5 text-muted`,children:[t.max_inflight>0?e(`keysMaxInflightValue`,{count:t.max_inflight}):e(`keysMaxInflightUnlimited`),` · `,t.last_used_at?e(`keysLastUsed`,{time:LEe(t.last_used_at)}):e(`keysNeverUsed`)]})]}),(0,G.jsxs)(xS.Footer,{className:`gap-1.5 bg-surface-secondary px-3 py-2`,children:[(0,G.jsx)(J,{size:`sm`,variant:`ghost`,isDisabled:!r,onPress:()=>y(t),children:e(`edit`)}),(0,G.jsx)(MEe,{label:e(`holdToDelete`),isPending:d===t.id,onConfirm:()=>void D(t),children:(0,G.jsx)(io,{size:14})}),(0,G.jsx)(`div`,{className:`ml-auto`,children:(0,G.jsx)(s7,{isSelected:t.enabled,isDisabled:d===t.id,ariaLabel:e(`enable`),onChange:e=>void E(t,e)})})]})]},t.id))}):(0,G.jsx)(O7,{className:`rounded-3xl bg-surface-secondary`,icon:(0,G.jsx)(KB,{size:28}),title:e(`keysEmpty`),hint:e(`keysEmptyHint`),action:(0,G.jsxs)(J,{size:`sm`,isDisabled:!r,onPress:()=>g(!0),children:[(0,G.jsx)(Ma,{size:14}),e(`keysCreate`)]})}),(0,G.jsx)($9,{isOpen:h,title:e(`keysCreateTitle`),hint:e(`keysCreateHint`),options:t,t:e,onClose:()=>g(!1),onSave:async e=>{let t=await QTe(e);c(e=>[t,...e.map(e=>({...e,secret:void 0}))]),g(!1),x(t)}}),(0,G.jsx)($9,{isOpen:!!_,title:e(`keysEditTitle`),hint:e(`keysEditHint`),initial:_,options:t,t:e,onClose:()=>y(null),onSave:async e=>{if(!_)return;let t=await P9(_.id,e);c(e=>e.map(e=>e.id===_.id?{...e,...t,secret:void 0}:e)),y(null)}}),(0,G.jsx)(Y.Root,{isOpen:!!b?.secret,onOpenChange:e=>{e||x(null)},children:(0,G.jsx)(Y.Backdrop,{variant:`blur`,children:(0,G.jsx)(Y.Container,{placement:`center`,size:`lg`,children:(0,G.jsxs)(Y.Dialog,{children:[(0,G.jsxs)(Y.Header,{className:`items-start justify-between gap-4 px-6 pt-6`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(Y.Heading,{className:`text-section font-semibold`,children:e(`keysSecretTitle`)}),(0,G.jsx)(`p`,{className:`mt-1.5 text-body leading-6 text-muted`,children:e(`keysSecretHint`)})]}),(0,G.jsx)(Y.CloseTrigger,{"aria-label":e(`close`),className:`grid size-9 place-items-center rounded-lg text-muted hover:bg-surface-secondary`,children:(0,G.jsx)(yo,{size:18})})]}),(0,G.jsxs)(Y.Body,{className:`px-6 pb-2`,children:[(0,G.jsxs)(mP,{status:`warning`,className:`mb-4`,children:[(0,G.jsx)(mP.Indicator,{}),(0,G.jsx)(mP.Content,{children:(0,G.jsx)(mP.Title,{children:e(`keysSecretOnce`)})})]}),(0,G.jsx)(`code`,{className:`mono block break-all rounded-lg bg-surface-secondary px-3 py-3 text-body`,children:b?.secret})]}),(0,G.jsxs)(Y.Footer,{className:`justify-end`,children:[(0,G.jsx)(J,{variant:`ghost`,onPress:()=>x(null),children:e(`close`)}),(0,G.jsxs)(J,{onPress:()=>{b?.secret&&T(b.secret)},children:[(0,G.jsx)(Ii,{size:14}),e(S?`copied`:`copy`)]})]})]})})})})]})}function $9({isOpen:e,title:t,hint:n,initial:r,options:i,t:a,onClose:o,onSave:s}){let[c,l]=(0,v.useState)(r?.name||``),[u,d]=(0,v.useState)(r?.max_inflight||0),[f,p]=(0,v.useState)([]),[m,h]=(0,v.useState)(new Set),[g,_]=(0,v.useState)(!0),[y,b]=(0,v.useState)(``),[x,S]=(0,v.useState)(!1);(0,v.useEffect)(()=>{if(!e)return;l(r?.name||``),d(r?.max_inflight||0),p(FEe(r?.providers||[],i));let t=new Set((r?.providers||[]).filter(e=>!e.includes(`:`)).map(e=>e.toLowerCase()));h(t),_(!0),b(``)},[r,e,i]);function C(e){let t=i.find(t=>t.value===e);_(!1),p(n=>n.includes(e)?(t&&h(e=>{let n=new Set(e);return n.delete(t.provider),n}),n.filter(t=>t!==e)):[...n,e])}async function w(e){e?.preventDefault();let t=c.trim();if(!t){b(a(`keysNameRequired`));return}if(!Number.isInteger(u)||u<0||u>256){b(a(`keysMaxInflightInvalid`));return}if(!i.length){b(a(`keysProvidersNotLoaded`));return}S(!0),b(``);try{await s({name:t,providers:g?r?.providers||[]:f,max_inflight:u})}catch(e){b(e instanceof Error?e.message:String(e))}finally{S(!1)}}return(0,G.jsx)(Y.Root,{isOpen:e,onOpenChange:e=>{!e&&!x&&o()},children:(0,G.jsx)(Y.Backdrop,{variant:`blur`,children:(0,G.jsx)(Y.Container,{placement:`center`,size:`lg`,scroll:`inside`,children:(0,G.jsx)(Y.Dialog,{className:`sm:min-w-[32rem]`,children:(0,G.jsxs)(dP,{onSubmit:w,children:[(0,G.jsxs)(Y.Header,{className:`items-start justify-between gap-4 px-6 pt-6`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(Y.Heading,{className:`text-section font-semibold`,children:t}),(0,G.jsx)(`p`,{className:`mt-1.5 text-body leading-6 text-muted`,children:n})]}),(0,G.jsx)(Y.CloseTrigger,{isDisabled:x,"aria-label":a(`close`),className:`grid size-9 place-items-center rounded-lg text-muted hover:bg-surface-secondary`,children:(0,G.jsx)(yo,{size:18})})]}),(0,G.jsxs)(Y.Body,{className:`space-y-5 px-6 pb-2 pt-1`,children:[y?(0,G.jsxs)(mP,{status:`danger`,children:[(0,G.jsx)(mP.Indicator,{}),(0,G.jsx)(mP.Content,{children:(0,G.jsx)(mP.Title,{children:y})})]}):null,(0,G.jsx)(u9,{label:a(`keysName`),children:(0,G.jsx)(Ij,{value:c,onChange:e=>l(e.target.value),placeholder:a(`keysNamePh`),"aria-label":a(`keysName`)})}),(0,G.jsx)(u9,{label:a(`keysMaxInflight`),hint:a(`keysMaxInflightHint`),children:(0,G.jsx)(OP,{value:u,onChange:e=>d(e??0),minValue:0,maxValue:256,isDisabled:x,children:(0,G.jsxs)(OP.Group,{children:[(0,G.jsx)(OP.DecrementButton,{}),(0,G.jsx)(OP.Input,{"aria-label":a(`keysMaxInflight`)}),(0,G.jsx)(OP.IncrementButton,{})]})})}),(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsx)(kM,{className:`text-body font-medium text-muted`,children:a(`keysProviders`)}),(0,G.jsx)(jM,{className:`text-caption leading-5 text-muted`,children:a(`keysProvidersHint`)}),i.length?(0,G.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:i.map(e=>{let t=f.includes(e.value),n=m.has(e.provider);return(0,G.jsx)(PS,{isSelected:t,onChange:()=>C(e.value),className:`rounded-xl bg-surface-secondary px-3 py-2.5 data-selected:border-accent data-selected:bg-accent-soft`,children:(0,G.jsxs)(PS.Content,{className:`flex items-center gap-2.5`,children:[(0,G.jsx)(PS.Control,{children:(0,G.jsx)(PS.Indicator,{})}),(0,G.jsx)(WV,{provider:e.provider,size:16}),(0,G.jsx)(`span`,{className:`text-body font-medium`,children:UV(e.provider,e.region,a)}),n?(0,G.jsx)(`span`,{className:`rounded-md bg-surface-secondary px-1.5 py-0.5 text-caption font-medium text-muted`,children:a(`keysAllRegions`)}):null]})},e.value)})}):(0,G.jsx)(`p`,{className:`rounded-lg bg-surface-secondary px-3 py-2.5 text-caption leading-5 text-muted`,children:a(`keysProvidersNotLoaded`)}),(0,G.jsx)(`p`,{className:`text-caption text-muted`,children:IEe(f,a)})]})]}),(0,G.jsxs)(Y.Footer,{className:`justify-end`,children:[(0,G.jsx)(J,{variant:`ghost`,isDisabled:x,onPress:o,children:a(`cancel`)}),(0,G.jsx)(J,{type:`submit`,isPending:x,isDisabled:!i.length,children:a(r?`save`:`create`)})]})]})})})})})}function zEe(){return(0,G.jsx)(_se,{children:(0,G.jsx)(Qoe,{children:(0,G.jsx)($oe,{children:(0,G.jsx)(hse,{children:(0,G.jsx)(xn,{children:(0,G.jsxs)(Pt,{children:[(0,G.jsx)(Mt,{path:`/login`,element:(0,G.jsx)(ZTe,{})}),(0,G.jsx)(Mt,{element:(0,G.jsx)(sle,{}),children:(0,G.jsxs)(Mt,{element:(0,G.jsx)(ole,{}),children:[(0,G.jsx)(Mt,{path:`/`,element:(0,G.jsx)(dwe,{})}),(0,G.jsx)(Mt,{path:`/auth`,element:(0,G.jsx)(At,{to:`/accounts`,replace:!0})}),(0,G.jsx)(Mt,{path:`/providers`,element:(0,G.jsx)(bwe,{})}),(0,G.jsx)(Mt,{path:`/access`,element:(0,G.jsx)(qwe,{})}),(0,G.jsx)(Mt,{path:`/accounts`,element:(0,G.jsx)(XTe,{})}),(0,G.jsx)(Mt,{path:`/checkins`,element:(0,G.jsx)(At,{to:`/accounts`,replace:!0})}),(0,G.jsx)(Mt,{path:`/usage`,element:(0,G.jsx)(AEe,{})}),(0,G.jsx)(Mt,{path:`/logs`,element:(0,G.jsx)(_Ee,{})}),(0,G.jsx)(Mt,{path:`/keys`,element:(0,G.jsx)(REe,{})}),(0,G.jsx)(Mt,{path:`/system`,element:(0,G.jsx)(sEe,{})}),(0,G.jsx)(Mt,{path:`*`,element:(0,G.jsx)(At,{to:`/`,replace:!0})})]})})]})})})})})})}(0,y.createRoot)(document.getElementById(`root`)).render((0,G.jsx)(v.StrictMode,{children:(0,G.jsx)(zEe,{})}));export{QJ as $,MU as $t,P_e as A,UW as At,Y2 as B,TW as Bt,f6 as C,h as Cn,KW as Ct,s3 as D,DW as Dt,mve as E,MW as Et,A4 as F,AW as Ft,SZ as G,LW as Gt,s2 as H,RW as Ht,j4 as I,EW as It,uZ as J,xW as Jt,gZ as K,CW as Kt,qge as L,PW as Lt,I_e as M,VW as Mt,F_e as N,HW as Nt,Q_e as O,FW as Ot,H4 as P,BW as Pt,OY as Q,AU as Qt,Hge as R,wW as Rt,g6 as S,Is as Sn,qW as St,s6 as T,l as Tn,NW as Tt,K0 as U,zW as Ut,J2 as V,OW as Vt,GZ as W,IW as Wt,LY as X,dde as Xt,QY as Y,bW as Yt,IY as Z,OU as Zt,E6 as _,uV as _n,$ as _t,q8 as a,xU as an,KJ as at,v6 as b,Z as bn,YW as bt,D8 as c,hU as cn,zq as ct,s8 as d,cU as dn,kq as dt,EU as en,ZJ as et,W6 as f,oU as fn,Vq as ft,k6 as g,_V as gn,sG as gt,M6 as h,CV as hn,yq as ht,t5 as i,bU as in,qJ as it,X4 as j,WW as jt,n3 as k,kW as kt,C8 as l,mU as ln,Nq as lt,I6 as m,wV as mn,Dq as mt,Q5 as n,SU as nn,XJ as nt,k8 as o,yU as on,_J as ot,V6 as p,sU as pn,Tq as pt,_Z as q,SW as qt,o5 as r,FU as rn,YJ as rt,O8 as s,vU as sn,dJ as st,$5 as t,TU as tn,$J as tt,h8 as u,fU as un,Oq as ut,T6 as v,yV as vn,ZW as vt,i6 as w,d as wn,yde as wt,_6 as x,qc as xn,JW as xt,b6 as y,dV as yn,$W as yt,Bge as z,jW as zt}; \ No newline at end of file + -d ${Q7(JSON.stringify(me))}`,[me,T,oe]);if(n&&!t)return(0,G.jsx)(Vce,{});async function ge(e,t){await U7(e),ae(t),window.setTimeout(()=>ae(``),1100)}async function _e(){let e=performance.now();te(`loading`),re(null),H(``);try{let e=await sse(w,me,oe||void 0);H(JSON.stringify(e,null,2)),te(`success`)}catch(e){H(e instanceof Error?e.message:String(e)),te(`error`)}finally{re(Math.round(performance.now()-e))}}function ve(){B.current?.abort(),B.current=null}function ye(e){let t=p;u(n=>n.map(n=>{if(n.id!==t)return n;let r=typeof e==`function`?e(n.messages):e;return{...n,messages:r,title:t9(r)||n.title,updatedAt:Date.now()}}))}function be(e,t){ye(n=>n.map(n=>{if(n.id!==e)return n;let r=typeof t==`function`?t(n):t;return{...n,...r}}))}async function xe(){let e=P.trim();if(!e&&!I.length||!fe||le||R===`loading`)return;ve();let t=new AbortController;B.current=t;let n=I,r={id:$7(`user`),role:`user`,content:e,attachments:n,status:`done`},i=$7(`assistant`),a={id:i,role:`assistant`,provider:_.find(e=>e.id===oe)?.provider||ce.find(e=>e.id===fe)?.provider||``,content:``,status:`streaming`},o=m;ye([...o,r,a]),F(``),L([]),z(`loading`);let s=Hwe(o,{role:`user`,content:X7(e,n)}),c=performance.now(),l=null,u=()=>{l??=performance.now()},d=()=>{let e=performance.now();return{latency_ms:Math.max(0,Math.round(e-c)),ttfb_ms:l==null?void 0:Math.max(0,Math.round(l-c))}};try{await use(fe,s,oe||void 0,{signal:t.signal,onContent:(e,t)=>{e&&u(),be(i,{content:t})},onReasoning:(e,t)=>{e&&u(),be(i,{reasoning:t})},onToolCalls:e=>{u(),be(i,{toolCalls:Gwe(e,!0)})},onUsage:e=>be(i,{usage:e})}),be(i,e=>({status:`done`,...d(),toolCalls:e.toolCalls?.map(e=>({...e,status:`success`}))})),z(`success`)}catch(e){if(t.signal.aborted){be(i,e=>({status:`done`,...d(),toolCalls:e.toolCalls?.map(e=>({...e,status:`success`}))})),z(`success`);return}be(i,{status:`error`,error:e instanceof Error?e.message:String(e),...d()}),z(`error`)}finally{B.current===t&&(B.current=null)}}let Se=e(ee===`success`?`requestComplete`:ee===`error`?`requestFailed`:ee===`loading`?`requesting`:`requestIdle`),Ce=e9()!=null,we=[{id:`auto`,textValue:e(`autoAccount`),label:e(`autoAccount`),icon:(0,G.jsx)(oi,{size:14,className:`text-muted`})},..._.map(t=>({id:t.id,textValue:`${t.name||t.id} ${UV(t.provider,t.region,e)}`,label:t.name||t.id,hint:UV(t.provider,t.region,e),icon:(0,G.jsx)(WV,{provider:t.provider,size:14})}))],Te=_.length||!Ce?we:[{id:`auto`,textValue:e(`autoAccount`),label:e(`autoAccount`),icon:(0,G.jsx)(oi,{size:14,className:`text-muted`})},{id:`demo-wb`,textValue:`wb-demo WorkBuddy`,label:`wb-demo`,hint:`WorkBuddy`}],Ee=ce.map(t=>{let n=mV(t),r=hV(t),i=t.display_name||t.id,a=r?e(`modelFree`):n,o=t.provider||t.owned_by||``;return{id:t.id,textValue:`${i} ${t.id} ${o} ${n} ${r?`free`:``}`,label:a?`${i} ${a}`:i,hint:[t.id,o,a].filter(Boolean).join(` · `)}}),De=Ee.length||!Ce?Ee:r9.map(t=>{let n=mV(t),r=hV(t),i=t.display_name||t.id,a=r?e(`modelFree`):n;return{id:t.id,textValue:`${i} ${t.id} ${t.provider} ${n} ${r?`free`:``}`,label:a?`${i} ${a}`:i,hint:[t.id,t.provider,a].filter(Boolean).join(` · `)}}),Oe=!!((P.trim()||I.length)&&fe&&!le&&(_.length||Ce));function ke(){ye(Z7()),z(`idle`)}function Ae(){ve(),z(`idle`),F(``),L([]);let e=n9([]);u(t=>[e,...t]),f(e.id)}function je(e){e!==p&&(ve(),z(`idle`),F(``),L([]),f(e))}let Me=l.slice().sort((e,t)=>t.updatedAt-e.updatedAt).map(t=>({id:t.id,title:t.title||e(`chatHistoryUntitled`),updatedAt:t.updatedAt}));return(0,G.jsxs)(`div`,{className:`access-page space-y-4`,children:[(0,G.jsxs)(`section`,{className:`access-info-row flex flex-wrap items-center gap-x-3 gap-y-2 px-0.5 py-0.5`,title:e(`apiPlaygroundHint`),children:[(0,G.jsx)(`h2`,{className:`shrink-0 text-body font-semibold text-foreground`,children:e(`apiPlayground`)}),(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1.5 text-caption text-muted`,children:[(0,G.jsx)(`span`,{className:`shrink-0`,children:e(`baseUrl`)}),(0,G.jsx)(`code`,{className:`mono min-w-0 truncate font-medium text-foreground`,children:b}),(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,className:`size-6 min-w-6 shrink-0`,"aria-label":e(`copyBaseUrl`),onPress:()=>void ge(b,`base`),children:(0,G.jsx)(H7,{copied:ie===`base`,size:13})})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2 text-caption text-muted`,children:[(0,G.jsx)(`span`,{className:`status-dot`,"data-state":pe.length?`ok`:void 0}),(0,G.jsx)(`span`,{children:e(`readyAccounts`,{ready:pe.length,total:_.length})}),(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:pe.length?`success`:`warning`,children:pe.length?e(`endpointReady`):e(`degraded`)})]})]}),_.length?null:(0,G.jsxs)(`div`,{className:`space-y-1 px-1`,children:[(0,G.jsx)(`p`,{className:`text-caption text-muted`,children:e(`noAccountsForTest`)}),(0,G.jsx)(K7,{})]}),ue?(0,G.jsx)(`p`,{className:`px-1 text-caption text-danger`,children:ue}):null,(0,G.jsxs)(EA,{selectedKey:r,onSelectionChange:e=>i(String(e)),children:[(0,G.jsx)(EA.ListContainer,{className:`w-fit`,children:(0,G.jsxs)(EA.List,{"aria-label":e(`accessTabsLabel`),children:[(0,G.jsxs)(TA,{id:`chat`,className:`gap-1.5 whitespace-nowrap`,children:[(0,G.jsx)(EA.Indicator,{className:`transition-none`}),e(`accessTabChat`)]}),(0,G.jsxs)(TA,{id:`raw`,className:`gap-1.5 whitespace-nowrap`,children:[(0,G.jsx)(EA.Indicator,{className:`transition-none`}),e(`accessTabApi`)]})]})}),(0,G.jsx)(EA.Panel,{id:`chat`,className:`pt-4`,children:(0,G.jsxs)(`div`,{className:`flex min-h-[640px] md:min-h-[72vh]`,children:[(0,G.jsx)(kwe,{collapsed:s,onCollapsedChange:c,items:Me,activeId:p,onSelect:je,onNew:Ae}),(0,G.jsxs)(`div`,{className:`access-chat-stage flex min-w-0 flex-1 flex-col`,children:[(0,G.jsx)(Bwe,{messages:m,busy:R===`loading`,onLoadDemo:ke}),(0,G.jsx)(Owe,{value:P,onChange:F,attachments:I,onAttachmentsChange:L,disabled:!_.length&&e9()==null,streaming:R===`loading`,canSend:Oe,onSend:()=>void xe(),onStop:ve,accountValue:oe||`auto`,onAccountChange:e=>k(e===`auto`?``:e),accountOptions:Te,modelValue:fe,onModelChange:D,modelOptions:De,modelsLoading:le})]})]})}),(0,G.jsxs)(EA.Panel,{id:`raw`,className:`space-y-4 pt-4`,children:[(0,G.jsx)(Vwe,{format:a,onFormatChange:o,requestPath:w,prompt:M,onPromptChange:N,onTest:()=>void _e(),requestState:ee,elapsedMs:ne,output:V,responseStatus:Se,curl:he,copiedCurl:ie===`curl`,onCopyCurl:()=>void ge(he,`curl`),canSend:!!(M.trim()&&fe&&!le),accountValue:oe||`auto`,onAccountChange:e=>k(e===`auto`?``:e),accountOptions:Te,modelValue:fe,onModelChange:D,modelOptions:De,modelsLoading:le,disabled:!_.length&&e9()==null}),(0,G.jsx)(xwe,{access:t?.access})]})]})]})}function Jwe(e){(0,v.useLayoutEffect)(()=>{let t=e.current;if(!t)return;let n=Z.context(()=>{Z.matchMedia().add(`(prefers-reduced-motion: no-preference)`,()=>{let e=Z.utils.toArray(`.meter__fill`);e.length&&Z.from(e,{scaleX:0,transformOrigin:`left center`,duration:BB.calm,ease:VB.emphasized,stagger:HB.base,clearProps:`transform,transformOrigin`})})},t);return()=>n.revert()},[e])}function i9(e){if(!e)return``;let t=Date.parse(e)-Date.now();if(!Number.isFinite(t)||t<=0)return``;let n=Math.ceil(t/1e3);return n<60?`${n}s`:`${Math.ceil(n/60)}m`}function Ywe(e){return Object.entries(e.model_cooldowns??{}).filter(([,e])=>!!i9(e)).sort(([e],[t])=>e.localeCompare(t))}function a9(e){return e.enabled?e.status===`quota_exhausted`||e.quota?.exceeded?`quota_exhausted`:e.status===`cooling`||i9(e.down_until||e.cooldown_until)?`cooling`:e.status===`dead`||e.runtime_state===`dead`?`dead`:e.status===`auth_failed`||e.runtime_state===`auth_failed`?`auth_failed`:e.status===`login_required`?`login`:(e.status===`starting`||e.runtime_state===`starting`)&&!e.hot&&!e.ready?e.quota?`starting`:`loading`:e.status===`ready`?e.hot?`hot`:`ready`:e.hot?`hot`:e.ready?`ready`:(e.status===`error`||e.status,`unavailable`):`disabled`}function o9(e,t){let n=e.last_checkin_status;if(n!==`success`&&n!==`already`||!e.last_checkin_at)return!1;let r=new Date(e.last_checkin_at);if(Number.isNaN(r.getTime()))return!1;let i=e=>new Intl.DateTimeFormat(`en-CA`,{timeZone:t||void 0,year:`numeric`,month:`2-digit`,day:`2-digit`}).format(e);return i(r)===i(new Date)}function Xwe(e){return e===`hot`?12:e===`ready`?9:e===`cooling`?5:e===`login`?3:e===`loading`||e===`starting`?6:e===`unavailable`?2:e===`auth_failed`?3:e===`dead`?2:1}function Zwe(e){return e===`hot`||e===`ready`?`ok`:e===`cooling`||e===`quota_exhausted`||e===`loading`||e===`starting`?`warn`:e===`auth_failed`||e===`unavailable`||e===`dead`||e===`login`?`danger`:`muted`}function s9(e){return e==null||!Number.isFinite(e)?`—`:Math.abs(e)>=1e3?`${(e/1e3).toFixed(e%1e3==0?0:1)}k`:String(Math.round(e*100)/100)}function c9(e){let t=e.percentage??0;return Number.isFinite(t)?Math.min(1,Math.max(0,t/100)):0}function l9(e){let t=e.percentage??0;return e.exceeded?`danger`:t>=80?`warn`:`ok`}function Qwe(e){return(e.windows??[]).filter(e=>!!e.id)}var $we={free:`Free`,go:`Go`,plus:`Plus`,pro:`Pro`,pro_plus:`Pro+`,proplus:`Pro+`,prolite:`Pro Lite`,promax:`Pro Max`,team:`Team`,business:`Business`,enterprise:`Enterprise`,power:`Power`,edu:`Edu`,edu_plus:`Edu Plus`,edu_pro:`Edu Pro`,education:`Education`};function eTe(e){let t=e?.trim().toLowerCase()??``;return!t||t===`unknown`||t===`guest`?``:$we[t]??t.replace(/[_-]+/g,` `).replace(/\bplus\b/gi,`+`).replace(/\s+\+/g,`+`).replace(/\b\w/g,e=>e.toUpperCase())}function tTe(e,t){return e.id===`daily`?t(`quotaDaily`):e.id===`weekly`?t(`quotaWeekly`):e.id===`monthly`?t(`quotaMonthly`):e.id===`fiveHour`?t(`quotaFiveHour`):e.id===`weeklyLimit`?t(`quotaWeeklyLimit`):e.id===`monthlyLimit`?t(`quotaMonthlyLimit`):e.label||t(`quota`)}function nTe(e,t){if(!e)return``;let n=Date.parse(e)-Date.now();if(!Number.isFinite(n)||n<=0)return t(`quotaResetsSoon`);let r=Math.max(1,Math.ceil(n/6e4));return r<60?t(`quotaResetsInMinutes`,{n:r}):t(`quotaResetsInHours`,{n:Math.round(r/60)})}function rTe(e,t){if(!e.expires_at||e.expires_at<=0||!Number.isFinite(e.expires_at))return``;let n=new Date(e.expires_at*1e3);if(Number.isNaN(n.getTime()))return``;let r=`${n.getFullYear()}/${n.getMonth()+1}/${n.getDate()}`;return t(`quotaExpiresOn`,{amount:e.expiring_remain&&e.expiring_remain>0?`${s9(e.expiring_remain)} `:``,unit:e.unit||`credits`,date:r})}function iTe(e,t,n,r,i,a){return[e.has_add_on&&e.add_on_available!==!1?`${n} ${s9(e.add_on_used)} / ${s9(e.add_on_total)} ${e.add_on_unit||`credits`}`:``,e.has_resource_package&&e.resource_package_available!==!1?`${r} ${t} ${s9(e.resource_package_remaining)} ${e.resource_package_unit||`credits`}`:``,a===`workbuddy`?rTe(e,i):``].filter(Boolean)}function aTe({window:e,t,extra:n}){let r=Math.round(e.percentage??0),i=tTe(e,t),a=t(`quotaUsedPercent`,{n:r}),o=nTe(e.reset_at,t),s=`${i} · ${a}${o?` · ${o}`:``}`,c=c9(e),l=l9(e),u=l===`danger`?`danger`:l===`warn`?`warning`:`success`;return(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{className:`block w-full min-w-0`,children:(0,G.jsxs)(`div`,{className:`w-full min-w-0 cursor-help`,children:[(0,G.jsxs)(YP,{className:`account-meter account-meter--window w-full`,color:u,size:`md`,minValue:0,maxValue:100,value:Math.round(c*100),"aria-label":i,valueLabel:s,children:[(0,G.jsxs)(YP.Output,{className:`flex w-full items-baseline justify-between gap-3 text-caption`,children:[(0,G.jsx)(`span`,{className:`min-w-0 truncate font-medium text-foreground`,children:i}),(0,G.jsx)(`span`,{className:`mono shrink-0 text-foreground/70`,children:a})]}),(0,G.jsx)(YP.Track,{children:(0,G.jsx)(YP.Fill,{})})]}),o?(0,G.jsx)(`div`,{className:`mt-1 text-caption leading-4 text-muted`,children:o}):null]})}),(0,G.jsx)(Aj.Content,{children:(0,G.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,G.jsx)(`div`,{children:s}),n?.map(e=>(0,G.jsx)(`div`,{children:e},e))]})})]})}function oTe({quota:e,t,label:n,usedLabel:r,remainingLabel:i,addOnLabel:a,resourcePackageLabel:o,exceededLabel:s,provider:c}){let l=e.unit||`credits`,u=`${s9(e.used)} / ${s9(e.total)}`,d=`${s9(e.remaining)}`,f=iTe(e,i,a,o,t,c),p=Qwe(e),m=c===`codex`||c===`kiro`?eTe(e.plan):``,h=c9(e),g=l9(e),_=g===`danger`?`danger`:g===`warn`?`warning`:`success`,y=(0,v.useRef)(null);Jwe(y);let b=`${r} ${u} ${l} · ${i} ${d} ${l}${f.length?` · ${f.join(` · `)}`:``}`;return p.length>0?(0,G.jsxs)(`div`,{ref:y,className:`account-quota-windows flex w-full min-w-0 flex-col gap-3`,children:[m?(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3 text-caption`,children:[(0,G.jsx)(`span`,{className:`text-muted`,children:t(`quotaPlan`)}),(0,G.jsx)(`span`,{className:`font-medium text-foreground`,children:m})]}):null,p.map((e,n)=>(0,G.jsx)(`div`,{className:`w-full min-w-0`,children:(0,G.jsx)(aTe,{window:e,t,extra:n===0?f:void 0})},e.id||String(n)))]}):(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(`div`,{ref:y,className:`w-full cursor-help`,children:(0,G.jsxs)(YP,{className:`account-meter w-full`,color:_,size:`md`,minValue:0,maxValue:100,value:Math.round(h*100),"aria-label":n,valueLabel:b,children:[(0,G.jsxs)(YP.Output,{className:`flex w-full items-baseline justify-between text-caption`,children:[(0,G.jsxs)(`span`,{className:`text-body font-semibold leading-5 text-foreground tabular-nums`,children:[e.exceeded?(0,G.jsx)(`span`,{className:`mr-1.5 text-danger`,children:s}):null,d,(0,G.jsx)(`span`,{className:`ml-1 text-caption font-normal text-foreground/60`,children:l})]}),(0,G.jsxs)(`span`,{className:`mono text-foreground/55`,children:[r,` `,u]})]}),(0,G.jsx)(YP.Track,{children:(0,G.jsx)(YP.Fill,{})})]})})}),(0,G.jsx)(Aj.Content,{children:(0,G.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,G.jsxs)(`div`,{children:[r,` `,u,` `,l]}),(0,G.jsxs)(`div`,{children:[i,` `,d,` `,l]}),f.map(e=>(0,G.jsx)(`div`,{children:e},e))]})})]})}function sTe({state:e,stateCopy:t,t:n}){let r=(0,v.useRef)(null),i=Xwe(e),a=Zwe(e);return(0,v.useLayoutEffect)(()=>{let e=r.current;if(!e)return;let t=Z.context(()=>{let e=Z.utils.toArray(`[data-runtime-seg]`),t=e.filter((e,t)=>tt>=i),r=Z.matchMedia();r.add(`(prefers-reduced-motion: reduce)`,()=>{Z.set(t,{scaleY:1,autoAlpha:1}),Z.set(n,{scaleY:.32,autoAlpha:.45})}),r.add(`(prefers-reduced-motion: no-preference)`,()=>{Z.set(e,{transformOrigin:`center bottom`}),Z.to(n,{scaleY:.32,autoAlpha:.45,duration:BB.fast,ease:VB.out,overwrite:!0}),Z.to(t,{scaleY:1,autoAlpha:1,duration:BB.base,ease:VB.out,stagger:{amount:.08,from:`start`},overwrite:!0})})},e);return()=>t.revert()},[i,e]),(0,G.jsxs)(`div`,{ref:r,className:`flex items-center gap-2`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-1.5 text-caption font-medium text-foreground/75`,children:[(0,G.jsx)(`span`,{className:`status-dot`,"data-state":a===`muted`?void 0:a===`warn`?`warn`:a}),(0,G.jsx)(`span`,{children:n(`runtimeState`)})]}),(0,G.jsx)(`div`,{className:`runtime-meter min-w-[80px] flex-1`,role:`meter`,"aria-label":n(`runtimeState`),"aria-valuemin":0,"aria-valuemax":12,"aria-valuenow":i,"aria-valuetext":t,children:Array.from({length:12},(e,t)=>(0,G.jsx)(`span`,{"data-runtime-seg":!0,"data-on":t{if(!I&&!L&&R.length===0)return;let e=window.setInterval(()=>P(e=>e+1),1e3);return()=>window.clearInterval(e)},[I,L,R.length]);let[z,B]=(0,v.useState)(null),[V,H]=(0,v.useState)(null),ee=(0,v.useRef)(null),te=C&&C!==z?C:null,ne=!!te&&V===te;(0,v.useEffect)(()=>{if(C)return ee.current&&window.clearTimeout(ee.current),ee.current=window.setTimeout(()=>B(C),3e3),()=>{ee.current&&window.clearTimeout(ee.current)}},[C]);let re=cTe(F,F===`dead`?L:I,o),ie=F===`hot`||F===`ready`?`success`:F===`cooling`?`warning`:F===`quota_exhausted`||F===`login`||F===`unavailable`||F===`dead`||F===`auth_failed`?`danger`:void 0,ae=e.last_error||e.lastError,oe=e.last_error_kind||e.kind,se=UV(e.provider,e.region,o),ce=e.last_checkin_status,le=ce===`success`?`checkinRecordSuccess`:ce===`already`?`checkinRecordAlready`:ce===`skipped`?`checkinRecordSkipped`:ce===`error`?`checkinRecordFailed`:`lastCheckinNone`,ue=o9(e,y);return(0,v.useLayoutEffect)(()=>{let e=D.current;if(!e)return;let t=N.current;if(N.current=F,!t||t===F)return;let n=Z.context(()=>{let t=Z.matchMedia();t.add(`(prefers-reduced-motion: reduce)`,()=>{Z.set(e,{scale:1,autoAlpha:1})}),t.add(`(prefers-reduced-motion: no-preference)`,()=>{Z.fromTo(e,{scale:.94,autoAlpha:.65},{scale:1,autoAlpha:1,duration:.2,ease:`power2.out`,overwrite:!0})})},e);return()=>n.revert()},[F]),(0,v.useLayoutEffect)(()=>{let e=O.current;if(!e||!n)return;let t=Z.context(()=>{let t=Z.matchMedia();t.add(`(prefers-reduced-motion: reduce)`,()=>{Z.set(e,{autoAlpha:1,y:0})}),t.add(`(prefers-reduced-motion: no-preference)`,()=>{Z.fromTo(e,{autoAlpha:0,y:-6},{autoAlpha:1,y:0,duration:.2,ease:`power3.out`,overwrite:!0})})},e);return()=>t.revert()},[n]),(0,G.jsxs)(xS,{"data-gsap-reveal":!0,"data-state":F,className:`account-card overflow-hidden p-0`,children:[(0,G.jsxs)(xS.Header,{className:`flex-row items-start justify-between gap-2.5 px-4 pt-3.5 pb-2`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,G.jsx)(`div`,{className:`flex size-8 shrink-0 items-center justify-center rounded-lg bg-surface-tertiary`,children:(0,G.jsx)(WV,{provider:e.provider,size:20})}),(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,G.jsx)(xS.Title,{className:`truncate text-body leading-5`,children:e.name||e.id}),(0,G.jsx)(`span`,{className:`shrink-0 rounded-full bg-surface-secondary px-1.5 py-px text-caption text-muted`,children:se})]}),(0,G.jsx)(xS.Description,{className:`mono truncate text-caption leading-4 text-foreground/60`,title:`${e.id}${e.remote_uid?` · UID ${e.remote_uid}`:``}`,children:e.remote_uid?`UID ${e.remote_uid}`:e.id})]})]}),(0,G.jsxs)(`div`,{className:`flex max-w-[48%] shrink-0 flex-wrap justify-end gap-1.5`,children:[(0,G.jsx)(`span`,{ref:D,children:R.length&&F===`cooling`?(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(`span`,{className:`inline-flex cursor-help`,children:(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:ie,children:re})})}),(0,G.jsx)(Aj.Content,{children:(0,G.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,G.jsx)(`div`,{className:`font-medium`,children:o(`partialCooling`)}),R.map(([e,t])=>(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-4 text-caption`,children:[(0,G.jsx)(`span`,{children:e}),(0,G.jsx)(`span`,{className:`mono text-foreground/65`,children:i9(t)})]},e))]})})]}):(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:ie,children:re})}),R.length&&F!==`cooling`?(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(`span`,{className:`inline-flex cursor-help`,children:(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:`warning`,children:o(`partialCooling`)})})}),(0,G.jsx)(Aj.Content,{children:(0,G.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,G.jsx)(`div`,{className:`font-medium`,children:o(`partialCooling`)}),R.map(([e,t])=>(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-4 text-caption`,children:[(0,G.jsx)(`span`,{children:e}),(0,G.jsx)(`span`,{className:`mono text-foreground/65`,children:i9(t)})]},e))]})})]}):null]})]}),(0,G.jsxs)(xS.Content,{className:`gap-1.5 px-4 pb-3`,children:[(0,G.jsx)(sTe,{state:F,stateCopy:re,t:o}),e.quota?(0,G.jsx)(oTe,{quota:e.quota,t:o,label:o(`quota`),usedLabel:o(`quotaUsed`),remainingLabel:o(`quotaRemaining`),addOnLabel:o(`quotaAddOn`),resourcePackageLabel:o(`quotaResourcePackage`),exceededLabel:o(`quotaExceeded`),provider:e.provider}):(0,G.jsx)(`span`,{className:`text-caption text-foreground/65`,children:o(F===`hot`||F===`ready`||F===`loading`||F===`starting`?`quotaLoading`:`quotaUnavailable`)}),ae?(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsxs)(`div`,{className:`flex w-full cursor-help gap-2 rounded-lg bg-surface-secondary p-2 text-left text-caption leading-5 text-foreground`,children:[(0,G.jsx)(ho,{size:14,className:`mt-0.5 shrink-0 text-danger`}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[oe?(0,G.jsx)(`div`,{className:`mono mb-0.5 truncate text-caption opacity-75`,children:oe}):null,(0,G.jsx)(`p`,{className:`break-words line-clamp-3`,children:ae})]})]})}),(0,G.jsx)(Aj.Content,{children:(0,G.jsxs)(`div`,{className:`max-w-md whitespace-pre-wrap break-words`,children:[oe?(0,G.jsx)(`div`,{className:`mono mb-1 text-caption opacity-75`,children:oe}):null,ae]})})]}):null,te?(0,G.jsxs)(`div`,{className:`flex w-full items-start gap-2 rounded-lg bg-surface-secondary p-2 text-caption leading-5`,children:[te.kind===`success`?(0,G.jsx)(Oi,{size:14,weight:`fill`,className:`mt-0.5 shrink-0 text-success`}):te.kind===`error`?(0,G.jsx)(xo,{size:14,weight:`fill`,className:`mt-0.5 shrink-0 text-danger`}):(0,G.jsx)(ho,{size:14,weight:`fill`,className:`mt-0.5 shrink-0 text-warning`}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[te.kind===`success`?(0,G.jsx)(`span`,{className:`font-medium text-success`,children:o(`checkinRecordSuccess`)}):te.kind===`already`?(0,G.jsx)(`span`,{className:`font-medium text-warning`,children:o(`checkinRecordAlready`)}):te.kind===`skipped`?(0,G.jsx)(`span`,{className:`font-medium text-warning`,children:o(`checkinRecordSkipped`)}):(0,G.jsx)(`span`,{className:`font-medium text-danger`,children:o(`checkinRecordFailed`)}),te.message?(0,G.jsxs)(`div`,{className:`mt-0.5`,children:[(0,G.jsx)(`p`,{className:`break-words line-clamp-2 text-foreground/80`,children:te.message}),(0,G.jsxs)(`div`,{className:`mt-1 flex items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`text-caption text-muted`,children:o(`checkinTruncated`)}),(0,G.jsxs)(J,{size:`sm`,variant:`ghost`,className:`h-6 min-w-0 gap-1 px-1.5 text-caption`,onPress:()=>{U7(te.message||``).then(e=>{!e||!te||(H(te),window.setTimeout(()=>H(null),1100))})},children:[(0,G.jsx)(H7,{copied:ne,size:13}),o(ne?`copied`:`checkinCopyError`)]})]})]}):null]})]}):null]}),n&&e.enabled?(0,G.jsxs)(`section`,{ref:O,className:`grid gap-3 bg-surface-secondary/55 px-3 py-3`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`div`,{className:`text-caption font-medium text-muted`,children:o(`oauthDeviceFlow`)}),(0,G.jsx)(`p`,{className:`mt-1.5 text-caption leading-5 text-muted`,children:e.provider===`codex`?o(`wizardCodexBrowserLead`):o(`qoderLoginHint`)}),(0,G.jsx)(`div`,{className:`mt-2.5 flex flex-wrap gap-2`,children:e.provider===`codex`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(J,{size:`sm`,isPending:t===`device`,onPress:()=>c(`cli`),children:[(0,G.jsx)(Ia,{size:14}),o(`startCodexCliLogin`)]}),(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,isPending:t===`device`,onPress:()=>c(`chatgpt`),children:[(0,G.jsx)(Ia,{size:14}),o(`startCodexChatGPTLogin`)]})]}):e.provider===`kiro`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(J,{size:`sm`,isPending:t===`device`,onPress:()=>c(`builder_id`),children:[(0,G.jsx)(Ia,{size:14}),o(`kiroLoginBuilder`)]}),(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,isPending:t===`device`,onPress:()=>c(`idc`),children:[(0,G.jsx)(Ia,{size:14}),o(`kiroLoginIDC`)]}),(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,isPending:t===`device`,onPress:()=>c(`microsoft`),children:[(0,G.jsx)(Ia,{size:14}),o(`kiroLoginMicrosoft`)]}),(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,isPending:t===`device`,onPress:()=>c(`sso`),children:[(0,G.jsx)(Ia,{size:14}),o(`kiroLoginSSO`)]})]}):(0,G.jsxs)(J,{size:`sm`,isPending:t===`device`,onPress:()=>c(),children:[(0,G.jsx)(Ia,{size:14}),o(`startBrowserLogin`)]})}),(e.provider===`trae`||e.provider===`codex`||e.provider===`devin`||e.provider===`kiro`)&&f&&d?(0,G.jsxs)(`div`,{className:`mt-3 space-y-2`,children:[(0,G.jsx)(`p`,{className:`text-caption leading-4 text-muted`,children:o(`wizardCallbackLead`)}),(0,G.jsx)(Vj,{className:`h-24 w-full resize-none font-mono text-caption leading-5`,value:u||``,onChange:e=>d(e.target.value),placeholder:o(`wizardCallbackPh`),"aria-label":o(`wizardCallbackPh`)}),(0,G.jsx)(J,{size:`sm`,variant:`secondary`,isPending:t===`callback`,onPress:f,children:o(`wizardSubmitCallback`)})]}):null]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`div`,{className:`text-caption font-medium text-muted`,children:o(`patFallback`)}),(0,G.jsxs)(`div`,{className:`mt-2.5 flex flex-col gap-2 sm:flex-row`,children:[(0,G.jsxs)(Hj,{className:`flex-1`,type:`password`,value:a,onChange:s,children:[(0,G.jsx)(kM,{className:`sr-only`,children:o(`pat`)}),(0,G.jsx)(Ij,{placeholder:o(`pasteToken`),"aria-label":o(`pat`)})]}),(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,isPending:t===`pat`,onPress:l,children:[(0,G.jsx)(ua,{size:14}),o(`usePat`)]})]})]}),r||i?(0,G.jsxs)(`div`,{className:`text-caption`,children:[r?(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`div`,{className:`mb-1 text-caption font-medium text-muted`,children:o(`authUrl`)}),(0,G.jsx)(`code`,{className:`mono block break-all text-foreground`,children:r}),(0,G.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:[(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,onPress:()=>window.open(r,`_blank`,`noopener,noreferrer`),children:[(0,G.jsx)(ni,{size:14}),o(`openAuthUrl`)]}),(0,G.jsxs)(J,{size:`sm`,variant:`ghost`,onPress:()=>{U7(r).then(e=>{e&&(A(!0),window.setTimeout(()=>A(!1),1100))})},children:[(0,G.jsx)(H7,{copied:k}),o(k?`copied`:`copy`)]})]})]}):null,i?(0,G.jsx)(`p`,{className:`mt-1 text-muted`,children:i}):null]}):null]}):null,x?(0,G.jsxs)(`div`,{className:`flex items-start justify-between gap-3 border-t border-separator px-4 py-2 text-caption text-muted`,children:[(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsxs)(`span`,{className:`flex cursor-help flex-wrap items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`font-medium`,children:o(`lastCheckin`)}),(0,G.jsx)(`span`,{className:ce===`error`?`text-danger`:``,children:o(le)}),ue?null:(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-1 whitespace-nowrap rounded-full bg-warning/15 px-1.5 py-px text-caption font-medium text-warning`,children:[(0,G.jsx)(`span`,{className:`size-1.5 rounded-full bg-warning`,"aria-hidden":!0}),o(`checkinPending`)]})]})}),(0,G.jsxs)(Aj.Content,{children:[e.last_checkin_at?new Date(e.last_checkin_at).toLocaleString():o(`lastCheckinNone`),e.last_checkin_msg?` · ${e.last_checkin_msg}`:``]})]}),(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsxs)(`span`,{className:`flex cursor-help items-center gap-1.5`,children:[(0,G.jsx)(`span`,{className:`font-medium`,children:o(`autoCheckin`)}),(0,G.jsx)(`span`,{className:`mono text-caption text-foreground/55`,children:e.checkin_time||_}),(0,G.jsx)(s7,{isSelected:!!e.auto_checkin,isDisabled:!!t,ariaLabel:o(`autoCheckin`),onChange:e=>b?.(e)})]})}),(0,G.jsx)(Aj.Content,{children:e.checkin_time?o(`checkinCustom`):o(`checkinInherit`)})]})]}):null,(0,G.jsxs)(xS.Footer,{className:`flex flex-wrap items-center gap-1.5 bg-surface-secondary px-4 py-2`,children:[m?(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`secondary`,isPending:t===`refresh`,onPress:m,"aria-label":o(`refreshAccount`),children:(0,G.jsx)(Qr,{size:15})})}),(0,G.jsx)(Aj.Content,{children:o(`refreshAccount`)})]}):null,(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:n?`secondary`:`ghost`,isDisabled:!e.enabled,onPress:T,"aria-label":o(`authentication`),children:(0,G.jsx)(ua,{size:15})})}),(0,G.jsx)(Aj.Content,{children:o(`authentication`)})]}),(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,onPress:E,"aria-label":o(`accountModels`),children:(0,G.jsx)(Bi,{size:15})})}),(0,G.jsx)(Aj.Content,{children:o(`accountModels`)})]}),(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,onPress:w,"aria-label":o(`editAccount`),children:(0,G.jsx)(Oa,{size:15})})}),(0,G.jsx)(Aj.Content,{children:o(`editAccount`)})]}),x?(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,isDisabled:!e.enabled||!!t,isPending:t===`checkin`,onPress:x,"aria-label":o(`checkinNow`),children:(0,G.jsx)(fi,{size:15})})}),(0,G.jsx)(Aj.Content,{children:o(`checkinNow`)})]}):null,(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:j?`secondary`:`ghost`,onPress:()=>M(e=>!e),"aria-label":o(`modelCooldowns`),children:(0,G.jsx)(no,{size:15,className:R.length?`text-warning`:void 0})})}),(0,G.jsxs)(Aj.Content,{children:[o(`modelCooldowns`),R.length?` · ${R.length}`:``]})]}),(0,G.jsxs)(CP,{children:[(0,G.jsx)(CP.Trigger,{children:(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`secondary`,"aria-label":o(`more`),children:(0,G.jsx)(Wi,{size:16})})}),(0,G.jsx)(CP.Popover,{placement:`bottom end`,children:(0,G.jsxs)(CP.Menu,{"aria-label":o(`more`),onAction:e=>{e===`export`&&p(),e===`checkin-records`&&S?.(),e===`delete`&&h()},children:[e.auth_type===`none`?null:(0,G.jsxs)(CP.Item,{id:`export`,textValue:o(`export`),children:[(0,G.jsx)(Ii,{size:15}),o(`export`)]}),S?(0,G.jsxs)(CP.Item,{id:`checkin-records`,textValue:o(`checkinRecords`),children:[(0,G.jsx)(ga,{size:15}),o(`checkinRecords`)]}):null,(0,G.jsxs)(CP.Item,{id:`delete`,textValue:o(`delete`),className:`text-danger`,children:[(0,G.jsx)(io,{size:15}),o(`delete`)]})]})})]}),(0,G.jsx)(`div`,{className:`ml-auto flex shrink-0 flex-nowrap items-center gap-3 whitespace-nowrap`,children:(0,G.jsx)(s7,{isSelected:!!e.enabled,isDisabled:t===`toggle`,ariaLabel:e.enabled?o(`disable`):o(`enable`),label:e.enabled?o(`enabledState`):o(`disabled`),onChange:g})})]}),j?(0,G.jsxs)(`section`,{className:`border-t border-separator bg-surface-secondary/55 px-4 py-2.5`,children:[(0,G.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-2`,children:[(0,G.jsx)(`span`,{className:`text-caption font-medium text-muted`,children:o(`modelCooldownsTitle`)}),(0,G.jsx)(`span`,{className:`mono text-caption text-muted`,children:R.length})]}),R.length?(0,G.jsx)(`div`,{className:`space-y-1`,children:R.map(([e,t])=>(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-lg bg-surface px-2 py-1.5 text-caption`,children:[(0,G.jsx)(`span`,{className:`mono min-w-0 truncate`,title:e,children:e}),(0,G.jsx)(`span`,{className:`mono shrink-0 text-warning`,children:i9(t)})]},e))}):(0,G.jsx)(`p`,{className:`text-caption text-muted`,children:o(`modelCooldownsEmpty`)})]}):null]})}function uTe(e,t){return e.status===`success`?{label:t(`checkinRecordSuccess`),color:`success`}:e.status===`already`?{label:t(`checkinRecordAlready`),color:`warning`}:e.status===`skipped`?{label:t(`checkinRecordSkipped`),color:`default`}:{label:t(`checkinRecordFailed`),color:`danger`}}function dTe(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function fTe({account:e,t,onClose:n}){let[r,i]=(0,v.useState)([]),[a,o]=(0,v.useState)(!!e?.id),[s,c]=(0,v.useState)(``),l=e?.id||``,u=t(`checkinRecordsTitle`,{name:e?.name||e?.id||``});async function d(){if(l){o(!0),c(``);try{let e=await fse(l);i(e.data||[])}catch(e){i([]),c(e instanceof Error?e.message:String(e))}finally{o(!1)}}}return(0,v.useEffect)(()=>{l&&d()},[l]),(0,G.jsx)(Y.Root,{isOpen:!!e,onOpenChange:e=>{e||n()},children:(0,G.jsx)(Y.Backdrop,{variant:`blur`,children:(0,G.jsx)(Y.Container,{size:`lg`,scroll:`inside`,children:(0,G.jsxs)(Y.Dialog,{children:[(0,G.jsxs)(Y.Header,{className:`items-start justify-between gap-4 px-5 pt-5`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(Y.Heading,{className:`text-section font-semibold`,children:u}),(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:t(`checkinRecordsHint`)})]}),(0,G.jsx)(Y.CloseTrigger,{"aria-label":t(`close`),className:`grid size-8 shrink-0 place-items-center rounded-lg text-muted transition-colors hover:bg-surface-secondary hover:text-foreground`,children:(0,G.jsx)(yo,{size:16})})]}),(0,G.jsxs)(Y.Body,{className:`px-5 pb-2`,children:[s?(0,G.jsx)(`div`,{className:`mb-3`,children:(0,G.jsx)(vI,{title:s})}):null,a?(0,G.jsxs)(`div`,{className:`space-y-2 py-1`,children:[(0,G.jsx)(Q,{className:`h-16 w-full`}),(0,G.jsx)(Q,{className:`h-16 w-full`}),(0,G.jsx)(Q,{className:`h-16 w-full`})]}):r.length?(0,G.jsx)(`div`,{className:`divide-y divide-separator overflow-hidden rounded-lg bg-surface-secondary`,children:r.map(e=>{let n=uTe(e,t);return(0,G.jsxs)(`div`,{className:`flex items-start gap-3 px-3 py-3`,children:[(0,G.jsx)(`span`,{className:`status-dot mt-1.5 shrink-0`,"data-state":e.status===`error`?`warn`:`ok`}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:n.color,children:n.label}),(0,G.jsx)(`span`,{className:`mono text-caption text-muted`,children:dTe(e.created_at)})]}),(0,G.jsx)(`p`,{className:`mt-1 break-words text-caption leading-5 text-foreground/75`,children:e.message||`—`})]})]},e.id)})}):(0,G.jsx)(O7,{className:`min-h-44 rounded-3xl bg-surface-secondary`,title:t(`checkinRecordsEmpty`),hint:t(`checkinRecordsHint`)})]}),(0,G.jsxs)(Y.Footer,{className:`justify-between px-5 pb-5`,children:[(0,G.jsx)(`span`,{className:`mono text-caption text-muted`,children:t(`checkinRecordsCount`,{count:r.length})}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(J,{size:`sm`,variant:`ghost`,onPress:n,children:t(`close`)}),(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,isPending:a,onPress:()=>void d(),children:[(0,G.jsx)(Qr,{size:14}),t(`refresh`)]})]})]})]})})})})}function pTe(e){let t=e.route_display_name||``;return t&&t!==(e.display_name||e.id)?t:``}function mTe({account:e,t,onClose:n}){let[r,i]=(0,v.useState)([]),[a,o]=(0,v.useState)(!!e?.id),[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)(``),[d,f]=(0,v.useState)(1),[p,m]=(0,v.useState)(20),[h,g]=(0,v.useState)(0),[_,y]=(0,v.useState)(1),b=(0,v.useRef)(0),x=e?.id||``,S=t(`accountModelsTitle`,{name:e?.name||e?.id||``}),C=e?UV(e.provider,e.region,t):``;async function w(e=1,t=p,n=!1){if(!x)return;let r=++b.current;n?c(!0):o(!0),u(``);try{let a=await(n?sI(x,void 0,{page:e,pageSize:t}):oI(x,!1,void 0,{page:e,pageSize:t})),o=a.data||[],s=a.pagination,c=s?.total??o.length,l=s?.total_pages??Math.max(1,Math.ceil(c/t)),u=Math.min(Math.max(1,s?.page??e),l);if(r!==b.current)return;i(s?o:o.slice((u-1)*t,u*t)),g(c),y(l),f(u)}catch(e){if(r!==b.current)return;i([]),g(0),y(1),u(e instanceof Error?e.message:String(e))}finally{r===b.current&&(o(!1),c(!1))}}(0,v.useEffect)(()=>{x&&(f(1),w(1,p))},[x]);let T=h===0?0:(d-1)*p+1,E=h===0?0:Math.min(h,T+r.length-1);return(0,G.jsx)(Y.Root,{isOpen:!!e,onOpenChange:e=>{e||n()},children:(0,G.jsx)(Y.Backdrop,{variant:`blur`,children:(0,G.jsx)(Y.Container,{size:`lg`,scroll:`inside`,children:(0,G.jsxs)(Y.Dialog,{children:[(0,G.jsxs)(Y.Header,{className:`items-start justify-between gap-4 px-5 pt-5`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(Y.Heading,{className:`text-section font-semibold`,children:S}),(0,G.jsx)(`p`,{className:`mt-1 text-caption font-normal leading-5 text-muted`,children:t(`accountModelsHint`)}),e?(0,G.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-2 text-caption text-muted`,children:[(0,G.jsx)(WV,{provider:e.provider,size:14}),(0,G.jsx)(`span`,{children:C}),(0,G.jsx)(`span`,{className:`text-border`,children:`·`}),(0,G.jsx)(`span`,{className:`mono`,children:e.id})]}):null]}),(0,G.jsx)(Y.CloseTrigger,{"aria-label":t(`close`),className:`grid size-8 shrink-0 place-items-center rounded-lg text-muted transition-colors hover:bg-surface-secondary hover:text-foreground`,children:(0,G.jsx)(yo,{size:16})})]}),(0,G.jsxs)(Y.Body,{className:`px-5 pb-2`,children:[l?(0,G.jsx)(`div`,{className:`mb-3`,children:(0,G.jsx)(vI,{title:t(`accountModelsError`,{msg:l})})}):null,a||s?(0,G.jsxs)(`div`,{className:`space-y-2 py-1`,children:[(0,G.jsx)(Q,{className:`h-14 w-full`}),(0,G.jsx)(Q,{className:`h-14 w-full`}),(0,G.jsx)(Q,{className:`h-14 w-full`})]}):r.length?(0,G.jsx)(`ul`,{className:`divide-y divide-separator overflow-hidden rounded-lg bg-surface-secondary`,children:r.map(n=>{let r=n.provider||n.owned_by||e?.provider||`qoder`,i=pTe(n),a=mV(n),o=hV(n);return(0,G.jsxs)(`li`,{className:`flex items-start gap-3 px-3 py-2.5`,children:[(0,G.jsx)(`span`,{className:`status-dot mt-1.5`,"data-state":n.stale?void 0:`ok`}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`truncate text-body font-medium`,children:n.display_name||n.id}),o?(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:`success`,children:t(`modelFree`)}):null,a?(0,G.jsx)(`span`,{className:`mono text-caption text-muted`,children:a}):null,n.stale?(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:`warning`,children:t(`fallback`)}):null]}),(0,G.jsx)(`div`,{className:`mono mt-0.5 truncate text-caption text-muted`,children:n.id}),i?(0,G.jsx)(`div`,{className:`mt-0.5 text-caption text-muted`,children:t(`routedTo`,{model:i})}):null]}),(0,G.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1.5 pt-0.5 text-caption text-muted`,children:[(0,G.jsx)(WV,{provider:r,size:12}),(0,G.jsx)(`span`,{children:r})]})]},n.id)})}):(0,G.jsx)(O7,{className:`min-h-48 rounded-3xl bg-surface-secondary`,icon:(0,G.jsx)(Bi,{size:22}),title:t(`accountModelsEmpty`),hint:t(`noModelsYet`)})]}),(0,G.jsxs)(Y.Footer,{className:`flex-col items-stretch gap-3 px-5 pb-5`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,G.jsx)(`span`,{className:`mono text-caption text-muted`,children:a?t(`refreshing`):t(`shownTotal`,{shown:h?`${T}–${E}`:0,total:h})}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(J,{size:`sm`,variant:`ghost`,onPress:n,children:t(`close`)}),(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,isPending:s,onPress:()=>void w(1,p,!0),children:[(0,G.jsx)(Qr,{size:14}),t(s?`refreshing`:`refresh`)]})]})]}),h>0?(0,G.jsx)(j7,{total:h,page:d,pageCount:_,pageSize:p,loading:a||s,pageSizeLabel:t(`logsPageSize`),pageLabel:t(`logsPage`,{page:d,pages:_}),prevLabel:t(`logsPrevPage`),nextLabel:t(`logsNextPage`),onPage:e=>void w(e,p),onPageSize:e=>{m(e),w(1,e)}}):null]})]})})})})}var hTe=`w-28`;function u9({label:e,hint:t,labelWidthClass:n=hTe,htmlFor:r,align:i=`center`,children:a}){return(0,G.jsxs)(`div`,{children:[(0,G.jsxs)(`div`,{className:`flex gap-3 ${i===`start`?`items-start`:`items-center`}`,children:[(0,G.jsx)(kM,{htmlFor:r,className:`${n} shrink-0 ${i===`start`?`pt-2`:``} text-body font-medium text-foreground`,children:e}),(0,G.jsx)(`div`,{className:`min-w-0 flex-1 [&_[data-slot=input]]:w-full [&_[data-slot=textarea]]:w-full`,children:a})]}),t?(0,G.jsx)(`p`,{className:`mt-1.5 pl-[7.75rem] text-caption leading-5 text-muted`,children:t}):null]})}function gTe({catalog:e,selected:t,onChange:n,isDisabled:r,t:i}){let[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(t),l=(0,v.useMemo)(()=>new Set(t),[t]),u=(0,v.useMemo)(()=>{let t=new Set(s),n=a.trim().toLowerCase(),r=(e||[]).filter(e=>!n||e.toLowerCase().includes(n));return[...r.filter(e=>t.has(e)),...r.filter(e=>!t.has(e))]},[e,a,s]),d=(0,v.useMemo)(()=>{if(!e)return[];let n=new Set(e);return t.filter(e=>!n.has(e))},[e,t]),f=e?.length??0,p=t.filter(e=>!d.includes(e)).length;function m(e){o(e),c(t)}function h(e,r){n(r?[...t,e]:t.filter(t=>t!==e))}function g(){let e=new Set(t);u.forEach(t=>e.add(t)),n([...e])}function _(){let e=new Set(u);n(t.filter(t=>!e.has(t)))}return(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(DM,{"aria-label":i(`modelPickerSearch`),value:a,onChange:m,isDisabled:r,className:`min-w-0 flex-1 basis-48`,children:(0,G.jsxs)(DM.Group,{children:[(0,G.jsx)(DM.SearchIcon,{}),(0,G.jsx)(DM.Input,{placeholder:i(`modelPickerSearch`)}),(0,G.jsx)(DM.ClearButton,{})]})}),(0,G.jsx)(`span`,{className:`mono shrink-0 text-caption text-muted`,children:i(`modelPickerCount`,{selected:p,total:f})}),(0,G.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,G.jsxs)(J,{size:`sm`,variant:`ghost`,isDisabled:r||u.length===0,onPress:g,children:[(0,G.jsx)(Ai,{size:14}),i(`modelPickerSelectAll`)]}),(0,G.jsxs)(J,{size:`sm`,variant:`ghost`,isDisabled:r||t.length===0,onPress:_,children:[(0,G.jsx)(Ka,{size:14}),i(`modelPickerClear`)]})]})]}),(0,G.jsxs)(`div`,{className:`max-h-[300px] overflow-y-auto overscroll-contain rounded-lg bg-surface-secondary p-1`,children:[e===null?(0,G.jsx)(`p`,{className:`px-2.5 py-2 text-caption text-muted`,children:i(`refreshing`)}):null,d.map(e=>(0,G.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md px-2.5 py-1.5`,children:[(0,G.jsx)(`span`,{className:`mono min-w-0 flex-1 truncate text-body text-muted line-through`,children:e}),(0,G.jsx)(`span`,{className:`shrink-0 text-caption text-warning`,children:i(`modelPickerOffline`)}),(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,isDisabled:r,"aria-label":i(`modelPickerRemove`,{model:e}),onPress:()=>h(e,!1),children:(0,G.jsx)(yo,{size:14})})]},`offline-${e}`)),u.map(e=>(0,G.jsx)(PS,{isSelected:l.has(e),isDisabled:r,onChange:t=>h(e,t),className:`flex w-full cursor-pointer rounded-md px-2.5 py-1.5 transition-colors hover:bg-default`,children:(0,G.jsxs)(PS.Content,{className:`flex min-w-0 flex-1 items-center gap-2.5`,children:[(0,G.jsx)(PS.Control,{children:(0,G.jsx)(PS.Indicator,{})}),(0,G.jsx)(`span`,{className:`mono min-w-0 truncate text-body text-foreground`,children:e})]})},e)),e!==null&&u.length===0?(0,G.jsx)(`p`,{className:`px-2.5 py-2 text-caption text-muted`,children:i(f===0?`noAccountModels`:`modelPickerNoMatch`)}):null]})]})}function _Te(e){let[t,n]=(0,v.useState)(e);e&&!t&&n(!0);let r=(0,v.useRef)(null),i=(0,v.useRef)(null),a=(0,v.useRef)(e);return(0,v.useLayoutEffect)(()=>{let t=r.current,o=i.current;if(!t||!o)return;if(a.current){a.current=!1;return}Z.killTweensOf([t,o]);let s=t.getBoundingClientRect().height;if(e){Z.set(t,{overflow:`hidden`});let e=t.scrollHeight;Z.fromTo(t,{height:s===e?0:s},{height:e,duration:WB(BB.base),ease:VB.out,onComplete:()=>Z.set(t,{clearProps:`height,overflow`})}),Z.fromTo(o,{autoAlpha:0,y:-6},{autoAlpha:1,y:0,duration:WB(BB.base),ease:VB.out})}else Z.set(t,{overflow:`hidden`,height:s}),Z.to(o,{autoAlpha:0,y:-4,duration:WB(BB.fast),ease:VB.inOut}),Z.to(t,{height:0,duration:WB(BB.fast+.04),ease:VB.inOut,onComplete:()=>n(!1)});return()=>{Z.killTweensOf([t,o])}},[e,t]),{mounted:t,outerRef:r,innerRef:i}}function vTe({account:e,checkinDefaultTime:t,checkinTimezone:n,busy:r,t:i,onClose:a,onSave:o}){let[s,c]=(0,v.useState)(e?.name||``),[l,u]=(0,v.useState)(e?.max_inflight??4),[d,f]=(0,v.useState)(e?.priority??50),[p,m]=(0,v.useState)(e?.credit_floor==null?`inherit`:`custom`),[h,g]=(0,v.useState)(e?.credit_floor??0),[_,y]=(0,v.useState)(e?.percent_floor==null?`inherit`:`custom`),[b,x]=(0,v.useState)(e?.percent_floor??0),[S,C]=(0,v.useState)(e?.proxy_url||``),[w,T]=(0,v.useState)(!!e?.drop_system_prompt),[E,D]=(0,v.useState)(Object.entries(e?.model_aliases||{}).map(([e,t])=>({alias:e,model:t}))),[O,k]=(0,v.useState)({alias:``,model:``}),[A,j]=(0,v.useState)(!!e?.models_restricted),[M,N]=(0,v.useState)(e?.enabled_models||[]),{mounted:P,outerRef:F,innerRef:I}=_Te(A),[L,R]=(0,v.useState)(null),[z,B]=(0,v.useState)(!e?.checkin_time),[V,H]=(0,v.useState)(e?.checkin_time||null),[ee,te]=(0,v.useState)(``);(0,v.useEffect)(()=>{if(!e?.id)return;let t=!1;return oI(e.id).then(e=>{t||R(e.data||[])}).catch(()=>{t||R([])}),()=>{t=!0}},[e?.id]);let ne=i(`editAccountTitle`,{name:e?.name||e?.id||``}),re=e?UV(e.provider,e.region,i):``;async function ie(n){n?.preventDefault();let r=s.trim();if(!r){te(i(`accountNameRequired`));return}if(!Number.isInteger(l)||l<1||l>32){te(i(`maxInflightInvalid`));return}if(!Number.isInteger(d)||d<1||d>100){te(i(`priorityInvalid`));return}if(p===`custom`&&(!Number.isFinite(h)||h<0)){te(i(`creditFloorInvalid`));return}if(_===`custom`&&(!Number.isFinite(b)||b<0||b>100)){te(i(`percentFloorInvalid`));return}if(t!==void 0&&!z&&!/^([01]\d|2[0-3]):[0-5]\d$/.test(V??t)){te(i(`checkinTimeInvalid`));return}te(``);try{await o({name:r,max_inflight:l,priority:d,credit_floor:p===`custom`?h:null,percent_floor:_===`custom`?b:null,proxy_url:S.trim(),checkin_time:t===void 0?void 0:z?``:V??t,drop_system_prompt:e?.provider===`workbuddy`||e?.provider===`trae`?w:void 0,model_aliases:Object.fromEntries(E.filter(e=>e.alias.trim()&&e.model.trim()).map(e=>[e.alias.trim(),e.model.trim()])),enabled_models:A?M:[],set_model_routing:!0}),a()}catch(e){te(e instanceof Error?e.message:String(e))}}return(0,G.jsx)(Y.Root,{isOpen:!!e,onOpenChange:e=>{!e&&!r&&a()},children:(0,G.jsx)(Y.Backdrop,{variant:`blur`,children:(0,G.jsx)(Y.Container,{placement:`center`,size:`lg`,scroll:`inside`,children:(0,G.jsxs)(Y.Dialog,{className:`w-full sm:w-[42rem] sm:max-w-[calc(100vw-2rem)]`,children:[(0,G.jsxs)(Y.Header,{className:`items-start justify-between gap-4 px-6 pt-6`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(Y.Heading,{className:`text-section font-semibold`,children:ne}),(0,G.jsx)(`p`,{className:`mt-1.5 text-body font-normal leading-6 text-muted`,children:i(`editAccountHint`)}),e?(0,G.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(RS,{size:`sm`,variant:`soft`,children:(0,G.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,G.jsx)(WV,{provider:e.provider,size:14}),(0,G.jsx)(`span`,{children:re})]})}),(0,G.jsx)(`span`,{className:`mono text-caption text-muted`,children:e.id})]}):null]}),(0,G.jsx)(Y.CloseTrigger,{isDisabled:r,"aria-label":i(`close`),className:`grid size-9 shrink-0 place-items-center rounded-lg text-muted hover:bg-surface-secondary`,children:(0,G.jsx)(yo,{size:18})})]}),(0,G.jsxs)(Y.Body,{className:`px-6 pb-2 pt-1`,children:[ee?(0,G.jsxs)(mP,{status:`danger`,className:`mb-4`,children:[(0,G.jsx)(mP.Indicator,{}),(0,G.jsx)(mP.Content,{children:(0,G.jsx)(mP.Title,{children:ee})})]}):null,(0,G.jsxs)(dP,{className:`space-y-4`,onSubmit:e=>void ie(e),children:[(0,G.jsx)(u9,{label:i(`accountName`),children:(0,G.jsx)(Ij,{value:s,onChange:e=>c(e.target.value),placeholder:i(`wizardNamePh`),"aria-label":i(`accountName`),disabled:r,autoFocus:!0})}),(0,G.jsx)(u9,{label:i(`maxInflight`),hint:i(`maxInflightHint`),children:(0,G.jsx)(OP,{value:l,onChange:e=>u(e??4),minValue:1,maxValue:32,isDisabled:r,isRequired:!0,children:(0,G.jsxs)(OP.Group,{children:[(0,G.jsx)(OP.DecrementButton,{}),(0,G.jsx)(OP.Input,{"aria-label":i(`maxInflight`)}),(0,G.jsx)(OP.IncrementButton,{})]})})}),(0,G.jsx)(u9,{label:i(`priority`),hint:i(`priorityHint`),children:(0,G.jsx)(OP,{value:d,onChange:e=>f(e??50),minValue:1,maxValue:100,isDisabled:r,isRequired:!0,children:(0,G.jsxs)(OP.Group,{children:[(0,G.jsx)(OP.DecrementButton,{}),(0,G.jsx)(OP.Input,{"aria-label":i(`priority`)}),(0,G.jsx)(OP.IncrementButton,{})]})})}),(0,G.jsx)(u9,{label:i(`creditFloor`),hint:i(`creditFloorHint`),align:`start`,children:(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsx)(s7,{isSelected:p===`custom`,isDisabled:r,ariaLabel:i(`creditFloorCustom`),label:i(`creditFloorCustom`),onChange:e=>m(e?`custom`:`inherit`)}),p===`custom`?(0,G.jsx)(OP,{value:h,onChange:e=>g(e??0),minValue:0,step:1,isDisabled:r,isRequired:!0,children:(0,G.jsxs)(OP.Group,{children:[(0,G.jsx)(OP.DecrementButton,{}),(0,G.jsx)(OP.Input,{"aria-label":i(`creditFloor`)}),(0,G.jsx)(OP.IncrementButton,{})]})}):(0,G.jsx)(`p`,{className:`text-caption text-muted`,children:i(`creditFloorInheritHint`)})]})}),(0,G.jsx)(u9,{label:i(`percentFloor`),hint:i(`percentFloorHint`),align:`start`,children:(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsx)(s7,{isSelected:_===`custom`,isDisabled:r,ariaLabel:i(`percentFloorCustom`),label:i(`percentFloorCustom`),onChange:e=>y(e?`custom`:`inherit`)}),_===`custom`?(0,G.jsx)(OP,{value:b,onChange:e=>x(e??0),minValue:0,maxValue:100,step:1,isDisabled:r,isRequired:!0,children:(0,G.jsxs)(OP.Group,{children:[(0,G.jsx)(OP.DecrementButton,{}),(0,G.jsx)(OP.Input,{"aria-label":i(`percentFloor`)}),(0,G.jsx)(OP.IncrementButton,{})]})}):(0,G.jsx)(`p`,{className:`text-caption text-muted`,children:i(`percentFloorInheritHint`)})]})}),(0,G.jsx)(u9,{label:i(`proxyUrl`),hint:i(`proxyUrlHint`),children:(0,G.jsx)(Ij,{value:S,onChange:e=>C(e.target.value),placeholder:i(`proxyUrlPlaceholder`),"aria-label":i(`proxyUrl`),disabled:r})}),e?.provider===`workbuddy`||e?.provider===`trae`?(0,G.jsx)(u9,{label:i(`dropSystemPrompt`),hint:i(e?.provider===`trae`?`dropSystemPromptTraeHint`:`dropSystemPromptHint`),children:(0,G.jsx)(s7,{isSelected:w,isDisabled:r,ariaLabel:i(`dropSystemPrompt`),onChange:T})}):null,(0,G.jsx)(u9,{align:`start`,label:i(`accountModelAliases`),hint:i(`accountModelAliasesHint`),children:(0,G.jsxs)(`div`,{className:`space-y-2`,children:[E.map(e=>(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,G.jsxs)(`span`,{className:`mono min-w-0 truncate text-body`,children:[e.alias,` → `,e.model]}),(0,G.jsx)(J,{size:`sm`,variant:`ghost`,isDisabled:r,onPress:()=>D(t=>t.filter(t=>t.alias!==e.alias)),children:i(`modelAliasRemove`)})]},e.alias)),(0,G.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-[1fr_1fr_auto]`,children:[(0,G.jsx)(Ij,{"aria-label":i(`modelAliasName`),value:O.alias,onChange:e=>k(t=>({...t,alias:e.target.value})),placeholder:i(`modelAliasPlaceholder`),disabled:r}),(0,G.jsx)(Ij,{"aria-label":i(`modelAliasTarget`),value:O.model,onChange:e=>k(t=>({...t,model:e.target.value})),placeholder:i(`accountModelAliasTargetPlaceholder`),disabled:r}),(0,G.jsx)(J,{size:`sm`,variant:`secondary`,isDisabled:r||!O.alias.trim()||!O.model.trim(),onPress:()=>{D(e=>[...e.filter(e=>e.alias!==O.alias.trim()),{alias:O.alias.trim(),model:O.model.trim()}]),k({alias:``,model:``})},children:i(`modelAliasAdd`)})]})]})}),(0,G.jsxs)(`section`,{className:`space-y-3 pt-1`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(`div`,{className:`text-body font-medium text-foreground`,children:i(`enabledModels`)}),(0,G.jsx)(`p`,{className:`mt-0.5 text-caption leading-5 text-muted`,children:i(`enabledModelsHint`)})]}),(0,G.jsx)(s7,{isSelected:A,isDisabled:r,ariaLabel:i(`restrictModels`),label:i(A?`restrictModels`:`allModels`),onChange:j})]}),P?(0,G.jsx)(`div`,{ref:F,children:(0,G.jsx)(`div`,{ref:I,children:(0,G.jsx)(gTe,{catalog:L?L.map(e=>e.id):null,selected:M,onChange:N,isDisabled:r,t:i})})}):null]}),t===void 0?null:(0,G.jsx)(u9,{label:i(`autoCheckinTime`),hint:i(`checkinScheduleHint`),children:(0,G.jsxs)(`div`,{className:`space-y-3`,children:[(0,G.jsx)(s7,{isSelected:z,isDisabled:r,onChange:B,ariaLabel:i(`checkinInherit`),label:i(`checkinInherit`)}),(0,G.jsxs)(`p`,{className:`text-caption text-muted`,children:[i(`checkinDefaultValue`,{time:t}),` · `,(0,G.jsx)(`span`,{className:`mono`,children:n})]}),z?null:(0,G.jsx)(Ij,{type:`time`,value:V??t,onChange:e=>H(e.target.value),"aria-label":i(`autoCheckinTime`),disabled:r,required:!0})]})})]})]}),(0,G.jsxs)(Y.Footer,{className:`justify-end gap-2 px-6 pb-6`,children:[(0,G.jsx)(J,{variant:`ghost`,isDisabled:r,onPress:a,children:i(`cancel`)}),(0,G.jsx)(J,{isPending:r,onPress:()=>void ie(),children:i(`save`)})]})]})})})})}var yTe={1:`grid-cols-1`,2:`grid-cols-1 sm:grid-cols-2`,3:`grid-cols-1 sm:grid-cols-3`};function d9({options:e,value:t,onChange:n,ariaLabel:r,columns:i=2,className:a=``}){let o=(0,v.useRef)(null);return(0,v.useLayoutEffect)(()=>{let e=o.current;if(!e)return;let t=Z.context(()=>{let e=Z.matchMedia();e.add(`(prefers-reduced-motion: reduce)`,()=>{Z.set(`[data-option-tile]`,{autoAlpha:1,y:0})}),e.add(`(prefers-reduced-motion: no-preference)`,()=>{Z.fromTo(`[data-option-tile]`,{autoAlpha:0,y:8},{autoAlpha:1,y:0,duration:.32,stagger:.035,ease:`power3.out`,overwrite:!0})})},e);return()=>t.revert()},[e.length]),(0,G.jsx)(`div`,{ref:o,role:`radiogroup`,"aria-label":r,className:`grid gap-3 ${yTe[i]} ${a}`.trim(),children:e.map(e=>{let r=e.value===t;return(0,G.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":r,"data-option-tile":``,"data-selected":r||void 0,disabled:e.disabled,title:e.hint,onClick:()=>n(e.value),className:`flex h-16 min-w-0 items-center gap-3 rounded-xl bg-surface shadow-surface px-4 text-left transition-colors hover:bg-surface-secondary disabled:cursor-not-allowed disabled:opacity-50 data-selected:border-accent data-selected:bg-accent-soft`,children:[e.icon?(0,G.jsx)(`span`,{className:`grid size-8 shrink-0 place-items-center rounded-lg bg-surface-secondary text-foreground [&_svg]:size-[18px]`,children:e.icon}):null,(0,G.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-body font-medium leading-5 text-foreground`,children:e.label})]},e.value)})})}var f9=new Set([`qoder-global`,`qoder-cn`,`workbuddy-global`,`workbuddy-cn`,`trae-cn`]),bTe=[`qoder-global`,`qoder-cn`,`workbuddy-global`,`workbuddy-cn`,`trae-cn`];function xTe(e,t){let n=new Map(t.map((e,t)=>[e,t]));return[...e].sort((e,t)=>{let r=n.get(e.id)??2**53-1,i=n.get(t.id)??2**53-1;return r===i?e.label.localeCompare(t.label):r-i})}function p9(e,t){return!t||`${e.label} ${e.subtitle||``} ${e.hint||``} ${e.provider} ${e.id}`.toLowerCase().includes(t)}function STe({ariaLabel:e}){return(0,G.jsx)(`div`,{className:`space-y-8`,"aria-busy":`true`,"aria-label":e,children:Array.from({length:2},(e,t)=>(0,G.jsxs)(`div`,{className:`space-y-3`,children:[(0,G.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,G.jsx)(tA,{className:`h-3 w-24 rounded-lg`}),(0,G.jsx)(tA,{className:`h-3 w-40 rounded-lg`})]}),(0,G.jsx)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,children:Array.from({length:t===0?5:6},(e,t)=>(0,G.jsxs)(`div`,{className:`card flex flex-row items-center gap-3.5 rounded-xl bg-surface px-4 py-3.5`,children:[(0,G.jsx)(tA,{className:`size-10 shrink-0 rounded-lg`}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1.5`,children:[(0,G.jsx)(tA,{className:`h-3.5 w-28 rounded-lg`}),(0,G.jsx)(tA,{className:`h-3 w-36 rounded-lg`})]})]},t))})]},t))})}function CTe({tile:e,disabled:t,onSelect:n}){return(0,G.jsxs)(`button`,{type:`button`,disabled:t,title:e.hint||e.subtitle||e.label,onClick:()=>n(e.id),className:`card flex min-w-0 flex-row items-center gap-3 rounded-xl bg-surface px-3.5 py-3 text-left transition-[transform,opacity,background-color] duration-200 ease-out hover:bg-surface-secondary active:translate-y-px active:scale-[0.98] motion-reduce:transition-none motion-reduce:active:translate-y-0 motion-reduce:active:scale-100 disabled:cursor-not-allowed disabled:opacity-50 disabled:active:translate-y-0 disabled:active:scale-100`,children:[(0,G.jsx)(`span`,{className:`grid size-9 shrink-0 place-items-center rounded-lg text-foreground [&_svg]:size-[18px]`,children:(0,G.jsx)(WV,{provider:e.provider,size:18})}),(0,G.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,G.jsx)(`span`,{className:`block truncate text-body font-medium leading-5 text-foreground`,children:e.label}),e.subtitle?(0,G.jsx)(`span`,{className:`mt-0.5 block truncate text-caption leading-4 text-muted`,children:e.subtitle}):null]})]})}function wTe({title:e,subtitle:t,tiles:n,disabled:r,onSelect:i}){return n.length?(0,G.jsxs)(`section`,{className:`space-y-3.5`,children:[(0,G.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,G.jsx)(`h3`,{className:`text-[10px] font-semibold tracking-[0.12em] uppercase text-muted`,children:e}),t?(0,G.jsx)(`p`,{className:`text-caption leading-5 text-muted`,children:t}):null]}),(0,G.jsx)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,children:n.map(e=>(0,G.jsx)(CTe,{tile:e,disabled:r,onSelect:i},e.id))})]}):null}function TTe({options:e,onSelect:t,disabled:n,empty:r,ariaLabel:i}){let{t:a}=GF(),[o,s]=(0,v.useState)(``),c=o.trim().toLowerCase(),l=(0,v.useMemo)(()=>{let t=xTe(e.filter(e=>f9.has(e.id)),bTe),n=e.filter(e=>!f9.has(e.id)).sort((e,t)=>e.label.localeCompare(t.label));return[{id:`subscriptions`,titleKey:`providerGroupSubscriptions`,subtitleKey:`providerGroupSubscriptionsHint`,tiles:t.filter(e=>p9(e,c))},{id:`experimental`,titleKey:`providerGroupExperimental`,subtitleKey:`providerGroupExperimentalHint`,tiles:n.filter(e=>p9(e,c))}]},[c,e]),u=l.reduce((e,t)=>e+t.tiles.length,0);return(0,G.jsxs)(`div`,{className:`space-y-8`,role:`listbox`,"aria-label":i,children:[(0,G.jsx)(M7,{value:o,onChange:s,placeholder:a(`providerFindPlaceholder`),ariaLabel:a(`providerFindPlaceholder`),className:`max-w-sm`}),u===0?r||(0,G.jsx)(`p`,{className:`rounded-lg bg-surface-secondary/45 px-3.5 py-3 text-caption leading-5 text-muted`,children:a(`providerFindEmpty`)}):l.map(e=>(0,G.jsx)(wTe,{title:a(e.titleKey),subtitle:a(e.subtitleKey),tiles:e.tiles,disabled:n,onSelect:t},e.id))]})}var m9={"workbuddy-accounts":`workbuddy`,"workbuddy-oauth-v1":`workbuddy`,"qoder-native-v1":`qoder`,"trae-oauth-v1":`trae`,"devin-session-v1":`devin`,"command-key-v1":`command`,"codex-oauth-v1":`codex`,"zhipu-key-v1":`zhipu`,"qwenwork-oauth-v1":`qwenwork`,"meta-oauth-v1":`meta`,"meta-key-v1":`meta`,"kiro-oauth-v1":`kiro`},ETe=[`codebuddy.cn`,`workbuddy.cn`],DTe=[`workbuddy.ai`,`workbuddy.com`],h9=new Set([`us-east-1`,`eu-central-1`]),OTe=/arn:aws:codewhisperer:([a-z0-9-]+):/;function g9(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function _9(e){return typeof e==`string`?e.trim():``}function v9(e){let t=e.trim();if(!t)return``;let n=t.toLowerCase();return n===`workbuddy-accounts`?`workbuddy-accounts`:n}function y9(e){return typeof e.format==`string`&&e.format.trim()?v9(e.format):typeof e.exportType==`string`&&e.exportType.trim()?v9(e.exportType):``}function kTe(e){let t=[],n=e=>{typeof e==`string`&&e.trim()&&t.push(e.trim().toLowerCase())};if(n(e.domain),g9(e.account)&&n(e.account.domain),g9(e.auth)&&n(e.auth.domain),Array.isArray(e.accounts))for(let t of e.accounts)g9(t)&&(n(t.domain),g9(t.account)&&n(t.account.domain),g9(t.auth)&&n(t.auth.domain));return t}function ATe(e){return ETe.some(t=>e.includes(t))}function jTe(e){return DTe.some(t=>e.includes(t))}function b9(e){return typeof e.accessToken==`string`||typeof e.access_token==`string`||typeof e.refreshToken==`string`||typeof e.refresh_token==`string`}function MTe(e){if(!g9(e))return!1;if(b9(e)||typeof e.domain==`string`||typeof e.uid==`string`)return!0;if(g9(e.account)||g9(e.auth)){let t=g9(e.account)?e.account:null,n=g9(e.auth)?e.auth:null;if(n&&(b9(n)||typeof n.domain==`string`)||t&&(typeof t.uid==`string`||typeof t.domain==`string`))return!0}return!1}function NTe(e){let t=kTe(e);if(t.length===0)return{region:`cn`,ambiguous:!0,warning:`region_unknown`};let n=t.some(ATe),r=t.some(jTe);return n&&r?{region:null,ambiguous:!0,warning:`region_mixed`}:n?{region:`cn`,ambiguous:!1}:r?{region:`global`,ambiguous:!1}:{region:`cn`,ambiguous:!0,warning:`region_unknown`}}function x9(e){let t=_9(e.region).toLowerCase();if(h9.has(t))return t;if(t===`eu`||t===`europe`)return`eu-central-1`;let n=_9(e.profileArn)||_9(e.profile_arn),r=OTe.exec(n);if(r&&h9.has(r[1]))return r[1];for(let t of[`kiroApiKey`,`apiKey`,`api_key`,`accessToken`,`access_token`]){let n=_9(e[t]),r=n.split(`|`);if(n.startsWith(`ksk_`)&&r.length===2&&h9.has(r[1].trim().toLowerCase()))return r[1].trim().toLowerCase()}return null}function S9(e){if(y9(e)===`kiro-oauth-v1`||x9(e))return!0;let t=(_9(e.authMethod)||_9(e.auth_method)).toLowerCase();if([`builder_id`,`builderid`,`external_idp`,`idc`,`social`].includes(t))return!0;let n=_9(e.provider).toLowerCase();if([`builderid`,`kiro`,`apikey`,`github`,`google`,`social`].includes(n))return!0;for(let t of[`kiroApiKey`,`apiKey`,`api_key`,`accessToken`,`access_token`])if(_9(e[t]).startsWith(`ksk_`))return!0;let r=_9(e.clientId)||_9(e.client_id),i=_9(e.clientSecret)||_9(e.client_secret),a=_9(e.refreshToken)||_9(e.refresh_token),o=_9(e.startUrl)||_9(e.start_url);if(r&&i&&a||o.includes(`awsapps.com`)&&a||(_9(e.profileArn)||_9(e.profile_arn)).includes(`codewhisperer`)&&(a||_9(e.accessToken)||_9(e.access_token)))return!0;let s=_9(e.tokenEndpoint)||_9(e.token_endpoint),c=_9(e.issuerUrl)||_9(e.issuer_url);return!!((s.includes(`microsoftonline`)||c.includes(`microsoftonline`))&&a)}function C9(e){return Array.isArray(e.accounts)?e.accounts.filter(e=>g9(e)&&S9(e)):[]}function PTe(e){return S9(e)||C9(e).length>0?{format:`kiro-oauth-v1`,provider:`kiro`,confidence:`medium`}:Array.isArray(e.accounts)&&e.accounts.some(MTe)?{format:`workbuddy-accounts`,provider:`workbuddy`,confidence:`medium`}:(typeof e.user_blob==`string`||typeof e.userBlob==`string`)&&(typeof e.machine_id==`string`||typeof e.machineId==`string`)?{format:`qoder-native-v1`,provider:`qoder`,confidence:`medium`}:typeof e.session_token==`string`||typeof e.sessionToken==`string`?{format:`devin-session-v1`,provider:`devin`,confidence:`low`}:b9(e)||g9(e.account)&&b9(e.account)||g9(e.auth)?{format:`workbuddy-oauth-v1`,provider:`workbuddy`,confidence:`low`}:typeof e.dca_token==`string`||typeof e.dcaToken==`string`||typeof e.access_token==`string`&&String(e.access_token).startsWith(`dca:`)||typeof e.accessToken==`string`&&String(e.accessToken).startsWith(`dca:`)?{format:`meta-oauth-v1`,provider:`meta`,confidence:`medium`}:typeof e.api_key==`string`||typeof e.apiKey==`string`?typeof e.organization==`string`||typeof e.project==`string`?{format:`zhipu-key-v1`,provider:`zhipu`,confidence:`low`}:typeof e.base_url==`string`&&String(e.base_url).includes(`meta.ai`)||typeof e.baseUrl==`string`&&String(e.baseUrl).includes(`meta.ai`)||typeof e.email==`string`?{format:`meta-key-v1`,provider:`meta`,confidence:`low`}:{format:`command-key-v1`,provider:`command`,confidence:`low`}:{format:null,provider:null,confidence:`low`}}function FTe(e){let t=C9(e),n=t.length>0?t:[e],r=new Set(n.map(x9).filter(e=>e!=null));return r.size===1?{region:[...r][0],ambiguous:!1}:(r.size,{region:null,ambiguous:!0})}function w9(e){if(!g9(e))return{format:null,provider:null,region:null,regionAmbiguous:!0,confidence:`low`,warnings:[`not_object`],batchImportSupported:!1};let t=[],n=y9(e),r=typeof e.format==`string`?e.format.trim():``,i=typeof e.exportType==`string`?e.exportType.trim():``,a=r||i,o=n||null,s=o?m9[o]??null:null,c=o&&s?`high`:`low`;if(!s){let r=PTe(e);o||=r.format,s=r.provider,c=n&&!m9[n]?`low`:r.confidence,a&&!m9[n]&&t.push(`unknown_format`)}s!==`kiro`&&(S9(e)||C9(e).length>0)&&(s=`kiro`,o=`kiro-oauth-v1`,c=n===`kiro-oauth-v1`?`high`:`medium`),s===`workbuddy`&&Array.isArray(e.accounts)&&(o=`workbuddy-accounts`);let l=null,u=!1;if(s===`workbuddy`){let n=NTe(e);l=n.region,u=n.ambiguous,n.warning&&t.push(n.warning)}if(s===`kiro`){let n=FTe(e);l=n.region,u=n.ambiguous,u&&t.push(C9(e).length>1?`region_mixed`:`region_unknown`)}return{format:o,provider:s,region:l,regionAmbiguous:u,confidence:c,warnings:t,batchImportSupported:s===`workbuddy`||s===`kiro`}}function ITe(e){let t;try{t=JSON.parse(e)}catch{throw Error(`bad_json`)}if(Array.isArray(t)){if(t.length===0||!t.every(g9))throw Error(`bad_json`);return{accounts:t}}if(!g9(t))throw Error(`bad_json`);return t}function T9(e,t){let n={...e},r=n.format===`workbuddy-accounts`||Array.isArray(n.accounts);return n.format?r&&(n.format=`workbuddy-accounts`):n.format=r?`workbuddy-accounts`:`workbuddy-oauth-v1`,{...n,name:t.name?.trim()||n.name,enabled:t.enabled??!0,provider:`workbuddy`,region:t.region,max_inflight:t.max_inflight??4,priority:t.priority??50,drop_system_prompt:t.drop_system_prompt??!0,...t.proxy_url!=null&&t.proxy_url!==``?{proxy_url:t.proxy_url}:{}}}function E9(e,t){let n=typeof e?.succeeded==`number`?e.succeeded:e?.id||e?1:0,r=typeof e?.failed==`number`?e.failed:0,i=(e?.errors||[]).slice(0,3).map(e=>e.message||`index ${e.index}`).filter(Boolean).join(`; `),a;return a=r>0?t(`accountImportPartial`).replace(`{ok}`,String(n)).replace(`{fail}`,String(r))+(i?` — ${i}`:``):n>1?t(`accountImportBatch`).replace(`{n}`,String(n)):t(`accountImported`),{succeeded:n,failed:r,message:a}}async function LTe(e,t){return dI(T9(e,t))}var D9={global:`Global`,cn:`CN`},RTe={"qoder-global":`accountTypeQoderGlobal`,"qoder-cn":`accountTypeQoderCN`,"workbuddy-cn":`accountTypeWorkBuddyCN`,"workbuddy-global":`accountTypeWorkBuddyGlobal`,"trae-cn":`accountTypeTraeCN`,"devin-global":`accountTypeDevinGlobal`,"command-global":`accountTypeCommandGlobal`,"codex-global":`accountTypeCodexGlobal`,"zhipu-cn":`accountTypeZhipuCN`,"qwenwork-global":`accountTypeQwenworkGlobal`,"qwenwork-cn":`accountTypeQwenworkCN`,"kimi-cn":`accountTypeKimiCN`,"codearts-cn-north-4":`accountTypeCodeArtsCN`,"kiro-us-east-1":`accountTypeKiroUS`,"kiro-eu-central-1":`accountTypeKiroEU`,"meta-global":`accountTypeMetaGlobal`},zTe={"qoder-global":`accountTypeQoderGlobalHint`,"qoder-cn":`accountTypeQoderCNHint`,"workbuddy-cn":`accountTypeWorkBuddyCNHint`,"workbuddy-global":`accountTypeWorkBuddyGlobalHint`,"trae-cn":`accountTypeTraeCNHint`,"devin-global":`accountTypeDevinGlobalHint`,"command-global":`accountTypeCommandGlobalHint`,"codex-global":`accountTypeCodexGlobalHint`,"zhipu-cn":`accountTypeZhipuCNHint`,"qwenwork-global":`accountTypeQwenworkGlobalHint`,"qwenwork-cn":`accountTypeQwenworkCNHint`,"kimi-cn":`accountTypeKimiCNHint`,"codearts-cn-north-4":`accountTypeCodeArtsCNHint`,"kiro-us-east-1":`accountTypeKiroUSHint`,"kiro-eu-central-1":`accountTypeKiroEUHint`,"meta-global":`accountTypeMetaGlobalHint`};async function BTe(){let e=(await cI().catch(()=>null))?.data||[],t=[];for(let n of e)for(let e of n.regions)t.push({id:`${n.id}-${e.id}`,provider:n.id,region:e.id,descriptor:n});return t}function O9(e,t){let n=RTe[e.id];if(n){let e=t(n);if(e!==n)return e}let r=e.descriptor.regions.find(t=>t.id===e.region)?.label||D9[e.region]||``,i=e.descriptor.regions.length>1&&r?` ${r}`:``;return`${e.descriptor.label}${i}`.trim()}function k9(e,t){if(!e)return``;let n=zTe[e.id];if(!n)return``;let r=t(n);return r===n?``:r}function VTe({phase:e,busy:t,tab:n,forTab:r}){return e===`done`?(0,G.jsx)(Oi,{size:16,className:`text-success`}):t&&n===r?(0,G.jsx)(KB,{size:16,loading:!0}):null}var HTe=90,UTe=2e3;function WTe({isOpen:e,onClose:t,onAdded:n}){let{t:r}=GF(),[i,a]=(0,v.useState)(`method`),[o,s]=(0,v.useState)(`browser`),[c,l]=(0,v.useState)(``),[u,d]=(0,v.useState)([]),[f,p]=(0,v.useState)(!1),[m,h]=(0,v.useState)(!1),[g,_]=(0,v.useState)(``),[y,b]=(0,v.useState)(4),[x,S]=(0,v.useState)(50),[C,w]=(0,v.useState)(!0),[T,E]=(0,v.useState)(``),[D,O]=(0,v.useState)(``),[k,A]=(0,v.useState)(``),[j,M]=(0,v.useState)(`payg`),[N,P]=(0,v.useState)(``),[F,I]=(0,v.useState)(``),[L,R]=(0,v.useState)(``),[z,B]=(0,v.useState)(`idle`),[V,H]=(0,v.useState)(``),[ee,te]=(0,v.useState)(``),[ne,re]=(0,v.useState)(!1),[ie,ae]=(0,v.useState)(``),[oe,se]=(0,v.useState)(`cli`),[ce,le]=(0,v.useState)(`builder_id`),[ue,de]=(0,v.useState)(``),fe=(0,v.useRef)(null),pe=(0,v.useRef)(null),me=(0,v.useRef)(null),he=(0,v.useRef)(``),ge=(0,v.useRef)(null),_e=(0,v.useRef)(null);function ve(){ge.current!==null&&(window.clearTimeout(ge.current),ge.current=null)}(0,v.useEffect)(()=>()=>ve(),[]),(0,v.useEffect)(()=>{if(!e)return;let t=!1;return p(!0),d([]),l(``),BTe().then(e=>{t||(d(e),l(``),s(`browser`))}).finally(()=>{t||p(!1)}),()=>{t=!0}},[e]);let ye=u.find(e=>e.id===c),be=!f&&u.length>0,xe=ye?.descriptor.capabilities?.pat_login!==!1,Se=ye?.descriptor.capabilities?.import_export!==!1,Ce=ye?.descriptor.capabilities?.browser_login!==!1,we=ye?.provider===`workbuddy`||ye?.provider===`trae`,Te=ye?.provider===`trae`||ye?.provider===`devin`||ye?.provider===`codex`||ye?.provider===`codearts`,Ee=z===`busy`||z===`polling`,De=!!he.current||Ee,Oe=z===`done`,ke=k9(ye,r);(0,v.useEffect)(()=>{o===`pat`&&!xe&&s(`browser`),o===`import`&&!Se&&s(`browser`)},[Se,xe,o]),(0,v.useEffect)(()=>{Ce||(xe?s(`pat`):Se&&s(`import`))},[Ce,Se,xe]);function Ae(){return!Number.isInteger(y)||y<1||y>32?4:y}function je(){return!Number.isInteger(x)||x<1||x>100?50:x}function Me(){return{max_inflight:Ae(),priority:je(),drop_system_prompt:we?C:ye?.provider!==`kimi`&&ye?.provider!==`codearts`,proxy_url:T.trim()}}function Ne(){ve(),a(`method`),s(`browser`),l(``),d([]),p(!1),_(``),b(4),S(50),w(!0),E(``),O(``),A(``),M(`payg`),P(``),I(``),R(``),h(!1),B(`idle`),H(``),te(``),re(!1),ae(``),se(`cli`),he.current=``}function Pe(){Ee||(Ne(),t())}function Fe(){Ne(),t()}(0,v.useLayoutEffect)(()=>{let t=fe.current;if(e||(me.current=null),!t||!e)return;let n=Z.context(()=>{let e=Z.matchMedia();e.add(`(prefers-reduced-motion: reduce)`,()=>{Z.set(t,{autoAlpha:1,x:0,y:0})}),e.add(`(prefers-reduced-motion: no-preference)`,()=>{let e=me.current,n=e&&e!==i?i===`login`?1:-1:0;Z.fromTo(t,{autoAlpha:0,x:20*n,y:n?0:12},{autoAlpha:1,x:0,y:0,duration:BB.slow,ease:VB.out,overwrite:!0}),n&&pe.current&&Z.fromTo(pe.current,{autoAlpha:0,y:6},{autoAlpha:1,y:0,duration:BB.base,ease:VB.out,overwrite:!0})})},t);return me.current=i,()=>n.revert()},[e,i]);function Ie(e){if(Ee||!be)return;let t=u.find(t=>t.id===e);l(e),s(t?.provider===`zhipu`?`pat`:`browser`),w(t?.provider!==`trae`&&t?.provider!==`kimi`&&t?.provider!==`codearts`),H(``),a(`login`)}async function Le(){if(he.current)return he.current;if(!ye)throw Error(r(`accountTypeHint`));let e=Me(),t=await dse(g.trim()||r(`account`),ye.provider,ye.region,e),n=t?.id||t?.data?.id;if(!n)throw Error(`create account returned no id`);return he.current=n,n}async function Re(){H(``),te(``);try{B(`busy`);let e=await Le();H(r(`wizardStartingSession`)),B(`polling`);let t=await eI(e,ye?.provider===`codex`?oe:ye?.provider===`kiro`?ce:void 0,ce===`idc`?ue.trim():void 0);t.authUrl&&te(t.authUrl),H(r(`wizardWaitingBrowser`));for(let t=0;t{ge.current=window.setTimeout(e,UTe)});let n=(await tI(e)).login||{};if(n.message&&H(n.message),n.status===`ok`)break;if(n.status===`error`)throw Error(n.message||`login failed`);if(t===89)throw Error(r(`wizardLoginTimeout`))}B(`done`),H(r(`wizardAccountReady`)),n(),window.setTimeout(Fe,900)}catch(e){B(`idle`),H(e instanceof Error?e.message:String(e))}}async function ze(){let e=ie.trim();if(!e){H(r(`wizardCallbackPh`));return}try{B(`busy`);let t=await Le();ve(),await nI(t,e),B(`done`),H(r(`wizardAccountReady`)),n(),window.setTimeout(Fe,900)}catch(e){B(`polling`),H(e instanceof Error?e.message:String(e))}}async function Be(){let e=N.trim();if(!e){H(r(`zhipuKeyRequired`));return}if(!ye){H(r(`accountTypeHint`));return}H(``);try{B(`busy`);let t=Me();await dI({format:`zhipu-key-v1`,api_key:e,mode:j,organization:j===`coding`?F.trim():``,project:j===`coding`?L.trim():``,name:g.trim()||r(`accountTypeZhipuCN`),enabled:!0,provider:ye.provider,region:ye.region,max_inflight:t.max_inflight,priority:t.priority,drop_system_prompt:t.drop_system_prompt,proxy_url:t.proxy_url}),B(`done`),H(r(`wizardAccountReady`)),n(),window.setTimeout(Fe,700)}catch(e){B(`idle`),H(e instanceof Error?e.message:String(e))}}async function Ve(){let e=D.trim();if(!e){H(r(`pastePatFirst`));return}H(``);try{B(`busy`);let t=await Le();H(r(`wizardStartingSession`)),await rI(e,t),B(`done`),H(r(`patDone`)),n(),window.setTimeout(Fe,700)}catch(e){B(`idle`),H(e instanceof Error?e.message:String(e))}}async function He(){H(``);let e;try{e=JSON.parse(k)}catch{H(r(`wizardBadJson`));return}if(Array.isArray(e)){if(!e.every(e=>e&&typeof e==`object`&&!Array.isArray(e))){H(r(`wizardBadJson`));return}e={accounts:e}}if(!e||typeof e!=`object`){H(r(`wizardBadJson`));return}if(!ye){H(r(`accountTypeHint`));return}let t=w9(e),i=t.provider||ye.provider;if(i===`qoder`&&(typeof e.user_blob!=`string`||typeof e.machine_id!=`string`)){H(r(`wizardBadJson`));return}let a=Me(),o;if(i===`kiro`){let t=typeof e.email==`string`?e.email.trim():``,n=typeof e.nickname==`string`?e.nickname.trim():``,r=x9(e),{provider:i,accounts:s,...c}=e,l=Array.isArray(s)?s:[{...c,...i?{provider:i}:{}}];o={format:`kiro-oauth-v1`,provider:`kiro`,region:r||(ye.provider===`kiro`?ye.region:`us-east-1`),name:g.trim()||n||t||void 0,enabled:!0,accounts:l,max_inflight:a.max_inflight,priority:a.priority,drop_system_prompt:a.drop_system_prompt,proxy_url:a.proxy_url}}else if(i===`workbuddy`)o=T9(e,{region:ye.region===`global`?`global`:`cn`,name:g.trim()||void 0,enabled:!0,max_inflight:a.max_inflight,priority:a.priority,drop_system_prompt:a.drop_system_prompt,proxy_url:a.proxy_url});else{if(!e.format){let t=i;t===`trae`?e.format=`trae-oauth-v1`:t===`devin`?e.format=`devin-session-v1`:t===`command`?e.format=`command-key-v1`:t===`qwenwork`?e.format=`qwenwork-oauth-v1`:t===`kimi`?e.format=`kimi-oauth-v1`:t===`codearts`?e.format=`codearts-oauth-v1`:t===`codex`?e.format=`codex-oauth-v1`:t===`meta`?e.format=`meta-oauth-v1`:e.format=`qoder-native-v1`}o={...e,name:g.trim()||e.name,enabled:!0,provider:i,region:t.region||ye.region,max_inflight:a.max_inflight,priority:a.priority,drop_system_prompt:a.drop_system_prompt}}try{B(`busy`);let{failed:e,message:t}=E9(await dI(o),r);B(`done`),H(t),n(),window.setTimeout(Fe,e>0?1600:700)}catch(e){B(`idle`),H(e instanceof Error?e.message:String(e))}}function Ue(){_e.current?.click()}function We(e){let t=e.target.files?.[0];if(!t)return;let n=new FileReader;n.onload=()=>A(String(n.result||``)),n.readAsText(t),e.target.value=``}let Ge=e=>Ee&&o===e,Ke=ye?.provider===`zhipu`,qe=[ye?.descriptor.capabilities?.browser_login===!1?null:{value:`browser`,label:r(`tabBrowser`)},xe?{value:`pat`,label:r(`tabPat`)}:null,Se?{value:`import`,label:r(`tabImport`)}:null].filter(Boolean),Je=r(o===`browser`?ye?.provider===`codex`?`wizardCodexBrowserLead`:`wizardBrowserLead`:o===`pat`?ye?.provider===`command`?`wizardPatLeadCommand`:ye?.region===`cn`&&ye?.provider===`qoder`?`wizardPatLeadCN`:`wizardPatLead`:`wizardImportLead`);return(0,G.jsx)(Y.Root,{isOpen:e,onOpenChange:e=>{e||Pe()},children:(0,G.jsx)(Y.Backdrop,{variant:`blur`,isDismissable:!Ee,children:(0,G.jsx)(Y.Container,{size:`lg`,scroll:`inside`,children:(0,G.jsxs)(Y.Dialog,{className:`w-full sm:w-[36rem] sm:max-w-[calc(100vw-2rem)] sm:min-h-[36rem]`,children:[(0,G.jsxs)(Y.Header,{className:`relative items-center justify-center px-12 pt-5 text-center`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(Y.Heading,{className:`text-section font-semibold`,children:r(`addAccountTitle`)}),(0,G.jsx)(`p`,{ref:pe,className:`mt-1 text-caption font-normal leading-5 text-muted`,children:i===`method`?r(`addAccountDesc`):ke||r(`addAccountDesc`)})]}),(0,G.jsx)(Y.CloseTrigger,{"aria-label":r(`close`),className:`absolute right-4 top-4 grid size-8 shrink-0 place-items-center rounded-lg text-muted transition-colors hover:bg-surface-secondary hover:text-foreground`,children:(0,G.jsx)(yo,{size:16})})]}),(0,G.jsx)(Y.Body,{className:i===`method`?`px-8 pb-5 sm:px-10`:`px-6 pb-2`,children:(0,G.jsx)(`div`,{ref:fe,children:i===`method`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`section`,{className:`space-y-2.5`,children:f?(0,G.jsx)(STe,{ariaLabel:r(`accountType`)}):be?(0,G.jsx)(TTe,{ariaLabel:r(`accountType`),options:u.map(e=>{let t=e.descriptor.regions.find(t=>t.id===e.region)?.label||D9[e.region]||``;return{id:e.id,provider:e.provider,label:O9(e,r),subtitle:t,hint:k9(e,r)}}),onSelect:Ie,disabled:De}):(0,G.jsx)(`p`,{className:`rounded-lg bg-surface-secondary/45 px-3.5 py-3 text-caption leading-5 text-muted`,children:r(`accountTypeHint`)})}),(0,G.jsx)(`div`,{className:`mt-4 text-center`,children:(0,G.jsx)(K7,{className:`text-xs`})})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{className:`card flex flex-row items-center gap-3 rounded-xl bg-surface px-3 py-2.5`,children:[(0,G.jsx)(`span`,{className:`shrink-0`,children:(0,G.jsx)(WV,{provider:ye?.provider,size:18})}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsx)(`div`,{className:`truncate text-body font-medium text-foreground`,children:ye?O9(ye,r):r(`accountType`)}),(0,G.jsx)(`div`,{className:`truncate text-caption text-muted`,children:ke})]}),(0,G.jsxs)(J,{size:`sm`,variant:`ghost`,onPress:()=>a(`method`),isDisabled:Ee||!!he.current,children:[(0,G.jsx)(mi,{size:12}),r(`wizardBack`)]})]}),(0,G.jsxs)(`div`,{className:`mt-4 space-y-3`,children:[(0,G.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,G.jsx)(kM,{className:`text-body font-medium text-muted`,children:r(`accountName`)}),(0,G.jsx)(Ij,{fullWidth:!0,value:g,onChange:e=>_(e.target.value),"aria-label":r(`accountName`),disabled:De,autoFocus:!0})]}),(0,G.jsxs)(`button`,{type:`button`,onClick:()=>h(e=>!e),"aria-expanded":m,className:`inline-flex items-center gap-1 text-caption font-medium text-muted transition-colors hover:text-foreground`,children:[(0,G.jsx)(gi,{size:12,className:`transition-transform duration-200 ${m?`rotate-90`:``}`}),r(`wizardAdvanced`)]}),m?(0,G.jsxs)(`div`,{className:`card gap-3 rounded-xl bg-surface px-3.5 py-3.5`,children:[(0,G.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,children:[(0,G.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,G.jsx)(kM,{className:`text-body font-medium text-muted`,children:r(`maxInflight`)}),(0,G.jsx)(OP,{value:y,onChange:e=>b(e??4),minValue:1,maxValue:32,isDisabled:De,isRequired:!0,children:(0,G.jsxs)(OP.Group,{className:`w-full`,children:[(0,G.jsx)(OP.DecrementButton,{}),(0,G.jsx)(OP.Input,{"aria-label":r(`maxInflight`)}),(0,G.jsx)(OP.IncrementButton,{})]})}),(0,G.jsx)(jM,{className:`text-caption leading-5 text-muted`,children:r(`maxInflightHint`)})]}),(0,G.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,G.jsx)(kM,{className:`text-body font-medium text-muted`,children:r(`priority`)}),(0,G.jsx)(OP,{value:x,onChange:e=>S(e??50),minValue:1,maxValue:100,isDisabled:De,isRequired:!0,children:(0,G.jsxs)(OP.Group,{className:`w-full`,children:[(0,G.jsx)(OP.DecrementButton,{}),(0,G.jsx)(OP.Input,{"aria-label":r(`priority`)}),(0,G.jsx)(OP.IncrementButton,{})]})}),(0,G.jsx)(jM,{className:`text-caption leading-5 text-muted`,children:r(`priorityHint`)})]})]}),(0,G.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,G.jsx)(kM,{className:`text-body font-medium text-muted`,children:r(`proxyUrl`)}),(0,G.jsx)(Ij,{fullWidth:!0,value:T,onChange:e=>E(e.target.value),placeholder:r(`proxyUrlPlaceholder`),"aria-label":r(`proxyUrl`),disabled:De}),(0,G.jsx)(jM,{className:`text-caption leading-5 text-muted`,children:r(`proxyUrlHint`)})]}),we?(0,G.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,G.jsx)(kM,{className:`text-body font-medium text-muted`,children:r(`dropSystemPrompt`)}),(0,G.jsx)(jM,{className:`text-caption leading-5 text-muted`,children:r(ye?.provider===`trae`?`dropSystemPromptTraeHint`:`dropSystemPromptCreateHint`)}),(0,G.jsx)(s7,{isSelected:C,isDisabled:De,ariaLabel:r(`dropSystemPrompt`),onChange:w})]}):null]}):null]}),Ke?(0,G.jsxs)(`div`,{className:`mt-4 flex flex-col gap-4`,children:[(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsx)(`span`,{className:`text-body font-medium text-muted`,children:r(`zhipuAccountMode`)}),(0,G.jsx)(d9,{ariaLabel:r(`zhipuAccountMode`),columns:2,value:j,onChange:e=>{Ee||M(e)},options:[{value:`payg`,label:r(`zhipuModePayg`),hint:r(`zhipuModePaygHint`),disabled:Ee},{value:`coding`,label:r(`zhipuModeCoding`),hint:r(`zhipuModeCodingHint`),disabled:Ee}]})]}),(0,G.jsx)(u9,{label:r(`zhipuApiKey`),children:(0,G.jsx)(Ij,{type:`password`,value:N,onChange:e=>P(e.target.value),placeholder:r(`zhipuApiKeyPh`),"aria-label":r(`zhipuApiKey`),disabled:Ee})}),j===`coding`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(u9,{label:r(`zhipuOrganization`),children:(0,G.jsx)(Ij,{value:F,onChange:e=>I(e.target.value),placeholder:r(`zhipuOrganizationPh`),"aria-label":r(`zhipuOrganization`),disabled:Ee})}),(0,G.jsx)(u9,{label:r(`zhipuProject`),children:(0,G.jsx)(Ij,{value:L,onChange:e=>R(e.target.value),placeholder:r(`zhipuProjectPh`),"aria-label":r(`zhipuProject`),disabled:Ee})})]}):null,V?(0,G.jsxs)(`p`,{className:`flex items-center gap-2 rounded-lg bg-surface-secondary px-3 py-2 text-caption`,children:[Oe?(0,G.jsx)(Oi,{size:14,className:`shrink-0 text-success`}):null,(0,G.jsx)(`span`,{className:Oe?`font-medium text-foreground`:`text-muted`,children:V})]}):null]}):null,Ke?null:(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(wV,{className:`mt-3`,value:o,onChange:e=>{!Ee&&e!==o&&(s(e),H(``),te(``),re(!1))},ariaLabel:r(`authentication`),options:qe.map(e=>({id:e.value,label:e.label}))}),(0,G.jsx)(`p`,{className:`mt-2 min-h-5 text-caption leading-5 text-muted`,children:Je}),(0,G.jsx)(`div`,{className:`mt-3 flex flex-col gap-4`,children:o===`browser`?(0,G.jsxs)(G.Fragment,{children:[ye?.provider===`codex`?(0,G.jsx)(d9,{ariaLabel:r(`codexLoginMethod`),columns:2,value:oe,onChange:e=>{Ee||se(e)},options:[{value:`cli`,label:r(`codexLoginCli`),hint:r(`codexLoginCliHint`),disabled:Ee||!!he.current},{value:`chatgpt`,label:r(`codexLoginChatGPT`),hint:r(`codexLoginChatGPTHint`),disabled:Ee||!!he.current}]}):null,ye?.provider===`kiro`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(d9,{ariaLabel:r(`kiroLoginMethod`),columns:2,value:ce,onChange:e=>{Ee||le(e)},options:[{value:`builder_id`,label:r(`kiroLoginBuilder`),hint:r(`kiroLoginBuilderHint`),disabled:Ee||!!he.current},{value:`idc`,label:r(`kiroLoginIDC`),hint:r(`kiroLoginIDCHint`),disabled:Ee||!!he.current},{value:`sso`,label:r(`kiroLoginSSO`),hint:r(`kiroLoginSSOHint`),disabled:Ee||!!he.current},{value:`microsoft`,label:r(`kiroLoginMicrosoft`),hint:r(`kiroLoginMicrosoftHint`),disabled:Ee||!!he.current}]}),ce===`idc`?(0,G.jsx)(u9,{label:r(`kiroIDCStartURL`),children:(0,G.jsx)(Ij,{value:ue,onChange:e=>de(e.target.value),placeholder:r(`kiroIDCStartURLPh`),"aria-label":r(`kiroIDCStartURL`),disabled:Ee})}):null]}):null,ee?(0,G.jsxs)(`div`,{className:`card rounded-xl bg-surface px-3 py-2.5`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2 text-caption`,children:[(0,G.jsx)(VTe,{phase:z,busy:Ee,tab:o,forTab:`browser`}),(0,G.jsx)(`span`,{className:`text-muted`,children:V||r(`loginOpenMsg`)})]}),(0,G.jsx)(`code`,{className:`mono mt-2 block break-all text-caption leading-5 text-foreground`,children:ee}),(0,G.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:[(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,onPress:()=>window.open(ee,`_blank`,`noopener,noreferrer`),children:[(0,G.jsx)(ni,{size:14}),r(`openAuthUrl`)]}),(0,G.jsxs)(J,{size:`sm`,variant:`ghost`,onPress:()=>{U7(ee).then(e=>{e&&(re(!0),window.setTimeout(()=>re(!1),1100))})},children:[(0,G.jsx)(H7,{copied:ne}),r(ne?`copied`:`copy`)]})]})]}):null,V&&!ee?(0,G.jsxs)(`p`,{className:`flex items-center gap-2 rounded-lg bg-surface-secondary px-3 py-2 text-caption`,children:[Oe?(0,G.jsx)(Oi,{size:14,className:`shrink-0 text-success`}):null,(0,G.jsx)(`span`,{className:Oe?`font-medium text-foreground`:`text-muted`,children:V})]}):null,Te?(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsx)(`p`,{className:`text-caption leading-4 text-muted`,children:r(`wizardCallbackLead`)}),(0,G.jsx)(Vj,{className:`h-28 w-full resize-none font-mono text-caption leading-5`,value:ie,onChange:e=>ae(e.target.value),placeholder:r(`wizardCallbackPh`),"aria-label":r(`wizardCallbackPh`),disabled:Oe}),(0,G.jsx)(J,{size:`sm`,variant:`secondary`,isPending:z===`busy`&&!!ie.trim(),onPress:()=>void ze(),isDisabled:Oe,children:r(`wizardSubmitCallback`)})]}):null]}):o===`pat`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(u9,{label:r(`tabPat`),children:(0,G.jsx)(Ij,{type:`password`,value:D,onChange:e=>O(e.target.value),placeholder:r(`wizardPatPh`),"aria-label":r(`wizardPatPh`),disabled:Ee})}),V?(0,G.jsxs)(`p`,{className:`flex items-center gap-2 rounded-lg bg-surface-secondary px-3 py-2 text-caption`,children:[Oe?(0,G.jsx)(Oi,{size:14,className:`shrink-0 text-success`}):null,(0,G.jsx)(`span`,{className:Oe?`font-medium text-foreground`:`text-muted`,children:V})]}):null]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,G.jsx)(`span`,{className:`text-caption font-medium text-muted`,children:`JSON`}),(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,onPress:Ue,isDisabled:Ee,children:[(0,G.jsx)(Xi,{size:13}),r(`wizardChooseFile`)]}),(0,G.jsx)(`input`,{ref:_e,type:`file`,accept:`application/json,.json`,className:`hidden`,onChange:We})]}),(0,G.jsx)(Vj,{className:`min-h-32 font-mono text-caption`,value:k,onChange:e=>A(e.target.value),placeholder:r(`wizardImportPh`),"aria-label":r(`tabImport`),disabled:Ee}),V?(0,G.jsxs)(`p`,{className:`flex items-center gap-2 rounded-lg bg-surface-secondary px-3 py-2 text-caption`,children:[Oe?(0,G.jsx)(Oi,{size:14,className:`shrink-0 text-success`}):null,(0,G.jsx)(`span`,{className:Oe?`font-medium text-foreground`:`text-muted`,children:V})]}):null]})})]})]})})}),(0,G.jsxs)(Y.Footer,{className:`justify-end gap-2 px-5 pb-5`,children:[(0,G.jsx)(J,{variant:`ghost`,onPress:Pe,isDisabled:Ee,children:r(`cancel`)}),i===`login`&&Ke?(0,G.jsx)(J,{isPending:z===`busy`,onPress:()=>void Be(),isDisabled:Oe,children:Oe?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Oi,{size:15}),r(`wizardAccountReady`)]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(ua,{size:15}),r(`zhipuCreate`)]})}):null,i===`login`&&!Ke&&o===`browser`?(0,G.jsx)(J,{isPending:Ge(`browser`),onPress:()=>void Re(),isDisabled:Oe,children:Oe?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Oi,{size:15}),r(`wizardAccountReady`)]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Ia,{size:15}),r(`wizardStartBrowser`)]})}):null,i===`login`&&!Ke&&o===`pat`?(0,G.jsx)(J,{isPending:Ge(`pat`),onPress:()=>void Ve(),isDisabled:Oe,children:Oe?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Oi,{size:15}),r(`patDone`)]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(ua,{size:15}),r(`wizardCreateAndLogin`)]})}):null,i===`login`&&!Ke&&o===`import`?(0,G.jsx)(J,{isPending:Ge(`import`),onPress:()=>void He(),isDisabled:Oe,children:Oe?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Oi,{size:15}),r(`accountImported`)]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Xi,{size:15}),r(`importCredential`)]})}):null]})]})})})})}function A9({isOpen:e,title:t,description:n,confirmLabel:r,cancelLabel:i,closeLabel:a,isPending:o,status:s=`danger`,confirmVariant:c=`danger`,onClose:l,onConfirm:u}){return(0,G.jsx)(Gb.Root,{isOpen:e,onOpenChange:e=>{!e&&!o&&l()},children:(0,G.jsx)(Gb.Backdrop,{variant:`blur`,isDismissable:!o,children:(0,G.jsx)(Gb.Container,{placement:`center`,size:`sm`,children:(0,G.jsxs)(Gb.Dialog,{children:[(0,G.jsxs)(Gb.Header,{className:`items-start justify-between gap-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,G.jsx)(Gb.Icon,{status:s}),(0,G.jsx)(`div`,{children:(0,G.jsx)(Gb.Heading,{children:t})})]}),(0,G.jsx)(Gb.CloseTrigger,{isDisabled:o,"aria-label":a})]}),(0,G.jsx)(Gb.Body,{children:(0,G.jsx)(`p`,{className:`text-body leading-6 text-muted`,children:n})}),(0,G.jsxs)(Gb.Footer,{children:[(0,G.jsx)(J,{size:`sm`,variant:`ghost`,isDisabled:o,onPress:l,children:i}),(0,G.jsx)(J,{size:`sm`,variant:c,isPending:o,onPress:u,children:r})]})]})})})})}function GTe(e,t){return e===`region_mixed`?t(`batchImportRegionMixed`):e===`region_unknown`?t(`batchImportRegionUnknown`):e===`unknown_format`?t(`batchImportUnknownFormat`):``}function KTe({isOpen:e,detection:t,fileName:n,isPending:r,t:i,onClose:a,onConfirm:o}){let s=t?.provider===`kiro`?[`us-east-1`,`eu-central-1`]:[`cn`,`global`],[c,l]=(0,v.useState)(t?.region&&s.includes(t.region)?t.region:s[0]);(0,v.useEffect)(()=>{if(!t)return;let e=t.provider===`kiro`?[`us-east-1`,`eu-central-1`]:[`cn`,`global`];t.region&&e.includes(t.region)?l(t.region):l(e[0])},[t]);let u=!!t?.batchImportSupported,d=t?.provider,f=t?.format||i(`batchImportFormatUnknown`),p=d?HV(d,i):i(`batchImportProviderUnknown`),m=(t?.warnings||[]).map(e=>GTe(e,i)).filter(Boolean);return(0,G.jsx)(Y.Root,{isOpen:e,onOpenChange:e=>{!e&&!r&&a()},children:(0,G.jsx)(Y.Backdrop,{variant:`blur`,isDismissable:!r,children:(0,G.jsx)(Y.Container,{placement:`center`,size:`md`,scroll:`inside`,className:`mx-3 w-full max-w-[min(100%,32rem)] sm:mx-0`,children:(0,G.jsxs)(Y.Dialog,{children:[(0,G.jsxs)(Y.Header,{className:`items-start justify-between gap-4 px-6 pt-6`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(Y.Heading,{className:`text-section font-semibold`,children:i(`batchImportConfirmTitle`)}),(0,G.jsx)(`p`,{className:`mt-1 break-all text-caption leading-5 text-muted`,children:n?i(`batchImportConfirmHint`,{file:n}):i(`batchImportConfirmHintNoFile`)})]}),(0,G.jsx)(Y.CloseTrigger,{isDisabled:r,"aria-label":i(`close`),className:`grid size-8 shrink-0 place-items-center rounded-lg text-muted transition-colors hover:bg-surface-secondary hover:text-foreground`,children:(0,G.jsx)(yo,{size:16})})]}),(0,G.jsxs)(Y.Body,{className:`space-y-4 px-6 pb-2`,children:[(0,G.jsx)(`div`,{className:`rounded-xl bg-surface-secondary px-3.5 py-3`,children:(0,G.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[d?(0,G.jsx)(WV,{provider:d,size:18}):null,(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(`div`,{className:`text-body font-medium text-foreground`,children:p}),(0,G.jsx)(`div`,{className:`mono mt-0.5 truncate text-caption text-muted`,children:f})]})]})}),u?(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsx)(`div`,{className:`text-body font-medium text-muted`,children:i(d===`kiro`?`batchImportKiroRegion`:`batchImportRegion`)}),(0,G.jsx)(wV,{value:c,onChange:e=>{s.includes(e)&&l(e)},ariaLabel:i(d===`kiro`?`batchImportKiroRegion`:`batchImportRegion`),options:d===`kiro`?[{id:`us-east-1`,label:i(`accountTypeKiroUS`)},{id:`eu-central-1`,label:i(`accountTypeKiroEU`)}]:[{id:`cn`,label:i(`accountTypeWorkBuddyCN`)},{id:`global`,label:i(`accountTypeWorkBuddyGlobal`)}]}),t?.regionAmbiguous?(0,G.jsx)(`p`,{className:`text-caption leading-5 text-muted`,children:i(d===`kiro`?`batchImportKiroRegionPickHint`:`batchImportRegionPickHint`)}):null]}):(0,G.jsx)(`p`,{className:`text-body leading-6 text-muted`,children:i(`batchImportProviderUnsupported`)}),m.length?(0,G.jsx)(`ul`,{className:`space-y-1 text-caption leading-5 text-muted`,children:m.map(e=>(0,G.jsx)(`li`,{children:e},e))}):null]}),(0,G.jsxs)(Y.Footer,{className:`flex-col-reverse gap-2 px-6 pb-6 sm:flex-row sm:justify-end`,children:[(0,G.jsx)(J,{size:`sm`,variant:`ghost`,className:`w-full sm:w-auto`,isDisabled:r,onPress:a,children:i(u?`cancel`:`close`)}),u?(0,G.jsx)(J,{size:`sm`,className:`w-full sm:w-auto`,isPending:r,onPress:()=>o(c),children:i(`batchImportConfirmAction`)}):null]})]})})})})}function qTe(e){if(!Array.isArray(e.accounts))return[e];let t=e.accounts.filter(e=>!!e&&typeof e==`object`&&!Array.isArray(e)&&S9(e));return t.length>0?t:[e]}function JTe(e,t){let n=qTe(e),r=n.find(e=>typeof e.nickname==`string`||typeof e.email==`string`),i=typeof r?.nickname==`string`?r.nickname.trim():``,a=typeof r?.email==`string`?r.email.trim():``;return{format:`kiro-oauth-v1`,provider:`kiro`,region:x9(n[0]||e)||t,enabled:!0,name:n.length===1&&(i||a)||void 0,accounts:n.map(e=>({...e,region:x9(e)||t}))}}var j9=`__all__`,YTe=[],M9=2;function XTe(){let{t:e}=GF(),[t,n]=(0,v.useState)([]),[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)([]),[l,u]=(0,v.useState)(!0),d=s,f=d.length>0,[p,m]=(0,v.useState)(!1),[h,g]=(0,v.useState)(!1),[_,y]=(0,v.useState)(!1),[b,x]=(0,v.useState)(null),[S,C]=(0,v.useState)(null),[w,T]=(0,v.useState)(``),[E,D]=(0,v.useState)(null),[O,k]=(0,v.useState)({}),[A,j]=(0,v.useState)({}),[M,N]=(0,v.useState)({}),[P,F]=(0,v.useState)({}),[I,L]=(0,v.useState)({}),[R,z]=(0,v.useState)(null),[B,V]=(0,v.useState)(null),[H,ee]=(0,v.useState)(null),[te,ne]=(0,v.useState)(null),[re,ie]=(0,v.useState)(null),[ae,oe]=(0,v.useState)(``),[se,ce]=(0,v.useState)(`all`),[le,ue]=(0,v.useState)(``),[de,fe]=(0,v.useState)(1),[pe,me]=(0,v.useState)(20),[he,ge]=(0,v.useState)({}),[_e,ve]=(0,v.useState)({}),[ye,be]=(0,v.useState)({}),[xe,Se]=(0,v.useState)({}),[Ce,we]=(0,v.useState)(!1),[Te,Ee]=(0,v.useState)(!1),De=(0,v.useCallback)(async(e=!1)=>{try{let t=(await $F(e)).data||YTe;return c(t),t}finally{u(!1)}},[]),Oe=(0,v.useCallback)(async(e,t=!0)=>{let n=[...new Set(e)];if(!n.length)return{total:0,failed:0,errors:[]};let r=n.length,i=new Map;for(let e=0;e{try{let n=await ase(e,{quota:t});c(t=>t.map(t=>t.id===e?n:t))}catch(t){let n=t instanceof Error?t.message:String(t);i.set(e,n),N(t=>({...t,[e]:n}))}}))}return{total:r,failed:i.size,errors:[...i.values()]}},[]);(0,v.useEffect)(()=>{De(!1).catch(()=>void 0)},[De]),(0,v.useEffect)(()=>{let e=!0;return Promise.all([cI(),yI()]).then(([t,r])=>{e&&(n(t.data||[]),i(r))}).catch(t=>{e&&o(t instanceof Error?t.message:String(t))}),()=>{e=!1}},[]),(0,v.useEffect)(()=>{let e=!0;return De(!1).then(t=>{if(e)return Oe((t||[]).map(e=>e.id))}).catch(()=>void 0),()=>{e=!1}},[De,Oe]);function ke(e){return t.find(t=>t.id===e.provider)?.regions.find(t=>t.id===e.region)?.checkin}function Ae(e){let t=ke(e)?.timezone,n=t===`Local`?r?.timezone:t;if(!(!n||n===`Local`))try{return Intl.DateTimeFormat(`en-CA`,{timeZone:n}),n}catch{return}}let je=(0,v.useMemo)(()=>d.map(e=>{let t=he[e.id],n=_e[e.id],r=ye[e.id],i=xe[e.id],a=e;return t!==void 0&&(a={...a,enabled:t}),n!==void 0&&(a={...a,name:n}),r!==void 0&&(a={...a,max_inflight:r}),i!==void 0&&(a={...a,priority:i}),a}),[he,ye,_e,xe,d]),Me=(0,v.useMemo)(()=>{let e={all:je.length,available:0,attention:0,disabled:0};for(let t of je){let n=a9(t);n===`hot`||n===`ready`?e.available+=1:n===`disabled`&&(e.disabled+=1),t.enabled&&n!==`hot`&&n!==`ready`&&(e.attention+=1)}return e},[je]),Ne=(0,v.useMemo)(()=>{let e=new Map;for(let t of je){let n=String(t.provider||`qoder`).toLowerCase();e.set(n,(e.get(n)||0)+1)}return[...e.entries()].sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0]))},[je]),Pe=je.find(e=>e.id===R),Fe=je.find(e=>e.id===B)||null,Ie=je.find(e=>e.id===H)||null,Le=je.find(e=>e.id===te)||null,Re=(0,v.useMemo)(()=>{let e=ae.trim().toLowerCase();return je.filter(t=>{let n=a9(t);return!(se===`all`||se===`available`&&(n===`hot`||n===`ready`)||se===`attention`&&t.enabled&&n!==`hot`&&n!==`ready`||se===`disabled`&&n===`disabled`)||le&&String(t.provider||`qoder`).toLowerCase()!==le?!1:!e||[t.name,t.id,t.remote_uid,t.provider,t.auth_type].some(t=>String(t||``).toLowerCase().includes(e))})},[je,se,le,ae]),ze=[ae,se,le,pe].join(`\0`),[Be,Ve]=(0,v.useState)(ze);Be!==ze&&(Ve(ze),fe(1));let He=Math.max(1,Math.ceil(Re.length/pe)),Ue=Math.min(Be===ze?Math.max(1,de):1,He);de!==Ue&&fe(Ue);let We=(0,v.useMemo)(()=>{let e=(Ue-1)*pe;return Re.slice(e,e+pe)},[Ue,Re,pe]);if(l&&!f)return(0,G.jsx)(Rce,{});async function Ge(e,t,n){D({id:e,kind:t}),N(t=>({...t,[e]:``}));try{return await n(),!0}catch(t){return N(n=>({...n,[e]:t instanceof Error?t.message:String(t)})),!1}finally{D(null)}}async function Ke(t,n){ie(t),await Ge(t,`device`,async()=>{N(n=>({...n,[t]:e(`wizardStartingSession`)}));let r=await eI(t,n);r.authUrl&&L(e=>({...e,[t]:r.authUrl||``}));for(let n=0;n<60;n++){await new Promise(e=>window.setTimeout(e,2e3));let n=(await tI(t)).login||{};if(N(r=>({...r,[t]:n.message||e(`waitingQoderLogin`)})),n.status===`ok`||n.status===`error`)break}await De(!1),await Oe([t])})}async function qe(t){let n=(A[t]||``).trim();if(!n){N(n=>({...n,[t]:e(`wizardCallbackPh`)}));return}await Ge(t,`callback`,async()=>{N(n=>({...n,[t]:e(`wizardStartingSession`)})),await nI(t,n),j(e=>({...e,[t]:``})),await De(!1),await Oe([t])})&&(ie(e=>e===t?null:e),N(e=>({...e,[t]:``})))}async function Je(t){let n=(O[t]||``).trim();if(!n){N(n=>({...n,[t]:e(`pastePatFirst`)}));return}await Ge(t,`pat`,async()=>{N(n=>({...n,[t]:e(`wizardStartingSession`)})),await rI(n,t),k(e=>({...e,[t]:``})),await De(!1),await Oe([t])})}async function Ye(t){await Ge(t,`export`,async()=>{let n=await mse(t);await U7(JSON.stringify(n,null,2)),N(n=>({...n,[t]:e(`credentialCopied`)}))})}async function Xe(e,t){ge(n=>({...n,[e]:t})),await Ge(e,`toggle`,async()=>{await uI(e,{enabled:t}),await De(!1)}),ge(t=>{let n={...t};return delete n[e],n})}async function Ze(t){sV({id:`refresh-${t}`,type:`loading`,title:e(`toastRefreshingAccount`)}),D({id:t,kind:`refresh`}),N(e=>{let n={...e};return delete n[t],n});try{let n=await Oe([t]);if(n.failed>0){sV({id:`refresh-${t}`,type:`error`,title:e(`toastFailed`),description:n.errors[0]||e(`toastFailed`)});return}sV({id:`refresh-${t}`,type:`success`,title:e(`toastAccountRefreshed`)})}finally{D(null)}}async function Qe(){we(!0),sV({id:`refresh-credits`,type:`loading`,title:e(`toastRefreshingCredits`)});try{let t=await Oe(s.map(e=>e.id));if(t.failed>0){let n=t.failed0&&r===0?`error`:i>0?`info`:`success`,title:a}),y(!1),x(null),C(null),T(``),r>0&&await De(!1)}catch(t){sV({id:n,type:`error`,title:e(`toastFailed`),description:t instanceof Error?t.message:String(t)})}finally{g(!1)}}async function nt(e,t){await Ge(e,`toggle`,async()=>{await uI(e,{auto_checkin:t}),await De(!1)})}function rt(e){return o9(e,Ae(e))}async function it(){let t,n;try{t=je.filter(e=>e.enabled&&ke(e)),n=t.filter(e=>!rt(e))}catch(t){sV({id:`checkin-all`,type:`error`,title:e(`toastFailed`),description:t instanceof Error?t.message:String(t)});return}if(t.length===0){sV({id:`checkin-all`,type:`info`,title:e(`checkinAllEmpty`)});return}if(n.length===0){sV({id:`checkin-all`,type:`success`,title:e(`checkinAllDone`,{count:t.length})});return}sV({id:`checkin-all`,type:`loading`,title:e(`toastCheckingInAll`,{done:0,total:n.length})}),Ee(!0);let r={checked:0,skipped:t.length-n.length,failed:0};try{for(let t=0;t0&&await new Promise(e=>setTimeout(e,4e3));try{let i=await lI(n[t].id),a=i?.last_checkin_status,o=i?.last_checkin_msg,s=a===`already`?`already`:a===`skipped`?`skipped`:a===`error`?`error`:`success`;s===`error`||s===`skipped`?r.failed+=1:r.checked+=1,F(r=>({...r,[n[t].id]:{kind:s,message:s===`error`?o||e(`checkinRecordFailed`):o}}))}catch(e){r.failed+=1,F(r=>({...r,[n[t].id]:{kind:`error`,message:e instanceof Error?e.message:String(e)}}))}tvoid 0)}}async function at(t){await Ge(t,`checkin`,async()=>{let n;try{n=await lI(t)}catch(e){F(n=>({...n,[t]:{kind:`error`,message:e instanceof Error?e.message:String(e)}})),await De(!1).catch(()=>void 0),await Oe([t]).catch(()=>void 0);return}let r=n?.last_checkin_status,i=n?.last_checkin_msg,a=r===`already`?`already`:r===`skipped`?`skipped`:r===`error`?`error`:`success`;F(n=>({...n,[t]:{kind:a,message:a===`error`?i||e(`checkinRecordFailed`):i}})),await De(!1).catch(()=>void 0),await Oe([t]).catch(()=>void 0)})}async function ot(t,n){if(!t)throw Error(e(`accountNameRequired`));ve(e=>({...e,[t]:n.name})),be(e=>({...e,[t]:n.max_inflight})),Se(e=>({...e,[t]:n.priority})),D({id:t,kind:`settings`});try{await uI(t,n),await De(!1)}catch(e){throw e instanceof Error?e:Error(String(e))}finally{D(null),ve(e=>{let n={...e};return delete n[t],n}),be(e=>{let n={...e};return delete n[t],n}),Se(e=>{let n={...e};return delete n[t],n})}}return(0,G.jsxs)(`div`,{className:`space-y-4`,children:[a?(0,G.jsx)(vI,{title:a}):null,(0,G.jsxs)(`section`,{"data-gsap-reveal":!0,className:`flex flex-wrap items-center gap-2`,children:[d.length?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(wV,{value:se,onChange:e=>ce(e),ariaLabel:e(`accountStatusFilter`),options:[{id:`all`,label:(0,G.jsxs)(G.Fragment,{children:[e(`filterAll`),(0,G.jsx)(`span`,{className:`mono text-muted`,children:Me.all})]})},{id:`available`,label:(0,G.jsxs)(G.Fragment,{children:[e(`availableAccounts`),(0,G.jsx)(`span`,{className:`mono text-muted`,children:Me.available})]})},{id:`attention`,label:(0,G.jsxs)(G.Fragment,{children:[e(`needsAttention`),(0,G.jsx)(`span`,{className:`mono ${Me.attention?`text-danger`:`text-muted`}`,children:Me.attention})]})},{id:`disabled`,label:(0,G.jsxs)(G.Fragment,{children:[e(`disabled`),(0,G.jsx)(`span`,{className:`mono text-muted`,children:Me.disabled})]})}]}),(0,G.jsxs)(UP,{className:`w-48`,"aria-label":e(`providerFilterAll`),value:le||j9,onChange:e=>{typeof e==`string`&&ue(e===j9?``:e)},children:[(0,G.jsxs)(UP.Trigger,{className:`items-center`,children:[(0,G.jsx)(UP.Value,{className:`min-w-0 truncate`}),(0,G.jsx)(UP.Indicator,{})]}),(0,G.jsx)(UP.Popover,{children:(0,G.jsxs)(yP,{children:[(0,G.jsxs)(yP.Item,{id:j9,textValue:e(`providerFilterAll`),children:[(0,G.jsxs)(kM,{className:`flex items-center gap-2`,children:[e(`providerFilterAll`),(0,G.jsx)(`span`,{className:`mono text-muted`,children:d.length})]}),(0,G.jsx)(yP.ItemIndicator,{})]}),Ne.map(([t,n])=>(0,G.jsxs)(yP.Item,{id:t,textValue:HV(t,e),children:[(0,G.jsxs)(kM,{className:`flex items-center gap-2`,children:[(0,G.jsx)(WV,{provider:t,size:13}),HV(t,e),(0,G.jsx)(`span`,{className:`mono text-muted`,children:n})]}),(0,G.jsx)(yP.ItemIndicator,{})]},t))]})})]}),(0,G.jsx)(M7,{className:`w-full sm:w-60`,value:ae,onChange:oe,placeholder:e(`searchAccounts`),ariaLabel:e(`searchAccounts`)})]}):null,(0,G.jsxs)(`div`,{className:`flex w-full flex-wrap items-center justify-end gap-2 sm:ml-auto sm:w-auto`,children:[(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,isPending:Te,isDisabled:Ce,onPress:()=>void it(),children:[(0,G.jsx)(fi,{size:14}),e(`checkinAll`)]}),(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,isPending:Ce,isDisabled:Te,onPress:()=>void Qe(),children:[(0,G.jsx)(oi,{size:14}),e(`refreshCredits`)]}),(0,G.jsxs)(`label`,{htmlFor:`accounts-batch-import-file`,className:`button button--sm button--secondary inline-flex items-center gap-1.5 ${h||_?`pointer-events-none opacity-60`:`cursor-pointer`}`,children:[h?(0,G.jsx)(KB,{size:14,loading:!0}):(0,G.jsx)(uo,{size:14}),e(`batchImport`)]}),(0,G.jsx)(`input`,{id:`accounts-batch-import-file`,type:`file`,accept:`.json,application/json,text/json`,disabled:h||_,className:`sr-only`,onChange:e=>void et(e)}),(0,G.jsxs)(J,{size:`sm`,onPress:()=>m(!0),children:[(0,G.jsx)(Ma,{size:14}),e(`addAccount`)]})]})]}),(0,G.jsx)(WTe,{isOpen:p,onClose:()=>m(!1),onAdded:()=>{sV({type:`success`,title:e(`toastAccountAdded`)}),De(!1)}}),(0,G.jsx)(KTe,{isOpen:_,detection:b,fileName:w,isPending:h,t:e,onClose:$e,onConfirm:e=>{tt(e)}}),(0,G.jsx)(mTe,{account:Fe,t:e,onClose:()=>V(null)},B??`closed`),(0,G.jsx)(fTe,{account:Ie,t:e,onClose:()=>ee(null)},H??`closed`),(0,G.jsx)(vTe,{account:Le,checkinDefaultTime:Le&&ke(Le)?r?.checkin_times[Le.provider||``]:void 0,checkinTimezone:Le?Ae(Le):void 0,busy:!!(E&&E.id===te&&E.kind===`settings`),t:e,onClose:()=>ne(null),onSave:e=>ot(te||``,e)},te??`closed`),(0,G.jsx)(A9,{isOpen:!!Pe,title:e(`delete`),description:e(`deleteAccountConfirm`,{name:Pe?.name||Pe?.id||``}),confirmLabel:e(`delete`),cancelLabel:e(`cancel`),closeLabel:e(`close`),isPending:E?.id===R&&E.kind===`delete`,onClose:()=>z(null),onConfirm:()=>{if(!Pe)return;let t=Pe.id;z(null),Ge(t,`delete`,async()=>{await pse(t),await De(!1)}).then(t=>{t&&sV({type:`success`,title:e(`toastAccountDeleted`)})})}}),f?null:(0,G.jsxs)(`div`,{className:`space-y-3`,children:[(0,G.jsx)(O7,{className:`rounded-3xl bg-surface-secondary`,icon:(0,G.jsx)(KB,{size:28}),title:e(`noAccounts`),hint:e(`accountEmptyHint`),action:(0,G.jsxs)(J,{size:`sm`,onPress:()=>m(!0),children:[(0,G.jsx)(Ma,{size:14}),e(`addAccount`)]})}),(0,G.jsx)(`div`,{className:`text-center`,children:(0,G.jsx)(K7,{})})]}),f&&!Re.length?(0,G.jsx)(O7,{className:`rounded-3xl bg-surface-secondary`,icon:(0,G.jsx)(va,{size:22}),title:e(`noAccountsMatch`),action:(0,G.jsx)(J,{size:`sm`,variant:`ghost`,onPress:()=>{oe(``),ce(`all`),ue(``)},children:e(`clearFilters`)})}):null,(0,G.jsx)(`section`,{className:`grid auto-rows-[minmax(280px,auto)] gap-2.5 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4`,children:We.map(t=>(0,G.jsx)(lTe,{account:t,busyKind:E?.id===t.id?E.kind:``,authPanelOpen:re===t.id,authUrl:I[t.id],note:M[t.id],pat:O[t.id]||``,t:e,onPatChange:e=>k(n=>({...n,[t.id]:e})),callbackUrl:A[t.id]||``,onCallbackChange:e=>j(n=>({...n,[t.id]:e})),onSubmitCallback:()=>void qe(t.id),onDeviceLogin:e=>void Ke(t.id,e),onPatLogin:()=>void Je(t.id),onExport:()=>void Ye(t.id),onRefresh:()=>void Ze(t.id),onDelete:()=>z(t.id),onToggle:e=>void Xe(t.id,e),checkinDefaultTime:r?.checkin_times[t.provider||``],checkinTimezone:Ae(t),onToggleAutoCheckin:ke(t)?e=>void nt(t.id,e):void 0,onCheckin:ke(t)?()=>void at(t.id):void 0,checkinFeedback:P[t.id]??null,onViewCheckins:ke(t)?()=>ee(t.id):void 0,onEdit:()=>ne(t.id),onToggleAuthPanel:()=>ie(e=>e===t.id?null:t.id),onViewModels:()=>V(t.id)},t.id))}),Re.length?(0,G.jsx)(j7,{total:Re.length,page:Ue,pageCount:He,pageSize:pe,pageSizes:_we,loading:!1,pageSizeLabel:e(`logsPageSize`),pageLabel:e(`logsPage`,{page:Ue,pages:He}),prevLabel:e(`logsPrevPage`),nextLabel:e(`logsNextPage`),onPage:fe,onPageSize:me}):null]})}function ZTe(){let{t:e,lang:t,setLang:n}=GF(),{setApiKey:r}=JF(),{overview:i,refresh:a}=pI(),{theme:o,toggleTheme:s}=gI(),[c,l]=(0,v.useState)(``),[u,d]=(0,v.useState)(!1),[f,p]=(0,v.useState)(!1),[m,h]=(0,v.useState)(``),g=at(),_=nt().state?.from||`/`,y=(0,v.useRef)(null);if(Kce(y,`login`),i)return(0,G.jsx)(At,{to:_===`/login`?`/`:_,replace:!0});async function b(t){t.preventDefault();let n=c.trim();if(!n){h(e(`loginNeedKey`));return}p(!0),h(``);try{r(n),await a(n),g(_===`/login`?`/`:_,{replace:!0})}catch(t){h(ZF(t)?e(`loginBadKey`):t instanceof Error?t.message:String(t))}finally{p(!1)}}return(0,G.jsxs)(`div`,{className:`relative min-h-dvh overflow-hidden bg-background text-foreground`,children:[(0,G.jsx)(`div`,{className:`absolute inset-x-0 top-0 h-px bg-border`}),(0,G.jsxs)(`main`,{ref:y,className:`relative z-10 mx-auto grid min-h-dvh w-full max-w-[1480px] lg:grid-cols-[minmax(0,1fr)_minmax(380px,30rem)]`,children:[(0,G.jsxs)(`section`,{className:`flex min-h-[52vh] flex-col px-5 py-6 sm:px-8 sm:py-8 lg:min-h-dvh lg:px-8 lg:py-10 xl:px-10`,children:[(0,G.jsxs)(`header`,{className:`flex items-center justify-between gap-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,G.jsx)(KB,{size:36}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`div`,{className:`font-semibold`,children:`CLI2API`}),(0,G.jsx)(`div`,{className:`text-caption text-muted`,children:e(`controlPlane`)})]})]}),(0,G.jsxs)(_j,{isAttached:!0,children:[(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,onPress:()=>n(t===`zh`?`en`:`zh`),"aria-label":t===`zh`?`English`:`中文`,children:(0,G.jsx)(ia,{size:15})})}),(0,G.jsx)(Aj.Content,{children:t===`zh`?`English`:`中文`})]}),(0,G.jsxs)(Aj,{children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,onPress:s,"aria-label":o===`dark`?`Light mode`:`Dark mode`,children:o===`dark`?(0,G.jsx)(Qa,{size:15}):(0,G.jsx)(ba,{size:15})})}),(0,G.jsx)(Aj.Content,{children:o===`dark`?`Light mode`:`Dark mode`})]})]})]}),(0,G.jsx)(`div`,{className:`my-auto w-full py-8 lg:py-10`,children:(0,G.jsx)(g7,{t:e,defaultExpanded:!0,forceMockDemo:!0,bare:!0,live:null,mockPace:.45})}),(0,G.jsxs)(`footer`,{className:`hidden items-center justify-between text-caption text-muted lg:flex`,children:[(0,G.jsx)(`span`,{children:e(`loginHint`)}),(0,G.jsx)(`span`,{children:e(`routesHint`)})]})]}),(0,G.jsx)(`section`,{className:`flex items-center px-5 py-10 sm:px-8 lg:px-8 xl:px-10`,children:(0,G.jsx)(xS,{"data-gsap-reveal":!0,variant:`transparent`,className:`w-full bg-transparent p-0 shadow-none`,children:(0,G.jsxs)(`form`,{onSubmit:e=>void b(e),children:[(0,G.jsx)(xS.Header,{className:`px-2 py-6 sm:px-4`,children:(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,G.jsx)(KB,{size:28,loading:f}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(xS.Title,{className:`text-title`,children:e(`loginFormTitle`)}),(0,G.jsx)(xS.Description,{className:`mt-1`,children:e(`loginDesc`)})]})]})}),(0,G.jsxs)(xS.Content,{className:`space-y-5 px-6 py-7 sm:px-8 sm:py-8`,children:[(0,G.jsxs)(Hj,{name:`console-password`,className:`w-full`,isInvalid:!!m,children:[(0,G.jsx)(kM,{children:e(`loginPassword`)}),(0,G.jsxs)(zj,{children:[(0,G.jsx)(zj.Input,{id:`console-password`,type:u?`text`:`password`,value:c,onChange:e=>l(e.target.value),placeholder:e(`loginPasswordPh`),autoComplete:`current-password`,autoFocus:!0,"aria-label":e(`loginPassword`),spellCheck:!1}),(0,G.jsx)(zj.Suffix,{children:(0,G.jsx)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,type:`button`,"aria-label":e(u?`hidePassword`:`showPassword`),onPress:()=>d(e=>!e),children:u?(0,G.jsx)(Ji,{size:16}):(0,G.jsx)(Ki,{size:16})})})]})]}),m?(0,G.jsx)(vI,{title:m}):(0,G.jsx)(`p`,{className:`text-caption text-muted`,children:e(`loginHint`)}),(0,G.jsxs)(J,{type:`submit`,fullWidth:!0,size:`lg`,isPending:f,children:[e(f?`loggingInConsole`:`loginSubmit`),f?null:(0,G.jsx)(ei,{size:17})]})]})]})})})]})]})}function N9(){return QF(`/api/keys`)}function QTe(e){return QF(`/api/keys`,{method:`POST`,body:JSON.stringify(e)})}function P9(e,t){return QF(`/api/keys/${encodeURIComponent(e)}`,{method:`PATCH`,body:JSON.stringify(t)})}function $Te(e){return QF(`/api/keys/${encodeURIComponent(e)}`,{method:`DELETE`})}function eEe(){return QF(`/api/system/console-key`)}function tEe(){return QF(`/api/system/console-key`,{method:`POST`,body:JSON.stringify({rotate:!0})})}function nEe({settings:e,onSaved:t}){let{t:n}=GF(),r=at(),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)({}),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(``);(0,v.useEffect)(()=>{let e=!0;return cI().then(t=>{e&&a((t.data||[]).filter(e=>e.regions.some(e=>e.checkin)))}).catch(t=>{e&&d(String(t))}),()=>{e=!1}},[]);async function f(n,r){if(!(!e||r===e.checkin_times[n])){l(!0),d(``);try{t(await bI({checkin_times:{[n]:r}}))}catch(e){d(e instanceof Error?e.message:String(e))}finally{s(e=>{let t={...e};return delete t[n],t}),l(!1)}}}return(0,G.jsxs)(xS,{"data-gsap-reveal":!0,children:[(0,G.jsxs)(xS.Header,{children:[(0,G.jsx)(xS.Title,{children:n(`checkinDefaultsTitle`)}),(0,G.jsx)(xS.Description,{children:n(`checkinDefaultsHint`)})]}),(0,G.jsxs)(xS.Content,{className:`space-y-4`,children:[u?(0,G.jsx)(vI,{title:u}):null,!e||!i?(0,G.jsx)(Q,{className:`h-24 w-full`}):i.map(t=>(0,G.jsx)(u9,{label:t.label,hint:t.regions.filter(e=>e.checkin).map(t=>`${t.label} · ${t.checkin?.timezone===`Local`?e.timezone:t.checkin?.timezone}`).join(` / `),children:(0,G.jsx)(Ij,{type:`time`,value:o[t.id]??e.checkin_times[t.id]??``,disabled:c,"aria-label":`${t.label} ${n(`autoCheckinTime`)}`,onChange:e=>s(n=>({...n,[t.id]:e.target.value})),onBlur:e=>void f(t.id,e.target.value)})},t.id))]}),(0,G.jsx)(xS.Footer,{children:(0,G.jsx)(J,{variant:`secondary`,onPress:()=>r(`/accounts`),children:n(`navAccounts`)})})]})}function rEe(e,t){if(!e)return``;let n=new Date(e);return Number.isNaN(n.getTime())?``:n.toLocaleDateString(t===`zh`?`zh-CN`:`en-US`,{year:`numeric`,month:`short`,day:`numeric`})}function iEe({releases:e,currentVersion:t,nextVersion:n,rollbackTags:r,canRollback:i,submitting:a,onRestore:o}){let{t:s,lang:c}=GF();if(!e.length)return null;let l=n&&n!==t?n:t,u=e.some(e=>e.tag_name===l)?l:e[0]?.tag_name,d=new Set(r);return(0,G.jsxs)(`div`,{className:`mt-5`,children:[(0,G.jsx)(`div`,{className:`mb-2`,children:(0,G.jsx)(`p`,{className:`text-caption font-medium text-foreground`,children:s(`versionHistory`)})}),(0,G.jsx)(yh,{className:`rounded-lg bg-surface-secondary`,hideSeparator:!0,defaultExpandedKeys:u?[u]:[],children:e.map(e=>{let r=e.tag_name,l=r===t,u=!!(n&&r===n&&n!==t),f=i&&d.has(r)&&!l,p=rEe(e.published_at,c);return(0,G.jsxs)(yh.Item,{id:r,children:[(0,G.jsx)(yh.Heading,{children:(0,G.jsxs)(yh.Trigger,{className:`items-center gap-3 px-3 py-2.5 text-left`,children:[(0,G.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`mono text-body font-semibold`,children:r}),l?(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:`success`,children:s(`versionCurrentBadge`)}):null,u?(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:`warning`,children:s(`versionLatestBadge`)}):null,p?(0,G.jsx)(`span`,{className:`truncate text-caption text-muted`,children:p}):null]}),(0,G.jsx)(yh.Indicator,{})]})}),(0,G.jsx)(yh.Panel,{children:(0,G.jsxs)(yh.Body,{className:`px-3 pb-3`,children:[(0,G.jsx)(`div`,{className:`release-notes-box release-notes-box--compact`,children:(0,G.jsx)(TI,{markdown:CI(e.body,c),emptyLabel:s(`updateNoNotes`)})}),f?(0,G.jsx)(`div`,{className:`mt-3 flex justify-end`,children:(0,G.jsx)(J,{size:`sm`,variant:`ghost`,isDisabled:a,onPress:()=>o(r),children:s(`restoreThisVersion`)})}):null]})})]},r)})})]})}function F9(e){let t=new Set,n=[];for(let r of e){let e=r.tag_name?.trim();!e||t.has(e)||(t.add(e),n.push({...r,tag_name:e}))}return n}function aEe(e,t,n,r,i){return r?.length?F9(r):F9([...n?[n]:t?[{tag_name:t}]:[],...e?[{tag_name:e}]:[],...i||[]])}var oEe=[`general`,`routing`,`security`,`updates`];function sEe(){let{t:e}=GF(),[t,n]=On(),r=t.get(`tab`),i=r&&oEe.includes(r)?r:`general`,a=e=>n(e===`general`?{}:{tab:e},{replace:!0}),{setApiKey:o}=JF(),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(``),[p,m]=(0,v.useState)(!1),[h,g]=(0,v.useState)(!1),[_,y]=(0,v.useState)(!1),[b,x]=(0,v.useState)(``),[S,C]=(0,v.useState)(!1),[w,T]=(0,v.useState)(``),E=SI(),{info:D,loading:O,checking:k,submitting:A,error:j,setError:M,load:N,canRollback:P,rollbackTo:F}=E,I=(0,v.useMemo)(()=>aEe(D?.current_version||``,D?.next_version,D?.release,D?.recent_releases,D?.rollback_versions),[D?.current_version,D?.next_version,D?.release,D?.recent_releases,D?.rollback_versions]),L=(0,v.useMemo)(()=>(D?.rollback_versions||[]).map(e=>e.tag_name),[D?.rollback_versions]);(0,v.useEffect)(()=>{let e=window.setTimeout(()=>{eEe().then(c).catch(()=>void 0),yI().then(e=>{u(e),f(e.proxy_url||``)}).catch(e=>M(e instanceof Error?e.message:String(e)))},0);return()=>window.clearTimeout(e)},[M]);async function R(e){let t=l?.cross_provider_model_pool??!0;u(t=>t&&{...t,cross_provider_model_pool:e}),m(!0),M(``);try{u(await bI({cross_provider_model_pool:e}))}catch(e){u(e=>e&&{...e,cross_provider_model_pool:t}),M(e instanceof Error?e.message:String(e))}finally{m(!1)}}async function z(e){let t=l?.checkin_disabled_accounts??!1;u(t=>t&&{...t,checkin_disabled_accounts:e}),m(!0),M(``);try{u(await bI({checkin_disabled_accounts:e}))}catch(e){u(e=>e&&{...e,checkin_disabled_accounts:t}),M(e instanceof Error?e.message:String(e))}finally{m(!1)}}async function B(e){let t=l?.proxy_url||``;if(e===t){f(t);return}let n=d;f(e),u(t=>t&&{...t,proxy_url:e}),m(!0),M(``);try{let t=await bI({proxy_url:e});u(t),f(t.proxy_url||``)}catch(e){f(n),u(e=>e&&{...e,proxy_url:t}),M(e instanceof Error?e.message:String(e))}finally{m(!1)}}async function V(e){let t=l?.routing_strategy||`round-robin`;u(t=>t&&{...t,routing_strategy:e}),m(!0),M(``);try{u(await bI({routing_strategy:e}))}catch(e){u(e=>e&&{...e,routing_strategy:t}),M(e instanceof Error?e.message:String(e))}finally{m(!1)}}return O&&!D?(0,G.jsx)(Gce,{}):(0,G.jsxs)(`div`,{className:`space-y-6`,children:[(0,G.jsxs)(`section`,{className:`flex flex-wrap items-end justify-between gap-4 pb-4`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h2`,{"data-gsap-reveal":!0,className:`text-title font-semibold`,children:e(`systemSettingsTitle`)}),(0,G.jsx)(`p`,{className:`mt-1 max-w-2xl text-body leading-6 text-muted`,children:e(`systemSettingsLead`)})]}),(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,isPending:k,onPress:()=>void N(!0),children:[(0,G.jsx)(Qr,{size:15}),e(`checkUpdates`)]})]}),j?(0,G.jsx)(vI,{title:j}):null,(0,G.jsxs)(EA,{selectedKey:i,onSelectionChange:e=>a(String(e)),children:[(0,G.jsx)(EA.ListContainer,{className:`w-fit max-w-full overflow-x-auto`,children:(0,G.jsxs)(EA.List,{"aria-label":e(`systemSettingsTitle`),children:[(0,G.jsxs)(TA,{id:`general`,className:`gap-1.5 whitespace-nowrap`,children:[(0,G.jsx)(EA.Indicator,{}),(0,G.jsx)(na,{size:13}),e(`settingsTabGeneral`)]}),(0,G.jsxs)(TA,{id:`routing`,className:`gap-1.5 whitespace-nowrap`,children:[(0,G.jsx)(EA.Indicator,{}),(0,G.jsx)(ci,{size:13}),e(`settingsTabRouting`)]}),(0,G.jsxs)(TA,{id:`security`,className:`gap-1.5 whitespace-nowrap`,children:[(0,G.jsx)(EA.Indicator,{}),(0,G.jsx)(Ia,{size:13}),e(`settingsTabSecurity`)]}),(0,G.jsxs)(TA,{id:`updates`,className:`gap-1.5 whitespace-nowrap`,children:[(0,G.jsx)(EA.Indicator,{}),(0,G.jsx)(Xr,{size:13}),e(`settingsTabUpdates`)]})]})}),(0,G.jsx)(EA.Panel,{id:`general`,className:`pt-5`,children:(0,G.jsxs)(`div`,{className:`grid gap-5 xl:grid-cols-2 items-start`,children:[(0,G.jsxs)(xS,{"data-gsap-reveal":!0,children:[(0,G.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,G.jsx)(`div`,{className:`grid size-8 shrink-0 place-items-center rounded-lg bg-surface-secondary text-foreground`,children:(0,G.jsx)(Ha,{size:15})}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:e(`proxySettingsTitle`)}),(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:e(`proxySettingsHint`)})]})]}),(0,G.jsxs)(`div`,{className:`mt-4 space-y-1.5`,children:[(0,G.jsx)(kM,{className:`text-body font-medium text-muted`,children:e(`proxyUrl`)}),(0,G.jsx)(Ij,{value:d,onChange:e=>f(e.target.value),onBlur:e=>void B(e.target.value.trim()),placeholder:e(`proxyUrlPlaceholder`),disabled:p||!l}),(0,G.jsx)(jM,{className:`text-caption leading-5 text-muted`,children:e(`proxyUrlHint`)})]})]}),(0,G.jsxs)(xS,{"data-gsap-reveal":!0,children:[(0,G.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,G.jsx)(`div`,{className:`grid size-8 shrink-0 place-items-center rounded-lg bg-surface-secondary text-foreground`,children:(0,G.jsx)(Oi,{size:15})}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:e(`checkinDisabledAccountsTitle`)}),(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:e(`checkinDisabledAccountsHint`)})]})]}),(0,G.jsx)(s7,{isSelected:l?.checkin_disabled_accounts??!1,isDisabled:p||!l,ariaLabel:e(`checkinDisabledAccountsAriaLabel`),onChange:e=>void z(e)})]}),(0,G.jsxs)(`div`,{className:`mt-4 flex items-center justify-between pt-3 text-caption text-muted`,children:[(0,G.jsx)(`span`,{children:e(`checkinDisabledAccountsStatus`)}),(0,G.jsx)(`span`,{className:`font-medium text-foreground`,children:l?.checkin_disabled_accounts?e(`enabled`):e(`disabled`)})]})]}),(0,G.jsx)(nEe,{settings:l,onSaved:u})]})}),(0,G.jsx)(EA.Panel,{id:`routing`,className:`pt-5`,children:(0,G.jsxs)(`div`,{className:`grid gap-5 xl:grid-cols-2 items-start`,children:[(0,G.jsxs)(xS,{"data-gsap-reveal":!0,children:[(0,G.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,G.jsx)(`div`,{className:`grid size-8 shrink-0 place-items-center rounded-lg bg-surface-secondary text-foreground`,children:(0,G.jsx)(Ha,{size:15})}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:e(`routingStrategyTitle`)}),(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:e(`routingStrategyHint`)})]})]}),(0,G.jsx)(`div`,{className:`mt-4 pt-4`,children:(0,G.jsx)(u9,{label:e(`routingStrategy`),children:(0,G.jsxs)(UP,{fullWidth:!0,"aria-label":e(`routingStrategy`),value:l?.routing_strategy||`round-robin`,isDisabled:p||!l,onChange:e=>{typeof e==`string`&&e&&V(e)},children:[(0,G.jsxs)(UP.Trigger,{className:`items-center`,children:[(0,G.jsx)(UP.Value,{className:`min-w-0 truncate`}),(0,G.jsx)(UP.Indicator,{})]}),(0,G.jsx)(UP.Popover,{children:(0,G.jsxs)(yP,{children:[(0,G.jsxs)(yP.Item,{id:`round-robin`,textValue:`round-robin`,children:[(0,G.jsx)(kM,{children:e(`routingRoundRobin`)}),(0,G.jsx)(yP.ItemIndicator,{})]}),(0,G.jsxs)(yP.Item,{id:`weighted-round-robin`,textValue:`weighted-round-robin`,children:[(0,G.jsx)(kM,{children:e(`routingWeightedRoundRobin`)}),(0,G.jsx)(yP.ItemIndicator,{})]}),(0,G.jsxs)(yP.Item,{id:`fill-first`,textValue:`fill-first`,children:[(0,G.jsx)(kM,{children:e(`routingFillFirst`)}),(0,G.jsx)(yP.ItemIndicator,{})]}),(0,G.jsxs)(yP.Item,{id:`fefo`,textValue:`fefo`,children:[(0,G.jsx)(kM,{children:e(`routingFEFO`)}),(0,G.jsx)(yP.ItemIndicator,{})]})]})})]})})}),(0,G.jsxs)(`div`,{className:`mt-4 grid grid-cols-2 gap-2 pt-3 text-caption text-muted sm:grid-cols-4`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`mono block text-body font-medium text-foreground`,children:l?.session_affinity?.ttl_seconds?`${Math.round(l.session_affinity.ttl_seconds/60)}m`:`—`}),e(`sessionAffinityTTL`)]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`mono block text-body font-medium text-foreground`,children:l?.session_affinity?.hits??0}),e(`sessionAffinityHits`)]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`mono block text-body font-medium text-foreground`,children:l?.session_affinity?.misses??0}),e(`sessionAffinityMisses`)]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`mono block text-body font-medium text-foreground`,children:l?.session_affinity?.escapes??0}),e(`sessionAffinityEscapes`)]})]}),l?.session_affinity?.last_escape_reason?(0,G.jsxs)(jM,{className:`mt-3 text-caption`,children:[e(`lastSessionEscape`),`: `,l.session_affinity.last_escape_reason]}):null,l?.session_affinity?.last_miss_reason?(0,G.jsxs)(jM,{className:`mt-1 text-caption`,children:[e(`lastSessionMiss`),`: `,l.session_affinity.last_miss_reason]}):null]}),(0,G.jsxs)(xS,{"data-gsap-reveal":!0,children:[(0,G.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,G.jsx)(`div`,{className:`grid size-8 shrink-0 place-items-center rounded-lg bg-surface-secondary text-foreground`,children:(0,G.jsx)(Ha,{size:15})}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:e(`crossProviderModelPoolTitle`)}),(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:e(`crossProviderModelPoolHint`)})]})]}),(0,G.jsx)(s7,{isSelected:l?.cross_provider_model_pool??!0,isDisabled:p||!l,ariaLabel:e(`crossProviderModelPoolAriaLabel`),onChange:e=>void R(e)})]}),(0,G.jsxs)(`div`,{className:`mt-4 flex items-center justify-between pt-3 text-caption text-muted`,children:[(0,G.jsx)(`span`,{children:e(`crossProviderModelPoolStatus`)}),(0,G.jsx)(`span`,{className:`font-medium text-foreground`,children:l?.cross_provider_model_pool?e(`enabled`):e(`disabled`)})]})]})]})}),(0,G.jsx)(EA.Panel,{id:`security`,className:`pt-5`,children:(0,G.jsxs)(`div`,{className:`grid gap-5 xl:grid-cols-2 items-start`,children:[(0,G.jsxs)(xS,{"data-gsap-reveal":!0,children:[(0,G.jsx)(`div`,{className:`flex items-start justify-between gap-4`,children:(0,G.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,G.jsx)(`div`,{className:`grid size-8 shrink-0 place-items-center rounded-lg bg-surface-secondary text-foreground`,children:(0,G.jsx)(ua,{size:15})}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:e(`consoleKeyTitle`)}),(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:e(`consoleKeyHint`)})]})]})}),(0,G.jsx)(`code`,{className:`mono mt-4 block rounded-lg bg-surface-secondary px-3 py-2 text-caption text-muted`,children:s?.prefix||`—`}),(0,G.jsx)(`p`,{className:`mt-3 text-caption leading-5 text-muted`,children:e(`consoleKeyLead`)}),(0,G.jsx)(`div`,{className:`mt-4 flex justify-end`,children:(0,G.jsx)(J,{size:`sm`,variant:`ghost`,isPending:h,onPress:()=>y(!0),children:e(`consoleKeyRotate`)})})]}),(0,G.jsxs)(xS,{"data-gsap-reveal":!0,children:[(0,G.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,G.jsx)(`div`,{className:`grid size-8 shrink-0 place-items-center rounded-lg bg-surface-secondary text-foreground`,children:(0,G.jsx)(Hi,{size:15})}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:e(`sqliteProtection`)}),(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:e(`sqliteProtectionHint`)})]})]}),(0,G.jsx)(Ia,{size:18,className:`text-success`})]}),(0,G.jsx)(`div`,{className:`mono mt-4 rounded-lg bg-surface-secondary px-3 py-2 text-caption text-muted`,children:`/data`}),(0,G.jsxs)(`div`,{className:`mt-3 grid gap-2 text-caption text-muted`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(Oi,{size:14,className:`text-muted`}),e(`sqliteBackupBeforeUpdate`)]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(Oi,{size:14,className:`text-muted`}),e(`sqliteKeepFive`)]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(Oi,{size:14,className:`text-muted`}),e(`sqliteRollbackTogether`)]})]})]})]})}),(0,G.jsx)(EA.Panel,{id:`updates`,className:`pt-5`,children:(0,G.jsx)(`div`,{className:`grid gap-5`,children:(0,G.jsxs)(xS,{"data-gsap-reveal":!0,className:`overflow-hidden p-0`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-separator px-5 py-4`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:e(`versionUpdate`)}),(0,G.jsx)(`p`,{className:`mt-0.5 text-caption text-muted`,children:e(`latestVersionHint`)})]}),(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:D?.has_update?`warning`:`success`,children:D?.has_update?e(`updateAvailable`):e(`upToDate`)})]}),(0,G.jsxs)(`div`,{className:`px-5 py-5`,children:[(0,G.jsx)(_I,{update:E}),(0,G.jsx)(iEe,{releases:I,currentVersion:D?.current_version||``,nextVersion:D?.next_version,rollbackTags:L,canRollback:P,submitting:A,onRestore:T})]})]})})})]}),(0,G.jsx)(A9,{isOpen:!!w,title:e(`restoreVersionTitle`,{version:w}),description:e(`restoreVersionHint`),confirmLabel:e(`restoreThisVersion`),cancelLabel:e(`cancel`),closeLabel:e(`close`),isPending:A,status:`warning`,confirmVariant:`primary`,onClose:()=>{A||T(``)},onConfirm:()=>{let e=w;T(``),F(e)}}),(0,G.jsx)(Y.Root,{isOpen:_,onOpenChange:e=>{!e&&!h&&y(!1)},children:(0,G.jsx)(Y.Backdrop,{variant:`blur`,isDismissable:!h,children:(0,G.jsx)(Y.Container,{placement:`center`,size:`sm`,children:(0,G.jsxs)(Y.Dialog,{children:[(0,G.jsxs)(Y.Header,{className:`items-start justify-between gap-4`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(Y.Heading,{className:`text-section font-semibold`,children:e(`consoleKeyRotate`)}),(0,G.jsx)(`p`,{className:`mt-1 text-caption leading-5 text-muted`,children:e(`consoleKeyRotateHint`)})]}),(0,G.jsx)(Y.CloseTrigger,{isDisabled:h,"aria-label":e(`close`),className:`grid size-8 place-items-center rounded-lg text-muted hover:bg-surface-secondary`,children:(0,G.jsx)(yo,{size:16})})]}),(0,G.jsxs)(Y.Footer,{className:`justify-end`,children:[(0,G.jsx)(J,{variant:`ghost`,isDisabled:h,onPress:()=>y(!1),children:e(`cancel`)}),(0,G.jsx)(J,{variant:`danger`,isPending:h,onPress:()=>{g(!0),tEe().then(e=>{c(e),x(e.secret||``),e.secret&&o(e.secret),y(!1)}).catch(e=>{M(e instanceof Error?e.message:String(e))}).finally(()=>g(!1))},children:e(`consoleKeyRotateNow`)})]})]})})})}),(0,G.jsx)(Y.Root,{isOpen:!!b,onOpenChange:e=>{e||x(``)},children:(0,G.jsx)(Y.Backdrop,{variant:`blur`,children:(0,G.jsx)(Y.Container,{placement:`center`,size:`lg`,children:(0,G.jsxs)(Y.Dialog,{children:[(0,G.jsxs)(Y.Header,{className:`items-start justify-between gap-4 px-6 pt-6`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(Y.Heading,{className:`text-section font-semibold`,children:e(`consoleKeySecretTitle`)}),(0,G.jsx)(`p`,{className:`mt-1.5 text-body leading-6 text-muted`,children:e(`consoleKeySecretHint`)})]}),(0,G.jsx)(Y.CloseTrigger,{"aria-label":e(`close`),className:`grid size-9 place-items-center rounded-lg text-muted hover:bg-surface-secondary`,children:(0,G.jsx)(yo,{size:18})})]}),(0,G.jsx)(Y.Body,{className:`px-6 pb-2`,children:(0,G.jsx)(`code`,{className:`mono block break-all rounded-lg bg-surface-secondary px-3 py-3 text-body`,children:b})}),(0,G.jsxs)(Y.Footer,{className:`justify-end`,children:[(0,G.jsx)(J,{variant:`ghost`,onPress:()=>x(``),children:e(`close`)}),(0,G.jsxs)(J,{onPress:()=>{U7(b),C(!0),window.setTimeout(()=>C(!1),1200)},children:[(0,G.jsx)(Ii,{size:14}),e(S?`copied`:`copy`)]})]})]})})})})]})}var I9=`__all__`;function cEe(e,t){let n=t.trim().toLowerCase();return!n||e.label.toLowerCase().includes(n)||e.id.toLowerCase().includes(n)}function L9({value:e,onChange:t,ariaLabel:n,options:r,allLabel:i,searchPlaceholder:a,emptyLabel:o,loadOptions:s,className:c}){let[l,u]=(0,v.useState)(``),[d,f]=(0,v.useState)([]),[p,m]=(0,v.useState)(!1);(0,v.useEffect)(()=>{if(!s)return;let e=!1,t=window.setTimeout(()=>{m(!0),s(l.trim()).then(t=>{e||f(t)}).catch(()=>{e||f([])}).finally(()=>{e||m(!1)})},l.trim()?280:0);return()=>{e=!0,window.clearTimeout(t)}},[s,l]);let h=e||I9,g=(0,v.useMemo)(()=>{let t=s?d:r.filter(e=>cEe(e,l)),n=new Map;l.trim()||n.set(I9,{id:I9,label:i});for(let e of t)!e.id||e.id===I9||n.set(e.id,e);if(e){let t=r.find(t=>t.id===e)||d.find(t=>t.id===e)||{id:e,label:e};n.set(e,t)}return[...n.values()]},[i,s,r,l,d,e]),_=g.find(e=>e.id===h)||(e?{id:e,label:e}:{id:I9,label:i});return(0,G.jsxs)(fS,{className:[`w-fit`,c].filter(Boolean).join(` `),"aria-label":n,value:h,onChange:e=>{typeof e==`string`&&(t(e===I9?``:e),u(``))},onClear:()=>{t(``),u(``)},children:[(0,G.jsxs)(fS.Trigger,{className:`min-w-44 items-center`,children:[(0,G.jsx)(fS.Value,{className:`min-w-0 truncate`,children:({defaultChildren:e,isPlaceholder:t})=>t?e:(0,G.jsx)(`span`,{className:`truncate`,children:_.label})}),e?(0,G.jsx)(fS.ClearButton,{}):null,(0,G.jsx)(fS.Indicator,{})]}),(0,G.jsx)(fS.Popover,{className:`min-w-56`,children:(0,G.jsxs)(fS.Filter,{inputValue:l,onInputChange:u,filter:()=>!0,children:[(0,G.jsx)(DM,{"aria-label":a,className:`px-2 pt-2`,autoFocus:!0,children:(0,G.jsxs)(DM.Group,{children:[(0,G.jsx)(DM.SearchIcon,{}),(0,G.jsx)(DM.Input,{placeholder:a}),(0,G.jsx)(DM.ClearButton,{})]})}),(0,G.jsx)(yP,{children:g.length===0?(0,G.jsx)(yP.Item,{id:`__empty__`,textValue:o,isDisabled:!0,children:(0,G.jsx)(kM,{className:`block truncate text-muted`,children:p?a:o})}):g.map(e=>(0,G.jsxs)(yP.Item,{id:e.id,textValue:e.label,children:[(0,G.jsx)(kM,{className:`block truncate`,children:e.label}),e.id!==I9&&e.id!==e.label?(0,G.jsx)(`span`,{className:`mono mt-0.5 block truncate text-caption text-muted`,children:e.id}):null,(0,G.jsx)(yP.ItemIndicator,{})]},e.id))})]})})]})}function R9(){let[e,t]=(0,v.useState)([]);return(0,v.useEffect)(()=>{let e=!1;return N9().then(n=>{e||t(n.data||[])}).catch(()=>{}),()=>{e=!0}},[]),{keys:e,nameById:(0,v.useMemo)(()=>{let t=new Map;for(let n of e)t.set(n.id,n.name||n.id);return t},[e]),options:(0,v.useMemo)(()=>e.map(e=>({id:e.id,label:e.name||e.id})),[e])}}function z9(e){return e===`ok`?`success`:e===`streaming`||e===`started`||e===`incomplete`?`warning`:e===`error`||e===`canceled`?`danger`:`default`}function lEe(e){if(e===`error`)return`danger`;if(e!==`warn`)return`ok`}function uEe(e){return e===`error`?`danger`:e===`warn`?`warning`:e===`info`?`success`:`default`}function B9(e,t=`zh`){if(!e)return`—`;let n=new Date(e);return Number.isFinite(n.getTime())?new Intl.DateTimeFormat(t===`zh`?`zh-CN`:`en-US`,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1}).format(n):e}function V9(e){let t=e.requested_reasoning?.trim()||``,n=e.resolved_reasoning?.trim()||``;return!t&&!n?``:t&&n&&t!==n?`${t} → ${n}`:n||t}function H9({log:e,inLabel:t,outLabel:n,pointsLabel:r}){let i=e.prompt_tokens,a=e.completion_tokens,o=e.credits??e.usage_detail?.credit,s=o!=null&&Number.isFinite(o)?U9(o):null;return i==null&&a==null&&s==null?(0,G.jsx)(`span`,{className:`mono text-xs text-muted`,children:`—`}):(0,G.jsxs)(`div`,{className:`leading-4`,children:[i!=null||a!=null?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{className:`mono text-xs`,children:[i??0,` / `,a??0]}),(0,G.jsxs)(`div`,{className:`mt-0.5 text-caption text-muted`,children:[t,` / `,n]})]}):null,s==null?null:(0,G.jsx)(`div`,{className:`mono text-caption text-success ${i!=null||a!=null?`mt-0.5`:``}`,children:r?r(s):s})]})}function dEe(){return(0,G.jsxs)(`div`,{className:`space-y-5`,"aria-busy":`true`,"aria-live":`polite`,children:[(0,G.jsx)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:Array.from({length:8},(e,t)=>(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsx)(Q,{className:`h-3 w-20`}),(0,G.jsx)(Q,{className:`h-5 w-36 max-w-full`})]},t))}),(0,G.jsxs)(`div`,{className:`space-y-3 rounded-lg bg-surface-secondary px-3 py-3`,children:[(0,G.jsx)(Q,{className:`h-3 w-24`}),(0,G.jsx)(Q,{className:`h-4 w-full`}),(0,G.jsx)(Q,{className:`h-4 w-4/5`})]}),(0,G.jsxs)(`div`,{className:`space-y-3`,children:[(0,G.jsx)(Q,{className:`h-3 w-20`}),(0,G.jsx)(Q,{className:`h-16 w-full`})]})]})}function U9(e){return e==null||!Number.isFinite(e)?`—`:String(Math.round(e*1e4)/1e4)}var fEe=[`all`,`ok`,`incomplete`,`error`,`canceled`],pEe=[`all`,`quota`,`rate_limit`,`auth`,`not_ready`,`unavailable`,`invalid_request`,`model_not_available`],mEe=[`all`,`1h`,`24h`,`7d`,`custom`];function W9(e){let t=(e,t,n)=>t.includes(e??``)?e:n,n=EV(e.get(`from`)),r=EV(e.get(`to`)),i=n&&r?{start:n,end:r}:null,a=e.get(`stream`);return{requestFilter:t(e.get(`status`),fEe,`all`),requestId:e.get(`id`)??``,accountFilter:e.get(`account`)??``,apiKeyFilter:e.get(`api_key`)??``,modelFilter:e.get(`model`)??``,providerFilter:e.get(`provider`)??``,streamFilter:a===`stream`||a===`true`?`stream`:a===`sync`||a===`false`?`sync`:`all`,errorKind:t(e.get(`error_kind`),pEe,`all`),timeRange:i?`custom`:t(e.get(`range`),mEe,`1h`),customRange:i}}function hEe(e){let t=new URLSearchParams;e.requestFilter!==`all`&&t.set(`status`,e.requestFilter),e.requestId&&t.set(`id`,e.requestId),e.accountFilter&&t.set(`account`,e.accountFilter),e.apiKeyFilter&&t.set(`api_key`,e.apiKeyFilter),e.modelFilter&&t.set(`model`,e.modelFilter),e.providerFilter&&t.set(`provider`,e.providerFilter),e.streamFilter!==`all`&&t.set(`stream`,e.streamFilter),e.errorKind!==`all`&&t.set(`error_kind`,e.errorKind);let n=e.timeRange===`custom`?TV(e.customRange?.start):void 0,r=e.timeRange===`custom`?TV(e.customRange?.end,!0):void 0;return n&&r?(t.set(`from`,n),t.set(`to`,r)):e.timeRange!==`1h`&&t.set(`range`,e.timeRange),t.toString()}function gEe(e){if(e===`all`||e===`custom`)return{from:void 0,to:void 0};let t=new Date,n=new Date(t);return e===`1h`&&n.setHours(n.getHours()-1),e===`24h`&&n.setHours(n.getHours()-24),e===`7d`&&n.setDate(n.getDate()-7),{from:n.toISOString(),to:t.toISOString()}}function _Ee(){let{t:e,lang:t}=GF(),[n,r]=On(),[i]=(0,v.useState)(()=>W9(new URLSearchParams(window.location.search))),[a,o]=(0,v.useState)([]),[s,c]=(0,v.useState)([]),[l,u]=(0,v.useState)(`requests`),[d,f]=(0,v.useState)(!0),[p,m]=(0,v.useState)(!1),[h,g]=(0,v.useState)(``),[_,y]=(0,v.useState)(i.requestFilter),[b,x]=(0,v.useState)(`all`),[S,C]=(0,v.useState)(i.requestId),[w,T]=(0,v.useState)(``),[E,D]=(0,v.useState)(i.accountFilter),[O,k]=(0,v.useState)(i.apiKeyFilter),[A,j]=(0,v.useState)(``),[M,N]=(0,v.useState)(i.modelFilter),[P,F]=(0,v.useState)(i.providerFilter),[I,L]=(0,v.useState)(i.streamFilter),[R,z]=(0,v.useState)(i.errorKind),[B,V]=(0,v.useState)(i.timeRange),[H,ee]=(0,v.useState)(i.customRange),[te,ne]=(0,v.useState)(1),[re,ie]=(0,v.useState)(50),[ae,oe]=(0,v.useState)(1),[se,ce]=(0,v.useState)(50),[le,ue]=(0,v.useState)([]),[de,fe]=(0,v.useState)(0),[pe,me]=(0,v.useState)([]),[he,ge]=(0,v.useState)(0),[_e,ve]=(0,v.useState)(null),[ye,be]=(0,v.useState)(!1),[xe,Se]=(0,v.useState)(null),[Ce,we]=(0,v.useState)(!1),[Te,Ee]=(0,v.useState)(!1),[De,Oe]=(0,v.useState)(``),ke=(0,v.useRef)(0),[Ae,je]=(0,v.useState)(!1),[Me,Ne]=(0,v.useState)(!1),Pe=n.toString(),Fe=hEe({requestFilter:_,requestId:S,accountFilter:E,apiKeyFilter:O,modelFilter:M,providerFilter:P,streamFilter:I,errorKind:R,timeRange:B,customRange:H}),Ie=(0,v.useRef)(Pe);(0,v.useEffect)(()=>{if(Pe===Ie.current)return;Ie.current=Pe;let e=W9(new URLSearchParams(Pe));y(e.requestFilter),C(e.requestId),D(e.accountFilter),k(e.apiKeyFilter),N(e.modelFilter),F(e.providerFilter),L(e.streamFilter),z(e.errorKind),V(e.timeRange),ee(e.customRange)},[Pe]),(0,v.useEffect)(()=>{Fe!==Ie.current&&(Ie.current=Fe,r(Fe,{replace:!0}))},[Fe,r]),(0,v.useEffect)(()=>{let e=!1;return Promise.allSettled([$F(!1),oI()]).then(([t,n])=>{e||(t.status===`fulfilled`&&o(t.value.data||[]),n.status===`fulfilled`&&c(n.value.data||[]))}),()=>{e=!0}},[]);let Le=(0,v.useMemo)(()=>{let e=new Map;for(let t of a||[])e.set(t.id,t.name||t.id);return e},[a]),Re=(0,v.useMemo)(()=>{let e=new Map;for(let t of a||[])e.set(t.id,{provider:t.provider,region:t.region});return e},[a]);function ze(t){let n=t.account_id?Re.get(t.account_id):void 0,r=t.provider||n?.provider;return r?UV(r,n?.region,e):`—`}function Be(t){switch(t){case`pin`:return e(`logsRouting_pin`);case`sticky`:return e(`logsRouting_sticky`);case`sticky_escape`:return e(`logsRouting_sticky_escape`);default:return e(`logsRouting_pool`)}}let Ve=(0,v.useMemo)(()=>(a||[]).map(e=>({id:e.id,label:e.name||e.id})),[a]),{nameById:He,options:Ue}=R9();function We(e){let t=e.api_key_id?.trim();return t?He.get(t)||t:`—`}let Ge=(0,v.useMemo)(()=>{let t=new Set;for(let e of a||[])e.provider&&t.add(e.provider);return P&&t.add(P),[{id:``,label:e(`logsFilterProviderAll`)},...[...t].sort().map(t=>({id:t,label:HV(t,e)}))]},[a,P,e]),Ke=(0,v.useMemo)(()=>{let e=new Map;for(let t of s||[])e.has(t.id)||e.set(t.id,{id:t.id,label:t.display_name||t.id});return[...e.values()]},[s]),qe=(0,v.useCallback)(async e=>((await lV({q:e||void 0,limit:20,offset:0})).items||[]).map(e=>({id:e.id,label:e.id})),[]),Je=!!(S||_!==`all`||E||O||M||P||I!==`all`||R!==`all`||B!==`1h`),Ye=[_,S,E,O,M,P,I,R,B,H?.start?.toString()??``,H?.end?.toString()??``,re].join(`\0`),Xe=[b,w,A,se].join(`\0`),[Ze,Qe]=(0,v.useState)(Ye),[$e,et]=(0,v.useState)(Xe);Ze!==Ye&&(Qe(Ye),ne(1)),$e!==Xe&&(et(Xe),oe(1));let tt=Math.max(1,Math.ceil(de/re)),nt=Math.min(Ze===Ye?Math.max(1,te):1,tt);te!==nt&&ne(nt);let rt=Math.max(1,Math.ceil(he/se)),it=Math.min($e===Xe?Math.max(1,ae):1,rt);ae!==it&&oe(it);let at=(0,v.useCallback)(async(e=!1)=>{e||f(!0);try{let e=S?{from:void 0,to:void 0}:B===`custom`?{from:TV(H?.start),to:TV(H?.end,!0)}:gEe(B),t=await lV({status:_===`all`?void 0:_,id:S||void 0,account:E||void 0,api_key:O||void 0,model:M||void 0,provider:P||void 0,stream:I===`all`?void 0:I===`stream`,error_kind:R===`all`?void 0:R,from:e.from,to:e.to,limit:re,offset:(nt-1)*re});ue(t.items||[]),fe(t.total||0),g(``)}catch(t){e||g(t instanceof Error?t.message:String(t))}finally{e||(f(!1),m(!0))}},[_,S,E,O,M,P,I,R,B,H,nt,re]),ot=(0,v.useCallback)(async(e=!1)=>{e||f(!0);try{let e=await ule({level:b===`all`?void 0:b,q:w.trim()||void 0,account:A||void 0,limit:se,offset:(it-1)*se});me(e.items||[]),ge(e.total??0),g(``)}catch(t){e||g(t instanceof Error?t.message:String(t))}finally{e||(f(!1),m(!0))}},[b,w,A,it,se]),st=(0,v.useCallback)(async(e=!1)=>{l===`requests`?await at(e):await ot(e)},[l,at,ot]);(0,v.useEffect)(()=>{f(!0);let e=l===`runtime`&&w.trim()?280:0,t=window.setTimeout(()=>void st(!1),e);return()=>window.clearTimeout(t)},[st,l,w]),(0,v.useEffect)(()=>{if(l!==`runtime`||it!==1)return;let e=window.setInterval(()=>void ot(!0),3e3);return()=>window.clearInterval(e)},[l,it,ot]);let ct=de===0?0:(nt-1)*re+1,lt=Math.min(de,nt*re),ut=he===0?0:(it-1)*se+1,dt=Math.min(he,it*se),ft=(0,v.useMemo)(()=>l===`requests`?e(`logsShownTotal`,{shown:le.length?`${ct}–${lt}`:0,total:de}):e(`logsShownTotal`,{shown:pe.length?`${ut}–${dt}`:0,total:he}),[l,le.length,pe.length,ct,lt,de,ut,dt,he,e]);function pt(){C(``),y(`all`),D(``),k(``),N(``),F(``),L(`all`),z(`all`),V(`1h`),ee(null),ne(1)}async function mt(e){let t=++ke.current;Se(e),Oe(``),Ee(!0),we(!0);try{let n=await cle(e.id);if(ke.current!==t)return;Se(n)}catch(e){if(ke.current!==t)return;Oe(e instanceof Error?e.message:String(e))}finally{ke.current===t&&Ee(!1)}}function ht(e){ve(e),be(!0)}async function gt(){Ne(!0),sV({id:`logs-clear`,type:`loading`,title:e(`toastClearingLogs`)});try{await lle(),je(!1),await at(!1),sV({id:`logs-clear`,type:`success`,title:e(`toastLogsCleared`)})}catch(t){g(t instanceof Error?t.message:String(t)),sV({id:`logs-clear`,type:`error`,title:e(`toastFailed`),description:t instanceof Error?t.message:String(t)})}finally{Ne(!1)}}let _t=d&&(l===`requests`?le.length===0:pe.length===0);return d&&!p?(0,G.jsx)(Uce,{}):(0,G.jsxs)(`div`,{className:`space-y-6`,children:[(0,G.jsxs)(`section`,{className:`flex flex-wrap items-end justify-between gap-4 pb-4`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h2`,{className:`text-title font-semibold`,children:e(`navLogs`)}),(0,G.jsx)(`p`,{className:`mt-1 max-w-2xl text-body leading-6 text-muted`,children:e(`logsLead`)})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[l===`requests`?(0,G.jsxs)(J,{size:`sm`,variant:`ghost`,onPress:()=>je(!0),isDisabled:Me||de===0,children:[(0,G.jsx)(io,{size:14}),e(`logsClear`)]}):null,(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,isPending:d,onPress:()=>void st(!1),children:[(0,G.jsx)(Qr,{size:15}),e(`refresh`)]})]})]}),h?(0,G.jsx)(vI,{title:e(`failedLogs`,{msg:h})}):null,(0,G.jsxs)(EA,{selectedKey:l,onSelectionChange:e=>u(String(e)),children:[(0,G.jsx)(EA.ListContainer,{className:`w-fit`,children:(0,G.jsxs)(EA.List,{children:[(0,G.jsxs)(TA,{id:`requests`,className:`gap-1.5`,children:[(0,G.jsx)(EA.Indicator,{className:`transition-none`}),(0,G.jsx)(Pa,{size:13}),e(`logsRequests`)]}),(0,G.jsxs)(TA,{id:`runtime`,className:`gap-1.5`,children:[(0,G.jsx)(EA.Indicator,{className:`transition-none`}),(0,G.jsx)(eo,{size:13}),e(`logsRuntime`)]})]})}),(0,G.jsxs)(EA.Panel,{id:`requests`,"data-tab-panel":`requests`,className:`space-y-4 pt-5`,children:[(0,G.jsxs)(`div`,{className:`data-toolbar flex flex-col gap-2`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,G.jsx)(wV,{value:_,onChange:e=>y(e),ariaLabel:e(`logsFilterAll`),options:[{id:`all`,label:e(`logsFilterAll`)},{id:`ok`,label:e(`logsFilterOk`)},{id:`incomplete`,label:e(`logsFilterIncomplete`)},{id:`error`,label:e(`logsFilterError`)},{id:`canceled`,label:e(`logsFilterCanceled`)}]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[Je?(0,G.jsx)(J,{size:`sm`,variant:`ghost`,onPress:pt,children:e(`clearFilters`)}):null,(0,G.jsx)(`div`,{className:`mono text-caption text-muted`,children:ft})]})]}),(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(L9,{ariaLabel:e(`logsColAccount`),value:E,onChange:D,options:Ve,allLabel:e(`logsFilterAccountAll`),searchPlaceholder:e(`logsSearchAccount`),emptyLabel:e(`logsNoFilterOptions`)}),(0,G.jsx)(L9,{ariaLabel:e(`logsColApiKey`),value:O,onChange:k,options:Ue,allLabel:e(`logsFilterApiKeyAll`),searchPlaceholder:e(`logsSearchApiKey`),emptyLabel:e(`logsNoFilterOptions`)}),(0,G.jsx)(L9,{ariaLabel:e(`logsColModel`),value:M,onChange:N,options:Ke,allLabel:e(`logsFilterModelAll`),searchPlaceholder:e(`logsSearchModel`),emptyLabel:e(`logsNoFilterOptions`)}),(0,G.jsx)(A7,{ariaLabel:e(`logsColProvider`),value:P,onChange:F,options:Ge}),(0,G.jsx)(L9,{ariaLabel:e(`logsSearchRequestId`),value:S,onChange:C,options:S?[{id:S,label:S}]:[],allLabel:e(`logsFilterIdAll`),searchPlaceholder:e(`logsSearchRequestId`),emptyLabel:e(`logsNoFilterOptions`),loadOptions:qe,className:`min-w-56`}),(0,G.jsx)(wV,{value:I,onChange:e=>L(e),ariaLabel:e(`logsFilterStreamAll`),options:[{id:`all`,label:e(`logsFilterStreamAll`)},{id:`stream`,label:e(`logsStreamYes`)},{id:`sync`,label:e(`logsStreamNo`)}]}),(0,G.jsx)(A7,{ariaLabel:e(`errorKind`),value:R===`all`?``:R,onChange:e=>z(e||`all`),options:[{id:``,label:e(`logsFilterKindAll`)},{id:`quota`,label:e(`logsKindQuota`)},{id:`rate_limit`,label:e(`logsKindRateLimit`)},{id:`auth`,label:e(`logsKindAuth`)},{id:`not_ready`,label:e(`logsKindNotReady`)},{id:`unavailable`,label:e(`logsKindUnavailable`)},{id:`invalid_request`,label:e(`logsKindInvalidRequest`)},{id:`model_not_available`,label:e(`logsKindModelNotAvailable`)}]})]}),(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:e(`logsTimeRange`)}),(0,G.jsx)(wV,{value:B,onChange:e=>V(e),ariaLabel:e(`logsTimeRange`),options:[{id:`all`,label:e(`logsTimeAll`)},{id:`1h`,label:e(`logsTime1h`)},{id:`24h`,label:e(`logsTime24h`)},{id:`7d`,label:e(`logsTime7d`)},{id:`custom`,label:e(`logsTimeCustom`)}]}),B===`custom`?(0,G.jsx)(DV,{className:`w-[min(100%,42rem)]`,value:H,onChange:ee,ariaLabel:e(`logsTimeRange`),fromLabel:e(`logsTimeFrom`),toLabel:e(`logsTimeTo`)}):null]})]}),(0,G.jsx)(xS,{className:`overflow-hidden p-0`,"aria-busy":d,children:_t?(0,G.jsx)(XB,{}):le.length===0?(0,G.jsx)(O7,{icon:(0,G.jsx)(va,{size:22}),title:e(Je?`logsNoMatch`:`logsEmptyRequests`),action:Je?(0,G.jsx)(J,{size:`sm`,variant:`ghost`,onPress:pt,children:e(`clearFilters`)}):null}):(0,G.jsx)(X,{children:(0,G.jsx)(X.ScrollContainer,{children:(0,G.jsxs)(X.Content,{"aria-label":e(`logsRequests`),children:[(0,G.jsxs)(X.Header,{children:[(0,G.jsx)(X.Column,{isRowHeader:!0,children:e(`logsColTime`)}),(0,G.jsx)(X.Column,{children:e(`logsColModel`)}),(0,G.jsx)(X.Column,{children:e(`logsColReasoning`)}),(0,G.jsx)(X.Column,{children:e(`logsColProvider`)}),(0,G.jsx)(X.Column,{children:e(`logsColAccount`)}),(0,G.jsx)(X.Column,{children:e(`logsColApiKey`)}),(0,G.jsx)(X.Column,{children:e(`logsColStatus`)}),(0,G.jsx)(X.Column,{children:e(`logsColStream`)}),(0,G.jsx)(X.Column,{children:e(`logsColLatency`)}),(0,G.jsx)(X.Column,{children:e(`logsColTokens`)})]}),(0,G.jsx)(X.Body,{children:le.map(n=>(0,G.jsxs)(X.Row,{className:`cursor-pointer`,onAction:()=>void mt(n),children:[(0,G.jsx)(X.Cell,{children:(0,G.jsxs)(`div`,{className:`py-1`,children:[(0,G.jsx)(`div`,{className:`mono text-xs`,children:B9(n.created_at,t)}),(0,G.jsx)(`div`,{className:`mono mt-0.5 text-caption text-muted`,children:n.id})]})}),(0,G.jsxs)(X.Cell,{children:[(0,G.jsx)(`div`,{className:`text-body font-medium`,children:n.requested_model||`—`}),n.mapped_model&&n.mapped_model!==n.requested_model?(0,G.jsx)(`div`,{className:`mono mt-0.5 text-caption text-muted`,children:n.mapped_model}):null]}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-xs`,children:V9(n)||`—`})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`text-xs`,children:ze(n)})}),(0,G.jsxs)(X.Cell,{children:[(0,G.jsx)(`span`,{className:`text-xs`,children:n.account_id?Le.get(n.account_id)||n.account_id:`—`}),n.account_id&&Le.get(n.account_id)&&Le.get(n.account_id)!==n.account_id?(0,G.jsx)(`div`,{className:`mono mt-0.5 text-caption text-muted`,children:n.account_id}):null]}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`text-xs`,children:We(n)})}),(0,G.jsxs)(X.Cell,{children:[(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:z9(n.status),children:n.status}),n.error_kind?(0,G.jsx)(`div`,{className:`mono mt-1 text-caption text-muted`,children:n.error_kind}):null]}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`text-xs text-muted`,children:n.stream?e(`logsStreamYes`):e(`logsStreamNo`)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(J7,{latencyMs:n.latency_ms,ttfbMs:n.ttfb_ms,completionTokens:n.completion_tokens,stream:n.stream,labels:{ttft:e(`logsColTTFT`),total:e(`logsLatencyTotal`),tps:e(`logsOutputTPS`)}})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(H9,{log:n,inLabel:e(`logsTokensIn`),outLabel:e(`logsTokensOut`),pointsLabel:t=>e(`logsTokensPoints`,{value:t})})})]},n.id))})]})})})}),(0,G.jsx)(j7,{total:de,page:nt,pageCount:tt,pageSize:re,loading:d,pageSizeLabel:e(`logsPageSize`),pageLabel:e(`logsPage`,{page:nt,pages:tt}),prevLabel:e(`logsPrevPage`),nextLabel:e(`logsNextPage`),onPage:ne,onPageSize:ie})]}),(0,G.jsxs)(EA.Panel,{id:`runtime`,"data-tab-panel":`runtime`,className:`space-y-4 pt-5`,children:[(0,G.jsxs)(`div`,{className:`data-toolbar flex flex-wrap items-center justify-between gap-2`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(M7,{className:`sm:w-72`,value:w,onChange:T,placeholder:e(`logsSearchRuntime`),ariaLabel:e(`logsSearchRuntime`)}),(0,G.jsx)(L9,{ariaLabel:e(`logsColAccount`),value:A,onChange:j,options:Ve,allLabel:e(`logsFilterAccountAll`),searchPlaceholder:e(`logsSearchAccount`),emptyLabel:e(`logsNoFilterOptions`)}),(0,G.jsx)(wV,{value:b,onChange:e=>x(e),ariaLabel:e(`logsLevelAll`),options:[{id:`all`,label:e(`logsLevelAll`)},{id:`info`,label:e(`logsLevelInfo`)},{id:`warn`,label:e(`logsLevelWarn`)},{id:`error`,label:e(`logsLevelError`)}]})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted`,children:[it===1?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{className:`status-dot`,"data-state":`ok`}),e(`logsAutoRefresh`)]}):null,(0,G.jsx)(`span`,{className:`mono`,children:ft})]})]}),(0,G.jsx)(xS,{className:`overflow-hidden p-0`,"aria-busy":d,children:_t?(0,G.jsx)(Hce,{}):pe.length===0?(0,G.jsx)(O7,{icon:(0,G.jsx)(eo,{size:22}),title:e(`logsEmptyRuntime`)}):(0,G.jsx)(`div`,{className:`divide-y divide-separator`,children:pe.map(e=>(0,G.jsxs)(`div`,{className:`grid cursor-pointer gap-2 px-5 py-3 transition-colors hover:bg-surface-secondary/55 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent sm:grid-cols-[150px_72px_minmax(0,1fr)] sm:items-start`,role:`button`,tabIndex:0,onClick:()=>ht(e),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),ht(e))},children:[(0,G.jsx)(`div`,{className:`mono text-caption text-muted`,children:B9(e.time,t)}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2 text-xs`,children:[(0,G.jsx)(`span`,{className:`status-dot`,"data-state":lEe(e.level)}),(0,G.jsx)(`span`,{className:`font-medium text-muted`,children:e.level})]}),(0,G.jsxs)(`div`,{className:`min-w-0`,children:[e.account_id?(0,G.jsx)(`div`,{className:`mono mb-1 text-caption text-muted`,children:e.account_id}):null,(0,G.jsx)(`div`,{className:`mono break-all text-xs leading-5 text-foreground`,children:e.message})]})]},e.id))})}),(0,G.jsx)(j7,{total:he,page:it,pageCount:rt,pageSize:se,loading:d,pageSizeLabel:e(`logsPageSize`),pageLabel:e(`logsPage`,{page:it,pages:rt}),prevLabel:e(`logsPrevPage`),nextLabel:e(`logsNextPage`),onPage:oe,onPageSize:ce})]})]}),(0,G.jsx)(Y.Root,{isOpen:ye,onOpenChange:e=>{be(e),e||ve(null)},children:(0,G.jsx)(Y.Backdrop,{variant:`blur`,children:(0,G.jsx)(Y.Container,{size:`lg`,scroll:`inside`,children:(0,G.jsxs)(Y.Dialog,{className:`w-full max-w-4xl`,children:[(0,G.jsxs)(Y.Header,{className:`items-start justify-between gap-4 px-5 pt-5`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(Y.Heading,{className:`text-section font-semibold`,children:e(`logsRuntimeDetailTitle`)}),(0,G.jsx)(`p`,{className:`mono mt-1 text-caption text-muted`,children:_e?`#${_e.id}`:`—`})]}),(0,G.jsx)(Y.CloseTrigger,{"aria-label":e(`close`),className:`grid size-8 shrink-0 place-items-center rounded-lg text-muted transition-colors hover:bg-surface-secondary hover:text-foreground`,children:(0,G.jsx)(yo,{size:16})})]}),(0,G.jsxs)(Y.Body,{className:`space-y-5 px-5 pb-5`,children:[(0,G.jsx)(`dl`,{className:`grid gap-3 sm:grid-cols-2`,children:[[e(`logsColTime`),_e?B9(_e.time,t):`—`],[e(`logsRuntimeLevel`),_e?.level||`—`],[e(`logsRuntimeSource`),_e?.source||`—`],[e(`logsColAccount`),_e?.account_id||`—`]].map(([t,n])=>(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`dt`,{className:`text-caption text-muted`,children:t}),(0,G.jsx)(`dd`,{className:`mt-1 break-all text-body font-medium`,children:t===e(`logsRuntimeLevel`)&&_e?(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:uEe(_e.level),children:_e.level}):n})]},String(t)))}),(0,G.jsxs)(`section`,{className:`space-y-2`,children:[(0,G.jsx)(`div`,{className:`text-xs font-medium text-muted`,children:e(`logsRuntimeMessage`)}),(0,G.jsx)(`pre`,{className:`mono max-h-[min(38rem,60vh)] overflow-auto whitespace-pre-wrap break-words rounded-lg bg-surface-secondary px-4 py-3 text-xs leading-6 text-foreground`,children:_e?.message||`—`})]})]})]})})})}),(0,G.jsx)(Y.Root,{isOpen:Ce,onOpenChange:e=>{we(e),e||(ke.current+=1,Ee(!1),Oe(``),Se(null))},children:(0,G.jsx)(Y.Backdrop,{variant:`blur`,children:(0,G.jsx)(Y.Container,{size:`lg`,scroll:`inside`,children:(0,G.jsxs)(Y.Dialog,{className:`w-full max-w-4xl`,children:[(0,G.jsxs)(Y.Header,{className:`items-start justify-between gap-4 px-5 pt-5`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(Y.Heading,{className:`text-section font-semibold`,children:e(`logsDetailTitle`)}),(0,G.jsx)(`p`,{className:`mono mt-1 text-caption text-muted`,children:xe?.id})]}),(0,G.jsx)(Y.CloseTrigger,{"aria-label":e(`close`),className:`grid size-8 shrink-0 place-items-center rounded-lg text-muted transition-colors hover:bg-surface-secondary hover:text-foreground`,children:(0,G.jsx)(yo,{size:16})})]}),(0,G.jsx)(Y.Body,{className:`space-y-4 px-5 pb-5`,children:Te?(0,G.jsx)(dEe,{}):De?(0,G.jsx)(vI,{title:e(`requestFailed`),description:De}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`dl`,{className:`grid gap-3 sm:grid-cols-2`,children:[[[e(`logsColStatus`),xe?.status||`—`],[e(`logsColModel`),xe?.requested_model||`—`],[e(`logsColReasoning`),xe&&V9(xe)||`—`],[e(`logsColProvider`),xe?ze(xe):`—`],[e(`logsColAccount`),xe?.account_id?Le.get(xe.account_id)||xe.account_id:`—`],[e(`logsColApiKey`),xe?We(xe):`—`],[e(`logsColStream`),xe?.stream?e(`logsStreamYes`):e(`logsStreamNo`)],[e(`logsRouting`),xe?Be(xe.routing):`—`]].map(([e,t])=>(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`dt`,{className:`text-caption text-muted`,children:e}),(0,G.jsx)(`dd`,{className:`mt-1 break-all text-body font-medium`,children:t})]},String(e))),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`dt`,{className:`text-caption text-muted`,children:e(`logsColTokens`)}),(0,G.jsx)(`dd`,{className:`mt-1`,children:xe?(0,G.jsx)(H9,{log:xe,inLabel:e(`logsTokensIn`),outLabel:e(`logsTokensOut`),pointsLabel:t=>e(`logsTokensPoints`,{value:t})}):`—`})]}),(0,G.jsx)(`div`,{className:`sm:col-span-2`,children:(0,G.jsx)(J7,{latencyMs:xe?.latency_ms,ttfbMs:xe?.ttfb_ms,completionTokens:xe?.completion_tokens,stream:xe?.stream,labels:{heading:e(`logsColLatency`),ttft:e(`logsColTTFT`),total:e(`logsLatencyTotal`),tps:e(`logsOutputTPS`)}})})]}),xe&&xe.message_count?(0,G.jsxs)(`div`,{className:`rounded-lg bg-surface-secondary px-3 py-3 text-xs`,children:[(0,G.jsx)(`div`,{className:`font-medium text-muted`,children:e(`logsMessageShape`)}),(0,G.jsxs)(`dl`,{className:`mt-2 grid gap-2 sm:grid-cols-2`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`dt`,{className:`text-caption text-muted`,children:e(`logsMessageCount`)}),(0,G.jsx)(`dd`,{className:`mono mt-0.5`,children:xe.message_count})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`dt`,{className:`text-caption text-muted`,children:e(`logsEmptyMessageIndexes`)}),(0,G.jsx)(`dd`,{className:`mono mt-0.5 break-all`,children:xe.empty_message_indexes?.length?xe.empty_message_indexes.join(`, `):`—`})]}),(0,G.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,G.jsx)(`dt`,{className:`text-caption text-muted`,children:e(`logsMessageRoles`)}),(0,G.jsx)(`dd`,{className:`mono mt-0.5 break-all`,children:xe.message_roles?.join(` → `)||`—`})]})]})]}):null,xe?.error_message?(0,G.jsxs)(`div`,{className:`rounded-lg bg-surface-secondary px-3 py-2 text-xs leading-5 text-muted`,children:[xe.error_kind?(0,G.jsx)(`span`,{className:`mono mr-2 text-muted`,children:xe.error_kind}):null,xe.error_message]}):null,xe?.stream_diagnostic?(0,G.jsxs)(`div`,{className:`rounded-lg bg-surface-secondary px-3 py-3 text-xs`,children:[(0,G.jsx)(`div`,{className:`font-medium text-muted`,children:e(`logsStreamDiagnostics`)}),(0,G.jsx)(`dl`,{className:`mt-2 grid gap-2 sm:grid-cols-2`,children:[[e(`logsCancellationSource`),xe.stream_diagnostic.cancellation_source||`—`],[e(`logsUpstreamStatus`),xe.stream_diagnostic.upstream_status??`—`],[e(`logsSSEEvents`),xe.stream_diagnostic.sse_event_count],[e(`logsBytesRead`),xe.stream_diagnostic.bytes_read],[e(`logsLastEvent`),xe.stream_diagnostic.last_event||`—`],[e(`logsStreamComplete`),xe.stream_diagnostic.saw_done?`yes`:`no`]].map(([e,t])=>(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`dt`,{className:`text-caption text-muted`,children:e}),(0,G.jsx)(`dd`,{className:`mono mt-0.5 break-all`,children:t})]},String(e)))}),xe.stream_diagnostic.context_err||xe.stream_diagnostic.relay_error?(0,G.jsxs)(`div`,{className:`mt-2 space-y-1 break-all text-muted`,children:[xe.stream_diagnostic.context_err?(0,G.jsxs)(`div`,{children:[`context: `,xe.stream_diagnostic.context_err]}):null,xe.stream_diagnostic.relay_error?(0,G.jsxs)(`div`,{children:[`relay: `,xe.stream_diagnostic.relay_error]}):null]}):null]}):null,xe?.usage_detail?(0,G.jsxs)(`div`,{className:`rounded-lg bg-surface-secondary px-3 py-3 text-xs`,children:[(0,G.jsx)(`div`,{className:`font-medium text-muted`,children:e(`logsUsageDetail`)}),(0,G.jsx)(`dl`,{className:`mt-2 grid gap-2 sm:grid-cols-2`,children:[[e(`logsCreditConsumed`),`${U9(xe.usage_detail.credit)} ${xe.usage_detail.unit||`credits`}`],[e(`logsColProvider`),xe.usage_detail.provider||`—`]].map(([e,t])=>(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`dt`,{className:`text-caption text-muted`,children:e}),(0,G.jsx)(`dd`,{className:`mono mt-0.5 break-all`,children:t})]},String(e)))})]}):null,(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`div`,{className:`text-xs font-medium text-muted`,children:e(`logsAttempts`)}),xe?.attempts?.length?(0,G.jsx)(`div`,{className:`mt-2 divide-y divide-separator overflow-hidden rounded-lg bg-surface-secondary`,children:xe.attempts.map(e=>(0,G.jsxs)(`div`,{className:`grid gap-1 px-3 py-2.5 text-xs sm:grid-cols-[48px_minmax(0,1fr)_auto]`,children:[(0,G.jsxs)(`div`,{className:`mono text-muted`,children:[`#`,e.attempt_index]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`div`,{className:`font-medium`,children:e.account_id||`—`}),(0,G.jsx)(`div`,{className:`mt-0.5 text-muted`,children:e.error_message||e.status})]}),(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:z9(e.status===`failover`?`canceled`:e.status),children:e.status})]},e.id))}):(0,G.jsx)(`p`,{className:`mt-2 text-xs text-muted`,children:e(`logsNoAttempts`)})]})]})})]})})})}),(0,G.jsx)(A9,{isOpen:Ae,title:e(`logsClear`),description:e(`logsClearConfirm`),confirmLabel:e(`logsClear`),cancelLabel:e(`close`),closeLabel:e(`close`),isPending:Me,onClose:()=>je(!1),onConfirm:()=>void gt()})]})}var G9=864e5,vEe=8;function K9(e){return`var(--chart-${e%vEe+1})`}function q9(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()}function J9(e){return e<10?`0${e}`:String(e)}function Y9(e){let t=new Date(e);return`${t.getFullYear()}-${J9(t.getMonth()+1)}-${J9(t.getDate())}`}function yEe({accounts:e,t}){let[n,r]=(0,v.useState)(!1),{buckets:i,rows:a,todayStart:o,maxTotal:s}=(0,v.useMemo)(()=>{let t=q9(new Date),n=new Map;e.forEach((e,t)=>n.set(e.id,K9(t)));let r=new Map,i=[];for(let a of e){let e=a.quota?.packages??[],o=n.get(a.id)||K9(0),s=a.name||a.id,c=e.filter(e=>(e.remain??0)>0&&(e.ends_at??0)>0),l=0,u=0,d=0,f=0;for(let e of c){let n=e.ends_at*1e3,i=e.remain??0;d+=i;let c=q9(new Date(n)),u=c{let e=new Date(c);return{day:p,label:`${e.getMonth()+1}/${e.getDate()}`,ts:c,segments:[],total:0}})(),r.set(p,m));let h=m.segments.find(e=>e.id===a.id);h?h.remain+=i:m.segments.push({id:a.id,name:s,color:o,remain:i}),m.total+=i}if(l){let e=Y9(q9(new Date(l)));for(let t of c)Y9(q9(new Date(t.ends_at*1e3)))===e&&(u+=t.remain??0)}let p=l?Math.max(0,Math.round((q9(new Date(l))-t)/G9)):-1;i.push({id:a.id,name:s,color:o,remain:d,expiredRemain:f,soonest:l?Math.floor(l/1e3):0,soonestRemain:u,daysLeft:p,dailyBurn:l?u/Math.max(p,1):0,packs:c.length})}i.sort((e,t)=>e.soonest&&t.soonest?e.soonest-t.soonest:e.soonest?-1:t.soonest?1:t.remain-e.remain);let a=[...r.values()].sort((e,t)=>e.ts-t.ts);return{buckets:a,rows:i,todayStart:t,maxTotal:a.reduce((e,t)=>Math.max(e,t.total),0)}},[e]);if(!a.some(e=>e.packs>0))return null;let c=n?i:i.slice(0,8);return(0,G.jsxs)(xS,{className:`overflow-hidden p-0`,"data-gsap-reveal":!0,children:[(0,G.jsxs)(`div`,{className:`flex flex-col gap-3 border-b border-separator px-4 py-4 sm:flex-row sm:flex-wrap sm:items-center sm:justify-between sm:px-5`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(`h3`,{className:`font-semibold`,children:t(`expiryDistTitle`)}),(0,G.jsx)(`p`,{className:`mt-0.5 text-xs text-muted`,children:t(`expiryDistHint`)})]}),i.length>8?(0,G.jsx)(J,{size:`sm`,variant:`ghost`,onPress:()=>r(e=>!e),children:n?t(`expiryDistCollapse`):t(`expiryDistExpand`,{n:i.length})}):null]}),(0,G.jsxs)(`div`,{className:`space-y-4 p-4 sm:space-y-3 sm:p-5`,children:[(0,G.jsx)(`div`,{className:`space-y-2.5 sm:space-y-1.5`,children:c.map(e=>{let n=e.ts===o,r=s>0?e.total/s*100:0;return(0,G.jsxs)(`div`,{className:`flex flex-col gap-1.5 sm:grid sm:grid-cols-[52px_minmax(0,1fr)_auto] sm:items-center sm:gap-2`,children:[(0,G.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3 sm:contents`,children:[(0,G.jsx)(`span`,{className:`mono text-caption ${e.day===`__expired__`?`font-semibold text-danger`:n?`font-semibold text-foreground`:`text-muted`}`,children:e.day===`__expired__`?t(`expiryDistExpired`):e.label}),(0,G.jsx)(`span`,{className:`mono text-caption text-foreground sm:hidden`,children:s9(e.total)})]}),(0,G.jsx)(`div`,{className:`h-2.5 w-full rounded-full bg-surface-tertiary`,role:`img`,"aria-label":`${e.day} ${t(`expiryDistDayTotal`,{n:s9(e.total)})}`,title:e.day,children:(0,G.jsx)(`div`,{className:`flex h-full items-stretch overflow-hidden rounded-full`,style:{width:`${r}%`},children:e.segments.map(t=>(0,G.jsx)(`span`,{style:{width:`${t.remain/e.total*100}%`,backgroundColor:t.color},title:`${t.name} · ${s9(t.remain)}`},t.id))})}),(0,G.jsx)(`span`,{className:`mono hidden text-caption text-foreground sm:inline`,children:s9(e.total)})]},e.day)})}),(0,G.jsx)(`div`,{className:`flex flex-wrap gap-x-3 gap-y-1.5 pt-1`,children:a.filter(e=>e.remain>0).map(e=>(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-caption text-muted`,children:[(0,G.jsx)(`i`,{className:`size-2 rounded-[3px]`,style:{backgroundColor:e.color}}),(0,G.jsx)(`span`,{className:`max-w-[120px] truncate`,children:e.name})]},e.id))}),(0,G.jsx)(`div`,{className:`divide-y divide-separator md:hidden`,children:a.filter(e=>e.packs>0).map(e=>{let n=e.daysLeft>=0&&e.daysLeft<=2,r=e.daysLeft>=0&&e.daysLeft<=7,i=e.soonest?new Date(e.soonest*1e3):null,a=e.expiredRemain>0&&e.daysLeft<0||n?`font-semibold text-danger`:r?`text-warning`:`text-muted`,o=e.daysLeft>=0?t(`expiryDistDays`,{n:e.daysLeft}):e.expiredRemain>0?t(`expiryDistExpired`):`—`;return(0,G.jsxs)(`article`,{className:`space-y-3 py-3.5`,children:[(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,G.jsx)(`i`,{className:`size-2 shrink-0 rounded-[3px]`,style:{backgroundColor:e.color}}),(0,G.jsx)(`span`,{className:`truncate text-body font-medium text-foreground`,children:e.name})]}),(0,G.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-4 gap-y-3`,children:[(0,G.jsxs)(`div`,{className:`space-y-1`,children:[(0,G.jsx)(`div`,{className:`text-caption text-muted`,children:t(`expiryDistColSoonest`)}),(0,G.jsx)(`div`,{className:`mono text-body text-muted`,children:i?`${i.getMonth()+1}/${i.getDate()}`:`—`})]}),(0,G.jsxs)(`div`,{className:`space-y-1`,children:[(0,G.jsx)(`div`,{className:`text-caption text-muted`,children:t(`expiryDistColDaysLeft`)}),(0,G.jsx)(`div`,{className:`mono text-body ${a}`,children:o})]}),(0,G.jsxs)(`div`,{className:`space-y-1`,children:[(0,G.jsx)(`div`,{className:`text-caption text-muted`,children:t(`expiryDistColBatch`)}),(0,G.jsx)(`div`,{className:`mono text-body text-foreground`,children:s9(e.soonestRemain)})]}),(0,G.jsxs)(`div`,{className:`space-y-1`,children:[(0,G.jsx)(`div`,{className:`text-caption text-muted`,children:t(`expiryDistColDaily`)}),(0,G.jsx)(`div`,{className:`mono text-body text-foreground`,children:e.soonest?s9(e.dailyBurn):`—`})]})]})]},e.id)})}),(0,G.jsx)(X,{"aria-label":t(`expiryDistTitle`),className:`hidden md:block`,children:(0,G.jsx)(X.ScrollContainer,{className:`min-w-0 overflow-x-auto`,children:(0,G.jsxs)(X.Content,{className:`min-w-[32rem]`,children:[(0,G.jsxs)(X.Header,{children:[(0,G.jsx)(X.Column,{isRowHeader:!0,children:t(`expiryDistColAccount`)}),(0,G.jsx)(X.Column,{children:(0,G.jsx)(`div`,{className:`text-center`,children:t(`expiryDistColSoonest`)})}),(0,G.jsx)(X.Column,{children:(0,G.jsx)(`div`,{className:`text-center`,children:t(`expiryDistColDaysLeft`)})}),(0,G.jsx)(X.Column,{children:(0,G.jsx)(`div`,{className:`text-center`,children:t(`expiryDistColBatch`)})}),(0,G.jsx)(X.Column,{children:(0,G.jsx)(`div`,{className:`text-center`,children:t(`expiryDistColDaily`)})})]}),(0,G.jsx)(X.Body,{children:a.filter(e=>e.packs>0).map(e=>{let n=e.daysLeft>=0&&e.daysLeft<=2,r=e.daysLeft>=0&&e.daysLeft<=7,i=e.soonest?new Date(e.soonest*1e3):null;return(0,G.jsxs)(X.Row,{children:[(0,G.jsx)(X.Cell,{children:(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,G.jsx)(`i`,{className:`size-2 shrink-0 rounded-[3px]`,style:{backgroundColor:e.color}}),(0,G.jsx)(`span`,{className:`max-w-[150px] truncate text-foreground`,children:e.name})]})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`div`,{className:`mono text-center text-muted`,children:i?`${i.getMonth()+1}/${i.getDate()}`:`—`})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`div`,{className:`mono text-center ${e.expiredRemain>0&&e.daysLeft<0||n?`font-semibold text-danger`:r?`text-warning`:`text-muted`}`,children:e.daysLeft>=0?t(`expiryDistDays`,{n:e.daysLeft}):e.expiredRemain>0?t(`expiryDistExpired`):`—`})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`div`,{className:`mono text-center text-foreground`,children:s9(e.soonestRemain)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`div`,{className:`mono text-center text-foreground`,children:e.soonest?s9(e.dailyBurn):`—`})})]},e.id)})})]})})}),(0,G.jsx)(`p`,{className:`text-caption text-muted`,children:t(`expiryDistFoot`)})]})]})}function bEe(){return QF(`/api/usage/pricing`)}function xEe(e={}){let t=new URLSearchParams;return e.from&&t.set(`from`,e.from),e.to&&t.set(`to`,e.to),e.api_key&&t.set(`api_key`,e.api_key),QF(`/api/usage/cost${t.toString()?`?${t}`:``}`)}var X9=(0,v.lazy)(()=>C(()=>import(`./CostChart-DD91nkKz.js`).then(e=>({default:e.CostChart})),__vite__mapDeps([2,1])));function SEe(){let e=new Date;return e.setHours(0,0,0,0),e.toISOString()}var CEe={window:{from:``,to:``,hours:24},currency:`CNY`,models:[],totals:{id:`total`,label:``,vendor:``,currency:`CNY`,requests:0,cache_hit:0,cache_miss:0,output:0,total_tokens:0,cost:0,cost_off_peak:0,cost_peak:0,peak_requests:0,credits:0,priced:!1},series:[]};function wEe(e,t){if(!t)return`0%`;let n=e/t*100;return`${n>=10?n.toFixed(0):n.toFixed(1)}%`}function TEe({apiKeyFilter:e=``}){let{t,lang:n}=GF(),[r,i]=(0,v.useState)(`today`),[a,o]=(0,v.useState)(`credits`),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(!0),[p,m]=(0,v.useState)(``);(0,v.useEffect)(()=>{let e=!1;return bEe().then(t=>{e||u(t)}).catch(()=>{}),()=>{e=!0}},[]);let h=(0,v.useCallback)(async()=>{f(!0);try{let t=await xEe({...r===`all`?{}:r===`today`?{from:SEe()}:{from:new Date(Date.now()-Number(r)*3600*1e3).toISOString(),to:new Date().toISOString()},api_key:e||void 0});c(t),m(``)}catch(e){c(null),m(e instanceof Error?e.message:String(e))}finally{f(!1)}},[r,e]);(0,v.useEffect)(()=>{h()},[h]);let g=s??CEe,_=g.totals,y=_.requests>0&&g.models.length>0,b=g.models.filter(e=>e.priced),x=_.cost>0,S=[{label:t(`usageCredits`),value:yV(_.credits),detail:t(`usageCreditsHint`)},{label:t(`usageTotalTokens`),value:uV(_.total_tokens),detail:`${uV(_.cache_hit)} / ${uV(_.cache_miss)} / ${uV(_.output)} ${t(`usageTokenSplitNote`)}`},{label:t(`usageRequests`),value:String(_.requests),detail:t(`usageModelCount`,{count:g.models.length})},{label:t(`usageCacheHitRate`),value:wEe(_.cache_hit,_.cache_hit+_.cache_miss),detail:uV(_.cache_hit)}],C=a===`credits`?yV(_.credits):a===`tokens`?uV(_.total_tokens):_V(_.cost);return(0,G.jsxs)(`div`,{className:`space-y-6`,children:[(0,G.jsxs)(`section`,{className:`flex flex-wrap items-center justify-end gap-3 pb-2`,children:[(0,G.jsx)(wV,{value:r,onChange:e=>i(e),ariaLabel:t(`usageWindow`),options:[{id:`today`,label:t(`statsWindowToday`)},{id:`24`,label:t(`usageWindow24h`)},{id:`168`,label:t(`usageWindow7d`)},{id:`all`,label:t(`usageWindowTotal`)}]}),(0,G.jsxs)(J,{size:`sm`,variant:`secondary`,onPress:()=>void h(),isDisabled:d,children:[(0,G.jsx)(Qr,{size:14}),t(`refresh`)]})]}),p?(0,G.jsx)(vI,{title:t(`failedStats`,{msg:p})}):null,(0,G.jsx)(`section`,{className:`grid gap-3 sm:grid-cols-2 sm:gap-4 xl:grid-cols-4`,children:S.map(e=>(0,G.jsxs)(xS,{className:`gap-0 p-4`,children:[(0,G.jsx)(`div`,{className:`text-body text-muted`,children:e.label}),(0,G.jsx)(`div`,{className:`tabular mt-1.5 text-section font-semibold`,children:d?(0,G.jsx)(Q,{className:`h-5 w-16`}):e.value}),(0,G.jsx)(`div`,{className:`mono mt-1 truncate text-caption text-muted`,children:d?(0,G.jsx)(Q,{className:`h-3 w-24`}):e.detail||`\xA0`})]},e.label))}),(0,G.jsxs)(xS,{className:`overflow-hidden p-0`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-b border-separator px-5 py-4`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold tracking-[-0.015em]`,children:t(`usageChartTitle`)}),(0,G.jsx)(`p`,{className:`mt-0.5 text-xs text-muted`,children:t(`usageChartHint`)})]}),(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,G.jsx)(wV,{value:a,onChange:e=>o(e),ariaLabel:t(`usageChartMetric`),options:[{id:`credits`,label:t(`usageColCredits`)},{id:`tokens`,label:t(`usageColTokens`)}]}),(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:`default`,children:C})]})]}),(0,G.jsx)(`div`,{className:`p-5`,children:d?(0,G.jsx)(`div`,{className:`grid h-72 place-items-center`,children:(0,G.jsx)(Q,{className:`h-56 w-full`})}):y?(0,G.jsx)(v.Suspense,{fallback:(0,G.jsx)(`div`,{className:`grid h-72 place-items-center`,children:(0,G.jsx)(Q,{className:`h-56 w-full`})}),children:(0,G.jsx)(X9,{series:g.series,models:g.models,lang:n,emptyLabel:t(`usageChartEmpty`),totalLabel:t(`usageTotals`),metric:a})}):(0,G.jsx)(O7,{title:t(`usageEmpty`),hint:t(`usageRetentionHint`)})})]}),(0,G.jsxs)(xS,{className:`overflow-hidden p-0`,children:[(0,G.jsx)(`div`,{className:`flex items-center justify-between gap-3 border-b border-separator px-5 py-4`,children:(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`font-semibold tracking-[-0.015em]`,children:t(`usageBreakdownTitle`)}),(0,G.jsx)(`p`,{className:`mt-0.5 text-xs text-muted`,children:t(`usageBreakdownHint`)})]})}),d?(0,G.jsx)(`div`,{className:`space-y-3 p-5`,children:[0,1,2].map(e=>(0,G.jsx)(Q,{className:`h-9 w-full`},e))}):y?(0,G.jsx)(X,{children:(0,G.jsx)(X.ScrollContainer,{children:(0,G.jsxs)(X.Content,{"aria-label":t(`usageBreakdownTitle`),children:[(0,G.jsxs)(X.Header,{children:[(0,G.jsx)(X.Column,{isRowHeader:!0,children:t(`usageColModel`)}),(0,G.jsx)(X.Column,{children:t(`usageColRequests`)}),(0,G.jsx)(X.Column,{children:t(`usageColInputHit`)}),(0,G.jsx)(X.Column,{children:t(`usageColInputMiss`)}),(0,G.jsx)(X.Column,{children:t(`usageColOutput`)}),(0,G.jsx)(X.Column,{children:t(`usageColTokens`)}),(0,G.jsx)(X.Column,{children:t(`usageColCredits`)})]}),(0,G.jsxs)(X.Body,{children:[g.models.map(e=>(0,G.jsxs)(X.Row,{children:[(0,G.jsxs)(X.Cell,{children:[(0,G.jsx)(`div`,{className:`text-sm font-medium`,children:e.label}),(0,G.jsx)(`div`,{className:`mono mt-0.5 text-[10px] text-muted`,children:e.id})]}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-xs`,children:e.requests})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-xs`,children:uV(e.cache_hit)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-xs`,children:uV(e.cache_miss)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-xs`,children:uV(e.output)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-xs`,children:uV(e.total_tokens)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-xs font-semibold`,children:yV(e.credits)})})]},e.id)),(0,G.jsxs)(X.Row,{children:[(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`text-sm font-semibold`,children:t(`usageTotals`)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-xs font-semibold`,children:_.requests})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-xs font-semibold`,children:uV(_.cache_hit)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-xs font-semibold`,children:uV(_.cache_miss)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-xs font-semibold`,children:uV(_.output)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-xs font-semibold`,children:uV(_.total_tokens)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-xs font-semibold`,children:yV(_.credits)})})]})]})]})})}):(0,G.jsx)(O7,{title:t(`usageEmpty`),hint:t(`usageRetentionHint`)})]}),(0,G.jsx)(yh,{className:`rounded-xl bg-surface-secondary`,hideSeparator:!0,defaultExpandedKeys:[],children:(0,G.jsxs)(yh.Item,{id:`deepseek-estimate`,children:[(0,G.jsx)(yh.Heading,{children:(0,G.jsxs)(yh.Trigger,{className:`items-center gap-3 px-5 py-4 text-left`,children:[(0,G.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,G.jsx)(`span`,{className:`block font-semibold tracking-[-0.015em]`,children:t(`usageEstimateTitle`)}),(0,G.jsx)(`span`,{className:`mt-0.5 block text-xs text-muted`,children:t(`usageEstimateHint`)})]}),x?(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:`default`,children:_V(_.cost)}):null,(0,G.jsx)(yh.Indicator,{})]})}),(0,G.jsx)(yh.Panel,{children:(0,G.jsxs)(yh.Body,{className:`space-y-5 px-5 pb-5`,children:[(0,G.jsx)(`p`,{className:`text-xs leading-6 text-muted`,children:t(`usageRenderNote`)}),x?(0,G.jsxs)(`div`,{children:[(0,G.jsxs)(`div`,{className:`mb-3 flex items-center justify-between gap-3`,children:[(0,G.jsx)(`h4`,{className:`text-sm font-medium`,children:t(`usageEstimateChartTitle`)}),(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:`default`,children:_V(_.cost)})]}),(0,G.jsx)(v.Suspense,{fallback:(0,G.jsx)(Q,{className:`h-56 w-full`}),children:(0,G.jsx)(X9,{series:g.series,models:b.length?b:g.models,lang:n,emptyLabel:t(`usageEstimateChartEmpty`),totalLabel:t(`usageTotals`),metric:`cost`})})]}):null,b.length?(0,G.jsx)(X,{children:(0,G.jsx)(X.ScrollContainer,{children:(0,G.jsxs)(X.Content,{"aria-label":t(`usageEstimateTitle`),children:[(0,G.jsxs)(X.Header,{children:[(0,G.jsx)(X.Column,{isRowHeader:!0,children:t(`usageColModel`)}),(0,G.jsx)(X.Column,{children:t(`usageColSplit`)}),(0,G.jsx)(X.Column,{children:t(`usageColCost`)})]}),(0,G.jsxs)(X.Body,{children:[b.map(e=>(0,G.jsxs)(X.Row,{children:[(0,G.jsxs)(X.Cell,{children:[(0,G.jsx)(`div`,{className:`text-sm font-medium`,children:e.label}),(0,G.jsx)(`div`,{className:`mono mt-0.5 text-[10px] text-muted`,children:e.id})]}),(0,G.jsx)(X.Cell,{children:(0,G.jsxs)(`span`,{className:`mono text-xs text-muted`,children:[_V(e.cost_peak),` / `,_V(e.cost_off_peak)]})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-sm font-semibold`,children:_V(e.cost)})})]},e.id)),(0,G.jsxs)(X.Row,{children:[(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`text-sm font-semibold`,children:t(`usageTotals`)})}),(0,G.jsx)(X.Cell,{children:(0,G.jsxs)(`span`,{className:`mono text-xs text-muted`,children:[_V(_.cost_peak),` / `,_V(_.cost_off_peak)]})}),(0,G.jsx)(X.Cell,{children:(0,G.jsx)(`span`,{className:`mono text-sm font-semibold`,children:_V(_.cost)})})]})]})]})})}):(0,G.jsx)(`p`,{className:`text-xs text-muted`,children:t(`usageEstimateChartEmpty`)}),(0,G.jsxs)(`div`,{className:`grid gap-5 xl:grid-cols-[minmax(0,1fr)_minmax(0,1fr)]`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h4`,{className:`mb-2 text-sm font-medium`,children:t(`usagePriceTitle`)}),(0,G.jsx)(`p`,{className:`mb-3 text-xs text-muted`,children:t(`usagePeakNote`)}),(0,G.jsxs)(`div`,{className:`divide-y divide-separator rounded-lg bg-background`,children:[(l?.models??[]).map(e=>(0,G.jsxs)(`div`,{className:`px-4 py-3`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,G.jsx)(`div`,{className:`text-sm font-medium`,children:e.label}),(0,G.jsx)(`span`,{className:`mono text-[10px] text-muted`,children:e.currency})]}),(0,G.jsx)(`div`,{className:`mono mt-1 text-[10px] text-muted`,children:e.id}),(0,G.jsxs)(`div`,{className:`mt-2 grid grid-cols-2 gap-2 text-[11px]`,children:[(0,G.jsxs)(`div`,{className:`rounded-lg bg-surface-secondary px-2.5 py-2`,children:[(0,G.jsx)(`div`,{className:`text-[10px] text-muted`,children:t(`usagePriceBandOff`)}),(0,G.jsxs)(`div`,{className:`mono mt-0.5`,children:[vV(e.off_peak.cache_hit),` · `,vV(e.off_peak.cache_miss),` · `,vV(e.off_peak.output)]}),(0,G.jsxs)(`div`,{className:`mt-1 text-[9px] text-muted`,children:[t(`usagePriceHit`),` · `,t(`usagePriceMiss`),` · `,t(`usagePriceOutput`)]})]}),(0,G.jsxs)(`div`,{className:`rounded-lg bg-surface-secondary px-2.5 py-2`,children:[(0,G.jsx)(`div`,{className:`text-[10px] text-muted`,children:t(`usagePriceBandPeak`)}),(0,G.jsxs)(`div`,{className:`mono mt-0.5`,children:[vV(e.peak.cache_hit),` · `,vV(e.peak.cache_miss),` · `,vV(e.peak.output)]}),(0,G.jsxs)(`div`,{className:`mt-1 text-[9px] text-muted`,children:[t(`usagePriceHit`),` · `,t(`usagePriceMiss`),` · `,t(`usagePriceOutput`)]})]})]})]},e.id)),l?.models?.length?null:(0,G.jsx)(`div`,{className:`px-4 py-6 text-sm text-muted`,children:t(`usageEmpty`)})]})]}),(0,G.jsxs)(`div`,{className:`space-y-3 text-xs leading-6 text-muted`,children:[(0,G.jsx)(`h4`,{className:`text-sm font-medium text-foreground`,children:t(`usageNoteTitle`)}),(0,G.jsx)(`p`,{children:t(`usageRetentionHint`)}),(0,G.jsx)(`p`,{children:t(`usagePeakNote`)}),g.unpriced?.length?(0,G.jsx)(`p`,{children:t(`usageUnpricedHint`,{models:g.unpriced.join(`, `)})}):null,l?.note?(0,G.jsx)(`p`,{className:`mono text-[10px]`,children:l.note}):null]})]})]})})]})})]})}var EEe=500,DEe={model:`model`,account:`account`,provider:`provider`};function OEe(e,t,n){let r=e.prompt_tokens??0,i=e.completion_tokens??0,a=e.key===`(unknown)`||e.key===`(unassigned)`||!e.key;return{key:e.key,label:n,count:e.count,success:e.count?e.ok/e.count:0,p95:e.latency_p95_ms??null,tokens:r+i,prompt:r,completion:i,credits:e.credits??0,cache_write:e.cache_write_tokens??0,cache_read:e.cache_read_tokens??0,filter:a?void 0:{[DEe[t]]:e.key}}}function kEe(e,t,n){let r=n===`ascending`?1:-1;return[...e].sort((e,n)=>{if(t===`label`)return r*e.label.localeCompare(n.label);let i=e[t],a=n[t];return i==null&&a==null?0:i==null?1:a==null?-1:r*(i-a)||e.label.localeCompare(n.label)})}function Z9(e){return e?e>=1e3?uV(e):String(Math.round(e*100)/100):`0`}function AEe(){let{t:e}=GF(),t=at(),[n,r]=On(),[i,a]=(0,v.useState)(`stats`),[o,s]=(0,v.useState)(`model`),[c,l]=(0,v.useState)(`today`),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(null),[m,h]=(0,v.useState)(!0),[g,_]=(0,v.useState)(``),[y,b]=(0,v.useState)([]),[x,S]=(0,v.useState)(`count`),[C,w]=(0,v.useState)(`descending`),[T,E]=(0,v.useState)(()=>new URLSearchParams(window.location.search).get(`api_key`)??``),{options:D}=R9(),O=(0,v.useRef)(0),k=n.toString(),A=(0,v.useRef)(k);(0,v.useEffect)(()=>{k!==A.current&&(A.current=k,E(new URLSearchParams(k).get(`api_key`)??``))},[k]);let j=T?`api_key=${encodeURIComponent(T)}`:``;(0,v.useEffect)(()=>{j!==A.current&&(A.current=j,r(j,{replace:!0}))},[j,r]),(0,v.useEffect)(()=>{let e=!1;return $F(!1).then(t=>{e||b(t.data||[])}).catch(()=>{}),()=>{e=!0}},[]);let M=u?.start?.toString()??``,N=u?.end?.toString()??``;(0,v.useEffect)(()=>{let e=kV(c,u);if(!e){h(!1);return}let t=++O.current;cV({...e,dim:[o],limit:EEe,api_key:T||void 0}).then(e=>{t===O.current&&(p(e),_(``))}).catch(e=>{t===O.current&&(p(null),_(e instanceof Error?e.message:String(e)))}).finally(()=>{t===O.current&&h(!1)})},[o,c,M,N,T]);let P=(0,v.useMemo)(()=>{let t=new Map(y.map(e=>[e.id,e.name||e.id]));return kEe(((o===`model`?f?.models:o===`account`?f?.accounts:f?.providers)??[]).map(n=>{let r=n.key===`(unknown)`?e(`statsUnknown`):n.key===`(unassigned)`?e(`statsUnassigned`):o===`account`?t.get(n.key)||n.key:o===`provider`?HV(n.key,e):n.key;return OEe(n,o,r)}),x,C)},[f,o,y,x,C,e]),F=f?.totals,I=f?.tokens;function L(e){if(!f||!e.filter)return;let n={...e.filter,api_key:T||void 0};t(jV(n,f.window.from,f.window.to))}let R=[{id:`label`,label:e(o===`model`?`logsColModel`:o===`account`?`logsColAccount`:`logsColProvider`)},{id:`count`,label:e(`usageColRequests`),numeric:!0},{id:`success`,label:e(`usageColSuccess`),numeric:!0},{id:`p95`,label:e(`statsLatencyP95`),numeric:!0},{id:`tokens`,label:e(`usageColTokens`),numeric:!0},{id:`cache_write`,label:e(`usageColCacheWrite`),numeric:!0},{id:`credits`,label:e(`usageColCredits`),numeric:!0}],z=(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`section`,{className:`flex flex-wrap items-center justify-end gap-3 pb-1`,children:(0,G.jsx)(AV,{value:c,onChange:l,custom:u,onCustomChange:d,onBusy:()=>h(!0),t:e})}),g?(0,G.jsx)(vI,{title:e(`failedStats`,{msg:g})}):null,(0,G.jsx)(`section`,{className:`grid gap-3 sm:grid-cols-2 sm:gap-4 xl:grid-cols-5`,children:[[e(`usageColRequests`),F?uV(F.requests):`—`,e(`statsWindowHint`,{window:e(OV[c])})],[e(`usageColSuccess`),F?pV(F.success_rate):`—`,F?`${F.ok} / ${F.requests}`:``],[e(`usageColTokens`),I?uV(I.total):`—`,I?`${uV(I.prompt)} / ${uV(I.completion)}`:``],[e(`usageColCacheWrite`),I?uV(I.cache_write??0):`—`,I?`${e(`chartCacheRead`)} ${uV(I.cache_read)}`:``],[e(`usageColCredits`),F?Z9(F.credits??0):`—`,``]].map(([e,t,n])=>(0,G.jsxs)(xS,{className:`gap-0 p-4`,children:[(0,G.jsx)(`div`,{className:`text-body text-muted`,children:e}),(0,G.jsx)(`div`,{className:`tabular mt-1.5 text-section font-semibold`,children:m?(0,G.jsx)(Q,{className:`h-5 w-16`}):t}),(0,G.jsx)(`div`,{className:`mono mt-1 truncate text-caption text-muted`,children:m?(0,G.jsx)(Q,{className:`h-3 w-24`}):n||`\xA0`})]},e))}),(0,G.jsxs)(xS,{className:`overflow-hidden p-0`,children:[(0,G.jsxs)(`div`,{className:`flex flex-col gap-3 border-b border-separator px-5 py-3 sm:flex-row sm:flex-wrap sm:items-center sm:justify-between`,children:[(0,G.jsx)(EA,{selectedKey:o,onSelectionChange:e=>{h(!0),s(String(e))},children:(0,G.jsx)(EA.ListContainer,{className:`w-fit`,children:(0,G.jsxs)(EA.List,{"aria-label":e(`usageTitle`),children:[(0,G.jsxs)(TA,{id:`model`,className:`gap-1.5 whitespace-nowrap`,children:[(0,G.jsx)(EA.Indicator,{className:`transition-none`}),(0,G.jsx)(Bi,{size:14}),e(`usageByModel`)]}),(0,G.jsxs)(TA,{id:`account`,className:`gap-1.5 whitespace-nowrap`,children:[(0,G.jsx)(EA.Indicator,{className:`transition-none`}),(0,G.jsx)(po,{size:14}),e(`usageByAccount`)]}),(0,G.jsxs)(TA,{id:`provider`,className:`gap-1.5 whitespace-nowrap`,children:[(0,G.jsx)(EA.Indicator,{className:`transition-none`}),(0,G.jsx)(Ja,{size:14}),e(`usageByProvider`)]})]})})}),(0,G.jsx)(`span`,{className:`mono text-caption text-muted`,children:m?``:e(`usageRowCount`,{count:P.length})})]}),m?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`divide-y divide-separator md:hidden`,"aria-busy":`true`,children:Array.from({length:4},(e,t)=>(0,G.jsxs)(`div`,{className:`space-y-3 px-5 py-4`,children:[(0,G.jsx)(Q,{className:`h-4 w-40`}),(0,G.jsx)(`div`,{className:`grid grid-cols-2 gap-x-4 gap-y-3`,children:Array.from({length:4},(e,t)=>(0,G.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,G.jsx)(Q,{className:`h-3 w-12`}),(0,G.jsx)(Q,{className:`h-4 w-16`})]},t))})]},t))}),(0,G.jsx)(`div`,{className:`hidden divide-y divide-separator md:block`,"aria-busy":`true`,children:Array.from({length:6},(e,t)=>(0,G.jsxs)(`div`,{className:`flex items-center gap-6 px-5 py-3.5`,children:[(0,G.jsx)(Q,{className:`h-4 w-40`}),(0,G.jsx)(`div`,{className:`flex-1`}),Array.from({length:6},(e,t)=>(0,G.jsx)(Q,{className:`h-4 w-14`},t))]},t))})]}):P.length===0?(0,G.jsxs)(`div`,{className:`flex items-center gap-2 px-5 py-10 text-body text-muted`,children:[(0,G.jsx)(vi,{size:16}),e(`usageEmpty`)]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`divide-y divide-separator md:hidden`,children:P.map(t=>{let n=!!(t.filter&&f),r=[{label:e(`usageColRequests`),value:String(t.count)},{label:e(`usageColSuccess`),value:pV(t.success),tone:t.success<.9?`text-warning`:void 0},{label:e(`statsLatencyP95`),value:dV(t.p95)},{label:e(`usageColTokens`),value:uV(t.tokens),sub:`${uV(t.prompt)} / ${uV(t.completion)}`},{label:e(`usageColCacheWrite`),value:uV(t.cache_write)},{label:e(`usageColCredits`),value:Z9(t.credits)}];return(0,G.jsxs)(`article`,{className:`space-y-3 px-5 py-4 ${n?`cursor-pointer`:``}`,onClick:n?()=>L(t):void 0,onKeyDown:n?e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),L(t))}:void 0,role:n?`button`:void 0,tabIndex:n?0:void 0,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[o===`provider`&&t.filter?(0,G.jsx)(WV,{provider:t.key,size:14}):null,(0,G.jsx)(`span`,{className:`truncate text-body font-medium`,children:t.label})]}),o===`account`&&t.label!==t.key?(0,G.jsx)(`div`,{className:`mono truncate text-caption text-muted`,children:t.key}):null,(0,G.jsx)(`div`,{className:`grid grid-cols-2 gap-x-4 gap-y-3`,children:r.map(e=>(0,G.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,G.jsx)(`div`,{className:`text-caption text-muted`,children:e.label}),(0,G.jsx)(`div`,{className:`mono text-body ${e.tone??`text-foreground`}`,children:e.value}),`sub`in e&&e.sub?(0,G.jsx)(`div`,{className:`mono text-caption text-muted`,children:e.sub}):null]},e.label))})]},t.key)})}),(0,G.jsx)(X,{className:`usage-table hidden md:block`,children:(0,G.jsx)(X.ScrollContainer,{className:`min-w-0 overflow-x-auto`,children:(0,G.jsxs)(X.Content,{"aria-label":e(`usageTitle`),className:`min-w-[48rem]`,sortDescriptor:{column:x,direction:C},onSortChange:e=>{S(String(e.column)),w(e.direction)},children:[(0,G.jsx)(X.Header,{children:R.map(e=>(0,G.jsx)(X.Column,{id:e.id,allowsSorting:!0,isRowHeader:e.id===`label`,className:e.numeric?`text-right`:void 0,children:({sortDirection:t})=>(0,G.jsx)(X.SortableColumnHeader,{sortDirection:t,className:e.numeric?`justify-end`:void 0,children:e.label})},e.id))}),(0,G.jsx)(X.Body,{children:P.map(e=>(0,G.jsxs)(X.Row,{id:e.key,className:e.filter&&f?`cursor-pointer`:void 0,onAction:e.filter&&f?()=>L(e):void 0,children:[(0,G.jsx)(X.Cell,{children:(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[o===`provider`&&e.filter?(0,G.jsx)(WV,{provider:e.key,size:14}):null,(0,G.jsx)(`span`,{className:`truncate text-body font-medium`,children:e.label}),o===`account`&&e.label!==e.key?(0,G.jsx)(`span`,{className:`mono truncate text-caption text-muted`,children:e.key}):null]})}),(0,G.jsx)(X.Cell,{className:`mono text-right text-body`,children:e.count}),(0,G.jsx)(X.Cell,{className:`mono text-right text-body`,children:(0,G.jsx)(`span`,{className:e.success<.9?`text-warning`:void 0,children:pV(e.success)})}),(0,G.jsx)(X.Cell,{className:`mono text-right text-body`,children:dV(e.p95)}),(0,G.jsxs)(X.Cell,{className:`text-right`,children:[(0,G.jsx)(`div`,{className:`mono text-body`,children:uV(e.tokens)}),(0,G.jsxs)(`div`,{className:`mono text-caption text-muted`,children:[uV(e.prompt),` / `,uV(e.completion)]})]}),(0,G.jsx)(X.Cell,{className:`mono text-right text-body`,children:uV(e.cache_write)}),(0,G.jsx)(X.Cell,{className:`mono text-right text-body`,children:Z9(e.credits)})]},e.key))})]})})})]})]}),(0,G.jsx)(yEe,{accounts:y,t:e})]});return(0,G.jsxs)(`div`,{className:`space-y-6 sm:space-y-6`,children:[(0,G.jsxs)(`section`,{className:`flex flex-wrap items-end justify-between gap-3 pb-1`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h2`,{className:`text-title font-semibold`,children:e(`usageTitle`)}),(0,G.jsx)(`p`,{className:`mt-1 max-w-2xl text-body leading-6 text-muted`,children:e(i===`cost`?`usageCostLead`:`usageLead`)})]}),(0,G.jsx)(L9,{ariaLabel:e(`logsColApiKey`),value:T,onChange:e=>{h(!0),E(e)},options:D,allLabel:e(`logsFilterApiKeyAll`),searchPlaceholder:e(`logsSearchApiKey`),emptyLabel:e(`logsNoFilterOptions`)})]}),(0,G.jsxs)(EA,{selectedKey:i,onSelectionChange:e=>a(String(e)),children:[(0,G.jsx)(EA.ListContainer,{className:`w-fit`,children:(0,G.jsxs)(EA.List,{"aria-label":e(`usageTitle`),children:[(0,G.jsxs)(TA,{id:`stats`,className:`gap-1.5 whitespace-nowrap`,children:[(0,G.jsx)(EA.Indicator,{className:`transition-none`}),e(`usageStatsTab`)]}),(0,G.jsxs)(TA,{id:`cost`,className:`gap-1.5 whitespace-nowrap`,children:[(0,G.jsx)(EA.Indicator,{className:`transition-none`}),e(`usageCostTab`)]})]})}),(0,G.jsx)(EA.Panel,{id:`stats`,className:`space-y-6 pt-5`,children:z}),(0,G.jsx)(EA.Panel,{id:`cost`,className:`pt-5`,children:(0,G.jsx)(TEe,{apiKeyFilter:T})})]})]})}var jEe=1.1;function MEe({label:e,onConfirm:t,isPending:n,children:r}){let i=(0,v.useRef)(null),a=(0,v.useRef)(null);return(0,v.useEffect)(()=>()=>{a.current?.kill()},[]),(0,G.jsxs)(Aj,{delay:300,children:[(0,G.jsx)(Aj.Trigger,{children:(0,G.jsxs)(J,{isIconOnly:!0,size:`sm`,variant:`ghost`,"aria-label":e,isPending:n,className:`relative overflow-hidden`,onPressStart:()=>{let e=i.current;!e||n||(a.current?.kill(),a.current=Z.to(e,{scaleX:1,duration:jEe*(1-Number(Z.getProperty(e,`scaleX`))),ease:VB.linear,onComplete:()=>{a.current=null,Z.to(e,{scaleX:0,duration:UB()?0:BB.base,ease:VB.out,delay:BB.fast}),t()}}))},onPressEnd:()=>{let e=i.current;!e||!a.current||(a.current.kill(),a.current=null,Z.to(e,{scaleX:0,duration:UB()?0:BB.base,ease:VB.soft}))},children:[(0,G.jsx)(`span`,{ref:i,"aria-hidden":!0,className:`pointer-events-none absolute inset-0 origin-left scale-x-0 bg-danger/20`}),(0,G.jsx)(`span`,{className:`relative inline-flex`,children:r})]})}),(0,G.jsx)(Aj.Content,{children:e})]})}function NEe(e){let t=[];for(let n of e)for(let e of n.regions||[])e?.id&&t.push({value:`${n.id}:${e.id}`,provider:n.id,region:e.id});return t}function Q9(e,t){let n=e.indexOf(`:`),r=n===-1?e:e.slice(0,n),i=n===-1?``:e.slice(n+1);return i?UV(r,i,t):HV(r,t)}function PEe(e){let t=e.indexOf(`:`);return t===-1?e:e.slice(0,t)}function FEe(e,t){let n=[],r=new Set(e.filter(e=>!e.includes(`:`)).map(e=>e.toLowerCase()));for(let t of e)t.includes(`:`)&&n.push(t);for(let e of t)r.has(e.provider)&&!n.includes(e.value)&&n.push(e.value);return n}function IEe(e,t){return e.length?e.map(e=>Q9(e,t)).join(` · `):t(`keysAllProviders`)}function LEe(e){if(!e)return``;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function REe(){let{t:e}=GF(),[t,n]=(0,v.useState)([]),[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)([]),[l,u]=(0,v.useState)(!0),[d,f]=(0,v.useState)(``),[p,m]=(0,v.useState)(``),[h,g]=(0,v.useState)(!1),[_,y]=(0,v.useState)(null),[b,x]=(0,v.useState)(null),[S,C]=(0,v.useState)(!1);(0,v.useEffect)(()=>{cI().then(e=>{let t=NEe(e.data||[]);n(t),i(t.length>0),o(``)}).catch(e=>{o(e instanceof Error?e.message:String(e))})},[]);async function w(){u(!0);try{let e=await N9();c(e.data||[]),m(``)}catch(e){m(e instanceof Error?e.message:String(e))}finally{u(!1)}}(0,v.useEffect)(()=>{let e=window.setTimeout(()=>void w(),0);return()=>window.clearTimeout(e)},[]);async function T(e){await U7(e),C(!0),window.setTimeout(()=>C(!1),1200)}async function E(e,t){f(e.id),c(n=>n.map(n=>n.id===e.id?{...n,enabled:t}:n));try{let n=await P9(e.id,{enabled:t});c(t=>t.map(t=>t.id===e.id?{...t,...n,secret:void 0}:t))}catch(e){m(e instanceof Error?e.message:String(e)),await w()}finally{f(``)}}async function D(t){f(t.id);try{await $Te(t.id),c(e=>e.filter(e=>e.id!==t.id)),sV({type:`success`,title:e(`toastKeyDeleted`)})}catch(e){m(e instanceof Error?e.message:String(e))}finally{f(``)}}return l&&!s.length?(0,G.jsx)(Bce,{}):(0,G.jsxs)(`div`,{className:`space-y-6`,children:[(0,G.jsxs)(`section`,{className:`flex flex-wrap items-end justify-between gap-4 pb-4`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h2`,{"data-gsap-reveal":!0,className:`text-title font-semibold`,children:e(`navKeys`)}),(0,G.jsx)(`p`,{className:`mt-1 max-w-2xl text-body leading-6 text-muted`,children:e(`keysLead`)})]}),(0,G.jsxs)(J,{size:`sm`,isDisabled:!r,onPress:()=>g(!0),children:[(0,G.jsx)(Ma,{size:14}),e(`keysCreate`)]})]}),p?(0,G.jsx)(vI,{title:p}):null,a?(0,G.jsx)(vI,{title:e(`keysProvidersLoadFailed`,{message:a})}):null,l?(0,G.jsx)(`section`,{className:`grid gap-2.5 lg:grid-cols-2 xl:grid-cols-3`,"aria-busy":!0,children:Array.from({length:Math.max(3,s.length)},(e,t)=>(0,G.jsxs)(`div`,{className:`overflow-hidden rounded-3xl bg-surface shadow-surface p-3`,children:[(0,G.jsx)(Q,{className:`h-4 w-28`}),(0,G.jsx)(Q,{className:`mt-2 h-3 w-40`}),(0,G.jsx)(Q,{className:`mt-4 h-6 w-24`}),(0,G.jsx)(Q,{className:`mt-6 h-8 w-full`})]},t))}):s.length?(0,G.jsx)(`section`,{className:`grid gap-2.5 lg:grid-cols-2 xl:grid-cols-3`,children:s.map(t=>(0,G.jsxs)(xS,{className:`overflow-hidden p-0`,children:[(0,G.jsxs)(xS.Header,{className:`flex-row items-start justify-between gap-3 px-3 pt-3 pb-2.5`,children:[(0,G.jsx)(`div`,{className:`min-w-0`,children:(0,G.jsx)(xS.Title,{className:`truncate text-body`,children:t.name})}),(0,G.jsx)(RS,{size:`sm`,variant:`soft`,color:t.enabled?`success`:`default`,children:t.enabled?e(`enabled`):e(`disabled`)})]}),(0,G.jsxs)(xS.Content,{className:`space-y-2.5 px-3 pb-2.5`,children:[(0,G.jsx)(`div`,{className:`mono w-full rounded-lg bg-surface-secondary px-3 py-2 text-body text-foreground`,title:t.prefix,children:t.prefix}),(0,G.jsx)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:(t.providers.length?t.providers:[`all`]).map(t=>(0,G.jsx)(RS,{size:`sm`,variant:`soft`,children:(0,G.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[t===`all`?(0,G.jsx)(ua,{size:12}):(0,G.jsx)(WV,{provider:PEe(t),size:12}),(0,G.jsx)(`span`,{children:t===`all`?e(`keysAllProviders`):Q9(t,e)})]})},t))}),(0,G.jsxs)(`p`,{className:`text-caption leading-5 text-muted`,children:[t.max_inflight>0?e(`keysMaxInflightValue`,{count:t.max_inflight}):e(`keysMaxInflightUnlimited`),` · `,t.last_used_at?e(`keysLastUsed`,{time:LEe(t.last_used_at)}):e(`keysNeverUsed`)]})]}),(0,G.jsxs)(xS.Footer,{className:`gap-1.5 bg-surface-secondary px-3 py-2`,children:[(0,G.jsx)(J,{size:`sm`,variant:`ghost`,isDisabled:!r,onPress:()=>y(t),children:e(`edit`)}),(0,G.jsx)(MEe,{label:e(`holdToDelete`),isPending:d===t.id,onConfirm:()=>void D(t),children:(0,G.jsx)(io,{size:14})}),(0,G.jsx)(`div`,{className:`ml-auto`,children:(0,G.jsx)(s7,{isSelected:t.enabled,isDisabled:d===t.id,ariaLabel:e(`enable`),onChange:e=>void E(t,e)})})]})]},t.id))}):(0,G.jsx)(O7,{className:`rounded-3xl bg-surface-secondary`,icon:(0,G.jsx)(KB,{size:28}),title:e(`keysEmpty`),hint:e(`keysEmptyHint`),action:(0,G.jsxs)(J,{size:`sm`,isDisabled:!r,onPress:()=>g(!0),children:[(0,G.jsx)(Ma,{size:14}),e(`keysCreate`)]})}),(0,G.jsx)($9,{isOpen:h,title:e(`keysCreateTitle`),hint:e(`keysCreateHint`),options:t,t:e,onClose:()=>g(!1),onSave:async e=>{let t=await QTe(e);c(e=>[t,...e.map(e=>({...e,secret:void 0}))]),g(!1),x(t)}}),(0,G.jsx)($9,{isOpen:!!_,title:e(`keysEditTitle`),hint:e(`keysEditHint`),initial:_,options:t,t:e,onClose:()=>y(null),onSave:async e=>{if(!_)return;let t=await P9(_.id,e);c(e=>e.map(e=>e.id===_.id?{...e,...t,secret:void 0}:e)),y(null)}}),(0,G.jsx)(Y.Root,{isOpen:!!b?.secret,onOpenChange:e=>{e||x(null)},children:(0,G.jsx)(Y.Backdrop,{variant:`blur`,children:(0,G.jsx)(Y.Container,{placement:`center`,size:`lg`,children:(0,G.jsxs)(Y.Dialog,{children:[(0,G.jsxs)(Y.Header,{className:`items-start justify-between gap-4 px-6 pt-6`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(Y.Heading,{className:`text-section font-semibold`,children:e(`keysSecretTitle`)}),(0,G.jsx)(`p`,{className:`mt-1.5 text-body leading-6 text-muted`,children:e(`keysSecretHint`)})]}),(0,G.jsx)(Y.CloseTrigger,{"aria-label":e(`close`),className:`grid size-9 place-items-center rounded-lg text-muted hover:bg-surface-secondary`,children:(0,G.jsx)(yo,{size:18})})]}),(0,G.jsxs)(Y.Body,{className:`px-6 pb-2`,children:[(0,G.jsxs)(mP,{status:`warning`,className:`mb-4`,children:[(0,G.jsx)(mP.Indicator,{}),(0,G.jsx)(mP.Content,{children:(0,G.jsx)(mP.Title,{children:e(`keysSecretOnce`)})})]}),(0,G.jsx)(`code`,{className:`mono block break-all rounded-lg bg-surface-secondary px-3 py-3 text-body`,children:b?.secret})]}),(0,G.jsxs)(Y.Footer,{className:`justify-end`,children:[(0,G.jsx)(J,{variant:`ghost`,onPress:()=>x(null),children:e(`close`)}),(0,G.jsxs)(J,{onPress:()=>{b?.secret&&T(b.secret)},children:[(0,G.jsx)(Ii,{size:14}),e(S?`copied`:`copy`)]})]})]})})})})]})}function $9({isOpen:e,title:t,hint:n,initial:r,options:i,t:a,onClose:o,onSave:s}){let[c,l]=(0,v.useState)(r?.name||``),[u,d]=(0,v.useState)(r?.max_inflight||0),[f,p]=(0,v.useState)([]),[m,h]=(0,v.useState)(new Set),[g,_]=(0,v.useState)(!0),[y,b]=(0,v.useState)(``),[x,S]=(0,v.useState)(!1);(0,v.useEffect)(()=>{if(!e)return;l(r?.name||``),d(r?.max_inflight||0),p(FEe(r?.providers||[],i));let t=new Set((r?.providers||[]).filter(e=>!e.includes(`:`)).map(e=>e.toLowerCase()));h(t),_(!0),b(``)},[r,e,i]);function C(e){let t=i.find(t=>t.value===e);_(!1),p(n=>n.includes(e)?(t&&h(e=>{let n=new Set(e);return n.delete(t.provider),n}),n.filter(t=>t!==e)):[...n,e])}async function w(e){e?.preventDefault();let t=c.trim();if(!t){b(a(`keysNameRequired`));return}if(!Number.isInteger(u)||u<0||u>256){b(a(`keysMaxInflightInvalid`));return}if(!i.length){b(a(`keysProvidersNotLoaded`));return}S(!0),b(``);try{await s({name:t,providers:g?r?.providers||[]:f,max_inflight:u})}catch(e){b(e instanceof Error?e.message:String(e))}finally{S(!1)}}return(0,G.jsx)(Y.Root,{isOpen:e,onOpenChange:e=>{!e&&!x&&o()},children:(0,G.jsx)(Y.Backdrop,{variant:`blur`,children:(0,G.jsx)(Y.Container,{placement:`center`,size:`lg`,scroll:`inside`,children:(0,G.jsx)(Y.Dialog,{className:`sm:min-w-[32rem]`,children:(0,G.jsxs)(dP,{onSubmit:w,children:[(0,G.jsxs)(Y.Header,{className:`items-start justify-between gap-4 px-6 pt-6`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(Y.Heading,{className:`text-section font-semibold`,children:t}),(0,G.jsx)(`p`,{className:`mt-1.5 text-body leading-6 text-muted`,children:n})]}),(0,G.jsx)(Y.CloseTrigger,{isDisabled:x,"aria-label":a(`close`),className:`grid size-9 place-items-center rounded-lg text-muted hover:bg-surface-secondary`,children:(0,G.jsx)(yo,{size:18})})]}),(0,G.jsxs)(Y.Body,{className:`space-y-5 px-6 pb-2 pt-1`,children:[y?(0,G.jsxs)(mP,{status:`danger`,children:[(0,G.jsx)(mP.Indicator,{}),(0,G.jsx)(mP.Content,{children:(0,G.jsx)(mP.Title,{children:y})})]}):null,(0,G.jsx)(u9,{label:a(`keysName`),children:(0,G.jsx)(Ij,{value:c,onChange:e=>l(e.target.value),placeholder:a(`keysNamePh`),"aria-label":a(`keysName`)})}),(0,G.jsx)(u9,{label:a(`keysMaxInflight`),hint:a(`keysMaxInflightHint`),children:(0,G.jsx)(OP,{value:u,onChange:e=>d(e??0),minValue:0,maxValue:256,isDisabled:x,children:(0,G.jsxs)(OP.Group,{children:[(0,G.jsx)(OP.DecrementButton,{}),(0,G.jsx)(OP.Input,{"aria-label":a(`keysMaxInflight`)}),(0,G.jsx)(OP.IncrementButton,{})]})})}),(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsx)(kM,{className:`text-body font-medium text-muted`,children:a(`keysProviders`)}),(0,G.jsx)(jM,{className:`text-caption leading-5 text-muted`,children:a(`keysProvidersHint`)}),i.length?(0,G.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:i.map(e=>{let t=f.includes(e.value),n=m.has(e.provider);return(0,G.jsx)(PS,{isSelected:t,onChange:()=>C(e.value),className:`rounded-xl bg-surface-secondary px-3 py-2.5 data-selected:border-accent data-selected:bg-accent-soft`,children:(0,G.jsxs)(PS.Content,{className:`flex items-center gap-2.5`,children:[(0,G.jsx)(PS.Control,{children:(0,G.jsx)(PS.Indicator,{})}),(0,G.jsx)(WV,{provider:e.provider,size:16}),(0,G.jsx)(`span`,{className:`text-body font-medium`,children:UV(e.provider,e.region,a)}),n?(0,G.jsx)(`span`,{className:`rounded-md bg-surface-secondary px-1.5 py-0.5 text-caption font-medium text-muted`,children:a(`keysAllRegions`)}):null]})},e.value)})}):(0,G.jsx)(`p`,{className:`rounded-lg bg-surface-secondary px-3 py-2.5 text-caption leading-5 text-muted`,children:a(`keysProvidersNotLoaded`)}),(0,G.jsx)(`p`,{className:`text-caption text-muted`,children:IEe(f,a)})]})]}),(0,G.jsxs)(Y.Footer,{className:`justify-end`,children:[(0,G.jsx)(J,{variant:`ghost`,isDisabled:x,onPress:o,children:a(`cancel`)}),(0,G.jsx)(J,{type:`submit`,isPending:x,isDisabled:!i.length,children:a(r?`save`:`create`)})]})]})})})})})}function zEe(){return(0,G.jsx)(_se,{children:(0,G.jsx)(Qoe,{children:(0,G.jsx)($oe,{children:(0,G.jsx)(hse,{children:(0,G.jsx)(xn,{children:(0,G.jsxs)(Pt,{children:[(0,G.jsx)(Mt,{path:`/login`,element:(0,G.jsx)(ZTe,{})}),(0,G.jsx)(Mt,{element:(0,G.jsx)(sle,{}),children:(0,G.jsxs)(Mt,{element:(0,G.jsx)(ole,{}),children:[(0,G.jsx)(Mt,{path:`/`,element:(0,G.jsx)(dwe,{})}),(0,G.jsx)(Mt,{path:`/auth`,element:(0,G.jsx)(At,{to:`/accounts`,replace:!0})}),(0,G.jsx)(Mt,{path:`/providers`,element:(0,G.jsx)(bwe,{})}),(0,G.jsx)(Mt,{path:`/access`,element:(0,G.jsx)(qwe,{})}),(0,G.jsx)(Mt,{path:`/accounts`,element:(0,G.jsx)(XTe,{})}),(0,G.jsx)(Mt,{path:`/checkins`,element:(0,G.jsx)(At,{to:`/accounts`,replace:!0})}),(0,G.jsx)(Mt,{path:`/usage`,element:(0,G.jsx)(AEe,{})}),(0,G.jsx)(Mt,{path:`/logs`,element:(0,G.jsx)(_Ee,{})}),(0,G.jsx)(Mt,{path:`/keys`,element:(0,G.jsx)(REe,{})}),(0,G.jsx)(Mt,{path:`/system`,element:(0,G.jsx)(sEe,{})}),(0,G.jsx)(Mt,{path:`*`,element:(0,G.jsx)(At,{to:`/`,replace:!0})})]})})]})})})})})})}(0,y.createRoot)(document.getElementById(`root`)).render((0,G.jsx)(v.StrictMode,{children:(0,G.jsx)(zEe,{})}));export{QJ as $,MU as $t,P_e as A,UW as At,Y2 as B,TW as Bt,f6 as C,h as Cn,KW as Ct,s3 as D,DW as Dt,mve as E,MW as Et,A4 as F,AW as Ft,SZ as G,LW as Gt,s2 as H,RW as Ht,j4 as I,EW as It,uZ as J,xW as Jt,gZ as K,CW as Kt,qge as L,PW as Lt,I_e as M,VW as Mt,F_e as N,HW as Nt,Q_e as O,FW as Ot,H4 as P,BW as Pt,OY as Q,AU as Qt,Hge as R,wW as Rt,g6 as S,Is as Sn,qW as St,s6 as T,l as Tn,NW as Tt,K0 as U,zW as Ut,J2 as V,OW as Vt,GZ as W,IW as Wt,LY as X,dde as Xt,QY as Y,bW as Yt,IY as Z,OU as Zt,E6 as _,uV as _n,$ as _t,q8 as a,xU as an,KJ as at,v6 as b,Z as bn,YW as bt,D8 as c,hU as cn,zq as ct,s8 as d,cU as dn,kq as dt,EU as en,ZJ as et,W6 as f,oU as fn,Vq as ft,k6 as g,_V as gn,sG as gt,M6 as h,CV as hn,yq as ht,t5 as i,bU as in,qJ as it,X4 as j,WW as jt,n3 as k,kW as kt,C8 as l,mU as ln,Nq as lt,I6 as m,wV as mn,Dq as mt,Q5 as n,SU as nn,XJ as nt,k8 as o,yU as on,_J as ot,V6 as p,sU as pn,Tq as pt,_Z as q,SW as qt,o5 as r,FU as rn,YJ as rt,O8 as s,vU as sn,dJ as st,$5 as t,TU as tn,$J as tt,h8 as u,fU as un,Oq as ut,T6 as v,yV as vn,ZW as vt,i6 as w,d as wn,yde as wt,_6 as x,qc as xn,JW as xt,b6 as y,dV as yn,$W as yt,Bge as z,jW as zt}; \ No newline at end of file diff --git a/internal/webui/static/index.html b/internal/webui/static/index.html index e75bfec1..76cd153f 100644 --- a/internal/webui/static/index.html +++ b/internal/webui/static/index.html @@ -19,7 +19,7 @@ - +