@oomol-lab/open-flow 0.1.0-alpha.12 → 0.1.0-alpha.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { a as e, f as t, r as n } from "./dist-C46JByB-.js";
2
- import { $ as r, $t as i, A as a, An as o, Ar as s, At as c, B as l, Bn as u, Br as d, Bt as f, C as p, Cn as m, Cr as h, Ct as g, D as _, Dn as v, Dr as y, E as b, En as x, Er as S, Fn as C, Fr as w, Ft as T, G as E, Gn as D, Gt as O, H as k, Hn as A, Ht as j, I as M, In as N, Ir as P, It as F, J as I, Jn as ee, Jt as te, K as ne, Kt as L, L as re, Ln as ie, Lr as R, Lt as z, M as ae, Mn as oe, Mr as se, N as B, Nn as ce, Nr as V, O as le, On as H, Or as ue, Ot as de, Pn as fe, Pr as pe, Pt as me, Q as he, Qt as ge, Rn as _e, Rr as ve, Rt as ye, S as be, Sn as xe, St as Se, T as Ce, Tn as we, Tr as Te, Tt as Ee, U as De, Un as Oe, Ut as ke, V as Ae, Vn as je, Vr as Me, Vt as Ne, W as Pe, Wt as Fe, Xt as Ie, Y as Le, Yn as Re, Yt as ze, Zt as Be, _n as Ve, _r as He, _t as U, a as Ue, an as We, bn as Ge, br as W, cn as Ke, ct as qe, dn as Je, dr as Ye, dt as Xe, en as Ze, et as Qe, fn as $e, fr as et, ft as tt, gn as nt, gt as rt, hn as it, hr as at, ht as ot, i as st, in as ct, ir as lt, j as ut, jn as dt, jr as ft, jt as pt, k as mt, kn as ht, kr as gt, kt as _t, ln as vt, lr as yt, mn as bt, mr as xt, mt as St, nn as Ct, nt as wt, o as Tt, on as Et, or as Dt, ot as Ot, p as kt, pn as At, pr as jt, pt as Mt, q as Nt, qt as Pt, r as Ft, rn as It, rt as Lt, sn as Rt, sr as zt, st as Bt, t as Vt, tn as Ht, tt as Ut, un as Wt, ur as Gt, vn as Kt, vr as qt, vt as Jt, w as Yt, wn as Xt, wr as Zt, wt as Qt, xn as $t, xr as en, yn as tn, yr as nn, zn as rn, zr as an, zt as on } from "./useOpenInteractionType-CRgOHg5M.js";
2
+ import { $ as r, $t as i, A as a, An as o, Ar as s, At as c, B as l, Bn as u, Br as d, Bt as f, C as p, Cn as m, Ct as h, D as g, Dn as _, Dr as v, E as y, En as b, Er as x, Fn as S, Fr as C, Ft as w, G as T, Gt as E, H as D, Hn as O, Hr as k, Ht as A, I as j, In as M, Ir as N, It as P, J as F, Jt as ee, K as te, Kn as ne, Kt as re, L as ie, Ln as I, Lr as L, Lt as R, M as ae, Mn as oe, Mr as z, N as se, Nn as ce, Nr as le, O as ue, On as B, Or as V, Ot as de, Pn as fe, Pr as pe, Pt as me, Q as he, Qt as ge, Rn as _e, Rr as ve, S as ye, Sn as be, Sr as xe, St as Se, T as Ce, Tn as we, Tr as Te, Tt as Ee, U as De, Un as Oe, Ut as ke, V as Ae, Vn as je, Vr as Me, Vt as Ne, W as Pe, Wn as Fe, Wt as Ie, Xn as Le, Xt as Re, Y as ze, Yn as Be, Yt as Ve, Zt as He, _n as Ue, _t as H, a as We, an as Ge, ar as Ke, bn as qe, br as Je, cn as Ye, cr as Xe, ct as Ze, dn as Qe, dr as $e, dt as et, en as tt, et as nt, fn as rt, fr as it, ft as at, gn as ot, gr as st, gt as ct, hn as lt, hr as ut, ht as dt, i as ft, in as pt, j as mt, jn as ht, jr as gt, jt as _t, k as vt, kn as yt, kr as bt, kt as xt, ln as St, mn as Ct, mr as wt, mt as Tt, nn as Et, nt as Dt, o as Ot, on as kt, ot as At, p as jt, pn as Mt, pr as Nt, pt as Pt, q as Ft, qt as It, r as Lt, rn as Rt, rt as zt, sn as Bt, sr as Vt, st as Ht, t as Ut, tn as Wt, tt as Gt, un as Kt, ur as qt, vn as Jt, vr as Yt, vt as Xt, w as Zt, wn as Qt, wr as U, wt as $t, xn as en, xr as W, yn as tn, yr as nn, zn as rn, zr as an, zt as on } from "./useOpenInteractionType-BtV5cRut.js";
3
3
  import { a as sn, r as cn } from "./languages-DgJehE1g.js";
4
4
  import "./lib-C5Ipyfps.js";
5
5
  import * as G from "react";
@@ -10,7 +10,7 @@ import * as fn from "react-dom";
10
10
  var pn = /*#__PURE__*/ G.createContext({
11
11
  formRef: { current: { fields: /* @__PURE__ */ new Map() } },
12
12
  errors: {},
13
- clearErrors: et,
13
+ clearErrors: Nt,
14
14
  validationMode: "onSubmit",
15
15
  submitAttemptedRef: { current: !1 }
16
16
  });
@@ -20,16 +20,16 @@ function mn() {
20
20
  }
21
21
  //#endregion
22
22
  //#region ../../node_modules/.bun/lucide-react@0.468.0+f4eacebf2041cd4f/node_modules/lucide-react/dist/esm/icons/check.js
23
- var hn = ot("Check", [["path", {
23
+ var hn = dt("Check", [["path", {
24
24
  d: "M20 6 9 17l-5-5",
25
25
  key: "1gmf2c"
26
- }]]), gn = ot("ChevronDown", [["path", {
26
+ }]]), gn = dt("ChevronDown", [["path", {
27
27
  d: "m6 9 6 6 6-6",
28
28
  key: "qrunsl"
29
- }]]), _n = ot("ChevronRight", [["path", {
29
+ }]]), _n = dt("ChevronRight", [["path", {
30
30
  d: "m9 18 6-6-6-6",
31
31
  key: "mthhwq"
32
- }]]), vn = ot("LoaderCircle", [["path", {
32
+ }]]), vn = dt("LoaderCircle", [["path", {
33
33
  d: "M21 12a9 9 0 1 1-6.219-8.56",
34
34
  key: "13zald"
35
35
  }]]);
@@ -40,7 +40,7 @@ function yn({ className: e, ...t }) {
40
40
  "data-slot": "spinner",
41
41
  role: "status",
42
42
  "aria-label": "Loading",
43
- className: Dt("size-4 animate-spin", e),
43
+ className: Vt("size-4 animate-spin", e),
44
44
  ...t
45
45
  });
46
46
  }
@@ -1207,6 +1207,7 @@ var fr = class {
1207
1207
  draftConflict: "The Draft changed elsewhere. Loaded the latest revision; your edit was not applied.",
1208
1208
  draftUpdated: "The Draft changed in another client. Loaded the latest revision.",
1209
1209
  flowDeleted: "Deleted {{name}}.",
1210
+ flowDeleteAccepted: "Deleting {{name}}.",
1210
1211
  flowRenamed: "Renamed the Flow to {{name}}.",
1211
1212
  layoutConflict: "The layout changed elsewhere. Loaded the latest layout; your move was not applied.",
1212
1213
  moduleUpdated: "The Draft changed elsewhere. Your local code is preserved; review it before saving again.",
@@ -1699,6 +1700,7 @@ var fr = class {
1699
1700
  draftConflict: "草稿已在其他位置发生变化。已加载最新修订,本次编辑未应用。",
1700
1701
  draftUpdated: "草稿已在其他客户端发生变化,已加载最新修订。",
1701
1702
  flowDeleted: "已删除 {{name}}。",
1703
+ flowDeleteAccepted: "正在删除 {{name}}。",
1702
1704
  flowRenamed: "已将 Flow 重命名为 {{name}}。",
1703
1705
  layoutConflict: "布局已在其他位置发生变化。已加载最新布局,本次移动未应用。",
1704
1706
  moduleUpdated: "草稿已在其他位置发生变化。你的本地代码仍保留,请检查后再保存。",
@@ -2191,6 +2193,7 @@ var fr = class {
2191
2193
  draftConflict: "草稿已在其他地方變更。已載入最新修訂,這次的編輯未套用。",
2192
2194
  draftUpdated: "草稿已在其他用戶端變更,已載入最新修訂。",
2193
2195
  flowDeleted: "已刪除 {{name}}。",
2196
+ flowDeleteAccepted: "正在刪除 {{name}}。",
2194
2197
  flowRenamed: "已將 Flow 重新命名為 {{name}}。",
2195
2198
  layoutConflict: "版面已在其他地方變更。已載入最新版面,這次的移動未套用。",
2196
2199
  moduleUpdated: "草稿已在其他地方變更。本機程式碼仍保留,請檢查後再儲存。",
@@ -2683,6 +2686,7 @@ var fr = class {
2683
2686
  draftConflict: "ドラフトが別の場所で変更されました。最新のリビジョンを読み込んだため、今回の編集は反映されていません。",
2684
2687
  draftUpdated: "ドラフトが別のクライアントで変更されました。最新のリビジョンを読み込みました。",
2685
2688
  flowDeleted: "{{name}} を削除しました。",
2689
+ flowDeleteAccepted: "{{name}} を削除しています。",
2686
2690
  flowRenamed: "Flow の名前を {{name}} に変更しました。",
2687
2691
  layoutConflict: "レイアウトが別の場所で変更されました。最新のレイアウトを読み込んだため、今回の移動は反映されていません。",
2688
2692
  moduleUpdated: "ドラフトが別の場所で変更されました。ローカルのコードは保持されているので、確認してから保存し直してください。",
@@ -3175,6 +3179,7 @@ var fr = class {
3175
3179
  draftConflict: "다른 곳에서 초안이 변경되었습니다. 최신 리비전을 불러왔으며, 이번 편집은 적용되지 않았습니다.",
3176
3180
  draftUpdated: "다른 클라이언트에서 초안이 변경되어 최신 리비전을 불러왔습니다.",
3177
3181
  flowDeleted: "{{name}} 삭제를 완료했습니다.",
3182
+ flowDeleteAccepted: "{{name}}을(를) 삭제하는 중입니다.",
3178
3183
  flowRenamed: "Flow 이름을 {{name}}(으)로 변경했습니다.",
3179
3184
  layoutConflict: "다른 곳에서 레이아웃이 변경되었습니다. 최신 레이아웃을 불러왔으며, 이번 이동은 적용되지 않았습니다.",
3180
3185
  moduleUpdated: "다른 곳에서 초안이 변경되었습니다. 로컬 코드는 그대로 유지되므로 다시 저장하기 전에 확인하세요.",
@@ -3667,6 +3672,7 @@ var fr = class {
3667
3672
  draftConflict: "Черновик изменён в другом месте. Загружена последняя ревизия, ваша правка не применена.",
3668
3673
  draftUpdated: "Черновик изменён в другом клиенте. Загружена последняя ревизия.",
3669
3674
  flowDeleted: "Удалено: {{name}}.",
3675
+ flowDeleteAccepted: "Удаление {{name}}.",
3670
3676
  flowRenamed: "Flow переименован в {{name}}.",
3671
3677
  layoutConflict: "Расположение изменено в другом месте. Загружено последнее расположение, ваше перемещение не применено.",
3672
3678
  moduleUpdated: "Черновик изменён в другом месте. Ваш локальный код сохранён, проверьте его перед следующим сохранением.",
@@ -4159,6 +4165,7 @@ var fr = class {
4159
4165
  draftConflict: "Le Brouillon a changé ailleurs. La dernière révision a été chargée\xA0; votre modification n'a pas été appliquée.",
4160
4166
  draftUpdated: "Le Brouillon a changé dans un autre client. La dernière révision a été chargée.",
4161
4167
  flowDeleted: "{{name}} supprimé.",
4168
+ flowDeleteAccepted: "Suppression de {{name}}.",
4162
4169
  flowRenamed: "Le Flow a été renommé en {{name}}.",
4163
4170
  layoutConflict: "La disposition a changé ailleurs. La dernière disposition a été chargée\xA0; votre déplacement n'a pas été appliqué.",
4164
4171
  moduleUpdated: "Le Brouillon a changé ailleurs. Votre code local est conservé\xA0; vérifiez-le avant de l'enregistrer à nouveau.",
@@ -4437,18 +4444,18 @@ function br(e = "en") {
4437
4444
  function xr({ className: e, ...t }) {
4438
4445
  return /* @__PURE__ */ K("div", {
4439
4446
  "data-slot": "empty",
4440
- className: Dt("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance", e),
4447
+ className: Vt("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance", e),
4441
4448
  ...t
4442
4449
  });
4443
4450
  }
4444
4451
  function Sr({ className: e, ...t }) {
4445
4452
  return /* @__PURE__ */ K("div", {
4446
4453
  "data-slot": "empty-header",
4447
- className: Dt("flex max-w-sm flex-col items-center gap-2", e),
4454
+ className: Vt("flex max-w-sm flex-col items-center gap-2", e),
4448
4455
  ...t
4449
4456
  });
4450
4457
  }
4451
- var Cr = zt("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
4458
+ var Cr = Xe("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
4452
4459
  variants: { variant: {
4453
4460
  default: "bg-transparent",
4454
4461
  icon: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"
@@ -4459,7 +4466,7 @@ function wr({ className: e, variant: t = "default", ...n }) {
4459
4466
  return /* @__PURE__ */ K("div", {
4460
4467
  "data-slot": "empty-icon",
4461
4468
  "data-variant": t,
4462
- className: Dt(Cr({
4469
+ className: Vt(Cr({
4463
4470
  variant: t,
4464
4471
  className: e
4465
4472
  })),
@@ -4469,21 +4476,21 @@ function wr({ className: e, variant: t = "default", ...n }) {
4469
4476
  function Tr({ className: e, ...t }) {
4470
4477
  return /* @__PURE__ */ K("div", {
4471
4478
  "data-slot": "empty-title",
4472
- className: Dt("text-sm font-medium tracking-tight", e),
4479
+ className: Vt("text-sm font-medium tracking-tight", e),
4473
4480
  ...t
4474
4481
  });
4475
4482
  }
4476
4483
  function Er({ className: e, ...t }) {
4477
4484
  return /* @__PURE__ */ K("div", {
4478
4485
  "data-slot": "empty-description",
4479
- className: Dt("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", e),
4486
+ className: Vt("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", e),
4480
4487
  ...t
4481
4488
  });
4482
4489
  }
4483
4490
  function Dr({ className: e, ...t }) {
4484
4491
  return /* @__PURE__ */ K("div", {
4485
4492
  "data-slot": "empty-content",
4486
- className: Dt("flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance", e),
4493
+ className: Vt("flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance", e),
4487
4494
  ...t
4488
4495
  });
4489
4496
  }
@@ -4493,11 +4500,11 @@ function Or({ className: e, ...t }) {
4493
4500
  return /* @__PURE__ */ K("div", {
4494
4501
  "data-slot": "input-group",
4495
4502
  role: "group",
4496
- className: Dt("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5", e),
4503
+ className: Vt("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5", e),
4497
4504
  ...t
4498
4505
  });
4499
4506
  }
4500
- var kr = zt("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
4507
+ var kr = Xe("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
4501
4508
  variants: { align: {
4502
4509
  "inline-start": "order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
4503
4510
  "inline-end": "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
@@ -4511,7 +4518,7 @@ function Ar({ className: e, align: t = "inline-start", ...n }) {
4511
4518
  role: "group",
4512
4519
  "data-slot": "input-group-addon",
4513
4520
  "data-align": t,
4514
- className: Dt(kr({ align: t }), e),
4521
+ className: Vt(kr({ align: t }), e),
4515
4522
  onClick: (e) => {
4516
4523
  e.target.closest("button") || e.currentTarget.parentElement?.querySelector("input")?.focus();
4517
4524
  },
@@ -4519,10 +4526,10 @@ function Ar({ className: e, align: t = "inline-start", ...n }) {
4519
4526
  });
4520
4527
  }
4521
4528
  var jr = G.forwardRef(function({ className: e, ...t }, n) {
4522
- return /* @__PURE__ */ K(rt, {
4529
+ return /* @__PURE__ */ K(ct, {
4523
4530
  ref: n,
4524
4531
  "data-slot": "input-group-control",
4525
- className: Dt("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", e),
4532
+ className: Vt("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", e),
4526
4533
  ...t
4527
4534
  });
4528
4535
  });
@@ -4531,7 +4538,7 @@ var jr = G.forwardRef(function({ className: e, ...t }, n) {
4531
4538
  function Mr({ className: e, ...t }) {
4532
4539
  return /* @__PURE__ */ K("div", {
4533
4540
  "data-slot": "skeleton",
4534
- className: Dt("animate-pulse rounded-md bg-muted motion-reduce:animate-none", e),
4541
+ className: Vt("animate-pulse rounded-md bg-muted motion-reduce:animate-none", e),
4535
4542
  ...t
4536
4543
  });
4537
4544
  }
@@ -4546,7 +4553,7 @@ var Pr = /*#__PURE__*/ G.createContext(void 0);
4546
4553
  process.env.NODE_ENV !== "production" && (Pr.displayName = "MenuPositionerContext");
4547
4554
  function Fr(e) {
4548
4555
  let t = G.useContext(Pr);
4549
- if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? qt(33) : "Base UI: MenuPositionerContext is missing. MenuPositioner parts must be placed within <Menu.Positioner>.");
4556
+ if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? nn(33) : "Base UI: MenuPositionerContext is missing. MenuPositioner parts must be placed within <Menu.Positioner>.");
4550
4557
  return t;
4551
4558
  }
4552
4559
  //#endregion
@@ -4555,7 +4562,7 @@ var Ir = /*#__PURE__*/ G.createContext(void 0);
4555
4562
  process.env.NODE_ENV !== "production" && (Ir.displayName = "MenuRootContext");
4556
4563
  function Lr(e) {
4557
4564
  let t = G.useContext(Ir);
4558
- if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? qt(36) : "Base UI: MenuRootContext is missing. Menu parts must be placed within <Menu.Root>.");
4565
+ if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? nn(36) : "Base UI: MenuRootContext is missing. Menu parts must be placed within <Menu.Root>.");
4559
4566
  return t;
4560
4567
  }
4561
4568
  //#endregion
@@ -4564,7 +4571,7 @@ var Rr = /*#__PURE__*/ G.createContext(void 0);
4564
4571
  process.env.NODE_ENV !== "production" && (Rr.displayName = "ContextMenuRootContext");
4565
4572
  function zr(e = !0) {
4566
4573
  let t = G.useContext(Rr);
4567
- if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? qt(25) : "Base UI: ContextMenuRootContext is missing. ContextMenu parts must be placed within <ContextMenu.Root>.");
4574
+ if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? nn(25) : "Base UI: ContextMenuRootContext is missing. ContextMenu parts must be placed within <ContextMenu.Root>.");
4568
4575
  return t;
4569
4576
  }
4570
4577
  //#endregion
@@ -4573,7 +4580,7 @@ var Br = /*#__PURE__*/ G.createContext(void 0);
4573
4580
  process.env.NODE_ENV !== "production" && (Br.displayName = "MenuCheckboxItemContext");
4574
4581
  function Vr() {
4575
4582
  let e = G.useContext(Br);
4576
- if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? qt(30) : "Base UI: MenuCheckboxItemContext is missing. MenuCheckboxItem parts must be placed within <Menu.CheckboxItem>.");
4583
+ if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? nn(30) : "Base UI: MenuCheckboxItemContext is missing. MenuCheckboxItem parts must be placed within <Menu.CheckboxItem>.");
4577
4584
  return e;
4578
4585
  }
4579
4586
  //#endregion
@@ -4596,13 +4603,13 @@ function Hr(e) {
4596
4603
  onClick(e) {
4597
4604
  t && l.emit("close", {
4598
4605
  domEvent: e,
4599
- reason: Qt
4606
+ reason: $t
4600
4607
  });
4601
4608
  },
4602
4609
  onMouseUp(e) {
4603
4610
  if (u) {
4604
4611
  let t = u.initialCursorPointRef.current;
4605
- if (u.initialCursorPointRef.current = null, d && t && Math.abs(e.clientX - t.x) <= 1 && Math.abs(e.clientY - t.y) <= 1 || d && !A && e.button === 2) return;
4612
+ if (u.initialCursorPointRef.current = null, d && t && Math.abs(e.clientX - t.x) <= 1 && Math.abs(e.clientY - t.y) <= 1 || d && !Oe && e.button === 2) return;
4606
4613
  }
4607
4614
  s.current && a.context.allowMouseUpTriggerRef.current && (!d || e.button === 2) && (!c || c.type === "regular-item") && s.current.click();
4608
4615
  }
@@ -4624,7 +4631,7 @@ function Hr(e) {
4624
4631
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/menu/item/useMenuItem.js
4625
4632
  var Ur = { type: "regular-item" };
4626
4633
  function Wr(e) {
4627
- let { closeOnClick: t, disabled: n = !1, highlighted: r, id: i, store: a, typingRef: o = a.context.typingRef, nativeButton: s, itemMetadata: c, nodeId: l } = e, u = G.useRef(null), { getButtonProps: d, buttonRef: f } = at({
4634
+ let { closeOnClick: t, disabled: n = !1, highlighted: r, id: i, store: a, typingRef: o = a.context.typingRef, nativeButton: s, itemMetadata: c, nodeId: l } = e, u = G.useRef(null), { getButtonProps: d, buttonRef: f } = st({
4628
4635
  disabled: n,
4629
4636
  focusableWhenDisabled: !0,
4630
4637
  native: s,
@@ -4638,13 +4645,13 @@ function Wr(e) {
4638
4645
  typingRef: o,
4639
4646
  itemRef: u,
4640
4647
  itemMetadata: c
4641
- }), m = G.useCallback((e) => nn(p, { onMouseEnter() {
4648
+ }), m = G.useCallback((e) => Je(p, { onMouseEnter() {
4642
4649
  c.type === "submenu-trigger" && c.setActive();
4643
4650
  } }, e, d), [
4644
4651
  p,
4645
4652
  d,
4646
4653
  c
4647
- ]), h = xt(u, f);
4654
+ ]), h = ut(u, f);
4648
4655
  return G.useMemo(() => ({
4649
4656
  getItemProps: m,
4650
4657
  itemRef: h
@@ -4720,66 +4727,66 @@ var Yr = /*#__PURE__*/ function(e) {
4720
4727
  checked(e) {
4721
4728
  return e ? { [Yr.checked]: "" } : { [Yr.unchecked]: "" };
4722
4729
  },
4723
- ...ye
4730
+ ...on
4724
4731
  }, Zr = /*#__PURE__*/ G.forwardRef(function(e, t) {
4725
- let { render: n, className: r, id: i, label: a, nativeButton: o = !1, disabled: s = !1, closeOnClick: c = !1, checked: l, defaultChecked: u, onCheckedChange: d, style: f, ...p } = e, m = Jr({ label: a }), g = Fr(!0), _ = ee(i), { store: v } = Lr(), y = v.useState("isActive", m.index), b = v.useState("itemProps"), [x, S] = me({
4732
+ let { render: n, className: r, id: i, label: a, nativeButton: o = !1, disabled: s = !1, closeOnClick: c = !1, checked: l, defaultChecked: u, onCheckedChange: d, style: f, ...p } = e, m = Jr({ label: a }), h = Fr(!0), g = Be(i), { store: _ } = Lr(), v = _.useState("isActive", m.index), y = _.useState("itemProps"), [b, x] = me({
4726
4733
  controlled: l,
4727
4734
  default: u ?? !1,
4728
4735
  name: "MenuCheckboxItem",
4729
4736
  state: "checked"
4730
- }), { getItemProps: C, itemRef: w } = Wr({
4737
+ }), { getItemProps: S, itemRef: C } = Wr({
4731
4738
  closeOnClick: c,
4732
4739
  disabled: s,
4733
- highlighted: y,
4734
- id: _,
4735
- store: v,
4740
+ highlighted: v,
4741
+ id: g,
4742
+ store: _,
4736
4743
  nativeButton: o,
4737
- nodeId: g?.context.nodeId,
4744
+ nodeId: h?.context.nodeId,
4738
4745
  itemMetadata: Ur
4739
- }), T = G.useMemo(() => ({
4746
+ }), w = G.useMemo(() => ({
4740
4747
  disabled: s,
4741
- highlighted: y,
4742
- checked: x
4748
+ highlighted: v,
4749
+ checked: b
4743
4750
  }), [
4744
4751
  s,
4745
- y,
4746
- x
4747
- ]), E = h((e) => {
4752
+ v,
4753
+ b
4754
+ ]), T = U((e) => {
4748
4755
  let t = {
4749
- ...U(Qt, e.nativeEvent),
4756
+ ...H($t, e.nativeEvent),
4750
4757
  preventUnmountOnClose: () => {}
4751
4758
  };
4752
- d?.(!x, t), !t.isCanceled && S((e) => !e);
4753
- }), D = yt("div", e, {
4754
- state: T,
4759
+ d?.(!b, t), !t.isCanceled && x((e) => !e);
4760
+ }), E = qt("div", e, {
4761
+ state: w,
4755
4762
  stateAttributesMapping: Xr,
4756
4763
  props: [
4757
- b,
4764
+ y,
4758
4765
  {
4759
4766
  role: "menuitemcheckbox",
4760
- "aria-checked": x,
4761
- onClick: E
4767
+ "aria-checked": b,
4768
+ onClick: T
4762
4769
  },
4763
4770
  p,
4764
- C
4771
+ S
4765
4772
  ],
4766
4773
  ref: [
4767
- w,
4774
+ C,
4768
4775
  t,
4769
4776
  m.ref
4770
4777
  ]
4771
4778
  });
4772
4779
  return /*#__PURE__*/ K(Br.Provider, {
4773
- value: T,
4774
- children: D
4780
+ value: w,
4781
+ children: E
4775
4782
  });
4776
4783
  });
4777
4784
  process.env.NODE_ENV !== "production" && (Zr.displayName = "MenuCheckboxItem");
4778
4785
  //#endregion
4779
4786
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.js
4780
4787
  var Qr = /*#__PURE__*/ G.forwardRef(function(e, t) {
4781
- let { render: n, className: r, style: i, keepMounted: a = !1, ...o } = e, s = Vr(), c = G.useRef(null), { transitionStatus: l, setMounted: u } = T(s.checked);
4782
- F({
4788
+ let { render: n, className: r, style: i, keepMounted: a = !1, ...o } = e, s = Vr(), c = G.useRef(null), { transitionStatus: l, setMounted: u } = w(s.checked);
4789
+ P({
4783
4790
  open: s.checked,
4784
4791
  ref: c,
4785
4792
  onComplete() {
@@ -4792,7 +4799,7 @@ var Qr = /*#__PURE__*/ G.forwardRef(function(e, t) {
4792
4799
  highlighted: s.highlighted,
4793
4800
  transitionStatus: l
4794
4801
  };
4795
- return yt("span", e, {
4802
+ return qt("span", e, {
4796
4803
  state: d,
4797
4804
  ref: [t, c],
4798
4805
  stateAttributesMapping: Xr,
@@ -4810,13 +4817,13 @@ var $r = /*#__PURE__*/ G.createContext(void 0);
4810
4817
  process.env.NODE_ENV !== "production" && ($r.displayName = "MenuGroupContext");
4811
4818
  function ei() {
4812
4819
  let e = G.useContext($r);
4813
- if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? qt(31) : "Base UI: MenuGroupRootContext is missing. Menu group parts must be used within <Menu.Group>.");
4820
+ if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? nn(31) : "Base UI: MenuGroupRootContext is missing. Menu group parts must be used within <Menu.Group>.");
4814
4821
  return e;
4815
4822
  }
4816
4823
  //#endregion
4817
4824
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/menu/group/MenuGroup.js
4818
4825
  var ti = /*#__PURE__*/ G.forwardRef(function(e, t) {
4819
- let { render: n, className: r, style: i, ...a } = e, [o, s] = G.useState(void 0), c = G.useMemo(() => ({ setLabelId: s }), [s]), l = yt("div", e, {
4826
+ let { render: n, className: r, style: i, ...a } = e, [o, s] = G.useState(void 0), c = G.useMemo(() => ({ setLabelId: s }), [s]), l = qt("div", e, {
4820
4827
  ref: t,
4821
4828
  props: {
4822
4829
  role: "group",
@@ -4833,10 +4840,10 @@ process.env.NODE_ENV !== "production" && (ti.displayName = "MenuGroup");
4833
4840
  //#endregion
4834
4841
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/menu/group-label/MenuGroupLabel.js
4835
4842
  var ni = /*#__PURE__*/ G.forwardRef(function(e, t) {
4836
- let { className: n, render: r, id: i, style: a, ...o } = e, s = ee(i), { setLabelId: c } = ei();
4843
+ let { className: n, render: r, id: i, style: a, ...o } = e, s = Be(i), { setLabelId: c } = ei();
4837
4844
  return W(() => (c(s), () => {
4838
4845
  c(void 0);
4839
- }), [c, s]), yt("div", e, {
4846
+ }), [c, s]), qt("div", e, {
4840
4847
  ref: t,
4841
4848
  props: {
4842
4849
  id: s,
@@ -4849,7 +4856,7 @@ process.env.NODE_ENV !== "production" && (ni.displayName = "MenuGroupLabel");
4849
4856
  //#endregion
4850
4857
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/menu/item/MenuItem.js
4851
4858
  var ri = /*#__PURE__*/ G.forwardRef(function(e, t) {
4852
- let { render: n, className: r, id: i, label: a, nativeButton: o = !1, disabled: s = !1, closeOnClick: c = !0, style: l, ...u } = e, d = Jr({ label: a }), f = Fr(!0), p = ee(i), { store: m } = Lr(), h = m.useState("isActive", d.index), g = m.useState("itemProps"), { getItemProps: _, itemRef: v } = Wr({
4859
+ let { render: n, className: r, id: i, label: a, nativeButton: o = !1, disabled: s = !1, closeOnClick: c = !0, style: l, ...u } = e, d = Jr({ label: a }), f = Fr(!0), p = Be(i), { store: m } = Lr(), h = m.useState("isActive", d.index), g = m.useState("itemProps"), { getItemProps: _, itemRef: v } = Wr({
4853
4860
  closeOnClick: c,
4854
4861
  disabled: s,
4855
4862
  highlighted: h,
@@ -4859,7 +4866,7 @@ var ri = /*#__PURE__*/ G.forwardRef(function(e, t) {
4859
4866
  nodeId: f?.context.nodeId,
4860
4867
  itemMetadata: Ur
4861
4868
  });
4862
- return yt("div", e, {
4869
+ return qt("div", e, {
4863
4870
  state: {
4864
4871
  disabled: s,
4865
4872
  highlighted: h
@@ -4880,7 +4887,7 @@ process.env.NODE_ENV !== "production" && (ri.displayName = "MenuItem");
4880
4887
  //#endregion
4881
4888
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useHoverShared.js
4882
4889
  function ii(e, t) {
4883
- return t != null && !Xt(t) ? 0 : typeof e == "function" ? e() : e;
4890
+ return t != null && !we(t) ? 0 : typeof e == "function" ? e() : e;
4884
4891
  }
4885
4892
  function ai(e, t, n) {
4886
4893
  let r = ii(e, n);
@@ -4895,25 +4902,25 @@ function si(e, t) {
4895
4902
  //#endregion
4896
4903
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useClick.js
4897
4904
  function ci(e, t = {}) {
4898
- let n = "rootStore" in e ? e.rootStore : e, r = n.context.dataRef, { enabled: i = !0, event: a = "click", toggle: o = !0, ignoreMouse: s = !1, stickIfOpen: c = !0, touchOpenDelay: l = 0, reason: u = pt } = t, d = G.useRef(void 0), f = on(), p = Ne(), h = G.useMemo(() => ({
4905
+ let n = "rootStore" in e ? e.rootStore : e, r = n.context.dataRef, { enabled: i = !0, event: a = "click", toggle: o = !0, ignoreMouse: s = !1, stickIfOpen: c = !0, touchOpenDelay: l = 0, reason: u = _t } = t, d = G.useRef(void 0), p = f(), m = A(), h = G.useMemo(() => ({
4899
4906
  onPointerDown(e) {
4900
4907
  d.current = e.pointerType;
4901
4908
  },
4902
4909
  onMouseDown(e) {
4903
- let t = d.current, i = e.nativeEvent, m = n.select("open");
4904
- if (e.button !== 0 || a === "click" || Xt(t, !0) && s) return;
4905
- let h = r.current.openEvent, g = h?.type, _ = n.select("domReferenceElement") !== e.currentTarget, v = m && _ || !(m && o && (!(h && c) || g === "click" || g === "mousedown")), y = ie(i);
4906
- if (ce(y)) {
4907
- let e = U(u, i, y);
4908
- v && t === "touch" && l > 0 ? p.start(l, () => {
4910
+ let t = d.current, i = e.nativeEvent, f = n.select("open");
4911
+ if (e.button !== 0 || a === "click" || we(t, !0) && s) return;
4912
+ let h = r.current.openEvent, g = h?.type, _ = n.select("domReferenceElement") !== e.currentTarget, v = f && _ || !(f && o && (!(h && c) || g === "click" || g === "mousedown")), y = _e(i);
4913
+ if (fe(y)) {
4914
+ let e = H(u, i, y);
4915
+ v && t === "touch" && l > 0 ? m.start(l, () => {
4909
4916
  n.setOpen(!0, e);
4910
4917
  }) : n.setOpen(v, e);
4911
4918
  return;
4912
4919
  }
4913
4920
  let b = e.currentTarget;
4914
- f.request(() => {
4915
- let e = U(u, i, b);
4916
- v && t === "touch" && l > 0 ? p.start(l, () => {
4921
+ p.request(() => {
4922
+ let e = H(u, i, b);
4923
+ v && t === "touch" && l > 0 ? m.start(l, () => {
4917
4924
  n.setOpen(!0, e);
4918
4925
  }) : n.setOpen(v, e);
4919
4926
  });
@@ -4925,11 +4932,11 @@ function ci(e, t = {}) {
4925
4932
  d.current = void 0;
4926
4933
  return;
4927
4934
  }
4928
- if (Xt(t, !0) && s) return;
4929
- let i = n.select("open"), f = r.current.openEvent, h = n.select("domReferenceElement") !== e.currentTarget, g = i && h || !(i && o && (!(f && c) || m(f))), _ = U(u, e.nativeEvent, e.currentTarget);
4930
- g && t === "touch" && l > 0 ? p.start(l, () => {
4931
- n.setOpen(!0, _);
4932
- }) : n.setOpen(g, _);
4935
+ if (we(t, !0) && s) return;
4936
+ let i = n.select("open"), f = r.current.openEvent, p = n.select("domReferenceElement") !== e.currentTarget, h = i && p || !(i && o && (!(f && c) || Qt(f))), g = H(u, e.nativeEvent, e.currentTarget);
4937
+ h && t === "touch" && l > 0 ? m.start(l, () => {
4938
+ n.setOpen(!0, g);
4939
+ }) : n.setOpen(h, g);
4933
4940
  },
4934
4941
  onKeyDown() {
4935
4942
  d.current = void 0;
@@ -4941,17 +4948,17 @@ function ci(e, t = {}) {
4941
4948
  n,
4942
4949
  c,
4943
4950
  o,
4944
- f,
4945
4951
  p,
4952
+ m,
4946
4953
  l,
4947
4954
  u
4948
4955
  ]);
4949
- return G.useMemo(() => i ? { reference: h } : Ye, [i, h]);
4956
+ return G.useMemo(() => i ? { reference: h } : it, [i, h]);
4950
4957
  }
4951
4958
  //#endregion
4952
4959
  //#region ../../node_modules/.bun/@floating-ui+core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
4953
4960
  function li(e, t, n) {
4954
- let { reference: r, floating: i } = e, a = Ve(t), o = Ke(t), s = Wt(o), c = nt(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
4961
+ let { reference: r, floating: i } = e, a = Jt(t), o = St(t), s = Qe(o), c = Ue(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
4955
4962
  switch (c) {
4956
4963
  case "top":
4957
4964
  p = {
@@ -4982,12 +4989,12 @@ function li(e, t, n) {
4982
4989
  y: r.y
4983
4990
  };
4984
4991
  }
4985
- let m = Rt(t);
4992
+ let m = Ye(t);
4986
4993
  return m && (p[o] += f * (m === "end" ? 1 : -1) * (n && l ? -1 : 1)), p;
4987
4994
  }
4988
4995
  async function ui(e, t) {
4989
4996
  t === void 0 && (t = {});
4990
- let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = We(t, e), p = it(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = Ge(await i.getClippingRect({
4997
+ let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = kt(t, e), p = ot(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = en(await i.getClippingRect({
4991
4998
  element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
4992
4999
  boundary: c,
4993
5000
  rootBoundary: l,
@@ -5000,7 +5007,7 @@ async function ui(e, t) {
5000
5007
  } : a.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), v = await (i.isElement == null ? void 0 : i.isElement(_)) && await (i.getScale == null ? void 0 : i.getScale(_)) || {
5001
5008
  x: 1,
5002
5009
  y: 1
5003
- }, y = Ge(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
5010
+ }, y = en(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
5004
5011
  elements: o,
5005
5012
  rect: g,
5006
5013
  offsetParent: _,
@@ -5061,13 +5068,13 @@ var di = 50, fi = async (e, t, n) => {
5061
5068
  options: e,
5062
5069
  async fn(t) {
5063
5070
  var n;
5064
- let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = We(e, t);
5071
+ let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = kt(e, t);
5065
5072
  if ((n = i.arrow) != null && n.alignmentOffset) return {};
5066
- let g = nt(r), _ = Ve(o), v = nt(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [bt(o)] : Je(o)), x = p !== "none";
5067
- !d && x && b.push(...At(o, m, p, y));
5073
+ let g = Ue(r), _ = Jt(o), v = Ue(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [lt(o)] : rt(o)), x = p !== "none";
5074
+ !d && x && b.push(...Ct(o, m, p, y));
5068
5075
  let S = [o, ...b], C = await s.detectOverflow(t, h), w = [], T = i.flip?.overflows || [];
5069
5076
  if (l && w.push(C[g]), u) {
5070
- let e = vt(r, a, y);
5077
+ let e = Kt(r, a, y);
5071
5078
  w.push(C[e[0]], C[e[1]]);
5072
5079
  }
5073
5080
  if (T = [...T, {
@@ -5075,7 +5082,7 @@ var di = 50, fi = async (e, t, n) => {
5075
5082
  overflows: w
5076
5083
  }], !w.every((e) => e <= 0)) {
5077
5084
  let e = (i.flip?.index || 0) + 1, t = S[e];
5078
- if (t && (u !== "alignment" || _ === Ve(t) || T.every((e) => Ve(e.placement) !== _ || e.overflows[0] > 0))) return {
5085
+ if (t && (u !== "alignment" || _ === Jt(t) || T.every((e) => Jt(e.placement) !== _ || e.overflows[0] > 0))) return {
5079
5086
  data: {
5080
5087
  index: e,
5081
5088
  overflows: T
@@ -5087,7 +5094,7 @@ var di = 50, fi = async (e, t, n) => {
5087
5094
  case "bestFit": {
5088
5095
  let e = T.filter((e) => {
5089
5096
  if (x) {
5090
- let t = Ve(e.placement);
5097
+ let t = Jt(e.placement);
5091
5098
  return t === _ || t === "y";
5092
5099
  }
5093
5100
  return !0;
@@ -5112,14 +5119,14 @@ function mi(e, t) {
5112
5119
  };
5113
5120
  }
5114
5121
  function hi(e) {
5115
- return xe.some((t) => e[t] >= 0);
5122
+ return m.some((t) => e[t] >= 0);
5116
5123
  }
5117
5124
  var gi = function(e) {
5118
5125
  return e === void 0 && (e = {}), {
5119
5126
  name: "hide",
5120
5127
  options: e,
5121
5128
  async fn(t) {
5122
- let { rects: n, platform: r } = t, { strategy: i = "referenceHidden", ...a } = We(e, t);
5129
+ let { rects: n, platform: r } = t, { strategy: i = "referenceHidden", ...a } = kt(e, t);
5123
5130
  switch (i) {
5124
5131
  case "referenceHidden": {
5125
5132
  let e = mi(await r.detectOverflow(t, {
@@ -5147,7 +5154,7 @@ var gi = function(e) {
5147
5154
  };
5148
5155
  }, _i = /*#__PURE__*/ new Set(["left", "top"]);
5149
5156
  async function vi(e, t) {
5150
- let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = nt(n), s = Rt(n), c = Ve(n) === "y", l = _i.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = We(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
5157
+ let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = Ue(n), s = Ye(n), c = Jt(n) === "y", l = _i.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = kt(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
5151
5158
  mainAxis: d,
5152
5159
  crossAxis: 0,
5153
5160
  alignmentAxis: null
@@ -5192,10 +5199,10 @@ var yi = function(e) {
5192
5199
  x: t,
5193
5200
  y: n
5194
5201
  };
5195
- } }, ...l } = We(e, t), u = {
5202
+ } }, ...l } = kt(e, t), u = {
5196
5203
  x: n,
5197
5204
  y: r
5198
- }, d = await a.detectOverflow(t, l), f = Ve(i), p = $e(f), m = u[p], h = u[f], g = (e, t) => It(t + d[e === "y" ? "top" : "left"], t, t - d[e === "y" ? "bottom" : "right"]);
5205
+ }, d = await a.detectOverflow(t, l), f = Jt(i), p = Mt(f), m = u[p], h = u[f], g = (e, t) => pt(t + d[e === "y" ? "top" : "left"], t, t - d[e === "y" ? "bottom" : "right"]);
5199
5206
  o && (m = g(p, m)), s && (h = g(f, h));
5200
5207
  let _ = c.fn({
5201
5208
  ...t,
@@ -5219,10 +5226,10 @@ var yi = function(e) {
5219
5226
  return e === void 0 && (e = {}), {
5220
5227
  options: e,
5221
5228
  fn(t) {
5222
- let { x: n, y: r, placement: i, rects: a, middlewareData: o } = t, { offset: s = 0, mainAxis: c = !0, crossAxis: l = !0 } = We(e, t), u = {
5229
+ let { x: n, y: r, placement: i, rects: a, middlewareData: o } = t, { offset: s = 0, mainAxis: c = !0, crossAxis: l = !0 } = kt(e, t), u = {
5223
5230
  x: n,
5224
5231
  y: r
5225
- }, d = Ve(i), f = $e(d), p = u[f], m = u[d], h = We(s, t), g = typeof h == "number" ? {
5232
+ }, d = Jt(i), f = Mt(d), p = u[f], m = u[d], h = kt(s, t), g = typeof h == "number" ? {
5226
5233
  mainAxis: h,
5227
5234
  crossAxis: 0
5228
5235
  } : {
@@ -5234,7 +5241,7 @@ var yi = function(e) {
5234
5241
  p < t ? p = t : p > n && (p = n);
5235
5242
  }
5236
5243
  if (l) {
5237
- let e = f === "y" ? "width" : "height", t = _i.has(nt(i)), n = a.reference[d] - a.floating[e] + (t && o.offset?.[d] || 0) + (t ? 0 : g.crossAxis), r = a.reference[d] + a.reference[e] + (t ? 0 : o.offset?.[d] || 0) - (t ? g.crossAxis : 0);
5244
+ let e = f === "y" ? "width" : "height", t = _i.has(Ue(i)), n = a.reference[d] - a.floating[e] + (t && o.offset?.[d] || 0) + (t ? 0 : g.crossAxis), r = a.reference[d] + a.reference[e] + (t ? 0 : o.offset?.[d] || 0) - (t ? g.crossAxis : 0);
5238
5245
  m < n ? m = n : m > r && (m = r);
5239
5246
  }
5240
5247
  return {
@@ -5248,10 +5255,10 @@ var yi = function(e) {
5248
5255
  name: "size",
5249
5256
  options: e,
5250
5257
  async fn(t) {
5251
- let { placement: n, rects: r, platform: i, elements: a } = t, { apply: o = () => {}, ...s } = We(e, t), c = await i.detectOverflow(t, s), l = nt(n), u = Rt(n), d = Ve(n) === "y", { width: f, height: p } = r.floating, m, h;
5258
+ let { placement: n, rects: r, platform: i, elements: a } = t, { apply: o = () => {}, ...s } = kt(e, t), c = await i.detectOverflow(t, s), l = Ue(n), u = Ye(n), d = Jt(n) === "y", { width: f, height: p } = r.floating, m, h;
5252
5259
  l === "top" || l === "bottom" ? (m = l, h = u === (await (i.isRTL == null ? void 0 : i.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (h = l, m = u === "end" ? "top" : "bottom");
5253
- let g = p - c.top - c.bottom, _ = f - c.left - c.right, v = tn(p - c[m], g), y = tn(f - c[h], _), b = t.middlewareData.shift, x = !b, S = v, C = y;
5254
- b != null && b.enabled.x && (C = _), b != null && b.enabled.y && (S = g), x && !u && (d ? C = f - 2 * Kt(c.left, c.right) : S = p - 2 * Kt(c.top, c.bottom)), await o({
5260
+ let g = p - c.top - c.bottom, _ = f - c.left - c.right, v = qe(p - c[m], g), y = qe(f - c[h], _), b = t.middlewareData.shift, x = !b, S = v, C = y;
5261
+ b != null && b.enabled.x && (C = _), b != null && b.enabled.y && (S = g), x && !u && (d ? C = f - 2 * tn(c.left, c.right) : S = p - 2 * tn(c.top, c.bottom)), await o({
5255
5262
  ...t,
5256
5263
  availableWidth: C,
5257
5264
  availableHeight: S
@@ -5264,7 +5271,7 @@ var yi = function(e) {
5264
5271
  //#endregion
5265
5272
  //#region ../../node_modules/.bun/@floating-ui+dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
5266
5273
  function Ci(e) {
5267
- let t = Te(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = P(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = $t(n) !== a || $t(r) !== o;
5274
+ let t = x(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = L(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = be(n) !== a || be(r) !== o;
5268
5275
  return s && (n = a, r = o), {
5269
5276
  width: n,
5270
5277
  height: r,
@@ -5272,41 +5279,41 @@ function Ci(e) {
5272
5279
  };
5273
5280
  }
5274
5281
  function wi(e) {
5275
- return w(e) ? e : e.contextElement;
5282
+ return N(e) ? e : e.contextElement;
5276
5283
  }
5277
5284
  function Ti(e) {
5278
5285
  let t = wi(e);
5279
- if (!P(t)) return ct(1);
5280
- let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = Ci(t), o = (a ? $t(n.width) : n.width) / r, s = (a ? $t(n.height) : n.height) / i;
5286
+ if (!L(t)) return Ge(1);
5287
+ let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = Ci(t), o = (a ? be(n.width) : n.width) / r, s = (a ? be(n.height) : n.height) / i;
5281
5288
  return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
5282
5289
  x: o,
5283
5290
  y: s
5284
5291
  };
5285
5292
  }
5286
- var Ei = /*#__PURE__*/ ct(0);
5293
+ var Ei = /*#__PURE__*/ Ge(0);
5287
5294
  function Di(e) {
5288
- let t = V(e);
5289
- return !Me() || !t.visualViewport ? Ei : {
5295
+ let t = pe(e);
5296
+ return !k() || !t.visualViewport ? Ei : {
5290
5297
  x: t.visualViewport.offsetLeft,
5291
5298
  y: t.visualViewport.offsetTop
5292
5299
  };
5293
5300
  }
5294
5301
  function Oi(e, t, n) {
5295
- return t === void 0 && (t = !1), !!n && t && n === V(e);
5302
+ return t === void 0 && (t = !1), !!n && t && n === pe(e);
5296
5303
  }
5297
5304
  function ki(e, t, n, r) {
5298
5305
  t === void 0 && (t = !1), n === void 0 && (n = !1);
5299
- let i = e.getBoundingClientRect(), a = wi(e), o = ct(1);
5300
- t && (r ? w(r) && (o = Ti(r)) : o = Ti(e));
5301
- let s = Oi(a, n, r) ? Di(a) : ct(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
5306
+ let i = e.getBoundingClientRect(), a = wi(e), o = Ge(1);
5307
+ t && (r ? N(r) && (o = Ti(r)) : o = Ti(e));
5308
+ let s = Oi(a, n, r) ? Di(a) : Ge(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
5302
5309
  if (a && r) {
5303
- let e = V(a), t = w(r) ? V(r) : r, n = e, i = ue(n);
5310
+ let e = pe(a), t = N(r) ? pe(r) : r, n = e, i = bt(n);
5304
5311
  for (; i && t !== n;) {
5305
- let e = Ti(i), t = i.getBoundingClientRect(), r = Te(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
5306
- c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = V(i), i = ue(n);
5312
+ let e = Ti(i), t = i.getBoundingClientRect(), r = x(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
5313
+ c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = pe(i), i = bt(n);
5307
5314
  }
5308
5315
  }
5309
- return Ge({
5316
+ return en({
5310
5317
  width: u,
5311
5318
  height: d,
5312
5319
  x: c,
@@ -5314,8 +5321,8 @@ function ki(e, t, n, r) {
5314
5321
  });
5315
5322
  }
5316
5323
  function Ai(e, t) {
5317
- let n = s(e).scrollLeft;
5318
- return t ? t.left + n : ki(y(e)).left + n;
5324
+ let n = gt(e).scrollLeft;
5325
+ return t ? t.left + n : ki(V(e)).left + n;
5319
5326
  }
5320
5327
  function ji(e, t) {
5321
5328
  let n = e.getBoundingClientRect();
@@ -5325,30 +5332,30 @@ function ji(e, t) {
5325
5332
  };
5326
5333
  }
5327
5334
  function Mi(e) {
5328
- let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = y(r), c = t ? d(t.floating) : !1;
5335
+ let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = V(r), c = t ? Me(t.floating) : !1;
5329
5336
  if (r === o || c && a) return n;
5330
5337
  let l = {
5331
5338
  scrollLeft: 0,
5332
5339
  scrollTop: 0
5333
- }, u = ct(1), f = ct(0), p = P(r);
5334
- if ((p || !a) && ((gt(r) !== "body" || ve(o)) && (l = s(r)), p)) {
5340
+ }, u = Ge(1), d = Ge(0), f = L(r);
5341
+ if ((f || !a) && ((s(r) !== "body" || an(o)) && (l = gt(r)), f)) {
5335
5342
  let e = ki(r);
5336
- u = Ti(r), f.x = e.x + r.clientLeft, f.y = e.y + r.clientTop;
5343
+ u = Ti(r), d.x = e.x + r.clientLeft, d.y = e.y + r.clientTop;
5337
5344
  }
5338
- let m = o && !p && !a ? ji(o, l) : ct(0);
5345
+ let p = o && !f && !a ? ji(o, l) : Ge(0);
5339
5346
  return {
5340
5347
  width: n.width * u.x,
5341
5348
  height: n.height * u.y,
5342
- x: n.x * u.x - l.scrollLeft * u.x + f.x + m.x,
5343
- y: n.y * u.y - l.scrollTop * u.y + f.y + m.y
5349
+ x: n.x * u.x - l.scrollLeft * u.x + d.x + p.x,
5350
+ y: n.y * u.y - l.scrollTop * u.y + d.y + p.y
5344
5351
  };
5345
5352
  }
5346
5353
  function Ni(e) {
5347
5354
  return e.getClientRects ? Array.from(e.getClientRects()) : [];
5348
5355
  }
5349
5356
  function Pi(e) {
5350
- let t = s(e), n = e.ownerDocument.body, r = Kt(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), i = Kt(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight), a = -t.scrollLeft + Ai(e), o = -t.scrollTop;
5351
- return Te(n).direction === "rtl" && (a += Kt(e.clientWidth, n.clientWidth) - r), {
5357
+ let t = gt(e), n = e.ownerDocument.body, r = tn(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), i = tn(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight), a = -t.scrollLeft + Ai(e), o = -t.scrollTop;
5358
+ return x(n).direction === "rtl" && (a += tn(e.clientWidth, n.clientWidth) - r), {
5352
5359
  width: r,
5353
5360
  height: i,
5354
5361
  x: a,
@@ -5358,9 +5365,9 @@ function Pi(e) {
5358
5365
  var Fi = 25;
5359
5366
  function Ii(e, t, n) {
5360
5367
  n === void 0 && (n = "viewport");
5361
- let r = n === "layoutViewport", i = V(e), a = y(e), o = i.visualViewport, s = a.clientWidth, c = a.clientHeight, l = 0, u = 0;
5368
+ let r = n === "layoutViewport", i = pe(e), a = V(e), o = i.visualViewport, s = a.clientWidth, c = a.clientHeight, l = 0, u = 0;
5362
5369
  if (o) {
5363
- let e = !Me() || t === "fixed";
5370
+ let e = !k() || t === "fixed";
5364
5371
  r ? e || (l = -o.offsetLeft, u = -o.offsetTop) : (s = o.width, c = o.height, e && (l = o.offsetLeft, u = o.offsetTop));
5365
5372
  }
5366
5373
  if (Ai(a) <= 0) {
@@ -5386,8 +5393,8 @@ function Li(e, t) {
5386
5393
  function Ri(e, t, n) {
5387
5394
  let r;
5388
5395
  if (t === "viewport" || t === "layoutViewport") r = Ii(e, n, t);
5389
- else if (t === "document") r = Pi(y(e));
5390
- else if (w(t)) r = Li(t, n);
5396
+ else if (t === "document") r = Pi(V(e));
5397
+ else if (N(t)) r = Li(t, n);
5391
5398
  else {
5392
5399
  let n = Di(e);
5393
5400
  r = {
@@ -5397,23 +5404,23 @@ function Ri(e, t, n) {
5397
5404
  height: t.height
5398
5405
  };
5399
5406
  }
5400
- return Ge(r);
5407
+ return en(r);
5401
5408
  }
5402
5409
  function zi(e, t) {
5403
5410
  let n = t.get(e);
5404
5411
  if (n) return n;
5405
- let r = ft(e, [], !1).filter((e) => w(e) && gt(e) !== "body"), i = null, a = Te(e).position === "fixed", o = a ? se(e) : e;
5406
- for (; w(o) && !R(o);) {
5407
- let e = Te(o), t = pe(o), n = i ? i.position : a ? "fixed" : "";
5408
- !t && (n === "fixed" || n === "absolute" && e.position === "static") ? r = r.filter((e) => e !== o) : i = e, o = se(o);
5412
+ let r = z(e, [], !1).filter((e) => N(e) && s(e) !== "body"), i = null, a = x(e).position === "fixed", o = a ? le(e) : e;
5413
+ for (; N(o) && !ve(o);) {
5414
+ let e = x(o), t = C(o), n = i ? i.position : a ? "fixed" : "";
5415
+ !t && (n === "fixed" || n === "absolute" && e.position === "static") ? r = r.filter((e) => e !== o) : i = e, o = le(o);
5409
5416
  }
5410
5417
  return t.set(e, r), r;
5411
5418
  }
5412
5419
  function Bi(e) {
5413
- let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? d(t) ? [] : zi(t, this._c) : [].concat(n), r], o = Ri(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
5420
+ let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? Me(t) ? [] : zi(t, this._c) : [].concat(n), r], o = Ri(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
5414
5421
  for (let e = 1; e < a.length; e++) {
5415
5422
  let n = Ri(t, a[e], i);
5416
- s = Kt(n.top, s), c = tn(n.right, c), l = tn(n.bottom, l), u = Kt(n.left, u);
5423
+ s = tn(n.top, s), c = qe(n.right, c), l = qe(n.bottom, l), u = tn(n.left, u);
5417
5424
  }
5418
5425
  return {
5419
5426
  width: c - u,
@@ -5430,16 +5437,16 @@ function Vi(e) {
5430
5437
  };
5431
5438
  }
5432
5439
  function Hi(e, t, n) {
5433
- let r = P(t), i = y(t), a = n === "fixed", o = ki(e, !0, a, t), c = {
5440
+ let r = L(t), i = V(t), a = n === "fixed", o = ki(e, !0, a, t), c = {
5434
5441
  scrollLeft: 0,
5435
5442
  scrollTop: 0
5436
- }, l = ct(0);
5437
- if ((r || !a) && ((gt(t) !== "body" || ve(i)) && (c = s(t)), r)) {
5443
+ }, l = Ge(0);
5444
+ if ((r || !a) && ((s(t) !== "body" || an(i)) && (c = gt(t)), r)) {
5438
5445
  let e = ki(t, !0, a, t);
5439
5446
  l.x = e.x + t.clientLeft, l.y = e.y + t.clientTop;
5440
5447
  }
5441
5448
  !r && i && (l.x = Ai(i));
5442
- let u = i && !r && !a ? ji(i, c) : ct(0);
5449
+ let u = i && !r && !a ? ji(i, c) : Ge(0);
5443
5450
  return {
5444
5451
  x: o.left + c.scrollLeft - l.x - u.x,
5445
5452
  y: o.top + c.scrollTop - l.y - u.y,
@@ -5448,28 +5455,28 @@ function Hi(e, t, n) {
5448
5455
  };
5449
5456
  }
5450
5457
  function Ui(e) {
5451
- return Te(e).position === "static";
5458
+ return x(e).position === "static";
5452
5459
  }
5453
5460
  function Wi(e, t) {
5454
- if (!P(e) || Te(e).position === "fixed") return null;
5461
+ if (!L(e) || x(e).position === "fixed") return null;
5455
5462
  if (t) return t(e);
5456
5463
  let n = e.offsetParent;
5457
- return y(e) === n && (n = n.ownerDocument.body), n;
5464
+ return V(e) === n && (n = n.ownerDocument.body), n;
5458
5465
  }
5459
5466
  function Gi(e, t) {
5460
- let n = V(e);
5461
- if (d(e)) return n;
5462
- if (!P(e)) {
5463
- let t = se(e);
5464
- for (; t && !R(t);) {
5465
- if (w(t) && !Ui(t)) return t;
5466
- t = se(t);
5467
+ let n = pe(e);
5468
+ if (Me(e)) return n;
5469
+ if (!L(e)) {
5470
+ let t = le(e);
5471
+ for (; t && !ve(t);) {
5472
+ if (N(t) && !Ui(t)) return t;
5473
+ t = le(t);
5467
5474
  }
5468
5475
  return n;
5469
5476
  }
5470
5477
  let r = Wi(e, t);
5471
- for (; r && an(r) && Ui(r);) r = Wi(r, t);
5472
- return r && R(r) && Ui(r) && !pe(r) ? n : r || S(e) || n;
5478
+ for (; r && d(r) && Ui(r);) r = Wi(r, t);
5479
+ return r && ve(r) && Ui(r) && !C(r) ? n : r || v(e) || n;
5473
5480
  }
5474
5481
  var Ki = async function(e) {
5475
5482
  let t = this.getOffsetParent || Gi, n = this.getDimensions, r = await n(e.floating);
@@ -5484,25 +5491,25 @@ var Ki = async function(e) {
5484
5491
  };
5485
5492
  };
5486
5493
  function qi(e) {
5487
- return Te(e).direction === "rtl";
5494
+ return x(e).direction === "rtl";
5488
5495
  }
5489
5496
  var Ji = {
5490
5497
  convertOffsetParentRelativeRectToViewportRelativeRect: Mi,
5491
- getDocumentElement: y,
5498
+ getDocumentElement: V,
5492
5499
  getClippingRect: Bi,
5493
5500
  getOffsetParent: Gi,
5494
5501
  getElementRects: Ki,
5495
5502
  getClientRects: Ni,
5496
5503
  getDimensions: Vi,
5497
5504
  getScale: Ti,
5498
- isElement: w,
5505
+ isElement: N,
5499
5506
  isRTL: qi
5500
5507
  };
5501
5508
  function Yi(e, t) {
5502
5509
  return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
5503
5510
  }
5504
5511
  function Xi(e, t, n) {
5505
- let r = null, i, a = y(e);
5512
+ let r = null, i, a = V(e);
5506
5513
  function o() {
5507
5514
  var e;
5508
5515
  clearTimeout(i), (e = r) == null || e.disconnect(), r = null;
@@ -5511,9 +5518,9 @@ function Xi(e, t, n) {
5511
5518
  n === void 0 && (n = !1), c === void 0 && (c = 1), o();
5512
5519
  let l = e.getBoundingClientRect(), { left: u, top: d, width: f, height: p } = l;
5513
5520
  if (n || t(), !f || !p) return;
5514
- let m = Et(d), h = Et(a.clientWidth - (u + f)), g = Et(a.clientHeight - (d + p)), _ = Et(u), v = {
5521
+ let m = Bt(d), h = Bt(a.clientWidth - (u + f)), g = Bt(a.clientHeight - (d + p)), _ = Bt(u), v = {
5515
5522
  rootMargin: -m + "px " + -h + "px " + -g + "px " + -_ + "px",
5516
- threshold: Kt(0, tn(1, c)) || 1
5523
+ threshold: tn(0, qe(1, c)) || 1
5517
5524
  }, y = !0;
5518
5525
  function b(t) {
5519
5526
  let n = t[0].intersectionRatio;
@@ -5536,14 +5543,14 @@ function Xi(e, t, n) {
5536
5543
  }
5537
5544
  r.observe(e);
5538
5545
  }
5539
- let c = V(e), l = () => s(n);
5546
+ let c = pe(e), l = () => s(n);
5540
5547
  return c.addEventListener("resize", l), s(!0), () => {
5541
5548
  c.removeEventListener("resize", l), o();
5542
5549
  };
5543
5550
  }
5544
5551
  function Zi(e, t, n, r) {
5545
5552
  r === void 0 && (r = {});
5546
- let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = wi(e), u = i || a ? [...l ? ft(l) : [], ...t ? ft(t) : []] : [];
5553
+ let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = wi(e), u = i || a ? [...l ? z(l) : [], ...t ? z(t) : []] : [];
5547
5554
  u.forEach((e) => {
5548
5555
  i && e.addEventListener("scroll", n), a && e.addEventListener("resize", n);
5549
5556
  });
@@ -5760,18 +5767,18 @@ var da = (e, t) => {
5760
5767
  //#endregion
5761
5768
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useFloatingRootContext.js
5762
5769
  function _a(e) {
5763
- let { open: t = !1, onOpenChange: n, elements: r = {} } = e, i = Re(), a = ne() != null;
5770
+ let { open: t = !1, onOpenChange: n, elements: r = {} } = e, i = Le(), a = te() != null;
5764
5771
  if (process.env.NODE_ENV !== "production") {
5765
5772
  let e = r.reference;
5766
- e && !w(e) && console.error("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `context.setPositionReference()`", "instead.");
5773
+ e && !N(e) && console.error("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `context.setPositionReference()`", "instead.");
5767
5774
  }
5768
- let o = Zt(() => new ae({
5775
+ let o = Te(() => new ae({
5769
5776
  open: t,
5770
5777
  transitionStatus: void 0,
5771
5778
  onOpenChange: n,
5772
5779
  referenceElement: r.reference ?? null,
5773
5780
  floatingElement: r.floating ?? null,
5774
- triggerElements: new _(),
5781
+ triggerElements: new g(),
5775
5782
  floatingId: i,
5776
5783
  syncOnly: !1,
5777
5784
  nested: a
@@ -5781,7 +5788,7 @@ function _a(e) {
5781
5788
  open: t,
5782
5789
  floatingId: i
5783
5790
  };
5784
- r.reference !== void 0 && (e.referenceElement = r.reference, e.domReferenceElement = w(r.reference) ? r.reference : null), r.floating !== void 0 && (e.floatingElement = r.floating), o.update(e);
5791
+ r.reference !== void 0 && (e.referenceElement = r.reference, e.domReferenceElement = N(r.reference) ? r.reference : null), r.floating !== void 0 && (e.floatingElement = r.floating), o.update(e);
5785
5792
  }, [
5786
5793
  t,
5787
5794
  i,
@@ -5797,7 +5804,7 @@ function va(e = {}) {
5797
5804
  reference: i.useState("referenceElement"),
5798
5805
  floating: i.useState("floatingElement"),
5799
5806
  domReference: i.useState("domReferenceElement")
5800
- }, [o, s] = G.useState(null), c = G.useRef(null), l = Nt(n);
5807
+ }, [o, s] = G.useState(null), c = G.useRef(null), l = Ft(n);
5801
5808
  W(() => {
5802
5809
  a.domReference && (c.current = a.domReference);
5803
5810
  }, [a.domReference]);
@@ -5808,7 +5815,7 @@ function va(e = {}) {
5808
5815
  ...o && { reference: o }
5809
5816
  }
5810
5817
  }), d = G.useCallback((e) => {
5811
- let t = w(e) ? {
5818
+ let t = N(e) ? {
5812
5819
  getBoundingClientRect: () => e.getBoundingClientRect(),
5813
5820
  getClientRects: () => e.getClientRects(),
5814
5821
  contextElement: e
@@ -5816,10 +5823,10 @@ function va(e = {}) {
5816
5823
  s(t), u.refs.setReference(t);
5817
5824
  }, [u.refs]), [f, p] = G.useState(void 0), [m, h] = G.useState(null);
5818
5825
  i.useSyncedValue("referenceElement", f ?? null);
5819
- let g = w(f) ? f : null;
5826
+ let g = N(f) ? f : null;
5820
5827
  i.useSyncedValue("domReferenceElement", f === void 0 ? a.domReference : g), i.useSyncedValue("floatingElement", m);
5821
5828
  let _ = G.useCallback((e) => {
5822
- (w(e) || e === null) && (c.current = e, p(e)), (w(u.refs.reference.current) || u.refs.reference.current === null || e !== null && !w(e)) && u.refs.setReference(e);
5829
+ (N(e) || e === null) && (c.current = e, p(e)), (N(u.refs.reference.current) || u.refs.reference.current === null || e !== null && !N(e)) && u.refs.setReference(e);
5823
5830
  }, [u.refs, p]), v = G.useCallback((e) => {
5824
5831
  h(e), u.refs.setFloating(e);
5825
5832
  }, [u.refs]), y = G.useMemo(() => ({
@@ -5876,16 +5883,16 @@ function va(e = {}) {
5876
5883
  }
5877
5884
  //#endregion
5878
5885
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useFocus.js
5879
- var ya = A && Oe;
5886
+ var ya = Oe && Fe;
5880
5887
  function ba(e, t = {}) {
5881
- let n = "rootStore" in e ? e.rootStore : e, { events: r, dataRef: i } = n.context, { enabled: a = !0, delay: o } = t, s = G.useRef(!1), c = G.useRef(null), l = Ne(), u = G.useRef(!0);
5888
+ let n = "rootStore" in e ? e.rootStore : e, { events: r, dataRef: i } = n.context, { enabled: a = !0, delay: o } = t, s = G.useRef(!1), c = G.useRef(null), l = A(), u = G.useRef(!0);
5882
5889
  G.useEffect(() => {
5883
5890
  let e = n.select("domReferenceElement");
5884
5891
  if (!a) return;
5885
- let t = V(e);
5892
+ let t = pe(e);
5886
5893
  function r() {
5887
5894
  let e = n.select("domReferenceElement");
5888
- !n.select("open") && P(e) && e === C(D(e)) && (s.current = !0);
5895
+ !n.select("open") && L(e) && e === M(ne(e)) && (s.current = !0);
5889
5896
  }
5890
5897
  function i() {
5891
5898
  u.current = !0;
@@ -5893,13 +5900,13 @@ function ba(e, t = {}) {
5893
5900
  function o() {
5894
5901
  u.current = !1;
5895
5902
  }
5896
- return Bt(qe(t, "blur", r), ya && qe(t, "keydown", i, !0), ya && qe(t, "pointerdown", o, !0));
5903
+ return Ht(Ze(t, "blur", r), ya && Ze(t, "keydown", i, !0), ya && Ze(t, "pointerdown", o, !0));
5897
5904
  }, [n, a]), G.useEffect(() => {
5898
5905
  if (!a) return;
5899
5906
  function e(e) {
5900
5907
  if (e.reason === "trigger-press" || e.reason === "escape-key") {
5901
5908
  let e = n.select("domReferenceElement");
5902
- w(e) && (c.current = e, s.current = !0);
5909
+ N(e) && (c.current = e, s.current = !0);
5903
5910
  }
5904
5911
  }
5905
5912
  return r.on("openchange", e), () => {
@@ -5920,27 +5927,27 @@ function ba(e, t = {}) {
5920
5927
  if (c.current === t) return;
5921
5928
  s.current = !1, c.current = null;
5922
5929
  }
5923
- let r = ie(e.nativeEvent);
5924
- if (w(r)) {
5930
+ let r = _e(e.nativeEvent);
5931
+ if (N(r)) {
5925
5932
  if (ya && !e.relatedTarget) {
5926
- if (!u.current && !ce(r)) return;
5927
- } else if (!fe(r)) return;
5933
+ if (!u.current && !fe(r)) return;
5934
+ } else if (!S(r)) return;
5928
5935
  }
5929
- let i = dt(e.relatedTarget, n.context.triggerElements), { nativeEvent: a, currentTarget: d } = e, f = typeof o == "function" ? o() : o;
5936
+ let i = oe(e.relatedTarget, n.context.triggerElements), { nativeEvent: a, currentTarget: d } = e, f = typeof o == "function" ? o() : o;
5930
5937
  if (n.select("open") && i || f === 0 || f === void 0) {
5931
- n.setOpen(!0, U(_t, a, d));
5938
+ n.setOpen(!0, H(xt, a, d));
5932
5939
  return;
5933
5940
  }
5934
5941
  l.start(f, () => {
5935
- s.current || n.setOpen(!0, U(_t, a, d));
5942
+ s.current || n.setOpen(!0, H(xt, a, d));
5936
5943
  });
5937
5944
  },
5938
5945
  onBlur(e) {
5939
5946
  s.current = !1, c.current = null;
5940
- let t = e.relatedTarget, r = e.nativeEvent, a = w(t) && t.hasAttribute(wt("focus-guard")) && t.getAttribute("data-type") === "outside";
5947
+ let t = e.relatedTarget, r = e.nativeEvent, a = N(t) && t.hasAttribute(Dt("focus-guard")) && t.getAttribute("data-type") === "outside";
5941
5948
  l.start(0, () => {
5942
- let e = n.select("domReferenceElement"), o = C(D(e));
5943
- !t && o === e || N(i.current.floatingContext?.refs.floating.current, o) || N(e, o) || a || dt(t ?? o, n.context.triggerElements) || n.setOpen(!1, U(_t, r));
5949
+ let e = n.select("domReferenceElement"), o = M(ne(e));
5950
+ !t && o === e || I(i.current.floatingContext?.refs.floating.current, o) || I(e, o) || a || oe(t ?? o, n.context.triggerElements) || n.setOpen(!1, H(xt, r));
5944
5951
  });
5945
5952
  }
5946
5953
  }), [
@@ -5958,7 +5965,7 @@ function ba(e, t = {}) {
5958
5965
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useHoverInteractionSharedState.js
5959
5966
  var xa = class e {
5960
5967
  constructor() {
5961
- this.pointerType = void 0, this.interactedInside = !1, this.handler = void 0, this.blockMouseMove = !0, this.performedPointerEventsMutation = !1, this.pointerEventsScopeElement = null, this.pointerEventsReferenceElement = null, this.pointerEventsFloatingElement = null, this.restTimeoutPending = !1, this.openChangeTimeout = new f(), this.restTimeout = new f(), this.handleCloseOptions = void 0;
5968
+ this.pointerType = void 0, this.interactedInside = !1, this.handler = void 0, this.blockMouseMove = !0, this.performedPointerEventsMutation = !1, this.pointerEventsScopeElement = null, this.pointerEventsReferenceElement = null, this.pointerEventsFloatingElement = null, this.restTimeoutPending = !1, this.openChangeTimeout = new Ne(), this.restTimeout = new Ne(), this.handleCloseOptions = void 0;
5962
5969
  }
5963
5970
  static create() {
5964
5971
  return new e();
@@ -5978,138 +5985,138 @@ function wa(e, t) {
5978
5985
  a && a !== e && Ca(a), Ca(e), e.performedPointerEventsMutation = !0, e.pointerEventsScopeElement = n, e.pointerEventsReferenceElement = r, e.pointerEventsFloatingElement = i, Sa.set(n, e), n.style.pointerEvents = "none", r.style.pointerEvents = "auto", i.style.pointerEvents = "auto";
5979
5986
  }
5980
5987
  function Ta(e) {
5981
- let t = Zt(xa.create).current, n = e.context.dataRef.current;
5982
- return n.hoverInteractionState ||= t, j(n.hoverInteractionState.disposeEffect), n.hoverInteractionState;
5988
+ let t = Te(xa.create).current, n = e.context.dataRef.current;
5989
+ return n.hoverInteractionState ||= t, ke(n.hoverInteractionState.disposeEffect), n.hoverInteractionState;
5983
5990
  }
5984
5991
  //#endregion
5985
5992
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useHoverFloatingInteraction.js
5986
5993
  function Ea(e, t = {}) {
5987
- let n = "rootStore" in e ? e.rootStore : e, r = n.useState("open"), i = n.useState("floatingElement"), a = n.useState("domReferenceElement"), { dataRef: s } = n.context, { enabled: l = !0, closeDelay: u = 0, nodeId: d } = t, f = Ta(n), p = Nt(), m = ne(), g = h(() => si(s.current.openEvent?.type, f.interactedInside)), _ = h(() => {
5988
- let e = s.current.openEvent?.type;
5994
+ let n = "rootStore" in e ? e.rootStore : e, r = n.useState("open"), i = n.useState("floatingElement"), a = n.useState("domReferenceElement"), { dataRef: o } = n.context, { enabled: s = !0, closeDelay: l = 0, nodeId: u } = t, d = Ta(n), f = Ft(), p = te(), m = U(() => si(o.current.openEvent?.type, d.interactedInside)), h = U(() => {
5995
+ let e = o.current.openEvent?.type;
5989
5996
  return e?.includes("mouse") && e !== "mousedown";
5990
- }), v = h((e) => dt(e, n.context.triggerElements)), y = G.useCallback((e) => {
5991
- let t = ai(u, "close", f.pointerType), r = () => {
5992
- n.setOpen(!1, U(c, e)), p?.events.emit("floating.closed", e);
5997
+ }), g = U((e) => oe(e, n.context.triggerElements)), _ = G.useCallback((e) => {
5998
+ let t = ai(l, "close", d.pointerType), r = () => {
5999
+ n.setOpen(!1, H(c, e)), f?.events.emit("floating.closed", e);
5993
6000
  };
5994
- t ? f.openChangeTimeout.start(t, r) : (f.openChangeTimeout.clear(), r());
6001
+ t ? d.openChangeTimeout.start(t, r) : (d.openChangeTimeout.clear(), r());
5995
6002
  }, [
5996
- u,
6003
+ l,
5997
6004
  n,
5998
- f,
5999
- p
6000
- ]), b = h(() => {
6001
- Ca(f);
6002
- }), x = h((e) => {
6003
- let t = ie(e);
6004
- if (!o(t)) {
6005
- f.interactedInside = !1;
6005
+ d,
6006
+ f
6007
+ ]), v = U(() => {
6008
+ Ca(d);
6009
+ }), y = U((e) => {
6010
+ let t = _e(e);
6011
+ if (!ht(t)) {
6012
+ d.interactedInside = !1;
6006
6013
  return;
6007
6014
  }
6008
- f.interactedInside = t?.closest("[aria-haspopup]") != null;
6015
+ d.interactedInside = t?.closest("[aria-haspopup]") != null;
6009
6016
  });
6010
6017
  W(() => {
6011
- r || (f.pointerType = void 0, f.restTimeoutPending = !1, f.interactedInside = !1, b());
6018
+ r || (d.pointerType = void 0, d.restTimeoutPending = !1, d.interactedInside = !1, v());
6012
6019
  }, [
6013
6020
  r,
6014
- f,
6015
- b
6016
- ]), G.useEffect(() => b, [b]), W(() => {
6017
- if (l && r && f.handleCloseOptions?.blockPointerEvents && _() && w(a) && i) {
6018
- let e = a, t = i, n = D(i), r = p?.nodesRef.current.find((e) => e.id === m)?.context?.elements.floating;
6021
+ d,
6022
+ v
6023
+ ]), G.useEffect(() => v, [v]), W(() => {
6024
+ if (s && r && d.handleCloseOptions?.blockPointerEvents && h() && N(a) && i) {
6025
+ let e = a, t = i, n = ne(i), r = f?.nodesRef.current.find((e) => e.id === p)?.context?.elements.floating;
6019
6026
  r && (r.style.pointerEvents = "");
6020
- let o = f.handleCloseOptions?.getScope?.() ?? f.pointerEventsScopeElement ?? r ?? e.closest("[data-rootownerid]") ?? n.body;
6021
- return wa(f, {
6027
+ let o = d.handleCloseOptions?.getScope?.() ?? d.pointerEventsScopeElement ?? r ?? e.closest("[data-rootownerid]") ?? n.body;
6028
+ return wa(d, {
6022
6029
  scopeElement: o,
6023
6030
  referenceElement: e,
6024
6031
  floatingElement: t
6025
6032
  }), () => {
6026
- b();
6033
+ v();
6027
6034
  };
6028
6035
  }
6029
6036
  }, [
6030
- l,
6037
+ s,
6031
6038
  r,
6032
6039
  a,
6033
6040
  i,
6041
+ d,
6042
+ h,
6034
6043
  f,
6035
- _,
6036
6044
  p,
6037
- m,
6038
- b
6045
+ v
6039
6046
  ]);
6040
- let S = Ne();
6047
+ let b = A();
6041
6048
  G.useEffect(() => {
6042
- if (!l) return;
6049
+ if (!s) return;
6043
6050
  function e() {
6044
- f.openChangeTimeout.clear(), S.clear(), p?.events.off("floating.closed", r), b();
6051
+ d.openChangeTimeout.clear(), b.clear(), f?.events.off("floating.closed", r), v();
6045
6052
  }
6046
6053
  function t(e) {
6047
- if (p && m && H(p.nodesRef.current, m).length > 0) {
6048
- p.events.on("floating.closed", r);
6054
+ if (f && p && yt(f.nodesRef.current, p).length > 0) {
6055
+ f.events.on("floating.closed", r);
6049
6056
  return;
6050
6057
  }
6051
- if (v(e.relatedTarget)) return;
6052
- let t = s.current.floatingContext?.nodeId ?? d, n = e.relatedTarget;
6053
- if (!(p && t && w(n) && H(p.nodesRef.current, t, !1).some((e) => N(e.context?.elements.floating, n)))) {
6054
- if (f.handler) {
6055
- f.handler(e);
6058
+ if (g(e.relatedTarget)) return;
6059
+ let t = o.current.floatingContext?.nodeId ?? u, n = e.relatedTarget;
6060
+ if (!(f && t && N(n) && yt(f.nodesRef.current, t, !1).some((e) => I(e.context?.elements.floating, n)))) {
6061
+ if (d.handler) {
6062
+ d.handler(e);
6056
6063
  return;
6057
6064
  }
6058
- b(), g() || y(e);
6065
+ v(), m() || _(e);
6059
6066
  }
6060
6067
  }
6061
6068
  function r(e) {
6062
- !p || !m || H(p.nodesRef.current, m).length > 0 || S.start(0, () => {
6063
- p.events.off("floating.closed", r), n.setOpen(!1, U(c, e)), p.events.emit("floating.closed", e);
6069
+ !f || !p || yt(f.nodesRef.current, p).length > 0 || b.start(0, () => {
6070
+ f.events.off("floating.closed", r), n.setOpen(!1, H(c, e)), f.events.emit("floating.closed", e);
6064
6071
  });
6065
6072
  }
6066
6073
  let a = i;
6067
- return Bt(a && qe(a, "mouseenter", e), a && qe(a, "mouseleave", t), a && qe(a, "pointerdown", x, !0), () => {
6068
- p?.events.off("floating.closed", r);
6074
+ return Ht(a && Ze(a, "mouseenter", e), a && Ze(a, "mouseleave", t), a && Ze(a, "pointerdown", y, !0), () => {
6075
+ f?.events.off("floating.closed", r);
6069
6076
  });
6070
6077
  }, [
6071
- l,
6078
+ s,
6072
6079
  i,
6073
6080
  n,
6074
- s,
6075
- d,
6081
+ o,
6082
+ u,
6083
+ m,
6076
6084
  g,
6085
+ _,
6077
6086
  v,
6078
6087
  y,
6079
- b,
6080
- x,
6088
+ d,
6081
6089
  f,
6082
6090
  p,
6083
- m,
6084
- S
6091
+ b
6085
6092
  ]);
6086
6093
  }
6087
6094
  //#endregion
6088
6095
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useHoverReferenceInteraction.js
6089
6096
  var Da = { current: null };
6090
6097
  function Oa(e, t = {}) {
6091
- let n = "rootStore" in e ? e.rootStore : e, { dataRef: r, events: i } = n.context, { enabled: a = !0, delay: o = 0, handleClose: s = null, mouseOnly: l = !1, restMs: u = 0, move: d = !0, triggerElementRef: f = Da, externalTree: p, isActiveTrigger: m = !0, getHandleCloseContext: g, isClosing: _ } = t, v = Nt(p), y = Ta(n), b = G.useRef(!1), x = Ot(s), S = Ot(o), C = Ot(u), T = Ot(a), E = Ot(_);
6092
- m && (y.handleCloseOptions = x.current?.__options);
6093
- let O = h(() => si(r.current.openEvent?.type, y.interactedInside)), k = h((e) => dt(e, n.context.triggerElements)), A = h((e, t, r) => {
6098
+ let n = "rootStore" in e ? e.rootStore : e, { dataRef: r, events: i } = n.context, { enabled: a = !0, delay: o = 0, handleClose: s = null, mouseOnly: l = !1, restMs: u = 0, move: d = !0, triggerElementRef: f = Da, externalTree: p, isActiveTrigger: m = !0, getHandleCloseContext: h, isClosing: g } = t, _ = Ft(p), v = Ta(n), y = G.useRef(!1), b = At(s), x = At(o), S = At(u), C = At(a), w = At(g);
6099
+ m && (v.handleCloseOptions = b.current?.__options);
6100
+ let T = U(() => si(r.current.openEvent?.type, v.interactedInside)), E = U((e) => oe(e, n.context.triggerElements)), D = U((e, t, r) => {
6094
6101
  let i = n.context.triggerElements;
6095
- if (i.hasElement(t)) return !e || !N(e, t);
6096
- if (!w(r)) return !1;
6102
+ if (i.hasElement(t)) return !e || !I(e, t);
6103
+ if (!N(r)) return !1;
6097
6104
  let a = r;
6098
- return i.hasMatchingElement((e) => N(e, a)) && (!e || !N(e, a));
6099
- }), j = h((e, t = !0) => {
6100
- let r = ai(S.current, "close", y.pointerType);
6101
- r ? y.openChangeTimeout.start(r, () => {
6102
- n.setOpen(!1, U(c, e)), v?.events.emit("floating.closed", e);
6103
- }) : t && (y.openChangeTimeout.clear(), n.setOpen(!1, U(c, e)), v?.events.emit("floating.closed", e));
6104
- }), M = h(() => {
6105
- y.handler &&= (D(n.select("domReferenceElement")).removeEventListener("mousemove", y.handler), void 0);
6106
- }), P = h(() => {
6107
- Ca(y);
6105
+ return i.hasMatchingElement((e) => I(e, a)) && (!e || !I(e, a));
6106
+ }), O = U((e, t = !0) => {
6107
+ let r = ai(x.current, "close", v.pointerType);
6108
+ r ? v.openChangeTimeout.start(r, () => {
6109
+ n.setOpen(!1, H(c, e)), _?.events.emit("floating.closed", e);
6110
+ }) : t && (v.openChangeTimeout.clear(), n.setOpen(!1, H(c, e)), _?.events.emit("floating.closed", e));
6111
+ }), k = U(() => {
6112
+ v.handler &&= (ne(n.select("domReferenceElement")).removeEventListener("mousemove", v.handler), void 0);
6113
+ }), A = U(() => {
6114
+ Ca(v);
6108
6115
  });
6109
- return G.useEffect(() => M, [M]), G.useEffect(() => {
6116
+ return G.useEffect(() => k, [k]), G.useEffect(() => {
6110
6117
  if (!a) return;
6111
6118
  function e(e) {
6112
- e.open ? b.current = !1 : (b.current = e.reason === c, M(), y.openChangeTimeout.clear(), y.restTimeout.clear(), y.blockMouseMove = !0, y.restTimeoutPending = !1);
6119
+ e.open ? y.current = !1 : (y.current = e.reason === c, k(), v.openChangeTimeout.clear(), v.restTimeout.clear(), v.blockMouseMove = !0, v.restTimeoutPending = !1);
6113
6120
  }
6114
6121
  return i.on("openchange", e), () => {
6115
6122
  i.off("openchange", e);
@@ -6117,124 +6124,124 @@ function Oa(e, t = {}) {
6117
6124
  }, [
6118
6125
  a,
6119
6126
  i,
6120
- y,
6121
- M
6127
+ v,
6128
+ k
6122
6129
  ]), G.useEffect(() => {
6123
6130
  if (!a) return;
6124
6131
  let e = f.current ?? (m ? n.select("domReferenceElement") : null);
6125
- if (!w(e)) return;
6132
+ if (!N(e)) return;
6126
6133
  function t(e) {
6127
- if (y.openChangeTimeout.clear(), y.blockMouseMove = !1, l && !Xt(y.pointerType)) return;
6128
- let t = oi(C.current), r = ai(S.current, "open", y.pointerType), i = ie(e), a = e.currentTarget ?? null, o = n.select("domReferenceElement"), s = a;
6129
- if (w(i) && !n.context.triggerElements.hasElement(i)) {
6130
- for (let e of n.context.triggerElements.elements()) if (N(e, i)) {
6134
+ if (v.openChangeTimeout.clear(), v.blockMouseMove = !1, l && !we(v.pointerType)) return;
6135
+ let t = oi(S.current), r = ai(x.current, "open", v.pointerType), i = _e(e), a = e.currentTarget ?? null, o = n.select("domReferenceElement"), s = a;
6136
+ if (N(i) && !n.context.triggerElements.hasElement(i)) {
6137
+ for (let e of n.context.triggerElements.elements()) if (I(e, i)) {
6131
6138
  s = e;
6132
6139
  break;
6133
6140
  }
6134
6141
  }
6135
- w(a) && w(o) && !n.context.triggerElements.hasElement(a) && N(a, o) && (s = o);
6136
- let u = s != null && A(o, s, i), d = n.select("open"), f = E.current?.() ?? n.select("transitionStatus") === "ending", p = !d && f && b.current, m = !u && w(s) && w(o) && N(o, s) && p, h = t > 0 && !r, g = u && (d || p) || m, _ = !d || u;
6142
+ N(a) && N(o) && !n.context.triggerElements.hasElement(a) && I(a, o) && (s = o);
6143
+ let u = s != null && D(o, s, i), d = n.select("open"), f = w.current?.() ?? n.select("transitionStatus") === "ending", p = !d && f && y.current, m = !u && N(s) && N(o) && I(o, s) && p, h = t > 0 && !r, g = u && (d || p) || m, _ = !d || u;
6137
6144
  if (g) {
6138
- n.setOpen(!0, U(c, e, s));
6145
+ n.setOpen(!0, H(c, e, s));
6139
6146
  return;
6140
6147
  }
6141
- h || (r ? y.openChangeTimeout.start(r, () => {
6142
- _ && n.setOpen(!0, U(c, e, s));
6143
- }) : _ && n.setOpen(!0, U(c, e, s)));
6148
+ h || (r ? v.openChangeTimeout.start(r, () => {
6149
+ _ && n.setOpen(!0, H(c, e, s));
6150
+ }) : _ && n.setOpen(!0, H(c, e, s)));
6144
6151
  }
6145
6152
  function i(e) {
6146
- if (O()) {
6147
- P();
6153
+ if (T()) {
6154
+ A();
6148
6155
  return;
6149
6156
  }
6150
- M();
6151
- let t = n.select("domReferenceElement"), i = D(t);
6152
- y.restTimeout.clear(), y.restTimeoutPending = !1;
6153
- let a = r.current.floatingContext ?? g?.();
6154
- if (!k(e.relatedTarget)) {
6155
- if (x.current && a) {
6156
- n.select("open") || y.openChangeTimeout.clear();
6157
+ k();
6158
+ let t = n.select("domReferenceElement"), i = ne(t);
6159
+ v.restTimeout.clear(), v.restTimeoutPending = !1;
6160
+ let a = r.current.floatingContext ?? h?.();
6161
+ if (!E(e.relatedTarget)) {
6162
+ if (b.current && a) {
6163
+ n.select("open") || v.openChangeTimeout.clear();
6157
6164
  let t = f.current;
6158
- y.handler = x.current({
6165
+ v.handler = b.current({
6159
6166
  ...a,
6160
- tree: v,
6167
+ tree: _,
6161
6168
  x: e.clientX,
6162
6169
  y: e.clientY,
6163
6170
  onClose() {
6164
- P(), M(), T.current && !O() && t === n.select("domReferenceElement") && j(e, !0);
6171
+ A(), k(), C.current && !T() && t === n.select("domReferenceElement") && O(e, !0);
6165
6172
  }
6166
- }), i.addEventListener("mousemove", y.handler), y.handler(e);
6173
+ }), i.addEventListener("mousemove", v.handler), v.handler(e);
6167
6174
  return;
6168
6175
  }
6169
- (y.pointerType !== "touch" || !N(n.select("floatingElement"), e.relatedTarget)) && j(e);
6176
+ (v.pointerType !== "touch" || !I(n.select("floatingElement"), e.relatedTarget)) && O(e);
6170
6177
  }
6171
6178
  }
6172
- return d ? Bt(qe(e, "mousemove", t, { once: !0 }), qe(e, "mouseenter", t), qe(e, "mouseleave", i)) : Bt(qe(e, "mouseenter", t), qe(e, "mouseleave", i));
6179
+ return d ? Ht(Ze(e, "mousemove", t, { once: !0 }), Ze(e, "mouseenter", t), Ze(e, "mouseleave", i)) : Ht(Ze(e, "mouseenter", t), Ze(e, "mouseleave", i));
6173
6180
  }, [
6174
- M,
6175
- P,
6181
+ k,
6182
+ A,
6176
6183
  r,
6177
- S,
6178
- j,
6184
+ x,
6185
+ O,
6179
6186
  n,
6180
6187
  a,
6181
- x,
6182
- y,
6188
+ b,
6189
+ v,
6183
6190
  m,
6184
- A,
6185
- O,
6186
- k,
6191
+ D,
6192
+ T,
6193
+ E,
6187
6194
  l,
6188
6195
  d,
6189
- C,
6196
+ S,
6190
6197
  f,
6191
- v,
6192
- T,
6193
- g,
6194
- E
6198
+ _,
6199
+ C,
6200
+ h,
6201
+ w
6195
6202
  ]), G.useMemo(() => {
6196
6203
  if (!a) return;
6197
6204
  function e(e) {
6198
- y.pointerType = e.pointerType;
6205
+ v.pointerType = e.pointerType;
6199
6206
  }
6200
6207
  return {
6201
6208
  onPointerDown: e,
6202
6209
  onPointerEnter: e,
6203
6210
  onMouseMove(e) {
6204
- let { nativeEvent: t } = e, r = e.currentTarget, i = n.select("domReferenceElement"), a = n.select("open"), o = A(i, r, e.target);
6205
- if (l && !Xt(y.pointerType)) return;
6206
- if (a && o && y.handleCloseOptions?.blockPointerEvents) {
6211
+ let { nativeEvent: t } = e, r = e.currentTarget, i = n.select("domReferenceElement"), a = n.select("open"), o = D(i, r, e.target);
6212
+ if (l && !we(v.pointerType)) return;
6213
+ if (a && o && v.handleCloseOptions?.blockPointerEvents) {
6207
6214
  let e = n.select("floatingElement");
6208
6215
  if (e) {
6209
- let t = y.handleCloseOptions?.getScope?.() ?? r.ownerDocument.body;
6210
- wa(y, {
6216
+ let t = v.handleCloseOptions?.getScope?.() ?? r.ownerDocument.body;
6217
+ wa(v, {
6211
6218
  scopeElement: t,
6212
6219
  referenceElement: r,
6213
6220
  floatingElement: e
6214
6221
  });
6215
6222
  }
6216
6223
  }
6217
- let s = oi(C.current);
6218
- if (a && !o || s === 0 || !o && y.restTimeoutPending && e.movementX ** 2 + e.movementY ** 2 < 2) return;
6219
- y.restTimeout.clear();
6224
+ let s = oi(S.current);
6225
+ if (a && !o || s === 0 || !o && v.restTimeoutPending && e.movementX ** 2 + e.movementY ** 2 < 2) return;
6226
+ v.restTimeout.clear();
6220
6227
  function u() {
6221
- if (y.restTimeoutPending = !1, O()) return;
6228
+ if (v.restTimeoutPending = !1, T()) return;
6222
6229
  let e = n.select("open");
6223
- !y.blockMouseMove && (!e || o) && n.setOpen(!0, U(c, t, r));
6230
+ !v.blockMouseMove && (!e || o) && n.setOpen(!0, H(c, t, r));
6224
6231
  }
6225
- y.pointerType === "touch" ? fn.flushSync(() => {
6232
+ v.pointerType === "touch" ? fn.flushSync(() => {
6226
6233
  u();
6227
- }) : o && a ? u() : (y.restTimeoutPending = !0, y.restTimeout.start(s, u));
6234
+ }) : o && a ? u() : (v.restTimeoutPending = !0, v.restTimeout.start(s, u));
6228
6235
  }
6229
6236
  };
6230
6237
  }, [
6231
6238
  a,
6232
- y,
6233
- O,
6234
- A,
6239
+ v,
6240
+ T,
6241
+ D,
6235
6242
  l,
6236
6243
  n,
6237
- C
6244
+ S
6238
6245
  ]);
6239
6246
  }
6240
6247
  //#endregion
@@ -6254,228 +6261,228 @@ function Ma(e, t, n) {
6254
6261
  return Aa(t, e === "ArrowDown", n ? e === "ArrowLeft" : e === "ArrowRight") || e === "Enter" || e === " " || e === "";
6255
6262
  }
6256
6263
  function Na(e, t, n) {
6257
- return Aa(t, n ? e === rn : e === u, e === _e);
6264
+ return Aa(t, n ? e === u : e === je, e === rn);
6258
6265
  }
6259
6266
  function Pa(e, t, n, r) {
6260
- return t === "both" || t === "horizontal" && r && r > 1 ? e === ka : Aa(t, n ? e === u : e === rn, e === je);
6267
+ return t === "both" || t === "horizontal" && r && r > 1 ? e === ka : Aa(t, n ? e === je : e === u, e === O);
6261
6268
  }
6262
6269
  function Fa(e, t) {
6263
- let n = "rootStore" in e ? e.rootStore : e, r = n.useState("open"), a = n.useState("floatingElement"), o = n.useState("domReferenceElement"), s = n.context.dataRef, { listRef: c, activeIndex: l, onNavigate: u = () => {}, enabled: d = !0, selectedIndex: f = null, allowEscape: p = !1, loopFocus: m = !1, nested: g = !1, rtl: _ = !1, virtual: y = !1, focusItemOnOpen: b = "auto", focusItemOnHover: S = !0, openOnArrowKeyDown: w = !0, disabledIndices: T = void 0, orientation: E = "vertical", parentOrientation: O, cols: k = 1, id: A, resetOnPointerLeave: j = !0, externalTree: M } = t;
6264
- process.env.NODE_ENV !== "production" && (p && (m || console.warn("`useListNavigation` looping must be enabled to allow escaping."), y || console.warn("`useListNavigation` must be virtual to allow escaping.")), E === "vertical" && k > 1 && console.warn("In grid list navigation mode (`cols` > 1), the `orientation` should", "be either \"horizontal\" or \"both\"."));
6265
- let F = ht(a), I = Ot(F), ee = ne(), L = Nt(M);
6270
+ let n = "rootStore" in e ? e.rootStore : e, r = n.useState("open"), a = n.useState("floatingElement"), s = n.useState("domReferenceElement"), c = n.context.dataRef, { listRef: l, activeIndex: u, onNavigate: d = () => {}, enabled: f = !0, selectedIndex: p = null, allowEscape: m = !1, loopFocus: h = !1, nested: g = !1, rtl: v = !1, virtual: y = !1, focusItemOnOpen: x = "auto", focusItemOnHover: S = !0, openOnArrowKeyDown: C = !0, disabledIndices: w = void 0, orientation: T = "vertical", parentOrientation: E, cols: D = 1, id: O, resetOnPointerLeave: k = !0, externalTree: A } = t;
6271
+ process.env.NODE_ENV !== "production" && (m && (h || console.warn("`useListNavigation` looping must be enabled to allow escaping."), y || console.warn("`useListNavigation` must be virtual to allow escaping.")), T === "vertical" && D > 1 && console.warn("In grid list navigation mode (`cols` > 1), the `orientation` should", "be either \"horizontal\" or \"both\"."));
6272
+ let j = o(a), N = At(j), P = te(), F = Ft(A);
6266
6273
  W(() => {
6267
- s.current.orientation = E;
6268
- }, [s, E]);
6269
- let re = oe(o), R = G.useRef(b), z = G.useRef(f ?? -1), ae = G.useRef(null), se = G.useRef(!0), B = h((e) => {
6270
- u(z.current === -1 ? null : z.current, e);
6271
- }), ce = G.useRef(B), V = G.useRef(!!a), le = G.useRef(r), H = G.useRef(!1), ue = G.useRef(!1), de = G.useRef(null), fe = Ot(T), pe = Ot(r), me = Ot(f), he = Ot(j), _e = h(() => {
6274
+ c.current.orientation = T;
6275
+ }, [c, T]);
6276
+ let re = ce(s), ie = G.useRef(x), R = G.useRef(p ?? -1), ae = G.useRef(null), oe = G.useRef(!0), z = U((e) => {
6277
+ d(R.current === -1 ? null : R.current, e);
6278
+ }), se = G.useRef(z), le = G.useRef(!!a), ue = G.useRef(r), V = G.useRef(!1), de = G.useRef(!1), fe = G.useRef(null), pe = At(w), me = At(r), he = At(p), ve = At(k), ye = U(() => {
6272
6279
  function e(e) {
6273
- y ? L?.events.emit("virtualfocus", e) : de.current = Ut(e, {
6274
- sync: H.current,
6280
+ y ? F?.events.emit("virtualfocus", e) : fe.current = Gt(e, {
6281
+ sync: V.current,
6275
6282
  preventScroll: !0
6276
6283
  });
6277
6284
  }
6278
- let t = c.current[z.current], n = ue.current;
6279
- t && e(t), (H.current ? (e) => e() : requestAnimationFrame)(() => {
6280
- let r = c.current[z.current] || t;
6281
- r && (t || e(r), be && (n || !se.current) && r.scrollIntoView?.({
6285
+ let t = l.current[R.current], n = de.current;
6286
+ t && e(t), (V.current ? (e) => e() : requestAnimationFrame)(() => {
6287
+ let r = l.current[R.current] || t;
6288
+ r && (t || e(r), Ce && (n || !oe.current) && r.scrollIntoView?.({
6282
6289
  block: "nearest",
6283
6290
  inline: "nearest"
6284
6291
  }));
6285
6292
  });
6286
6293
  });
6287
6294
  W(() => {
6288
- d && (r && a ? (z.current = f ?? -1, R.current && f != null && (ue.current = !0, B())) : V.current && (z.current = -1, ce.current()));
6295
+ f && (r && a ? (R.current = p ?? -1, ie.current && p != null && (de.current = !0, z())) : le.current && (R.current = -1, se.current()));
6289
6296
  }, [
6290
- d,
6297
+ f,
6291
6298
  r,
6292
6299
  a,
6293
- f,
6294
- B
6300
+ p,
6301
+ z
6295
6302
  ]), W(() => {
6296
- if (d) {
6303
+ if (f) {
6297
6304
  if (!r) {
6298
- H.current = !1;
6305
+ V.current = !1;
6299
6306
  return;
6300
6307
  }
6301
6308
  if (a) {
6302
- if (l == null) {
6303
- if (H.current = !1, me.current != null) return;
6304
- if (V.current && (z.current = -1, _e()), (!le.current || !V.current) && R.current && (ae.current != null || R.current === !0 && ae.current == null)) {
6309
+ if (u == null) {
6310
+ if (V.current = !1, he.current != null) return;
6311
+ if (le.current && (R.current = -1, ye()), (!ue.current || !le.current) && ie.current && (ae.current != null || ie.current === !0 && ae.current == null)) {
6305
6312
  let e = 0, t = () => {
6306
- c.current[0] == null ? (e < 2 && (e ? requestAnimationFrame : queueMicrotask)(t), e += 1) : (z.current = ae.current == null || Ma(ae.current, E, _) || g ? i(c) : ge(c), ae.current = null, B());
6313
+ l.current[0] == null ? (e < 2 && (e ? requestAnimationFrame : queueMicrotask)(t), e += 1) : (R.current = ae.current == null || Ma(ae.current, T, v) || g ? tt(l) : i(l), ae.current = null, z());
6307
6314
  };
6308
6315
  t();
6309
6316
  }
6310
- } else Ht(c.current, l) || (z.current = l, _e(), ue.current = !1);
6317
+ } else Et(l.current, u) || (R.current = u, ye(), de.current = !1);
6311
6318
  }
6312
6319
  }
6313
6320
  }, [
6314
- d,
6321
+ f,
6315
6322
  r,
6316
6323
  a,
6317
- l,
6318
- me,
6324
+ u,
6325
+ he,
6319
6326
  g,
6320
- c,
6321
- E,
6322
- _,
6323
- B,
6324
- _e,
6325
- fe
6327
+ l,
6328
+ T,
6329
+ v,
6330
+ z,
6331
+ ye,
6332
+ pe
6326
6333
  ]), W(() => {
6327
- if (!d || a || !L || y || !V.current) return;
6328
- let e = L.nodesRef.current, t = e.find((e) => e.id === ee)?.context?.elements.floating, n = C(D(a)), r = e.some((e) => e.context && N(e.context.elements.floating, n));
6329
- t && !r && se.current && t.focus({ preventScroll: !0 });
6334
+ if (!f || a || !F || y || !le.current) return;
6335
+ let e = F.nodesRef.current, t = e.find((e) => e.id === P)?.context?.elements.floating, n = M(ne(a)), r = e.some((e) => e.context && I(e.context.elements.floating, n));
6336
+ t && !r && oe.current && t.focus({ preventScroll: !0 });
6330
6337
  }, [
6331
- d,
6338
+ f,
6332
6339
  a,
6333
- L,
6334
- ee,
6340
+ F,
6341
+ P,
6335
6342
  y
6336
6343
  ]), W(() => {
6337
- ce.current = B, le.current = r, V.current = !!a;
6344
+ se.current = z, ue.current = r, le.current = !!a;
6338
6345
  }), W(() => {
6339
- r || (ae.current = null, R.current = b);
6340
- }, [r, b]);
6341
- let ve = l != null, ye = h((e) => {
6342
- if (!pe.current) return;
6343
- let t = c.current.indexOf(e.currentTarget);
6344
- t !== -1 && (z.current !== t || l !== t) && (z.current = t, B(e));
6345
- }), be = G.useMemo(() => ({
6346
+ r || (ae.current = null, ie.current = x);
6347
+ }, [r, x]);
6348
+ let be = u != null, xe = U((e) => {
6349
+ if (!me.current) return;
6350
+ let t = l.current.indexOf(e.currentTarget);
6351
+ t !== -1 && (R.current !== t || u !== t) && (R.current = t, z(e));
6352
+ }), Ce = G.useMemo(() => ({
6346
6353
  onFocus(e) {
6347
- H.current = !0, ye(e);
6354
+ V.current = !0, xe(e);
6348
6355
  },
6349
6356
  onClick: ({ currentTarget: e }) => e.focus({ preventScroll: !0 }),
6350
6357
  onMouseMove(e) {
6351
- H.current = !0, ue.current = !1, S && ye(e);
6358
+ V.current = !0, de.current = !1, S && xe(e);
6352
6359
  },
6353
6360
  onPointerLeave(e) {
6354
- if (!pe.current || !se.current || e.pointerType === "touch") return;
6355
- H.current = !0;
6361
+ if (!me.current || !oe.current || e.pointerType === "touch") return;
6362
+ V.current = !0;
6356
6363
  let t = e.relatedTarget;
6357
- if (!(!S || c.current.includes(t)) && he.current && (de.current?.(), de.current = null, z.current = -1, B(e), !y)) {
6358
- let e = I.current, t = C(D(e));
6359
- e && N(e, t) && e.focus({ preventScroll: !0 });
6364
+ if (!(!S || l.current.includes(t)) && ve.current && (fe.current?.(), fe.current = null, R.current = -1, z(e), !y)) {
6365
+ let e = N.current, t = M(ne(e));
6366
+ e && I(e, t) && e.focus({ preventScroll: !0 });
6360
6367
  }
6361
6368
  }
6362
6369
  }), [
6363
- ye,
6364
- pe,
6365
- I,
6370
+ xe,
6371
+ me,
6372
+ N,
6366
6373
  S,
6367
- c,
6368
- B,
6369
- he,
6374
+ l,
6375
+ z,
6376
+ ve,
6370
6377
  y
6371
- ]), xe = G.useCallback(() => O ?? L?.nodesRef.current.find((e) => e.id === ee)?.context?.dataRef?.current.orientation, [
6372
- ee,
6373
- L,
6374
- O
6375
- ]), Ce = h((e) => {
6376
- if (se.current = !1, H.current = !0, e.which === 229 || !pe.current && e.currentTarget === I.current) return;
6377
- if (g && Pa(e.key, E, _, k)) {
6378
- ja(e.key, xe()) || v(e), n.setOpen(!1, U(Ee, e.nativeEvent)), P(o) && (y ? L?.events.emit("virtualfocus", o) : o.focus());
6378
+ ]), we = G.useCallback(() => E ?? F?.nodesRef.current.find((e) => e.id === P)?.context?.dataRef?.current.orientation, [
6379
+ P,
6380
+ F,
6381
+ E
6382
+ ]), Te = U((e) => {
6383
+ if (oe.current = !1, V.current = !0, e.which === 229 || !me.current && e.currentTarget === N.current) return;
6384
+ if (g && Pa(e.key, T, v, D)) {
6385
+ ja(e.key, we()) || B(e), n.setOpen(!1, H(Ee, e.nativeEvent)), L(s) && (y ? F?.events.emit("virtualfocus", s) : s.focus());
6379
6386
  return;
6380
6387
  }
6381
- let t = z.current, a = i(c, T), s = ge(c, T);
6382
- if (re || (e.key === "Home" && (v(e), z.current = a, B(e)), e.key === "End" && (v(e), z.current = s, B(e))), k > 1) {
6383
- let t = Array.from({ length: c.current.length }, () => ({
6388
+ let t = R.current, a = tt(l, w), o = i(l, w);
6389
+ if (re || (e.key === "Home" && (B(e), R.current = a, z(e)), e.key === "End" && (B(e), R.current = o, z(e))), D > 1) {
6390
+ let t = Array.from({ length: l.current.length }, () => ({
6384
6391
  width: 1,
6385
6392
  height: 1
6386
- })), n = Pt(t, k, !1), r = n.findIndex((e) => e != null && !Ct(c.current, e, T)), i = n.reduce((e, t, n) => t != null && !Ct(c.current, t, T) ? n : e, -1), o = n[Be(n.map((e) => e == null ? null : c.current[e]), {
6393
+ })), n = ee(t, D, !1), r = n.findIndex((e) => e != null && !Rt(l.current, e, w)), i = n.reduce((e, t, n) => t != null && !Rt(l.current, t, w) ? n : e, -1), s = n[ge(n.map((e) => e == null ? null : l.current[e]), {
6387
6394
  event: e,
6388
- orientation: E,
6389
- loopFocus: m,
6390
- rtl: _,
6391
- cols: k,
6392
- disabledIndices: Ie([...(typeof T == "function" ? null : T) || c.current.map((e, t) => Ct(c.current, t, T) ? t : void 0), void 0], n),
6395
+ orientation: T,
6396
+ loopFocus: h,
6397
+ rtl: v,
6398
+ cols: D,
6399
+ disabledIndices: He([...(typeof w == "function" ? null : w) || l.current.map((e, t) => Rt(l.current, t, w) ? t : void 0), void 0], n),
6393
6400
  minIndex: r,
6394
6401
  maxIndex: i,
6395
- prevIndex: ze(z.current > s ? a : z.current, t, n, k, e.key === "ArrowDown" ? "bl" : e.key === (_ ? "ArrowLeft" : "ArrowRight") ? "tr" : "tl"),
6402
+ prevIndex: Re(R.current > o ? a : R.current, t, n, D, e.key === "ArrowDown" ? "bl" : e.key === (v ? "ArrowLeft" : "ArrowRight") ? "tr" : "tl"),
6396
6403
  stopEvent: !0
6397
6404
  })];
6398
- if (o != null && (z.current = o, B(e)), E === "both") return;
6405
+ if (s != null && (R.current = s, z(e)), T === "both") return;
6399
6406
  }
6400
- if (ja(e.key, E)) {
6401
- if (v(e), r && !y && C(e.currentTarget.ownerDocument) === e.currentTarget) {
6402
- z.current = Ma(e.key, E, _) ? a : s, B(e);
6407
+ if (ja(e.key, T)) {
6408
+ if (B(e), r && !y && M(e.currentTarget.ownerDocument) === e.currentTarget) {
6409
+ R.current = Ma(e.key, T, v) ? a : o, z(e);
6403
6410
  return;
6404
6411
  }
6405
- Ma(e.key, E, _) ? m ? t >= s ? p && t !== c.current.length ? z.current = -1 : (H.current = !1, z.current = a) : z.current = te(c.current, {
6412
+ Ma(e.key, T, v) ? h ? t >= o ? m && t !== l.current.length ? R.current = -1 : (V.current = !1, R.current = a) : R.current = Ve(l.current, {
6406
6413
  startingIndex: t,
6407
- disabledIndices: T
6408
- }) : z.current = Math.min(s, te(c.current, {
6414
+ disabledIndices: w
6415
+ }) : R.current = Math.min(o, Ve(l.current, {
6409
6416
  startingIndex: t,
6410
- disabledIndices: T
6411
- })) : m ? t <= a ? p && t !== -1 ? z.current = c.current.length : (H.current = !1, z.current = s) : z.current = te(c.current, {
6417
+ disabledIndices: w
6418
+ })) : h ? t <= a ? m && t !== -1 ? R.current = l.current.length : (V.current = !1, R.current = o) : R.current = Ve(l.current, {
6412
6419
  startingIndex: t,
6413
6420
  decrement: !0,
6414
- disabledIndices: T
6415
- }) : z.current = Math.max(a, te(c.current, {
6421
+ disabledIndices: w
6422
+ }) : R.current = Math.max(a, Ve(l.current, {
6416
6423
  startingIndex: t,
6417
6424
  decrement: !0,
6418
- disabledIndices: T
6419
- })), Ht(c.current, z.current) && (z.current = -1), B(e);
6425
+ disabledIndices: w
6426
+ })), Et(l.current, R.current) && (R.current = -1), z(e);
6420
6427
  }
6421
- }), Te = G.useMemo(() => y && r && ve && { "aria-activedescendant": `${A}-${l}` }, [
6428
+ }), De = G.useMemo(() => y && r && be && { "aria-activedescendant": `${O}-${u}` }, [
6422
6429
  y,
6423
6430
  r,
6424
- ve,
6425
- A,
6426
- l
6427
- ]), De = G.useMemo(() => ({
6428
- "aria-orientation": E === "both" ? void 0 : E,
6429
- ...re ? {} : Te,
6431
+ be,
6432
+ O,
6433
+ u
6434
+ ]), Oe = G.useMemo(() => ({
6435
+ "aria-orientation": T === "both" ? void 0 : T,
6436
+ ...re ? {} : De,
6430
6437
  onKeyDown(e) {
6431
6438
  if (e.key === "Tab" && e.shiftKey && r && !y) {
6432
- let t = ie(e.nativeEvent);
6433
- if (t && !N(I.current, t)) return;
6434
- v(e), n.setOpen(!1, U(Se, e.nativeEvent)), P(o) && o.focus();
6439
+ let t = _e(e.nativeEvent);
6440
+ if (t && !I(N.current, t)) return;
6441
+ B(e), n.setOpen(!1, H(Se, e.nativeEvent)), L(s) && s.focus();
6435
6442
  return;
6436
6443
  }
6437
- Ce(e);
6444
+ Te(e);
6438
6445
  },
6439
6446
  onPointerMove() {
6440
- se.current = !0;
6447
+ oe.current = !0;
6441
6448
  }
6442
6449
  }), [
6450
+ De,
6443
6451
  Te,
6444
- Ce,
6445
- I,
6446
- E,
6452
+ N,
6453
+ T,
6447
6454
  re,
6448
6455
  n,
6449
6456
  r,
6450
6457
  y,
6451
- o
6452
- ]), Oe = G.useMemo(() => {
6458
+ s
6459
+ ]), ke = G.useMemo(() => {
6453
6460
  function e(e) {
6454
- b === "auto" && we(e.nativeEvent) && (R.current = !y);
6461
+ x === "auto" && b(e.nativeEvent) && (ie.current = !y);
6455
6462
  }
6456
6463
  function t(e) {
6457
- R.current = b, b === "auto" && x(e.nativeEvent) && (R.current = !0);
6464
+ ie.current = x, x === "auto" && _(e.nativeEvent) && (ie.current = !0);
6458
6465
  }
6459
6466
  return {
6460
6467
  onKeyDown(e) {
6461
6468
  let t = n.select("open");
6462
- se.current = !1;
6463
- let r = e.key.startsWith("Arrow"), a = Na(e.key, xe(), _), o = ja(e.key, E), s = (g ? a : o) || e.key === "Enter" || e.key.trim() === "";
6464
- if (y && t) return Ce(e);
6465
- if (!(!t && !w && r)) {
6466
- if (s) {
6467
- let t = ja(e.key, xe());
6469
+ oe.current = !1;
6470
+ let r = e.key.startsWith("Arrow"), i = Na(e.key, we(), v), a = ja(e.key, T), o = (g ? i : a) || e.key === "Enter" || e.key.trim() === "";
6471
+ if (y && t) return Te(e);
6472
+ if (!(!t && !C && r)) {
6473
+ if (o) {
6474
+ let t = ja(e.key, we());
6468
6475
  ae.current = g && t ? null : e.key;
6469
6476
  }
6470
6477
  if (g) {
6471
- a && (v(e), t ? (z.current = i(c, fe.current), B(e)) : n.setOpen(!0, U(Ee, e.nativeEvent, e.currentTarget)));
6478
+ i && (B(e), t ? (R.current = tt(l, pe.current), z(e)) : n.setOpen(!0, H(Ee, e.nativeEvent, e.currentTarget)));
6472
6479
  return;
6473
6480
  }
6474
- o && (me.current != null && (z.current = me.current), v(e), !t && w ? n.setOpen(!0, U(Ee, e.nativeEvent, e.currentTarget)) : Ce(e), t && B(e));
6481
+ a && (he.current != null && (R.current = he.current), B(e), !t && C ? n.setOpen(!0, H(Ee, e.nativeEvent, e.currentTarget)) : Te(e), t && z(e));
6475
6482
  }
6476
6483
  },
6477
6484
  onFocus(e) {
6478
- n.select("open") && !y && (z.current = -1, B(e));
6485
+ n.select("open") && !y && (R.current = -1, z(e));
6479
6486
  },
6480
6487
  onPointerDown: t,
6481
6488
  onPointerEnter: t,
@@ -6483,59 +6490,59 @@ function Fa(e, t) {
6483
6490
  onClick: e
6484
6491
  };
6485
6492
  }, [
6486
- Ce,
6487
- fe,
6488
- b,
6489
- c,
6493
+ Te,
6494
+ pe,
6495
+ x,
6496
+ l,
6490
6497
  g,
6491
- B,
6498
+ z,
6492
6499
  n,
6493
- w,
6494
- E,
6495
- xe,
6496
- _,
6497
- me,
6500
+ C,
6501
+ T,
6502
+ we,
6503
+ v,
6504
+ he,
6498
6505
  y
6499
- ]), ke = G.useMemo(() => ({
6500
- ...Te,
6501
- ...Oe
6502
- }), [Te, Oe]);
6503
- return G.useMemo(() => d ? {
6504
- reference: ke,
6505
- floating: De,
6506
- item: be,
6507
- trigger: Oe
6506
+ ]), Ae = G.useMemo(() => ({
6507
+ ...De,
6508
+ ...ke
6509
+ }), [De, ke]);
6510
+ return G.useMemo(() => f ? {
6511
+ reference: Ae,
6512
+ floating: Oe,
6513
+ item: Ce,
6514
+ trigger: ke
6508
6515
  } : {}, [
6509
- d,
6510
- ke,
6511
- De,
6516
+ f,
6517
+ Ae,
6512
6518
  Oe,
6513
- be
6519
+ ke,
6520
+ Ce
6514
6521
  ]);
6515
6522
  }
6516
6523
  //#endregion
6517
6524
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useTypeahead.js
6518
6525
  function Ia(e, t) {
6519
- let n = "rootStore" in e ? e.rootStore : e, r = n.context.dataRef, i = n.useState("open"), { listRef: a, elementsRef: o, activeIndex: s, onMatch: c, onTypingChange: l, enabled: u = !0, resetMs: d = 750, selectedIndex: f = null } = t, p = Ne(), m = G.useRef(""), g = G.useRef(f ?? s ?? -1), _ = G.useRef(null);
6526
+ let n = "rootStore" in e ? e.rootStore : e, r = n.context.dataRef, i = n.useState("open"), { listRef: a, elementsRef: o, activeIndex: s, onMatch: c, onTypingChange: l, enabled: u = !0, resetMs: d = 750, selectedIndex: f = null } = t, p = A(), m = G.useRef(""), h = G.useRef(f ?? s ?? -1), g = G.useRef(null);
6520
6527
  W(() => {
6521
- !i && f !== null || (p.clear(), _.current = null, m.current !== "" && (m.current = ""));
6528
+ !i && f !== null || (p.clear(), g.current = null, m.current !== "" && (m.current = ""));
6522
6529
  }, [
6523
6530
  i,
6524
6531
  f,
6525
6532
  p
6526
6533
  ]), W(() => {
6527
- i && m.current === "" && (g.current = f ?? s ?? -1);
6534
+ i && m.current === "" && (h.current = f ?? s ?? -1);
6528
6535
  }, [
6529
6536
  i,
6530
6537
  f,
6531
6538
  s
6532
6539
  ]);
6533
- let y = h((e) => {
6540
+ let _ = U((e) => {
6534
6541
  e ? r.current.typing || (r.current.typing = e, l?.(e)) : r.current.typing && (r.current.typing = e, l?.(e));
6535
- }), b = h((e) => {
6542
+ }), v = U((e) => {
6536
6543
  function t(e) {
6537
6544
  let t = o?.current[e];
6538
- return !t || Ze(t);
6545
+ return !t || Wt(t);
6539
6546
  }
6540
6547
  function n(e, n, r = 0) {
6541
6548
  if (e.length === 0) return -1;
@@ -6547,31 +6554,31 @@ function Ia(e, t) {
6547
6554
  return -1;
6548
6555
  }
6549
6556
  let r = a.current;
6550
- if (m.current.length > 0 && e.key === " " && (v(e), y(!0)), m.current.length > 0 && m.current[0] !== " " && n(r, m.current) === -1 && e.key !== " " && y(!1), r == null || e.key.length !== 1 || e.ctrlKey || e.metaKey || e.altKey) return;
6551
- i && e.key !== " " && (v(e), y(!0));
6557
+ if (m.current.length > 0 && e.key === " " && (B(e), _(!0)), m.current.length > 0 && m.current[0] !== " " && n(r, m.current) === -1 && e.key !== " " && _(!1), r == null || e.key.length !== 1 || e.ctrlKey || e.metaKey || e.altKey) return;
6558
+ i && e.key !== " " && (B(e), _(!0));
6552
6559
  let l = m.current === "";
6553
- l && (g.current = f ?? s ?? -1), r.every((e) => !e || e[0]?.toLocaleLowerCase() !== e[1]?.toLocaleLowerCase()) && m.current === e.key && (m.current = "", g.current = _.current), m.current += e.key, p.start(d, () => {
6554
- m.current = "", g.current = _.current, y(!1);
6560
+ l && (h.current = f ?? s ?? -1), r.every((e) => !e || e[0]?.toLocaleLowerCase() !== e[1]?.toLocaleLowerCase()) && m.current === e.key && (m.current = "", h.current = g.current), m.current += e.key, p.start(d, () => {
6561
+ m.current = "", h.current = g.current, _(!1);
6555
6562
  });
6556
- let u = ((l ? f ?? s ?? -1 : g.current) ?? 0) + 1, h = n(r, m.current, u);
6557
- h === -1 ? e.key !== " " && (m.current = "", y(!1)) : (c?.(h), _.current = h);
6558
- }), x = h((e) => {
6559
- let t = e.relatedTarget, r = n.select("domReferenceElement"), i = n.select("floatingElement"), a = N(r, t), o = N(i, t);
6560
- a || o || (p.clear(), m.current = "", g.current = _.current, y(!1));
6561
- }), S = G.useMemo(() => ({
6562
- onKeyDown: b,
6563
- onBlur: x
6564
- }), [b, x]), C = G.useMemo(() => ({
6565
- onKeyDown: b,
6566
- onBlur: x
6567
- }), [b, x]);
6563
+ let u = ((l ? f ?? s ?? -1 : h.current) ?? 0) + 1, v = n(r, m.current, u);
6564
+ v === -1 ? e.key !== " " && (m.current = "", _(!1)) : (c?.(v), g.current = v);
6565
+ }), y = U((e) => {
6566
+ let t = e.relatedTarget, r = n.select("domReferenceElement"), i = n.select("floatingElement"), a = I(r, t), o = I(i, t);
6567
+ a || o || (p.clear(), m.current = "", h.current = g.current, _(!1));
6568
+ }), b = G.useMemo(() => ({
6569
+ onKeyDown: v,
6570
+ onBlur: y
6571
+ }), [v, y]), x = G.useMemo(() => ({
6572
+ onKeyDown: v,
6573
+ onBlur: y
6574
+ }), [v, y]);
6568
6575
  return G.useMemo(() => u ? {
6569
- reference: S,
6570
- floating: C
6576
+ reference: b,
6577
+ floating: x
6571
6578
  } : {}, [
6572
6579
  u,
6573
- S,
6574
- C
6580
+ b,
6581
+ x
6575
6582
  ]);
6576
6583
  }
6577
6584
  //#endregion
@@ -6591,7 +6598,7 @@ function Ha(e, t, n, r, i, a) {
6591
6598
  return e >= Math.min(n, i) && e <= Math.max(n, i) && t >= Math.min(r, a) && t <= Math.max(r, a);
6592
6599
  }
6593
6600
  function Ua(e = {}) {
6594
- let { blockPointerEvents: t = !1 } = e, n = new f(), r = ({ x: e, y: t, placement: r, elements: i, onClose: a, nodeId: o, tree: s }) => {
6601
+ let { blockPointerEvents: t = !1 } = e, n = new Ne(), r = ({ x: e, y: t, placement: r, elements: i, onClose: a, nodeId: o, tree: s }) => {
6595
6602
  let c = r?.split("-")[0], l = !1, u = null, d = null, f = typeof performance < "u" ? performance.now() : 0;
6596
6603
  function p(e, t) {
6597
6604
  let n = performance.now(), r = n - f;
@@ -6606,39 +6613,39 @@ function Ua(e = {}) {
6606
6613
  n.clear();
6607
6614
  let a = i.domReference, u = i.floating;
6608
6615
  if (!a || !u || c == null || e == null || t == null) return;
6609
- let { clientX: d, clientY: f } = r, h = ie(r), g = r.type === "mouseleave", _ = N(u, h), v = N(a, h);
6616
+ let { clientX: d, clientY: f } = r, h = _e(r), g = r.type === "mouseleave", _ = I(u, h), v = I(a, h);
6610
6617
  if (_ && (l = !0, !g)) return;
6611
6618
  if (v && (l = !1, !g)) {
6612
6619
  l = !0;
6613
6620
  return;
6614
6621
  }
6615
- if (g && w(r.relatedTarget) && N(u, r.relatedTarget)) return;
6622
+ if (g && N(r.relatedTarget) && I(u, r.relatedTarget)) return;
6616
6623
  function y() {
6617
- return !!(s && H(s.nodesRef.current, o).length > 0);
6624
+ return !!(s && yt(s.nodesRef.current, o).length > 0);
6618
6625
  }
6619
6626
  function b() {
6620
6627
  y() || m();
6621
6628
  }
6622
6629
  if (y()) return;
6623
- let x = a.getBoundingClientRect(), S = u.getBoundingClientRect(), C = e > S.right - S.width / 2, T = t > S.bottom - S.height / 2, E = S.width > x.width, D = S.height > x.height, O = (E ? x : S).left, k = (E ? x : S).right, A = (D ? x : S).top, j = (D ? x : S).bottom;
6630
+ let x = a.getBoundingClientRect(), S = u.getBoundingClientRect(), C = e > S.right - S.width / 2, w = t > S.bottom - S.height / 2, T = S.width > x.width, E = S.height > x.height, D = (T ? x : S).left, O = (T ? x : S).right, k = (E ? x : S).top, A = (E ? x : S).bottom;
6624
6631
  if (c === "top" && t >= x.bottom - 1 || c === "bottom" && t <= x.top + 1 || c === "left" && e >= x.right - 1 || c === "right" && e <= x.left + 1) {
6625
6632
  b();
6626
6633
  return;
6627
6634
  }
6628
- let M = !1;
6635
+ let j = !1;
6629
6636
  switch (c) {
6630
6637
  case "top":
6631
- M = Ha(d, f, O, x.top + 1, k, S.bottom - 1);
6638
+ j = Ha(d, f, D, x.top + 1, O, S.bottom - 1);
6632
6639
  break;
6633
6640
  case "bottom":
6634
- M = Ha(d, f, O, S.top + 1, k, x.bottom - 1);
6641
+ j = Ha(d, f, D, S.top + 1, O, x.bottom - 1);
6635
6642
  break;
6636
6643
  case "left":
6637
- M = Ha(d, f, S.right - 1, j, x.left + 1, A);
6644
+ j = Ha(d, f, S.right - 1, A, x.left + 1, k);
6638
6645
  break;
6639
- case "right": M = Ha(d, f, x.right - 1, j, S.left + 1, A);
6646
+ case "right": j = Ha(d, f, x.right - 1, A, S.left + 1, k);
6640
6647
  }
6641
- if (M) return;
6648
+ if (j) return;
6642
6649
  if (l && !Va(d, f, x)) {
6643
6650
  b();
6644
6651
  return;
@@ -6647,30 +6654,30 @@ function Ua(e = {}) {
6647
6654
  b();
6648
6655
  return;
6649
6656
  }
6650
- let P = !1;
6657
+ let M = !1;
6651
6658
  switch (c) {
6652
6659
  case "top": {
6653
- let n = E ? Q / 2 : Q * 4, r = E || C ? e + n : e - n, i = E ? e - n : C ? e + n : e - n, a = t + Q + 1, o = C || E ? S.bottom - Q : S.top, s = C ? E ? S.bottom - Q : S.top : S.bottom - Q;
6654
- P = Ba(d, f, r, a, i, a, S.left, o, S.right, s);
6660
+ let n = T ? Q / 2 : Q * 4, r = T || C ? e + n : e - n, i = T ? e - n : C ? e + n : e - n, a = t + Q + 1, o = C || T ? S.bottom - Q : S.top, s = C ? T ? S.bottom - Q : S.top : S.bottom - Q;
6661
+ M = Ba(d, f, r, a, i, a, S.left, o, S.right, s);
6655
6662
  break;
6656
6663
  }
6657
6664
  case "bottom": {
6658
- let n = E ? Q / 2 : Q * 4, r = E || C ? e + n : e - n, i = E ? e - n : C ? e + n : e - n, a = t - Q, o = C || E ? S.top + Q : S.bottom, s = C ? E ? S.top + Q : S.bottom : S.top + Q;
6659
- P = Ba(d, f, r, a, i, a, S.left, o, S.right, s);
6665
+ let n = T ? Q / 2 : Q * 4, r = T || C ? e + n : e - n, i = T ? e - n : C ? e + n : e - n, a = t - Q, o = C || T ? S.top + Q : S.bottom, s = C ? T ? S.top + Q : S.bottom : S.top + Q;
6666
+ M = Ba(d, f, r, a, i, a, S.left, o, S.right, s);
6660
6667
  break;
6661
6668
  }
6662
6669
  case "left": {
6663
- let n = D ? Q / 2 : Q * 4, r = D || T ? t + n : t - n, i = D ? t - n : T ? t + n : t - n, a = e + Q + 1, o = T || D ? S.right - Q : S.left, s = T ? D ? S.right - Q : S.left : S.right - Q;
6664
- P = Ba(d, f, o, S.top, s, S.bottom, a, r, a, i);
6670
+ let n = E ? Q / 2 : Q * 4, r = E || w ? t + n : t - n, i = E ? t - n : w ? t + n : t - n, a = e + Q + 1, o = w || E ? S.right - Q : S.left, s = w ? E ? S.right - Q : S.left : S.right - Q;
6671
+ M = Ba(d, f, o, S.top, s, S.bottom, a, r, a, i);
6665
6672
  break;
6666
6673
  }
6667
6674
  case "right": {
6668
- let n = D ? Q / 2 : Q * 4, r = D || T ? t + n : t - n, i = D ? t - n : T ? t + n : t - n, a = e - Q, o = T || D ? S.left + Q : S.right, s = T ? D ? S.left + Q : S.right : S.left + Q;
6669
- P = Ba(d, f, a, r, a, i, o, S.top, s, S.bottom);
6675
+ let n = E ? Q / 2 : Q * 4, r = E || w ? t + n : t - n, i = E ? t - n : w ? t + n : t - n, a = e - Q, o = w || E ? S.left + Q : S.right, s = w ? E ? S.left + Q : S.right : S.left + Q;
6676
+ M = Ba(d, f, a, r, a, i, o, S.top, s, S.bottom);
6670
6677
  break;
6671
6678
  }
6672
6679
  }
6673
- P ? l || n.start(40, b) : b();
6680
+ M ? l || n.start(40, b) : b();
6674
6681
  };
6675
6682
  };
6676
6683
  return r.__options = {
@@ -6684,22 +6691,22 @@ var Wa = /*#__PURE__*/ G.createContext(void 0);
6684
6691
  process.env.NODE_ENV !== "production" && (Wa.displayName = "ToolbarRootContext");
6685
6692
  function Ga(e) {
6686
6693
  let t = G.useContext(Wa);
6687
- if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? qt(69) : "Base UI: ToolbarRootContext is missing. Toolbar parts must be placed within <Toolbar.Root>.");
6694
+ if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? nn(69) : "Base UI: ToolbarRootContext is missing. Toolbar parts must be placed within <Toolbar.Root>.");
6688
6695
  return t;
6689
6696
  }
6690
6697
  //#endregion
6691
6698
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/utils/getDisabledMountTransitionStyles.js
6692
6699
  function Ka(e) {
6693
- return e === "starting" ? he : Ye;
6700
+ return e === "starting" ? he : it;
6694
6701
  }
6695
6702
  //#endregion
6696
6703
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/menu/popup/MenuPopup.js
6697
6704
  var qa = {
6698
- ...Xe,
6699
- ...ye
6705
+ ...et,
6706
+ ...on
6700
6707
  }, Ja = /*#__PURE__*/ G.forwardRef(function(e, t) {
6701
6708
  let { render: n, className: r, style: i, finalFocus: a, ...o } = e, { store: s } = Lr(), { side: c, align: l } = Fr(), u = Ga(!0) != null, d = s.useState("open"), f = s.useState("transitionStatus"), p = s.useState("popupProps"), m = s.useState("mounted"), h = s.useState("instantType"), g = s.useState("activeTriggerElement"), _ = s.useState("parent"), v = s.useState("lastOpenChangeReason"), y = s.useState("rootId"), b = s.useState("floatingRootContext"), x = s.useState("floatingTreeRoot"), S = s.useState("closeDelay"), C = s.useState("activeTriggerElement"), w = _.type === "context-menu";
6702
- F({
6709
+ P({
6703
6710
  open: d,
6704
6711
  ref: s.context.popupRef,
6705
6712
  onComplete() {
@@ -6707,7 +6714,7 @@ var qa = {
6707
6714
  }
6708
6715
  }), G.useEffect(() => {
6709
6716
  function e(e) {
6710
- s.setOpen(!1, U(e.reason, e.domEvent));
6717
+ s.setOpen(!1, H(e.reason, e.domEvent));
6711
6718
  }
6712
6719
  return x.events.on("close", e), () => {
6713
6720
  x.events.off("close", e);
@@ -6718,34 +6725,34 @@ var qa = {
6718
6725
  enabled: T && !E && !w && _.type !== "menubar",
6719
6726
  closeDelay: S
6720
6727
  });
6721
- let D = {
6728
+ let O = {
6722
6729
  transitionStatus: f,
6723
6730
  side: c,
6724
6731
  align: l,
6725
6732
  open: d,
6726
6733
  nested: _.type === "menu",
6727
6734
  instant: h
6728
- }, O = G.useCallback((e) => {
6735
+ }, k = G.useCallback((e) => {
6729
6736
  s.set("popupElement", e);
6730
- }, [s]), A = yt("div", e, {
6731
- state: D,
6737
+ }, [s]), A = qt("div", e, {
6738
+ state: O,
6732
6739
  ref: [
6733
6740
  t,
6734
6741
  s.context.popupRef,
6735
- O
6742
+ k
6736
6743
  ],
6737
6744
  stateAttributesMapping: qa,
6738
6745
  props: [
6739
6746
  p,
6740
6747
  { onKeyDown(e) {
6741
- u && kt.has(e.key) && e.stopPropagation();
6748
+ u && jt.has(e.key) && e.stopPropagation();
6742
6749
  } },
6743
6750
  Ka(f),
6744
6751
  o,
6745
6752
  { "data-rootownerid": y }
6746
6753
  ]
6747
6754
  }), j = _.type === void 0 || w;
6748
- return (g || _.type === "menubar" && v !== "outside-press") && (j = !0), /*#__PURE__*/ K(k, {
6755
+ return (g || _.type === "menubar" && v !== "outside-press") && (j = !0), /*#__PURE__*/ K(D, {
6749
6756
  context: b,
6750
6757
  modal: w,
6751
6758
  disabled: !m,
@@ -6766,7 +6773,7 @@ var Ya = /*#__PURE__*/ G.createContext(void 0);
6766
6773
  process.env.NODE_ENV !== "production" && (Ya.displayName = "MenuPortalContext");
6767
6774
  function Xa() {
6768
6775
  let e = G.useContext(Ya);
6769
- if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? qt(32) : "Base UI: <Menu.Portal> is missing.");
6776
+ if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? nn(32) : "Base UI: <Menu.Portal> is missing.");
6770
6777
  return e;
6771
6778
  }
6772
6779
  //#endregion
@@ -6775,7 +6782,7 @@ var Za = /*#__PURE__*/ G.forwardRef(function(e, t) {
6775
6782
  let { keepMounted: n = !1, ...r } = e, { store: i } = Lr();
6776
6783
  return i.useState("mounted") || n ? /*#__PURE__*/ K(Ya.Provider, {
6777
6784
  value: n,
6778
- children: /*#__PURE__*/ K(Le, {
6785
+ children: /*#__PURE__*/ K(ze, {
6779
6786
  ref: t,
6780
6787
  ...r
6781
6788
  })
@@ -6795,14 +6802,14 @@ var eo = (e) => ({
6795
6802
  name: "arrow",
6796
6803
  options: e,
6797
6804
  async fn(t) {
6798
- let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0, offsetParent: d = "real" } = We(e, t) || {};
6805
+ let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0, offsetParent: d = "real" } = kt(e, t) || {};
6799
6806
  if (l == null) return {};
6800
- let f = it(u), p = {
6807
+ let f = ot(u), p = {
6801
6808
  x: n,
6802
6809
  y: r
6803
- }, m = Ke(i), h = Wt(m), g = await o.getDimensions(l), _ = m === "y", v = _ ? "top" : "left", y = _ ? "bottom" : "right", b = _ ? "clientHeight" : "clientWidth", x = a.reference[h] + a.reference[m] - p[m] - a.floating[h], S = p[m] - a.reference[m], C = d === "real" ? await o.getOffsetParent?.(l) : s.floating, w = s.floating[b] || a.floating[h];
6810
+ }, m = St(i), h = Qe(m), g = await o.getDimensions(l), _ = m === "y", v = _ ? "top" : "left", y = _ ? "bottom" : "right", b = _ ? "clientHeight" : "clientWidth", x = a.reference[h] + a.reference[m] - p[m] - a.floating[h], S = p[m] - a.reference[m], C = d === "real" ? await o.getOffsetParent?.(l) : s.floating, w = s.floating[b] || a.floating[h];
6804
6811
  (!w || !await o.isElement?.(C)) && (w = s.floating[b] || a.floating[h]);
6805
- let T = x / 2 - S / 2, E = w / 2 - g[h] / 2 - 1, D = Math.min(f[v], E), O = Math.min(f[y], E), k = D, A = w - g[h] - O, j = w / 2 - g[h] / 2 + T, M = It(k, j, A), N = !c.arrow && Rt(i) != null && j !== M && a.reference[h] / 2 - (j < k ? D : O) - g[h] / 2 < 0, P = N ? j < k ? j - k : j - A : 0;
6812
+ let T = x / 2 - S / 2, E = w / 2 - g[h] / 2 - 1, D = Math.min(f[v], E), O = Math.min(f[y], E), k = D, A = w - g[h] - O, j = w / 2 - g[h] / 2 + T, M = pt(k, j, A), N = !c.arrow && Ye(i) != null && j !== M && a.reference[h] / 2 - (j < k ? D : O) - g[h] / 2 < 0, P = N ? j < k ? j - k : j - A : 0;
6806
6813
  return {
6807
6814
  [m]: p[m] + P,
6808
6815
  data: {
@@ -6828,7 +6835,7 @@ var eo = (e) => ({
6828
6835
  }, io = {
6829
6836
  name: "adaptiveOrigin",
6830
6837
  async fn(e) {
6831
- let { x: t, y: n, rects: { floating: r }, elements: { floating: i }, platform: a, strategy: o, placement: s } = e, c = V(i), l = c.getComputedStyle(i);
6838
+ let { x: t, y: n, rects: { floating: r }, elements: { floating: i }, platform: a, strategy: o, placement: s } = e, c = pe(i), l = c.getComputedStyle(i);
6832
6839
  if (l.transitionDuration === "0s" || l.transitionDuration === "") return {
6833
6840
  x: t,
6834
6841
  y: n,
@@ -6843,13 +6850,13 @@ var eo = (e) => ({
6843
6850
  height: c.visualViewport.height
6844
6851
  };
6845
6852
  else if (u === c) {
6846
- let e = D(i);
6853
+ let e = ne(i);
6847
6854
  d = {
6848
6855
  width: e.documentElement.clientWidth,
6849
6856
  height: e.documentElement.clientHeight
6850
6857
  };
6851
6858
  } else await a.isElement?.(u) && (d = await a.getDimensions(u));
6852
- let f = nt(s), p = t, m = n;
6859
+ let f = Ue(s), p = t, m = n;
6853
6860
  f === "left" && (p = d.width - (t + r.width)), f === "top" && (m = d.height - (n + r.height));
6854
6861
  let h = f === "left" ? "right" : ro.sideX, g = f === "top" ? "bottom" : ro.sideY;
6855
6862
  return {
@@ -6876,8 +6883,8 @@ function ao(e, t, n) {
6876
6883
  function oo(e, t, n) {
6877
6884
  let { rects: r, placement: i } = e;
6878
6885
  return {
6879
- side: ao(t, nt(i), n),
6880
- align: Rt(i) || "center",
6886
+ side: ao(t, Ue(i), n),
6887
+ align: Ye(i) || "center",
6881
6888
  anchor: {
6882
6889
  width: r.reference.width,
6883
6890
  height: r.reference.height
@@ -6889,32 +6896,32 @@ function oo(e, t, n) {
6889
6896
  };
6890
6897
  }
6891
6898
  function so(e) {
6892
- let { anchor: t, positionMethod: n = "absolute", side: r = "bottom", sideOffset: i = 0, align: a = "center", alignOffset: o = 0, collisionBoundary: s, collisionPadding: c = 5, sticky: l = !1, arrowPadding: u = 5, disableAnchorTracking: d = !1, keepMounted: f = !1, floatingRootContext: p, mounted: m, collisionAvoidance: g, shiftCrossAxis: _ = !1, nodeId: v, adaptiveOrigin: y, lazyFlip: b = !1, externalTree: x } = e, [S, C] = G.useState(null);
6893
- !m && S !== null && C(null);
6894
- let w = g.side || "flip", T = g.align || "flip", E = g.fallbackAxisSide || "end", O = typeof t == "function" ? t : void 0, k = h(O), A = O ? k : t, j = Ot(t), M = Ot(m), N = $a() === "rtl", P = S || {
6899
+ let { anchor: t, positionMethod: n = "absolute", side: r = "bottom", sideOffset: i = 0, align: a = "center", alignOffset: o = 0, collisionBoundary: s, collisionPadding: c = 5, sticky: l = !1, arrowPadding: u = 5, disableAnchorTracking: d = !1, keepMounted: f = !1, floatingRootContext: p, mounted: m, collisionAvoidance: h, shiftCrossAxis: g = !1, nodeId: _, adaptiveOrigin: v, lazyFlip: y = !1, externalTree: b } = e, [x, S] = G.useState(null);
6900
+ !m && x !== null && S(null);
6901
+ let C = h.side || "flip", w = h.align || "flip", T = h.fallbackAxisSide || "end", E = typeof t == "function" ? t : void 0, D = U(E), O = E ? D : t, k = At(t), A = At(m), j = $a() === "rtl", M = x || {
6895
6902
  top: "top",
6896
6903
  right: "right",
6897
6904
  bottom: "bottom",
6898
6905
  left: "left",
6899
- "inline-end": N ? "left" : "right",
6900
- "inline-start": N ? "right" : "left"
6901
- }[r], F = a === "center" ? P : `${P}-${a}`, I = c, ee = +(r === "bottom"), te = +(r === "top"), ne = +(r === "right"), L = +(r === "left");
6902
- typeof I == "number" ? I = {
6903
- top: I + ee,
6904
- right: I + L,
6905
- bottom: I + te,
6906
- left: I + ne
6907
- } : I &&= {
6908
- top: (I.top || 0) + ee,
6909
- right: (I.right || 0) + L,
6910
- bottom: (I.bottom || 0) + te,
6911
- left: (I.left || 0) + ne
6906
+ "inline-end": j ? "left" : "right",
6907
+ "inline-start": j ? "right" : "left"
6908
+ }[r], N = a === "center" ? M : `${M}-${a}`, P = c, F = +(r === "bottom"), ee = +(r === "top"), te = +(r === "right"), re = +(r === "left");
6909
+ typeof P == "number" ? P = {
6910
+ top: P + F,
6911
+ right: P + re,
6912
+ bottom: P + ee,
6913
+ left: P + te
6914
+ } : P &&= {
6915
+ top: (P.top || 0) + F,
6916
+ right: (P.right || 0) + re,
6917
+ bottom: (P.bottom || 0) + ee,
6918
+ left: (P.left || 0) + te
6912
6919
  };
6913
- let re = {
6920
+ let ie = {
6914
6921
  boundary: s === "clipping-ancestors" ? "clippingAncestors" : s,
6915
- padding: I
6916
- }, ie = G.useRef(null), R = Ot(i), z = Ot(o), ae = [da((e) => {
6917
- let t = oo(e, r, N), n = typeof R.current == "function" ? R.current(t) : R.current, i = typeof z.current == "function" ? z.current(t) : z.current;
6922
+ padding: P
6923
+ }, I = G.useRef(null), L = At(i), R = At(o), ae = [da((e) => {
6924
+ let t = oo(e, r, j), n = typeof L.current == "function" ? L.current(t) : L.current, i = typeof R.current == "function" ? R.current(t) : R.current;
6918
6925
  return {
6919
6926
  mainAxis: n,
6920
6927
  crossAxis: i,
@@ -6923,69 +6930,69 @@ function so(e) {
6923
6930
  }, [
6924
6931
  typeof i == "function" ? 0 : i,
6925
6932
  typeof o == "function" ? 0 : o,
6926
- N,
6933
+ j,
6927
6934
  r
6928
- ])], oe = T === "none" && w !== "shift", se = !oe && (l || _ || w === "shift"), B = w === "none" ? null : ma({
6929
- ...re,
6935
+ ])], oe = w === "none" && C !== "shift", z = !oe && (l || g || C === "shift"), se = C === "none" ? null : ma({
6936
+ ...ie,
6930
6937
  padding: {
6931
- top: I.top + 1,
6932
- right: I.right + 1,
6933
- bottom: I.bottom + 1,
6934
- left: I.left + 1
6935
- },
6936
- mainAxis: !_ && w === "flip",
6937
- crossAxis: T === "flip" && "alignment",
6938
- fallbackAxisSideDirection: E
6938
+ top: P.top + 1,
6939
+ right: P.right + 1,
6940
+ bottom: P.bottom + 1,
6941
+ left: P.left + 1
6942
+ },
6943
+ mainAxis: !g && C === "flip",
6944
+ crossAxis: w === "flip" && "alignment",
6945
+ fallbackAxisSideDirection: T
6939
6946
  }), ce = oe ? null : fa((e) => {
6940
- let t = D(e.elements.floating).documentElement;
6947
+ let t = ne(e.elements.floating).documentElement;
6941
6948
  return {
6942
- ...re,
6943
- rootBoundary: _ ? {
6949
+ ...ie,
6950
+ rootBoundary: g ? {
6944
6951
  x: 0,
6945
6952
  y: 0,
6946
6953
  width: t.clientWidth,
6947
6954
  height: t.clientHeight
6948
6955
  } : void 0,
6949
- mainAxis: T !== "none",
6950
- crossAxis: se,
6951
- limiter: l || _ ? void 0 : pa((e) => {
6952
- if (!ie.current) return {};
6953
- let { width: t, height: n } = ie.current.getBoundingClientRect(), r = Ve(nt(e.placement)), i = r === "y" ? t : n, a = r === "y" ? I.left + I.right : I.top + I.bottom;
6956
+ mainAxis: w !== "none",
6957
+ crossAxis: z,
6958
+ limiter: l || g ? void 0 : pa((e) => {
6959
+ if (!I.current) return {};
6960
+ let { width: t, height: n } = I.current.getBoundingClientRect(), r = Jt(Ue(e.placement)), i = r === "y" ? t : n, a = r === "y" ? P.left + P.right : P.top + P.bottom;
6954
6961
  return { offset: i / 2 + a / 2 };
6955
6962
  })
6956
6963
  };
6957
6964
  }, [
6958
- re,
6965
+ ie,
6959
6966
  l,
6960
- _,
6961
- I,
6962
- T
6967
+ g,
6968
+ P,
6969
+ w
6963
6970
  ]);
6964
- w === "shift" || T === "shift" || a === "center" ? ae.push(ce, B) : ae.push(B, ce), ae.push(ha({
6965
- ...re,
6971
+ C === "shift" || w === "shift" || a === "center" ? ae.push(ce, se) : ae.push(se, ce), ae.push(ha({
6972
+ ...ie,
6966
6973
  apply({ elements: { floating: e }, availableWidth: t, availableHeight: n, rects: r }) {
6967
- if (!M.current) return;
6974
+ if (!A.current) return;
6968
6975
  let i = e.style;
6969
6976
  i.setProperty("--available-width", `${t}px`), i.setProperty("--available-height", `${n}px`);
6970
- let a = V(e).devicePixelRatio || 1, { x: o, y: s, width: c, height: l } = r.reference, u = (Math.round((o + c) * a) - Math.round(o * a)) / a, d = (Math.round((s + l) * a) - Math.round(s * a)) / a;
6977
+ let a = pe(e).devicePixelRatio || 1, { x: o, y: s, width: c, height: l } = r.reference, u = (Math.round((o + c) * a) - Math.round(o * a)) / a, d = (Math.round((s + l) * a) - Math.round(s * a)) / a;
6971
6978
  i.setProperty("--anchor-width", `${u}px`), i.setProperty("--anchor-height", `${d}px`);
6972
6979
  }
6973
6980
  }), to(() => ({
6974
- element: ie.current || D(ie.current).createElement("div"),
6981
+ element: I.current || ne(I.current).createElement("div"),
6975
6982
  padding: u,
6976
6983
  offsetParent: "floating"
6977
6984
  }), [u]), {
6978
6985
  name: "transformOrigin",
6979
6986
  fn(e) {
6980
- let { elements: t, middlewareData: n, placement: a, rects: o, y: s } = e, c = nt(a), l = Ve(c), u = ie.current, d = n.arrow?.x || 0, f = n.arrow?.y || 0, p = u?.clientWidth || 0, m = u?.clientHeight || 0, h = d + p / 2, g = f + m / 2, _ = Math.abs(n.shift?.y || 0), v = o.reference.height / 2, y = typeof i == "function" ? i(oo(e, r, N)) : i, b = _ > y, x = {
6987
+ let { elements: t, middlewareData: n, placement: a, rects: o, y: s } = e, c = Ue(a), l = Jt(c), u = I.current, d = n.arrow?.x || 0, f = n.arrow?.y || 0, p = u?.clientWidth || 0, m = u?.clientHeight || 0, h = d + p / 2, g = f + m / 2, _ = Math.abs(n.shift?.y || 0), v = o.reference.height / 2, y = typeof i == "function" ? i(oo(e, r, j)) : i, b = _ > y, x = {
6981
6988
  top: `${h}px calc(100% + ${y}px)`,
6982
6989
  bottom: `${h}px ${-y}px`,
6983
6990
  left: `calc(100% + ${y}px) ${g}px`,
6984
6991
  right: `${-y}px ${g}px`
6985
6992
  }[c], S = `${h}px ${o.reference.y + v - s}px`;
6986
- return t.floating.style.setProperty("--transform-origin", se && l === "y" && b ? S : x), {};
6993
+ return t.floating.style.setProperty("--transform-origin", z && l === "y" && b ? S : x), {};
6987
6994
  }
6988
- }, no, y), W(() => {
6995
+ }, no, v), W(() => {
6989
6996
  !m && p && p.update({
6990
6997
  referenceElement: null,
6991
6998
  floatingElement: null,
@@ -6996,99 +7003,99 @@ function so(e) {
6996
7003
  let le = G.useMemo(() => ({
6997
7004
  elementResize: !d && typeof ResizeObserver < "u",
6998
7005
  layoutShift: !d && typeof IntersectionObserver < "u"
6999
- }), [d]), { refs: H, elements: ue, x: de, y: fe, middlewareData: pe, update: me, placement: he, context: ge, isPositioned: _e, floatingStyles: ve } = va({
7006
+ }), [d]), { refs: ue, elements: B, x: V, y: de, middlewareData: fe, update: me, placement: he, context: ge, isPositioned: _e, floatingStyles: ve } = va({
7000
7007
  rootContext: p,
7001
7008
  open: f ? m : void 0,
7002
- placement: F,
7009
+ placement: N,
7003
7010
  middleware: ae,
7004
7011
  strategy: n,
7005
7012
  whileElementsMounted: f ? void 0 : (...e) => Zi(...e, le),
7006
- nodeId: v,
7007
- externalTree: x
7008
- }), { sideX: ye, sideY: be } = pe.adaptiveOrigin || ro, xe = _e ? n : "fixed", Se = G.useMemo(() => {
7009
- let e = y ? {
7013
+ nodeId: _,
7014
+ externalTree: b
7015
+ }), { sideX: ye, sideY: be } = fe.adaptiveOrigin || ro, xe = _e ? n : "fixed", Se = G.useMemo(() => {
7016
+ let e = v ? {
7010
7017
  position: xe,
7011
- [ye]: de,
7012
- [be]: fe
7018
+ [ye]: V,
7019
+ [be]: de
7013
7020
  } : {
7014
7021
  position: xe,
7015
7022
  ...ve
7016
7023
  };
7017
7024
  return _e || (e.opacity = 0), e;
7018
7025
  }, [
7019
- y,
7026
+ v,
7020
7027
  xe,
7021
7028
  ye,
7022
- de,
7029
+ V,
7023
7030
  be,
7024
- fe,
7031
+ de,
7025
7032
  ve,
7026
7033
  _e
7027
7034
  ]), Ce = G.useRef(null);
7028
7035
  W(() => {
7029
7036
  if (!m) return;
7030
- let e = j.current, t = typeof e == "function" ? e() : e, n = (co(t) ? t.current : t) || null;
7031
- n !== Ce.current && (H.setPositionReference(n), Ce.current = n);
7037
+ let e = k.current, t = typeof e == "function" ? e() : e, n = (co(t) ? t.current : t) || null;
7038
+ n !== Ce.current && (ue.setPositionReference(n), Ce.current = n);
7032
7039
  }, [
7033
7040
  m,
7034
- H,
7035
- A,
7036
- j
7041
+ ue,
7042
+ O,
7043
+ k
7037
7044
  ]), G.useEffect(() => {
7038
7045
  if (!m) return;
7039
- let e = j.current;
7040
- typeof e != "function" && co(e) && e.current !== Ce.current && (H.setPositionReference(e.current), Ce.current = e.current);
7046
+ let e = k.current;
7047
+ typeof e != "function" && co(e) && e.current !== Ce.current && (ue.setPositionReference(e.current), Ce.current = e.current);
7041
7048
  }, [
7042
7049
  m,
7043
- H,
7044
- A,
7045
- j
7050
+ ue,
7051
+ O,
7052
+ k
7046
7053
  ]), G.useEffect(() => {
7047
- if (f && m && ue.domReference && ue.floating) return Zi(ue.domReference, ue.floating, me, le);
7054
+ if (f && m && B.domReference && B.floating) return Zi(B.domReference, B.floating, me, le);
7048
7055
  }, [
7049
7056
  f,
7050
7057
  m,
7051
- ue,
7058
+ B,
7052
7059
  me,
7053
7060
  le
7054
7061
  ]);
7055
- let we = nt(he), Te = ao(r, we, N), Ee = Rt(he) || "center", De = !!pe.hide?.referenceHidden;
7062
+ let we = Ue(he), Te = ao(r, we, j), Ee = Ye(he) || "center", De = !!fe.hide?.referenceHidden;
7056
7063
  W(() => {
7057
- b && m && _e && C(we);
7064
+ y && m && _e && S(we);
7058
7065
  }, [
7059
- b,
7066
+ y,
7060
7067
  m,
7061
7068
  _e,
7062
7069
  we
7063
7070
  ]);
7064
7071
  let Oe = G.useMemo(() => ({
7065
7072
  position: "absolute",
7066
- top: pe.arrow?.y,
7067
- left: pe.arrow?.x
7068
- }), [pe.arrow]), ke = pe.arrow?.centerOffset !== 0;
7073
+ top: fe.arrow?.y,
7074
+ left: fe.arrow?.x
7075
+ }), [fe.arrow]), ke = fe.arrow?.centerOffset !== 0;
7069
7076
  return G.useMemo(() => ({
7070
7077
  positionerStyles: Se,
7071
7078
  arrowStyles: Oe,
7072
- arrowRef: ie,
7079
+ arrowRef: I,
7073
7080
  arrowUncentered: ke,
7074
7081
  side: Te,
7075
7082
  align: Ee,
7076
7083
  physicalSide: we,
7077
7084
  anchorHidden: De,
7078
- refs: H,
7085
+ refs: ue,
7079
7086
  context: ge,
7080
7087
  isPositioned: _e,
7081
7088
  update: me
7082
7089
  }), [
7083
7090
  Se,
7084
7091
  Oe,
7085
- ie,
7092
+ I,
7086
7093
  ke,
7087
7094
  Te,
7088
7095
  Ee,
7089
7096
  we,
7090
7097
  De,
7091
- H,
7098
+ ue,
7092
7099
  ge,
7093
7100
  _e,
7094
7101
  me
@@ -7100,9 +7107,9 @@ function co(e) {
7100
7107
  //#endregion
7101
7108
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/internals/composite/list/CompositeList.js
7102
7109
  function lo(e) {
7103
- let { children: t, elementsRef: n, labelsRef: r, onMapChange: i } = e, a = h(i), o = G.useRef(0), s = Zt(fo).current, c = Zt(uo).current, [l, u] = G.useState(0), d = G.useRef(l), f = h((e, t) => {
7110
+ let { children: t, elementsRef: n, labelsRef: r, onMapChange: i } = e, a = U(i), o = G.useRef(0), s = Te(fo).current, c = Te(uo).current, [l, u] = G.useState(0), d = G.useRef(l), f = U((e, t) => {
7104
7111
  c.set(e, t ?? null), d.current += 1, u(d.current);
7105
- }), p = h((e) => {
7112
+ }), p = U((e) => {
7106
7113
  c.delete(e), d.current += 1, u(d.current);
7107
7114
  }), m = G.useMemo(() => {
7108
7115
  let e = /* @__PURE__ */ new Map();
@@ -7140,29 +7147,29 @@ function lo(e) {
7140
7147
  }, [n]), W(() => () => {
7141
7148
  r && (r.current = []);
7142
7149
  }, [r]);
7143
- let g = h((e) => (s.add(e), () => {
7150
+ let h = U((e) => (s.add(e), () => {
7144
7151
  s.delete(e);
7145
7152
  }));
7146
7153
  W(() => {
7147
7154
  s.forEach((e) => e(m));
7148
7155
  }, [s, m]);
7149
- let _ = G.useMemo(() => ({
7156
+ let g = G.useMemo(() => ({
7150
7157
  register: f,
7151
7158
  unregister: p,
7152
- subscribeMapChange: g,
7159
+ subscribeMapChange: h,
7153
7160
  elementsRef: n,
7154
7161
  labelsRef: r,
7155
7162
  nextIndexRef: o
7156
7163
  }), [
7157
7164
  f,
7158
7165
  p,
7159
- g,
7166
+ h,
7160
7167
  n,
7161
7168
  r,
7162
7169
  o
7163
7170
  ]);
7164
7171
  return /*#__PURE__*/ K(Gr.Provider, {
7165
- value: _,
7172
+ value: g,
7166
7173
  children: t
7167
7174
  });
7168
7175
  }
@@ -7180,7 +7187,7 @@ function po(e, t) {
7180
7187
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/utils/usePositioner.js
7181
7188
  function mo(e, t, { styles: n, transitionStatus: r, props: i, refs: a, hidden: o, inert: s = !1 }) {
7182
7189
  let c = { ...n };
7183
- return s && (c.pointerEvents = "none"), yt("div", e, {
7190
+ return s && (c.pointerEvents = "none"), qt("div", e, {
7184
7191
  state: t,
7185
7192
  ref: a,
7186
7193
  props: [
@@ -7192,7 +7199,7 @@ function mo(e, t, { styles: n, transitionStatus: r, props: i, refs: a, hidden: o
7192
7199
  Ka(r),
7193
7200
  i
7194
7201
  ],
7195
- stateAttributesMapping: Xe
7202
+ stateAttributesMapping: et
7196
7203
  });
7197
7204
  }
7198
7205
  //#endregion
@@ -7205,45 +7212,45 @@ function go(e, t, n, r) {
7205
7212
  a(!1);
7206
7213
  return;
7207
7214
  }
7208
- let r = D(n).documentElement.clientWidth, i = n.offsetWidth;
7215
+ let r = ne(n).documentElement.clientWidth, i = n.offsetWidth;
7209
7216
  a(r > 0 && i > 0 && i >= r - ho);
7210
7217
  }, [
7211
7218
  e,
7212
7219
  t,
7213
7220
  n
7214
- ]), st(e && (!t || i), r);
7221
+ ]), ft(e && (!t || i), r);
7215
7222
  }
7216
7223
  //#endregion
7217
7224
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/menu/positioner/MenuPositioner.js
7218
7225
  var _o = /*#__PURE__*/ G.forwardRef(function(e, t) {
7219
- let { anchor: n, positionMethod: i = "absolute", className: a, render: o, side: s, align: c, sideOffset: l = 0, alignOffset: u = 0, collisionBoundary: d = "clipping-ancestors", collisionPadding: f = 5, arrowPadding: p = 5, sticky: m = !1, disableAnchorTracking: h = !1, collisionAvoidance: g = r, style: _, ...v } = e, { store: y } = Lr(), b = Xa(), x = zr(!0), S = y.useState("parent"), C = y.useState("floatingRootContext"), w = y.useState("floatingTreeRoot"), T = y.useState("mounted"), E = y.useState("open"), D = y.useState("modal"), O = y.useState("openMethod"), k = y.useState("activeTriggerElement"), A = y.useState("transitionStatus"), j = y.useState("positionerElement"), M = y.useState("instantType"), N = y.useState("hasViewport"), P = y.useState("lastOpenChangeReason"), F = y.useState("floatingNodeId"), I = y.useState("floatingParentNodeId"), ee = C.useState("domReferenceElement"), te = G.useRef(null), ne = z(j, !1, !1), L = n, re = l, ie = u, R = c, ae = g;
7220
- S.type === "context-menu" && (L = n ?? S.context?.anchor, R ??= "start", !s && R !== "center" && (ie = e.alignOffset ?? 2, re = e.sideOffset ?? -5));
7221
- let oe = s, se = R;
7222
- S.type === "menu" ? (oe ??= "inline-end", se ??= "start", ae = e.collisionAvoidance ?? Qe) : S.type === "menubar" && (oe ??= "bottom", se ??= "start");
7223
- let B = S.type === "context-menu", ce = so({
7224
- anchor: L,
7226
+ let { anchor: n, positionMethod: i = "absolute", className: a, render: o, side: s, align: c, sideOffset: l = 0, alignOffset: u = 0, collisionBoundary: d = "clipping-ancestors", collisionPadding: f = 5, arrowPadding: p = 5, sticky: m = !1, disableAnchorTracking: h = !1, collisionAvoidance: g = r, style: _, ...v } = e, { store: y } = Lr(), b = Xa(), x = zr(!0), S = y.useState("parent"), C = y.useState("floatingRootContext"), w = y.useState("floatingTreeRoot"), T = y.useState("mounted"), E = y.useState("open"), D = y.useState("modal"), O = y.useState("openMethod"), k = y.useState("activeTriggerElement"), j = y.useState("transitionStatus"), M = y.useState("positionerElement"), N = y.useState("instantType"), P = y.useState("hasViewport"), F = y.useState("lastOpenChangeReason"), ee = y.useState("floatingNodeId"), te = y.useState("floatingParentNodeId"), ne = C.useState("domReferenceElement"), re = G.useRef(null), ie = R(M, !1, !1), I = n, L = l, ae = u, oe = c, z = g;
7227
+ S.type === "context-menu" && (I = n ?? S.context?.anchor, oe ??= "start", !s && oe !== "center" && (ae = e.alignOffset ?? 2, L = e.sideOffset ?? -5));
7228
+ let se = s, ce = oe;
7229
+ S.type === "menu" ? (se ??= "inline-end", ce ??= "start", z = e.collisionAvoidance ?? nt) : S.type === "menubar" && (se ??= "bottom", ce ??= "start");
7230
+ let le = S.type === "context-menu", ue = so({
7231
+ anchor: I,
7225
7232
  floatingRootContext: C,
7226
7233
  positionMethod: x ? "fixed" : i,
7227
7234
  mounted: T,
7228
- side: oe,
7229
- sideOffset: re,
7230
- align: se,
7231
- alignOffset: ie,
7232
- arrowPadding: B ? 0 : p,
7235
+ side: se,
7236
+ sideOffset: L,
7237
+ align: ce,
7238
+ alignOffset: ae,
7239
+ arrowPadding: le ? 0 : p,
7233
7240
  collisionBoundary: d,
7234
7241
  collisionPadding: f,
7235
7242
  sticky: m,
7236
- nodeId: F,
7243
+ nodeId: ee,
7237
7244
  keepMounted: b,
7238
7245
  disableAnchorTracking: h,
7239
- collisionAvoidance: ae,
7240
- shiftCrossAxis: B && !("side" in ae && ae.side === "flip"),
7246
+ collisionAvoidance: z,
7247
+ shiftCrossAxis: le && !("side" in z && z.side === "flip"),
7241
7248
  externalTree: w,
7242
- adaptiveOrigin: N ? io : void 0
7249
+ adaptiveOrigin: P ? io : void 0
7243
7250
  });
7244
7251
  G.useEffect(() => {
7245
7252
  function e(e) {
7246
- e.open && (e.parentNodeId === F && y.set("hoverEnabled", !1), e.nodeId !== F && e.parentNodeId === y.select("floatingParentNodeId") && y.setOpen(!1, U(de)));
7253
+ e.open && (e.parentNodeId === ee && y.set("hoverEnabled", !1), e.nodeId !== ee && e.parentNodeId === y.select("floatingParentNodeId") && y.setOpen(!1, H(de)));
7247
7254
  }
7248
7255
  return w.events.on("menuopenchange", e), () => {
7249
7256
  w.events.off("menuopenchange", e);
@@ -7251,30 +7258,30 @@ var _o = /*#__PURE__*/ G.forwardRef(function(e, t) {
7251
7258
  }, [
7252
7259
  y,
7253
7260
  w.events,
7254
- F
7261
+ ee
7255
7262
  ]), G.useEffect(() => {
7256
7263
  if (y.select("floatingParentNodeId") == null) return;
7257
7264
  function e(e) {
7258
7265
  if (e.open || e.nodeId !== y.select("floatingParentNodeId")) return;
7259
7266
  let t = e.reason ?? "sibling-open";
7260
- y.setOpen(!1, U(t));
7267
+ y.setOpen(!1, H(t));
7261
7268
  }
7262
7269
  return w.events.on("menuopenchange", e), () => {
7263
7270
  w.events.off("menuopenchange", e);
7264
7271
  };
7265
7272
  }, [w.events, y]);
7266
- let V = Ne();
7273
+ let B = A();
7267
7274
  G.useEffect(() => {
7268
- E || V.clear();
7269
- }, [E, V]), G.useEffect(() => {
7275
+ E || B.clear();
7276
+ }, [E, B]), G.useEffect(() => {
7270
7277
  function e(e) {
7271
7278
  if (!(!E || e.nodeId !== y.select("floatingParentNodeId"))) {
7272
7279
  if (e.target && k && k !== e.target) {
7273
7280
  let e = y.select("closeDelay");
7274
- e > 0 ? V.isStarted() || V.start(e, () => {
7275
- y.setOpen(!1, U(de));
7276
- }) : y.setOpen(!1, U(de));
7277
- } else V.clear();
7281
+ e > 0 ? B.isStarted() || B.start(e, () => {
7282
+ y.setOpen(!1, H(de));
7283
+ }) : y.setOpen(!1, H(de));
7284
+ } else B.clear();
7278
7285
  }
7279
7286
  }
7280
7287
  return w.events.on("itemhover", e), () => {
@@ -7285,12 +7292,12 @@ var _o = /*#__PURE__*/ G.forwardRef(function(e, t) {
7285
7292
  E,
7286
7293
  k,
7287
7294
  y,
7288
- V
7295
+ B
7289
7296
  ]), G.useEffect(() => {
7290
7297
  let e = {
7291
7298
  open: E,
7292
- nodeId: F,
7293
- parentNodeId: I,
7299
+ nodeId: ee,
7300
+ parentNodeId: te,
7294
7301
  reason: y.select("lastOpenChangeReason")
7295
7302
  };
7296
7303
  w.events.emit("menuopenchange", e);
@@ -7298,53 +7305,53 @@ var _o = /*#__PURE__*/ G.forwardRef(function(e, t) {
7298
7305
  w.events,
7299
7306
  E,
7300
7307
  y,
7301
- F,
7302
- I
7308
+ ee,
7309
+ te
7303
7310
  ]), W(() => {
7304
- let e = ee, t = te.current;
7305
- if (e && (te.current = e), t && e && e !== t) {
7311
+ let e = ne, t = re.current;
7312
+ if (e && (re.current = e), t && e && e !== t) {
7306
7313
  y.set("instantType", void 0);
7307
7314
  let e = new AbortController();
7308
- return ne(() => {
7315
+ return ie(() => {
7309
7316
  y.set("instantType", "trigger-change");
7310
7317
  }, e.signal), () => {
7311
7318
  e.abort();
7312
7319
  };
7313
7320
  }
7314
7321
  }, [
7315
- ee,
7316
7322
  ne,
7323
+ ie,
7317
7324
  y
7318
7325
  ]);
7319
- let le = {
7326
+ let V = {
7320
7327
  open: E,
7321
- side: ce.side,
7322
- align: ce.align,
7323
- anchorHidden: ce.anchorHidden,
7328
+ side: ue.side,
7329
+ align: ue.align,
7330
+ anchorHidden: ue.anchorHidden,
7324
7331
  nested: S.type === "menu",
7325
- instant: M
7326
- }, H = S.type === "menubar" && S.context.modal;
7327
- go(E && (H || D && P !== "trigger-hover"), O === "touch", j, k);
7328
- let ue = mo(e, le, {
7329
- styles: ce.positionerStyles,
7330
- transitionStatus: A,
7332
+ instant: N
7333
+ }, fe = S.type === "menubar" && S.context.modal;
7334
+ go(E && (fe || D && F !== "trigger-hover"), O === "touch", M, k);
7335
+ let pe = mo(e, V, {
7336
+ styles: ue.positionerStyles,
7337
+ transitionStatus: j,
7331
7338
  props: v,
7332
7339
  refs: [t, y.useStateSetter("positionerElement")],
7333
7340
  hidden: !T,
7334
7341
  inert: !E
7335
- }), fe = T && S.type !== "menu" && (S.type !== "menubar" && D && P !== "trigger-hover" || S.type === "menubar" && S.context.modal), pe = null;
7336
- return S.type === "menubar" ? pe = S.context.contentElement : S.type === void 0 && (pe = k), /*#__PURE__*/ dn(Pr.Provider, {
7337
- value: ce,
7338
- children: [fe && /*#__PURE__*/ K(Ue, {
7342
+ }), me = T && S.type !== "menu" && (S.type !== "menubar" && D && F !== "trigger-hover" || S.type === "menubar" && S.context.modal), he = null;
7343
+ return S.type === "menubar" ? he = S.context.contentElement : S.type === void 0 && (he = k), /*#__PURE__*/ dn(Pr.Provider, {
7344
+ value: ue,
7345
+ children: [me && /*#__PURE__*/ K(We, {
7339
7346
  ref: S.type === "context-menu" || S.type === "nested-context-menu" ? S.context.internalBackdropRef : null,
7340
- inert: Tt(!E),
7341
- cutout: pe
7347
+ inert: Ot(!E),
7348
+ cutout: he
7342
7349
  }), /*#__PURE__*/ K(De, {
7343
- id: F,
7350
+ id: ee,
7344
7351
  children: /*#__PURE__*/ K(lo, {
7345
7352
  elementsRef: y.context.itemDomElements,
7346
7353
  labelsRef: y.context.itemLabels,
7347
- children: ue
7354
+ children: pe
7348
7355
  })
7349
7356
  })]
7350
7357
  });
@@ -7356,13 +7363,13 @@ var vo = /*#__PURE__*/ G.createContext(null);
7356
7363
  process.env.NODE_ENV !== "production" && (vo.displayName = "MenubarContext");
7357
7364
  function yo(e) {
7358
7365
  let t = G.useContext(vo);
7359
- if (t === null && !e) throw Error(process.env.NODE_ENV === "production" ? qt(5) : "Base UI: MenubarContext is missing. Menubar parts must be placed within <Menubar>.");
7366
+ if (t === null && !e) throw Error(process.env.NODE_ENV === "production" ? nn(5) : "Base UI: MenubarContext is missing. Menubar parts must be placed within <Menubar>.");
7360
7367
  return t;
7361
7368
  }
7362
7369
  //#endregion
7363
7370
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/menu/store/MenuStore.js
7364
7371
  var bo = {
7365
- ...b,
7372
+ ...y,
7366
7373
  disabled: l((e) => e.parent.type === "menubar" && e.parent.context.disabled || e.disabled),
7367
7374
  modal: l((e) => (e.parent.type === void 0 || e.parent.type === "context-menu") && (e.modal ?? !0)),
7368
7375
  openMethod: l((e) => e.openMethod),
@@ -7385,7 +7392,7 @@ var bo = {
7385
7392
  if (e.keyboardEventRelay) return e.keyboardEventRelay;
7386
7393
  if (e.parent.type === "menu") return e.parent.store.select("keyboardEventRelay");
7387
7394
  })
7388
- }, xo = class e extends B {
7395
+ }, xo = class e extends se {
7389
7396
  constructor(e) {
7390
7397
  super({
7391
7398
  ...So(),
@@ -7400,7 +7407,7 @@ var bo = {
7400
7407
  triggerFocusTargetRef: /*#__PURE__*/ G.createRef(),
7401
7408
  beforeContentFocusGuardRef: /*#__PURE__*/ G.createRef(),
7402
7409
  onOpenChangeComplete: void 0,
7403
- triggerElements: new _()
7410
+ triggerElements: new g()
7404
7411
  }, bo), this.unsubscribeParentListener = this.observe("parent", (e) => {
7405
7412
  if (this.unsubscribeParentListener?.(), e.type === "menu") {
7406
7413
  let t = e.store.select("rootId"), n = e.store.select("floatingTreeRoot"), r = e.store.select("keyboardEventRelay");
@@ -7420,7 +7427,7 @@ var bo = {
7420
7427
  });
7421
7428
  }
7422
7429
  static useStore(t, n) {
7423
- let r = Zt(() => new e(n)).current;
7430
+ let r = Te(() => new e(n)).current;
7424
7431
  return t ?? r;
7425
7432
  }
7426
7433
  unsubscribeParentListener = null;
@@ -7439,10 +7446,10 @@ function So() {
7439
7446
  hoverEnabled: !0,
7440
7447
  instantType: void 0,
7441
7448
  openChangeReason: null,
7442
- floatingTreeRoot: new I(),
7449
+ floatingTreeRoot: new F(),
7443
7450
  floatingNodeId: void 0,
7444
7451
  floatingParentNodeId: null,
7445
- itemProps: Ye,
7452
+ itemProps: it,
7446
7453
  keyboardEventRelay: void 0,
7447
7454
  closeDelay: 0,
7448
7455
  hasViewport: !1
@@ -7457,220 +7464,220 @@ function wo() {
7457
7464
  }
7458
7465
  //#endregion
7459
7466
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/menu/root/MenuRoot.js
7460
- var To = M(function(e) {
7461
- let { children: t, open: n, onOpenChange: r, onOpenChangeComplete: i, defaultOpen: a = !1, disabled: o = !1, modal: s, loopFocus: c = !0, orientation: l = "vertical", actionsRef: u, closeParentOnEsc: d = !1, handle: f, triggerId: m, defaultTriggerId: _ = null, highlightItemOnHover: v = !0 } = e, y = zr(!0), b = Lr(!0), x = yo(!0), S = wo(), C = G.useMemo(() => S && b ? {
7467
+ var To = j(function(e) {
7468
+ let { children: t, open: n, onOpenChange: r, onOpenChangeComplete: i, defaultOpen: a = !1, disabled: o = !1, modal: s, loopFocus: c = !0, orientation: l = "vertical", actionsRef: u, closeParentOnEsc: d = !1, handle: f, triggerId: m, defaultTriggerId: g = null, highlightItemOnHover: _ = !0 } = e, v = zr(!0), y = Lr(!0), b = yo(!0), x = wo(), S = G.useMemo(() => x && y ? {
7462
7469
  type: "menu",
7463
- store: b.store
7464
- } : x ? {
7470
+ store: y.store
7471
+ } : b ? {
7465
7472
  type: "menubar",
7466
- context: x
7467
- } : y && !b ? {
7473
+ context: b
7474
+ } : v && !y ? {
7468
7475
  type: "context-menu",
7469
- context: y
7476
+ context: v
7470
7477
  } : { type: void 0 }, [
7478
+ v,
7471
7479
  y,
7472
7480
  b,
7473
- x,
7474
- S
7475
- ]), w = xo.useStore(f?.store, {
7481
+ x
7482
+ ]), C = xo.useStore(f?.store, {
7476
7483
  open: a,
7477
7484
  openProp: n,
7478
- activeTriggerId: _,
7485
+ activeTriggerId: g,
7479
7486
  triggerIdProp: m,
7480
- parent: C
7487
+ parent: S
7481
7488
  });
7482
- Ft(() => {
7483
- n === void 0 && w.state.open === !1 && a === !0 && w.update({
7489
+ Lt(() => {
7490
+ n === void 0 && C.state.open === !1 && a === !0 && C.update({
7484
7491
  open: !0,
7485
- activeTriggerId: _
7492
+ activeTriggerId: g
7486
7493
  });
7487
- }), w.useControlledProp("openProp", n), w.useControlledProp("triggerIdProp", m), w.useContextCallback("onOpenChangeComplete", i);
7488
- let T = w.useState("floatingTreeRoot"), D = E(T), O = ne();
7494
+ }), C.useControlledProp("openProp", n), C.useControlledProp("triggerIdProp", m), C.useContextCallback("onOpenChangeComplete", i);
7495
+ let w = C.useState("floatingTreeRoot"), E = T(w), D = te();
7489
7496
  W(() => {
7490
- y && !b ? w.update({
7497
+ v && !y ? C.update({
7491
7498
  parent: {
7492
7499
  type: "context-menu",
7493
- context: y
7500
+ context: v
7494
7501
  },
7495
- floatingNodeId: D,
7496
- floatingParentNodeId: O
7497
- }) : b && w.update({
7498
- floatingNodeId: D,
7499
- floatingParentNodeId: O
7502
+ floatingNodeId: E,
7503
+ floatingParentNodeId: D
7504
+ }) : y && C.update({
7505
+ floatingNodeId: E,
7506
+ floatingParentNodeId: D
7500
7507
  });
7501
7508
  }, [
7509
+ v,
7502
7510
  y,
7503
- b,
7511
+ E,
7504
7512
  D,
7505
- O,
7506
- w
7513
+ C
7507
7514
  ]);
7508
- let k = w.useState("open"), A = w.useState("activeTriggerElement"), j = w.useState("positionerElement"), M = w.useState("hoverEnabled"), N = w.useState("disabled"), P = w.useState("lastOpenChangeReason"), F = w.useState("parent"), I = w.useState("activeIndex"), ee = w.useState("payload"), te = w.useState("floatingParentNodeId"), L = G.useRef(null), re = te != null;
7515
+ let O = C.useState("open"), k = C.useState("activeTriggerElement"), j = C.useState("positionerElement"), M = C.useState("hoverEnabled"), N = C.useState("disabled"), P = C.useState("lastOpenChangeReason"), F = C.useState("parent"), ee = C.useState("activeIndex"), ne = C.useState("payload"), re = C.useState("floatingParentNodeId"), ie = G.useRef(null), I = re != null;
7509
7516
  process.env.NODE_ENV !== "production" && F.type !== void 0 && s !== void 0 && console.warn("Base UI: The `modal` prop is not supported on nested menus. It will be ignored.");
7510
- let { openMethod: ie, triggerProps: R } = Vt(k);
7511
- w.useSyncedValues({
7517
+ let { openMethod: L, triggerProps: R } = Ut(O);
7518
+ C.useSyncedValues({
7512
7519
  disabled: o,
7513
7520
  modal: F.type === void 0 ? s : void 0,
7514
- openMethod: ie,
7515
- rootId: Re()
7516
- }), le(w);
7517
- let { forceUnmount: z } = mt(k, w, () => {
7518
- w.update({
7521
+ openMethod: L,
7522
+ rootId: Le()
7523
+ }), ue(C);
7524
+ let { forceUnmount: ae } = vt(O, C, () => {
7525
+ C.update({
7519
7526
  allowMouseEnter: !1,
7520
7527
  stickIfOpen: !0
7521
7528
  });
7522
- }), ae = G.useRef(F.type !== "context-menu"), oe = Ne();
7529
+ }), oe = G.useRef(F.type !== "context-menu"), z = A();
7523
7530
  G.useEffect(() => {
7524
- if (k || (L.current = null), F.type === "context-menu") {
7525
- if (!k) {
7526
- oe.clear(), ae.current = !1;
7531
+ if (O || (ie.current = null), F.type === "context-menu") {
7532
+ if (!O) {
7533
+ z.clear(), oe.current = !1;
7527
7534
  return;
7528
7535
  }
7529
- oe.start(500, () => {
7530
- ae.current = !0;
7536
+ z.start(500, () => {
7537
+ oe.current = !0;
7531
7538
  });
7532
7539
  }
7533
7540
  }, [
7534
- oe,
7535
- k,
7541
+ z,
7542
+ O,
7536
7543
  F.type
7537
7544
  ]), W(() => {
7538
- !k && !M && w.set("hoverEnabled", !0);
7545
+ !O && !M && C.set("hoverEnabled", !0);
7539
7546
  }, [
7540
- k,
7547
+ O,
7541
7548
  M,
7542
- w
7549
+ C
7543
7550
  ]);
7544
- let se = G.useRef(!0), B = Ne(), ce = h((e, t) => {
7551
+ let se = G.useRef(!0), ce = A(), le = U((e, t) => {
7545
7552
  let n = t.reason;
7546
- if (k === e && t.trigger === A && P === n || (t.preventUnmountOnClose = () => {
7547
- w.set("preventUnmountingOnClose", !0);
7548
- }, !e && t.trigger == null && (t.trigger = A ?? void 0), r?.(e, t), t.isCanceled)) return;
7549
- w.state.floatingRootContext.dispatchOpenChange(e, t);
7553
+ if (O === e && t.trigger === k && P === n || (t.preventUnmountOnClose = () => {
7554
+ C.set("preventUnmountingOnClose", !0);
7555
+ }, !e && t.trigger == null && (t.trigger = k ?? void 0), r?.(e, t), t.isCanceled)) return;
7556
+ C.state.floatingRootContext.dispatchOpenChange(e, t);
7550
7557
  let i = t.event;
7551
7558
  if (e === !1 && i?.type === "click" && i.pointerType === "touch" && !se.current) return;
7552
- if (!e && I !== null) {
7553
- let e = w.context.itemDomElements.current[I];
7559
+ if (!e && ee !== null) {
7560
+ let e = C.context.itemDomElements.current[ee];
7554
7561
  queueMicrotask(() => {
7555
7562
  e?.setAttribute("tabindex", "-1");
7556
7563
  });
7557
7564
  }
7558
- e && n === "trigger-focus" ? (se.current = !1, B.start(300, () => {
7565
+ e && n === "trigger-focus" ? (se.current = !1, ce.start(300, () => {
7559
7566
  se.current = !0;
7560
- })) : (se.current = !0, B.clear());
7567
+ })) : (se.current = !0, ce.clear());
7561
7568
  let a = (n === "trigger-press" || n === "item-press") && i.detail === 0 && i?.isTrusted, o = !e && (n === "escape-key" || n == null), s = {
7562
7569
  open: e,
7563
7570
  openChangeReason: n
7564
7571
  };
7565
- L.current = t.event ?? null;
7572
+ ie.current = t.event ?? null;
7566
7573
  let c = t.trigger?.id ?? null;
7567
- (c || e) && (s.activeTriggerId = c, s.activeTriggerElement = t.trigger ?? null), w.update(s), F.type === "menubar" && (n === "trigger-focus" || n === "focus-out" || n === "trigger-hover" || n === "list-navigation" || n === "sibling-open") ? w.set("instantType", "group") : a || o ? w.set("instantType", a ? "click" : "dismiss") : w.set("instantType", void 0);
7568
- }), V = G.useCallback(() => {
7569
- w.setOpen(!1, U(g));
7570
- }, [w]);
7574
+ (c || e) && (s.activeTriggerId = c, s.activeTriggerElement = t.trigger ?? null), C.update(s), F.type === "menubar" && (n === "trigger-focus" || n === "focus-out" || n === "trigger-hover" || n === "list-navigation" || n === "sibling-open") ? C.set("instantType", "group") : a || o ? C.set("instantType", a ? "click" : "dismiss") : C.set("instantType", void 0);
7575
+ }), B = G.useCallback(() => {
7576
+ C.setOpen(!1, H(h));
7577
+ }, [C]);
7571
7578
  G.useImperativeHandle(u, () => ({
7572
- unmount: z,
7573
- close: V
7574
- }), [z, V]);
7575
- let H;
7576
- F.type === "context-menu" && (H = F.context), G.useImperativeHandle(H?.positionerRef, () => j, [j]), G.useImperativeHandle(H?.actionsRef, () => ({ setOpen: ce }), [ce]);
7577
- let ue = Yt({
7578
- popupStore: w,
7579
- onOpenChange: ce
7580
- }), de = ue.context.events;
7579
+ unmount: ae,
7580
+ close: B
7581
+ }), [ae, B]);
7582
+ let V;
7583
+ F.type === "context-menu" && (V = F.context), G.useImperativeHandle(V?.positionerRef, () => j, [j]), G.useImperativeHandle(V?.actionsRef, () => ({ setOpen: le }), [le]);
7584
+ let de = Zt({
7585
+ popupStore: C,
7586
+ onOpenChange: le
7587
+ }), fe = de.context.events;
7581
7588
  G.useEffect(() => {
7582
- let e = ({ open: e, eventDetails: t }) => ce(e, t);
7583
- return de.on("setOpen", e), () => {
7584
- de?.off("setOpen", e);
7589
+ let e = ({ open: e, eventDetails: t }) => le(e, t);
7590
+ return fe.on("setOpen", e), () => {
7591
+ fe?.off("setOpen", e);
7585
7592
  };
7586
- }, [de, ce]);
7587
- let fe = Ae(ue, {
7593
+ }, [fe, le]);
7594
+ let pe = Ae(de, {
7588
7595
  enabled: !N,
7589
7596
  bubbles: { escapeKey: d && F.type === "menu" },
7590
7597
  outsidePress() {
7591
- return F.type !== "context-menu" || L.current?.type === "contextmenu" || ae.current;
7598
+ return F.type !== "context-menu" || ie.current?.type === "contextmenu" || oe.current;
7592
7599
  },
7593
- externalTree: re ? T : void 0
7594
- }), pe = be(ue, { role: "menu" }), me = $a(), he = G.useCallback((e) => {
7595
- w.select("activeIndex") !== e && w.set("activeIndex", e);
7596
- }, [w]), ge = Fa(ue, {
7600
+ externalTree: I ? w : void 0
7601
+ }), me = ye(de, { role: "menu" }), he = $a(), ge = G.useCallback((e) => {
7602
+ C.select("activeIndex") !== e && C.set("activeIndex", e);
7603
+ }, [C]), _e = Fa(de, {
7597
7604
  enabled: !N,
7598
- listRef: w.context.itemDomElements,
7599
- activeIndex: I,
7605
+ listRef: C.context.itemDomElements,
7606
+ activeIndex: ee,
7600
7607
  nested: F.type !== void 0,
7601
7608
  loopFocus: c,
7602
7609
  orientation: l,
7603
7610
  parentOrientation: F.type === "menubar" ? F.context.orientation : void 0,
7604
- rtl: me === "rtl",
7605
- disabledIndices: Gt,
7606
- onNavigate: he,
7611
+ rtl: he === "rtl",
7612
+ disabledIndices: $e,
7613
+ onNavigate: ge,
7607
7614
  openOnArrowKeyDown: F.type !== "context-menu",
7608
- externalTree: re ? T : void 0,
7609
- focusItemOnHover: v
7610
- }), _e = G.useCallback((e) => {
7611
- w.context.typingRef.current = e;
7612
- }, [w]), ve = Ia(ue, {
7613
- listRef: w.context.itemLabels,
7614
- elementsRef: w.context.itemDomElements,
7615
- activeIndex: I,
7615
+ externalTree: I ? w : void 0,
7616
+ focusItemOnHover: _
7617
+ }), ve = G.useCallback((e) => {
7618
+ C.context.typingRef.current = e;
7619
+ }, [C]), be = Ia(de, {
7620
+ listRef: C.context.itemLabels,
7621
+ elementsRef: C.context.itemDomElements,
7622
+ activeIndex: ee,
7616
7623
  resetMs: 500,
7617
7624
  onMatch: (e) => {
7618
- k && e !== I && w.set("activeIndex", e);
7625
+ O && e !== ee && C.set("activeIndex", e);
7619
7626
  },
7620
- onTypingChange: _e
7621
- }), { getReferenceProps: ye, getFloatingProps: xe, getItemProps: Se, getTriggerProps: Ce } = p([
7622
- fe,
7627
+ onTypingChange: ve
7628
+ }), { getReferenceProps: xe, getFloatingProps: Se, getItemProps: Ce, getTriggerProps: we } = p([
7623
7629
  pe,
7624
- ge,
7625
- ve
7626
- ]), we = G.useMemo(() => {
7627
- let e = nn(ye(), { onMouseMove() {
7628
- w.set("allowMouseEnter", !0);
7630
+ me,
7631
+ _e,
7632
+ be
7633
+ ]), Te = G.useMemo(() => {
7634
+ let e = Je(xe(), { onMouseMove() {
7635
+ C.set("allowMouseEnter", !0);
7629
7636
  } }, R);
7630
7637
  return delete e.role, e;
7631
7638
  }, [
7632
- ye,
7633
- w,
7639
+ xe,
7640
+ C,
7634
7641
  R
7635
- ]), Te = G.useMemo(() => {
7636
- let e = Ce();
7642
+ ]), Ee = G.useMemo(() => {
7643
+ let e = we();
7637
7644
  if (!e) return e;
7638
- let t = nn(e, R);
7645
+ let t = Je(e, R);
7639
7646
  return delete t.role, delete t["aria-controls"], t;
7640
- }, [Ce, R]), Ee = G.useMemo(() => xe({
7647
+ }, [we, R]), De = G.useMemo(() => Se({
7641
7648
  onMouseMove() {
7642
- w.set("allowMouseEnter", !0), F.type === "menu" && w.set("hoverEnabled", !1);
7649
+ C.set("allowMouseEnter", !0), F.type === "menu" && C.set("hoverEnabled", !1);
7643
7650
  },
7644
7651
  onClick() {
7645
- w.select("hoverEnabled") && w.set("hoverEnabled", !1);
7652
+ C.select("hoverEnabled") && C.set("hoverEnabled", !1);
7646
7653
  },
7647
7654
  onKeyDown(e) {
7648
- let t = w.select("keyboardEventRelay");
7655
+ let t = C.select("keyboardEventRelay");
7649
7656
  t && !e.isPropagationStopped() && t(e);
7650
7657
  }
7651
7658
  }), [
7652
- xe,
7659
+ Se,
7653
7660
  F.type,
7654
- w
7655
- ]), De = G.useMemo(() => Se(), [Se]);
7656
- w.useSyncedValues({
7657
- floatingRootContext: ue,
7658
- activeTriggerProps: we,
7659
- inactiveTriggerProps: Te,
7660
- popupProps: Ee,
7661
- itemProps: De
7661
+ C
7662
+ ]), Oe = G.useMemo(() => Ce(), [Ce]);
7663
+ C.useSyncedValues({
7664
+ floatingRootContext: de,
7665
+ activeTriggerProps: Te,
7666
+ inactiveTriggerProps: Ee,
7667
+ popupProps: De,
7668
+ itemProps: Oe
7662
7669
  });
7663
- let Oe = G.useMemo(() => ({
7664
- store: w,
7665
- parent: C
7666
- }), [w, C]), ke = /*#__PURE__*/ K(Ir.Provider, {
7667
- value: Oe,
7668
- children: typeof t == "function" ? t({ payload: ee }) : t
7670
+ let ke = G.useMemo(() => ({
7671
+ store: C,
7672
+ parent: S
7673
+ }), [C, S]), je = /*#__PURE__*/ K(Ir.Provider, {
7674
+ value: ke,
7675
+ children: typeof t == "function" ? t({ payload: ne }) : t
7669
7676
  });
7670
7677
  return F.type === void 0 || F.type === "context-menu" ? /*#__PURE__*/ K(Pe, {
7671
- externalTree: T,
7672
- children: ke
7673
- }) : ke;
7678
+ externalTree: w,
7679
+ children: je
7680
+ }) : je;
7674
7681
  });
7675
7682
  process.env.NODE_ENV !== "production" && (To.displayName = "MenuRoot");
7676
7683
  //#endregion
@@ -7687,7 +7694,7 @@ function Eo(e) {
7687
7694
  function Do(e) {
7688
7695
  let t = e.getBoundingClientRect();
7689
7696
  if (process.env.NODE_ENV !== "production") return t;
7690
- let n = V(e), r = n.getComputedStyle(e, "::before"), i = n.getComputedStyle(e, "::after");
7697
+ let n = pe(e), r = n.getComputedStyle(e, "::before"), i = n.getComputedStyle(e, "::after");
7691
7698
  if (r.content === "none" && i.content === "none") return t;
7692
7699
  let a = parseFloat(r.width) || 0, o = parseFloat(r.height) || 0, s = parseFloat(i.width) || 0, c = parseFloat(i.height) || 0, l = Math.max(t.width, a, s), u = Math.max(t.height, o, c), d = l - t.width, f = u - t.height;
7693
7700
  return {
@@ -7700,7 +7707,7 @@ function Do(e) {
7700
7707
  //#endregion
7701
7708
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/internals/composite/item/useCompositeItem.js
7702
7709
  function Oo(e = {}) {
7703
- let { highlightItemOnHover: t, highlightedIndex: n, onHighlightedIndexChange: r } = He(), { ref: i, index: a } = Jr(e), o = n === a, s = G.useRef(null), c = xt(i, s);
7710
+ let { highlightItemOnHover: t, highlightedIndex: n, onHighlightedIndexChange: r } = Yt(), { ref: i, index: a } = Jr(e), o = n === a, s = G.useRef(null), c = ut(i, s);
7704
7711
  return {
7705
7712
  compositeProps: G.useMemo(() => ({
7706
7713
  tabIndex: o ? 0 : -1,
@@ -7726,8 +7733,8 @@ function Oo(e = {}) {
7726
7733
  //#endregion
7727
7734
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/internals/composite/item/CompositeItem.js
7728
7735
  function ko(e) {
7729
- let { render: t, className: n, style: r, state: i = Ye, props: a = Gt, refs: o = Gt, metadata: s, stateAttributesMapping: c, tag: l = "div", ...u } = e, { compositeProps: d, compositeRef: f } = Oo({ metadata: s });
7730
- return yt(l, e, {
7736
+ let { render: t, className: n, style: r, state: i = it, props: a = $e, refs: o = $e, metadata: s, stateAttributesMapping: c, tag: l = "div", ...u } = e, { compositeProps: d, compositeRef: f } = Oo({ metadata: s });
7737
+ return qt(l, e, {
7731
7738
  state: i,
7732
7739
  ref: [...o, f],
7733
7740
  props: [
@@ -7741,8 +7748,8 @@ function ko(e) {
7741
7748
  //#endregion
7742
7749
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/menu/utils/findRootOwnerId.js
7743
7750
  function Ao(e) {
7744
- if (P(e) && e.hasAttribute("data-rootownerid")) return e.getAttribute("data-rootownerid") ?? void 0;
7745
- if (!R(e)) return Ao(se(e));
7751
+ if (L(e) && e.hasAttribute("data-rootownerid")) return e.getAttribute("data-rootownerid") ?? void 0;
7752
+ if (!ve(e)) return Ao(le(e));
7746
7753
  }
7747
7754
  //#endregion
7748
7755
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/utils/popups/useTriggerFocusGuards.js
@@ -7750,22 +7757,22 @@ function jo(e, t) {
7750
7757
  let n = G.useRef(null);
7751
7758
  return {
7752
7759
  preFocusGuardRef: n,
7753
- handlePreFocusGuardFocus: h((t) => {
7760
+ handlePreFocusGuardFocus: U((t) => {
7754
7761
  fn.flushSync(() => {
7755
- e.setOpen(!1, U(Se, t.nativeEvent, t.currentTarget));
7756
- }), O(n.current)?.focus();
7762
+ e.setOpen(!1, H(Se, t.nativeEvent, t.currentTarget));
7763
+ }), re(n.current)?.focus();
7757
7764
  }),
7758
- handleFocusTargetFocus: h((n) => {
7765
+ handleFocusTargetFocus: U((n) => {
7759
7766
  let r = e.select("positionerElement");
7760
- if (r && L(n, r)) e.context.beforeContentFocusGuardRef.current?.focus();
7767
+ if (r && It(n, r)) e.context.beforeContentFocusGuardRef.current?.focus();
7761
7768
  else {
7762
7769
  fn.flushSync(() => {
7763
- e.setOpen(!1, U(Se, n.nativeEvent, n.currentTarget));
7770
+ e.setOpen(!1, H(Se, n.nativeEvent, n.currentTarget));
7764
7771
  });
7765
- let i = Fe(e.context.triggerFocusTargetRef.current || t.current);
7766
- for (; i !== null && N(r, i);) {
7772
+ let i = E(e.context.triggerFocusTargetRef.current || t.current);
7773
+ for (; i !== null && I(r, i);) {
7767
7774
  let e = i;
7768
- if (i = ke(i), i === e) break;
7775
+ if (i = Ie(i), i === e) break;
7769
7776
  }
7770
7777
  i?.focus();
7771
7778
  }
@@ -7778,14 +7785,14 @@ function Mo(e) {
7778
7785
  let { enabled: t = !0, mouseDownAction: n, open: r } = e, i = G.useRef(!1);
7779
7786
  return G.useMemo(() => t ? {
7780
7787
  onMouseDown: (e) => {
7781
- (n === "open" && !r || n === "close" && r) && (i.current = !0, D(e.currentTarget).addEventListener("click", () => {
7788
+ (n === "open" && !r || n === "close" && r) && (i.current = !0, ne(e.currentTarget).addEventListener("click", () => {
7782
7789
  i.current = !1;
7783
7790
  }, { once: !0 }));
7784
7791
  },
7785
7792
  onClick: (e) => {
7786
7793
  i.current && (i.current = !1, e.preventBaseUIHandler());
7787
7794
  }
7788
- } : Ye, [
7795
+ } : it, [
7789
7796
  t,
7790
7797
  n,
7791
7798
  r
@@ -7793,124 +7800,124 @@ function Mo(e) {
7793
7800
  }
7794
7801
  //#endregion
7795
7802
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/menu/trigger/MenuTrigger.js
7796
- var No = 2, Po = re(function(e, t) {
7797
- let { render: n, className: r, disabled: i = !1, nativeButton: o = !0, id: s, openOnHover: c, delay: l = 100, closeDelay: u = 0, handle: d, payload: f, style: m, ...g } = e, _ = Lr(!0), v = d?.store ?? _?.store;
7798
- if (!v) throw Error(process.env.NODE_ENV === "production" ? qt(85) : "Base UI: <Menu.Trigger> must be either used within a <Menu.Root> component or provided with a handle.");
7799
- let y = ee(s), b = v.useState("isTriggerActive", y), x = v.useState("floatingRootContext"), S = v.useState("isOpenedByTrigger", y), C = G.useRef(null), w = Io(), T = He(!0), O = Nt(), k = G.useMemo(() => O ?? new I(), [O]), A = E(k), j = ne(), { registerTrigger: M, isMountedByThisTrigger: P } = a(y, C, v, {
7803
+ var No = 2, Po = ie(function(e, t) {
7804
+ let { render: n, className: r, disabled: i = !1, nativeButton: o = !0, id: s, openOnHover: c, delay: l = 100, closeDelay: u = 0, handle: d, payload: f, style: m, ...h } = e, g = Lr(!0), _ = d?.store ?? g?.store;
7805
+ if (!_) throw Error(process.env.NODE_ENV === "production" ? nn(85) : "Base UI: <Menu.Trigger> must be either used within a <Menu.Root> component or provided with a handle.");
7806
+ let v = Be(s), y = _.useState("isTriggerActive", v), b = _.useState("floatingRootContext"), x = _.useState("isOpenedByTrigger", v), S = G.useRef(null), C = Io(), w = Yt(!0), E = Ft(), D = G.useMemo(() => E ?? new F(), [E]), O = T(D), k = te(), { registerTrigger: j, isMountedByThisTrigger: M } = a(v, S, _, {
7800
7807
  payload: f,
7801
7808
  closeDelay: u,
7802
- parent: w,
7803
- floatingTreeRoot: k,
7804
- floatingNodeId: A,
7805
- floatingParentNodeId: j,
7806
- keyboardEventRelay: T?.relayKeyboardEvent
7807
- }), F = w.type === "menubar", te = v.useState("disabled"), L = i || te || F && w.context.disabled, { getButtonProps: re, buttonRef: ie } = at({
7808
- disabled: L,
7809
+ parent: C,
7810
+ floatingTreeRoot: D,
7811
+ floatingNodeId: O,
7812
+ floatingParentNodeId: k,
7813
+ keyboardEventRelay: w?.relayKeyboardEvent
7814
+ }), N = C.type === "menubar", P = _.useState("disabled"), ee = i || P || N && C.context.disabled, { getButtonProps: re, buttonRef: ie } = st({
7815
+ disabled: ee,
7809
7816
  native: o
7810
7817
  });
7811
7818
  G.useEffect(() => {
7812
- !S && w.type === void 0 && (v.context.allowMouseUpTriggerRef.current = !1);
7819
+ !x && C.type === void 0 && (_.context.allowMouseUpTriggerRef.current = !1);
7813
7820
  }, [
7814
- v,
7815
- S,
7816
- w.type
7821
+ _,
7822
+ x,
7823
+ C.type
7817
7824
  ]);
7818
- let R = G.useRef(null), z = Ne(), ae = h((e) => {
7819
- if (!R.current) return;
7820
- z.clear(), v.context.allowMouseUpTriggerRef.current = !1;
7825
+ let L = G.useRef(null), R = A(), ae = U((e) => {
7826
+ if (!L.current) return;
7827
+ R.clear(), _.context.allowMouseUpTriggerRef.current = !1;
7821
7828
  let t = e.target;
7822
- if (N(R.current, t) || N(v.select("positionerElement"), t) || t === R.current || t != null && Ao(t) === v.select("rootId")) return;
7823
- let n = Do(R.current);
7824
- e.clientX >= n.left - No && e.clientX <= n.right + No && e.clientY >= n.top - No && e.clientY <= n.bottom + No || k.events.emit("close", {
7829
+ if (I(L.current, t) || I(_.select("positionerElement"), t) || t === L.current || t != null && Ao(t) === _.select("rootId")) return;
7830
+ let n = Do(L.current);
7831
+ e.clientX >= n.left - No && e.clientX <= n.right + No && e.clientY >= n.top - No && e.clientY <= n.bottom + No || D.events.emit("close", {
7825
7832
  domEvent: e,
7826
- reason: Jt
7833
+ reason: Xt
7827
7834
  });
7828
7835
  });
7829
7836
  G.useEffect(() => {
7830
- S && v.select("lastOpenChangeReason") === "trigger-hover" && D(R.current).addEventListener("mouseup", ae, { once: !0 });
7837
+ x && _.select("lastOpenChangeReason") === "trigger-hover" && ne(L.current).addEventListener("mouseup", ae, { once: !0 });
7831
7838
  }, [
7832
- S,
7839
+ x,
7833
7840
  ae,
7834
- v
7841
+ _
7835
7842
  ]);
7836
- let oe = F && w.context.hasSubmenuOpen, se = Oa(x, {
7837
- enabled: (c ?? oe) && !L && w.type !== "context-menu" && (!F || oe && !P),
7838
- handleClose: Ua({ blockPointerEvents: !F }),
7843
+ let oe = N && C.context.hasSubmenuOpen, z = Oa(b, {
7844
+ enabled: (c ?? oe) && !ee && C.type !== "context-menu" && (!N || oe && !M),
7845
+ handleClose: Ua({ blockPointerEvents: !N }),
7839
7846
  mouseOnly: !0,
7840
7847
  move: !1,
7841
- restMs: w.type === void 0 ? l : void 0,
7848
+ restMs: C.type === void 0 ? l : void 0,
7842
7849
  delay: { close: u },
7843
- triggerElementRef: C,
7844
- externalTree: k,
7845
- isActiveTrigger: b,
7846
- isClosing: () => v.select("transitionStatus") === "ending"
7847
- }), B = Fo(S, v.select("lastOpenChangeReason")), ce = ci(x, {
7848
- enabled: !L && w.type !== "context-menu",
7849
- event: S && F ? "click" : "mousedown",
7850
+ triggerElementRef: S,
7851
+ externalTree: D,
7852
+ isActiveTrigger: y,
7853
+ isClosing: () => _.select("transitionStatus") === "ending"
7854
+ }), se = Fo(x, _.select("lastOpenChangeReason")), ce = ci(b, {
7855
+ enabled: !ee && C.type !== "context-menu",
7856
+ event: x && N ? "click" : "mousedown",
7850
7857
  toggle: !0,
7851
7858
  ignoreMouse: !1,
7852
- stickIfOpen: w.type === void 0 && B
7853
- }), V = ba(x, { enabled: !L && oe }), le = Mo({
7854
- open: S,
7855
- enabled: F,
7859
+ stickIfOpen: C.type === void 0 && se
7860
+ }), le = ba(b, { enabled: !ee && oe }), ue = Mo({
7861
+ open: x,
7862
+ enabled: N,
7856
7863
  mouseDownAction: "open"
7857
- }), H = p([ce, V]), ue = {
7858
- disabled: L,
7859
- open: S
7860
- }, de = v.useState("triggerProps", P), fe = [
7861
- R,
7864
+ }), B = p([ce, le]), V = {
7865
+ disabled: ee,
7866
+ open: x
7867
+ }, de = _.useState("triggerProps", M), fe = [
7868
+ L,
7862
7869
  t,
7863
7870
  ie,
7864
- M,
7865
- C
7871
+ j,
7872
+ S
7866
7873
  ], pe = [
7867
- H.getReferenceProps(),
7868
- se ?? Ye,
7874
+ B.getReferenceProps(),
7875
+ z ?? it,
7869
7876
  de,
7870
7877
  {
7871
7878
  "aria-haspopup": "menu",
7872
- id: y,
7879
+ id: v,
7873
7880
  onMouseDown: (e) => {
7874
- v.select("open") || (z.start(200, () => {
7875
- v.context.allowMouseUpTriggerRef.current = !0;
7876
- }), D(e.currentTarget).addEventListener("mouseup", ae, { once: !0 }));
7881
+ _.select("open") || (R.start(200, () => {
7882
+ _.context.allowMouseUpTriggerRef.current = !0;
7883
+ }), ne(e.currentTarget).addEventListener("mouseup", ae, { once: !0 }));
7877
7884
  }
7878
7885
  },
7879
- F ? { role: "menuitem" } : {},
7880
- le,
7881
- g,
7886
+ N ? { role: "menuitem" } : {},
7887
+ ue,
7888
+ h,
7882
7889
  re
7883
- ], { preFocusGuardRef: me, handlePreFocusGuardFocus: he, handleFocusTargetFocus: ge } = jo(v, C), _e = yt("button", e, {
7884
- enabled: !F,
7885
- stateAttributesMapping: tt,
7886
- state: ue,
7890
+ ], { preFocusGuardRef: me, handlePreFocusGuardFocus: he, handleFocusTargetFocus: ge } = jo(_, S), _e = qt("button", e, {
7891
+ enabled: !N,
7892
+ stateAttributesMapping: at,
7893
+ state: V,
7887
7894
  ref: fe,
7888
7895
  props: pe
7889
7896
  });
7890
- return F ? /*#__PURE__*/ K(ko, {
7897
+ return N ? /*#__PURE__*/ K(ko, {
7891
7898
  tag: "button",
7892
7899
  render: n,
7893
7900
  className: r,
7894
7901
  style: m,
7895
- state: ue,
7902
+ state: V,
7896
7903
  refs: fe,
7897
7904
  props: pe,
7898
- stateAttributesMapping: tt
7899
- }) : S ? /*#__PURE__*/ dn(G.Fragment, { children: [
7900
- /*#__PURE__*/ K(Lt, {
7905
+ stateAttributesMapping: at
7906
+ }) : x ? /*#__PURE__*/ dn(G.Fragment, { children: [
7907
+ /*#__PURE__*/ K(zt, {
7901
7908
  ref: me,
7902
7909
  onFocus: he
7903
- }, `${y}-pre-focus-guard`),
7904
- /*#__PURE__*/ K(G.Fragment, { children: _e }, y),
7905
- /*#__PURE__*/ K(Lt, {
7906
- ref: v.context.triggerFocusTargetRef,
7910
+ }, `${v}-pre-focus-guard`),
7911
+ /*#__PURE__*/ K(G.Fragment, { children: _e }, v),
7912
+ /*#__PURE__*/ K(zt, {
7913
+ ref: _.context.triggerFocusTargetRef,
7907
7914
  onFocus: ge
7908
- }, `${y}-post-focus-guard`)
7909
- ] }) : /*#__PURE__*/ K(G.Fragment, { children: _e }, y);
7915
+ }, `${v}-post-focus-guard`)
7916
+ ] }) : /*#__PURE__*/ K(G.Fragment, { children: _e }, v);
7910
7917
  });
7911
7918
  process.env.NODE_ENV !== "production" && (Po.displayName = "MenuTrigger");
7912
7919
  function Fo(e, t) {
7913
- let n = Ne(), [r, i] = G.useState(!1);
7920
+ let n = A(), [r, i] = G.useState(!1);
7914
7921
  return W(() => {
7915
7922
  e && t === "trigger-hover" ? (i(!0), n.start(500, () => {
7916
7923
  i(!1);
@@ -7943,7 +7950,7 @@ function Lo(e) {
7943
7950
  //#endregion
7944
7951
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/menu/submenu-trigger/MenuSubmenuTrigger.js
7945
7952
  var Ro = /*#__PURE__*/ G.forwardRef(function(e, t) {
7946
- let { render: n, className: r, label: i, id: a, nativeButton: o = !1, openOnHover: s = !0, delay: c = 100, closeDelay: l = 0, disabled: u = !1, style: d, ...f } = e, m = Jr(), h = Fr(), { store: g } = Lr(), _ = ee(a), v = g.useState("open"), y = g.useState("floatingRootContext"), b = g.useState("floatingTreeRoot"), x = ut(_, g), S = G.useCallback((e) => {
7953
+ let { render: n, className: r, label: i, id: a, nativeButton: o = !1, openOnHover: s = !0, delay: c = 100, closeDelay: l = 0, disabled: u = !1, style: d, ...f } = e, m = Jr(), h = Fr(), { store: g } = Lr(), _ = Be(a), v = g.useState("open"), y = g.useState("floatingRootContext"), b = g.useState("floatingTreeRoot"), x = mt(_, g), S = G.useCallback((e) => {
7947
7954
  let t = x(e);
7948
7955
  return e !== null && g.select("open") && g.select("activeTriggerId") == null && g.update({
7949
7956
  activeTriggerId: _,
@@ -7961,12 +7968,12 @@ var Ro = /*#__PURE__*/ G.forwardRef(function(e, t) {
7961
7968
  process.env.NODE_ENV !== "production" && W(() => {
7962
7969
  let e = C.current;
7963
7970
  if (e && Lo(e) && !u) {
7964
- let e = en.captureOwnerStack?.() || "";
7965
- jt(`A disabled element was detected on <Menu.SubmenuTrigger>. To properly disable the trigger, use the \`disabled\` prop on the component instead of setting it on the rendered element.${e}`);
7971
+ let e = xe.captureOwnerStack?.() || "";
7972
+ wt(`A disabled element was detected on <Menu.SubmenuTrigger>. To properly disable the trigger, use the \`disabled\` prop on the component instead of setting it on the rendered element.${e}`);
7966
7973
  }
7967
7974
  });
7968
7975
  let T = wo();
7969
- if (!T?.parentMenu) throw Error(process.env.NODE_ENV === "production" ? qt(37) : "Base UI: <Menu.SubmenuTrigger> must be placed in <Menu.SubmenuRoot>.");
7976
+ if (!T?.parentMenu) throw Error(process.env.NODE_ENV === "production" ? nn(37) : "Base UI: <Menu.SubmenuTrigger> must be placed in <Menu.SubmenuRoot>.");
7970
7977
  g.useSyncedValue("closeDelay", l);
7971
7978
  let E = T.parentMenu, D = E.useState("itemProps"), O = E.useState("isActive", m.index), k = G.useMemo(() => ({
7972
7979
  type: "submenu-trigger",
@@ -7983,7 +7990,7 @@ var Ro = /*#__PURE__*/ G.forwardRef(function(e, t) {
7983
7990
  nativeButton: o,
7984
7991
  itemMetadata: k,
7985
7992
  nodeId: h?.context.nodeId
7986
- }), P = g.useState("hoverEnabled"), F = E.useState("allowMouseEnter"), I = Oa(y, {
7993
+ }), P = g.useState("hoverEnabled"), F = E.useState("allowMouseEnter"), ee = Oa(y, {
7987
7994
  enabled: P && s && !j,
7988
7995
  handleClose: Ua({ blockPointerEvents: !0 }),
7989
7996
  mouseOnly: !0,
@@ -8002,18 +8009,18 @@ var Ro = /*#__PURE__*/ G.forwardRef(function(e, t) {
8002
8009
  toggle: !s,
8003
8010
  ignoreMouse: s,
8004
8011
  stickIfOpen: !1
8005
- }), ne = p([te]), L = g.useState("triggerProps", !0);
8006
- return delete L.id, yt("div", e, {
8012
+ }), ne = p([te]), re = g.useState("triggerProps", !0);
8013
+ return delete re.id, qt("div", e, {
8007
8014
  state: {
8008
8015
  disabled: j,
8009
8016
  highlighted: O,
8010
8017
  open: v
8011
8018
  },
8012
- stateAttributesMapping: Mt,
8019
+ stateAttributesMapping: Pt,
8013
8020
  props: [
8014
8021
  ne.getReferenceProps(),
8015
- I,
8016
- L,
8022
+ ee,
8023
+ re,
8017
8024
  D,
8018
8025
  {
8019
8026
  tabIndex: v || O ? 0 : -1,
@@ -8042,11 +8049,11 @@ var zo = class {
8042
8049
  }
8043
8050
  open(e) {
8044
8051
  let t = e ? this.store.context.triggerElements.getById(e) : void 0;
8045
- if (e && !t) throw Error(process.env.NODE_ENV === "production" ? qt(83, e) : `Base UI: MenuHandle.open: No trigger found with id "${e}".`);
8046
- this.store.setOpen(!0, U("imperative-action", void 0, t));
8052
+ if (e && !t) throw Error(process.env.NODE_ENV === "production" ? nn(83, e) : `Base UI: MenuHandle.open: No trigger found with id "${e}".`);
8053
+ this.store.setOpen(!0, H("imperative-action", void 0, t));
8047
8054
  }
8048
8055
  close() {
8049
- this.store.setOpen(!1, U("imperative-action", void 0, void 0));
8056
+ this.store.setOpen(!1, H("imperative-action", void 0, void 0));
8050
8057
  }
8051
8058
  get isOpen() {
8052
8059
  return this.store.state.open;
@@ -8102,7 +8109,7 @@ function Wo({ align: e = "start", alignOffset: t = 0, container: n, side: r = "b
8102
8109
  sideOffset: i,
8103
8110
  children: /* @__PURE__ */ K(Ja, {
8104
8111
  "data-slot": "dropdown-menu-content",
8105
- className: Dt("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:animate-none motion-reduce:transition-none", a),
8112
+ className: Vt("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:animate-none motion-reduce:transition-none", a),
8106
8113
  ...o
8107
8114
  })
8108
8115
  })
@@ -8118,7 +8125,7 @@ function Ko({ className: e, inset: t, ...n }) {
8118
8125
  return /* @__PURE__ */ K(ni, {
8119
8126
  "data-slot": "dropdown-menu-label",
8120
8127
  "data-inset": t,
8121
- className: Dt("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7", e),
8128
+ className: Vt("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7", e),
8122
8129
  ...n
8123
8130
  });
8124
8131
  }
@@ -8127,7 +8134,7 @@ function qo({ className: e, inset: t, variant: n = "default", ...r }) {
8127
8134
  "data-slot": "dropdown-menu-item",
8128
8135
  "data-inset": t,
8129
8136
  "data-variant": n,
8130
- className: Dt("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive", e),
8137
+ className: Vt("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive", e),
8131
8138
  ...r
8132
8139
  });
8133
8140
  }
@@ -8141,7 +8148,7 @@ function Yo({ className: e, inset: t, children: n, ...r }) {
8141
8148
  return /* @__PURE__ */ dn(Ro, {
8142
8149
  "data-slot": "dropdown-menu-sub-trigger",
8143
8150
  "data-inset": t,
8144
- className: Dt("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", e),
8151
+ className: Vt("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", e),
8145
8152
  ...r,
8146
8153
  children: [n, /* @__PURE__ */ K(_n, { className: "ml-auto" })]
8147
8154
  });
@@ -8149,7 +8156,7 @@ function Yo({ className: e, inset: t, children: n, ...r }) {
8149
8156
  function Xo({ align: e = "start", alignOffset: t = -3, side: n = "right", sideOffset: r = 0, className: i, ...a }) {
8150
8157
  return /* @__PURE__ */ K(Wo, {
8151
8158
  "data-slot": "dropdown-menu-sub-content",
8152
- className: Dt("w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:animate-none motion-reduce:transition-none", i),
8159
+ className: Vt("w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:animate-none motion-reduce:transition-none", i),
8153
8160
  align: e,
8154
8161
  alignOffset: t,
8155
8162
  side: n,
@@ -8161,7 +8168,7 @@ function Zo({ className: e, children: t, checked: n, inset: r, ...i }) {
8161
8168
  return /* @__PURE__ */ dn(Zr, {
8162
8169
  "data-slot": "dropdown-menu-checkbox-item",
8163
8170
  "data-inset": r,
8164
- className: Dt("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", e),
8171
+ className: Vt("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", e),
8165
8172
  checked: n,
8166
8173
  ...i,
8167
8174
  children: [/* @__PURE__ */ K("span", {
@@ -8179,11 +8186,11 @@ function Qo({ action: e, onAction: t, title: n }) {
8179
8186
  ref: i,
8180
8187
  children: /* @__PURE__ */ dn(Ho, { children: [/* @__PURE__ */ K(Uo, {
8181
8188
  "aria-label": e,
8182
- render: /* @__PURE__ */ K(lt, {
8189
+ render: /* @__PURE__ */ K(Ke, {
8183
8190
  size: "icon",
8184
8191
  title: e,
8185
- variant: "ghost",
8186
- children: /* @__PURE__ */ K(St, { name: "more" })
8192
+ variant: "outline",
8193
+ children: /* @__PURE__ */ K(Tt, { name: "more" })
8187
8194
  })
8188
8195
  }), /* @__PURE__ */ K(Wo, {
8189
8196
  align: "end",
@@ -8676,7 +8683,7 @@ function ys(e) {
8676
8683
  }
8677
8684
  function bs(e, t) {
8678
8685
  let n = $(e.designer);
8679
- if (n?.version == 1) return Ks(n, t);
8686
+ if (n?.version == 1) return Js(n, t);
8680
8687
  }
8681
8688
  function xs(e, t, n) {
8682
8689
  return $($(bs(e, t)?.layouts)?.[n]);
@@ -8810,14 +8817,14 @@ function Os(e) {
8810
8817
  case "task": {
8811
8818
  let r = e.definition, i = [...t];
8812
8819
  t.clear();
8813
- for (let e of r?.inputs ?? []) t.set(e.handle, {
8820
+ for (let e of r?.inputs ?? []) "handle" in e && t.set(e.handle, {
8814
8821
  defaultValue: e.value,
8815
8822
  description: e.description,
8816
8823
  jsonSchema: e.jsonSchema,
8817
8824
  nullable: e.nullable
8818
8825
  });
8819
8826
  for (let [e, n] of i) t.has(e) || t.set(e, n);
8820
- for (let e of r?.outputs ?? []) n.set(e.handle, {
8827
+ for (let e of r?.outputs ?? []) "handle" in e && n.set(e.handle, {
8821
8828
  description: e.description,
8822
8829
  jsonSchema: e.jsonSchema,
8823
8830
  nullable: e.nullable
@@ -8979,38 +8986,65 @@ function Ls(e, t, n) {
8979
8986
  ordered: a
8980
8987
  };
8981
8988
  }
8982
- function Rs(e, t, n, r) {
8989
+ function Rs(e, t, n, r, i) {
8983
8990
  if (!("inputs" in t)) return [];
8984
- let i = [];
8985
- for (let [a, o] of [...n.inputs].toSorted(([e], [t]) => e.localeCompare(t))) {
8986
- let n = t.inputs[a], s = [], c = /* @__PURE__ */ new Set();
8991
+ let a = [];
8992
+ for (let [o, s] of n.inputs) {
8993
+ let n = t.inputs[o], c = [], l = /* @__PURE__ */ new Set();
8987
8994
  if (n?.kind == "sources") for (let t of n.sources) {
8988
8995
  if (t.kind != "node") continue;
8989
- let n = t.nodeId, r = t.output, i = Ds(n, r, e, a);
8990
- c.has(i) || (c.add(i), s.push({
8996
+ let n = t.nodeId, r = t.output, i = Ds(n, r, e, o);
8997
+ l.has(i) || (l.add(i), c.push({
8991
8998
  nodeId: n,
8992
8999
  output: r
8993
9000
  }));
8994
9001
  }
8995
- let l = n?.kind == "sources" && n.sources.length == 1 ? n.sources[0] : void 0, u = l?.kind == "binding" ? r.binding(l.bindingId) : void 0;
8996
- i.push({
8997
- ...o,
8998
- handle: a,
9002
+ let u = n?.kind == "sources" && n.sources.length == 1 ? n.sources[0] : void 0, d = u?.kind == "binding" ? r.binding(u.bindingId) : void 0;
9003
+ a.push({
9004
+ ...s,
9005
+ handle: o,
8999
9006
  ...n?.kind == "value" ? { value: n.value } : {},
9000
- ...s.length > 0 ? { sources: s } : {},
9001
- ...u?.kind == "variable" ? { variable: u.target } : {},
9002
- variableCompatible: hs(o.jsonSchema)
9007
+ ...c.length > 0 ? { sources: c } : {},
9008
+ ...d?.kind == "variable" ? { variable: d.target } : {},
9009
+ variableCompatible: hs(s.jsonSchema),
9010
+ variableEnabled: i
9003
9011
  });
9004
9012
  }
9005
- return i;
9013
+ return a;
9006
9014
  }
9007
9015
  function zs(e) {
9008
- return [...e.outputs].toSorted(([e], [t]) => e.localeCompare(t)).map(([e, t]) => Object.assign({ handle: e }, t));
9016
+ return [...e.outputs].map(([e, t]) => Object.assign({ handle: e }, t));
9017
+ }
9018
+ function Bs(e, t) {
9019
+ if (e.kind != "task" || e.definition == null) return t;
9020
+ let n = new Map(t.map((e) => [e.handle, e])), r = [];
9021
+ for (let t of e.definition.inputs) {
9022
+ if (!("handle" in t)) {
9023
+ r.push(t);
9024
+ continue;
9025
+ }
9026
+ let e = n.get(t.handle);
9027
+ e != null && (r.push(e), n.delete(t.handle));
9028
+ }
9029
+ return r.push(...n.values()), r;
9030
+ }
9031
+ function Vs(e, t) {
9032
+ if (e.kind != "task" || e.definition == null) return t;
9033
+ let n = new Map(t.map((e) => [e.handle, e])), r = [];
9034
+ for (let t of e.definition.outputs) {
9035
+ if (!("handle" in t)) {
9036
+ r.push(t);
9037
+ continue;
9038
+ }
9039
+ let e = n.get(t.handle);
9040
+ e != null && (r.push(e), n.delete(t.handle));
9041
+ }
9042
+ return r.push(...n.values()), r;
9009
9043
  }
9010
- function Bs(e) {
9044
+ function Hs(e) {
9011
9045
  return e === void 0 ? "" : typeof e == "string" ? e : JSON.stringify(e);
9012
9046
  }
9013
- function Vs(e) {
9047
+ function Us(e) {
9014
9048
  if (e.kind != "integration" && e.kind != "poll") return [];
9015
9049
  let t = $(e.definition.configSchema), n = $(t?.properties), r = new Set(Array.isArray(t?.required) ? t.required.filter((e) => typeof e == "string") : []), i = [];
9016
9050
  for (let [t, a] of Object.entries(n ?? {})) {
@@ -9021,14 +9055,14 @@ function Vs(e) {
9021
9055
  label: typeof n.title == "string" ? n.title : t,
9022
9056
  name: t,
9023
9057
  required: r.has(t),
9024
- source: Bs(o)
9058
+ source: Hs(o)
9025
9059
  };
9026
9060
  if (Array.isArray(n.enum)) {
9027
9061
  i.push({
9028
9062
  ...s,
9029
9063
  kind: "select",
9030
9064
  options: n.enum.map((e) => {
9031
- let t = Bs(e);
9065
+ let t = Hs(e);
9032
9066
  return {
9033
9067
  label: t,
9034
9068
  source: t,
@@ -9044,14 +9078,14 @@ function Vs(e) {
9044
9078
  ...s,
9045
9079
  kind: "multi-select",
9046
9080
  options: c.enum.map((e) => {
9047
- let t = Bs(e);
9081
+ let t = Hs(e);
9048
9082
  return {
9049
9083
  label: t,
9050
9084
  source: t,
9051
9085
  value: e
9052
9086
  };
9053
9087
  }),
9054
- selected: Array.isArray(o) ? o.map(Bs) : []
9088
+ selected: Array.isArray(o) ? o.map(Hs) : []
9055
9089
  });
9056
9090
  continue;
9057
9091
  }
@@ -9073,7 +9107,7 @@ function Vs(e) {
9073
9107
  }
9074
9108
  return i.toSorted((e, t) => Number(!e.required) - Number(!t.required) || Number(e.kind == "json" || e.kind == "multi-select") - Number(t.kind == "json" || t.kind == "multi-select"));
9075
9109
  }
9076
- function Hs(e, t, n, r) {
9110
+ function Ws(e, t, n, r) {
9077
9111
  let i;
9078
9112
  switch (t.kind) {
9079
9113
  case "cron":
@@ -9084,7 +9118,7 @@ function Hs(e, t, n, r) {
9084
9118
  break;
9085
9119
  case "integration":
9086
9120
  i = {
9087
- config: Vs(t),
9121
+ config: Us(t),
9088
9122
  kind: t.kind,
9089
9123
  schedules: [],
9090
9124
  source: t.definition.provider
@@ -9092,7 +9126,7 @@ function Hs(e, t, n, r) {
9092
9126
  break;
9093
9127
  case "poll":
9094
9128
  i = {
9095
- config: Vs(t),
9129
+ config: Us(t),
9096
9130
  kind: t.kind,
9097
9131
  schedules: t.pollTimes,
9098
9132
  source: t.definition.provider
@@ -9132,8 +9166,8 @@ function Hs(e, t, n, r) {
9132
9166
  title: t.name
9133
9167
  };
9134
9168
  }
9135
- function Us(e, t, n, r, i) {
9136
- let a = t.node, o = Rs(e, a, n, i.revision), s = zs(n), c = t.kind == "task" ? t.definition : void 0, l = c != null && "executor" in c && c.executor.kind == "connector" ? c.executor : void 0, u = l == null ? void 0 : i.connectorActions[l.action], d = u == null ? void 0 : i.connectionCatalogs[u.serviceId], f = u?.defaultConnection, p = l?.connectionId, m = p == null ? void 0 : d?.byId.get(p);
9169
+ function Gs(e, t, n, r, i) {
9170
+ let a = t.node, o = Bs(t, Rs(e, a, n, i.revision, i.variables)), s = Vs(t, zs(n)), c = t.kind == "task" ? t.definition : void 0, l = c != null && "executor" in c && c.executor.kind == "connector" ? c.executor : void 0, u = l == null ? void 0 : i.connectorActions[l.action], d = u == null ? void 0 : i.connectionCatalogs[u.serviceId], f = u?.defaultConnection, p = l?.connectionId, m = p == null ? void 0 : d?.byId.get(p);
9137
9171
  m == null && f != null && f.connectionId == p && (m = f);
9138
9172
  let h = l != null && (l.connectionId == null || d != null && m?.status != "active"), g = i.runNodes.get(e), _ = {
9139
9173
  concurrency: a.concurrency,
@@ -9184,9 +9218,9 @@ function Us(e, t, n, r, i) {
9184
9218
  };
9185
9219
  }
9186
9220
  }
9187
- function Ws(e, t, n = {}, r = [], i = {}, a = {}, o, s, c = [], l = [], u = !1, d = !1) {
9188
- let f = e == null ? void 0 : rs(e), p = f == null || t == null ? void 0 : f.graph(t);
9189
- if (f == null || t == null || p == null) return {
9221
+ function Ks(e, t, n = {}, r = [], i = {}, a = {}, o, s, c = [], l = [], u = !1, d = !1, f = !0) {
9222
+ let p = e == null ? void 0 : rs(e), m = p == null || t == null ? void 0 : p.graph(t);
9223
+ if (p == null || t == null || m == null) return {
9190
9224
  edges: [],
9191
9225
  nodes: [],
9192
9226
  viewport: {
@@ -9195,52 +9229,53 @@ function Ws(e, t, n = {}, r = [], i = {}, a = {}, o, s, c = [], l = [], u = !1,
9195
9229
  zoom: 1
9196
9230
  }
9197
9231
  };
9198
- let m = js(f, t, s, c), h = Object.entries(p.nodes), g = new Map(h.map(([e, t]) => [e, f.resolveNode(e, t)])), _ = new Set(h.map(([e]) => e)), v = new Map([...g].map(([e, t]) => [e, Os(t)])), y = Is(h, _, v), b = Ls(_, y.dependencies, y.dependents), x = {
9232
+ let h = js(p, t, s, c), g = Object.entries(m.nodes), _ = new Map(g.map(([e, t]) => [e, p.resolveNode(e, t)])), v = new Set(g.map(([e]) => e)), y = new Map([..._].map(([e, t]) => [e, Os(t)])), b = Is(g, v, y), x = Ls(v, b.dependencies, b.dependents), S = {
9199
9233
  connectionCatalogs: a,
9200
9234
  connectorActions: i,
9201
9235
  diagnostics: r,
9202
- revision: f,
9203
- runNodes: m.nodes,
9236
+ revision: p,
9237
+ runNodes: h.nodes,
9204
9238
  t: o,
9205
- target: t
9206
- }, S = /* @__PURE__ */ new Map(), C = [];
9207
- for (let e of b.ordered) {
9208
- let i = b.depth.get(e) ?? 0, a = S.get(i) ?? 0;
9209
- S.set(i, a + 1);
9239
+ target: t,
9240
+ variables: f
9241
+ }, C = /* @__PURE__ */ new Map(), w = [];
9242
+ for (let e of x.ordered) {
9243
+ let i = x.depth.get(e) ?? 0, a = C.get(i) ?? 0;
9244
+ C.set(i, a + 1);
9210
9245
  let o = Ss(n, t, e) ?? {
9211
9246
  x: 80 + i * 500,
9212
9247
  y: 80 + a * 240
9213
- }, s = g.get(e);
9248
+ }, s = _.get(e);
9214
9249
  if (s.kind == "trigger") {
9215
- C.push(Hs(e, s.trigger, o, r));
9250
+ w.push(Ws(e, s.trigger, o, r));
9216
9251
  continue;
9217
9252
  }
9218
- C.push(Us(e, s, v.get(e), o, x));
9253
+ w.push(Gs(e, s, y.get(e), o, S));
9219
9254
  }
9220
- for (let [e, r] of Object.entries(Es(n, t)).toSorted(([e], [t]) => e.localeCompare(t))) C.push({
9255
+ for (let [e, r] of Object.entries(Es(n, t)).toSorted(([e], [t]) => e.localeCompare(t))) w.push({
9221
9256
  ...r,
9222
9257
  id: e,
9223
9258
  kind: "comment"
9224
9259
  });
9225
9260
  return {
9226
- edges: y.edges,
9261
+ edges: b.edges,
9227
9262
  layouts: Ts(n, t),
9228
- nodes: C,
9229
- ...m.status == null ? {} : { runStatus: m.status },
9263
+ nodes: w,
9264
+ ...h.status == null ? {} : { runStatus: h.status },
9230
9265
  viewport: ws(n, t),
9231
9266
  variableNames: l,
9232
9267
  variableNamesLoaded: u,
9233
9268
  variableNamesLoading: d
9234
9269
  };
9235
9270
  }
9236
- function Gs(e) {
9271
+ function qs(e) {
9237
9272
  let t = $(e.designer);
9238
9273
  return t?.version == 1 ? t : { version: 1 };
9239
9274
  }
9240
- function Ks(e, t) {
9275
+ function Js(e, t) {
9241
9276
  return t.kind == "flow" ? $(e.flow) : $($(e.subflows)?.[t.id]);
9242
9277
  }
9243
- function qs(e, t, n) {
9278
+ function Ys(e, t, n) {
9244
9279
  if (t.kind == "flow") return {
9245
9280
  ...e,
9246
9281
  flow: n,
@@ -9256,8 +9291,8 @@ function qs(e, t, n) {
9256
9291
  version: 1
9257
9292
  };
9258
9293
  }
9259
- function Js(e, t, n, r = "detail") {
9260
- let i = Gs(e), a = Ks(i, t) ?? {}, o = $(a.layouts) ?? {}, s = $(o[r]) ?? {}, c = {
9294
+ function Xs(e, t, n, r = "detail") {
9295
+ let i = qs(e), a = Js(i, t) ?? {}, o = $(a.layouts) ?? {}, s = $(o[r]) ?? {}, c = {
9261
9296
  ...$(s.nodes) ?? {},
9262
9297
  ...Object.fromEntries(Object.entries(n).map(([e, t]) => [e, {
9263
9298
  x: t.x,
@@ -9266,7 +9301,7 @@ function Js(e, t, n, r = "detail") {
9266
9301
  };
9267
9302
  return {
9268
9303
  ...e,
9269
- designer: qs(i, t, {
9304
+ designer: Ys(i, t, {
9270
9305
  ...a,
9271
9306
  layouts: {
9272
9307
  ...o,
@@ -9278,11 +9313,11 @@ function Js(e, t, n, r = "detail") {
9278
9313
  })
9279
9314
  };
9280
9315
  }
9281
- function Ys(e, t, n, r) {
9282
- let i = Js(e, t, { [n]: r.position }), a = Gs(i), o = Ks(a, t) ?? {}, s = $(o.comments) ?? {};
9316
+ function Zs(e, t, n, r) {
9317
+ let i = Xs(e, t, { [n]: r.position }), a = qs(i), o = Js(a, t) ?? {}, s = $(o.comments) ?? {};
9283
9318
  return {
9284
9319
  ...i,
9285
- designer: qs(a, t, {
9320
+ designer: Ys(a, t, {
9286
9321
  ...o,
9287
9322
  comments: {
9288
9323
  ...s,
@@ -9294,28 +9329,28 @@ function Ys(e, t, n, r) {
9294
9329
  })
9295
9330
  };
9296
9331
  }
9297
- function Xs(e, t, n) {
9298
- let r = Gs(e), i = Ks(r, t) ?? {}, a = { ...$(i.comments) }, o = { ...$(i.nodes) };
9332
+ function Qs(e, t, n) {
9333
+ let r = qs(e), i = Js(r, t) ?? {}, a = { ...$(i.comments) }, o = { ...$(i.nodes) };
9299
9334
  for (let e of n) delete a[e], delete o[e];
9300
9335
  return {
9301
9336
  ...e,
9302
- designer: qs(r, t, {
9337
+ designer: Ys(r, t, {
9303
9338
  ...i,
9304
9339
  comments: a,
9305
9340
  nodes: o
9306
9341
  })
9307
9342
  };
9308
9343
  }
9309
- function Zs(e, t) {
9344
+ function $s(e, t) {
9310
9345
  return new Set(Object.keys($(bs(e, t)?.comments) ?? {}));
9311
9346
  }
9312
- function Qs(e, t, n, r = "detail") {
9347
+ function ec(e, t, n, r = "detail") {
9313
9348
  let i = Cs(e, t, r);
9314
9349
  if (i?.x == n.x && i.y == n.y && i.zoom == n.zoom) return e;
9315
- let a = Gs(e), o = Ks(a, t) ?? {}, s = $(o.layouts) ?? {}, c = $(s[r]) ?? {};
9350
+ let a = qs(e), o = Js(a, t) ?? {}, s = $(o.layouts) ?? {}, c = $(s[r]) ?? {};
9316
9351
  return {
9317
9352
  ...e,
9318
- designer: qs(a, t, {
9353
+ designer: Ys(a, t, {
9319
9354
  ...o,
9320
9355
  layouts: {
9321
9356
  ...s,
@@ -9331,7 +9366,7 @@ function Qs(e, t, n, r = "detail") {
9331
9366
  })
9332
9367
  };
9333
9368
  }
9334
- function $s(e, t, n) {
9369
+ function tc(e, t, n) {
9335
9370
  let r = e.payload.nodeTitle;
9336
9371
  if (typeof r == "string") return r;
9337
9372
  let i = e.payload.executionId;
@@ -9344,7 +9379,7 @@ function $s(e, t, n) {
9344
9379
  }
9345
9380
  //#endregion
9346
9381
  //#region src/workbench/browser/runtime/designer/addNodeOptions.ts
9347
- function ec(e) {
9382
+ function nc(e) {
9348
9383
  let t = /* @__PURE__ */ new Map(), n = (e) => {
9349
9384
  t.set(e.id, e);
9350
9385
  for (let t of e.choices ?? []) n(t.option);
@@ -9352,7 +9387,7 @@ function ec(e) {
9352
9387
  for (let t of e) n(t);
9353
9388
  return t;
9354
9389
  }
9355
- function tc(e) {
9390
+ function rc(e) {
9356
9391
  let t = e("addNode.blocks");
9357
9392
  return [
9358
9393
  {
@@ -9475,9 +9510,9 @@ function tc(e) {
9475
9510
  }
9476
9511
  ];
9477
9512
  }
9478
- function nc(e, t, n) {
9513
+ function ic(e, t, n) {
9479
9514
  if (e == null || t == null) return [];
9480
- let r = tc(n);
9515
+ let r = rc(n);
9481
9516
  if (t.kind != "flow") return r;
9482
9517
  let i = n("addNode.triggers");
9483
9518
  return [
@@ -9515,7 +9550,7 @@ function nc(e, t, n) {
9515
9550
  ...r
9516
9551
  ];
9517
9552
  }
9518
- function rc(e, t, n, r) {
9553
+ function ac(e, t, n, r) {
9519
9554
  switch (e.kind) {
9520
9555
  case "new-task": return {
9521
9556
  kind: "code",
@@ -9568,4 +9603,4 @@ function rc(e, t, n, r) {
9568
9603
  }
9569
9604
  }
9570
9605
  //#endregion
9571
- export { _a as $, jo as A, mn as At, so as B, Go as C, br as Ct, Yo as D, yn as Dt, Xo as E, Sn as Et, To as F, Ka as G, $a as H, _o as I, Ia as J, Ga as K, go as L, ko as M, Oo as N, Uo as O, gn as Ot, Do as P, ba as Q, mo as R, Wo as S, Tr as St, Jo as T, mr as Tt, Za as U, io as V, Ja as W, Oa as X, Fa as Y, Ea as Z, es as _, xr as _t, gs as a, ti as at, Ho as b, Sr as bt, Xs as c, Rr as ct, Js as d, Lr as dt, Zi as et, bs as f, Nr as ft, rs as g, jr as gt, cs as h, Ar as ht, Zs as i, ri as it, Ao as j, Lo as k, hn as kt, Ys as l, zr as lt, ls as m, Or as mt, nc as n, ci as nt, Ws as o, qr as ot, us as p, Mr as pt, Ua as q, ec as r, ai as rt, $s as s, Jr as st, rc as t, Ji as tt, Qs as u, Ir as ut, $o as v, Dr as vt, qo as w, _r as wt, Zo as x, wr as xt, Qo as y, Er as yt, lo as z };
9606
+ export { _a as $, jo as A, mn as At, so as B, Go as C, br as Ct, Yo as D, yn as Dt, Xo as E, Sn as Et, To as F, Ka as G, $a as H, _o as I, Ia as J, Ga as K, go as L, ko as M, Oo as N, Uo as O, gn as Ot, Do as P, ba as Q, mo as R, Wo as S, Tr as St, Jo as T, mr as Tt, Za as U, io as V, Ja as W, Oa as X, Fa as Y, Ea as Z, es as _, xr as _t, gs as a, ti as at, Ho as b, Sr as bt, Qs as c, Rr as ct, Xs as d, Lr as dt, Zi as et, bs as f, Nr as ft, rs as g, jr as gt, cs as h, Ar as ht, $s as i, ri as it, Ao as j, Lo as k, hn as kt, Zs as l, zr as lt, ls as m, Or as mt, ic as n, ci as nt, Ks as o, qr as ot, us as p, Mr as pt, Ua as q, nc as r, ai as rt, tc as s, Jr as st, ac as t, Ji as tt, ec as u, Ir as ut, $o as v, Dr as vt, qo as w, _r as wt, Zo as x, wr as xt, Qo as y, Er as yt, lo as z };